:root {
  --bg: #f6efe0;
  --ink: #4a3826;
  --muted: #8a755c;
  --terracotta: #c0603a;
  --mustard: #d9a441;
  --sage: #7f9b74;
  --card-bg: #fffaf0;
  --border: #e3d6bd;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/></svg>");
  color: var(--ink);
  font-family: "Klee One", "Hiragino Sans", sans-serif;
  line-height: 1.8;
}
a { color: inherit; }
img { max-width: 100%; }

.variant-banner {
  background: var(--terracotta);
  color: #fff;
  font-size: 12px;
  text-align: center;
  padding: 8px;
}
.variant-banner a { color: #fff; text-decoration: underline; }

.hero {
  position: relative;
  background: var(--card-bg);
  padding: 64px 22px 56px;
}

.hero-inner {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.hero-visual {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.hero-photo {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 380px;
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 30px rgba(74,56,38,0.12);
}

/* Tentenを参考にした縦書きの一言。装飾要素なのでスクリーンリーダーからは隠す */
.hero-vertical {
  flex: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: "Shippori Mincho", serif;
  font-size: clamp(14px, 3.4vw, 20px);
  letter-spacing: 0.2em;
  line-height: 2;
  color: var(--terracotta);
  margin: 6px 2px;
  opacity: 0.9;
}

.hero-copy { text-align: center; max-width: 480px; }

.leaf-icon { font-size: 12px; margin-right: 6px; opacity: 0.75; filter: saturate(0.6); }

.kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--sage);
  font-weight: 700;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.headline {
  font-family: "Shippori Mincho", serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0;
  color: var(--ink);
  text-wrap: pretty;
}

.sub {
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0 0;
}

.cta {
  display: inline-block;
  margin-top: 26px;
  padding: 13px 30px;
  background: var(--terracotta);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(192,96,58,0.22);
}

@media (min-width: 720px) {
  .hero-inner { flex-direction: row; align-items: center; text-align: left; gap: 56px; }
  .hero-visual { width: 52%; }
  .hero-copy { text-align: left; max-width: none; }
  .kicker { justify-content: flex-start; }
}

/* 葉っぱのモチーフをセクションの区切りに控えめに使う */
.leaf-divider {
  text-align: center;
  font-size: 14px;
  opacity: 0.55;
  filter: saturate(0.6);
  padding: 22px 0 0;
}

/* アンダーライン型のリンク(控えめな二次リンク用) */
.link-underline {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s, border-bottom-width 0.15s;
}
.link-underline:hover { border-bottom: 2px solid var(--terracotta); }

.intro { padding: 40px 22px; text-align: center; }
.intro-text {
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
  text-wrap: pretty;
}

.farmers { padding: 36px 22px 60px; max-width: 680px; margin: 0 auto; text-align: center; scroll-margin-top: 12px; }
.farmers-head { margin-bottom: 20px; }
.tag {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--sage);
  margin-bottom: 8px;
}
.farmers-head h2 { font-family: "Shippori Mincho", serif; font-size: 24px; font-weight: 700; margin: 0; }

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 22px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.tab.active { background: var(--sage); border-color: var(--sage); color: #fff; }

.farmer-grid { display: flex; flex-direction: column; gap: 14px; text-align: left; }

.farmer-card {
  display: flex;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 16px rgba(74,56,38,0.08);
}
.farmer-card .thumb {
  width: 76px;
  height: 76px;
  flex: none;
  border-radius: 16px;
  background: #f0e4cc center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.farmer-card .name { font-weight: 700; font-size: 16px; margin: 0 0 4px; }
.farmer-card .location { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.farmer-card .crops { font-size: 13px; margin: 0 0 8px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eee2c8;
  color: var(--terracotta);
}
.badge.event { background: #e6efe0; color: var(--sage); }

.empty-state, .loading, .error-message { color: var(--muted); font-size: 14px; padding: 20px 0; }

.site-footer {
  padding: 36px 22px 52px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.site-footer .credit { margin-top: 10px; font-size: 10px; }
.site-footer a { color: var(--terracotta); }

/* 通常ページ用のシンプルなヘッダー(map/post/admin/seller) */
.app-header:not(.hero) {
  background: linear-gradient(135deg, var(--terracotta), #a04d2e);
  color: #fdf6e8;
  padding: 22px 20px 18px;
  position: relative;
}
.app-header .app-title { font-size: 19px; font-weight: 700; margin: 0; font-family: "Shippori Mincho", serif; }
.app-header .app-tagline { font-size: 12px; opacity: 0.9; margin: 6px 0 0; }

.container { max-width: 640px; margin: 0 auto; padding: 0 20px 48px; }

/* 農家ページ */
.cover { width: 100%; aspect-ratio: 16/9; background: #f0e4cc center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.farmer-header { padding: 22px; border-bottom: 1px solid var(--border); background: var(--card-bg); }
.farmer-header h1 { font-family: "Shippori Mincho", serif; font-size: 22px; margin: 0 0 6px; }
.farmer-header .meta { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.farmer-header .desc { font-size: 14px; white-space: pre-wrap; }

.contact-buttons { display: flex; gap: 10px; margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 18px; border-radius: 999px; border: none; font-size: 13px; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.btn.line { background: #06c755; color: #fff; flex: 1; }
.btn.phone { background: var(--terracotta); color: #fff; flex: 1; }
.btn.primary { background: var(--sage); color: #fff; }
.btn.secondary { background: var(--card-bg); color: var(--ink); border: 1px solid var(--border); }
.btn.danger { background: var(--card-bg); color: var(--terracotta); border: 1px solid var(--terracotta); }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

section.section { padding: 20px; border-bottom: 1px solid var(--border); background: var(--card-bg); }
section.section h2 { font-family: "Shippori Mincho", serif; font-size: 16px; margin: 0 0 14px; }

.listing-card, .event-card { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.listing-card:last-child, .event-card:last-child { border-bottom: none; }
.listing-card .thumb { width: 60px; height: 60px; flex: none; border-radius: 12px; background: #f0e4cc center/cover no-repeat; display: flex; align-items: center; justify-content: center; }
.listing-card .title, .event-card .title { font-weight: 700; font-size: 14px; margin: 0; }
.listing-card .comment, .event-card .desc { font-size: 13px; color: var(--muted); margin: 3px 0; }
.listing-card .price { font-size: 14px; font-weight: 700; color: var(--terracotta); }
.event-card .date-box {
  flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--sage); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
}
.event-card .sub { font-size: 12px; color: var(--muted); margin: 2px 0; }

.badge.special { background: #f6ddc4; color: var(--terracotta); }
.badge.labor { background: #dfe9dc; color: var(--sage); }

/* バイト・求人カード */
.job-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  text-align: left;
  box-shadow: 0 6px 16px rgba(74,56,38,0.06);
}
.job-title { font-weight: 700; font-size: 15px; margin: 0 0 6px; }
.job-wage { font-weight: 700; font-size: 16px; color: var(--terracotta); margin: 0 0 6px; }
.job-meta { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.job-desc { font-size: 13px; margin: 0 0 10px; }
.job-farmer { font-size: 12px; color: var(--muted); margin: 0; }

/* フォーム(post.html / admin.html / seller.html) */
form.stack { display: flex; flex-direction: column; gap: 14px; }
label { font-size: 13px; font-weight: 700; display: block; margin-bottom: 5px; }
input[type=text], input[type=number], input[type=tel], input[type=url], input[type=date], input[type=time],
input[type=password], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px;
  background: var(--card-bg); color: var(--ink); font-family: inherit;
}
textarea { min-height: 80px; resize: vertical; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 18px; padding: 18px; margin-bottom: 18px; }
.card h3 { margin: 0 0 14px; font-size: 15px; font-family: "Shippori Mincho", serif; }

.item-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.item-row:last-child { border-bottom: none; }
.item-row .actions { display: flex; gap: 6px; flex: none; }
.item-row .actions button { padding: 6px 10px; font-size: 11px; }

.image-preview { width: 100%; max-width: 200px; border-radius: 10px; margin-top: 8px; display: none; }
.image-preview.show { display: block; }

.result-box { background: #eee2c8; border-radius: 14px; padding: 16px; margin-top: 12px; }

.hamburger-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.7);
  background: rgba(74,56,38,0.4);
  color: #fdf6e8;
  font-size: 15px;
  cursor: pointer;
  z-index: 1010;
}
.hamburger-btn-floating {
  position: fixed;
  top: 12px;
  right: 12px;
  background: rgba(74,56,38,0.55);
}
/* heroは明るい背景になったため、ハンバーガーボタンをインク色で視認性を確保する */
.hero .hamburger-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(74,56,38,0.14);
}
.nav-overlay {
  position: fixed; inset: 0; background: rgba(74,56,38,0.4);
  z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }
.nav-drawer {
  position: absolute; top: 0; right: 0; height: 100%;
  width: 78%; max-width: 300px; background: var(--card-bg);
  transform: translateX(100%); transition: transform 0.2s;
  display: flex; flex-direction: column;
}
.nav-overlay.open .nav-drawer { transform: translateX(0); }
.nav-drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px; border-bottom: 1px solid var(--border); font-weight: 700;
}
.nav-close { border: none; background: none; color: var(--ink); font-size: 18px; cursor: pointer; }
.nav-drawer ul { list-style: none; margin: 0; padding: 8px 0; }
.nav-drawer a { display: block; padding: 16px 22px; color: var(--ink); text-decoration: none; font-size: 14px; }
.nav-drawer a.active { color: var(--terracotta); font-weight: 700; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fdf6e8; padding: 10px 20px; border-radius: 999px;
  font-size: 13px; opacity: 0; transition: opacity 0.2s; pointer-events: none; z-index: 2000;
}
.toast.show { opacity: 1; }

.section-head { text-align: center; margin-bottom: 24px; }
.section-head h2 { font-family: "Shippori Mincho", serif; font-size: 22px; font-weight: 700; margin: 8px 0 0; }
.link-underline.center { display: block; text-align: center; margin-top: 22px; }

/* 定期購入セクション(見出し+文章+画像)の構成を踏襲 */
.today-section { display: flex; flex-direction: column-reverse; max-width: 980px; margin: 0 auto; gap: 0; }
.today-photo { aspect-ratio: 16/9; background-position: center; background-size: cover; background-color: var(--card-bg); border-radius: 0; }
.today-body { padding: 44px 22px; text-align: center; }
.today-body h2 { font-family: "Shippori Mincho", serif; font-size: 22px; margin: 8px 0 14px; }
.today-body > p { font-size: 14px; color: var(--muted); max-width: 480px; margin: 0 auto 18px; }

@media (min-width: 760px) {
  .today-section { flex-direction: row; align-items: stretch; border-radius: 28px; overflow: hidden; box-shadow: 0 14px 30px rgba(74,56,38,0.1); }
  .today-photo { flex: 1; aspect-ratio: auto; }
  .today-body { flex: 1; text-align: left; padding: 48px; }
  .today-body > p { margin: 0 0 18px; }
}

/* Information: お知らせ一覧(サムネイル付きグリッド)の構成を踏襲。イベントAPIから実データを表示 */
.info-section { padding: 20px 22px 50px; max-width: 900px; margin: 0 auto; }
.info-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.info-card { display: block; background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: inherit; }
.info-date { font-size: 12px; color: var(--terracotta); font-weight: 700; margin: 0 0 4px; }
.info-title { font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.info-farmer { font-size: 12px; color: var(--muted); margin: 0; }
@media (min-width: 640px) { .info-grid { grid-template-columns: 1fr 1fr; } }

/* Items: 商品カードグリッド(8点)の構成を踏襲。出品APIから実データを表示 */
.items-section { padding: 20px 22px 50px; max-width: 980px; margin: 0 auto; }
.items-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.item-card { display: block; text-decoration: none; color: inherit; }
.item-photo { aspect-ratio: 1; border-radius: 16px; background-position: center; background-size: cover; background-color: #f0e4cc; display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 8px; box-shadow: 0 6px 16px rgba(74,56,38,0.08); }
.item-title { font-size: 13px; font-weight: 700; margin: 0 0 2px; }
.item-price { font-size: 13px; color: var(--terracotta); font-weight: 700; margin: 0 0 2px; }
.item-farmer { font-size: 11px; color: var(--muted); margin: 0; }
@media (min-width: 640px) { .items-grid { grid-template-columns: repeat(4, 1fr); } }

/* 資源循環セクション: 簡易ダイアグラム+説明文の構成を踏襲 */
.circulation-section { padding: 20px 22px 56px; max-width: 720px; margin: 0 auto; text-align: center; }
.circulation-diagram { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-bottom: 26px; }
.circulation-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.circulation-icon { font-size: 26px; width: 56px; height: 56px; border-radius: 50%; background: var(--card-bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.circulation-step p { font-size: 11px; margin: 0; color: var(--muted); }
.circulation-arrow { color: var(--sage); font-size: 16px; }
.circulation-text { font-size: 14px; color: var(--muted); max-width: 560px; margin: 0 auto; }

/* 出品者募集バナー: Membershipバナーの構成を踏襲 */
.member-banner { background: linear-gradient(135deg, var(--sage), #5f7a55); margin: 0 0 56px; padding: 48px 22px; }
.member-banner-inner { max-width: 560px; margin: 0 auto; text-align: center; color: #fdf6e8; }
.member-banner-inner .tag { color: #e6efe0; }
.member-banner-inner h2 { font-family: "Shippori Mincho", serif; font-size: 21px; margin: 8px 0 14px; }
.member-banner-inner p { font-size: 13px; opacity: 0.95; margin: 0; }

/* Stories: 縦横比の異なる画像グリッドの構成を踏襲 */
.stories-section { padding: 20px 22px 56px; max-width: 980px; margin: 0 auto; }
.stories-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stories-grid figure { margin: 0; }
.story-photo { aspect-ratio: 1; border-radius: 18px; background-position: center; background-size: cover; background-color: #f0e4cc; box-shadow: 0 8px 18px rgba(74,56,38,0.1); }
.story-tall .story-photo { aspect-ratio: 3/4; }
.stories-grid figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; }
@media (min-width: 640px) { .stories-grid { grid-template-columns: repeat(3, 1fr); } }

/* エリアから探す: Stores/Stay/Restaurant(大きな画像+テキスト)の構成を踏襲 */
.area-section { padding: 20px 22px 60px; max-width: 980px; margin: 0 auto; }
.area-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.area-card { position: relative; display: block; aspect-ratio: 16/9; border-radius: 22px; overflow: hidden; text-decoration: none; color: #fdf6e8; }
.area-photo { position: absolute; inset: 0; background-position: center; background-size: cover; }
.area-photo::after { content: ""; }
.area-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(74,56,38,0.65), rgba(74,56,38,0.05)); }
.area-copy { position: absolute; left: 20px; bottom: 16px; z-index: 1; }
.area-name { font-family: "Shippori Mincho", serif; font-size: 18px; font-weight: 700; margin: 0 0 2px; }
.area-desc { font-size: 12px; margin: 0; opacity: 0.9; }
@media (min-width: 640px) { .area-grid { grid-template-columns: repeat(3, 1fr); } }

.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 16px; font-size: 12px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--terracotta); }
