/* ============================================================
   FREEDOM KITCHEN — APP STYLES
   Identity: forest-to-sprout greens, Inter, "leaf" corners
   (big radius on one diagonal, tight on the other).
   ============================================================ */

/* ---------- 1. TOKENS ---------- */
:root {
  /* greens, dark → light */
  --forest: #0E2E1F;
  --pine:   #154530;
  --leaf:   #1F6B43;
  --fern:   #2F8F59;
  --moss:   #4CAE72;
  --sprout: #8ED3A4;
  --mint:   #CDEDD6;
  --dew:    #E6F5EA;
  --mist:   #F2F8F2;   /* app background */
  --lime:   #C8F07A;   /* highlight, used sparingly */

  --ink:    #0F2419;
  --text:   #22382B;
  --muted:  #5C7465;
  --line:   #D6E6DA;
  --white:  #FFFFFF;
  --warn:   #B4552E;

  /* gradients */
  --g-deep:  linear-gradient(155deg, #0E2E1F 0%, #1F6B43 100%);
  --g-fresh: linear-gradient(135deg, #2F8F59 0%, #8ED3A4 100%);
  --g-soft:  linear-gradient(160deg, #E6F5EA 0%, #CDEDD6 100%);
  --g-lime:  linear-gradient(120deg, #8ED3A4 0%, #C8F07A 100%);

  /* leaf corners */
  --r-xl: 30px 8px 30px 8px;
  --r-lg: 24px 6px 24px 6px;
  --r-md: 18px 5px 18px 5px;
  --r-sm: 12px 4px 12px 4px;
  --r-xs: 8px 3px 8px 3px;

  --shadow: 0 1px 0 rgba(14,46,31,.04), 0 10px 24px -14px rgba(14,46,31,.35);
  --shadow-lg: 0 24px 48px -20px rgba(14,46,31,.45);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;

  --fs: 16px;
  --nav-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
html.big-text { --fs: 18px; }

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: var(--fs);
  line-height: 1.55;
  color: var(--text);
  background: var(--forest);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-feature-settings: "cv11", "ss01";
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { max-width: 100%; display: block; }
a { color: var(--leaf); }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: 1.9em; font-weight: 800; }
h2 { font-size: 1.35em; font-weight: 800; }
h3 { font-size: 1.08em; font-weight: 700; }
p { margin: 0 0 .8em; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.emo { font-family: var(--emoji); line-height: 1; font-style: normal; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* the app column */
#app {
  max-width: 560px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--mist);
  position: relative;
  overflow-x: hidden;
}
@media (min-width: 600px) {
  body { background: radial-gradient(1200px 700px at 50% -10%, #1F6B43 0%, #0E2E1F 60%); }
  #app { box-shadow: 0 0 80px rgba(0,0,0,.35); }
}

.screen { padding: 0 18px calc(var(--nav-h) + 28px + var(--safe-b)); animation: screenIn .35s ease both; }
.screen.no-nav { padding-bottom: 40px; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.section { margin-top: 28px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { font-size: 1.15em; }
.sec-head .link { font-size: .85em; font-weight: 600; color: var(--leaf); white-space: nowrap; text-decoration: none; }
.sub { color: var(--muted); font-size: .9em; }

/* ---------- 3. BUTTONS & CHIPS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  border-radius: var(--r-md);
  font-weight: 700; font-size: 1em;
  transition: transform .12s ease, filter .2s ease;
}
.btn:active { transform: scale(.97); }
.btn svg, .chip svg { width: 20px; height: 20px; flex: none; }
a.btn, a.feature, a.rcard, a.xcard, a.gift, a.ctile, a.lesson-row, a.stop, a.lvl-card { text-decoration: none; }
a.feature, a.rcard, a.gift, a.ctile, a.lvl-card { color: inherit; }
a.xcard { color: var(--white); }
.btn-main { background: var(--g-deep); color: var(--white); box-shadow: var(--shadow); }
.btn-lime { background: var(--lime); color: var(--forest); }
.btn-soft { background: var(--dew); color: var(--pine); }
.btn-line { background: var(--white); color: var(--pine); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost { color: var(--leaf); min-height: 40px; padding: 0 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; min-height: 38px;
  border-radius: var(--r-sm);
  background: var(--white); color: var(--pine);
  font-weight: 600; font-size: .85em; white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: background .2s, color .2s;
}
.chip.on { background: var(--pine); color: var(--white); box-shadow: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 18px; margin: 0 -18px; }
.chips::-webkit-scrollbar { display: none; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--r-xs);
  font-size: .72em; font-weight: 700;
  background: var(--dew); color: var(--leaf);
}
.pill.dark { background: rgba(255,255,255,.14); color: var(--white); }
.pill.lime { background: var(--lime); color: var(--forest); }

.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: var(--r-sm); background: var(--white); color: var(--pine);
  box-shadow: var(--shadow);
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.glass { background: rgba(255,255,255,.18); color: var(--white); box-shadow: none; backdrop-filter: blur(8px); }

/* ---------- 4. TOP BAR & HERO ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 0 8px;
}
.topbar .grow { flex: 1; min-width: 0; }
.topbar h1 { font-size: 1.5em; }

.home-hero {
  margin: 0 -18px; padding: 20px 18px 26px;
  background: var(--g-deep); color: var(--white);
  border-radius: 0 0 40px 10px;
  position: relative; overflow: hidden;
}
.home-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(200,240,122,.28), transparent 65%);
}
.home-hero h1 { color: var(--white); font-size: 1.6em; margin-top: 4px; }
.home-hero .hello { color: var(--sprout); font-weight: 600; font-size: .92em; }
.hero-row { display: flex; align-items: center; gap: 12px; }
.hero-row .grow { flex: 1; }

.lvl-card {
  margin-top: 18px; padding: 12px 14px;
  background: rgba(255,255,255,.08); border-radius: var(--r-md);
  display: flex; align-items: center; gap: 12px;
}
.lvl-badge {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border-radius: 14px 4px 14px 4px; background: var(--g-lime); color: var(--forest);
  font-weight: 800; font-size: 1.05em;
}
.lvl-info { flex: 1; min-width: 0; }
.lvl-info b { display: block; font-size: .92em; }
.lvl-info small { color: var(--sprout); font-size: .78em; }
.bar { height: 8px; border-radius: 6px 2px 6px 2px; background: rgba(255,255,255,.14); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--g-lime); border-radius: inherit; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.bar.light { background: var(--dew); }
.bar.light i { background: var(--g-fresh); }
.streak { display: flex; flex-direction: column; align-items: center; font-weight: 800; font-size: .8em; color: var(--lime); }
.streak .emo { font-size: 1.5em; animation: flick 1.6s ease-in-out infinite; }
@keyframes flick { 0%,100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.12) rotate(3deg); } }

.search {
  margin-top: 16px; display: flex; align-items: center; gap: 10px;
  background: var(--white); color: var(--muted);
  border-radius: var(--r-md); padding: 0 16px; min-height: 52px;
  box-shadow: var(--shadow);
}
.search svg { width: 20px; height: 20px; flex: none; color: var(--fern); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; min-height: 50px; color: var(--ink); }

/* ---------- 5. FOOD ART (emoji "plates") ---------- */
.art {
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  isolation: isolate;
}
.art::before { /* plate */
  content: ""; position: absolute; width: 64%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.95) 0 52%, rgba(255,255,255,.55) 53% 62%, rgba(255,255,255,0) 63%);
  box-shadow: 0 14px 28px -12px rgba(14,46,31,.45);
  z-index: -1;
}
.art .main { font-size: var(--art-size, 64px); filter: drop-shadow(0 8px 10px rgba(0,0,0,.18)); }
.art .gar { position: absolute; font-size: calc(var(--art-size, 64px) * .38); opacity: .95; }
.art .gar:nth-of-type(2) { left: 9%; top: 12%; transform: rotate(-14deg); }
.art .gar:nth-of-type(3) { right: 10%; bottom: 12%; transform: rotate(12deg); }
.art .gar:nth-of-type(4) { right: 12%; top: 14%; transform: rotate(8deg); }
.art.live .main { animation: bob 4s ease-in-out infinite; }
.art.live .gar { animation: drift 6s ease-in-out infinite; }
.art.live .gar:nth-of-type(3) { animation-delay: -2s; }
.art.live .gar:nth-of-type(4) { animation-delay: -4s; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes drift { 0%,100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.steam { position: absolute; top: 18%; left: 50%; width: 60px; height: 50px; margin-left: -30px; pointer-events: none; }
.steam i {
  position: absolute; bottom: 0; width: 8px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.75); filter: blur(4px); opacity: 0;
  animation: steam 3s ease-out infinite;
}
.steam i:nth-child(1) { left: 10px; }
.steam i:nth-child(2) { left: 26px; animation-delay: 1s; }
.steam i:nth-child(3) { left: 42px; animation-delay: 2s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(10px) scaleX(1); } 30% { opacity: .8; } 100% { opacity: 0; transform: translateY(-30px) scaleX(1.8); } }

/* category tints — all inside the green family */
.t-breakfast { background: linear-gradient(150deg, #DDF3C6 0%, #A9DE8E 100%); }
.t-breads    { background: linear-gradient(150deg, #E7F1D9 0%, #B9D9A6 100%); }
.t-meals     { background: linear-gradient(150deg, #CDEDD6 0%, #6FC08F 100%); }
.t-pasta     { background: linear-gradient(150deg, #D7EEDB 0%, #8CCB9F 100%); }
.t-desserts  { background: linear-gradient(150deg, #D3F1E6 0%, #84D1B2 100%); }
.t-cakes     { background: linear-gradient(150deg, #E2F5EC 0%, #9FDCC0 100%); }
.t-snacks    { background: linear-gradient(150deg, #E9F7C9 0%, #BFE380 100%); }
.t-drinks    { background: linear-gradient(150deg, #D4F2E0 0%, #7DCFA2 100%); }
.t-jams      { background: linear-gradient(150deg, #E3F6D5 0%, #9ED79A 100%); }

/* ---------- 6. RECIPE CARDS ---------- */
.rgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rcard { display: block; text-align: left; color: inherit; text-decoration: none; position: relative; }
.rcard .art { aspect-ratio: 1 / 1; --art-size: 56px; }
.rcard h3 { font-size: .92em; margin-top: 9px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rcard .meta { display: flex; gap: 8px; margin-top: 4px; font-size: .75em; color: var(--muted); font-weight: 500; }
.rcard .heart { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px 3px 12px 3px; background: rgba(255,255,255,.85); color: var(--fern); }
.rcard .heart svg { width: 18px; height: 18px; }
.rcard .heart.on { color: var(--white); background: var(--fern); }
.rcard .done-mark { position: absolute; top: 8px; left: 8px; }

.hscroll { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 18px 8px; margin: 0 -18px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; width: 46%; }
.hscroll.wide > * { width: 78%; }

/* big feature card */
.feature {
  display: block; position: relative; overflow: hidden;
  border-radius: var(--r-xl); background: var(--white); box-shadow: var(--shadow);
  text-align: left; width: 100%;
}
.feature .art { aspect-ratio: 16 / 10; border-radius: 0; --art-size: 92px; }
.feature .body { padding: 14px 16px 16px; }
.feature .body h3 { font-size: 1.2em; }
.feature .body p { color: var(--muted); font-size: .88em; margin: 4px 0 10px; }
.feature .pill.top { position: absolute; top: 14px; left: 14px; }

/* category tiles */
.cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ctile {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  background: var(--white); border-radius: var(--r-md); text-align: left;
  box-shadow: var(--shadow); min-height: 64px;
}
.ctile .emo { font-size: 26px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px 4px 12px 4px; flex: none; }
.ctile b { display: block; font-size: .85em; color: var(--ink); line-height: 1.2; }
.ctile small { color: var(--muted); font-size: .72em; }

/* tip */
.tipbox {
  padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--g-soft); position: relative; overflow: hidden;
  display: flex; gap: 14px;
}
.tipbox .emo { font-size: 30px; }
.tipbox b { display: block; color: var(--pine); font-size: .82em; margin-bottom: 4px; }
.tipbox p { margin: 0; font-size: .92em; color: var(--ink); }

/* ---------- 7. BONUS CARDS (gift look) ---------- */
.gift {
  position: relative; overflow: hidden; display: block; width: 100%; text-align: left;
  border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow);
  padding: 16px 16px 16px 84px; min-height: 92px;
}
.gift .ico {
  position: absolute; left: 14px; top: 16px; width: 56px; height: 56px;
  display: grid; place-items: center; font-size: 28px;
  border-radius: 18px 5px 18px 5px; background: var(--g-fresh);
}
.gift::after { /* ribbon */
  content: ""; position: absolute; right: 26px; top: 0; bottom: 0; width: 10px;
  background: linear-gradient(var(--lime), rgba(200,240,122,.2));
  opacity: .9;
}
.gift .tag { position: absolute; right: 12px; top: 12px; z-index: 1; }
.gift h3 { font-size: 1em; padding-right: 74px; }
.gift p { margin: 3px 0 6px; font-size: .82em; color: var(--muted); padding-right: 34px; }
.gift .val { font-size: .75em; font-weight: 700; color: var(--fern); }
.gift .val s { color: var(--muted); font-weight: 500; margin-right: 6px; }
.gift.done .ico::after { content: "✓"; position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--forest); color: var(--lime); font-size: 12px; font-weight: 800; display: grid; place-items: center; font-family: var(--font); }
.gift-list { display: grid; gap: 12px; }

.vault-hero {
  margin: 0 -18px; padding: 24px 18px 28px; color: var(--white);
  background: var(--g-deep); border-radius: 0 0 40px 10px; position: relative; overflow: hidden;
}
.vault-hero h1 { color: var(--white); }
.vault-hero p { color: var(--mint); margin: 8px 0 0; font-size: .92em; padding-right: 76px; }
.vault-hero h1 { padding-right: 76px; }
.vault-hero .box { position: absolute; right: 12px; top: 18px; font-size: 64px; animation: wiggle 3s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes wiggle { 0%,80%,100% { transform: rotate(0); } 85% { transform: rotate(-8deg); } 90% { transform: rotate(8deg); } 95% { transform: rotate(-4deg); } }

.extras-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.xcard {
  position: relative; overflow: hidden; text-align: left; color: var(--white);
  border-radius: var(--r-lg); padding: 16px; min-height: 170px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--g-deep); box-shadow: var(--shadow);
}
.xcard.alt { background: linear-gradient(155deg, #1F6B43 0%, #4CAE72 100%); }
.xcard.alt2 { background: linear-gradient(155deg, #154530 0%, #2F8F59 100%); }
.xcard .big { position: absolute; top: 12px; right: 12px; font-size: 44px; }
.xcard h3 { color: var(--white); font-size: .98em; }
.xcard p { margin: 4px 0 0; font-size: .76em; color: var(--mint); }
.xcard .pill { position: absolute; top: 14px; left: 14px; }
.xcard.wide { grid-column: 1 / -1; min-height: 130px; }

/* ---------- 8. BOTTOM NAV ---------- */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 560px; z-index: 40;
  padding: 8px 10px calc(8px + var(--safe-b));
  background: rgba(242,248,242,.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; text-decoration: none; color: var(--muted);
  font-size: .68em; font-weight: 600; position: relative;
}
.nav a svg { width: 24px; height: 24px; }
.nav a.on { color: var(--forest); }
.nav a.on::before {
  content: ""; position: absolute; top: -2px; width: 44px; height: 32px; z-index: -1;
  border-radius: 12px 4px 12px 4px; background: var(--mint);
  animation: pop .3s ease;
}
.nav a.gift-tab .dot { position: absolute; top: 4px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--fern); box-shadow: 0 0 0 3px var(--mist); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 9. RECIPE DETAIL ---------- */
.rd-hero { margin: 0 -18px; position: relative; }
.rd-hero .art { border-radius: 0 0 44px 12px; aspect-ratio: 5 / 4; --art-size: 120px; }
.rd-hero .bar-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; z-index: 3; }
.rd-hero .bar-top .right { display: flex; gap: 8px; }
.rd-title { margin-top: 18px; }
.rd-title h1 { font-size: 1.7em; }
.rd-title .lead { color: var(--muted); margin-top: 6px; font-size: .98em; }
.free3 { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.fact { background: var(--white); border-radius: var(--r-md); padding: 10px 8px; text-align: center; box-shadow: var(--shadow); }
.fact .emo { font-size: 20px; }
.fact b { display: block; color: var(--ink); font-size: .95em; margin-top: 4px; }
.fact small { color: var(--muted); font-size: .7em; }

.cta-row { display: flex; gap: 10px; margin-top: 18px; }
.cta-row .btn-main { flex: 1; }

.tabs { display: flex; gap: 4px; background: var(--dew); padding: 4px; border-radius: var(--r-md); margin-top: 26px; position: sticky; top: 8px; z-index: 5; }
.tabs button { flex: 1; min-height: 42px; border-radius: 14px 4px 14px 4px; font-weight: 700; font-size: .88em; color: var(--muted); transition: background .2s, color .2s; }
.tabs button.on { background: var(--white); color: var(--forest); box-shadow: var(--shadow); }

.serv { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--white); border-radius: var(--r-sm); padding: 4px; box-shadow: var(--shadow); }
.stepper button { width: 36px; height: 36px; border-radius: 10px 3px 10px 3px; background: var(--dew); color: var(--pine); font-weight: 800; font-size: 1.2em; }
.stepper b { min-width: 34px; text-align: center; color: var(--ink); }

.ing-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ing {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; background: var(--white); border-radius: var(--r-sm);
  transition: background .2s, opacity .2s;
}
.ing .box { width: 22px; height: 22px; flex: none; margin-top: 1px; border-radius: 7px 2px 7px 2px; box-shadow: inset 0 0 0 2px var(--sprout); display: grid; place-items: center; color: var(--white); transition: background .2s; }
.ing .qty { font-weight: 700; color: var(--forest); white-space: nowrap; }
.ing .nm { color: var(--text); }
.ing .x { display: block; color: var(--muted); font-size: .82em; }
.ing.on { background: var(--dew); }
.ing.on .box { background: var(--fern); box-shadow: none; }
.ing.on .box::after { content: "✓"; font-size: 13px; font-weight: 800; }
.ing.on .nm, .ing.on .qty { text-decoration: line-through; text-decoration-color: var(--moss); opacity: .65; }

.steps-prev { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.sp { display: grid; grid-template-columns: 44px 1fr; gap: 12px; background: var(--white); padding: 14px; border-radius: var(--r-md); }
.sp .n { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; border-radius: 14px 4px 14px 4px; background: var(--g-soft); position: relative; }
.sp .n small { position: absolute; bottom: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--forest); color: var(--lime); font-size: 11px; font-weight: 800; display: grid; place-items: center; font-family: var(--font); }
.sp h4 { font-size: .98em; margin-bottom: 4px; }
.sp p { margin: 0; font-size: .9em; }
.sp .cue { margin-top: 8px; font-size: .82em; color: var(--leaf); background: var(--dew); padding: 8px 10px; border-radius: var(--r-xs); }
.sp .tm { display: inline-flex; margin-top: 8px; }

.nut { background: var(--white); border-radius: var(--r-lg); padding: 16px; margin-top: 14px; }
.nut-top { display: flex; align-items: baseline; justify-content: space-between; }
.nut-top b { font-size: 1.8em; color: var(--forest); font-weight: 800; letter-spacing: -0.03em; }
.macro { display: grid; grid-template-columns: 70px 1fr 48px; align-items: center; gap: 10px; margin-top: 10px; font-size: .85em; }
.macro .bar { margin: 0; background: var(--dew); }
.macro .bar i { background: var(--g-fresh); }
.macro b { text-align: right; color: var(--ink); }

.note { border-radius: var(--r-md); padding: 14px 16px; margin-top: 12px; background: var(--white); }
.note h4 { font-size: .9em; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.note p, .note li { font-size: .9em; margin: 0; }
.note ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.note.green { background: var(--g-soft); }
.note.deep { background: var(--g-deep); color: var(--mint); }
.note.deep h4 { color: var(--white); }

.story { font-size: 1em; color: var(--text); margin-top: 18px; padding-left: 14px; border-left: 3px solid var(--sprout); }

.rate { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.rate button { font-size: 30px; padding: 6px; border-radius: 12px; transition: transform .15s; filter: grayscale(.8); opacity: .6; }
.rate button.on { filter: none; opacity: 1; transform: scale(1.15); }

/* ---------- 10. COOK MODE ---------- */
.cook {
  position: fixed; inset: 0; z-index: 80; background: var(--forest); color: var(--white);
  display: flex; flex-direction: column; animation: cookIn .4s ease both;
}
@keyframes cookIn { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.cook-wrap { max-width: 560px; width: 100%; margin: 0 auto; flex: 1; display: flex; flex-direction: column; padding: 14px 18px calc(18px + var(--safe-b)); min-height: 0; }
.cook-top { display: flex; align-items: center; gap: 12px; }
.cook-top .grow { flex: 1; min-width: 0; }
.cook-top small { color: var(--sprout); font-weight: 600; font-size: .78em; display: block; }
.cook-top b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95em; }
.segs { display: flex; gap: 4px; margin-top: 14px; }
.segs i { flex: 1; height: 5px; border-radius: 4px 1px 4px 1px; background: rgba(255,255,255,.16); overflow: hidden; position: relative; }
.segs i.done::after, .segs i.cur::after { content: ""; position: absolute; inset: 0; background: var(--g-lime); }
.segs i.cur::after { animation: segfill .5s ease both; }
@keyframes segfill { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }

.cook-body { flex: 1; overflow-y: auto; padding: 10px 0; display: flex; flex-direction: column; min-height: 0; }
.stage {
  position: relative; height: 200px; margin: 14px 0 6px; flex: none;
  display: grid; place-items: center;
  border-radius: 34px 10px 34px 10px;
  background: radial-gradient(circle at 50% 60%, rgba(142,211,164,.35) 0%, rgba(31,107,67,.15) 45%, transparent 70%), rgba(255,255,255,.04);
  overflow: hidden;
}
.stage .act { font-size: 96px; position: relative; z-index: 2; }
.stage .ring-bg { position: absolute; width: 160px; height: 160px; border-radius: 50%; border: 2px dashed rgba(200,240,122,.35); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* action animations, chosen by step icon */
.a-mix   { animation: mix 1.4s ease-in-out infinite; transform-origin: 50% 80%; }
.a-chop  { animation: chop .7s ease-in-out infinite; transform-origin: 80% 80%; }
.a-fire  { animation: fire 1s ease-in-out infinite; }
.a-bake  { animation: bake 2.2s ease-in-out infinite; }
.a-chill { animation: chill 2.6s ease-in-out infinite; }
.a-blend { animation: blend 0.5s linear infinite; }
.a-knead { animation: knead 1.6s ease-in-out infinite; }
.a-wait  { animation: wait 2s steps(8) infinite; }
.a-serve { animation: serve 2.4s ease-in-out infinite; }
.a-pour  { animation: pour 2s ease-in-out infinite; transform-origin: 30% 30%; }
.a-default { animation: bob 3s ease-in-out infinite; }
@keyframes mix   { 0%,100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg) translateY(-4px); } }
@keyframes chop  { 0%,100% { transform: rotate(0); } 40% { transform: rotate(-24deg) translateY(-10px); } 60% { transform: rotate(4deg); } }
@keyframes fire  { 0%,100% { transform: scale(1) translateY(0); filter: brightness(1); } 50% { transform: scale(1.1, 1.18) translateY(-6px); filter: brightness(1.2); } }
@keyframes bake  { 0%,100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,190,90,0)); } 50% { transform: scale(1.06); filter: drop-shadow(0 0 28px rgba(255,190,90,.75)); } }
@keyframes chill { 0%,100% { transform: translateY(0) rotate(-6deg); filter: drop-shadow(0 0 0 rgba(160,220,255,0)); } 50% { transform: translateY(-6px) rotate(6deg); filter: drop-shadow(0 0 24px rgba(160,220,255,.8)); } }
@keyframes blend { 0% { transform: translate(0,0) rotate(0); } 25% { transform: translate(2px,-2px) rotate(2deg); } 50% { transform: translate(-2px,1px) rotate(-2deg); } 75% { transform: translate(1px,2px) rotate(1deg); } 100% { transform: translate(0,0); } }
@keyframes knead { 0%,100% { transform: scale(1, 1); } 30% { transform: scale(1.18, .82) translateY(8px); } 60% { transform: scale(.92, 1.08); } }
@keyframes wait  { to { transform: rotate(360deg); } }
@keyframes serve { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-10px) scale(1.06); } }
@keyframes pour  { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-35deg); } }

/* particles inside the stage */
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.fx i { position: absolute; bottom: 30%; left: 50%; font-style: normal; opacity: 0; }
.fx.bubbles i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(200,240,122,.7); animation: bubble 2.4s ease-in infinite; }
.fx.sparks i { width: 6px; height: 6px; border-radius: 50%; background: #FFC86B; box-shadow: 0 0 8px #FFB347; animation: spark 1.4s ease-out infinite; }
.fx.flakes i { width: 7px; height: 7px; background: #CFF2FF; border-radius: 2px; top: -10px; bottom: auto; animation: flake 3s linear infinite; }
.fx.steam2 i { width: 14px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.5); filter: blur(5px); animation: steam 2.6s ease-out infinite; bottom: 45%; }
@keyframes bubble { 0% { opacity: 0; transform: translate(0,0) scale(.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx, 0), -120px) scale(1.2); } }
@keyframes spark { 0% { opacity: 1; transform: translate(0,0); } 100% { opacity: 0; transform: translate(var(--dx, 0), -90px); } }
@keyframes flake { 0% { opacity: 0; transform: translate(0,0) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx,0), 220px) rotate(270deg); } }

.cook-step h2 { color: var(--white); font-size: 1.55em; margin-top: 4px; }
.cook-step .lbl { color: var(--lime); font-weight: 700; font-size: .82em; }
.cook-step p { color: var(--mint); font-size: 1.05em; margin-top: 10px; line-height: 1.6; }
.cue-box { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(200,240,122,.1); border-left: 3px solid var(--lime); }
.cue-box b { display: block; color: var(--lime); font-size: .78em; margin-bottom: 3px; }
.cue-box span { color: var(--white); font-size: .95em; }

.timer { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255,255,255,.06); }
.timer .ring { width: 74px; height: 74px; flex: none; position: relative; }
.timer .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer .ring circle { fill: none; stroke-width: 7; }
.timer .ring .bg { stroke: rgba(255,255,255,.12); }
.timer .ring .fg { stroke: var(--lime); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer .ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: .95em; font-variant-numeric: tabular-nums; }
.timer .ctrl { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.timer .ctrl .btn { min-height: 42px; padding: 0 16px; font-size: .9em; }
.timer.ring-done { animation: ringDone .6s ease 3; }
@keyframes ringDone { 50% { background: rgba(200,240,122,.28); } }

.cook-nav { display: flex; gap: 10px; padding-top: 10px; }
.cook-nav .btn-lime { flex: 1; }
.btn-glass { background: rgba(255,255,255,.1); color: var(--white); }

.mise { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.mise li { padding: 10px 12px; border-radius: var(--r-sm); background: rgba(255,255,255,.06); display: flex; gap: 10px; font-size: .95em; }
.mise li b { color: var(--lime); white-space: nowrap; }

.bravo { text-align: center; padding-top: 30px; }
.bravo .trophy { font-size: 110px; animation: trophy 1.2s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes trophy { from { transform: scale(0) rotate(-30deg); } to { transform: none; } }
.bravo h2 { color: var(--white); font-size: 2em; margin-top: 10px; }
.bravo p { color: var(--mint); }
.xp-pop { display: inline-block; margin-top: 8px; padding: 10px 18px; border-radius: var(--r-md); background: var(--lime); color: var(--forest); font-weight: 800; font-size: 1.3em; animation: pop .5s .4s ease both; }

/* ---------- 11. SHEETS, TOASTS, CONFETTI ---------- */
.scrim { position: fixed; inset: 0; z-index: 90; background: rgba(8,26,17,.55); animation: fade .2s ease both; display: flex; align-items: flex-end; justify-content: center; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: var(--mist); border-radius: 30px 8px 0 0; padding: 10px 18px calc(22px + var(--safe-b));
  animation: sheetUp .32s cubic-bezier(.2,.9,.3,1) both;
}
.sheet .grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 14px; }
.sheet h2 { margin-bottom: 14px; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.opt-list { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--white); border-radius: var(--r-sm); text-align: left; width: 100%; font-weight: 600; color: var(--ink); }
.opt .emo { font-size: 22px; }
.opt.on { box-shadow: inset 0 0 0 2px var(--fern); }

#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 20px + var(--safe-b)); z-index: 120; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--forest); color: var(--white); padding: 12px 16px; border-radius: var(--r-md); font-weight: 600; font-size: .9em; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: toastIn .3s ease both; }
.toast .emo { font-size: 20px; }
.toast.out { animation: toastOut .3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(14px); } }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 130; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 5px 1px 5px 1px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); } }

.celebrate { text-align: center; padding: 10px 0 4px; }
.celebrate .big { font-size: 84px; animation: trophy 1s cubic-bezier(.2,1.6,.4,1) both; }
.celebrate h2 { margin-top: 8px; }

/* ---------- 12. LANGUAGE + ONBOARDING ---------- */
.splash { position: fixed; inset: 0; background: var(--g-deep); display: grid; place-items: center; z-index: 200; transition: opacity .5s; }
.splash.out { opacity: 0; pointer-events: none; }
.logo-mark { display: grid; place-items: center; gap: 14px; text-align: center; color: var(--white); }
.logo-leaf {
  width: 84px; height: 84px; border-radius: 42px 8px 42px 8px; background: var(--g-lime);
  display: grid; place-items: center; color: var(--forest); font-weight: 800; font-size: 34px; letter-spacing: -0.06em;
  animation: leafIn .9s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes leafIn { from { transform: scale(.2) rotate(-90deg); opacity: 0; } }
.logo-mark b { font-size: 1.4em; letter-spacing: -0.02em; animation: fade .6s .3s both; }
.logo-mark small { color: var(--sprout); font-size: .82em; animation: fade .6s .5s both; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--sprout); animation: dot 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-6px); opacity: .4; } }

.lang-screen { padding: 40px 22px; min-height: 100vh; min-height: 100dvh; background: var(--mist); animation: screenIn .4s ease both; }
.lang-screen .logo-leaf { width: 54px; height: 54px; font-size: 22px; border-radius: 27px 6px 27px 6px; margin-bottom: 26px; }
.lang-screen h1 { font-size: 1.7em; }
.lang-screen > p { color: var(--muted); margin: 10px 0 22px; }
.lang-list { display: grid; gap: 10px; }
.lang-opt {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px 18px; background: var(--white); border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; color: var(--ink); text-align: left;
  transition: box-shadow .2s, background .2s;
}
.lang-opt .check { margin-left: auto; color: var(--fern); opacity: 0; transform: scale(.5); transition: .2s; }
.lang-opt.on { background: var(--dew); box-shadow: inset 0 0 0 2px var(--fern); }
.lang-opt.on .check { opacity: 1; transform: none; }
.lang-screen .btn { margin-top: 26px; }

/* CSS flags */
.flag { width: 34px; height: 24px; border-radius: 4px; flex: none; position: relative; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.flag-us { background: repeating-linear-gradient(180deg, #B22234 0 1.85px, #fff 1.85px 3.7px); }
.flag-us::before { content: ""; position: absolute; left: 0; top: 0; width: 45%; height: 54%; background: #3C3B6E radial-gradient(circle, rgba(255,255,255,.9) .6px, transparent .8px) 0 0 / 3.4px 3.2px; }
.flag-es { background: linear-gradient(#AA151B 0 25%, #F1BF00 25% 75%, #AA151B 75%); }
.flag-br { background: #009B3A; }
.flag-br::before { content: ""; position: absolute; inset: 3px 4px; background: #FEDF00; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.flag-br::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #002776; }
.flag-it { background: linear-gradient(90deg, #009246 0 33.3%, #fff 33.3% 66.6%, #CE2B37 66.6%); }
.flag-fr { background: linear-gradient(90deg, #0055A4 0 33.3%, #fff 33.3% 66.6%, #EF4135 66.6%); }

.ob { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 28px 22px 30px; background: var(--mist); animation: screenIn .4s ease both; }
.ob.dark { background: var(--g-deep); color: var(--white); }
.ob.dark h1 { color: var(--white); }
.ob.dark p { color: var(--mint); }
.ob .grow { flex: 1; }
.ob h1 { font-size: 2em; }
.ob p.lead { font-size: 1.05em; margin-top: 12px; }
.ob-steps { display: flex; gap: 6px; margin-bottom: 28px; }
.ob-steps i { flex: 1; height: 5px; border-radius: 4px 1px 4px 1px; background: var(--line); }
.ob-steps i.on { background: var(--fern); }
.ob input.field { width: 100%; min-height: 58px; padding: 0 18px; border-radius: var(--r-md); border: 0; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 1.1em; margin-top: 22px; outline: 0; }
.ob input.field:focus { box-shadow: inset 0 0 0 2px var(--fern); }
.goal-list { display: grid; gap: 10px; margin-top: 22px; }
.ob-actions { display: flex; gap: 10px; margin-top: 24px; }
.ob-actions .btn-main { flex: 1; }

.plate-orbit { position: relative; height: 300px; margin: 10px -22px 0; }
.plate-orbit .center { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; background: radial-gradient(circle, #fff 0 55%, rgba(255,255,255,.4) 56% 64%, transparent 65%); display: grid; place-items: center; font-size: 64px; box-shadow: 0 20px 40px -10px rgba(0,0,0,.4); }
.plate-orbit .orb { position: absolute; left: 50%; top: 50%; font-size: 34px; animation: orbit 14s linear infinite; }
@keyframes orbit { from { transform: rotate(var(--a)) translateX(122px) rotate(calc(-1 * var(--a))); } to { transform: rotate(calc(var(--a) + 360deg)) translateX(122px) rotate(calc(-1 * (var(--a) + 360deg))); } }

/* ---------- 13. LISTS: SAVED / SHOPPING / WEEK ---------- */
.empty { text-align: center; padding: 40px 20px; }
.empty .emo { font-size: 64px; display: block; margin-bottom: 12px; animation: bob 4s ease-in-out infinite; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: .92em; }

.shop-group h4 { font-size: .82em; color: var(--muted); margin: 18px 0 8px; font-weight: 700; }
.shop-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.week { display: grid; gap: 12px; }
.day-card { background: var(--white); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow); }
.day-card h3 { font-size: .98em; margin-bottom: 10px; display: flex; justify-content: space-between; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot { min-height: 64px; border-radius: var(--r-sm); padding: 8px 10px; text-align: left; background: var(--mist); border: 1.5px dashed var(--line); font-size: .8em; display: flex; flex-direction: column; gap: 2px; }
.slot small { color: var(--muted); font-weight: 600; font-size: .9em; }
.slot.filled { border-style: solid; border-color: transparent; background: var(--dew); }
.slot .ttl { font-weight: 700; color: var(--ink); line-height: 1.25; display: flex; gap: 6px; }
.slot .plus { color: var(--moss); font-weight: 800; font-size: 1.3em; }

/* ---------- 14. PROGRESS ---------- */
.prog-hero { margin: 0 -18px; padding: 22px 18px 26px; background: var(--g-deep); color: var(--white); border-radius: 0 0 40px 10px; }
.prog-hero h1 { color: var(--white); }
.big-lvl { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.big-lvl .ring { width: 110px; height: 110px; position: relative; flex: none; }
.big-lvl .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.big-lvl .ring circle { fill: none; stroke-width: 9; }
.big-lvl .ring .bg { stroke: rgba(255,255,255,.12); }
.big-lvl .ring .fg { stroke: url(#lg); stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.big-lvl .ring div { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.big-lvl .ring div b { font-size: 2em; font-weight: 800; line-height: 1; display: block; }
.big-lvl .ring div small { color: var(--sprout); font-size: .7em; }
.big-lvl h2 { color: var(--white); }
.big-lvl p { color: var(--mint); font-size: .88em; margin: 4px 0 0; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--white); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.7em; color: var(--forest); font-weight: 800; letter-spacing: -0.03em; }
.stat small { color: var(--muted); font-size: .8em; }
.stat .emo { float: right; font-size: 22px; }

.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge { background: var(--white); border-radius: var(--r-md); padding: 14px 8px 12px; text-align: center; box-shadow: var(--shadow); }
.badge .medal { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: var(--g-lime); box-shadow: inset 0 -4px 0 rgba(14,46,31,.15); }
.badge b { display: block; font-size: .74em; color: var(--ink); line-height: 1.25; }
.badge small { display: block; font-size: .66em; color: var(--muted); margin-top: 3px; line-height: 1.3; }
.badge.off .medal { background: var(--dew); filter: grayscale(1); opacity: .5; }
.badge.off b { color: var(--muted); }

.catprog { display: grid; gap: 10px; background: var(--white); padding: 16px; border-radius: var(--r-lg); }
.catprog .row { display: grid; grid-template-columns: 28px 1fr 56px; gap: 10px; align-items: center; font-size: .85em; }
.catprog .row .emo { font-size: 20px; }
.catprog .row .bar { margin: 4px 0 0; }
.catprog .row b { text-align: right; color: var(--ink); font-size: .9em; }

.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; background: var(--white); padding: 16px; border-radius: var(--r-lg); }
.heat i { aspect-ratio: 1; border-radius: 7px 2px 7px 2px; background: var(--dew); }
.heat i.l1 { background: var(--sprout); } .heat i.l2 { background: var(--moss); } .heat i.l3 { background: var(--leaf); }
.heat i.today { box-shadow: 0 0 0 2px var(--forest); }

.levels { display: grid; gap: 8px; }
.lv { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--white); font-size: .88em; }
.lv .n { width: 32px; height: 32px; border-radius: 10px 3px 10px 3px; display: grid; place-items: center; font-weight: 800; background: var(--dew); color: var(--muted); }
.lv.on .n { background: var(--g-lime); color: var(--forest); }
.lv.cur { box-shadow: inset 0 0 0 2px var(--fern); }
.lv small { margin-left: auto; color: var(--muted); }

/* ---------- 15. GUIDE / LESSON READER ---------- */
.reader-hero { margin: 0 -18px; padding: 18px 18px 26px; color: var(--white); background: var(--g-deep); border-radius: 0 0 40px 10px; position: relative; overflow: hidden; }
.reader-hero .big { font-size: 70px; position: absolute; right: 16px; bottom: 10px; opacity: .95; animation: bob 5s ease-in-out infinite; }
.reader-hero h1 { color: var(--white); font-size: 1.6em; margin-top: 14px; padding-right: 80px; }
.reader-hero p { color: var(--mint); font-size: .92em; margin: 8px 0 0; padding-right: 80px; }
.reader-hero .row { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; padding-right: 84px; position: relative; z-index: 1; }

.blocks { margin-top: 22px; }
.blocks > * + * { margin-top: 14px; }
.blocks .b-p { font-size: 1em; }
.blocks .b-h { font-size: 1.2em; margin-top: 28px; padding-top: 4px; }
.blocks .b-list { padding: 0; margin: 0; list-style: none; display: grid; gap: 8px; }
.blocks .b-list li { position: relative; padding: 10px 12px 10px 38px; background: var(--white); border-radius: var(--r-sm); font-size: .94em; }
.blocks .b-list li::before { content: ""; position: absolute; left: 14px; top: 17px; width: 10px; height: 10px; border-radius: 5px 1px 5px 1px; background: var(--moss); }
.blocks .b-tip, .blocks .b-warn { padding: 14px 16px 14px 50px; border-radius: var(--r-md); position: relative; font-size: .94em; }
.blocks .b-tip { background: var(--g-soft); color: var(--ink); }
.blocks .b-warn { background: #FBEFE6; color: #5A2C17; }
.blocks .b-tip::before, .blocks .b-warn::before { position: absolute; left: 14px; top: 12px; font-family: var(--emoji); font-size: 22px; }
.blocks .b-tip::before { content: "💡"; }
.blocks .b-warn::before { content: "⚠️"; }
.b-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.b-card { background: var(--white); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow); }
.b-card .emo { font-size: 28px; }
.b-card b { display: block; margin: 8px 0 4px; color: var(--ink); font-size: .9em; line-height: 1.25; }
.b-card p { margin: 0; font-size: .8em; color: var(--muted); }
.b-table { overflow-x: auto; border-radius: var(--r-md); background: var(--white); box-shadow: var(--shadow); }
.b-table table { width: 100%; border-collapse: collapse; font-size: .84em; }
.b-table th { text-align: left; background: var(--pine); color: var(--white); padding: 10px 12px; font-weight: 700; white-space: nowrap; }
.b-table td { padding: 10px 12px; border-top: 1px solid var(--dew); vertical-align: top; }
.b-table tr:nth-child(even) td { background: #FAFDFA; }
.b-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.b-steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; background: var(--white); padding: 12px 14px; border-radius: var(--r-md); }
.b-steps li::before { content: counter(s); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px 3px 12px 3px; background: var(--forest); color: var(--lime); font-weight: 800; }
.b-steps b { display: block; color: var(--ink); font-size: .95em; }
.b-steps p { margin: 2px 0 0; font-size: .88em; color: var(--muted); }
.b-quote { padding: 18px; border-radius: var(--r-lg); background: var(--g-deep); color: var(--white); font-size: 1.05em; font-weight: 600; }
.b-quote small { display: block; margin-top: 8px; color: var(--sprout); font-weight: 500; font-size: .8em; }
.b-stat { display: flex; gap: 10px; }
.b-stat div { flex: 1; text-align: center; background: var(--white); border-radius: var(--r-md); padding: 14px 6px; box-shadow: var(--shadow); }
.b-stat b { display: block; font-size: 1.8em; color: var(--fern); font-weight: 800; letter-spacing: -0.03em; }
.b-stat small { font-size: .74em; color: var(--muted); }

.swapper .search { margin: 0 0 12px; box-shadow: inset 0 0 0 1.5px var(--line); }
.swap-row { display: grid; grid-template-columns: 1fr 26px 1fr; gap: 6px; align-items: center; background: var(--white); border-radius: var(--r-sm); padding: 12px; margin-bottom: 8px; }
.swap-row .from { font-weight: 700; color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(92,116,101,.4); font-size: .9em; }
.swap-row .arr { text-align: center; color: var(--moss); font-weight: 800; }
.swap-row .to { font-weight: 700; color: var(--forest); font-size: .9em; }
.swap-row .more { grid-column: 1 / -1; font-size: .8em; color: var(--muted); }
.swap-row .more b { color: var(--leaf); }

.day-acc { background: var(--white); border-radius: var(--r-md); overflow: hidden; margin-bottom: 10px; box-shadow: var(--shadow); }
.day-acc > button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; }
.day-acc .dn { width: 44px; height: 44px; border-radius: 14px 4px 14px 4px; background: var(--g-fresh); color: var(--white); display: grid; place-items: center; font-weight: 800; flex: none; }
.day-acc.done .dn { background: var(--forest); color: var(--lime); }
.day-acc .dt { flex: 1; font-weight: 700; color: var(--ink); }
.day-acc .chev { transition: transform .25s; color: var(--muted); }
.day-acc.open .chev { transform: rotate(180deg); }
.day-acc .in { display: none; padding: 0 14px 14px; }
.day-acc.open .in { display: block; animation: fade .3s; }
.meal-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--dew); font-size: .88em; }
.meal-row small { color: var(--leaf); font-weight: 700; }

/* course */
.lesson-list { display: grid; gap: 10px; }
.lesson-row { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--white); border-radius: var(--r-md); text-align: left; width: 100%; box-shadow: var(--shadow); }
.lesson-row .emo { width: 48px; height: 48px; display: grid; place-items: center; font-size: 24px; border-radius: 16px 4px 16px 4px; background: var(--g-soft); flex: none; }
.lesson-row.done .emo { background: var(--g-lime); }
.lesson-row b { display: block; color: var(--ink); font-size: .95em; line-height: 1.25; }
.lesson-row small { color: var(--muted); font-size: .78em; }
.lesson-row .ck { margin-left: auto; color: var(--fern); font-weight: 800; }

.quiz { margin-top: 30px; background: var(--white); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
.quiz h3 { margin-bottom: 4px; }
.qq { margin-top: 16px; }
.qq > b { display: block; color: var(--ink); margin-bottom: 10px; }
.qopt { display: block; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 8px; border-radius: var(--r-sm); background: var(--mist); font-weight: 600; font-size: .92em; box-shadow: inset 0 0 0 1.5px var(--line); transition: .2s; }
.qopt.right { background: var(--dew); box-shadow: inset 0 0 0 2px var(--fern); color: var(--forest); }
.qopt.wrong { background: #FBEFE6; box-shadow: inset 0 0 0 2px #E4A783; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.qwhy { font-size: .85em; color: var(--muted); padding: 8px 2px 0; }
.qwhy b { color: var(--forest); }

/* body journey */
.path { position: relative; margin-top: 20px; padding-left: 8px; }
.path::before { content: ""; position: absolute; left: 35px; top: 30px; bottom: 30px; width: 4px; background: repeating-linear-gradient(var(--sprout) 0 8px, transparent 8px 14px); border-radius: 2px; }
.stop { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 10px 0; }
.stop .node { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: var(--white); box-shadow: 0 0 0 4px var(--mist), var(--shadow); position: relative; z-index: 1; flex: none; transition: transform .2s; }
.stop.done .node { background: var(--g-lime); }
.stop:active .node { transform: scale(.94); }
.stop b { display: block; color: var(--ink); }
.stop small { color: var(--muted); font-size: .8em; display: block; line-height: 1.35; }
.traveler { position: absolute; left: 27px; width: 20px; height: 20px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(200,240,122,.35); z-index: 2; transition: top 1s cubic-bezier(.5,0,.3,1); }

.organ-stage { height: 190px; margin: 0 -18px; display: grid; place-items: center; position: relative; overflow: hidden; background: var(--g-deep); border-radius: 0 0 40px 10px; }
.organ-stage .emo { font-size: 92px; animation: pulse 2.2s ease-in-out infinite; z-index: 1; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.organ-stage .orbit-dot { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--lime); animation: orbit 5s linear infinite; }

.chart-card { background: var(--white); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.chart-card svg { width: 100%; height: auto; display: block; margin-top: 10px; }
.chart-card .lg { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78em; color: var(--muted); margin-top: 8px; }
.chart-card .lg i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.draw { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.4s ease forwards; }
.draw.d2 { animation-delay: .6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- 16. GAME ---------- */
.game { position: fixed; inset: 0; z-index: 85; background: var(--forest); display: flex; flex-direction: column; animation: cookIn .3s ease both; }
.game-wrap { max-width: 560px; width: 100%; margin: 0 auto; flex: 1; display: flex; flex-direction: column; padding: 14px 14px calc(14px + var(--safe-b)); min-height: 0; }
.hud { display: flex; align-items: center; gap: 10px; color: var(--white); }
.hud .grow { flex: 1; display: flex; gap: 8px; }
.hud .box { background: rgba(255,255,255,.1); border-radius: var(--r-sm); padding: 6px 12px; text-align: center; }
.hud .box small { display: block; font-size: .65em; color: var(--sprout); font-weight: 600; }
.hud .box b { font-size: 1.1em; font-variant-numeric: tabular-nums; }
.field-wrap { flex: 1; margin-top: 12px; position: relative; border-radius: 30px 8px 30px 8px; overflow: hidden; background: linear-gradient(180deg, #154530 0%, #1F6B43 70%, #2F8F59 100%); min-height: 0; touch-action: none; }
.field-wrap canvas { width: 100%; height: 100%; display: block; }
.game-over { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: rgba(14,46,31,.82); backdrop-filter: blur(4px); color: var(--white); animation: fade .3s; }
.game-over h2 { color: var(--white); font-size: 1.8em; }
.game-over p { color: var(--mint); }
.game-over .emo.big { font-size: 72px; display: block; margin-bottom: 8px; }
.legend-row { display: flex; justify-content: center; gap: 18px; margin: 14px 0 20px; flex-wrap: wrap; }
.legend-row div { font-size: .8em; color: var(--mint); }
.legend-row .emo { font-size: 26px; display: block; margin-bottom: 4px; letter-spacing: 4px; }

/* ---------- 17. SETTINGS ---------- */
.set-list { display: grid; gap: 10px; margin-top: 16px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--white); border-radius: var(--r-md); text-align: left; width: 100%; }
.set-row .emo { font-size: 22px; }
.set-row b { flex: 1; color: var(--ink); font-weight: 600; }
.set-row small { color: var(--muted); }
.fine { font-size: .8em; color: var(--muted); margin-top: 22px; line-height: 1.5; }

/* ---------- 18. MISC ---------- */
.load-more { height: 1px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (min-width: 480px) {
  .rgrid { grid-template-columns: 1fr 1fr 1fr; }
  .rgrid.two { grid-template-columns: 1fr 1fr; }
  .hscroll > * { width: 36%; }
  .badges { grid-template-columns: repeat(4, 1fr); }
}
