:root {
  --bg: #faf9f6; --surface: #ffffff; --surface-2: #f3f1ec; --ink: #1c1917; --muted: #6b655d; --line: #e7e3dc;
  --accent: #0f766e; --accent-soft: #e2f1ee; --danger: #b42318;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.nojs { padding: 24px; }

/* ---------- hero ---------- */
html { scroll-behavior: smooth; }
.hero { position: relative; min-height: 100vh; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(180deg, #fbfaf7 0%, #f4f1ea 100%); }
.hero-bg { position: absolute; inset: 0; background-image: radial-gradient(#d9d3c7 1px, transparent 1.2px); background-size: 26px 26px; opacity: .55; -webkit-mask-image: radial-gradient(ellipse at 70% 45%, #000 0%, transparent 68%); mask-image: radial-gradient(ellipse at 70% 45%, #000 0%, transparent 68%); }
.hero-nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(20px, 5vw, 64px); }
.hero-nav .brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.01em; }
.nav-note { font-size: 13px; color: var(--muted); }
.hero-grid { position: relative; z-index: 1; flex: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 64px); padding: 0 clamp(20px, 5vw, 64px) 6vh; max-width: 1400px; width: 100%; margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(255,255,255,.75); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: #3d3833; box-shadow: 0 1px 2px rgba(28,25,23,.04); }
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { margin: 24px 0 0; font-size: clamp(38px, 5.2vw, 76px); line-height: 1.03; letter-spacing: -.04em; font-weight: 650; color: var(--ink); max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--muted); font-weight: 500; }
.lede { margin: 26px 0 0; max-width: 520px; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.6; color: #55504a; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-size: 15px; font-weight: 600; box-shadow: 0 10px 26px rgba(28, 25, 23, .22); transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(28, 25, 23, .26); }
.btn svg { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(3px); } }
.hint { font-size: 13px; color: var(--muted); }
.facts { display: flex; gap: clamp(20px, 3vw, 44px); margin: 44px 0 0; padding-top: 24px; border-top: 1px solid var(--line); max-width: 520px; }
.facts dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.facts dd { margin: 5px 0 0; font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* a scroll cue that is hard to miss on landing */
.scroll-cue { position: absolute; left: 50%; bottom: 22px; z-index: 5; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 22px 8px; border-radius: 999px; background: rgba(255,255,255,.88); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(28,25,23,.14); color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; backdrop-filter: blur(8px); transition: opacity .35s, transform .35s; animation: cuepulse 2.4s ease-in-out infinite; }
.scroll-cue::before { content: ""; position: absolute; inset: -6px; border-radius: 999px; border: 2px solid var(--accent); opacity: 0; animation: cuering 2.4s ease-out infinite; }
.scroll-cue .mouse { position: relative; width: 20px; height: 32px; border: 2px solid var(--ink); border-radius: 12px; }
.scroll-cue .mouse i { position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: wheel 1.6s ease-in-out infinite; }
.scroll-cue svg { color: var(--accent); animation: chev 1.6s ease-in-out infinite; }
.scroll-cue.gone { opacity: 0; transform: translate(-50%, 14px); pointer-events: none; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(11px); opacity: 0; } 100% { opacity: 0; } }
@keyframes chev { 0%, 100% { transform: translateY(-2px); opacity: .5; } 50% { transform: translateY(3px); opacity: 1; } }
@keyframes cuepulse { 0%, 100% { box-shadow: 0 10px 30px rgba(28,25,23,.14); } 50% { box-shadow: 0 14px 38px rgba(15,118,110,.28); } }
@keyframes cuering { 0% { opacity: .55; transform: scale(.96); } 100% { opacity: 0; transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue, .scroll-cue::before, .scroll-cue .mouse i, .scroll-cue svg { animation: none; } }

/* the fan of screens */
.hero-art { position: relative; height: min(66vh, 640px); min-height: 420px; }
.glow { position: absolute; left: 50%; top: 52%; width: 78%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(15,118,110,.22), rgba(37,99,235,.10) 45%, transparent 70%); filter: blur(10px); }
.hp { --r: 0deg; --x: 0px; --y: 0px; position: absolute; top: 50%; left: 50%; margin: 0; width: min(44%, 270px); aspect-ratio: 590 / 1280; border-radius: 28px; overflow: hidden; background: #fff; border: 1.5px solid #d4cec3; box-shadow: 0 30px 60px -18px rgba(28,25,23,.35), 0 8px 18px rgba(28,25,23,.08); transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r)); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.hp img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.hp-l { --x: -46%; --y: 4%; --r: -9deg; z-index: 1; }
.hp-r { --x: 46%; --y: 6%; --r: 9deg; z-index: 1; }
.hp-c { --y: -3%; z-index: 2; width: min(48%, 300px); }
.hero-art:hover .hp-l { --x: -54%; --r: -12deg; }
.hero-art:hover .hp-r { --x: 54%; --r: 12deg; }
.float { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: rgba(255,255,255,.92); border: 1px solid var(--line); box-shadow: 0 12px 28px rgba(28,25,23,.14); font-size: 12.5px; font-weight: 600; backdrop-filter: blur(8px); animation: bob 5.5s ease-in-out infinite; }
.float img { width: 24px; height: 24px; }
.f1 { left: 2%; top: 14%; } .f2 { right: 0; top: 30%; animation-delay: -1.8s; } .f3 { left: 8%; bottom: 10%; animation-delay: -3.4s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 8px; padding-bottom: 4vh; }
  .hero-art { height: 40vh; min-height: 260px; order: -1; margin-top: 4px; }
  .scroll-cue { bottom: 14px; padding: 9px 16px 6px; }
  .scroll-cue .mouse { height: 26px; }
  .hp { width: min(34%, 150px); border-radius: 18px; } .hp-c { width: min(38%, 170px); }
  .float { display: none; }
  .hero h1 { max-width: none; }
}

/* ---------- the pinned, full-screen stage ---------- */
#scroller { height: calc(var(--segs, 21) * 55vh + 100vh); position: relative; }
.stage { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }

.bar { flex: none; display: flex; align-items: center; flex-wrap: nowrap; gap: 4px 18px; padding: 8px clamp(14px, 2.4vw, 32px); min-height: 56px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.01em; }
.logo { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: #fff; }
.where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--muted); }
.where b { color: var(--ink); }
.rail { display: flex; gap: 6px; margin-left: auto; flex: none; }
.pill { padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; transition: background .3s, color .3s; }
.pill.on { background: var(--ink); color: #fff; }
.pill.done { background: var(--accent-soft); color: var(--accent); }
.metrics { margin: 0; display: flex; gap: 18px; flex: none; }
.metrics div { text-align: right; line-height: 1.15; }
.metrics dt { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.metrics dd { margin: 2px 0 0; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }

.arena { position: relative; flex: 1; min-height: 0; }

/* the screens: a deck. i on the left, i+1 on the right, the rest waiting behind it */
.scr { position: absolute; left: 0; top: 0; overflow: hidden; border-radius: 26px; background: #fff; border: 1.5px solid #cfc9bf; box-shadow: 0 14px 40px rgba(28, 25, 23, .16); will-change: transform, opacity; }
.scr img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.scr .cap { position: absolute; left: 12px; top: 12px; z-index: 3; padding: 4px 10px; border-radius: 999px; background: rgba(28, 25, 23, .82); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(6px); }
.scr::after { content: ""; position: absolute; inset: 0; background: #1c1917; opacity: var(--shade, 0); pointer-events: none; transition: opacity .2s; }

/* the system design panel in the middle */
.panel { position: absolute; border: 2px dashed #b9b2a6; border-radius: 28px; background: rgba(255, 255, 255, .6); padding: clamp(14px, 1.8vw, 26px); overflow: hidden; display: flex; flex-direction: column; }
.panel .tag { position: absolute; right: 18px; top: 14px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.panel .inner { flex: 1; min-height: 0; overflow: hidden; transition: opacity .15s linear; }
.fit { --s: 1; width: calc(100% / var(--s)); height: calc(100% / var(--s)); transform: scale(var(--s)); transform-origin: top left; display: flex; flex-direction: column; gap: 10px; }

/* dotted links from each screen to the panel, with dots that move faster and thicker as scale grows */
.conn { position: absolute; height: 0; border-top: 2px dotted #a39b8e; overflow: visible; }
.conn i { position: absolute; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: 0; box-shadow: 0 0 8px rgba(15, 118, 110, .6); animation: flowdot var(--dur, 2.4s) linear infinite; animation-delay: var(--d, 0s); }
.arena[data-act="1"] .conn i:nth-child(-n+1) { opacity: 1; }
.arena[data-act="2"] .conn i:nth-child(-n+3) { opacity: 1; }
.arena[data-act="3"] .conn i { opacity: 1; }
.arena[data-act="1"] { --dur: 3s; } .arena[data-act="2"] { --dur: 1.8s; } .arena[data-act="3"] { --dur: 1.1s; }
.arena[data-act="3"] .conn { border-top: 3px solid var(--accent); }
@keyframes flowdot { from { left: -8px; } to { left: 100%; } }

/* ---------- inside the panel ---------- */
.eng-top { padding-right: 112px; }
.kick { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.panel h2 { margin: 4px 0 0; font-size: clamp(21px, 2.2vw, 32px); letter-spacing: -.025em; line-height: 1.1; }
.tap { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.scale .pill { font-size: 11.5px; padding: 4px 10px; }
.story { margin: 0; font-size: clamp(13px, 1.1vw, 15px); line-height: 1.5; color: #3d3833; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.chip { padding: 6px 11px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; line-height: 1.25; }
.chip b { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.chip span { font-weight: 700; font-variant-numeric: tabular-nums; }

.diagram { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: stretch; flex-wrap: wrap; row-gap: 8px; }
.row.side { padding-top: 8px; border-top: 1px dashed var(--line); }
.row .label { flex-basis: 100%; margin-bottom: 2px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.slot { --w: clamp(128px, 11vw, 168px); width: calc((var(--w) + 6px) * var(--k, 1)); opacity: var(--o, 1); overflow: hidden; flex: none; display: flex; align-items: stretch; }
.node { width: var(--w); flex: none; display: flex; gap: 9px; align-items: flex-start; padding: 8px 9px; margin-right: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(28, 25, 23, .04); }
.node.new { border-color: var(--accent); background: linear-gradient(180deg, #fff, var(--accent-soft)); }
.node .ic { flex: none; width: 28px; height: 28px; display: grid; place-items: center; }
.node .ic img { width: 28px; height: 28px; display: block; }
.node .ic svg { width: 28px; height: 28px; padding: 5px; border-radius: 8px; background: #78716c; color: #fff; }
.node .n { font-size: 12px; font-weight: 700; line-height: 1.2; }
.node .d { margin-top: 2px; font-size: 10.5px; line-height: 1.3; color: var(--muted); }
.link { flex: none; align-self: center; width: calc(18px * var(--k, 1)); opacity: var(--o, 1); overflow: hidden; color: var(--muted); font-size: 14px; text-align: center; margin-right: 6px; }

.recap { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.recap .card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.recap .card b { display: block; font-size: 12.5px; }
.recap .card .big { margin-top: 4px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.recap .card small { color: var(--muted); font-size: 11px; }
.bigstats { display: flex; gap: 8px; flex-wrap: wrap; }
.bigstats .chip { padding: 8px 14px; }
.bigstats .chip span { font-size: 21px; letter-spacing: -.02em; }

.big3 { container-type: inline-size; display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 14px; padding: 16px 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bs .v { display: block; font-size: clamp(17px, 5.4cqw, 42px); font-weight: 650; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bs .v i { font-style: normal; font-weight: 400; color: var(--accent); margin: 0 .22em; }
.bs .l { display: block; margin-top: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rows .no { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
.rows .mid b { display: block; font-size: 13.5px; font-weight: 600; }
.dots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; }
.dots i.a { background: var(--accent); }
.dots i.b { background: #9fd1cb; }
.rows .end { text-align: right; line-height: 1.3; }
.rows .pt { display: block; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rows .c { display: block; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.foot { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.outro { max-width: 760px; margin: 0 auto; padding: 14vh 24px 18vh; }
.outro h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.03em; margin: 0 0 18px; }
.outro p { font-size: 18px; line-height: 1.6; color: #3d3833; }
.outro .fine { font-size: 13px; color: var(--muted); margin-top: 36px; }

/* ---------- drawn stand-in screens (designed at 295 x 640) ---------- */
.mock { position: absolute; left: 0; top: 0; width: 295px; height: 640px; transform-origin: top left; background: #f4f6f4; font-size: 13px; color: #1c1917; overflow: hidden; }
.m-top { display: flex; align-items: center; justify-content: space-between; padding: 40px 16px 10px; background: #fff; font-size: 15px; }
.m-top .b { color: #6b655d; font-size: 20px; }
.m-map { position: relative; height: 210px; background: #e9efe9; overflow: hidden; }
.m-map::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(#d4ddd4 1px, transparent 1px), linear-gradient(90deg, #d4ddd4 1px, transparent 1px); background-size: 26px 26px; }
.m-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-card { margin: 10px 12px 0; padding: 12px; background: #fff; border-radius: 14px; }
.m-eta b { display: block; font-size: 18px; }
.m-eta span { color: #6b655d; font-size: 12px; }
.m-prog { margin-top: 10px; height: 6px; border-radius: 4px; background: #e4e8e4; overflow: hidden; }
.m-prog i { display: block; width: 62%; height: 100%; background: #0f766e; border-radius: 4px; }
.m-row { display: flex; justify-content: space-between; gap: 10px; }
.m-row small { color: #6b655d; }
.m-center { text-align: center; padding: 8px 0 4px; }
.m-check { width: 78px; height: 78px; margin: 26px auto 8px; border-radius: 50%; background: #0f766e; color: #fff; display: grid; place-items: center; font-size: 40px; box-shadow: 0 0 0 10px #d6ece8; }
.m-stars { display: flex; justify-content: center; gap: 6px; font-size: 26px; color: #d3cdc3; margin: 8px 0; }
.m-btn { display: block; margin: 12px; padding: 12px; text-align: center; border-radius: 14px; background: #f43f5e; color: #fff; font-weight: 700; }

/* ---------- smaller screens: screens on top, design underneath ---------- */
@media (max-width: 860px) {
  .bar { flex-wrap: wrap; gap: 2px 10px; padding-block: 6px; min-height: 0; }
  .where { order: 3; width: 100%; font-size: 12px; }
  .rail { margin-left: auto; }
  .pill { font-size: 11px; padding: 3px 8px; }
  .metrics div:not(:first-child) { display: none; }
  .scr { border-radius: 16px; }
  .scr .cap { font-size: 10px; left: 6px; top: 6px; padding: 2px 7px; }
  .panel { border-radius: 18px; padding: 10px; }
  .panel .tag { display: none; }
  .eng-top { padding-right: 0; }
  .panel h2 { font-size: 18px; }
  .say .tap { font-size: 12px; padding: 5px 10px; }
  .story { font-size: 12.5px; line-height: 1.4; }
  .row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .slot { --w: 112px; }
  .node .d { font-size: 9.5px; }
  .node .n { font-size: 11.5px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; }
  .chip { flex: none; padding: 4px 9px; }
  .big3 { gap: 8px; } .bs .l { font-size: 9px; }
}
@media (max-height: 780px) and (min-width: 861px) {
  .story { font-size: 12.5px; line-height: 1.4; }
  .node { padding: 6px 8px; }
  .node .d { font-size: 10px; }
  .say .tap { font-size: 12px; padding: 5px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .cue i, .conn i { animation: none; }
}

.q-hint { align-self: flex-start; padding: 8px 14px; border-radius: 999px; border: 1.5px dashed #d9b45a; background: #fffaf0; color: #8a6200; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.q-hint:hover { background: #fff3d6; }
.q-hintbox { padding: 12px 14px; border-radius: 14px; background: #fff7e0; border: 1px solid #efd58a; font-size: 13.5px; line-height: 1.5; color: #5c4400; animation: qin .3s ease both; }
.q-hintbox b { display: block; margin-bottom: 2px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8a6200; }

/* ---------- notes: one sheet ---------- */
.sheet { position: absolute; inset: 0; z-index: 300; background: var(--bg); overflow-y: auto; padding: 0 clamp(14px, 2.6vw, 36px) 40px; animation: qin .35s ease both; }
.sheet[hidden] { display: none; }
.sh-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0 14px; background: linear-gradient(var(--bg) 82%, transparent); }
.sh-title { margin: 4px 0 0; font-size: clamp(22px, 2.8vw, 36px); letter-spacing: -.03em; line-height: 1.1; }
.sh-sum { margin: 6px 0 18px; padding: 16px 18px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.sh-sum h3 { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sh-sum .cheat { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.sh-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.nc.full { padding: 16px 18px 14px; gap: 10px; }
.nc.full.missed { border-color: #e7b4a8; background: #fffaf8; }
.nc.full .nc-take { font-size: 19px; }
.pts { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; }
.pts li + li { margin-top: 5px; }
.nc .src { margin: 0; font-size: 11.5px; color: var(--muted); }
.nc .src a { color: var(--accent); text-underline-offset: 2px; }

/* ---------- notes: card parts ---------- */
.nc { padding: 16px 18px; border: 1px solid var(--line); border-radius: 20px; background: #fff; display: flex; flex-direction: column; gap: 12px; }
.nc-top { display: flex; align-items: center; gap: 12px; }
.nc-top h3 { margin: 0; flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.nc-top .tag { flex: none; position: static; padding: 3px 9px; border-radius: 999px; background: #fde4de; color: #b3402a; font-size: 10.5px; font-weight: 700; }
.nc-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; }
.nc-ic .ic { width: 26px; height: 26px; display: grid; place-items: center; }
.nc-ic img { width: 26px; height: 26px; display: block; }
.nc-ic svg { width: 26px; height: 26px; padding: 4px; border-radius: 7px; background: #78716c; color: #fff; }
.nc-ic.sm { width: 32px; height: 32px; border-radius: 10px; }
.nc-ic.sm .ic, .nc-ic.sm img, .nc-ic.sm svg { width: 20px; height: 20px; }
.nc-take { margin: 0; font-size: clamp(21px, 2.3vw, 30px); font-weight: 650; letter-spacing: -.03em; line-height: 1.15; }
.ba { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.ba span { padding: 7px 12px; border-radius: 999px; }
.ba .b { background: var(--surface-2); color: var(--muted); text-decoration: line-through; text-decoration-color: #c9c3b9; }
.ba .a { background: var(--accent-soft); color: var(--accent); }
.ba i { font-style: normal; color: var(--accent); }
.remember { margin: 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: linear-gradient(90deg, var(--accent-soft), transparent); border-radius: 4px 12px 12px 4px; font-size: 14px; line-height: 1.5; }
.remember small { display: block; margin-bottom: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.seen { margin: 0; font-size: 12.5px; color: var(--muted); }
.seen b { color: var(--ink); }
.deeper { border-top: 1px dashed var(--line); padding-top: 10px; font-size: 13.5px; }
.deeper summary { cursor: pointer; font-weight: 600; color: var(--accent); list-style: none; }
.deeper summary::before { content: "+ "; }
.deeper[open] summary::before { content: "- "; }
.deeper ul { margin: 10px 0 0; padding-left: 18px; line-height: 1.55; }
.deeper li + li { margin-top: 5px; }
.deeper .src { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.deeper .src a { color: var(--accent); text-underline-offset: 2px; }
.cheat { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cheat li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.cheat li.missed { border-color: #e7b4a8; background: #fff8f6; }
.cheat b { display: block; font-size: 14px; line-height: 1.3; }
.cheat small { color: var(--muted); font-size: 12px; }

/* ---------- quiz, inside the system design panel ---------- */
.panel.qmode { background: rgba(255,255,255,.82); border-style: solid; border-color: var(--accent); }
.panel.qmode .inner { overflow-y: auto; padding-right: 4px; }
.panel.qmode .tag { color: var(--accent); }
.qwrap { display: flex; flex-direction: column; gap: 14px; min-height: 100%; animation: qin .35s ease both; }
@keyframes qin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.q-kicker { padding-right: 110px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.q-title { margin: 0; font-size: clamp(22px, 2.4vw, 32px); letter-spacing: -.03em; line-height: 1.12; }
.q-sub { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.q-text { margin: 0; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.4; font-weight: 600; letter-spacing: -.01em; }
.q-opts { display: grid; gap: 9px; }
.q-opt { text-align: left; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: clamp(13.5px, 1.05vw, 15px); line-height: 1.4; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.q-opt:hover:not([disabled]) { border-color: #b9b2a6; transform: translateY(-1px); }
.q-opt[disabled] { cursor: default; }
.q-opt.ok { border-color: var(--accent); background: var(--accent-soft); }
.q-opt.no { border-color: #d9534f; background: #fdecea; }
.q-opt.dim { opacity: .5; }
.q-fb { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 13.5px; line-height: 1.5; }
.q-fb b { display: block; margin-bottom: 2px; }
.q-fb.ok b { color: var(--accent); } .q-fb.no b { color: #b42318; }
.q-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.q-btn { padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.q-btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.q-btn:hover { transform: translateY(-1px); }
.q-note { padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--accent); background: linear-gradient(180deg, #fff, var(--accent-soft)); }
.q-note h3 { margin: 0 0 8px; font-size: 15.5px; }
.q-note ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; }
.q-note li + li { margin-top: 6px; }
.q-score { margin: 0; font-size: clamp(52px, 7vw, 76px); font-weight: 650; letter-spacing: -.05em; line-height: 1; }
.q-score span { color: var(--muted); font-weight: 400; font-size: .5em; letter-spacing: -.02em; }
.q-list { list-style: none; margin: 0; padding: 0; }
.q-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.q-list .mk { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; }
.q-list .first .mk { background: var(--accent); } .q-list .recovered .mk { background: #d99a2b; } .q-list .noted .mk { background: #c8553d; }
.q-list small { margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; }
.notes-wrap { display: grid; gap: 12px; }
.nt { padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.nt.missed { border-color: #e7b4a8; background: #fff8f6; }
.nt h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nt .tag { padding: 2px 8px; border-radius: 999px; background: #fde4de; color: #b3402a; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.nt ul { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; }
.nt li + li { margin-top: 5px; }
.nt .src { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.nt .src a { color: var(--accent); text-underline-offset: 2px; }
.q-dots { display: flex; gap: 5px; }
.q-dots i { width: 20px; height: 6px; border-radius: 3px; background: var(--line); }
.q-dots i.cur { background: var(--ink); } .q-dots i.first { background: var(--accent); } .q-dots i.recovered { background: #d99a2b; } .q-dots i.noted { background: #c8553d; }
@media (max-width: 860px) { .q-kicker { padding-right: 0; } .q-text { font-size: 15.5px; } .q-opt { padding: 10px 12px; font-size: 13.5px; } }

/* ---------- the two characters ---------- */
.chr { display: block; width: 100%; height: 100%; border-radius: 50%; }
.blink { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.say { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.say .chr { flex: none; width: 38px; height: 38px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.say .tap { position: relative; margin: 0; padding: 7px 12px; border-radius: 4px 14px 14px 14px; background: var(--surface); border: 1px solid var(--line); color: #3d3833; font-size: 13px; line-height: 1.35; }
.where .av { display: inline-block; vertical-align: middle; width: 24px; height: 24px; margin-right: 8px; }
.where .av .chr { width: 24px; height: 24px; }
.where .av.user .chr { animation: pop .5s ease; }
@keyframes pop { from { transform: scale(.6); } to { transform: scale(1); } }

.fit.hand .scene { display: block; width: 100%; height: auto; max-height: 34%; border-radius: 14px; background: #faf9f6; border: 1px solid var(--line); }
.scene .ride { animation: ride 7s ease-in-out infinite; }
.scene .bob { animation: bob .5s ease-in-out infinite alternate; }
.scene .ding { animation: ding 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ride { 0% { transform: translate(150px, 0); } 65%, 100% { transform: translate(300px, 0); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-2px); } }
@keyframes ding { 0%, 55% { opacity: .5; transform: scale(.94); } 70%, 100% { opacity: 1; transform: scale(1.08); } }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duo .who { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.duo .chr { flex: none; width: 46px; height: 46px; }
.duo b { display: block; font-size: 14px; }
.duo span { font-size: 12px; line-height: 1.3; color: var(--muted); }

/* the rider's app has its own look: warm, with a yellow helmet */
.scr.rider { border-color: #e7d3a3; }
.scr.rider .cap { background: rgba(180, 83, 9, .9); }
.mock.r { background: #fffaf0; }
.r-top { display: flex; align-items: center; justify-content: space-between; padding: 40px 16px 10px; background: #fff; border-bottom: 1px solid #f1e6cc; font-size: 15px; }
.r-top em { font-style: normal; font-size: 12px; font-weight: 700; color: #b45309; }
.r-top em.on { color: #2f7d4f; }
.r-steps { display: flex; justify-content: space-between; padding: 12px 14px 4px; background: #fff; }
.r-steps span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; color: #a39b8f; flex: 1; position: relative; }
.r-steps span:not(:last-child)::after { content: ""; position: absolute; top: 10px; left: 56%; width: 88%; height: 2px; background: #e6e0d4; }
.r-steps i { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #ece7dd; color: #8a8378; font-style: normal; font-size: 11px; }
.r-steps .on { color: #2f7d4f; } .r-steps .on i { background: #2f7d4f; color: #fff; } .r-steps .on::after { background: #2f7d4f; }
.r-steps .cur { color: #b45309; } .r-steps .cur i { background: #f59e0b; color: #fff; box-shadow: 0 0 0 4px #fde9b8; }
.r-offer { display: flex; align-items: center; justify-content: space-between; margin: 10px 12px 0; padding: 12px; border-radius: 14px; background: #fef3c7; }
.r-big small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #b45309; }
.r-big b { display: block; font-size: 30px; line-height: 1.1; }
.r-big span { font-size: 12px; color: #6b655d; }
.r-ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: conic-gradient(#b45309 0 62%, #f6e3b2 0); position: relative; }
.r-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fef3c7; }
.r-ring b, .r-ring small { position: relative; line-height: 1; } .r-ring b { font-size: 18px; } .r-ring small { font-size: 9px; color: #6b655d; }
.r-stop { display: flex; gap: 10px; padding: 6px 0; }
.r-stop .pin { flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 4px; background: #1c1917; }
.r-stop .pin.drop { border-radius: 50%; background: #f43f5e; }
.r-stop small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a8378; }
.r-stop b { display: block; font-size: 13.5px; } .r-stop span { display: block; font-size: 12px; color: #6b655d; }
.r-items { display: flex; gap: 6px; margin-top: 6px; } .r-items span { padding: 3px 9px; border-radius: 999px; background: #f3efe6; font-size: 11px; font-weight: 600; color: #57534e; }
.r-call { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 9px 10px; border-radius: 12px; background: #ecfdf5; }
.r-call small { display: block; font-size: 10px; font-weight: 700; color: #2f7d4f; text-transform: uppercase; letter-spacing: .06em; }
.r-call b { display: block; font-size: 15px; } .r-call span { font-size: 10.5px; color: #6b655d; line-height: 1.25; display: block; }
.r-call i { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #2f7d4f; font-style: normal; font-size: 15px; }
.r-two { display: flex; gap: 8px; margin: 12px; } .r-two .r-btn { flex: 1; margin: 0; }
.r-btn { display: block; padding: 13px; border-radius: 14px; text-align: center; font-weight: 800; font-size: 15px; background: #f59e0b; color: #1c1917; }
.r-btn.ghost { background: #fff; border: 1.5px solid #e6e0d4; color: #57534e; font-weight: 700; }
.r-btn.wide { margin: 14px 12px 0; } .r-btn.dark { background: #1c1917; color: #fff; }
.r-code small { display: block; font-size: 12px; color: #6b655d; } .r-code div { display: flex; gap: 8px; margin-top: 8px; }
.r-code i { width: 40px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1.5px solid #e6d9b8; font-style: normal; font-size: 22px; font-weight: 800; }
.r-chk { background: #2f7d4f; box-shadow: 0 0 0 10px #d9efdf; width: 64px; height: 64px; font-size: 32px; margin-top: 18px; }
.r-earn { display: block; font-size: 34px; color: #2f7d4f; }
.r-lock { display: flex; gap: 10px; background: #f5f2ea; } .r-lock i { font-style: normal; font-size: 20px; } .r-lock b { display: block; font-size: 13.5px; } .r-lock span { font-size: 12px; color: #6b655d; line-height: 1.3; display: block; }
.r-hello { padding: 12px 16px 0; } .r-hello small { color: #8a8378; font-size: 12px; } .r-hello b { display: block; font-size: 24px; }
.r-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 12px 0; }
.r-stats div { padding: 10px; border-radius: 14px; background: #fff; border: 1px solid #f1e6cc; }
.r-stats b { display: block; font-size: 20px; } .r-stats small { font-size: 11px; color: #8a8378; }
.r-q { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f1ecdf; }
.r-q b { display: block; font-size: 12.5px; } .r-q small { color: #8a8378; font-size: 11px; }
.r-q span { padding: 5px 12px; border-radius: 999px; background: #f59e0b; font-weight: 800; font-size: 12px; }

@media (max-width: 860px) {
  .say .chr { width: 28px; height: 28px; }
  .duo { grid-template-columns: 1fr; }
  .fit.hand .scene { max-height: 90px; }
}

.mock.r .m-map { height: 112px; }

/* ---------- from the hand-drawn notes: greeting, a character that stays with the screen, quiz and thank-you cards ---------- */
.arena > .scr, .arena > .panel, .arena > .conn, .arena > .pal { transition: opacity .45s ease, visibility .45s; }
.arena[data-mode="greet"] > .scr, .arena[data-mode="greet"] > .panel, .arena[data-mode="greet"] > .conn, .arena[data-mode="greet"] > .pal,
.arena[data-mode="thanks"] > .scr, .arena[data-mode="thanks"] > .panel, .arena[data-mode="thanks"] > .conn, .arena[data-mode="thanks"] > .pal { opacity: 0 !important; visibility: hidden; }
.arena[data-mode="quiz"] > .scr, .arena[data-mode="quiz"] > .conn, .arena[data-mode="quiz"] > .pal { opacity: 0 !important; visibility: hidden; }
.arena[data-mode="quiz"] > .panel { left: clamp(14px, 3vw, 44px) !important; top: 14px !important; width: calc(100% - 2 * clamp(14px, 3vw, 44px)) !important; height: calc(100% - 28px) !important; }
.panel { transition: left .45s ease, top .45s ease, width .45s ease, height .45s ease, opacity .45s ease; }

.pal { position: absolute; z-index: 150; border-radius: 50%; cursor: default; filter: drop-shadow(0 6px 10px rgba(28, 25, 23, .25)); transition: opacity .25s ease, transform .25s ease; }
.pal:hover { opacity: 0 !important; transform: scale(.85); }
.pal.pop { animation: palpop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes palpop { from { transform: scale(.3); } to { transform: scale(1); } }
.pal .chr { box-shadow: 0 0 0 3px #fff; }

.stagecard { position: absolute; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; gap: clamp(18px, 4vw, 56px); padding: 20px clamp(18px, 6vw, 90px); opacity: 0; pointer-events: none; }
.g-art { position: relative; flex: none; width: clamp(130px, 22vw, 250px); aspect-ratio: 1; }
.g-art .chr { box-shadow: 0 0 0 6px #fff, 0 20px 50px rgba(225, 29, 72, .18); animation: float 3.6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.g-bubble { position: absolute; left: 62%; top: -14px; z-index: 2; padding: 8px 14px; border-radius: 16px 16px 16px 4px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; animation: bubble .7s .3s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes bubble { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.g-copy { max-width: 520px; }
.g-copy h2 { margin: 6px 0 10px; font-size: clamp(24px, 3.2vw, 42px); letter-spacing: -.03em; line-height: 1.08; }
.g-copy p { margin: 0 0 10px; font-size: clamp(14px, 1.3vw, 17px); line-height: 1.5; color: #3d3833; }
.g-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.g-chips span { padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 700; }
.g-meet { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 14px !important; color: var(--muted) !important; }
.g-meet .mini { display: inline-block; width: 26px; height: 26px; } .g-meet b { color: var(--ink); }
.t-art { display: flex; flex: none; } .t-art span { width: clamp(70px, 10vw, 120px); aspect-ratio: 1; margin-left: -18px; filter: drop-shadow(0 6px 10px rgba(28, 25, 23, .2)); animation: float 3.4s ease-in-out infinite; }
.t-art span:first-child { margin-left: 0; } .t-art span:nth-child(2) { animation-delay: .4s; } .t-art span:nth-child(3) { animation-delay: .8s; }
.t-art .chr { box-shadow: 0 0 0 4px #fff; }
.t-art { flex-direction: row; }
.learned { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 8px; }
.learned li { position: relative; padding-left: 26px; font-size: clamp(13px, 1.2vw, 15.5px); line-height: 1.4; color: #3d3833; }
.learned li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center; }
.t-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.t-actions .btn { cursor: pointer; font: inherit; font-weight: 700; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }

.qlay { display: grid; grid-template-columns: clamp(110px, 20%, 220px) 1fr; gap: clamp(14px, 3vw, 40px); height: 100%; min-height: 0; align-items: start; }
.qchar { position: sticky; top: 0; align-self: center; aspect-ratio: 1; }
.qchar .chr { box-shadow: 0 0 0 5px #fff, 0 16px 40px rgba(225, 29, 72, .16); animation: float 3.6s ease-in-out infinite; }
.qmain { min-width: 0; min-height: 0; height: 100%; overflow-y: auto; padding-right: 4px; }
.panel.qmode .inner { overflow: hidden; padding-right: 0; }

/* the three scene cards that take the place of a screen */
.scr.scene { border-color: #cfe3dc; }
.scr.scene .cap { background: rgba(77, 154, 106, .92); }
.mock.sc { background: #f7f9f6; }
.sc-top { padding: 40px 18px 8px; background: #fff; } .sc-top small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #4d9a6a; } .sc-top b { font-size: 19px; letter-spacing: -.01em; }
.mock.sc .art { display: block; width: 100%; height: auto; }
.sc-pill { padding: 3px 9px; border-radius: 999px; background: #fef3c7; color: #b45309; font-size: 11px; font-weight: 700; } .sc-pill.ok { background: #d9efdf; color: #2f7d4f; }
.sc-note b { display: block; font-size: 13px; } .sc-note span { font-size: 12px; color: #6b655d; line-height: 1.3; display: block; margin-top: 2px; }
.sc-btn { display: block; margin: 12px; padding: 13px; border-radius: 14px; background: #4d9a6a; color: #fff; text-align: center; font-weight: 800; font-size: 15px; } .sc-btn.dark { background: #1c1917; }
.art .wave { transform-box: fill-box; transform-origin: center; animation: wave 1.8s ease-out infinite; opacity: 0; } .art .wave.w2 { animation-delay: .9s; }
@keyframes wave { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.art .shake { transform-box: fill-box; transform-origin: center; animation: shake .5s ease-in-out infinite; }
@keyframes shake { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.art .lamp { animation: lamp .6s steps(2) infinite; } @keyframes lamp { 50% { fill: #fda4af; } }
.art .hop { animation: hop 1s ease-in-out infinite; } @keyframes hop { 50% { transform: translate(216px, 190px) scale(.5); } }
.art .bat { animation: batmove 3s ease-in-out infinite; } @keyframes batmove { 0% { transform: translate(64px, 100px); } 50% { transform: translate(120px, 80px) rotate(20deg); } 100% { transform: translate(206px, 170px) rotate(0deg); opacity: 0; } }
.art .ticks { opacity: 0; animation: tickin 3s ease-in-out infinite; } @keyframes tickin { 0%, 60% { opacity: 0; } 85%, 100% { opacity: 1; } }

@media (max-width: 860px) {
  .stagecard { flex-direction: column; justify-content: flex-start; padding-top: 18px; overflow-y: auto; text-align: left; align-items: stretch; }
  .g-art { width: 96px; align-self: center; }
  .qlay { grid-template-columns: 1fr; } .qchar { width: 64px; position: static; display: none; }
  .t-art span { width: 64px; }
}
.g-meet { display: block !important; line-height: 1.9 !important; }
.g-meet .mini { width: 24px; height: 24px; vertical-align: middle; margin: 0 3px 0 2px; }

/* the new Riya: full figure on the big cards, flush with the screen corner as a companion */
.g-art .chr, .qchar .chr { border-radius: 0; box-shadow: none; filter: drop-shadow(0 14px 18px rgba(28, 25, 23, .18)); }
.g-art { width: clamp(150px, 24vw, 280px); aspect-ratio: 400 / 450; }
.qchar { aspect-ratio: 400 / 450; }
.pal.flush { overflow: hidden; filter: none; }
.pal.flush .chr { box-shadow: none; border-radius: 0; width: 100%; height: 100%; }
.pal.flush.pop { transform-origin: bottom left; }

.pal.riya .chr { box-shadow: none; border-radius: 0; width: 100%; height: 100%; }
.pal.riya:not(.flush) { filter: drop-shadow(0 8px 12px rgba(28, 25, 23, .22)); }

/* the corner companion floats */
.pal.riya .chr { animation: palfloat 3.2s ease-in-out infinite; }
@keyframes palfloat { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-7px) rotate(1.5deg); } }

.art .spokes { transform-box: fill-box; transform-origin: center; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* quiz: no frame, Riya and the questions sit straight on the page */
.panel.qmode { border: 0; background: transparent; box-shadow: none; }

.qchar.pop { animation: palpop .45s cubic-bezier(.3, 1.6, .5, 1); }

/* quiz: centred, with a calmer ratio and air between Riya and the questions */
.qlay { display: flex; justify-content: center; align-items: center; gap: clamp(48px, 8vw, 130px); max-width: 1020px; margin: 0 auto; }
.qchar { flex: none; width: clamp(120px, 15vw, 190px); position: static; align-self: center; }
.qmain { flex: 0 1 640px; height: auto; max-height: 100%; }
@media (max-width: 860px) { .qlay { flex-direction: column; gap: 14px; } .qchar { display: none; } .qmain { flex-basis: auto; width: 100%; } }

/* intro panel: a small picture instead of a paragraph */
.iv { display: flex; flex-direction: column; gap: clamp(10px, 1.6vh, 18px); }
.iv-flow { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 6px; border-radius: 18px; background: linear-gradient(180deg, #fff, var(--surface)); border: 1px solid var(--line); }
.iv-phone { position: relative; flex: none; width: 54px; height: 96px; border-radius: 12px; border: 2px solid #cfc9bf; background: #fff; display: flex; flex-direction: column; gap: 5px; padding: 18px 8px 0; box-shadow: 0 6px 14px rgba(28, 25, 23, .1); }
.iv-phone i { display: block; height: 7px; border-radius: 4px; background: var(--surface-2); } .iv-phone i:first-child { background: var(--accent-soft); }
.iv-phone b { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); padding: 2px 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 700; }
.iv-wire { position: relative; flex: 1; min-width: 24px; height: 2px; border-top: 2px dotted #a39b8e; }
.iv-wire i { position: absolute; top: -6px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: flowdot 1.8s linear infinite; }
.iv-wire i:nth-child(2) { animation-delay: .6s; } .iv-wire i:nth-child(3) { animation-delay: 1.2s; }
.iv-box { position: relative; flex: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-items: center; padding: 14px 10px; border: 2px dashed #b9b2a6; border-radius: 16px; background: rgba(255, 255, 255, .7); }
.iv-q { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #cfc9bf; animation: ivq 6s ease-in-out infinite; }
.iv-ic { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; background: #fff; border: 1px solid var(--line); opacity: 0; transform: scale(.6); animation: ivin 6s ease-in-out infinite; }
.iv-ic img { width: 62%; } .iv-ic:nth-of-type(2) { animation-delay: .4s; } .iv-ic:nth-of-type(3) { animation-delay: .8s; } .iv-ic:nth-of-type(4) { animation-delay: 1.2s; } .iv-ic:nth-of-type(5) { animation-delay: 1.6s; }
@keyframes ivin { 0%, 8% { opacity: 0; transform: scale(.6); } 20%, 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.6); } }
@keyframes ivq { 0%, 10% { opacity: 1; } 22%, 85% { opacity: 0; } 100% { opacity: 1; } }
.iv-lead { text-align: center; margin: 0 8px; }
.iv-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.iv-size { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.iv-size b { font-size: 12.5px; } .iv-size span { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.iv-dots { display: flex; flex-wrap: wrap; gap: 3px; align-content: flex-start; height: 44px; overflow: hidden; margin-bottom: 4px; }
.iv-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: ivd 1.6s ease-in-out infinite; animation-delay: var(--d); }
.iv-dots.d1 i { width: 12px; height: 12px; } .iv-dots.d120 i { width: 4px; height: 4px; gap: 2px; }
@keyframes ivd { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }


/* the overall design: bar button and full-page view */
.ov-btn { margin-left: 0; flex: none; display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 8px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.ov-btn:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(15, 118, 110, .15); }
.ov-mini { display: grid; gap: 2px; width: 40px; } .ov-mini i { display: flex; gap: 2px; height: 4px; } .ov-mini b { flex: none; width: 4px; height: 4px; border-radius: 1px; background: var(--accent); }
.ov-txt { display: flex; flex-direction: column; text-align: left; line-height: 1.15; } .ov-txt b { font-size: 12px; } .ov-txt small { font-size: 10.5px; color: var(--muted); }
.ov-exp { color: var(--muted); display: grid; }
.ovm { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: var(--bg); animation: qin .25s ease both; }
.ovm[hidden] { display: none; }
.ovm-head { flex: none; display: flex; align-items: center; gap: 18px; padding: 14px clamp(14px, 3vw, 36px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ovm-head h2 { margin: 2px 0 0; font-size: clamp(18px, 2vw, 24px); letter-spacing: -.02em; }
.ovm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.ovm-tabs button { font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.ovm-tabs button.on { background: var(--ink); color: #fff; }
.ovm-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); }
.ovm-body { flex: 1; min-height: 0; overflow: auto; padding: 18px clamp(14px, 3vw, 36px) 32px; }
.ovm-line { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.ovm-body.three { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 18px; align-items: start; }
.ovm-body.three h3 { margin: 0 0 8px; font-size: 14px; }
.ov { display: flex; flex-direction: column; gap: 4px; max-width: 1100px; margin: 0 auto; }
.ov-lane { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.ov-name { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ov-items { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-node { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; animation: ovin .35s ease both; }
.ov-node .ic { width: 22px; height: 22px; display: grid; place-items: center; flex: none; } .ov-node .ic img, .ov-node .ic svg { width: 100%; height: 100%; }
.ov-node.new { border-color: var(--accent); background: var(--accent-soft); }
.ov-arrow { text-align: center; color: #b9b2a6; font-size: 14px; line-height: 1; }
.ov.compact .ov-lane { grid-template-columns: 1fr; gap: 6px; padding: 8px 10px; } .ov.compact .ov-node { font-size: 11.5px; padding: 4px 8px; }
@keyframes ovin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) { .ov-btn .ov-txt small { display: none; } .ov-lane { grid-template-columns: 1fr; gap: 6px; } .ovm-body.three { grid-template-columns: 1fr; } .ovm-tabs { margin-left: 0; } }
.rows .arc { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); } .rows .arc i { margin: 0 6px; font-style: normal; color: var(--accent); }

.ov-pre { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: zoom-in; border-radius: 16px; transition: box-shadow .2s; }
.ov-pre:hover { box-shadow: 0 0 0 2px var(--accent); }
.ov-pre .ov { max-width: none; }
.ov-pre .ov.compact .ov-lane { grid-template-columns: 130px 1fr; padding: 6px 10px; gap: 10px; } .ov-pre .ov-node { animation: none; }
.ov-open { position: absolute; right: 10px; top: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 700; }
.ov-open { position: static; display: flex; width: max-content; margin: 10px auto 2px; }

/* small screens: the scale pills fit on one line */
@media (max-width: 860px) and (min-height: 521px) {
  .rail { margin-left: 0; width: 100%; gap: 4px; flex-wrap: nowrap; }
  .rail .pill { font-size: 10.5px; padding: 4px 8px; flex: none; }
  .where { font-size: 12px; }
}

.rail .pill .sm { display: none; }
@media (max-width: 560px) { .rail .pill .lg { display: none; } .rail .pill .sm { display: inline; } .rail .pill { font-size: 11px; padding: 4px 11px; } }
@media (max-width: 860px) { .scr .cap .cw { display: none; } }
@media (max-width: 860px) { .qlay { justify-content: flex-start; padding-top: 6px; } .qchar { display: block; width: 86px; margin: 0 auto; } .qmain { width: 100%; } }
@media (max-width: 860px) { .stagecard { padding-top: 30px; } .t-art { padding-left: 10px; } }
@media (max-width: 860px) {
  .ovm-head { position: relative; gap: 8px; padding-right: 58px; }
  .ovm-x { position: absolute; top: 12px; right: 12px; }
  .ovm-tabs { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ovm-tabs button { flex: none; }
  .ov-lane { padding: 8px 10px; }
}
/* tablets: let the rows wrap like on a desktop; phones: a short vertical label, then the nodes scroll sideways */
@media (min-width: 600px) and (max-width: 860px) { .row { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 599px) { .row .label { flex: none; flex-basis: auto; margin: 0 6px 0 0; writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; } }
/* phones: the greeting and thank-you cards sit in the middle of the screen, with even space above and below */
@media (max-width: 860px) {
  .stagecard { justify-content: flex-start; align-items: center; gap: 22px; padding: 24px 22px; text-align: center; }
  .stagecard > :first-child { margin-top: auto; } .stagecard > :last-child { margin-bottom: auto; }
  .g-art { width: clamp(150px, 46vw, 220px); }
  .g-copy { max-width: 440px; }
  .g-copy h2 { font-size: clamp(24px, 7vw, 32px); }
  .learned { text-align: left; } .t-actions { justify-content: center; }
  .t-art { justify-content: center; padding-left: 0; }
}
/* phones: the quiz block (Riya plus the question) sits in the middle of the screen */
@media (max-width: 860px) {
  .qlay { justify-content: flex-start; align-items: center; gap: 12px; padding-top: 0; }
  .qlay > :first-child { margin-top: auto; } .qlay > :last-child { margin-bottom: auto; }
  .qchar { flex: none; } .qmain { flex: 0 1 auto; min-height: 0; }
}
/* intro picture: keep its proportions on wide panels (tablets) and shrink it on phones */
.iv { max-width: 640px; margin: 0 auto; width: 100%; }
.iv-flow { max-width: 560px; margin: 0 auto; width: 100%; }
.iv-ic { width: 100%; max-width: 58px; justify-self: center; }
@media (max-width: 560px) {
  .iv-phone { width: 40px; height: 72px; padding: 14px 6px 0; } .iv-phone b { font-size: 9.5px; padding: 1px 7px; }
  .iv-box { padding: 10px 6px; gap: 4px; } .iv-q { font-size: 26px; }
  .iv-sizes { gap: 6px; } .iv-size { padding: 8px; }
}

.g-copy h2.pop { animation: linein .45s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes linein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
