/* ============================================================================
   Amerge Residency 2026 — "Game Studios" deck
   Dark editorial Amerge base (dominant) + subtle co-op RPG / platformer UI layer.
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&family=Press+Start+2P&display=swap');

:root{
  /* brand */
  --ink:#0A0A0A; --ink2:#121211; --panel:#16150F; --panel2:#1C1B14;
  --fg:#F5F5F0; --dim:#9A9A95; --dim2:#6E6E68;
  --line:rgba(245,245,240,.14); --line2:rgba(245,245,240,.30);
  --yellow:#FFFC52; --yellow-deep:#EBE73A; --blue:#3366FF;
  /* small retro accent set — used sparingly */
  --px-green:#7CE26B; --px-cyan:#4FD6E0; --px-magenta:#FF5DAE; --coin:#FFC93C; --danger:#FF6B5B;

  /* type scale @1920x1080 */
  --type-hero:148px; --type-title:74px; --type-headline:60px; --type-subtitle:42px;
  --type-lead:36px; --type-body:31px; --type-small:25px; --type-eyebrow:24px; --type-hud:16px;

  --pad-x:96px; --pad-y:74px; --gap:40px;

  --font-disp:'Outfit',system-ui,sans-serif;
  --font-body:'Poppins',system-ui,sans-serif;
  --font-pixel:'Press Start 2P','Courier New',monospace;
  --anim-start:1.5s; --anim-beat:2s;
}

*{box-sizing:border-box;}
deck-stage:not(:defined){visibility:hidden;}
html,body{margin:0;background:#000;}
deck-stage{background:#000;}

section{
  background:var(--ink);
  color:var(--fg);
  font-family:var(--font-body);
  overflow:hidden;
}
/* faint pixel-grid texture so the dark ground reads as a "game world" without shouting */
section::before{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:0;
  background-image:linear-gradient(rgba(124,226,107,.05) 1px,transparent 1px),
                   linear-gradient(90deg,rgba(124,226,107,.05) 1px,transparent 1px);
  background-size:46px 46px;
  mask-image:radial-gradient(125% 125% at 50% 30%,#000 32%,transparent 94%);
}
.frame{position:absolute;inset:0;display:flex;flex-direction:column;
  padding:var(--pad-y) var(--pad-x);z-index:1;}

/* ---- top / bottom HUD chrome ---------------------------------------------- */
.hud-top{display:none;}
.hud-top .wm{font-family:var(--font-disp);font-weight:800;font-size:22px;
  letter-spacing:.2em;text-transform:uppercase;color:var(--fg);}
.hud-top .wm b{color:var(--yellow);font-weight:800;}
.hud-top .rt{font-family:var(--font-disp);font-weight:500;font-size:15px;
  letter-spacing:.32em;text-transform:uppercase;color:var(--dim);}

.hud-foot{display:flex;justify-content:space-between;align-items:center;flex:0 0 auto;
  gap:28px;padding-top:24px;}
.hud-foot .lvl{font-family:var(--font-pixel);font-size:13px;color:var(--yellow);
  letter-spacing:.02em;white-space:nowrap;}
.hud-foot .brand-foot{display:flex;align-items:center;gap:28px;margin-left:auto;}
.hud-foot .brand-foot .wm{font-family:var(--font-disp);font-weight:800;font-size:22px;
  letter-spacing:.2em;text-transform:uppercase;color:var(--fg);}
.hud-foot .brand-foot .wm b{color:var(--yellow);font-weight:800;}
.hud-foot .brand-foot .rt{font-family:var(--font-disp);font-weight:500;font-size:15px;
  letter-spacing:.32em;text-transform:uppercase;color:var(--dim);}
/* footer stripped to just the level counter */
.hud-foot .track,.hud-foot .run,.hud-foot .coins{display:none !important;}
.hud-foot .run{font-family:var(--font-disp);font-size:14px;font-weight:500;
  letter-spacing:.3em;text-transform:uppercase;color:var(--dim2);white-space:nowrap;}
.hud-foot .track{flex:1;height:8px;background:rgba(245,245,240,.08);
  border:1px solid var(--line);border-radius:2px;display:flex;gap:2px;padding:1px;}
.hud-foot .track i{flex:1;border-radius:1px;background:transparent;}
.hud-foot .track i.on{background:var(--yellow);}

/* main body region between chrome */
.body{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;
  min-height:0;padding:28px 0;}

/* ---- type helpers --------------------------------------------------------- */
.eyebrow{font-family:var(--font-disp);font-weight:600;font-size:var(--type-eyebrow);
  letter-spacing:.24em;text-transform:uppercase;color:var(--dim);
  display:inline-flex;align-items:center;gap:16px;}
.eyebrow::before{content:"";width:13px;height:13px;background:var(--yellow);
  transform:rotate(45deg);box-shadow:3px 3px 0 rgba(0,0,0,.5);flex:0 0 auto;}
.eyebrow .acc{color:var(--yellow);}

.headline{font-family:var(--font-disp);font-weight:900;text-transform:uppercase;
  line-height:.94;letter-spacing:-.02em;color:var(--fg);margin:0;}
.title{font-family:var(--font-disp);font-weight:800;line-height:1.02;
  letter-spacing:-.015em;margin:0;color:var(--fg);}
.acc{color:var(--yellow);}
.lead{font-family:var(--font-body);font-weight:300;color:var(--fg);line-height:1.5;}
.copy{font-family:var(--font-body);color:var(--dim);line-height:1.62;font-size:var(--type-body);}
.stat-num{font-family:var(--font-disp);font-weight:900;line-height:.88;
  letter-spacing:-.03em;color:var(--yellow);}
.stat-label{font-family:var(--font-disp);font-weight:600;font-size:var(--type-small);
  letter-spacing:.16em;text-transform:uppercase;color:var(--dim);}
.hud-tag{font-family:var(--font-pixel);font-size:var(--type-hud);color:var(--yellow);
  letter-spacing:.01em;text-transform:uppercase;line-height:1.4;}

/* ---- pixel UI panel ------------------------------------------------------- */
.panel{position:relative;background:var(--panel);border:2px solid var(--line2);
  border-radius:3px;padding:34px 34px 32px;
  box-shadow:7px 7px 0 rgba(0,0,0,.5);}
.panel.accent{border-color:var(--yellow);}
.panel.accent::after,.panel.accent::before{content:"";position:absolute;width:7px;height:7px;
  background:var(--yellow);}
.panel.accent::before{top:-2px;left:-2px;}
.panel.accent::after{bottom:-2px;right:-2px;}
.panel .pnum{font-family:var(--font-pixel);font-size:12px;color:var(--dim2);}
.panel h3{font-family:var(--font-disp);font-weight:700;font-size:30px;line-height:1.18;
  letter-spacing:-.01em;color:var(--fg);margin:14px 0 12px;}
.panel p{font-family:var(--font-body);font-size:var(--type-small);line-height:1.5;
  color:var(--dim);margin:0;}

/* icon chip — lucide item icon in a pixel frame */
.chip{width:58px;height:58px;display:flex;align-items:center;justify-content:center;
  background:var(--ink2);border:2px solid var(--line2);border-radius:3px;color:var(--yellow);
  box-shadow:3px 3px 0 rgba(0,0,0,.5);flex:0 0 auto;}
.chip svg{width:30px;height:30px;stroke-width:2;}
.chip.danger{color:var(--danger);} .chip.green{color:var(--px-green);}
.chip.cyan{color:var(--px-cyan);} .chip.blue{color:var(--blue);}

/* ---- segmented HP / XP / stat bar ---------------------------------------- */
.bar{display:flex;gap:3px;height:16px;width:100%;}
.bar i{flex:1;background:rgba(245,245,240,.10);border-radius:1px;}
.bar i.on{background:var(--yellow);}
.bar.green i.on{background:var(--px-green);}
.bar.drain i.on{background:var(--danger);}
.bar-row{display:flex;align-items:center;gap:18px;}
.bar-row .k{font-family:var(--font-pixel);font-size:13px;color:var(--dim);
  letter-spacing:.01em;white-space:nowrap;min-width:96px;}
.bar-row .v{font-family:var(--font-disp);font-weight:700;color:var(--fg);white-space:nowrap;}

.artist-hp{display:flex;align-items:center;gap:18px;max-width:1280px;}
.artist-hp .hp-label{font-family:var(--font-pixel);font-size:13px;color:var(--dim);
  letter-spacing:.01em;white-space:nowrap;min-width:112px;}
.hp-track{--hp-end:100%;--hp-final:var(--yellow);position:relative;flex:1;height:22px;
  background:rgba(245,245,240,.08);border:2px solid var(--line2);border-radius:3px;
  box-shadow:4px 4px 0 rgba(0,0,0,.45);overflow:visible;}
.hp-track::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:repeating-linear-gradient(90deg,transparent 0 calc(10% - 2px),rgba(10,10,10,.55) calc(10% - 2px) 10%);
  border-radius:1px;}
.hp-fill{position:absolute;left:2px;top:2px;bottom:2px;width:calc(var(--hp-end) - 4px);
  background:var(--hp-final);box-shadow:0 0 18px color-mix(in srgb,var(--hp-final) 65%,transparent);
  z-index:1;}
.hp-readout{font-family:var(--font-disp);font-weight:800;font-size:22px;color:var(--hp-final);
  min-width:138px;height:30px;text-align:right;white-space:nowrap;position:relative;display:block;}
.hp-readout .hpv{position:absolute;right:0;top:50%;transform:translateY(-50%);opacity:0;}
.hp-readout .initial{opacity:1;}
.hp-readout.damage{color:var(--danger);}
.hp-readout.heal{color:var(--px-green);}
.hp-pop{position:absolute;left:min(var(--pop-left),calc(100% - 72px));top:-38px;z-index:4;
  font-family:var(--font-pixel);font-size:9px;line-height:1;letter-spacing:.01em;text-transform:uppercase;
  padding:7px 8px;border-radius:2px;background:var(--ink2);opacity:0;white-space:nowrap;
  transform:translate(-12px,8px) scale(.88);box-shadow:3px 3px 0 rgba(0,0,0,.5);pointer-events:none;}
.hp-pop.damage{color:var(--danger);border:2px solid var(--danger);}
.hp-pop.heal{color:var(--px-green);border:2px solid var(--px-green);}
.hp-damage-50 .hp-track{--hp-end:50%;--hp-final:var(--danger);}
.hp-damage-30 .hp-track{--hp-end:30%;--hp-final:#9B1C16;}
.hp-damage-4step .hp-track{--hp-end:50%;--hp-final:var(--danger);}
.hp-damage-3step .hp-track{--hp-end:20%;--hp-final:#5B0505;}
.hp-heal-4step .hp-track,.hp-power-up-3step .hp-track{--hp-end:100%;--hp-final:var(--px-green);}
.hp-heal-100 .hp-track,.hp-power-up .hp-track{--hp-end:100%;--hp-final:var(--px-green);}
.hp-heal-100 .hp-readout,.hp-power-up .hp-readout{color:var(--px-green);}

/* ---- character / roster card --------------------------------------------- */
.roster{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;}
.char{position:relative;background:var(--panel);border:2px solid var(--line2);
  border-radius:3px;overflow:hidden;box-shadow:6px 6px 0 rgba(0,0,0,.5);
  display:flex;flex-direction:column;}
.char .ph{position:relative;aspect-ratio:2.15/1;overflow:hidden;background:var(--ink2);
  border-bottom:2px solid var(--line2);}
.char .ph img{width:100%;height:100%;object-fit:cover;display:block;
  object-position:center 28%;filter:saturate(1.02) contrast(1.02);}
.char .ph .role{position:absolute;left:11px;bottom:11px;font-family:var(--font-pixel);
  font-size:9px;color:#0A0A0A;background:var(--yellow);padding:5px 7px;border-radius:2px;
  letter-spacing:.01em;box-shadow:2px 2px 0 rgba(0,0,0,.5);}
.char .ph .lvl{position:absolute;right:11px;top:11px;font-family:var(--font-pixel);
  font-size:9px;color:var(--yellow);background:rgba(10,10,10,.78);padding:5px 7px;
  border:1px solid var(--line2);border-radius:2px;}
.char .meta{padding:14px 18px 15px;display:flex;flex-direction:column;gap:6px;flex:1;}
.char .nm{font-family:var(--font-disp);font-weight:800;font-size:23px;letter-spacing:-.01em;
  color:var(--fg);line-height:1.15;}
.char .cr{font-family:var(--font-body);font-size:18px;line-height:1.35;color:var(--dim);}
.char .st{display:flex;align-items:center;gap:10px;margin-top:auto;padding-top:6px;}
.char .st .pts{font-family:var(--font-pixel);font-size:10px;color:var(--coin);white-space:nowrap;
  letter-spacing:.01em;}
/* locked / TBA character */
.char.locked .ph{display:flex;align-items:center;justify-content:center;
  background:repeating-linear-gradient(45deg,#171610 0 14px,#1C1B14 14px 28px);}
.char.locked .ph .q{font-family:var(--font-pixel);font-size:34px;color:var(--dim2);}

/* ---- floating terrain platforms (divider garnish, low contrast) ----------- */
.terrain{position:absolute;left:0;right:0;bottom:0;height:230px;pointer-events:none;
  z-index:0;overflow:hidden;}
.plat{position:absolute;background:#16150D;border-top:7px solid var(--px-green);
  border-radius:3px;box-shadow:inset 0 -16px 0 rgba(0,0,0,.4),6px 6px 0 rgba(0,0,0,.55);
  opacity:.85;}
.coin{position:absolute;width:16px;height:16px;border-radius:50%;background:var(--coin);
  box-shadow:0 0 0 2px rgba(10,10,10,.6),0 0 16px rgba(255,201,60,.7);opacity:.95;}
.flag{position:absolute;width:4px;height:40px;background:var(--dim);opacity:.6;}
.flag::after{content:"";position:absolute;left:4px;top:0;width:26px;height:18px;
  background:var(--yellow);clip-path:polygon(0 0,100% 0,75% 50%,100% 100%,0 100%);opacity:.9;}

/* dotted workflow path */
.path-dot{stroke:var(--line2);stroke-width:3;stroke-dasharray:2 12;stroke-linecap:round;fill:none;}

/* full-bleed image divider helpers */
.bleed{position:absolute;inset:0;z-index:0;}
.bleed img{width:100%;height:100%;object-fit:cover;}
.scrim{position:absolute;inset:0;z-index:0;}

/* generic small list */
.qlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:14px;}
.qlist li{display:flex;align-items:flex-start;gap:14px;font-family:var(--font-body);
  font-size:var(--type-small);color:var(--fg);line-height:1.4;}
.qlist li::before{content:"";width:11px;height:11px;background:var(--yellow);
  transform:rotate(45deg);margin-top:7px;flex:0 0 auto;box-shadow:2px 2px 0 rgba(0,0,0,.5);}
.qlist.dim li{color:var(--dim);} .qlist.dim li::before{background:var(--dim);}

hr.rule{height:1px;background:var(--line);border:0;margin:0;}

/* layout grids */
.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:26px;}
.grid4 .panel h3{font-size:27px;} .grid4 .panel p{font-size:23px;}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:30px;}
.three-mini{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;}
.mini{display:flex;align-items:center;gap:18px;background:var(--panel);border:2px solid var(--line);
  border-radius:3px;padding:20px 22px;box-shadow:5px 5px 0 rgba(0,0,0,.45);}
.mini b{font-family:var(--font-disp);font-weight:600;font-size:23px;color:var(--fg);line-height:1.25;}
.problem-stages .stage{opacity:0;}
.problem-panels .panel{min-height:292px;}
.problem-list .bullet{opacity:0;transform:translateY(8px);padding:5px 8px;border-radius:3px;margin-left:-8px;
  width:calc(100% + 8px);align-self:stretch;}
.problem-list .bullet::before{margin-left:0;}

/* party tags (player classes) */
.party-tag{font-family:var(--font-disp);font-weight:600;font-size:22px;color:var(--fg);
  background:var(--panel);border:2px solid var(--line2);border-radius:3px;padding:12px 20px;
  box-shadow:4px 4px 0 rgba(0,0,0,.45);letter-spacing:.01em;}
.party-tag::before{content:"◆ ";color:var(--yellow);font-size:14px;}

/* chapter / quest-log cards (agenda) */
.chapters{display:grid;grid-template-columns:repeat(3,1fr);gap:32px;position:relative;}
.chap{position:relative;background:var(--panel);border:2px solid var(--line2);border-radius:3px;
  padding:44px 38px 40px;box-shadow:7px 7px 0 rgba(0,0,0,.5);display:flex;flex-direction:column;gap:20px;}
.chap .cn{font-family:var(--font-pixel);font-size:38px;color:var(--yellow);line-height:1;}
.chap h3{font-family:var(--font-disp);font-weight:800;font-size:36px;color:var(--fg);margin:0;line-height:1.05;letter-spacing:-.01em;}
.chap p{font-family:var(--font-body);font-size:23px;color:var(--dim);margin:0;line-height:1.45;}
.chap .node{position:absolute;top:-9px;left:38px;width:16px;height:16px;background:var(--yellow);
  transform:rotate(45deg);box-shadow:3px 3px 0 rgba(0,0,0,.5);}

/* achievement badge tiles (brands) */
.badges{display:grid;grid-template-columns:repeat(4,1fr);gap:26px;}
.badge{background:var(--panel);border:2px solid var(--line2);border-radius:3px;padding:34px 30px 32px;
  box-shadow:6px 6px 0 rgba(0,0,0,.5);display:flex;flex-direction:column;gap:18px;align-items:flex-start;}
.badge b{font-family:var(--font-disp);font-weight:800;font-size:30px;color:var(--fg);line-height:1.05;}
.badge .sub{font-family:var(--font-body);font-size:21px;color:var(--dim);line-height:1.4;}

/* property gallery (level map of tiles) */
.gallery{display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:1fr;gap:14px;flex:1;min-height:0;}
.gtile{position:relative;overflow:hidden;border:2px solid var(--line2);border-radius:3px;
  box-shadow:4px 4px 0 rgba(0,0,0,.5);background:var(--ink2);}
.gtile img{width:100%;height:100%;object-fit:cover;display:block;}
.gtile.feat{grid-column:span 2;grid-row:span 2;}
.gtile .tag{position:absolute;left:11px;bottom:11px;font-family:var(--font-pixel);font-size:9px;
  color:#0A0A0A;background:var(--yellow);padding:5px 7px;border-radius:2px;box-shadow:2px 2px 0 rgba(0,0,0,.5);}

/* flow diagram (workflow path) */
.flow{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;gap:18px;align-items:stretch;}
.fnode{background:var(--panel);border:2px solid var(--line2);border-radius:3px;padding:30px 30px 28px;
  box-shadow:7px 7px 0 rgba(0,0,0,.5);display:flex;flex-direction:column;gap:14px;}
.fnode.accent{border-color:var(--yellow);}
.fnode h4{font-family:var(--font-disp);font-weight:800;font-size:30px;color:var(--fg);margin:0;line-height:1.05;}
.fnode p{font-family:var(--font-body);font-size:20px;color:var(--dim);margin:0;line-height:1.4;}
.fconn{display:flex;align-items:center;justify-content:center;color:var(--yellow);align-self:center;}
.fconn svg{width:42px;height:42px;stroke-width:2.5;}

/* token inventory grid */
.tokgrid{display:grid;grid-template-columns:repeat(20,1fr);gap:5px;}
.tokgrid i{aspect-ratio:1;border-radius:2px;background:rgba(245,245,240,.09);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.4);}
.tok-mm{background:var(--yellow)!important;} .tok-tr{background:var(--px-cyan)!important;}
.tok-sp{background:var(--px-magenta)!important;}
.legend{display:flex;flex-direction:column;gap:14px;}
.legrow{display:flex;align-items:center;gap:14px;}
.legrow .sw{width:20px;height:20px;border-radius:3px;flex:0 0 auto;box-shadow:2px 2px 0 rgba(0,0,0,.5);}
.legrow .lk{font-family:var(--font-disp);font-weight:700;font-size:22px;color:var(--fg);}
.legrow .lv{font-family:var(--font-disp);font-weight:900;font-size:30px;color:var(--yellow);margin-left:auto;
  font-variant-numeric:tabular-nums;}
.legrow .ls{font-family:var(--font-pixel);font-size:10px;color:var(--dim);}

/* location stat chips */
.locstat{background:rgba(16,15,11,.72);border:2px solid var(--line2);border-radius:3px;
  padding:20px 30px 22px;box-shadow:5px 5px 0 rgba(0,0,0,.5);display:flex;flex-direction:column;gap:6px;
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);}
.locstat .n{font-family:var(--font-disp);font-weight:900;font-size:58px;color:var(--yellow);line-height:.88;}
.locstat .l{font-family:var(--font-disp);font-weight:600;font-size:18px;letter-spacing:.12em;
  text-transform:uppercase;color:var(--dim);}

/* service split (custom music / clearance / technical) */
.svc-split{display:grid;grid-template-columns:1.05fr 1fr;gap:72px;align-items:start;}
.qlist.two{display:grid;grid-template-columns:1fr 1fr;gap:18px 40px;}
.qlist.two li{font-size:27px;}
.svc-note{background:var(--panel);border:2px solid var(--line2);border-radius:3px;
  padding:34px 36px 36px;box-shadow:7px 7px 0 rgba(0,0,0,.5);display:flex;flex-direction:column;gap:20px;}
.svc-note p{font-family:var(--font-body);font-size:28px;line-height:1.5;color:var(--dim);margin:0;}

/* closing contact */
.contact{display:flex;flex-direction:column;gap:4px;}
.contact .cname{font-family:var(--font-disp);font-weight:800;font-size:30px;color:var(--fg);}
.contact .crole{font-family:var(--font-body);font-size:20px;color:var(--dim);}

/* ---- entrance ---------------------------------------------------------------
   Content is visible at rest (no timeline-dependent hidden start state, so it
   never blanks in print / throttled / snapshot contexts). A subtle, safe rise
   is applied only via a keyframe that ends visible AND starts near-visible. ---- */
.anim{opacity:1;transform:none;}
@media (prefers-reduced-motion:no-preference){
  [data-deck-active] .anim{animation:rise-in .5s cubic-bezier(.16,1,.3,1) both;}
  [data-deck-active] .anim.d1{animation-delay:.05s;}
  [data-deck-active] .anim.d2{animation-delay:.10s;}
  [data-deck-active] .anim.d3{animation-delay:.16s;}
  [data-deck-active] .anim.d4{animation-delay:.22s;}
  [data-deck-active] .anim.d5{animation-delay:.28s;}
  [data-deck-active] .anim.d6{animation-delay:.34s;}
}
/* starts at full opacity so a frozen/pending first frame is still readable;
   the motion is a gentle upward settle, not a fade-from-nothing. */
@keyframes rise-in{from{transform:translateY(16px);}to{transform:none;}}

/* ---- tweak hooks ---------------------------------------------------------- */
body.no-decor .terrain{display:none;}
body.no-decor section::before{display:none;}
body.no-pixhud .lvl,body.no-pixhud .hud-tag,body.no-pixhud .chap .cn,
body.no-pixhud .char .role,body.no-pixhud .char .pts,body.no-pixhud .char.locked .ph .q,
body.no-pixhud .press,body.no-pixhud .legrow .ls,body.no-pixhud .panel .pnum{
  font-family:var(--font-disp)!important;letter-spacing:.02em!important;}

/* ---- gameplay screen (slide 2) -------------------------------------------- */
.gamescreen{position:relative;border:2px solid var(--line2);border-radius:4px;
  box-shadow:8px 8px 0 rgba(0,0,0,.5);background:#0c0c0c;overflow:hidden;
  display:flex;align-items:center;justify-content:center;}
.gamescreen img{max-width:100%;max-height:100%;object-fit:contain;display:block;}
.screen-tab{position:absolute;left:14px;top:14px;z-index:2;font-family:var(--font-pixel);
  font-size:11px;color:var(--yellow);background:rgba(10,10,10,.82);border:1px solid var(--line2);
  padding:6px 9px;border-radius:2px;letter-spacing:.02em;}

/* ---- logo wall (placements) ----------------------------------------------- */
.logowall{display:flex;align-items:center;justify-content:center;}
.logowall img{max-width:100%;max-height:100%;object-fit:contain;display:block;}

/* ---- footer game HUD coins ------------------------------------------------ */
.hud-foot .coins{font-family:var(--font-pixel);font-size:12px;color:var(--coin);
  letter-spacing:.02em;white-space:nowrap;display:inline-flex;align-items:center;gap:6px;}
.hud-foot .coins .gem{color:var(--px-cyan);}
body.no-pixhud .hud-foot .coins{font-family:var(--font-disp)!important;}

/* ---- value-flow diagram (slide 18) ---------------------------------------- */
.hl{display:inline-block;background:var(--yellow);color:var(--ink);font-family:var(--font-disp);
  font-weight:900;font-size:46px;padding:6px 18px;border-radius:3px;box-shadow:5px 5px 0 rgba(0,0,0,.5);
  line-height:1;}
.vflow{position:relative;width:100%;height:632px;}
.vflow svg{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;overflow:visible;}
.vbox{position:absolute;z-index:2;display:flex;flex-direction:column;justify-content:center;
  border-radius:3px;padding:12px 22px;box-shadow:6px 6px 0 rgba(0,0,0,.5);}
.vbox.white{background:#F5F5F0;color:#0A0A0A;border:2px solid #F5F5F0;}
.vbox.yellow{background:var(--yellow);color:#0A0A0A;border:2px solid var(--yellow);}
.vbox .bx{font-family:var(--font-disp);font-weight:900;font-size:30px;line-height:1.04;}
.vbox .bt{font-family:var(--font-disp);font-weight:900;font-size:40px;line-height:.96;}
.vbox .bs{font-family:var(--font-disp);font-weight:700;font-size:24px;line-height:1.05;}
.vcoin{position:absolute;z-index:3;border-radius:50%;background:#0A0A0A;border:3px solid var(--yellow);
  display:flex;align-items:center;justify-content:center;font-family:var(--font-disp);
  font-weight:900;color:var(--yellow);box-shadow:0 0 18px rgba(255,201,60,.45);}
.vlabel{position:absolute;z-index:3;font-family:var(--font-disp);font-weight:700;color:var(--fg);}
.vflows{position:absolute;z-index:2;}
.vflows .ttl{font-family:var(--font-disp);font-weight:800;font-size:26px;color:var(--fg);}
.vflows ul{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:9px;}
.vflows li{font-family:var(--font-body);font-size:25px;color:var(--fg);display:flex;gap:11px;align-items:center;}
.vflows li::before{content:"";width:9px;height:9px;background:var(--yellow);border-radius:50%;flex:0 0 auto;}

/* ---- column-major token grid (slide 19) ----------------------------------- */
.tokgrid.colmajor{grid-template-columns:repeat(20,1fr);grid-template-rows:repeat(5,1fr);
  grid-auto-flow:column;}

/* ---- slide 2 simplified co-op schematic ----------------------------------- */
.quest{display:flex;align-items:center;gap:20px;background:var(--panel);border:2px solid var(--yellow);
  border-radius:4px;padding:15px 24px;box-shadow:6px 6px 0 rgba(0,0,0,.5);position:relative;overflow:hidden;}
.quest .qi{width:48px;height:48px;display:flex;align-items:center;justify-content:center;color:var(--yellow);flex:0 0 auto;}
.quest .qi svg{width:30px;height:30px;}
.quest .qx{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;}
.quest .qx b{font-family:var(--font-pixel);font-size:12px;color:var(--yellow);letter-spacing:.03em;}
.quest .qx span{font-family:var(--font-disp);font-weight:600;font-size:27px;color:var(--fg);display:inline-block;white-space:nowrap;}
.quest .qs{font-family:var(--font-pixel);font-size:12px;color:var(--px-cyan);white-space:nowrap;flex:0 0 auto;min-width:174px;text-align:right;}
.quest .complete-label{display:inline-block;color:var(--yellow);opacity:0;}
.quest .progress-label{display:inline-block;}
.quest .checks{display:inline-flex;gap:6px;align-items:center;margin-left:5px;}
.quest .checks i{width:10px;height:6px;border-left:2px solid var(--yellow);border-bottom:2px solid var(--yellow);
  transform:rotate(-45deg);display:block;box-shadow:0 0 8px rgba(255,252,82,.45);}
.quest .qbar{position:absolute;left:668px;right:24px;bottom:13px;height:5px;background:var(--px-cyan);
  box-shadow:0 0 12px rgba(79,214,224,.72);transform-origin:left center;}
.g2flow{display:grid;grid-template-columns:0.92fr auto 1.85fr auto 0.92fr;align-items:stretch;gap:16px;}
.g2node{background:var(--panel);border:2px solid var(--line2);border-radius:4px;padding:22px 20px;
  box-shadow:6px 6px 0 rgba(0,0,0,.5);display:flex;flex-direction:column;gap:13px;align-items:flex-start;justify-content:center;}
.g2node.accent{border-color:var(--yellow);}
.g2node .g2nm{font-family:var(--font-disp);font-weight:800;font-size:27px;color:var(--fg);line-height:1.16;}
.coinchip{display:inline-flex;align-items:center;gap:8px;font-family:var(--font-pixel);font-size:11px;
  color:var(--coin);background:var(--ink2);border:1px solid var(--line2);border-radius:3px;padding:7px 10px;}
.coinchip svg{width:17px;height:17px;}
.g2conn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--yellow);}
.g2conn span{font-family:var(--font-pixel);font-size:9px;color:var(--dim);white-space:nowrap;text-align:center;}
.g2conn svg{width:38px;height:38px;}
.g2team{background:var(--panel2);border:2px solid var(--yellow);border-radius:4px;padding:18px 18px 20px;
  box-shadow:6px 6px 0 rgba(0,0,0,.5);}
.g2team .g2tt{display:block;font-family:var(--font-pixel);font-size:13px;color:var(--yellow);
  text-align:center;letter-spacing:.05em;margin-bottom:15px;}
.g2members{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;}
.g2mem{background:var(--ink2);border:2px solid var(--line2);border-radius:3px;padding:18px 12px;
  display:flex;flex-direction:column;align-items:center;gap:11px;text-align:center;}
.g2mem b{font-family:var(--font-disp);font-weight:700;font-size:22px;color:var(--fg);line-height:1.1;}
.g2mem .bar{width:78%;height:11px;}

/* ---- token / revenue distribution (slide 20) ------------------------------ */
.tdist{position:relative;width:100%;height:660px;}
.tdist svg{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;overflow:visible;}
.tgrp{position:absolute;z-index:2;display:flex;align-items:center;gap:26px;}
.tgcol{display:flex;flex-direction:column;gap:7px;}
.tgh{font-family:var(--font-disp);font-weight:800;font-size:23px;color:var(--yellow);}
.tcoins{display:grid;grid-template-columns:repeat(10,17px);gap:4px;width:max-content;}
.tcoins i{width:17px;height:17px;border-radius:50%;background:#0A0A0A;border:2px solid var(--yellow);
  display:flex;align-items:center;justify-content:center;font-family:var(--font-disp);font-weight:700;
  font-size:8px;color:var(--yellow);}
.trole{font-family:var(--font-disp);font-weight:800;font-size:24px;color:var(--fg);margin-top:3px;}
.tamt{font-family:var(--font-disp);font-weight:900;font-size:44px;color:var(--fg);}
.tcyltxt{position:absolute;z-index:3;font-family:var(--font-disp);font-weight:900;font-size:48px;color:var(--fg);}
.trev{position:absolute;z-index:2;display:flex;flex-direction:column;gap:22px;align-items:flex-start;}
.revchip{display:inline-flex;align-items:center;gap:0;font-family:var(--font-disp);font-weight:800;
  font-size:24px;color:var(--fg);}
.revchip .ri{width:46px;height:46px;display:flex;align-items:center;justify-content:center;color:var(--yellow);
  background:var(--ink2);border:2px solid var(--line2);border-radius:3px;flex:0 0 auto;}
.revchip .ri svg{width:26px;height:26px;}
.revchip .revcopy{display:flex;align-items:center;gap:14px;min-width:0;}
.revlogo{display:block;max-width:148px;max-height:40px;object-fit:contain;}
.revlogo.ascap{max-width:154px;max-height:44px;}
.revlogo.spotify{max-width:150px;}
.revlogo.riot{max-width:118px;max-height:44px;}

@media (prefers-reduced-motion:no-preference){
  [data-deck-active] .seq-quest{animation:quest-screen-in var(--anim-beat) steps(2,end) var(--anim-start) both;}
  [data-deck-active] .seq-quest .qx span{animation:quest-type var(--anim-beat) steps(48,end) 3.5s both;}
  [data-deck-active] .seq-quest .qbar{animation:quest-progress var(--anim-beat) linear 3.5s both;}
  [data-deck-active] .seq-quest .progress-label{animation:status-blink .8s steps(2,end) 3.5s 12,progress-hide .01s linear 13.5s both;}
  [data-deck-active] .seq-quest .complete-label{animation:complete-show .01s linear 13.5s both,complete-pulse 1s steps(2,end) 13.5s 3;}
  [data-deck-active] .seq-customer{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 5.5s both;}
  [data-deck-active] .seq-send{animation:arrow-draw var(--anim-beat) cubic-bezier(.16,1,.3,1) 7.5s both;}
  [data-deck-active] .seq-team{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 9.5s both;}
  [data-deck-active] .seq-deliver{animation:arrow-draw var(--anim-beat) cubic-bezier(.16,1,.3,1) 11.5s both;}
  [data-deck-active] .seq-delivered{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 13.5s both;}

  [data-deck-active] .hp-card{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) both;}
  [data-deck-active] .hp-card.step1{animation-delay:1.5s;}
  [data-deck-active] .hp-card.step2{animation-delay:3.5s;}
  [data-deck-active] .hp-card.step3{animation-delay:5.5s;}
  [data-deck-active] .hp-card.step4{animation-delay:7.5s;}

  [data-deck-active] .hp-seq-4 .hp-card.step1{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 1.5s both,hp-card-flash-red var(--anim-beat) steps(2,end) 1.5s both;}
  [data-deck-active] .hp-seq-4 .hp-card.step2{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 3.5s both,hp-card-flash-red var(--anim-beat) steps(2,end) 3.5s both;}
  [data-deck-active] .hp-seq-4 .hp-card.step3{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 5.5s both,hp-card-flash-red var(--anim-beat) steps(2,end) 5.5s both;}
  [data-deck-active] .hp-seq-4 .hp-card.step4{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 7.5s both,hp-card-flash-red var(--anim-beat) steps(2,end) 7.5s both;}
  [data-deck-active] .hp-seq-heal .hp-card.step1{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 1.5s both,hp-card-flash-green var(--anim-beat) steps(2,end) 1.5s both;}
  [data-deck-active] .hp-seq-heal .hp-card.step2{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 3.5s both,hp-card-flash-green var(--anim-beat) steps(2,end) 3.5s both;}
  [data-deck-active] .hp-seq-heal .hp-card.step3{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 5.5s both,hp-card-flash-green var(--anim-beat) steps(2,end) 5.5s both;}
  [data-deck-active] .hp-seq-heal .hp-card.step4{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 7.5s both,hp-card-flash-green var(--anim-beat) steps(2,end) 7.5s both;}
  [data-deck-active] .hp-seq-power .hp-card.step1{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 1.5s both,hp-card-flash-green var(--anim-beat) steps(2,end) 1.5s both;}
  [data-deck-active] .hp-seq-power .hp-card.step2{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 3.5s both,hp-card-flash-green var(--anim-beat) steps(2,end) 3.5s both;}
  [data-deck-active] .hp-seq-power .hp-card.step3{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 5.5s both,hp-card-flash-green var(--anim-beat) steps(2,end) 5.5s both;}

  [data-deck-active] .problem-stages .then{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 1.5s both;}
  [data-deck-active] .problem-stages .now{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 7.5s both;}
  [data-deck-active] .problem-stages .next{animation:game-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 13.5s both;}
  [data-deck-active] .problem-list .dmg1{animation:bullet-in var(--anim-beat) cubic-bezier(.16,1,.3,1) 3.5s both,bullet-flash-red var(--anim-beat) linear 3.5s forwards,bullet-flash-red var(--anim-beat) linear 9.5s forwards,bullet-flash-red var(--anim-beat) linear 15.5s forwards;}
  [data-deck-active] .problem-list .dmg2{animation:bullet-in var(--anim-beat) cubic-bezier(.16,1,.3,1) 9.5s both,bullet-flash-red var(--anim-beat) linear 9.5s forwards,bullet-flash-red var(--anim-beat) linear 15.5s forwards;}
  [data-deck-active] .problem-list .dmg3{animation:bullet-in var(--anim-beat) cubic-bezier(.16,1,.3,1) 15.5s both,bullet-flash-red var(--anim-beat) linear 15.5s forwards;}
  [data-deck-active] .problem-list .need1{animation:bullet-in var(--anim-beat) cubic-bezier(.16,1,.3,1) 5.5s both;}
  [data-deck-active] .problem-list .need2{animation:bullet-in var(--anim-beat) cubic-bezier(.16,1,.3,1) 11.5s both;}
  [data-deck-active] .problem-list .need3{animation:bullet-in var(--anim-beat) cubic-bezier(.16,1,.3,1) 17.5s both;}

  [data-deck-active] .hp-damage-4step .hp-fill{animation:hp-damage-4step 8s steps(1,end) 1.5s both;}
  [data-deck-active] .hp-damage-4step .hp-track{animation:hp-track-flash-red-4 8s linear 1.5s forwards;}
  [data-deck-active] .hp-problem-flow .hp-fill{animation:hp-damage-problem-flow 14s steps(1,end) 3.5s both;}
  [data-deck-active] .hp-problem-flow .hp-track{animation:hp-track-flash-red-problem 14s linear 3.5s forwards;}
  [data-deck-active] .hp-heal-4step .hp-fill{animation:hp-heal-4step 8s steps(1,end) 1.5s both;}
  [data-deck-active] .hp-heal-4step .hp-track{animation:hp-track-flash-green-4 8s linear 1.5s forwards;}
  [data-deck-active] .hp-power-up-3step .hp-fill{animation:hp-power-up-3step 6s steps(1,end) 1.5s both;}
  [data-deck-active] .hp-power-up-3step .hp-track{animation:hp-track-flash-green-3 6s linear 1.5s forwards;}

  [data-deck-active] .hp-damage-4step .hp-pop.pop1,[data-deck-active] .hp-heal-4step .hp-pop.pop1,[data-deck-active] .hp-power-up-3step .hp-pop.pop1{animation:hp-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 1.5s both;}
  [data-deck-active] .hp-damage-4step .hp-pop.pop2,[data-deck-active] .hp-heal-4step .hp-pop.pop2,[data-deck-active] .hp-power-up-3step .hp-pop.pop2{animation:hp-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 3.5s both;}
  [data-deck-active] .hp-damage-4step .hp-pop.pop3,[data-deck-active] .hp-heal-4step .hp-pop.pop3,[data-deck-active] .hp-power-up-3step .hp-pop.pop3{animation:hp-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 5.5s both;}
  [data-deck-active] .hp-damage-4step .hp-pop.pop4,[data-deck-active] .hp-heal-4step .hp-pop.pop4{animation:hp-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 7.5s both;}
  [data-deck-active] .hp-problem-flow .hp-pop.pop1{animation:hp-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 3.5s both;}
  [data-deck-active] .hp-problem-flow .hp-pop.pop2{animation:hp-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 9.5s both;}
  [data-deck-active] .hp-problem-flow .hp-pop.pop3{animation:hp-pop var(--anim-beat) cubic-bezier(.16,1,.3,1) 15.5s both;}

  [data-deck-active] .hp-damage-4step .hpv.initial{animation:hp-value-window 1.5s linear 0s forwards;}
  [data-deck-active] .hp-damage-4step .hpv.step1{animation:hp-value-window var(--anim-beat) linear 1.5s forwards;}
  [data-deck-active] .hp-damage-4step .hpv.step2{animation:hp-value-window var(--anim-beat) linear 3.5s forwards;}
  [data-deck-active] .hp-damage-4step .hpv.step3{animation:hp-value-window var(--anim-beat) linear 5.5s forwards;}
  [data-deck-active] .hp-damage-4step .hpv.step4{animation:hp-value-final .01s linear 7.5s forwards;}
  [data-deck-active] .hp-problem-flow .hpv.initial{animation:hp-value-window 3.5s linear 0s forwards;}
  [data-deck-active] .hp-problem-flow .hpv.step1{animation:hp-value-window 6s linear 3.5s forwards;}
  [data-deck-active] .hp-problem-flow .hpv.step2{animation:hp-value-window 6s linear 9.5s forwards;}
  [data-deck-active] .hp-problem-flow .hpv.step3{animation:hp-value-final .01s linear 15.5s forwards;}
  [data-deck-active] .hp-heal-4step .hpv.initial{animation:hp-value-window 1.5s linear 0s forwards;}
  [data-deck-active] .hp-heal-4step .hpv.step1{animation:hp-value-window var(--anim-beat) linear 1.5s forwards;}
  [data-deck-active] .hp-heal-4step .hpv.step2{animation:hp-value-window var(--anim-beat) linear 3.5s forwards;}
  [data-deck-active] .hp-heal-4step .hpv.step3{animation:hp-value-window var(--anim-beat) linear 5.5s forwards;}
  [data-deck-active] .hp-heal-4step .hpv.step4{animation:hp-value-final .01s linear 7.5s forwards;}
  [data-deck-active] .hp-power-up-3step .hpv.initial{animation:hp-value-window 1.5s linear 0s forwards;}
  [data-deck-active] .hp-power-up-3step .hpv.step1{animation:hp-value-window var(--anim-beat) linear 1.5s forwards;}
  [data-deck-active] .hp-power-up-3step .hpv.step2{animation:hp-value-window var(--anim-beat) linear 3.5s forwards;}
  [data-deck-active] .hp-power-up-3step .hpv.step3{animation:hp-value-final .01s linear 5.5s forwards;}
}
@keyframes quest-screen-in{from{opacity:0;clip-path:inset(0 100% 0 0);}to{opacity:1;clip-path:inset(0);}}
@keyframes quest-type{from{max-width:0;}to{max-width:780px;}}
@keyframes quest-progress{from{transform:scaleX(0);}to{transform:scaleX(1);}}
@keyframes status-blink{50%{opacity:.15;}}
@keyframes progress-hide{to{opacity:0;}}
@keyframes complete-show{to{opacity:1;}}
@keyframes complete-pulse{50%{opacity:.35;}}
@keyframes game-pop{from{opacity:0;transform:translateY(14px) scale(.98);filter:brightness(.7);}to{opacity:1;transform:none;filter:none;}}
@keyframes arrow-draw{from{opacity:0;transform:translateX(-18px) scaleX(.6);}to{opacity:1;transform:none;}}
@keyframes bullet-in{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}
@keyframes hp-value-window{0%,99%{opacity:1;}100%{opacity:0;}}
@keyframes hp-value-final{to{opacity:1;}}
@keyframes hp-pop{
  0%{opacity:0;transform:translate(-12px,8px) scale(.88);}
  18%{opacity:1;transform:translate(4px,-3px) scale(1);}
  72%{opacity:1;transform:translate(10px,-10px) scale(1);}
  100%{opacity:0;transform:translate(18px,-22px) scale(.94);}
}
@keyframes hp-card-flash-red{
  0%,100%{box-shadow:7px 7px 0 rgba(0,0,0,.5);}
  50%{box-shadow:7px 7px 0 rgba(0,0,0,.5),0 0 34px rgba(255,65,65,.86);border-color:var(--danger);filter:brightness(1.2);}
}
@keyframes hp-card-flash-green{
  0%,100%{box-shadow:7px 7px 0 rgba(0,0,0,.5);}
  50%{box-shadow:7px 7px 0 rgba(0,0,0,.5),0 0 34px rgba(124,226,107,.86);border-color:var(--px-green);filter:brightness(1.2);}
}
@keyframes bullet-flash-red{
  0%,100%{background:transparent;text-shadow:none;}
  15%,85%{background:rgba(255,107,91,.24);text-shadow:0 0 18px rgba(255,65,65,.95);filter:brightness(1.25);}
}
@keyframes hp-damage-4step{
  0%{width:calc(100% - 4px);background:var(--px-green);}
  1%,24.99%{width:calc(85% - 4px);background:#FFD55B;}
  25%,49.99%{width:calc(70% - 4px);background:var(--coin);}
  50%,74.99%{width:calc(65% - 4px);background:#E46A22;}
  75%,100%{width:calc(50% - 4px);background:var(--danger);}
}
@keyframes hp-damage-problem-flow{
  0%{width:calc(50% - 4px);background:var(--danger);}
  1%,42.84%{width:calc(40% - 4px);background:#D33226;}
  42.85%,85.70%{width:calc(30% - 4px);background:#9B1C16;}
  85.71%,100%{width:calc(20% - 4px);background:#5B0505;}
}
@keyframes hp-heal-4step{
  0%{width:calc(20% - 4px);background:#5B0505;}
  1%,24.99%{width:calc(40% - 4px);background:var(--danger);}
  25%,49.99%{width:calc(60% - 4px);background:#E46A22;}
  50%,74.99%{width:calc(80% - 4px);background:var(--yellow);}
  75%,100%{width:calc(100% - 4px);background:var(--px-green);}
}
@keyframes hp-power-up-3step{
  0%{width:calc(50% - 4px);background:#E46A22;}
  1%,49.99%{width:calc(60% - 4px);background:var(--coin);}
  50%,99.99%{width:calc(70% - 4px);background:var(--yellow);}
  100%{width:calc(100% - 4px);background:var(--px-green);}
}
@keyframes hp-track-flash-red-4{
  0%,6%,28%,34%,56%,62%,90%,96%{box-shadow:4px 4px 0 rgba(0,0,0,.45),0 0 32px rgba(255,65,65,.82);border-color:var(--danger);}
  12%,40%,68%,100%{box-shadow:4px 4px 0 rgba(0,0,0,.45);border-color:var(--line2);}
}
@keyframes hp-track-flash-red-3{
  0%,8%,50%,58%,100%{box-shadow:4px 4px 0 rgba(0,0,0,.45),0 0 32px rgba(255,65,65,.82);border-color:var(--danger);}
  16%,66%{box-shadow:4px 4px 0 rgba(0,0,0,.45);border-color:var(--line2);}
}
@keyframes hp-track-flash-red-problem{
  0%,8%,42.85%,50.85%,85.71%,93.71%{box-shadow:4px 4px 0 rgba(0,0,0,.45),0 0 32px rgba(255,65,65,.82);border-color:var(--danger);}
  16%,58.85%,100%{box-shadow:4px 4px 0 rgba(0,0,0,.45);border-color:var(--line2);}
}
@keyframes hp-track-flash-green-4{
  0%,6%,30%,36%,60%,66%,90%,96%{box-shadow:4px 4px 0 rgba(0,0,0,.45),0 0 32px rgba(124,226,107,.86);border-color:var(--px-green);}
  12%,42%,72%,100%{box-shadow:4px 4px 0 rgba(0,0,0,.45);border-color:var(--line2);}
}
@keyframes hp-track-flash-green-3{
  0%,8%,50%,58%,100%{box-shadow:4px 4px 0 rgba(0,0,0,.45),0 0 32px rgba(124,226,107,.86);border-color:var(--px-green);}
  16%,66%{box-shadow:4px 4px 0 rgba(0,0,0,.45);border-color:var(--line2);}
}

/* ---- location inset photo (slide 14) -------------------------------------- */
.locinset{position:absolute;right:var(--pad-x);bottom:120px;width:500px;aspect-ratio:16/10;
  border:3px solid var(--yellow);border-radius:4px;overflow:hidden;box-shadow:8px 8px 0 rgba(0,0,0,.6);z-index:3;}
.locinset img{width:100%;height:100%;object-fit:cover;display:block;}
.locinset .tag{position:absolute;left:12px;bottom:12px;font-family:var(--font-pixel);font-size:10px;
  color:#0A0A0A;background:var(--yellow);padding:5px 8px;border-radius:2px;box-shadow:2px 2px 0 rgba(0,0,0,.5);}

/* ============================================================================
   MODE SELECT + GAMEPLAY SEQUENCE (slides 05-08)
   Legacy/Co-op mode select screens + RPG gameplay scenes.
   Convention: base styles = final printable end state. All motion lives behind
   [data-deck-active] inside the reduced-motion media query, keyed by absolute
   timeline delays (inline --t0 show / --t1 hide custom props) so the deck's
   anim stepper can scrub every beat.
   ============================================================================ */

/* -- generic timeline windows ----------------------------------------------- */
/* .gs = visible at rest (part of the final state), enters at --t0            */
/* .gw = hidden at rest (transient), shows at --t0, hides at --t1             */
.gw{opacity:0;}

/* -- mode select screen ------------------------------------------------------ */
.ms-banner{font-family:var(--font-pixel);font-size:40px;color:var(--yellow);text-align:center;
  letter-spacing:.06em;line-height:1.2;}
.ms-grid{display:grid;grid-template-columns:1fr 1fr;gap:48px;width:100%;max-width:1560px;
  margin:40px auto 0;}
.ms-card{position:relative;background:var(--panel);border:2px solid var(--line2);border-radius:4px;
  padding:34px 32px 36px;box-shadow:7px 7px 0 rgba(0,0,0,.5);
  display:flex;flex-direction:column;gap:26px;align-items:center;}
.ms-card .mst{font-family:var(--font-pixel);font-size:34px;color:var(--fg);letter-spacing:.04em;}
.ms-card .msmini{width:100%;height:300px;}
.ms-card .msl{display:none !important;}
.ms-card .msl{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px;width:100%;}
.ms-card .msl li{font-family:var(--font-body);font-size:19px;color:var(--dim);line-height:1.3;
  display:flex;align-items:center;gap:11px;}
.ms-card .msl li::before{content:"";width:8px;height:8px;background:var(--dim2);
  transform:rotate(45deg);flex:0 0 auto;}
.ms-card.is-sel{border-color:var(--yellow);
  box-shadow:7px 7px 0 rgba(0,0,0,.5),0 0 36px rgba(255,252,82,.34);}
.ms-card.is-sel .msl li::before{background:var(--yellow);}
.ms-card.is-sel.grn{border-color:var(--px-green);
  box-shadow:7px 7px 0 rgba(0,0,0,.5),0 0 36px rgba(124,226,107,.4);}
.ms-card.is-sel.grn .msl li::before{background:var(--px-green);}
.ms-pick{position:absolute;top:-13px;left:50%;transform:translateX(-50%);
  font-family:var(--font-pixel);font-size:10px;color:var(--ink);background:var(--yellow);
  padding:5px 9px;border-radius:2px;box-shadow:2px 2px 0 rgba(0,0,0,.5);white-space:nowrap;}
.ms-pick.grn{background:var(--px-green);}
.ms-card.is-dead{filter:grayscale(1);opacity:.5;}
.ms-x{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  font-family:var(--font-pixel);font-size:120px;color:var(--danger);
  text-shadow:0 0 28px rgba(255,107,91,.65);transform:rotate(-8deg);pointer-events:none;
  filter:none;z-index:2;}
.ms-card .msmini .mn{fill:var(--ink2);stroke-width:2.5;}
.ms-card .msmini .mn.b{stroke:var(--blue);} .ms-card .msmini .mn.y{stroke:var(--yellow);}
.ms-card .msmini .mn.c{stroke:var(--px-cyan);} .ms-card .msmini .mn.g{stroke:var(--px-green);}
.ms-card .msmini .ml{stroke:var(--line2);stroke-width:2.5;stroke-dasharray:3 8;stroke-linecap:round;}
.ms-card .msmini text{font-family:var(--font-disp);font-weight:700;font-size:15px;fill:var(--dim);
  text-anchor:middle;}
.ms-continue{appearance:none;border:0;font-family:var(--font-pixel);font-size:14px;color:var(--ink);
  background:var(--yellow);padding:16px 26px;border-radius:2px;cursor:pointer;
  box-shadow:4px 4px 0 rgba(0,0,0,.55);letter-spacing:.02em;
  display:inline-flex;align-items:center;gap:12px;margin:30px auto 0;}
.ms-continue .dot{width:9px;height:9px;background:var(--ink);border-radius:50%;flex:0 0 auto;}
.ms-continue.grn{background:var(--px-green);}
.ms-continue:hover{background:var(--fg);}

/* -- gameplay screen layout (v2: hero diagram, round+chat lower-left) ---------- */
.gp-grid{flex:1;display:grid;grid-template-columns:440px 1fr;
  grid-template-rows:auto minmax(0,1fr);gap:16px 28px;min-height:0;margin-top:14px;
  grid-template-areas:
    "head head"
    "side stage";}
.gp-head{grid-area:head;display:flex;align-items:baseline;gap:30px;min-height:30px;}
.gp-head .gmt{font-family:var(--font-pixel);font-size:22px;color:var(--yellow);white-space:nowrap;}
.gp-head .gmt.grn{color:var(--px-green);}
.gp-head .gq{font-family:var(--font-pixel);font-size:10px;color:var(--dim2);letter-spacing:.04em;
  white-space:nowrap;padding-bottom:2px;}
/* lower-left column: ROUND label stacked above the (shorter) chat, bottom-aligned */
.gp-side{grid-area:side;display:flex;flex-direction:column;justify-content:flex-end;
  gap:18px;min-height:0;}
/* round / phase label — large, above the chat */
.gp-phase{position:relative;height:34px;}
.gp-phase span{position:absolute;left:0;top:0;
  font-family:var(--font-pixel);font-size:30px;color:var(--px-cyan);white-space:nowrap;
  letter-spacing:.04em;text-shadow:0 2px 10px rgba(0,0,0,.8);}

/* chat / dialogue panel — shorter box */
.gchat{background:var(--panel);border:2px solid var(--line2);border-radius:4px;
  box-shadow:6px 6px 0 rgba(0,0,0,.5);padding:18px 22px;position:relative;overflow:hidden;
  display:flex;flex-direction:column;flex:0 0 auto;height:340px;}
.gchat .ch{font-family:var(--font-pixel);font-size:13px;color:var(--yellow);
  padding-bottom:14px;border-bottom:1px solid var(--line);flex:0 0 auto;}
.gchat .ch.grn{color:var(--px-green);}
.gchat .cbody{position:relative;flex:1;min-height:0;}
.cblock{position:absolute;inset:16px 0 0 0;display:flex;flex-direction:column;gap:13px;}
.cl{font-family:var(--font-body);font-size:18px;line-height:1.4;color:var(--fg);
  display:flex;gap:11px;align-items:flex-start;}
.cl .n{font-family:var(--font-pixel);font-size:11px;color:var(--yellow);padding-top:5px;flex:0 0 auto;}
.cl .tx{display:inline;}
.cl.intro-line{font-size:18px;color:var(--fg);}
/* RPG typewriter caret */
.cl .car{display:inline-block;width:.5em;color:var(--px-cyan);
  animation:caret-blink .8s steps(2,end) infinite;}
.cr-ent{display:flex;gap:14px;align-items:flex-start;}
.cr-ent .chip{width:46px;height:46px;}
.cr-ent .chip svg{width:24px;height:24px;}
.cr-ent .crx{display:flex;flex-direction:column;gap:3px;}
.cr-ent .crx b{font-family:var(--font-disp);font-weight:800;font-size:20px;color:var(--fg);}
.cr-ent .crx span{font-family:var(--font-body);font-size:17px;color:var(--dim);line-height:1.35;}
/* final comparison card (end of co-op) */
.cmp{display:flex;flex-direction:column;gap:14px;margin-top:4px;}
.cmp .cmprow{display:flex;align-items:center;gap:14px;background:var(--ink2);
  border:2px solid var(--line2);border-radius:3px;padding:14px 18px;}
.cmp .cmprow b{font-family:var(--font-pixel);font-size:12px;color:var(--dim2);flex:1;}
.cmp .cmprow .mk{font-family:var(--font-pixel);font-size:15px;}
.cmp .cmprow.lose{opacity:.6;}
.cmp .cmprow.lose .mk{color:var(--danger);}
.cmp .cmprow.win{border-color:var(--px-green);box-shadow:0 0 18px rgba(124,226,107,.3);}
.cmp .cmprow.win b{color:var(--fg);}
.cmp .cmprow.win .mk{color:var(--px-green);}
.cmp .cmpnote{font-family:var(--font-body);font-size:18px;color:var(--dim);line-height:1.45;}

/* hero stage — fixed 1180-wide logical canvas, zoomed up 50% (chars + flights bigger) */
.gstage{grid-area:stage;position:relative;width:1180px;height:540px;zoom:1.2;
  justify-self:center;align-self:center;overflow:visible;}
.gstage .wires{position:absolute;left:0;top:0;overflow:visible;}
.gstage .ar{stroke:var(--line2);stroke-width:3;stroke-dasharray:2 10;stroke-linecap:round;fill:none;}
.gnode{position:absolute;width:150px;display:flex;flex-direction:column;align-items:center;gap:9px;
  text-align:center;z-index:2;}
.gnode .chip{width:84px;height:84px;}
.gnode .chip svg{width:42px;height:42px;}
.gnode .gnm{font-family:var(--font-disp);font-weight:800;font-size:20px;color:var(--fg);line-height:1.1;}
.gnode .gnr{font-family:var(--font-body);font-size:14px;color:var(--dim);line-height:1.3;}
.gnode.mk-dim{filter:saturate(.5) brightness(.72);opacity:.85;}
.gnode.mk-glow .chip{border-color:var(--px-green);
  box-shadow:3px 3px 0 rgba(0,0,0,.5),0 0 30px rgba(124,226,107,.75);color:var(--px-green);}

/* floating tool item */
.tf{position:absolute;z-index:4;}
.tfc{width:52px;height:52px;background:var(--ink2);border:2px solid var(--coin);border-radius:3px;
  box-shadow:3px 3px 0 rgba(0,0,0,.5),0 0 16px rgba(255,201,60,.3);
  display:flex;align-items:center;justify-content:center;color:var(--coin);position:relative;}
.tfc svg{width:26px;height:26px;}
.tfc .ico{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;}
.tfl{position:relative;margin-top:7px;height:12px;width:52px;}
.tfl span{position:absolute;left:50%;transform:translateX(-50%);font-family:var(--font-pixel);
  font-size:8px;color:var(--coin);white-space:nowrap;text-shadow:0 1px 4px rgba(0,0,0,.9);}
.tf.coin .tfc{border-radius:50%;border-color:var(--coin);background:#1A1406;}
/* stage popup tags (approved / cut / paid) */
.gpop{position:absolute;z-index:5;font-family:var(--font-pixel);font-size:9px;padding:6px 8px;
  border-radius:2px;background:var(--ink2);white-space:nowrap;box-shadow:2px 2px 0 rgba(0,0,0,.5);}
.gpop.ok{color:var(--px-green);border:2px solid var(--px-green);}
.gpop.warn{color:var(--coin);border:2px solid var(--coin);}
.gpop.bad{color:var(--danger);border:2px solid var(--danger);}
/* broadcast copies (co-op fan-out) */
.bc{position:absolute;z-index:3;width:40px;height:40px;background:var(--ink2);
  border:2px solid var(--px-green);border-radius:3px;display:flex;align-items:center;
  justify-content:center;color:var(--px-green);box-shadow:0 0 14px rgba(124,226,107,.35);}
.bc svg{width:20px;height:20px;}
.bc.coinbc{border-radius:50%;border-color:var(--coin);color:var(--coin);
  box-shadow:0 0 14px rgba(255,201,60,.45);background:#1A1406;}

/* map + progress panel */
.gmap{grid-area:map;background:var(--panel);border:2px solid var(--line2);border-radius:4px;
  box-shadow:6px 6px 0 rgba(0,0,0,.5);padding:20px 22px 18px;display:flex;flex-direction:column;
  gap:14px;align-self:start;}
.gmap .mh{display:flex;justify-content:space-between;align-items:center;
  font-family:var(--font-pixel);font-size:12px;color:var(--yellow);}
.gmap .mh.grn{color:var(--px-green);}
/* mini flow-shape map: a small replica of the stage that lights up per round */
.mmini{position:relative;width:100%;height:152px;margin:2px 0 4px;}
.mmini .mn{position:absolute;width:34px;height:34px;border:2px solid var(--line2);border-radius:4px;
  background:var(--ink2);display:flex;align-items:center;justify-content:center;
  box-shadow:2px 2px 0 rgba(0,0,0,.5);z-index:2;--lc:var(--yellow);}
.mmini .mn svg{width:17px;height:17px;color:var(--dim2);}
.mmini .mn.blue{--lc:var(--blue);}
.mmini .mn.cyan{--lc:var(--px-cyan);}
.mmini .mn.green{--lc:var(--px-green);}
.mmini .mwire{position:absolute;left:0;top:0;overflow:visible;z-index:1;}
.mmini .mwire line{stroke:var(--line2);stroke-width:2;stroke-dasharray:2 6;stroke-linecap:round;}
.gprog{display:flex;align-items:center;gap:12px;}
.gprog .pk{font-family:var(--font-pixel);font-size:9px;color:var(--dim);white-space:nowrap;}
.ptrack{flex:1;height:18px;background:rgba(245,245,240,.08);border:2px solid var(--line2);
  border-radius:3px;position:relative;box-shadow:3px 3px 0 rgba(0,0,0,.4);}
.pfill{position:absolute;left:2px;top:2px;bottom:2px;}
.pfill.lg-end{width:calc(100% - 4px);background:var(--danger);}
.pfill.cp-end{width:calc(100% - 4px);background:var(--px-green);}
.pstat{position:relative;height:15px;}
.pstat span{position:absolute;left:0;top:0;font-family:var(--font-pixel);font-size:10px;
  white-space:nowrap;letter-spacing:.02em;}
.pstat .running{color:var(--px-cyan);}
.pstat .verdict.bad{color:var(--danger);}
.pstat .verdict.good{color:var(--px-green);}

/* tools inventory — wide bottom strip, single horizontal row */
.gtools{grid-area:tools;background:var(--panel);border:2px solid var(--line2);border-radius:4px;
  box-shadow:6px 6px 0 rgba(0,0,0,.5);padding:14px 20px;display:flex;align-items:center;gap:18px;
  min-height:0;}
.gtools .th{font-family:var(--font-pixel);font-size:12px;color:var(--yellow);white-space:nowrap;
  writing-mode:vertical-rl;transform:rotate(180deg);align-self:stretch;display:flex;
  align-items:center;justify-content:center;letter-spacing:.1em;flex:0 0 auto;
  border-right:1px solid var(--line);padding-right:14px;}
.tgrid{display:grid;grid-template-columns:repeat(8,1fr);gap:14px;flex:1;}
.tli{display:flex;flex-direction:column;align-items:center;gap:7px;padding:12px 4px 9px;
  background:var(--ink2);border:2px solid var(--line2);border-radius:3px;color:var(--dim);}
.tli svg{width:22px;height:22px;stroke-width:2;}
.tli b{font-family:var(--font-pixel);font-size:7px;color:inherit;text-align:center;
  line-height:1.6;text-transform:uppercase;letter-spacing:.04em;font-weight:400;}

/* ---- gameplay sequence motion (gated, scrubbed by the anim stepper) -------- */
@media (prefers-reduced-motion:no-preference){
  /* generic show / show+hide windows */
  [data-deck-active] :is(.gs,.gw){
    animation:gp-in .45s cubic-bezier(.16,1,.3,1) both var(--t0,0s),
              gp-out .3s ease forwards var(--t1,9999s);}
  [data-deck-active] :is(.gs,.gw).fu{
    animation:gp-in-up .55s cubic-bezier(.16,1,.3,1) both var(--t0,0s),
              gp-out .3s ease forwards var(--t1,9999s);}
  /* phase label: enter + retro flash + exit */
  [data-deck-active] .phl{
    animation:gp-in .35s cubic-bezier(.16,1,.3,1) both var(--t0,0s),
              lbl-flash .42s steps(2,end) var(--t0,0s) 3,
              gp-out .25s ease forwards var(--t1,9999s);}
  /* chat line: row fades in at --t0; text is typed letter-by-letter by the stepper */
  [data-deck-active] .cl{animation:gp-in .2s linear both var(--t0,0s);}
  /* node role subheading: fades out once the players have been introduced */
  [data-deck-active] .gnr{animation:gp-out .3s ease forwards var(--tnr,9999s);}
  /* mini-map node lights up as its round lands */
  [data-deck-active] .mmini .mn{animation:mn-light .4s ease forwards var(--t0,9999s);}
  [data-deck-active] .mmini .mn svg{animation:mn-icon .4s ease forwards var(--t0,9999s);}
  /* tool flight segments: nested wrappers compose translations */
  [data-deck-active] .seg{animation:tf-move var(--d,1.1s) cubic-bezier(.5,.05,.3,1) both var(--t,9999s);}
  [data-deck-active] .shr{animation:tf-shrink .5s ease both var(--t,9999s),
              tf-shrink2 .5s ease forwards var(--t2,9999s),
              tf-shrink3 .5s ease forwards var(--t3,9999s);}
  [data-deck-active] .tfc{animation:tf-bob 2.6s ease-in-out infinite alternate;}
  /* arrow + node pulses: up to 6 / 5 slots, unused default far future */
  [data-deck-active] .ar{
    animation:arrow-pulse 1.9s linear var(--p1,9999s), arrow-pulse 1.9s linear var(--p2,9999s),
              arrow-pulse 1.9s linear var(--p3,9999s), arrow-pulse 1.9s linear var(--p4,9999s),
              arrow-pulse 1.9s linear var(--p5,9999s), arrow-pulse 1.9s linear var(--p6,9999s);}
  [data-deck-active] .ar.grn{
    animation:arrow-pulse-g 1.9s linear var(--p1,9999s), arrow-pulse-g 1.9s linear var(--p2,9999s),
              arrow-pulse-g 1.9s linear var(--p3,9999s), arrow-pulse-g 1.9s linear var(--p4,9999s),
              arrow-pulse-g 1.9s linear var(--p5,9999s), arrow-pulse-g 1.9s linear var(--p6,9999s);}
  [data-deck-active] .gnode .chip{
    animation:node-ping .7s ease var(--n1,9999s), node-ping .7s ease var(--n2,9999s),
              node-ping .7s ease var(--n3,9999s), node-ping .7s ease var(--n4,9999s),
              node-ping .7s ease var(--n5,9999s);}
  /* co-op party slides from legacy zigzag into the current center-ring formation
     (--n pulse slots are set on the node and inherit down to the chip rule) */
  [data-deck-active] .co-form .gnode{
    animation:form-shift 1.85s cubic-bezier(.45,0,.2,1) both .45s;}
  /* maker end states animate FROM normal (base = end state); --tdim/--tglow keep
     these separate from the node's own --t0 entrance time */
  [data-deck-active] .gnode.mk-dim{
    animation:gp-in .45s cubic-bezier(.16,1,.3,1) both var(--t0,0s),
              mk-dim-in .8s ease forwards var(--tdim,9999s);}
  [data-deck-active] .gnode.mk-glow .chip{
    animation:node-ping .7s ease var(--n1,9999s), node-ping .7s ease var(--n2,9999s),
              node-ping .7s ease var(--n3,9999s), node-ping .7s ease var(--n4,9999s),
              node-ping .7s ease var(--n5,9999s),
              mk-glow-in .8s ease forwards var(--tglow,9999s);}
  /* map glow pulses at scene open */
  [data-deck-active] .gmap.glow-y{animation:map-glow-y 1.4s ease .15s 2;}
  [data-deck-active] .gmap.glow-g{animation:map-glow-g 1.4s ease .15s 2;}
  /* progress meter: pw0 pins the 5% start, later steps win in list order */
  [data-deck-active] .pfill.lg-end{animation:
    prg-start .01s linear both,
    lgp1 .5s ease forwards var(--q1), lgp2 .5s ease forwards var(--q2),
    lgp3 .5s ease forwards var(--q3), lgp4 .5s ease forwards var(--q4),
    lgp5 .5s ease forwards var(--q5), lgp6 .5s ease forwards var(--q6),
    lgp7 .5s ease forwards var(--q7);}
  [data-deck-active] .pfill.cp-end{animation:
    prg-start .01s linear both,
    cpp1 .5s ease forwards var(--q1), cpp2 .5s ease forwards var(--q2),
    cpp3 .5s ease forwards var(--q3), cpp4 .5s ease forwards var(--q4),
    cpp5 .5s ease forwards var(--q5);}
  /* status badge blink while running */
  [data-deck-active] .pstat .running{animation:
    gp-in .2s linear both var(--t0,0s), status-blink .9s steps(2,end) var(--t0,0s) infinite,
    gp-out .01s linear forwards var(--t1,9999s);}
  /* tools inventory active highlight window */
  [data-deck-active] .tli.live{
    animation:tool-on .3s ease both var(--t0,9999s), tool-off .35s ease forwards var(--t1,9999s);}
  /* mode select */
  [data-deck-active] .ms-card.is-sel{animation:sel-in 1.3s ease both var(--t0,1.5s);}
  [data-deck-active] .ms-card.is-sel.grn{animation:sel-in-g 1.3s ease both var(--t0,1.5s);}
  [data-deck-active] .ms-card.is-dead{animation:dead-in .9s ease both var(--t0,1.5s);}
  [data-deck-active] .ms-x{animation:stamp-pop .5s cubic-bezier(.16,1,.3,1) both var(--t0,1.5s);}
  [data-deck-active] .ms-continue{
    animation:gp-in-up .5s cubic-bezier(.16,1,.3,1) both var(--t0,3.5s),
              ms-blink 1.05s steps(2,end) var(--t0,3.5s) infinite;}
  /* broadcast ping ring */
  [data-deck-active] .ring{animation:ring-out .9s ease-out forwards var(--t0,9999s);}
}
.ring{position:absolute;border:2px solid var(--px-green);border-radius:50%;
  width:60px;height:60px;opacity:0;pointer-events:none;z-index:1;}

@keyframes gp-in{from{opacity:0;transform:translateY(12px);}to{opacity:1;transform:none;}}
@keyframes gp-in-up{from{opacity:0;transform:translateY(-42px);}to{opacity:1;transform:none;}}
@keyframes gp-out{from{opacity:1;}to{opacity:0;}}
@keyframes lbl-flash{50%{opacity:.1;}}
@keyframes caret-blink{50%{opacity:0;}}
@keyframes mn-light{to{border-color:var(--lc);background:var(--lc);
  box-shadow:2px 2px 0 rgba(0,0,0,.5),0 0 14px var(--lc);}}
@keyframes mn-icon{to{color:var(--ink);}}
@keyframes tf-move{from{transform:translate(0,0);}to{transform:translate(var(--dx,0px),var(--dy,0px));}}
@keyframes tf-shrink{to{transform:scale(var(--sc,.72));}}
@keyframes tf-shrink2{to{transform:scale(var(--sc2,.72));}}
@keyframes tf-shrink3{to{transform:scale(var(--sc3,.62));}}
@keyframes tf-bob{from{transform:translateY(-3px);}to{transform:translateY(3px);}}
@keyframes arrow-pulse{0%,100%{stroke:rgba(245,245,240,.30);filter:none;}
  20%,80%{stroke:var(--yellow);filter:drop-shadow(0 0 7px rgba(255,252,82,.85));}}
@keyframes arrow-pulse-g{0%,100%{stroke:rgba(245,245,240,.30);filter:none;}
  20%,80%{stroke:var(--px-green);filter:drop-shadow(0 0 7px rgba(124,226,107,.85));}}
@keyframes node-ping{0%,100%{box-shadow:3px 3px 0 rgba(0,0,0,.5);transform:none;}
  45%{box-shadow:3px 3px 0 rgba(0,0,0,.5),0 0 26px rgba(255,252,82,.7);transform:translateY(-4px);}}
@keyframes form-shift{from{transform:translate(var(--fx,0px),var(--fy,0px));}to{transform:none;}}
@keyframes mk-dim-in{from{filter:none;opacity:1;}to{filter:saturate(.5) brightness(.72);opacity:.85;}}
@keyframes mk-glow-in{from{border-color:var(--line2);box-shadow:3px 3px 0 rgba(0,0,0,.5);color:var(--px-green);}
  to{border-color:var(--px-green);box-shadow:3px 3px 0 rgba(0,0,0,.5),0 0 30px rgba(124,226,107,.75);}}
@keyframes map-glow-y{0%,100%{box-shadow:6px 6px 0 rgba(0,0,0,.5);border-color:var(--line2);}
  50%{box-shadow:6px 6px 0 rgba(0,0,0,.5),0 0 34px rgba(255,252,82,.6);border-color:var(--yellow);}}
@keyframes map-glow-g{0%,100%{box-shadow:6px 6px 0 rgba(0,0,0,.5);border-color:var(--line2);}
  50%{box-shadow:6px 6px 0 rgba(0,0,0,.5),0 0 34px rgba(124,226,107,.62);border-color:var(--px-green);}}
@keyframes prg-start{to{width:5%;background:var(--yellow);}}
@keyframes lgp1{to{width:18%;background:var(--yellow);}}
@keyframes lgp2{to{width:31%;background:#FFD55B;}}
@keyframes lgp3{to{width:44%;background:var(--coin);}}
@keyframes lgp4{to{width:57%;background:#F09A3E;}}
@keyframes lgp5{to{width:70%;background:#E46A22;}}
@keyframes lgp6{to{width:84%;background:#D85530;}}
@keyframes lgp7{to{width:calc(100% - 4px);background:var(--danger);}}
@keyframes cpp1{to{width:24%;background:var(--yellow);}}
@keyframes cpp2{to{width:43%;background:var(--px-cyan);}}
@keyframes cpp3{to{width:62%;background:var(--blue);}}
@keyframes cpp4{to{width:81%;background:#5FCFA6;}}
@keyframes cpp5{to{width:calc(100% - 4px);background:var(--px-green);}}
@keyframes tool-on{to{border-color:var(--coin);color:var(--coin);
  box-shadow:0 0 16px rgba(255,201,60,.5);}}
@keyframes tool-off{from{border-color:var(--coin);color:var(--coin);
  box-shadow:0 0 16px rgba(255,201,60,.5);}
  to{border-color:var(--line2);color:var(--dim);box-shadow:none;}}
@keyframes sel-in{0%{border-color:var(--line2);box-shadow:7px 7px 0 rgba(0,0,0,.5);}
  30%,70%{border-color:var(--yellow);box-shadow:7px 7px 0 rgba(0,0,0,.5),0 0 48px rgba(255,252,82,.55);}
  50%{box-shadow:7px 7px 0 rgba(0,0,0,.5),0 0 22px rgba(255,252,82,.25);}
  100%{border-color:var(--yellow);box-shadow:7px 7px 0 rgba(0,0,0,.5),0 0 36px rgba(255,252,82,.34);}}
@keyframes sel-in-g{0%{border-color:var(--line2);box-shadow:7px 7px 0 rgba(0,0,0,.5);}
  30%,70%{border-color:var(--px-green);box-shadow:7px 7px 0 rgba(0,0,0,.5),0 0 48px rgba(124,226,107,.6);}
  50%{box-shadow:7px 7px 0 rgba(0,0,0,.5),0 0 22px rgba(124,226,107,.28);}
  100%{border-color:var(--px-green);box-shadow:7px 7px 0 rgba(0,0,0,.5),0 0 36px rgba(124,226,107,.4);}}
@keyframes dead-in{from{filter:grayscale(0);opacity:1;}to{filter:grayscale(1);opacity:.5;}}
@keyframes stamp-pop{from{opacity:0;transform:rotate(-8deg) scale(1.7);}
  to{opacity:1;transform:rotate(-8deg) scale(1);}}
@keyframes ms-blink{50%{box-shadow:4px 4px 0 rgba(0,0,0,.55),0 0 26px rgba(255,252,82,.75);
  filter:brightness(1.16);}}
@keyframes ring-out{from{opacity:.85;transform:scale(.4);}to{opacity:0;transform:scale(1.9);}}

/* ============================================================================
   GAMEPLAY v3 — simplified: bigger pieces, round tracker, dramatic legacy
   money, co-op circle/center-hub circulation.  (appended; later source order
   wins over earlier sizing.)  Authored against the same scrub engine:
   .gs = on at --t0 forever, .gw = on in [--t0,--t1].  Round content windows
   extend ~0.4s past each step so every settled beat is fully readable.
   ============================================================================ */

/* -- pieces ~20% bigger ----------------------------------------------------- */
.gnode .chip{width:102px;height:102px;}
.gnode .chip svg{width:50px;height:50px;}
.gnode .gnm{font-size:23px;}
.gnode .gnr{font-size:15px;}
.tfc{width:64px;height:64px;border-width:3px;}
.tfc svg{width:32px;height:32px;}
.tfl{width:64px;margin-top:8px;}
.tfl span{font-size:9px;}
.bc{width:50px;height:50px;}
.bc svg{width:25px;height:25px;}

/* -- static key-players caption under the head ------------------------------ */
.gp-head .gsub{font-family:var(--font-pixel);font-size:12px;color:var(--px-cyan);
  letter-spacing:.06em;white-space:nowrap;padding-bottom:2px;}
.gp-head .gsub.grn{color:var(--px-green);}

/* -- round tracker (little map of all rounds + current) --------------------- */
/* keep the stage from forcing the whole grid (and head) wider than the slide */
.gp-grid{grid-template-columns:440px minmax(0,1fr);}
.gp-head{gap:22px;min-width:0;}
.rtrack{margin-left:auto;display:flex;align-items:center;gap:10px;flex:0 0 auto;}
.rtrack .rt-lab{font-family:var(--font-pixel);font-size:10px;color:var(--dim2);
  letter-spacing:.06em;white-space:nowrap;}
.rpips{display:flex;gap:6px;}
.rpip{width:22px;height:11px;border:2px solid var(--line2);border-radius:2px;
  background:var(--ink2);position:relative;transform-origin:center;}
.advcue{display:inline-flex;align-items:center;gap:7px;font-family:var(--font-pixel);
  font-size:10px;color:var(--px-cyan);border:2px solid rgba(79,214,224,.5);
  border-radius:2px;padding:6px 9px;letter-spacing:.03em;white-space:nowrap;}
.advcue .ky{display:inline-flex;align-items:center;justify-content:center;
  min-width:16px;height:16px;padding:0 3px;border:1px solid rgba(79,214,224,.7);
  border-radius:2px;color:var(--px-cyan);font-size:10px;}

/* -- co-op stage: circle formation + central hub ---------------------------- */
.gstage.co-ring .ring{border-color:var(--px-green);}
.form-legacy-wires{position:absolute;left:0;top:0;overflow:visible;z-index:1;}
.coring{position:absolute;left:0;top:0;overflow:visible;z-index:1;}
.coring ellipse{fill:none;stroke:var(--line2);stroke-width:3;
  stroke-dasharray:3 11;stroke-linecap:round;}
.gstage.co-ring.co-form .coring ellipse{stroke:rgba(124,226,107,.55);}
.gstage.co-ring.live .coring ellipse{stroke:rgba(124,226,107,.55);}
/* central hub: cycle arrows + the active tool sits here all round */
.hub{position:absolute;width:118px;height:118px;margin:-59px 0 0 -59px;z-index:2;
  display:flex;align-items:center;justify-content:center;}
.hub .hub-cyc{position:absolute;inset:0;color:var(--px-green);opacity:.55;}
.hub .hub-cyc svg{width:118px;height:118px;stroke-width:2.5;}
.hub-label{position:absolute;left:50%;bottom:-22px;transform:translateX(-50%);
  font-family:var(--font-pixel);font-size:8px;color:var(--px-green);white-space:nowrap;opacity:.7;}

/* a small copy that the hub hands to each player's outer edge */
.cc{position:absolute;z-index:4;width:46px;height:46px;background:var(--ink2);
  border:2px solid var(--px-green);border-radius:4px;display:flex;align-items:center;
  justify-content:center;color:var(--px-green);box-shadow:0 0 14px rgba(124,226,107,.4);}
.cc svg{width:24px;height:24px;}
.cc.coin{border-radius:50%;border-color:var(--coin);color:var(--coin);
  background:#1A1406;box-shadow:0 0 14px rgba(255,201,60,.5);}

/* -- legacy money: starts huge, halves dramatically at every handoff -------- */
.tf.bigcoin .tfc{width:104px;height:104px;border-radius:50%;border-color:var(--coin);
  background:#1A1406;box-shadow:4px 4px 0 rgba(0,0,0,.5),0 0 26px rgba(255,201,60,.45);}
.tf.bigcoin .tfc svg{width:52px;height:52px;}
.tf.bigcoin .tfl{width:104px;}
.tf.bigcoin .tfl span{font-size:11px;}
.coinval{position:absolute;top:-12px;left:50%;transform:translateX(-50%);
  font-family:var(--font-pixel);font-size:13px;color:var(--coin);white-space:nowrap;
  text-shadow:0 1px 5px rgba(0,0,0,.9);}

@media (prefers-reduced-motion:no-preference){
  /* round tracker pips: base = pending, active in [--ta,--td], then done */
  [data-deck-active] .rpip{animation:
    pip-active .25s ease forwards var(--ta,9999s),
    pip-done .25s ease forwards var(--td,9999s);}
  /* central hub cycle spin — gated per round (up to 5 distribution beats) */
  [data-deck-active] .hub-cyc{animation:
    hub-spin 1.05s cubic-bezier(.4,0,.3,1) var(--s1,9999s),
    hub-spin 1.05s cubic-bezier(.4,0,.3,1) var(--s2,9999s),
    hub-spin 1.05s cubic-bezier(.4,0,.3,1) var(--s3,9999s),
    hub-spin 1.05s cubic-bezier(.4,0,.3,1) var(--s4,9999s),
    hub-spin 1.05s cubic-bezier(.4,0,.3,1) var(--s5,9999s);}
  /* small copies fly out from the centre to each player's outer edge */
  [data-deck-active] .cc{animation:
    cc-in .55s cubic-bezier(.16,1,.3,1) both var(--t0,9999s),
    gp-out .3s ease forwards var(--t1,9999s);}
  /* formation transition: legacy handoff lines give way to the new co-op circle */
  [data-deck-active] .co-form .form-legacy-wires{
    animation:form-legacy-lines-out 1.05s ease both .45s;}
  [data-deck-active] .co-form .coring{
    animation:form-ring-in 1.15s ease both .55s;}
  [data-deck-active] .co-form .hub{
    animation:form-ring-in .9s ease both 1.05s;}
  /* co-op ring lights up while a round is distributing */
  [data-deck-active] .coring ellipse{animation:
    coring-lit 1.6s ease var(--g1,9999s), coring-lit 1.6s ease var(--g2,9999s),
    coring-lit 1.6s ease var(--g3,9999s), coring-lit 1.6s ease var(--g4,9999s),
    coring-lit 1.6s ease var(--g5,9999s);}
}
@keyframes pip-active{to{background:var(--yellow);border-color:var(--yellow);
  box-shadow:0 0 13px rgba(255,252,82,.7);transform:scaleY(1.3);}}
@keyframes pip-done{to{background:var(--px-green);border-color:var(--px-green);
  box-shadow:none;transform:none;}}
@keyframes hub-spin{from{transform:rotate(0);}to{transform:rotate(360deg);}}
@keyframes cc-in{from{opacity:0;transform:translate(var(--fcx,0px),var(--fcy,0px)) scale(.35);}
  to{opacity:1;transform:none;}}
@keyframes form-legacy-lines-out{
  0%{opacity:1;filter:none;}
  55%{opacity:.55;filter:drop-shadow(0 0 6px rgba(124,226,107,.22));}
  100%{opacity:0;filter:drop-shadow(0 0 10px rgba(124,226,107,0));}
}
@keyframes form-ring-in{
  from{opacity:0;transform:scale(.92);}
  to{opacity:1;transform:none;}
}
@keyframes coring-lit{0%,100%{stroke:var(--line2);}
  30%,70%{stroke:var(--px-green);filter:drop-shadow(0 0 6px rgba(124,226,107,.7));}}

/* advance cue: pulse the STEP affordance when a round is finished & ready to advance.
   .ready is toggled by the stepper only while idle, so this isn't frozen by scrubbing. */
.advcue.ready{border-color:var(--px-cyan);color:var(--px-cyan);
  animation:advcue-ready 1.05s ease-in-out infinite;}
.advcue.ready .ky{border-color:var(--px-cyan);}
@keyframes advcue-ready{0%,100%{box-shadow:0 0 0 rgba(79,214,224,0);}
  50%{box-shadow:0 0 17px rgba(79,214,224,.9);}}

/* mode-select co-op mini: ring of players + central cycle hub (matches the stage) */
.ms-card .msmini .mring{fill:none;stroke:var(--line2);stroke-width:2.5;
  stroke-dasharray:3 8;stroke-linecap:round;}
.ms-card .msmini .cyc{fill:none;stroke:var(--px-green);stroke-width:3;stroke-linecap:round;}
.ms-card .msmini .cyc-h{fill:var(--px-green);stroke:none;}
