/* ====================================================
   健腸ナビ × imajina — Prototype Styles
   ブランドカラー:
   - 健腸ナビ Primary Green: #2DA94F (logo circle中央のグリーン)
   - 健腸ナビ Dark Green:    #1F8740
   - 健腸ナビ Light Green:   #E5F4EA / #F4FAF6 (背景)
   - imajina Orange:         #F18A1E (健腸ナビロゴ円、強調色)
   - Charcoal:               #3D3D3D (imajinaロゴ・本文)
   - Sub Text:               #6B7280
   - Border:                 #E5E7EB
   - BG:                     #FAFAF8
==================================================== */

:root {
  --green:      #2DA94F;
  --green-dark: #1F8740;
  --green-bg:   #E5F4EA;
  --green-bg-soft: #F4FAF6;
  --orange:     #F18A1E;
  --orange-soft:#FCEEDC;
  --charcoal:   #3D3D3D;
  --text:       #2A2A2A;
  --muted:      #6B7280;
  --border:     #E5E7EB;
  --bg:         #FAFAF8;
  --card-bg:    #FFFFFF;
  --shadow:     0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-lg:  0 4px 16px rgba(45,169,79,0.10), 0 24px 48px rgba(0,0,0,0.06);

  --risk-high:  #E96A4E;
  --risk-mid:   #F4A93D;
  --risk-low:   #2DA94F;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { line-height: 1.4; color: var(--charcoal); margin: 0 0 0.6em 0; }
h1 { font-size: 2rem; font-weight: 700; letter-spacing: 0.02em; }
h2 { font-size: 1.45rem; font-weight: 700; letter-spacing: 0.02em; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { margin: 0 0 0.8em 0; }

.muted { color: var(--muted); font-size: 0.92rem; }

.hidden { display: none !important; }

/* ============ HEADER ============ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--charcoal);
  font-weight: 600;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; object-fit: contain; }
.brand-text {
  border-left: 2px solid var(--orange);
  padding-left: 12px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.site-nav { display: flex; gap: 22px; }
.site-nav a {
  color: var(--charcoal);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 4px 0;
}
.site-nav a:hover { color: var(--green); text-decoration: none; }

/* ============ MAIN LAYOUT ============ */
#app { max-width: 1180px; margin: 0 auto; padding: 32px 28px 80px; }
.view { animation: fadeIn 0.35s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--card-bg);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.back-link {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}
.back-link:hover { color: var(--green); }

.page-head { margin-bottom: 28px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(45,169,79,0.25); }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: #fff; color: var(--green-dark); border-color: var(--green); }
.btn-ghost:hover { background: var(--green-bg); }
.btn-lg { padding: 16px 36px; font-size: 1.02rem; }

/* ============ HERO ============ */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  background: linear-gradient(135deg, var(--green-bg) 0%, #fff 60%, var(--orange-soft) 100%);
  border-radius: 20px;
  padding: 56px 56px;
  margin-bottom: 56px;
  position: relative;
  overflow: hidden;
}
.hero-eyebrow {
  display: inline-block;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}
.hero-lead { font-size: 1.05rem; line-height: 1.9; color: var(--charcoal); }
.hero-sub  { color: var(--muted); font-size: 0.82rem; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-illust {
  position: relative;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bowl-stack {
  position: relative;
  width: 240px;
  height: 240px;
}
.bowl {
  position: absolute;
  border-radius: 50% 50% 45% 45%;
  border: 3px solid var(--charcoal);
  background: #fff;
}
.bowl-1 {
  top: 30px; left: 0;
  width: 130px; height: 90px;
  background: linear-gradient(180deg, #fff 60%, var(--green-bg) 60%);
}
.bowl-2 {
  top: 80px; right: 0;
  width: 110px; height: 80px;
  background: linear-gradient(180deg, #fff 55%, var(--orange-soft) 55%);
}
.bowl-3 {
  bottom: 30px; left: 50px;
  width: 150px; height: 100px;
  background: linear-gradient(180deg, #fff 55%, var(--green-bg-soft) 55%);
}
.hero-chameleon {
  position: absolute;
  width: 130px; opacity: 0.18;
  bottom: -20px; right: -30px;
  transform: rotate(-8deg);
}

/* ============ STORY SECTION ============ */
.story { margin-bottom: 56px; }
.story h2 { text-align: center; margin-bottom: 32px; }
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.story-step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  position: relative;
}
.story-step.accent {
  background: linear-gradient(180deg, #fff 60%, var(--green-bg) 100%);
  border-color: var(--green);
}
.step-num {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--orange);
  margin-bottom: 8px;
}
.story-step.accent .step-num { color: var(--green-dark); }
.story-step h3 { font-size: 1.1rem; margin-bottom: 10px; }

/* ============ PROOF ============ */
.proof { margin-bottom: 56px; }
.proof h2 { text-align: center; margin-bottom: 32px; }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.proof-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.proof-card.highlight {
  background: linear-gradient(180deg, #fff 60%, var(--orange-soft) 100%);
  border-color: var(--orange);
}
.proof-num {
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
  margin-bottom: 8px;
}
.proof-card.highlight .proof-num { color: var(--orange); }
.proof-num .seed { font-size: 1.8rem; vertical-align: super; margin-left: 4px; }
.proof-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 14px;
}
.proof-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.8; }

/* ============ CTA ============ */
.cta {
  background: var(--charcoal);
  color: #fff;
  border-radius: 20px;
  padding: 56px 40px;
  text-align: center;
}
.cta h2 { color: #fff; margin-bottom: 24px; }

/* ============ TABS ============ */
.input-tabs, .alt-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.tab {
  background: transparent;
  border: none;
  padding: 14px 22px;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  font-family: inherit;
  transition: color 0.15s;
}
.tab:hover { color: var(--charcoal); }
.tab.active {
  color: var(--green-dark);
}
.tab.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
}
.panel-intro { color: var(--muted); margin-bottom: 20px; }

/* ============ SAMPLE CARDS ============ */
.sample-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.sample-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.sample-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.sample-card h3 {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
}
.sample-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.sample-tag.female { background: #FCE4EC; color: #C2185B; }
.sample-tag.male { background: #E3F2FD; color: #1565C0; }
.sample-card .sample-desc { color: var(--muted); font-size: 0.9rem; margin: 12px 0; }
.sample-card .sample-risks {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 0.78rem;
}
.sample-risks .risk-chip {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--risk-high);
  color: #fff;
  font-weight: 600;
}
.sample-cta { margin-top: 16px; color: var(--green-dark); font-weight: 600; font-size: 0.9rem; }

/* ============ CUSTOM FORM ============ */
.custom-form fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.custom-form legend {
  padding: 0 10px;
  font-weight: 700;
  color: var(--charcoal);
}
.radio {
  display: inline-flex; align-items: center;
  margin-right: 24px;
  font-size: 0.96rem;
  cursor: pointer;
}
.radio input { margin-right: 6px; }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  background: var(--green-bg-soft);
  border-radius: 8px;
}
.checkbox-grid label {
  display: flex; align-items: center;
  font-size: 0.9rem;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
}
.checkbox-grid label:hover { background: #fff; }
.checkbox-grid input { margin-right: 8px; }
.category-head {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-dark);
  padding: 6px 0 2px 4px;
  border-bottom: 1px solid var(--border);
}

/* ============ RESULT THEMES ============ */
.theme-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.theme-chip {
  background: var(--green-bg);
  color: var(--green-dark);
  border: 1px solid var(--green);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}
.theme-chip.high  { background: #FDE6DF; color: #B73B1F; border-color: var(--risk-high); }
.theme-chip.mid   { background: #FCEED4; color: #A56400; border-color: var(--risk-mid); }
.why-foods { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--border); }
.top-foods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  padding: 0;
  margin: 12px 0 0 0;
  list-style: none;
  counter-reset: foodcount;
}
.top-foods li {
  background: var(--green-bg-soft);
  border-left: 3px solid var(--green);
  padding: 8px 14px;
  font-size: 0.92rem;
  counter-increment: foodcount;
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-foods li::before {
  content: counter(foodcount);
  background: var(--green);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.top-foods li .food-kind {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--muted);
}

/* ============ DAY PLAN ============ */
.day-plan { margin-bottom: 56px; }
.meal-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px 0 28px;
}
.meal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.meal-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--green);
}
.meal-header {
  background: var(--green);
  color: #fff;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.meal-header .meal-icon { font-size: 1.1rem; }
.meal-body { padding: 20px; }
.meal-body h3 { margin-bottom: 6px; font-size: 1.05rem; }
.meal-body .meal-intro { font-size: 0.88rem; color: var(--muted); line-height: 1.7; }
.meal-meta {
  display: flex; gap: 14px; margin-top: 14px;
  font-size: 0.8rem; color: var(--muted);
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.meal-meta strong { color: var(--charcoal); font-weight: 600; }
.meal-foods {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px;
}
.food-tag {
  background: var(--green-bg);
  color: var(--green-dark);
  font-size: 0.72rem;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
}
.food-tag.supplement { background: var(--orange-soft); color: #A56400; }

/* ============ MEAL CARD INNER TABS ============ */
.meal-tabs {
  display: flex;
  gap: 4px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.meal-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  border-radius: 6px;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
}
.meal-tab:hover { color: var(--charcoal); background: var(--green-bg-soft); }
.meal-tab.active {
  color: var(--green-dark);
  border-bottom-color: var(--green);
  font-weight: 700;
}
.meal-tab-panel {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--green-bg-soft);
  border-radius: 8px;
  font-size: 0.88rem;
}
.meal-tab-panel .ingredients {
  list-style: none;
  padding: 0;
  margin: 0;
}
.meal-tab-panel .ingredients li {
  display: flex;
  padding: 5px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.86rem;
  gap: 10px;
}
.meal-tab-panel .ingredients li:last-child { border-bottom: none; }
.meal-tab-panel .ingredients .ing-name { flex: 1; }
.meal-tab-panel .ingredients .ing-amount { color: var(--muted); white-space: nowrap; }
.meal-tab-panel ol.steps {
  margin: 0;
  padding-left: 1.4em;
}
.meal-tab-panel ol.steps li {
  padding: 4px 0;
  line-height: 1.7;
  font-size: 0.88rem;
}

/* ============ COVERAGE BARS ============ */
.day-coverage { margin-top: 28px; }
.day-coverage h3 { margin-bottom: 16px; }
.coverage-bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 60px;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  font-size: 0.88rem;
}
.coverage-bar-bg {
  background: var(--border);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
  position: relative;
}
.coverage-bar-fill {
  background: linear-gradient(90deg, var(--green) 0%, var(--green-dark) 100%);
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s ease-out;
}
.coverage-bar-fill.partial {
  background: linear-gradient(90deg, var(--orange) 0%, #C97400 100%);
}
.coverage-bar-fill.empty {
  background: var(--border);
}
.coverage-pct {
  text-align: right;
  font-weight: 700;
  color: var(--green-dark);
}

/* ============ ALTERNATIVES ============ */
.alternatives { margin-bottom: 36px; }
.alt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.alt-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.alt-card:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: var(--shadow-lg);
}
.alt-card h4 { font-size: 0.98rem; margin-bottom: 6px; color: var(--charcoal); }
.alt-card .alt-intro { font-size: 0.82rem; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.alt-card .alt-meta {
  display: flex; gap: 10px; font-size: 0.74rem; color: var(--muted);
  padding-top: 8px; border-top: 1px solid var(--border);
}
.alt-score {
  margin-left: auto;
  background: var(--green-bg);
  color: var(--green-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

/* ============ SUPPLEMENTS ============ */
.supplements {
  background: linear-gradient(180deg, #fff 60%, var(--orange-soft) 100%);
  border-color: var(--orange);
}
.supplements ul {
  margin: 12px 0 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.supplements li {
  background: #fff;
  border-left: 3px solid var(--orange);
  padding: 12px 16px;
  font-size: 0.92rem;
  border-radius: 6px;
}
.supplements li strong { color: var(--charcoal); display: block; margin-bottom: 4px; }
.supplements li .sup-intake { color: var(--muted); font-size: 0.85rem; }

.disclaimer {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 12px 16px;
}
.disclaimer-small {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}
.disclaimer-small strong { color: var(--charcoal); font-weight: 600; }

/* ============ MODAL ============ */
.modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
}
.modal-body {
  position: relative;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  margin: 0;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted);
}
.modal-close:hover { background: var(--charcoal); color: #fff; }

.recipe-detail .recipe-meal-badge {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 0.78rem;
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 10px;
}
.recipe-detail h2 {
  font-size: 1.6rem;
  margin-bottom: 14px;
}
.recipe-detail .recipe-meta-row {
  display: flex; gap: 18px;
  padding: 12px 16px;
  background: var(--green-bg-soft);
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.88rem;
}
.recipe-detail .recipe-meta-row span strong { color: var(--green-dark); }
.recipe-detail h3 {
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--green-bg);
  color: var(--green-dark);
}
.recipe-detail .ingredients {
  list-style: none;
  padding: 0; margin: 0;
}
.recipe-detail .ingredients li {
  display: flex;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.94rem;
}
.recipe-detail .ingredients .ing-name { flex: 1; }
.recipe-detail .ingredients .ing-amount { color: var(--muted); }
.recipe-detail .ingredients .symgram-pill {
  display: inline-block;
  background: var(--green-bg);
  color: var(--green-dark);
  font-size: 0.72rem;
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 8px;
  font-weight: 600;
}
.recipe-detail ol.steps { padding-left: 1.2em; }
.recipe-detail ol.steps li { padding: 6px 0; }
.recipe-detail .why-this {
  background: var(--orange-soft);
  border-left: 4px solid var(--orange);
  padding: 16px 20px;
  border-radius: 8px;
  margin-top: 20px;
}
.recipe-detail .why-this h4 { color: var(--orange); margin-bottom: 8px; }
.recipe-detail .why-this p { font-size: 0.92rem; line-height: 1.8; margin: 0; }

/* ============ FOOTER ============ */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.footer-logo { height: 50px; opacity: 0.9; }
.footer-text { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
.footer-text p { margin: 0; }
.footer-small { font-size: 0.78rem; margin-top: 4px !important; }

/* ============ UPLOAD VIEW ============ */
.dropzone-wrap { margin-bottom: 24px; }
.dropzone {
  display: block;
  border: 3px dashed var(--green);
  border-radius: 16px;
  background: var(--green-bg-soft);
  cursor: pointer;
  transition: all .2s ease;
  margin-bottom: 24px;
}
.dropzone:hover {
  background: var(--green-bg);
  border-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.dropzone.dragover {
  background: var(--green-bg);
  border-color: var(--orange);
  border-style: solid;
  transform: scale(1.01);
}
.dropzone-inner {
  padding: 56px 28px;
  text-align: center;
}
.dropzone-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  line-height: 1;
}
.dropzone-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.6;
  margin-bottom: 8px;
}
.dropzone-sub {
  color: var(--muted);
  font-size: 0.88rem;
}

.upload-alt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  flex-wrap: wrap;
  justify-content: center;
}
.upload-or {
  color: var(--muted);
  font-size: 0.92rem;
}
.btn-sm { padding: 8px 18px; font-size: 0.88rem; }
.btn-link {
  background: transparent;
  border: none;
  color: var(--green-dark);
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.btn-link:hover { color: var(--green); }

.analyzing {
  text-align: center;
  padding: 64px 28px;
}
.spinner {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border: 4px solid var(--green-bg);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing h3 { color: var(--green-dark); margin-bottom: 6px; }

.upload-result h2, .upload-failed h2 { margin-bottom: 8px; }
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 22px 0;
}
.result-block {
  background: var(--green-bg-soft);
  border-radius: 10px;
  padding: 16px 18px;
}
.result-block-wide { grid-column: 1 / -1; }
.result-block h4 {
  font-size: 0.88rem;
  color: var(--green-dark);
  margin-bottom: 10px;
}
.result-block p { margin: 0; font-size: 0.96rem; }
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
  align-items: center;
}
.upload-failed {
  background: linear-gradient(180deg, #fff 60%, #FCEED4 100%);
  border-color: var(--orange);
}
.error-details {
  margin-top: 20px;
  font-size: 0.85rem;
}
.error-details summary {
  cursor: pointer;
  color: var(--muted);
  padding: 6px 0;
}
.error-details pre {
  background: #1f1f1f;
  color: #d8e6da;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 240px;
  overflow-y: auto;
}

/* Hero supplement link */
.hero-supplement {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 14px !important;
}
.hero-supplement .supplement-link {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: underline;
}

/* ============ HOME / RESUME CARD ============ */
.resume-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--green-bg) 0%, #fff 100%);
  border: 1px solid var(--green);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 14px 0 18px;
  box-shadow: var(--shadow);
}
.resume-info { flex: 1; min-width: 0; }
.resume-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.resume-desc { font-weight: 600; color: var(--charcoal); margin-bottom: 4px; }
.resume-when { font-size: 0.78rem; color: var(--muted); }

/* ============ FEATURES (新ランディング) ============ */
.features { margin: 56px 0; }
.features h2 { text-align: center; margin-bottom: 32px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  font-size: 2.6rem;
  margin-bottom: 12px;
  line-height: 1;
}
.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--green-dark);
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}

/* ============ INTRO TOGGLE（折りたたみ） ============ */
.intro-toggle {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 24px;
  margin: 40px 0;
  box-shadow: var(--shadow);
}
.intro-toggle summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--charcoal);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.intro-toggle summary::after {
  content: "▼";
  font-size: 0.7rem;
  color: var(--muted);
  transition: transform .2s;
}
.intro-toggle[open] summary::after { transform: rotate(180deg); }
.intro-toggle summary::-webkit-details-marker { display: none; }
.intro-content { padding-top: 24px; }

/* ============ PREFERENCES VIEW ============ */
.pref-form fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px 18px;
  margin-bottom: 18px;
  background: #fff;
}
.pref-form legend {
  padding: 0 10px;
  font-weight: 700;
  color: var(--charcoal);
  font-size: 0.96rem;
}
.radio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.radio-grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 400px; }
.upload-gender {
  margin-bottom: 24px;
}
.upload-gender-label {
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--charcoal);
}
.radio-card {
  position: relative;
  background: var(--green-bg-soft);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all .15s;
}
.radio-card:hover { background: var(--green-bg); }
.radio-card input { position: absolute; opacity: 0; }
.radio-card input:checked + span { color: var(--green-dark); }
.radio-card:has(input:checked) {
  background: var(--green-bg);
  border-color: var(--green);
  box-shadow: var(--shadow);
}
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.check-chip {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all .15s;
  font-weight: 500;
}
.check-chip:hover { border-color: var(--green); }
.check-chip input { display: none; }
.check-chip:has(input:checked) {
  background: var(--green-bg);
  border-color: var(--green);
  color: var(--green-dark);
  font-weight: 700;
}
.pref-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ============ FAB (Floating Action Buttons) ============ */
/* 小さい円形FAB（設定など） */
.fab-mini {
  position: fixed;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--charcoal);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  z-index: 50;
  transition: transform .15s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab-mini:hover { transform: translateY(-2px) scale(1.05); }
.fab-pref { bottom: 88px; right: 24px; }

/* 大きめのピル型FAB（チャット起動） */
.fab-pill {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 22px 14px 18px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(45,169,79,0.45), 0 10px 28px rgba(0,0,0,0.18);
  z-index: 50;
  transition: transform .15s, box-shadow .15s, background .15s;
  animation: chatPulse 2.4s ease-in-out infinite;
}
.fab-pill:hover {
  transform: translateY(-2px) scale(1.03);
  background: var(--green-dark);
}
.fab-pill .fab-pill-icon {
  font-size: 1.25rem;
  line-height: 1;
  background: rgba(255,255,255,0.18);
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.fab-pill .fab-pill-text {
  white-space: nowrap;
}

@keyframes chatPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(45,169,79,0.45), 0 0 0 0 rgba(45,169,79,0.45); }
  50%      { box-shadow: 0 6px 20px rgba(45,169,79,0.45), 0 0 0 14px rgba(45,169,79,0); }
}

/* ============ CHAT PANEL ============ */
.chat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 60px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}
.chat-head {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-title { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
  width: 38px; height: 38px;
  background: #fff;
  padding: 6px;
  border-radius: 50%;
  object-fit: contain;
}
.chat-name { font-weight: 700; font-size: 1rem; line-height: 1.2; }
.chat-sub { font-size: 0.72rem; opacity: 0.85; }
.chat-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}
.chat-close:hover { background: rgba(255,255,255,0.35); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px 8px;
  background: var(--bg);
}
.chat-msg {
  display: flex;
  margin-bottom: 12px;
}
.chat-msg-ai .chat-bubble {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px 14px 14px 14px;
  padding: 10px 14px;
  max-width: 86%;
  font-size: 0.92rem;
  line-height: 1.7;
  box-shadow: var(--shadow);
}
.chat-msg-user {
  justify-content: flex-end;
}
.chat-msg-user .chat-bubble {
  background: var(--green);
  color: #fff;
  border-radius: 14px 4px 14px 14px;
  padding: 10px 14px;
  max-width: 86%;
  font-size: 0.92rem;
  line-height: 1.6;
}

.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px 0;
  background: var(--bg);
}
.quick-reply {
  background: #fff;
  border: 1px solid var(--green);
  color: var(--green-dark);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.quick-reply:hover {
  background: var(--green-bg);
}

.chat-input-row {
  display: flex;
  padding: 12px 14px 14px;
  gap: 8px;
  background: #fff;
  border-top: 1px solid var(--border);
}
.chat-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
}
.chat-input-row input:focus { border-color: var(--green); }
.chat-send {
  background: var(--green);
  color: #fff;
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}
.chat-send:hover { background: var(--green-dark); }

/* Hero — home variant */
.hero-home h1 { color: var(--charcoal); }
.hero-home .hero-eyebrow { color: var(--green-dark); }

/* ============ MOBILE NAV TOGGLE ============ */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 42px;
  height: 42px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all 0.25s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ RESPONSIVE BREAKPOINTS ============ */

/* --- Large Tablet / Small Desktop (1024px〜) --- */
@media (max-width: 1024px) {
  #app { padding: 28px 24px 70px; }
  .hero { padding: 44px 40px; gap: 28px; }
  .hero h1 { font-size: 2rem; }
  .hero-illust { transform: scale(0.85); }
  .header-inner { padding: 14px 24px; }
  .footer-inner { padding: 24px; }
}

/* --- Tablet (880px〜) --- */
@media (max-width: 880px) {
  .header-inner { padding: 12px 18px; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; padding: 12px 18px; border-bottom: 1px solid var(--border); box-shadow: 0 8px 16px rgba(0,0,0,0.06); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .site-nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }

  #app { padding: 24px 18px 60px; }
  .card { padding: 22px; }

  .hero {
    grid-template-columns: 1fr;
    padding: 32px 28px 28px;
    text-align: left;
  }
  .hero h1 { font-size: 1.7rem; line-height: 1.4; }
  .hero-lead { font-size: 0.98rem; }
  .hero-illust { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }

  .story-grid, .proof-grid, .sample-cards, .meal-row, .result-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .cta { padding: 40px 24px; }
  .cta h2 { font-size: 1.2rem; }

  .coverage-bar-row {
    grid-template-columns: 1fr 50px;
    gap: 8px 12px;
    font-size: 0.85rem;
  }
  .coverage-bar-row > span:first-child {
    grid-column: 1 / -1;
    font-weight: 600;
  }
  .coverage-bar-bg { grid-column: 1; }
  .coverage-pct { grid-column: 2; }

  .footer-inner { flex-direction: column; align-items: flex-start; padding: 22px 18px; }
  .modal { padding: 0; }
  .modal-body { max-height: 100vh; height: 100vh; border-radius: 0; padding: 22px 20px; }
  .recipe-detail h2 { font-size: 1.3rem; }
  .recipe-detail .recipe-meta-row { flex-wrap: wrap; gap: 10px; }

  .upload-alt { flex-direction: column; align-items: stretch; gap: 8px; }
  .upload-alt .btn { width: 100%; }
  .dropzone-inner { padding: 40px 20px; }
  .dropzone-icon { font-size: 3rem; }
  .dropzone-title { font-size: 1rem; }
  .result-actions { flex-direction: column; align-items: stretch; }
  .result-actions .btn { width: 100%; }

  .input-tabs, .alt-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab { white-space: nowrap; padding: 12px 16px; font-size: 0.88rem; }

  .top-foods { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; max-height: 240px; }

  .meal-card { box-shadow: var(--shadow); }
  .meal-meta { font-size: 0.78rem; gap: 10px; flex-wrap: wrap; }

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

  .features-grid { grid-template-columns: 1fr; }
  .radio-grid { grid-template-columns: repeat(2, 1fr); }
  .resume-card { flex-direction: column; align-items: stretch; text-align: center; }
  .resume-card .btn { width: 100%; }

  .chat-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .fab-pref { bottom: 80px; right: 16px; width: 44px; height: 44px; font-size: 1.1rem; }
  .fab-pill {
    bottom: 16px;
    right: 16px;
    padding: 12px 18px 12px 14px;
    font-size: 0.9rem;
  }
  .fab-pill .fab-pill-icon { width: 28px; height: 28px; font-size: 1.1rem; }
}

/* --- Mobile (480px〜) --- */
@media (max-width: 480px) {
  .header-inner { padding: 10px 14px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-text { font-size: 0.85rem; padding-left: 8px; }

  #app { padding: 18px 12px 60px; }
  .card { padding: 18px; }

  .hero { padding: 26px 20px 22px; border-radius: 14px; }
  .hero-eyebrow { font-size: 0.7rem; }
  .hero h1 { font-size: 1.45rem; }
  .hero-lead { font-size: 0.92rem; line-height: 1.7; }

  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.1rem; }
  h3 { font-size: 1rem; }

  .btn { padding: 10px 18px; font-size: 0.9rem; }
  .btn-lg { padding: 14px 24px; font-size: 0.96rem; }

  .proof-num { font-size: 2.6rem; }
  .step-num { font-size: 0.75rem; }

  .meal-body { padding: 16px; }
  .meal-body h3 { font-size: 0.98rem; }
  .meal-body .meal-intro { font-size: 0.84rem; }

  .recipe-detail h2 { font-size: 1.2rem; }
  .recipe-detail .recipe-meta-row { font-size: 0.82rem; padding: 10px 12px; }

  .theme-chip { font-size: 0.78rem; padding: 4px 10px; }

  .dropzone-inner { padding: 32px 16px; }
  .dropzone-icon { font-size: 2.4rem; }
}
