
:root{
  --bg:#fffdf8;
  --paper:#fffdf8;
  --ink:#3f332c;
  --muted:#7e7167;
  --line:#eadcc9;
  --peach:#ffd8c9;
  --blue:#dcecf6;
  --green:#dfeccd;
  --yellow:#fff0bd;
  --purple:#eadff4;
  --shadow:0 18px 45px rgba(88,62,42,.11);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color:var(--ink);
  background:var(--bg);
}
.page-shell{display:grid;grid-template-columns:340px minmax(0,1fr);min-height:100vh}
.sidebar{
  position:sticky;top:28px;height:calc(100vh - 56px);overflow:auto;
  margin:28px 0 28px 18px;
  padding:22px 18px;border:1px solid var(--line);border-radius:30px;
  background:rgba(255,253,248,.82);backdrop-filter:blur(14px);
}
.brand{
  position:sticky;
  top:-22px;
  z-index:12;
  display:flex;gap:12px;align-items:center;
  margin:-22px -18px 0;
  padding:32px 26px 18px;
  background:#fffdf8;
}
.brand img{width:54px;height:54px;object-fit:contain;border-radius:16px;background:#fff}
.brand strong{display:block;font-size:15px}
.brand small{display:block;color:var(--muted);margin-top:2px}
#search{
  position:sticky;
  top:82px;
  z-index:12;
  width:100%;border:1px solid var(--line);border-radius:16px;padding:13px 14px;
  background:#fff;color:var(--ink);outline:none;margin-bottom:14px;
  box-shadow:0 -12px 0 12px #fffdf8;
}
nav{display:flex;flex-direction:column;gap:6px}
nav a{
  display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:13px;
  text-decoration:none;color:var(--ink);font-size:13px;line-height:1.25;
}
nav a:hover{background:#fff2e6}
nav a span{
  display:grid;place-items:center;min-width:30px;height:24px;border-radius:999px;
  background:#f1e4d4;color:#6f5a4b;font-size:11px;font-weight:800;
}
main{padding:28px 36px 80px;max-width:1220px;width:100%;margin:0 auto}
.hero{
  min-height:max(720px, calc(100vh - 56px));display:grid;grid-template-columns:1.08fr .92fr;gap:28px;align-items:center;
  padding:42px;border:1px solid var(--line);border-radius:36px;background:linear-gradient(135deg,#fffdf8,#fff2e8);
  box-shadow:var(--shadow);position:relative;overflow:hidden;
}
.hero:before{content:"";position:absolute;inset:18px;border:2px dashed rgba(234,178,158,.45);border-radius:28px;pointer-events:none}
.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:#ba7f6e;font-weight:800;margin:0 0 10px}
h1{font-size:64px;line-height:.96;margin:0 0 20px;letter-spacing:-.05em}
.lead{font-size:19px;line-height:1.65;color:var(--muted);max-width:660px}
.formula{display:flex;flex-wrap:nowrap;gap:10px;align-items:center;margin:28px 0}
.formula span{background:#fff;border:1px solid var(--line);border-radius:999px;padding:12px 14px;font-weight:800;white-space:nowrap}
.formula b{color:#c88774}
.hero-buttons{display:flex;gap:12px;flex-wrap:wrap}
.hero-buttons a,
.hero-buttons span{background:#2f2925;color:white;text-decoration:none;padding:13px 18px;border-radius:16px;font-weight:800}
.hero-buttons a.secondary,
.hero-buttons span.secondary{background:#fff;color:var(--ink);border:1px solid var(--line)}
.hero-buttons .coming-soon{
  position:absolute;
  right:58px;
  top:54px;
  z-index:2;
  cursor:not-allowed;
  background:#2f2925;
  color:#fff;
  border-color:#2f2925;
  padding-top:18px;
  box-shadow:0 14px 28px rgba(47,41,37,.13);
}
.hero-buttons .coming-soon:before{
  content:"Coming soon";
  position:absolute;
  top:-13px;
  left:50%;
  transform:translateX(-50%) rotate(-2deg);
  background:#fff0bd;
  border:1px solid #ead6a5;
  color:#7a5f31;
  border-radius:999px;
  padding:4px 12px;
  font-size:11px;
  line-height:1;
  letter-spacing:.04em;
  text-transform:uppercase;
  white-space:nowrap;
  box-shadow:0 6px 14px rgba(88,62,42,.08);
}
.hero-art{position:relative;min-height:420px;display:grid;place-items:center}
.hero-mochi{width:min(430px,100%);background:transparent;border-radius:0;filter:drop-shadow(0 18px 22px rgba(80,55,38,.13))}
.floating-card{position:absolute;background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px 16px;box-shadow:0 12px 26px rgba(70,50,35,.08);font-weight:800}
.floating-card.one{left:0;top:68px;transform:rotate(-5deg);background:#eaf4ff}
.floating-card.two{right:0;top:150px;transform:rotate(4deg);background:#eff8e4}
.floating-card.three{left:30px;bottom:56px;transform:rotate(3deg);background:#fff0c9}

.map-section{padding:46px 4px}
.map-section h2{font-size:34px;margin:0 0 20px;letter-spacing:-.03em}
.map-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
.map-grid div{background:var(--paper);border:1px solid var(--line);border-radius:22px;padding:18px;box-shadow:0 10px 28px rgba(88,62,42,.06)}
.map-grid b{display:block;margin-bottom:6px}
.map-grid span{color:var(--muted);font-size:14px;line-height:1.45}

.chapters{display:grid;gap:28px}
.chapter-card{
  min-height:500px;background:rgba(255,253,248,.92);border:1px solid var(--line);border-radius:34px;
  padding:26px;box-shadow:var(--shadow);overflow:hidden;position:relative;
}
.chapter-card:after{content:"";position:absolute;right:-70px;top:-70px;width:220px;height:220px;background:#ffe1d4;border-radius:50%;opacity:.35}
.chapter-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.chapter-number{font-size:13px;font-weight:900;color:#9a7b65;background:#f4e6d8;border-radius:999px;padding:9px 13px}
.chapter-icon{font-size:32px}
.chapter-body{display:grid;grid-template-columns:1.35fr .65fr;gap:24px;align-items:center;position:relative;z-index:1}
.chapter-copy h2{font-size:42px;line-height:1;margin:0 0 10px;letter-spacing:-.04em}
.chapter-copy h3{font-size:22px;margin:0 0 14px;color:#6f5a4b}
.story{font-size:17px;line-height:1.6;color:var(--muted);max-width:780px}
.mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:22px 0}
.mini-panel{border:1px solid var(--line);border-radius:22px;background:#fff;padding:16px}
.mini-panel strong{display:block;margin-bottom:10px}
.source-note{margin:-2px 0 12px;color:var(--muted);font-size:12px;line-height:1.45}
.mini-panel ul{margin:0;padding-left:18px;color:var(--muted);line-height:1.7;font-size:14px}
.source-pills{display:flex;flex-wrap:wrap;gap:8px}
.source-pills span{background:#f7efe5;border-radius:999px;padding:8px 10px;font-size:12px;color:#6c5a4c;font-weight:700}
.inference{position:relative;background:#fffdf8;border:1px solid #e7d8c8;border-radius:24px;padding:16px 18px;box-shadow:0 10px 24px rgba(72,58,43,.045)}
.inference > span{text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:800;color:#5f6f78}
.inference::after{content:"Powered by Verbiflow SDK";display:block;margin-top:14px;text-align:right;color:#6f8b90;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.inference p{margin:6px 0 0;color:#4f4a43;line-height:1.55}
.inference ul{margin:8px 0 0;padding-left:18px;color:#4f4a43;line-height:1.42}
.inference li+li{margin-top:6px}
.inference li{font-size:14px}
.inference b{font-weight:750}
.inference a{color:#2f6673;text-decoration:none;border-bottom:1px solid rgba(47,102,115,.28);font-style:italic;font-weight:650}
.inference a::after{content:" ↗";font-size:.78em;font-weight:900}
.compact-proof-line{font-size:13.5px !important;line-height:1.45 !important;color:#5f5a52 !important}
.more-proof{margin-top:8px;color:#4f4a43}
.more-proof summary{cursor:pointer;font-weight:900;color:#486b72;font-size:13px}
.more-proof p{font-size:13px;line-height:1.45;margin-top:5px}
.tool-summary-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:12px}
.tool-summary-grid div{border:1px solid #dfe7d3;background:rgba(255,255,255,.7);border-radius:12px;padding:10px 8px;text-align:center}
.tool-summary-grid b{display:block;color:#53634b;font-size:20px;line-height:1}
.tool-summary-grid span{display:block;margin-top:5px;color:#687760;font-size:11px;font-weight:900;line-height:1.2}
.tool-example-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tool-example-list div{border:1px solid #e5dccf;background:#fff;border-radius:12px;padding:12px}
.tool-example-list b{display:block;color:#53634b;font-size:13px;margin-bottom:5px}
.tool-example-list span{display:block;color:#4f5963;font-size:13px;line-height:1.35;text-transform:none;letter-spacing:0;font-weight:500}
.distribution-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.distribution-list div{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #ddd3c8;background:#fff;border-radius:12px;padding:10px 12px}
.distribution-list b{color:#4f4a43;font-size:13px;line-height:1.25}
.distribution-list span{color:#2f6673;font-weight:850;font-size:14px}
.competitor-list{display:grid;gap:14px}
.competitor-list section{border:1px solid #ddd3c8;background:#fff;border-radius:14px;padding:13px}
.competitor-list b{display:block;margin-bottom:9px;color:#4f4a43;font-size:13px}
.competitor-list div{display:flex;flex-wrap:wrap;gap:7px}
.competitor-list span{border:1px solid #d5e1e3;background:#f7fbfb;border-radius:999px;padding:6px 9px;color:#2f6673;font-size:12px;font-weight:750}
.timeline-modal-trigger{margin-top:12px;margin-bottom:10px;border:1px solid #beced0;border-radius:999px;background:#fff;color:#486b72;padding:9px 13px;font-weight:800;font-size:13px;cursor:pointer}
.timeline-modal-trigger:hover{background:#eef5f5}
.timeline-dialog{width:min(720px,calc(100vw - 32px));border:1px solid #e4d7c6;border-radius:20px;padding:0;background:#fffdf8;color:#5f6c55;box-shadow:0 26px 70px rgba(60,47,36,.22)}
.timeline-dialog::backdrop{background:rgba(39,32,27,.34);backdrop-filter:blur(4px)}
.timeline-dialog-inner{position:relative;padding:22px}
.dialog-close{position:absolute;right:16px;top:14px;width:32px;height:32px;border:1px solid #e4d7c6;border-radius:50%;background:#fff;color:#6c5a4c;font-size:22px;line-height:1;cursor:pointer}
.dialog-kicker{display:block;text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:900;color:#9a7b65}
.timeline-dialog h3{margin:6px 38px 8px 0;color:#6f5a4b;font-size:22px;line-height:1.1}
.timeline-dialog p{margin:0 38px 16px 0;color:#6c5a4c;font-size:14px;line-height:1.5}
.modal-timeline{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.modal-timeline a{display:block;border:1px solid #dbe8c8;border-radius:14px;background:#f7fbef;padding:14px 12px;text-decoration:none;color:#5f6c55}
.modal-timeline a::after{content:none}
.modal-timeline b{display:block;color:#53634b;font-size:26px;line-height:1}
.modal-timeline span{display:block;margin-top:7px;font-weight:900;font-size:13px;line-height:1.25}
.modal-timeline small{display:block;margin-top:8px;color:#829274;font-size:11px;line-height:1.3}
.weekly-timeline{position:relative;display:grid;grid-template-columns:repeat(9,1fr);gap:6px;margin:24px 0 12px;padding-top:18px}
.weekly-timeline::before{content:"";position:absolute;left:5%;right:5%;top:26px;height:2px;background:#e2d3bf}
.weekly-timeline a{position:relative;display:grid;justify-items:center;gap:6px;text-align:center;text-decoration:none;color:#6c5a4c;min-width:0}
.weekly-timeline a::after{content:none}
.weekly-timeline a::before{content:"";width:calc(9px + (var(--count) * 2px));height:calc(9px + (var(--count) * 2px));border-radius:50%;background:#9a7b65;border:3px solid #fffdf8;box-shadow:0 0 0 1px #d6c1a8;z-index:1}
.weekly-timeline b{order:-1;color:#6f5a4b;font-size:11px;line-height:1;white-space:nowrap}
.weekly-timeline span{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#f7efe5;color:#6f5a4b;font-weight:900;font-size:11px}
.weekly-timeline small{color:#8c7764;font-size:10px;line-height:1.15;max-width:76px}
.timeline-note{margin-top:14px !important;font-size:13px !important}
.velocity-dialog{width:min(760px,calc(100vw - 32px));background:#fbf8f3;color:#3f4652}
.velocity-dialog .timeline-dialog-inner{padding:24px 26px 26px}
.velocity-dialog .dialog-kicker{color:#6c7d86;letter-spacing:.14em;font-size:10px}
.velocity-dialog h3{color:#303946;font-size:21px;font-weight:850;letter-spacing:-.01em}
.velocity-dialog p{color:#58616b;font-size:14px}
.velocity-dialog .weekly-timeline{gap:10px;margin:24px 0 14px;padding-top:0}
.velocity-dialog .weekly-timeline::before{top:7px;left:5%;right:5%;background:#d9d1c8;height:1px}
.velocity-dialog .weekly-timeline a{grid-template-rows:14px auto auto auto;gap:5px;color:#4b535c}
.velocity-dialog .weekly-timeline a::before{width:14px;height:14px;background:#c56f43;border:3px solid #fbf8f3;box-shadow:0 0 0 1px #d2aa8f;align-self:start}
.velocity-dialog .weekly-timeline b{order:0;color:#4b535c;font-size:10px;font-weight:800}
.velocity-dialog .weekly-timeline span{width:auto;height:auto;border-radius:0;background:transparent;color:#2f6673;font-size:18px;font-weight:850;line-height:.95}
.velocity-dialog .weekly-timeline small{color:#7a6f66;font-size:9px;font-weight:750;letter-spacing:0;line-height:1.12}
.velocity-dialog .timeline-note{color:#4f5963;font-size:13px !important;line-height:1.45}
.pros-cons-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.pros-cons-grid div{background:rgba(255,255,255,.52);border:1px solid #dbe8c8;border-radius:14px;padding:11px 12px}
.pros-cons-grid b{display:block;color:#53634b;font-size:13px;margin-bottom:6px}
.pros-cons-grid ul{margin:0;padding-left:17px;font-size:13px;line-height:1.45}
.play-example{margin-top:12px;background:#fff7e8;border:1px solid #ead8b8;border-radius:22px;padding:14px 16px}
.play-example span{text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:900;color:#a9793e}
.play-example p{margin:6px 0 0;color:#6c5a4c;line-height:1.5}
.chapter-art{display:grid;place-items:center;background:linear-gradient(135deg,#fff,#fff8ee);border:1px dashed var(--line);border-radius:28px;min-height:310px;padding:18px}
.chapter-art img{max-width:100%;max-height:280px;object-fit:contain;filter:drop-shadow(0 12px 16px rgba(80,55,38,.12))}
.closing{margin-top:34px;border:1px solid var(--line);border-radius:34px;background:#fff;display:grid;grid-template-columns:260px 1fr;gap:28px;align-items:center;padding:34px;box-shadow:var(--shadow)}
.closing img{width:240px;max-width:100%}
.closing h2{font-size:38px;margin:0 0 12px;letter-spacing:-.04em}
.closing p{font-size:18px;line-height:1.65;color:var(--muted)}
.play-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
.play-grid div{border:1px solid var(--line);border-radius:18px;background:#fffdf8;padding:13px 14px}
.play-grid b{display:block;margin-bottom:4px;color:var(--ink)}
.play-grid span{display:block;color:var(--muted);font-size:13px;line-height:1.45}

.proof-slide{
  min-height:500px;
  border:1px solid var(--line);
  border-radius:34px;
  background:#fffdf8;
  box-shadow:var(--shadow);
  overflow:hidden;
  position:relative;
}

.proof-divider{
  display:grid;
  align-content:center;
  gap:22px;
  padding:54px;
  background:
    linear-gradient(135deg, rgba(255,240,189,.72), rgba(220,236,246,.48)),
    #fffdf8;
}

.proof-kicker{
  width:max-content;
  border:1px solid #ead8b8;
  border-radius:999px;
  background:#fff;
  padding:10px 14px;
  color:#7a5f31;
  font-size:12px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.proof-slide h2{
  max-width:780px;
  margin:0;
  font-size:clamp(38px, 5vw, 68px);
  line-height:.96;
  letter-spacing:-.05em;
}

.proof-slide h3{
  margin:10px 0 0;
  color:#6f5a4b;
  font-size:22px;
}

.proof-divider p{
  max-width:780px;
  margin:0;
  color:var(--muted);
  font-size:20px;
  line-height:1.6;
}

.recipe-equation{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  max-width:900px;
}

.recipe-equation span{
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  padding:12px 14px;
  color:var(--ink);
  font-weight:900;
}

.recipe-equation b{
  color:#a9793e;
}

.proof-example{
  display:grid;
  grid-template-columns:1.25fr .75fr;
  gap:30px;
  align-items:center;
  padding:42px;
}

.proof-copy{
  position:relative;
  z-index:1;
}

.signal-stack,
.inference-ladder,
.campaign-grid{
  display:grid;
  gap:14px;
  margin-top:26px;
}

.signal-stack{
  grid-template-columns:1fr 1fr;
}

.signal-stack div,
.inference-ladder div,
.campaign-grid div{
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  padding:18px;
}

.signal-stack b,
.campaign-grid b{
  display:block;
  margin-bottom:6px;
  color:var(--ink);
  font-size:17px;
}

.signal-stack span,
.campaign-grid span,
.inference-ladder p{
  display:block;
  margin:0;
  color:var(--muted);
  font-size:15px;
  line-height:1.5;
}

.inference-ladder span{
  display:block;
  margin-bottom:7px;
  color:#71915b;
  font-size:13px;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.proof-art{
  display:grid;
  place-items:center;
  min-height:320px;
  border:1px dashed var(--line);
  border-radius:28px;
  background:linear-gradient(135deg,#fff,#fff8ee);
}

.proof-art img{
  width:min(82%, 320px);
  max-height:300px;
  object-fit:contain;
  filter:drop-shadow(0 18px 22px rgba(80,55,38,.12));
}

@media(max-width:980px){
  .page-shell{grid-template-columns:1fr}
  .sidebar{
    position:sticky;
    top:0;
    z-index:20;
    height:auto;
    max-height:36vh;
    margin:0;
    overflow:auto;
    border:0;
    border-radius:0;
    border-bottom:1px solid var(--line);
  }
  nav{
    display:flex;
    flex-wrap:nowrap;
    justify-content:flex-start;
    gap:8px;
    overflow-x:auto;
    padding:0 4px 6px;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  nav::-webkit-scrollbar{display:none}
  nav a{
    flex:0 0 auto;
    min-width:158px;
    border:1px solid rgba(234,220,201,.72);
    background:#fff;
    box-shadow:0 5px 12px rgba(88,62,42,.045);
  }
  main{padding:20px}
  .hero,.chapter-body,.closing,.proof-example{grid-template-columns:1fr}
  .hero{min-height:calc(100svh - 170px);gap:20px}
  .hero-art{min-height:340px}
  .hero-mochi{max-height:280px}
  .chapter-card{scroll-margin-top:44vh}
  h1{font-size:46px}
  .formula{flex-wrap:wrap}
  .hero-buttons .coming-soon{
    position:relative;
    right:auto;
    bottom:auto;
  }
  .deck-next{
    display:block;
    position:fixed;
    right:18px;
    bottom:18px;
    z-index:40;
    border:0;
    border-radius:999px;
    padding:13px 18px;
    background:#2f2925;
    color:#fff;
    font:inherit;
    font-weight:900;
    box-shadow:0 14px 32px rgba(47,41,37,.22);
  }
  .map-grid{grid-template-columns:1fr 1fr}
  .mini-grid{grid-template-columns:1fr}
  .proof-divider,
  .proof-example{padding:28px}
  .signal-stack{grid-template-columns:1fr}
  .proof-art{min-height:240px}
}
@media(max-width:620px){
  main{padding:14px}
  .sidebar{max-height:34vh;padding:16px 14px}
  .brand{margin:-16px -14px 0;padding:24px 20px 14px}
  #search{top:72px;margin-bottom:10px}
  nav{gap:7px}
  nav a{font-size:12px;padding:8px}
  nav a span{min-width:26px;height:22px;font-size:10px}
  .hero,.chapter-card{padding:22px}
  .proof-slide{border-radius:28px}
  .proof-slide h2{font-size:clamp(34px, 11vw, 44px)}
  .proof-divider p{font-size:16px;line-height:1.55}
  .recipe-equation span{padding:10px 12px;font-size:13px}
  .hero{border-radius:28px}
  .hero:before{inset:12px;border-radius:22px}
  h1{font-size:clamp(34px, 11vw, 42px)}
  .lead{font-size:16px;line-height:1.55}
  .formula{gap:8px;margin:22px 0}
  .formula span{padding:10px 12px;font-size:13px}
  .formula b{font-size:18px}
  .hero-buttons{flex-direction:column;align-items:stretch}
  .hero-buttons a,
  .hero-buttons span{text-align:center;padding:13px 14px}
  .hero-buttons .coming-soon{margin-top:8px}
  .hero-art{min-height:280px;margin-top:8px}
  .hero-mochi{width:min(300px,100%);max-height:240px}
  .floating-card{font-size:12px;padding:9px 11px;border-radius:14px}
  .floating-card.one{left:4px;top:34px}
  .floating-card.two{right:4px;top:92px}
  .floating-card.three{left:18px;bottom:36px}
  .chapter-copy h2{font-size:32px}
  .chapter-copy h3{font-size:19px}
  .story{font-size:15px}
  .chapter-card{min-height:auto;border-radius:28px}
  .chapter-body{gap:18px}
  .chapter-art{min-height:240px}
  .chapter-art img{max-height:220px}
  .map-grid{grid-template-columns:1fr}
  .closing{padding:24px;grid-template-columns:1fr;text-align:left}
  .closing img{width:180px}
}


/* v2: make the mochi character the main storyteller, not random oversized icons */
.hero-art {
  isolation: isolate;
}
.hero-mochi {
  max-height: 330px;
  object-fit: contain;
}
.inline-mochi {
  display: inline-block;
  width: auto;
  height: 1.4em;
  vertical-align: -0.3em;
  margin: 0 4px;
}
body:not(.web-flip-mode) .hero .flip-start {
  display: none;
}

.story-strip{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin:28px 0 18px;
}
.strip-card{
  position:relative;
  min-height:190px;
  background:rgba(255,253,248,.95);
  border:1px solid var(--line);
  border-radius:28px;
  padding:24px 18px 18px;
  box-shadow:0 12px 30px rgba(88,62,42,.07);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.step-badge{
  position:absolute;
  top:16px;
  left:16px;
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:999px;
  background:#fff0bd;
  border:2px solid #e0b35d;
  color:#6f4c17;
  font-size:16px;
  font-weight:900;
  box-shadow:0 8px 18px rgba(143,101,36,.16);
}
.strip-card img{
  height:88px;
  width:100%;
  object-fit:contain;
  align-self:center;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
.strip-card b{
  display:block;
  font-size:16px;
  margin-top:10px;
}
.strip-card span{
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
}

.mochi-scene{
  position:relative;
  min-height:360px;
  background:
    radial-gradient(circle at 42% 58%, rgba(255,236,209,.9), transparent 36%),
    linear-gradient(135deg,#fff,#fff8ee);
}
.chapter-art.mochi-scene img{
  filter:drop-shadow(0 12px 16px rgba(80,55,38,.12));
}
.mochi-buddy{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-44%);
  width:min(82%, 340px);
  max-height:285px;
  object-fit:contain;
  z-index:2;
}
.signal-object{
  position:absolute;
  right:18px;
  bottom:16px;
  width:32%;
  max-height:138px;
  object-fit:contain;
  opacity:.78;
  z-index:3;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(234,220,201,.72);
  border-radius:22px;
  padding:10px;
}
.sparkle{
  position:absolute;
  z-index:4;
  color:#e1aa56;
  font-weight:900;
  font-size:28px;
  opacity:.9;
}
.sparkle.s1{left:22px;top:24px}
.sparkle.s2{right:26px;top:34px;color:#eeb1a2}
.chapter-card:nth-child(3n+1) .mochi-scene{background:radial-gradient(circle at 45% 56%, rgba(224,241,255,.75), transparent 36%),linear-gradient(135deg,#fff,#fff8ee)}
.chapter-card:nth-child(3n+2) .mochi-scene{background:radial-gradient(circle at 45% 56%, rgba(229,243,211,.85), transparent 36%),linear-gradient(135deg,#fff,#fff8ee)}
.chapter-card:nth-child(3n+3) .mochi-scene{background:radial-gradient(circle at 45% 56%, rgba(255,230,219,.85), transparent 36%),linear-gradient(135deg,#fff,#fff8ee)}

nav a.active{
  background:#2f2925;
  color:#fff;
}
nav a.active span{
  background:#fff;
  color:#2f2925;
}

@media(max-width:980px){
  .story-strip{grid-template-columns:1fr 1fr}
}
@media(max-width:620px){
  .story-strip{grid-template-columns:1fr}
  .mochi-scene{min-height:300px}
  .mochi-buddy{max-height:220px}
}


/* v3 fix: remove checkerboard-box feeling and make the mochi the actual narrator */
.chapter-art.mochi-scene{
  border:0;
  background:
    radial-gradient(circle at 50% 58%, rgba(255,238,213,.95) 0 28%, transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,248,238,.9));
  box-shadow: inset 0 0 0 1px rgba(234,220,201,.75);
  overflow:hidden;
}
.chapter-art.mochi-scene::before{
  content:"";
  position:absolute;
  inset:22px;
  border-radius:28px;
  border:2px dashed rgba(230,190,160,.24);
}
.chapter-art.mochi-scene::after{
  content:"";
  position:absolute;
  width:180px;
  height:180px;
  border-radius:999px;
  background:rgba(255,220,205,.45);
  right:-52px;
  top:-52px;
}
.mochi-buddy{
  width:min(88%, 380px);
  max-height:310px;
  padding:0;
  background:transparent !important;
  border:0 !important;
  z-index:3;
}
.signal-object{
  right:18px;
  bottom:18px;
  width:112px;
  height:112px;
  max-height:none;
  object-fit:contain;
  border-radius:26px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(230,210,190,.82);
  padding:12px;
  opacity:1;
  z-index:4;
}
.chapter-card:nth-child(odd) .signal-object{
  right:auto;
  left:18px;
}
.chapter-card:nth-child(4n) .mochi-buddy{
  transform:translate(-50%,-44%) rotate(-2deg);
}
.chapter-card:nth-child(4n+1) .mochi-buddy{
  transform:translate(-50%,-44%) rotate(2deg);
}
.chapter-card:nth-child(4n+2) .mochi-buddy{
  transform:translate(-50%,-44%) scale(1.04);
}
.sparkle.s1{z-index:5}
.sparkle.s2{z-index:5}

/* Make chapter cards slightly more like pages */
.chapter-card{
  background:
    linear-gradient(180deg, rgba(255,253,248,.98), rgba(255,250,242,.98));
}
.chapter-body{
  grid-template-columns:1.18fr .82fr;
}
.chapter-copy h2{
  font-size:46px;
}
.story{
  max-width:720px;
}

/* Story strip images should also use cleaned transparent assets nicely */
.strip-card img{
  background:transparent;
  border:0;
}

@media(max-width:980px){
  .chapter-body{grid-template-columns:1fr}
}


/* v4: cohesive mochi story scenes */
.chapter-art.story-scene{
  position:relative;
  min-height:380px;
  border:1px solid rgba(232,213,190,.95);
  border-radius:34px;
  background:
    radial-gradient(circle at 48% 55%, rgba(255,238,211,.95) 0 27%, transparent 46%),
    linear-gradient(135deg,#fffefa,#fff4e8);
  overflow:hidden;
  display:grid;
  place-items:center;
  padding:24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75);
}
.chapter-art.story-scene::before{
  content:"";
  position:absolute;
  inset:22px;
  border:2px dashed rgba(228,190,160,.28);
  border-radius:28px;
}
.chapter-art.story-scene::after{
  content:"";
  position:absolute;
  right:-72px;
  top:-72px;
  width:220px;
  height:220px;
  border-radius:50%;
  background:rgba(255,221,208,.45);
}
.mochi-main{
  position:relative;
  z-index:3;
  width:min(78%, 360px);
  max-height:300px;
  object-fit:contain;
  filter:drop-shadow(0 18px 20px rgba(80,55,38,.13));
  background:transparent !important;
  border:0 !important;
  padding:0 !important;
}
.scene-image{
  position:relative;
  z-index:3;
  width:100%;
  max-height:460px !important;
  object-fit:contain;
  border-radius:26px;
  background:rgba(255,255,255,.45);
  filter:drop-shadow(0 18px 20px rgba(80,55,38,.13));
}
.scene-01 .scene-image,
.scene-02 .scene-image{
  width:100%;
  max-height:none !important;
  transform:none;
}
.scene-01,
.scene-02{
  padding:12px;
}
.scene-12 .scene-image{
  transform:rotate(-2deg);
}
.scene-caption{
  position:absolute;
  left:24px;
  top:22px;
  z-index:5;
  background:rgba(255,255,255,.85);
  border:1px solid rgba(232,213,190,.9);
  border-radius:999px;
  padding:10px 14px;
  color:#7b6758;
  font-size:13px;
  font-weight:900;
}
.scene-tokens{
  position:absolute;
  inset:0;
  z-index:4;
  pointer-events:none;
}
.scene-token{
  position:absolute;
  display:grid;
  place-items:center;
  width:70px;
  height:70px;
  border-radius:24px;
  background:rgba(255,255,255,.84);
  border:1px solid rgba(232,213,190,.92);
  box-shadow:0 10px 24px rgba(88,62,42,.08);
  font-size:30px;
}
.token-1{right:42px;top:54px;transform:rotate(5deg)}
.token-2{left:42px;bottom:56px;transform:rotate(-5deg)}
.token-3{right:74px;bottom:48px;transform:rotate(3deg)}
.scene-ground{
  position:absolute;
  z-index:1;
  width:62%;
  height:34px;
  bottom:52px;
  border-radius:50%;
  background:rgba(168,132,94,.10);
}
.chapter-card:nth-child(3n+1) .chapter-art.story-scene{
  background:radial-gradient(circle at 48% 55%, rgba(222,239,255,.72) 0 27%, transparent 46%),linear-gradient(135deg,#fffefa,#fff4e8);
}
.chapter-card:nth-child(3n+2) .chapter-art.story-scene{
  background:radial-gradient(circle at 48% 55%, rgba(226,243,211,.8) 0 27%, transparent 46%),linear-gradient(135deg,#fffefa,#fff4e8);
}
.chapter-card:nth-child(3n+3) .chapter-art.story-scene{
  background:radial-gradient(circle at 48% 55%, rgba(255,224,214,.82) 0 27%, transparent 46%),linear-gradient(135deg,#fffefa,#fff4e8);
}
.chapter-card:nth-child(4n) .mochi-main{transform:rotate(-1.5deg)}
.chapter-card:nth-child(4n+1) .mochi-main{transform:rotate(1.5deg)}
.chapter-card:nth-child(4n+2) .mochi-main{transform:translateY(-2px) scale(1.04)}
.chapter-card:nth-child(4n+3) .mochi-main{transform:translateY(4px)}

/* Make the page feel less like repeated data cards */
.chapter-card{
  margin-bottom:24px;
}
.chapter-copy h2{
  letter-spacing:-.055em;
}
.chapter-copy h3{
  max-width:720px;
}

/* Prevent old v3 classes from interfering if any remain */
.mochi-scene .mochi-buddy,
.mochi-scene .signal-object{
  display:none;
}

.deck-next{
  display:none;
}
.deck-prev{
  display:none;
}
.deck-start{
  display:none;
}
.deck-prev[hidden],
.deck-start[hidden],
.deck-next[hidden]{
  display:none !important;
}

@media(max-width:620px){
  .chapter-art.story-scene{min-height:310px}
  .mochi-main{max-height:230px;width:min(86%,300px)}
  .scene-image{max-height:330px !important}
  .scene-token{width:56px;height:56px;font-size:24px;border-radius:18px}
  .scene-caption{font-size:12px;max-width:70%}
}

/* Responsive polish: tablet reads like a booklet, phone reads like stacked cards */
@media(min-width:621px) and (max-width:980px){
  main{
    max-width:760px;
    padding:24px 22px 70px;
  }
  .hero{
    padding:34px;
    border-radius:34px;
  }
  .hero-copy{
    max-width:660px;
  }
  .hero-buttons{
    align-items:center;
  }
  .story-strip{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
  }
  .strip-card{
    min-height:180px;
    padding:24px 20px 20px;
  }
  .map-section{
    padding:34px 2px;
  }
  .chapter-card{
    min-height:calc(100svh - 190px);
    padding:30px;
    scroll-margin-top:170px;
  }
  .chapter-art.story-scene{
    min-height:340px;
  }
  .scene-image{
    max-height:380px !important;
  }
}

@media(max-width:620px){
  body{
    background:#fffaf1;
  }
  .page-shell{
    display:block;
  }
  .sidebar{
    position:sticky;
    top:0;
    z-index:30;
    max-height:none;
    padding:12px 12px 10px;
    background:rgba(255,253,248,.96);
    backdrop-filter:blur(16px);
    box-shadow:0 8px 22px rgba(88,62,42,.08);
  }
  .brand{
    position:relative;
    top:auto;
    margin:0;
    padding:0 2px 10px;
    background:transparent;
  }
  .brand img{
    width:40px;
    height:40px;
    border-radius:12px;
  }
  .brand strong{
    font-size:13px;
  }
  .brand small{
    font-size:11px;
  }
  #search{
    position:relative;
    top:auto;
    margin:0 0 10px;
    padding:11px 12px;
    border-radius:14px;
    box-shadow:none;
  }
  nav{
    display:flex;
    flex-wrap:nowrap;
    justify-content:flex-start;
    gap:8px;
    overflow-x:auto;
    padding:0 2px 4px;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  nav::-webkit-scrollbar{
    display:none;
  }
  nav a{
    flex:0 0 auto;
    min-width:132px;
    max-width:170px;
    border:1px solid rgba(234,220,201,.72);
    background:#fff;
    box-shadow:0 5px 12px rgba(88,62,42,.045);
  }
  nav a span{
    flex:0 0 auto;
  }
  main{
    padding:14px 12px 54px;
  }
  .hero{
    min-height:calc(100svh - 172px);
    padding:24px 20px 28px;
    border-radius:30px;
    gap:18px;
  }
  .hero:before{
    inset:10px;
    border-radius:24px;
  }
  .eyebrow{
    font-size:11px;
  }
  .formula{
    display:flex;
    flex-wrap:nowrap;
    align-items:center;
    gap:5px;
    margin:16px 0;
  }
  .formula span{
    min-width:0;
    padding:8px 9px;
    font-size:11px;
    letter-spacing:-.03em;
  }
  .formula b{font-size:14px}
  .hero-buttons .coming-soon:before{
    top:-11px;
    font-size:10px;
    padding:4px 10px;
  }
  .story-strip{
    gap:12px;
    margin:20px 0 10px;
  }
  .strip-card{
    min-height:150px;
    border-radius:24px;
    padding:18px 18px 18px 76px;
    justify-content:center;
    gap:5px;
  }
  .step-badge{
    top:18px;
    left:18px;
    width:40px;
    height:40px;
  }
  .strip-card img{
    position:absolute;
    right:16px;
    top:18px;
    width:92px;
    height:62px;
    opacity:.95;
  }
  .strip-card b{
    max-width:62%;
    margin-top:8px;
    font-size:15px;
  }
  .strip-card span{
    max-width:68%;
  }
  .map-section{
    padding:28px 2px;
  }
  .map-section h2{
    font-size:28px;
  }
  .map-grid div,
  .mini-panel,
  .inference{
    border-radius:20px;
  }
  .chapter-card{
    min-height:calc(100svh - 172px);
    padding:22px 18px;
    margin-bottom:18px;
    scroll-margin-top:172px;
    display:flex;
    flex-direction:column;
    justify-content:center;
  }
  .chapter-top{
    gap:10px;
    align-items:flex-start;
  }
  .chapter-number{
    font-size:12px;
    padding:8px 11px;
  }
  .chapter-icon{
    font-size:26px;
  }
  .mini-grid{
    gap:10px;
    margin:18px 0;
  }
  .source-pills span{
    font-size:11px;
    padding:7px 9px;
  }
  .chapter-art.story-scene{
    min-height:260px;
    border-radius:24px;
    padding:14px;
  }
  .chapter-art.story-scene::before{
    inset:14px;
    border-radius:20px;
  }
  .mochi-main{
    max-height:210px;
  }
  .scene-image{
    max-height:270px !important;
    border-radius:20px;
  }
  .scene-token{
    width:46px;
    height:46px;
    border-radius:16px;
    font-size:20px;
  }
  .token-1{
    right:18px;
    top:32px;
  }
  .token-2{
    left:18px;
    bottom:38px;
  }
  .token-3{
    right:34px;
    bottom:30px;
  }
  .deck-next{
    right:14px;
    bottom:14px;
    padding:13px 18px;
  }
}

@media(max-width:420px){
  nav a{
    min-width:118px;
    max-width:148px;
  }
  .hero-buttons a,
  .hero-buttons span{
    font-size:14px;
  }
  .floating-card.two{
    max-width:145px;
  }
  .strip-card{
    padding-left:70px;
  }
  .strip-card img{
    width:78px;
  }
  .strip-card b,
  .strip-card span{
    max-width:68%;
  }
}

/* Mobile/tablet deck mode: fixed chapter rail + horizontal comic-style pages */
@media(max-width:980px){
  html,
  body{
    height:100%;
    overflow:hidden;
  }
  body{
    background:#fffaf1;
  }
  .page-shell{
    --deck-header:156px;
    display:block;
    min-height:100svh;
  }
  .sidebar{
    position:fixed;
    inset:0 0 auto;
    z-index:60;
    height:var(--deck-header);
    max-height:none;
    margin:0;
    padding:12px 14px 10px;
    overflow:hidden;
    border:0;
    border-radius:0;
    border-bottom:1px solid var(--line);
    background:rgba(255,253,248,.97);
    backdrop-filter:blur(16px);
    box-shadow:0 10px 26px rgba(88,62,42,.08);
  }
  .brand{
    position:relative;
    top:auto;
    z-index:1;
    margin:0;
    padding:0 2px 10px;
    background:transparent;
  }
  .brand img{
    width:42px;
    height:42px;
    border-radius:13px;
  }
  #search{
    position:relative;
    top:auto;
    z-index:1;
    margin:0 0 10px;
    padding:11px 12px;
    border-radius:14px;
    box-shadow:none;
  }
  nav{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    justify-content:flex-start;
    align-items:center;
    gap:7px;
    width:100%;
    overflow-x:auto !important;
    overflow-y:hidden;
    padding:0 18px 6px 2px;
    mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 22px),transparent 100%);
    -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 22px),transparent 100%);
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  nav::-webkit-scrollbar{
    display:none;
  }
  nav a{
    flex:0 0 auto !important;
    width:auto;
    min-width:auto;
    max-width:none;
    height:46px;
    white-space:nowrap;
    padding:9px 12px;
    border-radius:999px;
    border:1px solid rgba(234,220,201,.72);
    background:#fff;
    box-shadow:0 5px 12px rgba(88,62,42,.045);
    scroll-snap-align:start;
  }
  nav a span{
    flex:0 0 auto;
    width:28px;
    min-width:28px;
    height:28px;
  }
  main{
    position:fixed;
    inset:var(--deck-header) 0 0;
    display:flex;
    gap:14px;
    width:100%;
    max-width:none;
    margin:0;
    padding:14px;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-snap-type:x mandatory;
    scroll-behavior:smooth;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  main::-webkit-scrollbar{
    display:none;
  }
  .chapters{
    display:contents;
  }
  .hero,
  .story-strip,
  .map-section,
  .chapter-card,
  .closing{
    flex:0 0 calc(100vw - 28px);
    width:calc(100vw - 28px);
    max-width:calc(100vw - 28px);
    height:calc(100svh - var(--deck-header) - 28px);
    min-height:0;
    margin:0;
    overflow-y:auto;
    overflow-x:hidden;
    scroll-snap-align:center;
    scroll-snap-stop:always;
    -webkit-overflow-scrolling:touch;
  }
  .story-strip,
  .map-section{
    align-content:center;
    border:1px solid var(--line);
    border-radius:30px;
    background:rgba(255,253,248,.96);
    box-shadow:var(--shadow);
    padding:22px;
  }
  .hero{
    grid-template-columns:1fr;
    gap:18px;
    padding:28px;
  }
  .hero-art{
    order:-1;
  }
  .hero-art{
    min-height:260px;
  }
  .hero-mochi{
    max-height:240px;
  }
  .chapter-body,
  .closing{
    grid-template-columns:1fr;
  }
  .chapter-art{
    order:-1;
  }
  .chapter-card{
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    padding:26px;
    border-radius:30px;
    scroll-margin-top:0;
  }
  .chapter-art.story-scene{
    min-height:280px;
  }
  .deck-next{
    display:block;
    position:fixed;
    right:16px;
    bottom:16px;
    z-index:70;
    border:0;
    border-radius:999px;
    padding:13px 18px;
    background:#2f2925;
    color:#fff;
    font:inherit;
    font-weight:900;
    box-shadow:0 14px 32px rgba(47,41,37,.22);
  }
}

@media(max-width:620px){
  .page-shell{
    --deck-header:116px;
  }
  .brand strong{
    font-size:13px;
  }
  .brand small{
    font-size:11px;
  }
  #search{
    display:none;
  }
  nav a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:46px;
    max-width:46px;
    height:46px;
    font-size:12px;
    padding:8px;
    gap:0;
    overflow:hidden;
    color:transparent;
  }
  nav a span{
    width:28px;
    min-width:28px;
    height:28px;
    font-size:11px;
  }
  nav a.active{
    min-width:max-content;
    max-width:220px;
    gap:8px;
    padding:8px 14px 8px 9px;
    color:#fff;
  }
  main{
    gap:12px;
    padding:12px;
  }
  .hero,
  .story-strip,
  .map-section,
  .chapter-card,
  .closing{
    flex-basis:calc(100vw - 24px);
    width:calc(100vw - 24px);
    max-width:calc(100vw - 24px);
    height:calc(100svh - var(--deck-header) - 24px);
  }
  .hero,
  .chapter-card,
  .closing{
    padding:22px 18px;
  }
  .story-strip,
  .map-section{
    padding:18px;
    border-radius:26px;
  }
  .story-strip{
    grid-template-columns:1fr;
  }
  .chapter-art.story-scene{
    min-height:240px;
  }
  .deck-next{
    right:12px;
    bottom:12px;
    padding:12px 16px;
  }
}

/* Final phone deck stability pass */
@media(max-width:620px){
  .page-shell{
    --deck-header:118px;
  }
  nav a{
    color:var(--ink) !important;
  }
  nav a:not(.active){
    color:transparent !important;
  }
  nav a span{
    display:grid;
    place-items:center;
    background:#f1e4d4;
    color:#6f5a4b !important;
    font-weight:900;
    text-indent:0;
    overflow:visible;
  }
  nav a.active span{
    background:#fff;
    color:#2f2925;
  }
  .hero,
  .chapter-card,
  .closing{
    overflow-y:auto;
    overflow-x:hidden;
  }
  .hero{
    gap:14px;
    display:flex;
    flex-direction:column;
  }
  .hero:before{
    display:none;
  }
  nav a:not(.active) span{
    background:#f1e4d4 !important;
    color:#6f5a4b !important;
  }
  nav a.active span{
    background:#fff !important;
    color:#2f2925 !important;
  }
  .hero-copy,
  .chapter-copy{
    min-width:0;
  }
  h1{
    font-size:clamp(36px, 11vw, 46px);
    line-height:.95;
    letter-spacing:-.06em;
  }
  .lead{
    font-size:15px;
    line-height:1.45;
  }
  .hero-art{
    flex:0 0 auto;
    min-height:180px;
    max-height:190px;
    overflow:hidden;
  }
  .hero-mochi{
    width:min(280px, 88%);
    max-height:180px;
  }
  .floating-card{
    font-size:11px;
    line-height:1.15;
    padding:8px 10px;
    border-radius:12px;
    max-width:165px;
  }
  .floating-card.one{
    left:4px;
    top:18px;
  }
  .floating-card.two{
    right:4px;
    top:78px;
    max-width:140px;
  }
  .floating-card.three{
    left:12px;
    bottom:22px;
  }
  .formula,
  .hero-buttons{
    display:none;
  }
  .chapter-card{
    justify-content:flex-start;
  }
  .chapter-copy h2{
    font-size:30px;
    line-height:1;
  }
  .chapter-copy h3{
    font-size:18px;
  }
  .story{
    font-size:14px;
    line-height:1.5;
  }
  .mini-grid{
    gap:10px;
    margin:14px 0;
  }
  .mini-panel{
    padding:14px;
  }
  .mini-panel ul{
    font-size:13px;
    line-height:1.55;
  }
  .inference{
    padding:14px;
  }
  .chapter-art.story-scene{
    min-height:210px;
    max-height:240px;
    overflow:hidden;
  }
  .chapter-art.story-scene::before{
    display:none;
  }
  .mochi-main{
    max-height:190px;
  }
  .scene-image{
    max-height:220px !important;
  }
}

/* Clean phone reader controls: number rail + prev/next buttons + contained images */
@media(max-width:620px){
  .page-shell{
    --deck-header:118px;
  }
  nav{
    gap:10px;
    padding:0 14px 8px 2px;
    mask-image:none;
    -webkit-mask-image:none;
  }
  nav a,
  nav a.active{
    flex:0 0 48px !important;
    width:48px !important;
    min-width:48px !important;
    max-width:48px !important;
    height:48px !important;
    padding:0 !important;
    gap:0 !important;
    display:grid !important;
    place-items:center !important;
    overflow:hidden;
    border-radius:999px;
    color:transparent !important;
    font-size:0 !important;
  }
  nav a span,
  nav a.active span{
    display:grid;
    place-items:center;
    width:30px;
    min-width:30px;
    height:30px;
    border-radius:999px;
    font-size:11px;
    font-weight:900;
    text-indent:0;
    color:#6f5a4b !important;
    background:#f1e4d4 !important;
  }
  nav a.active{
    background:#2f2925 !important;
    border-color:#2f2925 !important;
  }
  nav a.active span{
    color:#2f2925 !important;
    background:#fff !important;
  }
  .hero-art,
  .chapter-art.story-scene{
    display:grid;
    place-items:center;
    min-height:220px;
    height:220px;
    max-height:220px;
    padding:10px;
    overflow:hidden;
  }
  .hero-mochi,
  .scene-image,
  .mochi-main{
    width:100%;
    max-width:100%;
    height:100%;
    max-height:100% !important;
    object-fit:contain;
  }
  .scene-image{
    background:transparent;
  }
  .deck-prev,
  .deck-start,
  .deck-next{
    display:block;
    position:fixed;
    bottom:12px;
    z-index:70;
    border:0;
    border-radius:999px;
    padding:12px 15px;
    background:#2f2925;
    color:#fff;
    font:inherit;
    font-size:14px;
    font-weight:900;
    box-shadow:0 14px 32px rgba(47,41,37,.22);
  }
  .deck-prev{
    left:12px;
  }
  .deck-start{
    left:50%;
    transform:translateX(-50%);
  }
  .deck-next{
    right:12px;
  }
}

/* Phone deck sanity: scrollable card, small contained hero art */
@media(max-width:620px){
  .hero,
  .story-strip,
  .map-section,
  .chapter-card,
  .closing{
    overflow-y:auto !important;
    overflow-x:hidden !important;
    touch-action:pan-y;
    padding-bottom:22px;
  }
  main{
    touch-action:pan-x pan-y;
  }
  .hero{
    gap:12px;
  }
  .hero-art{
    min-height:145px !important;
    height:145px !important;
    max-height:145px !important;
    padding:0 !important;
  }
  .hero-mochi{
    width:auto !important;
    max-width:92% !important;
    height:135px !important;
    max-height:135px !important;
    object-fit:contain;
  }
  .floating-card{
    display:none !important;
  }
  h1{
    font-size:clamp(34px, 10vw, 42px);
  }
  .formula{
    display:flex !important;
    flex-wrap:nowrap;
    align-items:center;
    gap:4px;
    margin:16px 0 0;
  }
  .formula span{
    padding:7px 8px;
    font-size:10px;
    line-height:1;
    letter-spacing:-.03em;
  }
  .formula b{
    display:inline-block;
    font-size:14px;
    line-height:1;
  }
}

/* Phone deck reset: one clean viewport card, no sideways clipping */
@media(max-width:620px){
  .page-shell{
    --deck-header:120px;
  }
  main{
    left:0 !important;
    right:0 !important;
    width:100vw !important;
    padding:10px !important;
    gap:10px !important;
    scroll-padding-inline:10px;
  }
  .hero,
  .story-strip,
  .map-section,
  .chapter-card,
  .closing{
    flex:0 0 calc(100vw - 20px) !important;
    width:calc(100vw - 20px) !important;
    max-width:calc(100vw - 20px) !important;
    height:calc(100svh - var(--deck-header) - 20px) !important;
    padding:30px 18px 84px !important;
    margin:0 !important;
    border-radius:28px !important;
    scroll-snap-align:start;
    box-sizing:border-box;
  }
  .hero-copy,
  .chapter-copy,
  .lead,
  .story,
  h1,
  h2,
  h3{
    width:100%;
    max-width:100%;
    overflow-wrap:break-word;
  }
  h1{
    font-size:clamp(32px, 9.5vw, 40px) !important;
    line-height:.98 !important;
  }
  .lead{
    font-size:14px !important;
  }
  .formula{
    display:none !important;
  }
  .chapter-top{
    display:none !important;
  }
  .hero-art{
    width:100%;
    min-height:135px !important;
    height:135px !important;
    max-height:135px !important;
  }
  .hero-mochi{
    width:100% !important;
    height:125px !important;
    max-height:125px !important;
    object-fit:contain !important;
  }
}

@media(max-width:620px){
  .pros-cons-grid{
    grid-template-columns:1fr;
    gap:8px;
  }
  .modal-timeline{
    grid-template-columns:1fr;
  }
  .weekly-timeline{
    display:flex;
    overflow-x:auto;
    gap:14px;
    padding-bottom:8px;
  }
  .weekly-timeline::before{
    left:18px;
    right:18px;
  }
  .weekly-timeline a{
    min-width:68px;
  }
  .tool-summary-grid{
    grid-template-columns:1fr 1fr;
  }
  .tool-example-list{
    grid-template-columns:1fr;
  }
  .distribution-list{
    grid-template-columns:1fr;
  }
  .timeline-dialog-inner{
    padding:18px;
  }
  .play-example{
    margin-top:10px;
    padding:12px 13px;
    border-radius:18px;
  }
  .play-example p{
    font-size:13px;
    line-height:1.45;
  }
}

@media(max-width:620px){
  .chapter-top{
    display:none !important;
  }
  .chapter-copy .eyebrow{
    display:none !important;
  }
  .chapter-art.story-scene{
    width:100% !important;
    height:min(76vw, 270px) !important;
    min-height:min(76vw, 270px) !important;
    max-height:min(76vw, 270px) !important;
    aspect-ratio:1.08 / 1 !important;
    padding:18px !important;
    overflow:hidden !important;
  }
  .chapter-art.story-scene .scene-image,
  .chapter-art.story-scene .mochi-main,
  .scene-image,
  .mochi-main{
    width:auto !important;
    height:auto !important;
    max-width:90% !important;
    max-height:90% !important;
    object-fit:contain !important;
    object-position:center !important;
  }
}

@media(max-width:620px){
  .play-grid{
    grid-template-columns:1fr;
    gap:8px;
  }
  .play-grid div{
    padding:11px 12px;
  }
}

/* Phone deck fix: keep both proof and play panels reachable on each card. */
@media(max-width:620px){
  .hero,
  .story-strip,
  .map-section,
  .chapter-card,
  .closing{
    height:calc(100dvh - var(--deck-header) - 20px) !important;
    min-height:0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding-bottom:56px !important;
    scroll-padding-bottom:56px;
  }

  .chapter-card{
    display:block !important;
  }

  .chapter-body{
    display:flex !important;
    flex-direction:column !important;
    gap:12px !important;
    min-height:0 !important;
  }

  .chapter-copy{
    display:flex !important;
    flex-direction:column !important;
    gap:9px !important;
  }

  .chapter-copy h2{
    font-size:30px !important;
    line-height:1.02 !important;
    margin:0 !important;
  }

  .chapter-copy h3{
    font-size:17px !important;
    line-height:1.18 !important;
    margin:0 !important;
  }

  .story{
    font-size:13.5px !important;
    line-height:1.38 !important;
    margin:0 !important;
  }

  .mini-grid{
    margin:8px 0 0 !important;
    gap:8px !important;
  }

  .mini-panel{
    padding:11px 12px !important;
    border-radius:18px !important;
  }

  .mini-panel strong{
    margin-bottom:6px !important;
  }

  .mini-panel ul,
  .source-note{
    font-size:12px !important;
    line-height:1.36 !important;
  }

  .source-pills{
    gap:5px !important;
  }

  .source-pills span{
    padding:6px 8px !important;
    font-size:11px !important;
    line-height:1.1 !important;
  }

  .desktop-flashcards .flashcard-drawers{
    display:flex !important;
    flex-direction:column !important;
    gap:10px !important;
    margin:10px 0 0 !important;
  }

  .desktop-flashcards .flashcard-drawer{
    display:block !important;
  }

  .desktop-flashcards .flashcard-drawer[open] .flashcard-drawer-body{
    display:block !important;
  }

  .desktop-flashcards .flashcard-drawer .inference,
  .desktop-flashcards .flashcard-drawer .play-example{
    display:block !important;
    margin:0 !important;
    padding:13px 14px !important;
    border-radius:18px !important;
  }

  .desktop-flashcards .flashcard-drawer .play-example > span{
    display:block !important;
    font-size:10px !important;
    line-height:1.2 !important;
    margin-bottom:5px !important;
  }

  .desktop-flashcards .flashcard-drawer .inference p,
  .desktop-flashcards .flashcard-drawer .inference li,
  .desktop-flashcards .flashcard-drawer .play-example p,
  .desktop-flashcards .flashcard-drawer .play-example li{
    font-size:13px !important;
    line-height:1.38 !important;
  }

  .chapter-art.story-scene{
    order:2 !important;
    height:140px !important;
    min-height:140px !important;
    max-height:140px !important;
    margin-top:4px !important;
    padding:10px !important;
  }

  .chapter-art.story-scene .scene-caption{
    display:none !important;
  }

  .deck-prev,
  .deck-next{
    bottom:10px !important;
    max-width:42vw;
    padding:12px 14px !important;
  }
}
