/* ===== リセット・基本 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark:   #2D5016;
  --green-mid:    #4A7C28;
  --green-light:  #6FAB3C;
  --brown:        #6B3A1F;
  --brown-light:  #A0613A;
  --bg:           #F5F0E8;
  --bg-card:      #FFFFFF;
  --text:         #2C2C2C;
  --text-muted:   #666666;
  --border:       #D9D0C0;
  --star:         #E8A020;
  --radius:       6px;
  --shadow:       0 2px 8px rgba(0,0,0,.10);
}

body {
  font-family: 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green-light); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ===== ヘッダー ===== */
.site-header {
  background: var(--green-dark);
  padding: 14px 0;
}
.site-header .inner { max-width: 1140px; margin: auto; padding: 0 16px; }

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon  { font-size: 2rem; }
.logo-text  { color: #fff; font-size: 1.6rem; font-weight: bold; letter-spacing: .05em; }
.logo-sub   { color: #B8D99A; font-size: .8rem; }

/* ===== ヒーロー画像 ===== */
.hero {
  width: 100%;
  max-height: 180px;
  overflow: hidden;
  position: relative;
}
.hero img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.1), rgba(0,0,0,.45));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  text-align: center;
  padding: 16px;
}
.hero-overlay h2 {
  font-size: 2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  margin-bottom: 8px;
}
.hero-overlay p {
  font-size: 1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

/* ===== グローバルナビ ===== */
.global-nav {
  background: var(--green-mid);
  border-bottom: 3px solid var(--brown);
}
.global-nav .inner {
  max-width: 1140px;
  margin: auto;
  padding: 0 16px;
}
.global-nav ul {
  display: flex;
  list-style: none;
  gap: 2px;
  flex-wrap: wrap;
}
.global-nav a {
  display: block;
  padding: 10px 18px;
  color: #fff;
  font-weight: bold;
  font-size: .9rem;
  transition: background .2s;
}
.global-nav a:hover { background: var(--green-dark); text-decoration: none; }

/* ===== レイアウト ===== */
.inner        { max-width: 1140px; margin: auto; padding: 0 16px; }
.page-wrap    { max-width: 1140px; margin: 24px auto; padding: 0 16px; display: flex; gap: 24px; }
.main-content { flex: 1; min-width: 0; }
.sidebar      { width: 280px; flex-shrink: 0; }

/* ===== カード共通 ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card-title { font-size: 1.1rem; font-weight: bold; margin-bottom: 10px; }

/* ===== セクションタイトル ===== */
.section-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--green-dark);
  border-left: 5px solid var(--green-mid);
  padding-left: 10px;
  margin: 24px 0 14px;
}

/* ===== ニュース一覧 ===== */
.news-list { list-style: none; }
.news-item {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.news-source {
  background: var(--green-dark);
  color: #fff;
  font-size: .7rem;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.news-date { color: var(--text-muted); font-size: .8rem; white-space: nowrap; flex-shrink: 0; }
.news-title a { font-weight: bold; }

/* ===== 掲示板 ===== */
.thread-list { list-style: none; }
.thread-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.thread-title a { font-weight: bold; font-size: 1rem; }
.thread-meta { color: var(--text-muted); font-size: .8rem; white-space: nowrap; text-align: right; }
.thread-category {
  background: var(--brown-light);
  color: #fff;
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 3px;
}

.post-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.post-meta { color: var(--text-muted); font-size: .82rem; margin-bottom: 8px; }
.post-content { white-space: pre-wrap; word-break: break-word; }

/* ===== レビュー ===== */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.review-card:hover { transform: translateY(-3px); }
.review-card img  { width: 100%; height: 180px; object-fit: cover; }
.review-card-body { padding: 14px; }
.review-card-name { font-weight: bold; margin-bottom: 4px; }
.stars { color: var(--star); font-size: 1.1rem; }
.stars-sm { color: var(--star); font-size: .85rem; }

/* ===== フォーム ===== */
.form-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 4px; font-size: .9rem; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  background: #FAFAF7;
  transition: border .2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green-mid);
  background: #fff;
}
.form-group textarea { min-height: 120px; resize: vertical; }

.star-select { display: flex; gap: 6px; margin-top: 4px; }
.star-select input[type="radio"] { display: none; }
.star-select label { font-size: 1.5rem; color: #ccc; cursor: pointer; }
.star-select input:checked ~ label,
.star-select label:hover,
.star-select label:hover ~ label { color: var(--star); }

/* ===== ボタン ===== */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: .95rem;
  font-family: inherit;
  font-weight: bold;
  text-decoration: none;
  transition: opacity .2s, transform .1s;
}
.btn:hover { opacity: .85; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--green-dark);  color: #fff; }
.btn-brown    { background: var(--brown);        color: #fff; }
.btn-danger   { background: #c0392b;             color: #fff; }
.btn-outline  { background: transparent; border: 2px solid var(--green-dark); color: var(--green-dark); }
.btn-amazon   { background: #FF9900; color: #fff; }
.btn-sm       { padding: 6px 14px; font-size: .85rem; }

/* ===== ウィジェット（サイドバー） ===== */
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
}
.widget-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--green-dark);
  border-bottom: 2px solid var(--green-mid);
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.widget p { margin-bottom: 6px; font-size: .88rem; }

/* ===== ページング ===== */
.pagination { display: flex; gap: 6px; margin: 20px 0; flex-wrap: wrap; }
.pagination a {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: .9rem;
}
.pagination a.active { background: var(--green-dark); color: #fff; border-color: var(--green-dark); }

/* ===== アラート ===== */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.alert-success { background: #DFF2D8; border: 1px solid #4CAF50; color: #2E7D32; }
.alert-error   { background: #FDECEA; border: 1px solid #E57373; color: #B71C1C; }
.alert-info    { background: #E3F2FD; border: 1px solid #64B5F6; color: #0D47A1; }

/* ===== フッター ===== */
.site-footer {
  background: var(--green-dark);
  color: #ccc;
  padding: 24px 0;
  margin-top: 40px;
  font-size: .85rem;
  text-align: center;
}
.site-footer a { color: #B8D99A; }
.footer-note { margin-top: 6px; font-size: .78rem; color: #999; }

/* ===== 管理画面 ===== */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}
.admin-table th, .admin-table td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-size: .88rem;
}
.admin-table th { background: var(--green-dark); color: #fff; text-align: left; }
.admin-table tr:nth-child(even) { background: #f9f7f2; }

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .page-wrap { flex-direction: column; }
  .sidebar   { width: 100%; }
  .review-grid { grid-template-columns: 1fr 1fr; }
  .logo-sub { display: none; }
}
@media (max-width: 480px) {
  .review-grid { grid-template-columns: 1fr; }
  .thread-item { flex-direction: column; align-items: flex-start; }
}
