/* ==========================================================================
   疲れにくい身体をつくる食材ガイド＆食材別GI値大辞典 (Fatigue & GI Atlas)
   Design System: Warm Botanical Japanese Editorial & Nutritional Science
   ========================================================================== */

:root {
  /* Core Palette — Warm Linen, Porcelain & Deep Matcha Pine */
  --bg: hsl(44, 33%, 95%);
  --bg-elevated: hsl(44, 30%, 98%);
  --surface: hsl(0, 0%, 100%);
  --surface-alt: hsl(42, 26%, 91%);
  --surface-hover: hsl(42, 30%, 94%);

  --ink: hsl(148, 16%, 13%);
  --ink-secondary: hsl(148, 10%, 31%);
  --ink-muted: hsl(146, 8%, 45%);

  --brand: hsl(150, 42%, 28%);
  --brand-hover: hsl(150, 44%, 22%);
  --brand-soft: hsl(148, 36%, 92%);
  --brand-ink: hsl(150, 46%, 20%);

  --warm: hsl(26, 65%, 43%);
  --warm-soft: hsl(33, 68%, 93%);
  --warm-ink: hsl(26, 68%, 31%);

  /* Semantic GI Traffic-Light Scale (AA/AAA Contrast) */
  --gi-low: hsl(152, 56%, 29%);
  --gi-low-bar: hsl(152, 52%, 37%);
  --gi-low-bg: hsl(148, 46%, 92%);

  --gi-mid: hsl(33, 76%, 34%);
  --gi-mid-bar: hsl(35, 76%, 45%);
  --gi-mid-bg: hsl(38, 82%, 92%);

  --gi-high: hsl(3, 58%, 42%);
  --gi-high-bar: hsl(4, 62%, 51%);
  --gi-high-bg: hsl(4, 72%, 94%);

  /* Hairlines & Shadows */
  --border: hsla(148, 16%, 13%, 0.11);
  --border-strong: hsla(148, 16%, 13%, 0.2);
  --shadow-xs: 0 1px 2px hsla(148, 22%, 10%, 0.05);
  --shadow-sm: 0 4px 14px -4px hsla(148, 22%, 10%, 0.08), 0 1px 3px hsla(148, 22%, 10%, 0.04);
  --shadow-md: 0 14px 32px -12px hsla(148, 22%, 10%, 0.12), 0 4px 10px -4px hsla(148, 22%, 10%, 0.06);
  --shadow-lg: 0 24px 54px -18px hsla(148, 22%, 10%, 0.18);

  /* Typography */
  --font-serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --font-sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Geometry & Motion */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --container-max: 1180px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  /* Deep Cedar Apothecary Dark Mode (Zero Purple) */
  --bg: hsl(150, 14%, 9%);
  --bg-elevated: hsl(150, 14%, 12%);
  --surface: hsl(150, 13%, 14%);
  --surface-alt: hsl(150, 12%, 18%);
  --surface-hover: hsl(150, 12%, 21%);

  --ink: hsl(110, 18%, 93%);
  --ink-secondary: hsl(135, 11%, 77%);
  --ink-muted: hsl(140, 8%, 60%);

  --brand: hsl(151, 44%, 52%);
  --brand-hover: hsl(151, 48%, 60%);
  --brand-soft: hsla(151, 44%, 52%, 0.16);
  --brand-ink: hsl(148, 52%, 75%);

  --warm: hsl(31, 70%, 60%);
  --warm-soft: hsla(31, 70%, 60%, 0.16);
  --warm-ink: hsl(33, 76%, 76%);

  --gi-low: hsl(150, 56%, 64%);
  --gi-low-bar: hsl(150, 52%, 50%);
  --gi-low-bg: hsla(150, 52%, 44%, 0.17);

  --gi-mid: hsl(37, 86%, 66%);
  --gi-mid-bar: hsl(37, 82%, 55%);
  --gi-mid-bg: hsla(37, 82%, 50%, 0.17);

  --gi-high: hsl(4, 78%, 69%);
  --gi-high-bar: hsl(4, 72%, 59%);
  --gi-high-bg: hsla(4, 70%, 54%, 0.18);

  --border: hsla(120, 18%, 90%, 0.11);
  --border-strong: hsla(120, 18%, 90%, 0.22);
  --shadow-xs: 0 1px 2px hsla(0, 0%, 0%, 0.28);
  --shadow-sm: 0 6px 18px -6px hsla(0, 0%, 0%, 0.36);
  --shadow-md: 0 16px 36px -12px hsla(0, 0%, 0%, 0.5);
  --shadow-lg: 0 28px 60px -16px hsla(0, 0%, 0%, 0.65);
}

/* Base Reset & Typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--ink);
  background-color: var(--bg);
  /* Subtle organic paper grain texture for tactile editorial warmth */
  background-image: radial-gradient(hsla(148, 16%, 13%, 0.025) 1px, transparent 0);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[data-theme="dark"] body {
  background-image: radial-gradient(hsla(120, 18%, 90%, 0.028) 1px, transparent 0);
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

a:hover {
  color: var(--brand-hover);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.32;
  letter-spacing: 0.02em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

.tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 32px);
}

.section {
  padding-block: clamp(56px, 7vw, 92px);
}

.section-alt {
  background-color: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(28px, 4vw, 42px);
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  letter-spacing: 0.025em;
}

.section-desc {
  margin-top: 10px;
  max-width: 68ch;
  color: var(--ink-secondary);
  font-size: 0.96rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--brand);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-primary {
  color: hsl(150, 28%, 9%);
}

[data-theme="dark"] .btn-primary:hover {
  color: hsl(150, 28%, 9%);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background-color: var(--surface-alt);
  color: var(--ink);
  border-color: var(--brand);
}

.btn-ghost {
  background-color: transparent;
  color: var(--ink-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  background-color: var(--surface-alt);
  color: var(--ink);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.icon-btn:hover {
  background: var(--surface-alt);
  border-color: var(--border-strong);
}

/* ==========================================================================
   Sticky Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: hsla(44, 33%, 95%, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .site-header {
  background: hsla(150, 14%, 9%, 0.88);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-link:hover {
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.03em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  background-color: var(--brand-soft);
  color: var(--brand-ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-counter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--ink-secondary);
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.header-counter:hover {
  border-color: var(--brand);
  color: var(--ink);
}

.header-counter-num {
  font-weight: 600;
  color: var(--brand);
}

.header-pr-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.header-pr-pill:hover {
  border-color: var(--warm);
  color: var(--ink);
  transform: translateY(-1px);
}

.header-pr-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.pr-mini-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--warm-soft);
  color: var(--warm-ink);
  letter-spacing: 0.04em;
}

.mobile-menu-btn {
  display: none;
}

.mobile-drawer {
  display: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  padding: 12px 20px 18px;
  gap: 4px;
}

.mobile-nav-list a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--ink);
}

.mobile-nav-list a:hover {
  background: var(--surface-alt);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(42px, 5.5vw, 76px);
  border-bottom: 1px solid var(--border);
  background-color: var(--bg-elevated);
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.92;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    98deg,
    hsla(44, 33%, 95%, 0.97) 0%,
    hsla(44, 33%, 95%, 0.93) 44%,
    hsla(44, 33%, 95%, 0.56) 72%,
    hsla(44, 33%, 95%, 0.25) 100%
  );
}

[data-theme="dark"] .hero-bg-img {
  opacity: 0.34;
}

[data-theme="dark"] .hero-scrim {
  background: linear-gradient(
    98deg,
    hsla(150, 14%, 9%, 0.96) 0%,
    hsla(150, 14%, 9%, 0.88) 48%,
    hsla(150, 14%, 9%, 0.64) 76%,
    hsla(150, 14%, 9%, 0.48) 100%
  );
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.72fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(1.95rem, 4.1vw, 3.05rem);
  line-height: 1.24;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.hero-lead {
  font-size: clamp(0.96rem, 1.35vw, 1.07rem);
  color: var(--ink-secondary);
  max-width: 56ch;
  margin-bottom: 24px;
}

/* Hero Instant GI Quick Search */
.hero-search-wrap {
  position: relative;
  max-width: 540px;
  margin-bottom: 20px;
}

.hero-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 6px 8px 6px 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.hero-search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow-sm);
}

.hero-search-icon {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.hero-search-input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 0.95rem;
  padding: 6px 0;
  outline: none;
}

.hero-search-input::placeholder {
  color: var(--ink-muted);
}

.hero-quick-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-quick-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  transition: background-color 0.14s var(--ease);
}

.hero-quick-item:last-child {
  border-bottom: 0;
}

.hero-quick-item:hover {
  background: var(--surface-alt);
}

.hero-quick-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.hero-quick-meta {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-cta-row .btn-ghost {
  background-color: hsla(0, 0%, 100%, 0.78);
  border-color: var(--border-strong);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

[data-theme="dark"] .hero-cta-row .btn-ghost {
  background-color: hsla(150, 14%, 14%, 0.78);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.hero-stat-val {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.1;
}

.hero-stat-val small {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 2px;
  color: var(--ink-secondary);
}

.hero-stat-label {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 3px;
}

/* Hero Side Summary Card (GI Legend + Live Visitor Readout) */
.hero-side-card {
  background: hsla(0, 0%, 100%, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .hero-side-card {
  background: hsla(150, 14%, 13%, 0.9);
}

.side-card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gi-scale-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.gi-scale-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
}

.gi-scale-row p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.side-counter-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.side-counter-box {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.side-counter-label {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.side-counter-val {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
}

/* ==========================================================================
   GI Badges & Visual Meters
   ========================================================================== */
.gi-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.gi-badge-low {
  background: var(--gi-low-bg);
  color: var(--gi-low);
}

.gi-badge-mid {
  background: var(--gi-mid-bg);
  color: var(--gi-mid);
}

.gi-badge-high {
  background: var(--gi-high-bg);
  color: var(--gi-high);
}

.gi-meter-track {
  width: 100%;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  overflow: hidden;
  position: relative;
}

.gi-meter-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.35s var(--ease);
}

.gi-meter-fill.low { background: var(--gi-low-bar); }
.gi-meter-fill.mid { background: var(--gi-mid-bar); }
.gi-meter-fill.high { background: var(--gi-high-bar); }

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  color: var(--ink-secondary);
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
}

.stars {
  color: var(--warm);
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

/* ==========================================================================
   Section 1: Anti-Fatigue Symptom Selector & 8 Core Nutrients
   ========================================================================== */
.symptom-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.symptom-tab {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.18s var(--ease);
}

.symptom-tab:hover {
  border-color: var(--brand);
  color: var(--ink);
}

.symptom-tab.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

[data-theme="dark"] .symptom-tab.is-active {
  color: hsl(150, 28%, 9%);
}

.symptom-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 44px;
}

.symptom-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.symptom-title {
  font-size: 1.32rem;
  margin-bottom: 8px;
}

.symptom-mechanism {
  color: var(--ink-secondary);
  font-size: 0.94rem;
  margin-bottom: 18px;
}

.symptom-meta-block {
  margin-bottom: 16px;
}

.meta-sublabel {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 7px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.symptom-ng-box {
  background: var(--gi-high-bg);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-size: 0.86rem;
  color: var(--ink);
}

.symptom-ng-box strong {
  color: var(--gi-high);
}

.rec-foods-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.rec-food-btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-align: left;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.rec-food-btn:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.rec-food-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

.rec-food-name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
}

.rec-food-why {
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.48;
}

/* 8 Core Anti-Fatigue Nutrients Grid */
.sub-heading {
  font-size: 1.32rem;
  margin-bottom: 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.sub-heading small {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--ink-muted);
}

.nutrients-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 44px;
}

.nutrient-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nutrient-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

.nutrient-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.08em;
}

.nutrient-name {
  font-size: 1.06rem;
}

.nutrient-role {
  font-size: 0.84rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  flex-grow: 1;
}

.nutrient-foods {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.nutrient-foods strong {
  color: var(--ink);
  display: block;
  margin-bottom: 3px;
  font-size: 0.76rem;
}

/* Editorial Teishoku & Synergy Showcase */
.synergy-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(22px, 3.5vw, 38px);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.synergy-photo-wrap {
  height: 100%;
  min-height: 290px;
  position: relative;
}

.synergy-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.synergy-photo-caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  right: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: hsla(148, 20%, 10%, 0.76);
  color: #f4f6f2;
  font-size: 0.77rem;
  backdrop-filter: blur(6px);
}

.synergy-body {
  padding: clamp(22px, 3vw, 32px);
}

.synergy-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.synergy-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.synergy-pair {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--brand-ink);
  margin-bottom: 3px;
}

.synergy-desc {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  margin: 0;
}

/* ==========================================================================
   Section 2: 120-Food GI / GL Searchable Database
   ========================================================================== */
.db-controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.db-top-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) auto auto;
  gap: 12px;
  align-items: center;
}

.db-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.db-search-field svg {
  position: absolute;
  left: 14px;
  color: var(--ink-muted);
  pointer-events: none;
}

.db-search-input {
  width: 100%;
  padding: 10px 36px 10px 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.db-search-input:focus {
  border-color: var(--brand);
  background: var(--surface);
}

.db-clear-btn {
  position: absolute;
  right: 10px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.db-select {
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  font-size: 0.86rem;
  font-weight: 500;
}

.view-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.view-toggle-btn {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  border: 0;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.view-toggle-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.filter-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.filter-pill {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: all 0.15s var(--ease);
}

.filter-pill:hover {
  border-color: var(--brand);
  color: var(--ink);
}

.filter-pill.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

[data-theme="dark"] .filter-pill.is-active {
  color: hsl(150, 28%, 9%);
}

.filter-pill[data-gi-filter="low"].is-active {
  background: var(--gi-low);
  border-color: var(--gi-low);
  color: #ffffff;
}

.filter-pill[data-gi-filter="mid"].is-active {
  background: var(--gi-mid);
  border-color: var(--gi-mid);
  color: #ffffff;
}

.filter-pill[data-gi-filter="high"].is-active {
  background: var(--gi-high);
  border-color: var(--gi-high);
  color: #ffffff;
}

[data-theme="dark"] .filter-pill[data-gi-filter="low"].is-active,
[data-theme="dark"] .filter-pill[data-gi-filter="mid"].is-active,
[data-theme="dark"] .filter-pill[data-gi-filter="high"].is-active {
  color: hsl(150, 20%, 8%);
}

.db-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

/* Food Cards Grid */
.food-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.food-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
  cursor: pointer;
}

.food-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}

.food-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.food-card-cat {
  font-size: 0.72rem;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 2px;
}

.food-card-name {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
}

.food-gi-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.food-gi-num {
  font-size: 1.48rem;
  font-weight: 700;
  line-height: 1;
}

.food-gi-num.low { color: var(--gi-low); }
.food-gi-num.mid { color: var(--gi-mid); }
.food-gi-num.high { color: var(--gi-high); }

.food-gi-unit {
  font-size: 0.68rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.food-metrics-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.79rem;
  color: var(--ink-secondary);
}

.food-card-note {
  font-size: 0.81rem;
  color: var(--ink-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.food-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* Food Comparison Table View */
.food-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-xs);
}

.food-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 0.87rem;
}

.food-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-muted);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.food-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.food-table tbody tr {
  cursor: pointer;
  transition: background-color 0.14s var(--ease);
}

.food-table tbody tr:hover {
  background: var(--surface-hover);
}

.food-table tbody tr:last-child td {
  border-bottom: 0;
}

.table-bar-cell {
  width: 110px;
}

.db-empty-state {
  text-align: center;
  padding: 46px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
}

/* Low-GI Swap Comparisons */
.swaps-section {
  margin-top: 44px;
}

.swaps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.swap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}

.swap-compare-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.swap-side {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.swap-side-after {
  background: var(--gi-low-bg);
}

.swap-label {
  display: block;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.swap-food-name {
  font-weight: 700;
  font-size: 0.92rem;
  display: block;
  margin-top: 2px;
}

.swap-gi-val {
  font-size: 0.84rem;
  font-weight: 700;
  margin-top: 2px;
  display: inline-block;
}

.swap-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.8rem;
}

.swap-reason {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  margin: 0;
}

/* ==========================================================================
   Sponsor PR Banner (HisatorNotebook)
   ========================================================================== */
.sponsor-band {
  padding-block: 14px;
}

.sponsor-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 2.8vw, 26px) clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-sm);
}

.sponsor-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.sponsor-pr-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--warm-soft);
  color: var(--warm-ink);
  margin-bottom: 6px;
}

.sponsor-title {
  font-size: 1.15rem;
  margin-bottom: 5px;
}

.sponsor-desc {
  font-size: 0.87rem;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}

.sponsor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sponsor-feat-tag {
  font-size: 0.73rem;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  color: var(--ink-secondary);
}

/* ==========================================================================
   Section 3: Interactive Meal GI & Blood Glucose Simulator
   ========================================================================== */
.sim-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.preset-btn {
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: all 0.16s var(--ease);
}

.preset-btn:hover {
  border-color: var(--brand);
  color: var(--ink);
}

.preset-btn.is-active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-ink);
}

.sim-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.25fr);
  gap: 22px;
  align-items: start;
}

.sim-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.sim-panel-title {
  font-size: 1.08rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sim-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.sim-add-select {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  font-size: 0.86rem;
}

.sim-tray {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 110px;
  margin-bottom: 18px;
}

.sim-tray-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.sim-tray-info {
  min-width: 0;
}

.sim-tray-name {
  font-weight: 600;
  font-size: 0.89rem;
  display: block;
}

.sim-tray-meta {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.sim-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sim-remove-btn:hover {
  color: var(--gi-high);
  border-color: var(--gi-high);
}

.sim-modifiers {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.modifier-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.84rem;
}

.modifier-check input {
  margin-top: 3px;
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.modifier-check span small {
  display: block;
  color: var(--ink-muted);
  font-size: 0.76rem;
}

/* Simulator KPIs & Curve */
.sim-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.sim-kpi {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.sim-kpi-label {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.sim-kpi-val {
  display: block;
  font-size: 1.38rem;
  font-weight: 700;
  margin-top: 2px;
  line-height: 1.15;
}

.sim-kpi-sub {
  display: block;
  font-size: 0.72rem;
  margin-top: 3px;
  color: var(--ink-secondary);
}

.sim-chart-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
}

.sim-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.sim-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.75rem;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 4px;
}

.sim-svg {
  width: 100%;
  height: auto;
  display: block;
}

.sim-verdict {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--ink);
  font-size: 0.87rem;
  margin-bottom: 18px;
}

.sim-verdict.is-warn {
  background: var(--gi-mid-bg);
}

.sim-verdict.is-alert {
  background: var(--gi-high-bg);
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
}

.coverage-pill {
  padding: 9px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.35;
  word-break: keep-all;
}

.coverage-pill.is-covered {
  background: var(--gi-low-bg);
  border-color: hsla(152, 56%, 29%, 0.32);
  color: var(--gi-low);
  font-weight: 700;
}

.coverage-status {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  margin-top: 3px;
}

.sim-disclaimer {
  margin-top: 12px;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Section 4: Science Guide (GI vs GL, Cooking Effects, Timeline) & Quiz
   ========================================================================== */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-xs);
}

.guide-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.guide-card p {
  font-size: 0.87rem;
  color: var(--ink-secondary);
}

.guide-formula {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink);
  text-align: center;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.timeline-time {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--warm);
  margin-bottom: 4px;
  display: block;
}

.timeline-card h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.timeline-card p {
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

/* Quiz Box */
.quiz-box {
  max-width: 780px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.5vw, 34px);
  box-shadow: var(--shadow-sm);
}

.quiz-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.quiz-progress-bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  overflow: hidden;
  margin-bottom: 22px;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--brand);
  transition: width 0.3s var(--ease);
}

.quiz-question {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin-bottom: 18px;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.quiz-option-btn {
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.quiz-option-btn:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--surface-hover);
}

.quiz-option-btn.is-correct {
  background: var(--gi-low-bg);
  border-color: var(--gi-low);
  color: var(--gi-low);
  font-weight: 700;
}

.quiz-option-btn.is-wrong {
  background: var(--gi-high-bg);
  border-color: var(--gi-high);
  color: var(--gi-high);
}

.quiz-explain {
  padding: 15px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  font-size: 0.88rem;
  color: var(--ink-secondary);
  margin-bottom: 18px;
}

.quiz-result-score {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.1;
}

/* ==========================================================================
   Section 5: Visitor Counter & Footer
   ========================================================================== */
.site-footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  padding-block: clamp(44px, 6vw, 72px) 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 26px;
}

.counter-panel,
.footer-pr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.counter-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.counter-panel-title {
  font-size: 1.15rem;
}

.vc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.vc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gi-low-bar);
}

.vc-status-dot.is-fallback {
  background: var(--gi-mid-bar);
}

.counter-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.counter-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
}

.counter-card-label {
  display: block;
  font-size: 0.73rem;
  color: var(--ink-muted);
  margin-bottom: 5px;
}

.counter-card-val {
  display: block;
  font-size: 1.48rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.1;
}

.counter-note {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin: 0;
}

.footer-pr-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-pr-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
}

.footer-pr-title {
  font-size: 1.12rem;
}

.footer-pr-desc {
  font-size: 0.86rem;
  color: var(--ink-secondary);
  margin: 0;
}

.disclaimer-note {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--ink-secondary);
  margin-bottom: 22px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--ink-secondary);
}

.footer-links a:hover {
  color: var(--brand);
}

/* ==========================================================================
   Food Detail Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: hsla(148, 22%, 6%, 0.56);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  position: sticky;
  top: 0;
  background: var(--surface);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.modal-metric-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.modal-metric-label {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.modal-metric-val {
  display: block;
  font-size: 1.38rem;
  font-weight: 700;
  margin-top: 2px;
}

.modal-advice-box {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.89rem;
  color: var(--ink-secondary);
}

.modal-swap-box {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--gi-low-bg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 120;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1060px) {
  .main-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .nutrients-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .food-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sim-grid {
    grid-template-columns: 1fr;
  }

  .timeline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-scrim {
    background: linear-gradient(
      180deg,
      hsla(44, 33%, 95%, 0.94) 0%,
      hsla(44, 33%, 95%, 0.92) 65%,
      hsla(44, 33%, 95%, 0.82) 100%
    );
  }

  [data-theme="dark"] .hero-scrim {
    background: linear-gradient(
      180deg,
      hsla(150, 14%, 9%, 0.95) 0%,
      hsla(150, 14%, 9%, 0.92) 100%
    );
  }

  .symptom-panel-grid,
  .synergy-showcase,
  .swaps-grid,
  .guide-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .db-top-row {
    grid-template-columns: 1fr;
  }

  .sponsor-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .sim-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coverage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .header-pr-name,
  .header-counter-label {
    display: none;
  }

  .nutrients-grid,
  .food-cards-grid,
  .timeline-grid {
    grid-template-columns: 1fr;
  }

  .counter-metrics {
    grid-template-columns: 1fr;
  }

  .modal-metrics {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
