@font-face { font-family: 'Cafeteria'; src: url('/fonts/Cafeteria-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }

:root {
  --ink: #120d22;
  --night: #1f1638;
  --plum: #3a2560;
  --steel: #59657a;
  --steel-dark: #2b3240;
  --steel-hi: #b7c2d3;
  --brass: #c9973a;
  --brass-hi: #f3d27c;
  --brain: #ee8db5;
  --toxic: #a6e35a;
  --bolt: #efe9ff;
  --paper: #e8efe1;
  --paper-line: rgba(58, 37, 96, .09);
  --paper-ink: #2a1846;
  --danger: #ff6464;
  --display: 'Cafeteria', 'Arial Black', 'Trebuchet MS', sans-serif;
  --body: 'Segoe UI', Tahoma, Geneva, Verdana, system-ui, sans-serif; /* same as the rest of PvZH Vault */
  --site-bg: #12181b;
  --site-surface: #1b2226;
  --site-line: rgba(255, 255, 255, 0.07);
  --site-text-2: #d3dade;
  --site-muted: #a0aab2;
  --site-accent: #00b4d8;
  --site-gold: #ffd15c;
  --flash: 0;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; }
body { margin: 0; color: #ece6fb; font: 16px/1.5 var(--body); background: var(--ink); overflow-x: hidden; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 100; top: 8px; left: 8px; background: var(--brass-hi); color: #1a1030; padding: 8px 12px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--brass-hi); outline-offset: 3px; }

/* ---------- top bar: floats over the storm ---------- */
.topbar { position: absolute; z-index: 25; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) clamp(12px, 3vw, 28px) 12px; background: linear-gradient(rgba(10, 6, 20, .65), rgba(10, 6, 20, 0)); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.back { display: inline-flex; align-items: center; gap: 6px; color: #cfc6e6; text-decoration: none; font: 600 .9rem var(--body); padding: 6px 8px 6px 2px; border-radius: 8px; }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.back:hover { color: #fff; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.sound-toggle { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer; color: #cfd6e2;
  background: radial-gradient(circle at 40% 30%, #8b95a7, #3a4150 70%); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 2px 6px rgba(0,0,0,.5); }
.sound-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound-toggle[aria-pressed="false"] .wave { opacity: .15; }
.brain-meter { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 9px; border: 0; border-radius: 10px; cursor: pointer; transition: filter .15s;
  background: linear-gradient(#59657a, #2f3646); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px #232836, 0 2px 8px rgba(0,0,0,.5); }
.brain-meter .odometer { font-size: .95rem; padding: 5px 7px; min-width: 3.4em; text-align: center; }
.brain-meter:hover { filter: brightness(1.15); }
.brain-meter:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }
.brass-button { border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; font: 700 1rem/1 var(--display); letter-spacing: .01em; color: #3a2205;
  background: linear-gradient(#f6da8d, #c18e30); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.45); }
.brass-button:hover { filter: brightness(1.07); }
/* ---------- stage ---------- */
.stage { position: relative; padding: 92px clamp(8px, 2.5vw, 32px) 56px; min-height: min(100svh, 820px); display: grid; align-content: center; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 70% at 50% 0%, #2c1e52 0%, #1a1233 45%, var(--ink) 80%); }
.sky { position: absolute; inset: 0; z-index: -3; pointer-events: none; }
.clouds { position: absolute; inset: -10% -20% auto; height: 60%; opacity: .8;
  background: radial-gradient(40% 35% at 20% 30%, rgba(90, 72, 140, .55), transparent 70%), radial-gradient(35% 30% at 70% 20%, rgba(70, 55, 120, .6), transparent 70%), radial-gradient(30% 25% at 45% 50%, rgba(60, 45, 100, .5), transparent 70%);
  filter: blur(18px); animation: drift 60s linear infinite alternate; }
.clouds-near { top: -5%; opacity: .55; animation-duration: 38s; animation-direction: alternate-reverse; filter: blur(26px) brightness(calc(1 + var(--flash) * 1.6)); }
@keyframes drift { to { transform: translateX(8%); } }
.tower { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46%; fill: #0d0919; opacity: .9; }
.tower .lit { fill: var(--toxic); opacity: .55; animation: windowflicker 4s infinite steps(1); }
.tower .lit:nth-of-type(2) { animation-delay: -1.3s; } .tower .lit:nth-of-type(3) { animation-delay: -2.6s; }
@keyframes windowflicker { 0%, 100% { opacity: .55; } 47% { opacity: .2; } 49% { opacity: .6; } }
.rain, .bolts { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rain { z-index: -1; } .bolts { z-index: -2; }
.flash { position: absolute; inset: 0; z-index: 30; pointer-events: none; background: radial-gradient(80% 60% at var(--fx, 50%) 0%, rgba(239, 233, 255, .85), rgba(190, 170, 255, .25) 60%, transparent); opacity: 0; mix-blend-mode: screen; }
.stage.shake { animation: shake .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-6px, 2px); } 40%, 60% { transform: translate(6px, -1px); } }

/* ---------- rig layout ---------- */
.rig { display: flex; align-items: flex-end; justify-content: center; gap: 0; max-width: 1240px; margin: 0 auto; }
.machine { position: relative; flex: 1 1 860px; max-width: 900px; min-width: 0; border-radius: 26px 26px 18px 18px; padding: 0 clamp(10px, 1.8vw, 22px) clamp(12px, 1.8vw, 20px);
  background:
    radial-gradient(circle at 14px 14px, #cfd7e3 2.4px, #3b4352 3.2px, transparent 4px) 0 0 / 100% 100% no-repeat,
    linear-gradient(170deg, #7d899c 0%, #4a5466 38%, #2f3646 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.35), inset 0 -6px 0 rgba(0,0,0,.35), inset 0 0 0 3px #232836, 0 30px 70px rgba(0,0,0,.6), 0 0 calc(60px * var(--flash)) rgba(220, 205, 255, calc(.5 * var(--flash)));
}
.machine::before { content: ''; position: absolute; inset: 10px; border-radius: 20px 20px 12px 12px; pointer-events: none;
  background: radial-gradient(circle, #d9e0ea 0 2px, #2c3240 2.6px 3.4px, transparent 4px) 0 0 / 46px 46px; mask: linear-gradient(#000, #000) padding-box; opacity: .0; }

.marquee { position: relative; margin: -34px auto 10px; width: min(560px, 92%); padding: 16px 28px 12px; border-radius: 22px; text-align: center;
  background: linear-gradient(#4a2a7a, #2a1650); box-shadow: inset 0 0 0 4px var(--brass), inset 0 0 0 7px #3c1f63, 0 10px 30px rgba(0,0,0,.5), 0 0 40px rgba(238,141,181,.25); }
.bulbs { position: absolute; inset: 0; pointer-events: none; }
.bulbs i { position: absolute; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #5a3d2a; box-shadow: inset 0 -2px 2px rgba(0,0,0,.5); }
.bulbs i.on { background: #ffe8a3; box-shadow: 0 0 10px #ffd36b, 0 0 2px #fff; }
.marquee-title { margin: 0; line-height: .95; font-family: var(--display); font-weight: 700; }
.marquee-title .by { display: block; font-size: clamp(.9rem, 1.6vw, 1.15rem); letter-spacing: .02em; color: var(--brass-hi); }
.marquee-title .name { display: block; font-size: clamp(2rem, 5.2vw, 3.6rem); color: #fff; letter-spacing: .01em;
  text-shadow: 0 3px 0 #9a3f73, 0 6px 0 #4b1d3c, 0 0 24px rgba(238,141,181,.55); }

.face { display: grid; grid-template-columns: 150px minmax(0, 1fr) 170px; gap: clamp(8px, 1.4vw, 16px); align-items: start; }
.side-panel { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 8px; border-radius: 14px; background: linear-gradient(#2c3342, #222835); box-shadow: inset 0 2px 8px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.06); }

/* hero porthole */
.porthole { position: relative; width: 112px; height: 112px; border-radius: 50%; overflow: hidden; background: #0a0714;
  box-shadow: 0 0 0 6px #8b95a7, 0 0 0 8px #3a4150, 0 0 0 10px #a7b2c2, inset 0 0 18px #000; }
.porthole-strip { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; }
.porthole-strip img { width: 112px; height: 112px; object-fit: cover; display: block; }
.porthole.spinning .porthole-strip { animation: porthole-spin .28s linear infinite; filter: blur(1.5px); }
@keyframes porthole-spin { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.porthole-glass { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(60% 50% at 30% 25%, rgba(255,255,255,.35), transparent 60%); pointer-events: none; }
.porthole-label { margin: 2px 0 0; font-family: var(--display); font-size: 1.02rem; text-align: center; color: var(--brass-hi); min-height: 1.3em; line-height: 1.1; }
.counter { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; }
.counter-label { font-size: .7rem; color: #9aa6b8; letter-spacing: .02em; }
.odometer { font: 700 1.05rem/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .12em; padding: 6px 7px; border-radius: 6px; color: #ffd98a;
  background: linear-gradient(#1b1209, #2c1d0c 50%, #1b1209); box-shadow: inset 0 0 0 1px #000, inset 0 1px 6px rgba(0,0,0,.9); text-shadow: 0 0 6px rgba(255,190,90,.6); font-variant-numeric: tabular-nums; }
.odometer-small { font-size: .95rem; }

/* reels */
.reels-frame { position: relative; padding: 10px; border-radius: 16px; background: linear-gradient(#11101a, #1b1828); box-shadow: inset 0 0 0 3px #0a0910, inset 0 0 0 5px var(--brass), inset 0 4px 22px rgba(0,0,0,.9); }
.reels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.reel { position: relative; aspect-ratio: 1 / 1.04; border-radius: 10px; overflow: hidden; background: radial-gradient(circle at 50% 45%, #2a1f45, #0b0911 70%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 2px 0 rgba(0,0,0,.6); transition: box-shadow .3s; }
.reel::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(0,0,0,.55), transparent 22%, transparent 78%, rgba(0,0,0,.55)); }
.strip { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; will-change: transform; }
.strip img { display: block; width: 100%; aspect-ratio: 1 / 1.04; object-fit: contain; padding: 6% 6% 10%; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
.reel.spinning .strip { animation: reel-spin var(--spin, .16s) linear infinite; }
.reel.spinning img { filter: blur(1.8px) brightness(.85); }
@keyframes reel-spin { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.reel.stopping .strip { animation: reel-stop .42s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes reel-stop { from { transform: translateY(-60%); } to { transform: translateY(0); } }
.reel.empty .strip { opacity: .12; filter: grayscale(1); }
.reel.changed { box-shadow: inset 0 0 0 2px var(--toxic), 0 0 16px rgba(166,227,90,.55); }
.reel.gold { box-shadow: inset 0 0 0 2px var(--brass-hi), 0 0 18px rgba(243,210,124,.8); }
.reel.locked::before { content: ''; position: absolute; z-index: 2; top: 4px; left: 4px; width: 16px; height: 16px; border-radius: 4px; background: var(--brass-hi) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b1a05' stroke-width='3'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / 12px no-repeat; }
.copies { position: absolute; z-index: 2; right: 3px; bottom: 3px; min-width: 26px; height: 20px; overflow: hidden; border-radius: 5px; background: #120b05; box-shadow: inset 0 0 0 1px #000, 0 0 0 1px rgba(243,210,124,.5); font: 800 .8rem/20px ui-monospace, Menlo, monospace; color: #ffd98a; text-align: center; }
.copies span { display: block; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.reel.empty .copies { opacity: 0; }

.ticker { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #08060d; box-shadow: inset 0 0 0 1px #2a2540; font: 700 .9rem/1.3 ui-monospace, Menlo, monospace; color: var(--toxic); text-shadow: 0 0 8px rgba(166,227,90,.6); min-height: 2.6em; display: flex; align-items: center; }
.ticker span::after { content: '▌'; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* gauge */
.gauge { position: relative; width: 150px; }
.gauge svg { display: block; width: 100%; overflow: visible; }
.gauge-track { fill: none; stroke: #0b0a12; stroke-width: 16; stroke-linecap: round; }
.gauge path.zone { fill: none; stroke-width: 12; }
.needle { transform-origin: 100px 110px; transform: rotate(-90deg); transition: transform 1.1s cubic-bezier(.25, 1.5, .4, 1); }
.needle path { fill: #ffe7a0; filter: drop-shadow(0 0 4px rgba(255,215,120,.8)); }
.needle circle { fill: #3a4150; stroke: var(--brass-hi); stroke-width: 3; }
.gauge-grade { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-family: var(--display); font-size: 2.3rem; line-height: 1; color: #fff; text-shadow: 0 2px 0 #000; }
.gauge-grade.slam { animation: slam .7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes slam { 0% { transform: scale(3); opacity: 0; } 60% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1); } }
.gauge-score { margin: 0; display: flex; flex-direction: column; align-items: center; font: 800 1.4rem/1 ui-monospace, Menlo, monospace; color: #fff; font-variant-numeric: tabular-nums; }
.gauge-unit { font: 600 .7rem var(--body); color: #9aa6b8; margin-top: 3px; }
.fit-meter { width: 100%; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.fit-bar { width: 100%; height: 10px; border-radius: 5px; background: #0b0a12; overflow: hidden; box-shadow: inset 0 0 0 1px #000; }
.fit-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b9567f, var(--brain)); transition: width .8s ease; }
.chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.chips li { text-align: center; max-width: 100%; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(166,227,90,.12); color: #d5f5a8; border: 1px solid rgba(166,227,90,.35); animation: chip-in .4s cubic-bezier(.2,1.5,.4,1) both; }
.chips li.opp { background: rgba(255,100,100,.12); color: #ffc1c1; border-color: rgba(255,100,100,.4); }
@keyframes chip-in { from { transform: scale(.4); opacity: 0; } }

/* request slot: a phosphor screen set into the machine, and the lever */
.slot { position: relative; display: flex; align-items: stretch; gap: 14px; margin-top: 14px; padding: 12px 118px 12px 12px; border-radius: 16px;
  background: linear-gradient(#3a4252, #262c38); box-shadow: inset 0 2px 8px rgba(0,0,0,.65), inset 0 0 0 1px rgba(255,255,255,.06), 0 1px 0 rgba(255,255,255,.18); }
.slot::before, .slot::after { content: ''; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e1e7ef, #4a5262 70%); box-shadow: 0 1px 1px rgba(0,0,0,.6); }
.slot::before { left: -2px; } .slot::after { right: 86px; display: none; }
.slot-screen { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 10px; overflow: hidden;
  background: radial-gradient(130% 160% at 50% 0%, #0e1a10, #050806 70%); box-shadow: inset 0 0 0 2px #0a0d0b, inset 0 0 22px rgba(0,0,0,.9), 0 0 0 3px #1a1f29, 0 0 0 5px #6b7586; }
.slot-screen::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(rgba(255,255,255,.035) 0 1px, transparent 1px 3px), radial-gradient(80% 60% at 30% 0%, rgba(166,227,90,.08), transparent 70%); }
.screen-line { display: flex; align-items: center; gap: 10px; }
.screen-glyph { font: 700 1.2rem ui-monospace, Menlo, monospace; color: var(--toxic); text-shadow: 0 0 8px rgba(166,227,90,.7); animation: blink 1.1s steps(1) infinite; }
.screen-line { position: relative; align-items: flex-start; }
.screen-glyph { line-height: 1.4; padding-top: 6px; }
.slot-screen textarea, .request-mirror { flex: 1; min-width: 0; padding: 6px 0; font: 700 1.08rem/1.4 ui-monospace, 'SFMono-Regular', Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.slot-screen textarea { display: block; height: 2.1em; border: 0; outline: 0; resize: none; overflow: hidden; background: transparent; color: #d6ffb0; caret-color: var(--toxic); text-shadow: 0 0 8px rgba(166,227,90,.55); }
.slot-screen textarea::placeholder { color: rgba(166,227,90,.42); text-shadow: none; }
.request-mirror { position: absolute; visibility: hidden; pointer-events: none; left: 0; top: 0; flex: none; }
.slot-screen:focus-within { box-shadow: inset 0 0 0 2px #0a0d0b, inset 0 0 22px rgba(0,0,0,.9), 0 0 0 3px #1a1f29, 0 0 0 5px var(--brass-hi), 0 0 18px rgba(243,210,124,.35); }

.lever { position: absolute; right: 8px; bottom: -4px; width: 104px; height: 174px; padding: 0; border: 0; background: none; cursor: pointer; }
.lever svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 6px rgba(0,0,0,.55)); }
.lever-arm { transform-origin: 45px 126px; transform-box: view-box; transform: rotate(8deg); transition: transform .5s cubic-bezier(.2, 1.6, .4, 1); }
.lever:hover .lever-arm { transform: rotate(14deg); }
.lever:active .lever-arm, .lever:disabled .lever-arm, .lever.yanked .lever-arm { transform: rotate(150deg); transition: transform .28s cubic-bezier(.6, 0, .9, .6); }
.lever:disabled { cursor: wait; }
.lever:focus-visible { outline: none; }
.lever:focus-visible svg { filter: drop-shadow(0 0 6px var(--brass-hi)) drop-shadow(0 6px 6px rgba(0,0,0,.55)); }
.lever-plate { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 5px;
  font: 700 .8rem/1.2 var(--display); color: #3a2205; background: linear-gradient(#f3d27c, #b98a2e); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 2px rgba(0,0,0,.5); white-space: nowrap; }

/* ---------- lever station + Zomboss ---------- */
.lever-station { position: relative; flex: 0 0 330px; width: 330px; height: 600px; margin-left: -18px; }
.console-lamp { right: 22px; }
.platform { position: absolute; left: -10px; right: 0; bottom: 0; height: 34px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, #3a4150 0 6px, #2a303c 6px 12px), #2a303c; box-shadow: inset 0 3px 0 #8b95a7, 0 10px 30px rgba(0,0,0,.6); }
.console { position: absolute; z-index: 3; left: 0; bottom: 34px; width: 262px; height: 128px; border-radius: 14px 14px 4px 4px;
  background: linear-gradient(170deg, #8a96a9, #4c5568 45%, #303746); box-shadow: inset 0 2px 0 rgba(255,255,255,.35), inset 0 0 0 3px #232836, 0 10px 20px rgba(0,0,0,.5), 0 0 calc(40px * var(--flash)) rgba(220, 205, 255, calc(.5 * var(--flash))); }
.console::after { content: 'LEVERS'; position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font: 700 .7rem var(--body); letter-spacing: .12em; color: #1d222c; background: var(--brass); padding: 3px 8px; border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.console-slot { position: absolute; top: 10px; height: 10px; width: 46px; border-radius: 6px; background: #0b0a10; box-shadow: inset 0 2px 4px #000, 0 1px 0 rgba(255,255,255,.25); }
.console-slot-a { left: 18px; } .console-slot-b { left: 102px; }
.console-lamp { position: absolute; right: 16px; top: 40px; width: 18px; height: 18px; border-radius: 50%; background: #5a1015; box-shadow: inset 0 -2px 3px rgba(0,0,0,.5); }
.console-lamp.on { background: #ff4d4d; box-shadow: 0 0 14px #ff4d4d, inset 0 -2px 3px rgba(0,0,0,.3); animation: lamp .5s steps(1) infinite; }
@keyframes lamp { 50% { background: #8a1d22; box-shadow: none; } }

.zomboss { position: absolute; inset: 0; pointer-events: none; }
.pose { position: absolute; display: block; height: auto; opacity: 0; visibility: hidden; transform-origin: 50% 100%; filter: drop-shadow(0 10px 18px rgba(0,0,0,.55)) brightness(calc(1 + var(--flash) * .5)); }
.pose.is-on { opacity: 1; visibility: visible; }
.pose-idle { width: 250px; left: 84px; bottom: 30px; z-index: 4; }
.pose-taunt { width: 300px; left: 46px; bottom: 30px; z-index: 4; }
.pose-grip { width: 262px; left: 7px; bottom: 109px; z-index: 2; transform-origin: 60% 92%; }
.zomboss .pose.is-on.pop { animation: pop .38s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { 0% { transform: scale(.82, 1.14) translateY(-18px); } 60% { transform: scale(1.05, .95); } 100% { transform: none; } }
.zomboss .pose-idle.is-on:not(.pop) { animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.012, 1.022) rotate(-.6deg); } }
.zomboss.yank .pose-grip.is-on { animation: yank .62s cubic-bezier(.5, -0.4, .3, 1.4) forwards; }
@keyframes yank { 0% { transform: none; } 30% { transform: translateY(-10px) rotate(3deg); } 70% { transform: translateY(26px) rotate(-7deg) scale(1.02, .97); } 100% { transform: translateY(18px) rotate(-5deg); } }
.zomboss.cackle .pose.is-on { animation: cackle .16s linear infinite; }
.zomboss.yank.cackle .pose-grip.is-on { animation: cackle-grip .16s linear infinite; }
@keyframes cackle { 0% { transform: rotate(-1.6deg) translateY(0); } 50% { transform: rotate(1.6deg) translateY(-3px) scale(1.01); } 100% { transform: rotate(-1.6deg); } }
@keyframes cackle-grip { 0% { transform: translateY(18px) rotate(-6deg); } 50% { transform: translateY(14px) rotate(-3.5deg) scale(1.01); } 100% { transform: translateY(18px) rotate(-6deg); } }
.zomboss.lean .pose-grip.is-on { animation: lean 1.6s ease-in-out infinite; }
@keyframes lean { 0%, 100% { transform: translateY(6px) rotate(-1.5deg); } 50% { transform: translateY(0) rotate(1deg); } }

.bubble { position: absolute; z-index: 6; right: 6px; top: 12px; max-width: 250px; padding: 10px 14px; border-radius: 18px; background: #fffaf0; color: #2a1846;
  font: 700 1rem/1.25 var(--display); letter-spacing: .01em; box-shadow: 0 6px 0 rgba(0,0,0,.25), 0 0 0 3px #2a1846; opacity: 0; transform: scale(.5) rotate(-4deg); transform-origin: 30% 100%; transition: opacity .2s, transform .35s cubic-bezier(.2,1.6,.4,1); }
.bubble::after { content: ''; position: absolute; left: 34px; bottom: -14px; border: 9px solid transparent; border-top: 14px solid #fffaf0; filter: drop-shadow(0 3px 0 #2a1846); }
.bubble.show { opacity: 1; transform: none; }
.bubble.laugh { font-size: 1.5rem; color: #6b1a8f; }
.bubble.laugh span { display: inline-block; animation: hop .3s ease-in-out infinite alternate; }
@keyframes hop { to { transform: translateY(-4px) rotate(4deg); } }

.skip { position: absolute; z-index: 40; right: 18px; bottom: 16px; border: 1px solid rgba(255,255,255,.25); background: rgba(10,7,18,.7); color: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; backdrop-filter: blur(4px); }

/* ---------- sections under the stage ---------- */
main > section:not(.stage) { max-width: 1120px; margin: 0 auto; padding: 32px clamp(14px, 3vw, 28px); }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.1; margin: 0 0 10px; color: #fff; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head p { margin: 0; color: #b6abd3; }
.examples { padding-top: 22px !important; }
.examples h2 { font-size: 1.15rem; color: #cfc4ec; }
.example-list { display: flex; flex-wrap: wrap; gap: 8px; }
.example-list button { border: 1px dashed rgba(243,210,124,.5); background: rgba(243,210,124,.06); color: #f6e5b8; padding: 8px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; text-align: left; }
.example-list button:hover { background: rgba(243,210,124,.14); border-style: solid; }

.replay-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.replay { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(160deg, #2c2149, #1b1431); border: 1px solid rgba(255,255,255,.08); color: inherit; }
.replay:hover { border-color: rgba(243,210,124,.5); }
.replay img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #0a0714; box-shadow: 0 0 0 3px #8b95a7; }
.replay strong { display: block; font-size: .98rem; line-height: 1.25; }
.replay .meta { display: flex; gap: 8px; align-items: center; margin-top: 4px; color: #b6abd3; font-size: .85rem; }
.grade-pill { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; font: 700 1rem var(--display); color: #10091d; }
.history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.history-list button { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); cursor: pointer; text-align: left; }
.history-list button:hover { background: rgba(255,255,255,.07); }
.history-list .when { color: #9a8fb8; font-size: .82rem; }
.how-steps { margin: 0; padding: 0 0 0 1.4em; display: grid; gap: 10px; max-width: 72ch; color: #d6cdee; }
.how-steps strong { color: #fff; }
.footer { text-align: center; color: #7f739e; font-size: .8rem; padding: 26px 16px 40px; }

/* ---------- printout report ---------- */
.report { padding-top: 10px !important; }
.printout { position: relative; color: var(--paper-ink); background:
    linear-gradient(var(--paper-line) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px) 0 0 / 22px 22px, var(--paper);
  border-radius: 4px; padding: clamp(18px, 3vw, 34px); box-shadow: 0 30px 60px rgba(0,0,0,.5); transform-origin: 50% 0; }
.printout.feeding { animation: feed 1.1s cubic-bezier(.2,.9,.3,1) both; }
@keyframes feed { from { clip-path: inset(0 0 100% 0); transform: translateY(-30px); } to { clip-path: inset(0 0 0 0); transform: none; } }
.printout::before, .printout::after { content: ''; position: absolute; left: 0; right: 0; height: 10px; background: radial-gradient(circle at 11px 5px, var(--ink) 4px, transparent 4.5px) 0 0 / 22px 10px repeat-x; }
.printout::before { top: -5px; } .printout::after { bottom: -5px; }
.printout h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin: 0 0 10px; color: #3a1c66; }
.printout p { margin: 0 0 10px; max-width: 70ch; }
.r-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; border-bottom: 3px solid #3a1c66; padding-bottom: 16px; margin-bottom: 18px; }
.r-hero { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px #3a1c66; background: #1a1030; }
.r-title { margin: 0; font-family: var(--display); font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.05; color: #2a1846; }
.r-sub { margin: 4px 0 0; color: #5b4a7a; font-weight: 600; }
.r-prompt { margin: 6px 0 0; font-style: italic; color: #5b4a7a; }
.r-grade { text-align: center; }
.r-grade .letter { display: grid; place-items: center; width: 86px; height: 86px; border-radius: 18px; font: 700 3.2rem/1 var(--display); color: #10091d; box-shadow: inset 0 -5px 0 rgba(0,0,0,.2), 0 0 0 4px #2a1846; }
.r-grade .num { display: block; margin-top: 6px; font: 800 1rem ui-monospace, Menlo, monospace; }
.r-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.r-actions .btn { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: #2a1846; color: #fff;
  font: 700 .9rem/1 var(--body); text-decoration: none; cursor: pointer; box-shadow: 0 2px 0 rgba(42,24,70,.35); transition: background .15s; }
.r-actions .btn:hover { background: #3d2463; }
.r-actions .btn:disabled { opacity: .45; cursor: default; }
.r-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 26px 34px; }
.r-block { min-width: 0; }
.r-block + .r-block { border-top: 0; }
.deck-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 10px; }
.deck-card { position: relative; border: 0; background: none; padding: 0; text-align: center; cursor: default; color: inherit; }
.deck-card .art { display: block; aspect-ratio: 1 / 1.04; padding: 4px; }
.deck-card img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 4px 4px rgba(42,24,70,.3)); transition: transform .2s; }
.deck-card .n { position: absolute; left: 50%; top: calc(100% - 3.1em); transform: translate(-50%, -100%); padding: 1px 8px; border-radius: 999px; background: #2a1846; color: #fff; font: 800 .82rem ui-monospace, Menlo, monospace; box-shadow: 0 0 0 2px var(--paper); }
.deck-card .nm { display: block; font-size: .8rem; font-weight: 800; line-height: 1.15; margin-top: 6px; }
.deck-card .rl { display: block; font-size: .7rem; color: #6b5a8a; }
.deck-card .card-ring { position: absolute; left: -6%; top: -6%; width: 112%; height: auto; aspect-ratio: 1; pointer-events: none; }
.deck-card .scrawl { position: absolute; z-index: 2; top: -14px; right: -12px; font: 700 1.15rem var(--display); color: #7b2fbe; transform: rotate(10deg); opacity: 0; transition: opacity .4s 1.6s; white-space: nowrap; }
.deck-block.inked .scrawl { opacity: 1; }
.deck-card .keep-star { position: absolute; top: -4px; left: -2px; width: 26px; }
.lock-mode .deck-card { cursor: pointer; }
.lock-mode .deck-card:hover img { transform: translateY(-2px); }
.deck-card.is-locked::after { content: 'Locked'; position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%) rotate(-8deg); padding: 3px 8px; border-radius: 6px; background: var(--brass-hi); color: #2b1a05; font: 700 .85rem var(--display); box-shadow: 0 0 0 2px #2b1a05; }
.respin-panel { margin: -6px 0 18px; padding: 14px; border-radius: 10px; background: rgba(42,24,70,.07); border: 2px dashed rgba(42,24,70,.35); }
.respin-panel label { font-weight: 700; display: block; margin-bottom: 6px; }
.respin-panel .row { display: flex; gap: 8px; flex-wrap: wrap; }
.respin-panel input { flex: 1; min-width: 200px; padding: 10px 12px; border-radius: 8px; border: 2px solid #2a1846; font: inherit; color: #2a1846; background: #fff; }
.respin-panel .btn { background: linear-gradient(#ff6b6b, #b0161b); color: #fff; }
.bars { display: grid; gap: 8px; margin: 0 0 14px; }
.bar { display: grid; grid-template-columns: 96px 1fr 36px; gap: 10px; align-items: center; font-weight: 700; font-size: .9rem; }
.bar .track { height: 12px; border-radius: 6px; background: rgba(42,24,70,.12); overflow: hidden; }
.bar .track i { display: block; height: 100%; width: 0; background: #3a1c66; border-radius: 6px; transition: width 1s cubic-bezier(.2,.9,.3,1) var(--d, 0s); }
.inked .bar .track i { width: var(--w); }
.bar .v { text-align: right; font: 800 .9rem ui-monospace, Menlo, monospace; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 0 0 14px; }
.fact { padding: 10px; border-radius: 8px; background: rgba(42,24,70,.06); }
.fact b { display: block; font: 800 1.25rem ui-monospace, Menlo, monospace; color: #2a1846; }
.fact span { font-size: .8rem; color: #5b4a7a; }
.curve-chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding-top: 10px; }
.curve-chart div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font: 700 .78rem ui-monospace, Menlo, monospace; }
.curve-chart i { display: block; width: 100%; height: 0; background: linear-gradient(#6b3fa8, #3a1c66); border-radius: 5px 5px 0 0; min-height: 2px; transition: height .9s cubic-bezier(.2,1.3,.4,1) var(--d, 0s); }
.inked .curve-chart i { height: var(--h); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; }
.checks .mark { width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid #2a1846; border-radius: 4px; }
.checks .mark .doodle path { stroke: #2f8f46; stroke-width: 5; }
.checks .mark.no .doodle path { stroke: #b0161b; }
.checks .detail { color: #5b4a7a; font-size: .85rem; }
.plan-label { display: inline-block; margin: 0 0 8px; padding: 4px 10px; border-radius: 6px; background: #3a1c66; color: #fff; font-weight: 800; }
.plan dl { display: grid; grid-template-columns: 96px 1fr; gap: 10px 12px; margin: 0; align-items: start; }
.plan dt { display: flex; align-items: center; gap: 6px; font-weight: 800; color: #3a1c66; }
.plan dt .icon { width: 28px; flex: none; }
.plan dd { margin: 0; }
.mini-cards { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.mini-cards figure { margin: 0; width: 72px; text-align: center; font-size: .7rem; font-weight: 700; line-height: 1.1; }
.mini-cards .art { position: relative; display: block; width: 72px; height: 74px; margin-bottom: 3px; }
.mini-cards img { width: 100%; height: 100%; object-fit: contain; }
.mini-cards .cross { position: absolute; inset: 4px; }
.mini-cards .cross path { stroke: #b0161b; stroke-width: 7; }
.edge { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.edge b { font: 700 2.2rem/1 var(--display); color: #3a1c66; }
.answers { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.answers li { display: grid; grid-template-columns: 1fr 70px; gap: 4px 10px; align-items: center; font-size: .9rem; }
.answers .why { grid-column: 1 / -1; color: #5b4a7a; font-size: .82rem; }
.answers .meter { height: 8px; border-radius: 4px; background: rgba(42,24,70,.12); overflow: hidden; }
.answers .meter i { display: block; height: 100%; width: 0; background: #2f8f46; transition: width .9s ease var(--d, 0s); }
.inked .answers .meter i { width: var(--w); }
.odds { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.odds li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; }
.odds b { font: 800 1.1rem ui-monospace, Menlo, monospace; color: #3a1c66; }
.swaps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .92rem; }
.swaps .d { font: 700 .85rem ui-monospace, Menlo, monospace; color: #5b4a7a; }
.build-log { font: 600 .9rem/1.6 ui-monospace, Menlo, monospace; }
.trials { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.trials span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; background: rgba(42,24,70,.07); font-size: .8rem; font-weight: 700; }
.trials span.win { background: #3a1c66; color: #fff; }
.warn { padding: 10px 12px; border-radius: 8px; background: #fff1c9; border: 1px solid #d9a93a; margin: 0 0 14px; font-weight: 600; }
.r-foot { margin-top: 22px; padding-top: 14px; border-top: 2px dashed rgba(42,24,70,.3); color: #5b4a7a; font-size: .82rem; }

/* ---------- dialog + toast (site style) ---------- */
.sheet { width: min(500px, calc(100vw - 24px)); border: 1px solid var(--site-line); border-radius: 12px; padding: 0; color: var(--site-text-2); background: var(--site-surface); box-shadow: 0 24px 60px rgba(0,0,0,.6); font-family: var(--body); }
.sheet::backdrop { background: rgba(8, 10, 12, .7); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 4px; }
.sheet-head h2 { margin: 0; font: 700 1.2rem var(--body); color: #fff; }
.sheet-close { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--site-muted); border-radius: 8px; width: 34px; height: 34px; }
.sheet-close:hover { background: rgba(255,255,255,.06); color: #fff; }
.sheet-body { padding: 4px 18px 18px; font-size: 14px; }
.sheet-body p { margin: 0 0 12px; }
.sheet-body input { width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: #141a1d; color: #fff; font: inherit; }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.12); color: var(--site-text-2); border-radius: 8px; padding: 8px 12px; font-weight: 600; cursor: pointer; }
.btn-ghost:hover { background: rgba(255,255,255,.06); color: #fff; }
.error { color: #ff8a8a; font-weight: 600; }
.packs { display: grid; gap: 8px; margin: 6px 0 4px; }
.pack { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: #141a1d; cursor: pointer; text-align: left; color: inherit; font: inherit; transition: border-color .15s, background .15s; }
.pack:hover, .pack:focus-visible { border-color: var(--site-gold); background: #182024; }
.pack .pack-art { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(circle at 50% 40%, #2a2340, #141a1d 75%); }
.pack .pack-art svg { width: 50px; height: 50px; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.vat-bubbles circle { animation: vat-bubble 1.8s ease-in infinite; transform-box: fill-box; }
.vat-bubbles circle:nth-child(2) { animation-delay: -.6s; } .vat-bubbles circle:nth-child(3) { animation-delay: -1.2s; }
@keyframes vat-bubble { 0% { transform: translateY(4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-12px); opacity: 0; } }
.pack .pack-art svg[data-art="vat"] { width: 60px; height: 60px; margin-top: -6px; }
.pack:hover .pack-art svg { transform: scale(1.06) rotate(-3deg); transition: transform .2s; }
@media (prefers-reduced-motion: reduce) { .vat-bubbles circle { animation: none; } }
.pack b { display: block; font-size: 15px; color: #fff; }
.pack small { color: var(--site-muted); }
.pack .price { font-weight: 700; font-size: 16px; color: var(--site-gold); }
.pack .badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(255,209,92,.15); color: var(--site-gold); font-size: 11px; font-weight: 700; vertical-align: 2px; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 22px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 10px; background: var(--site-surface); border: 1px solid rgba(255,255,255,.1); color: #fff; font: 600 14px var(--body); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .lever-station { zoom: .66; margin-left: -10px; }
  .face { grid-template-columns: 132px minmax(0, 1fr) 150px; }
  .gauge { width: 130px; }
}
@media (max-width: 760px) {
  .stage { padding-top: 196px; padding-bottom: 28px; }
  .rig { position: relative; display: block; }
  .lever-station { zoom: 1; position: absolute; right: -6px; top: -128px; margin: 0; transform: scale(.31); transform-origin: 100% 0; z-index: 5; }
  .bubble { right: 250px; top: 60px; transform-origin: 100% 100%; font-size: 2.8rem; width: max-content; max-width: 900px; }
  .bubble.laugh { font-size: 3rem; }
  .marquee { width: 64%; margin-left: 2%; padding: 12px 14px 10px; }
  .face { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .face > .side-panel { justify-content: center; }
  .reels-frame { grid-column: 1 / -1; order: -1; }
  .reels { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .side-panel { padding: 10px 6px; }
  .porthole { width: 84px; height: 84px; } .porthole-strip img { width: 84px; height: 84px; }
  .gauge { width: 120px; }
  .slot { padding-right: 86px; }
  .lever { width: 76px; height: 128px; right: 4px; bottom: -2px; }
  .slot-screen textarea, .request-mirror { font-size: .95rem; }
  .slot-screen { padding: 10px 12px; }
  .r-head { grid-template-columns: auto 1fr; } .r-grade { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; }
  .r-grade .letter { width: 64px; height: 64px; font-size: 2.4rem; }
  .r-grid { grid-template-columns: 1fr; }
  .deck-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 6px; }
  .deck-card .nm { font-size: .74rem; }
  .back span { display: none; }
  .topbar-actions { gap: 6px; }
  .brass-button { padding: 9px 11px; font-size: .92rem; }
  .brain-meter .odometer { min-width: 2.6em; }
}
@media (prefers-reduced-motion: reduce) {
  .clouds, .tower .lit, .zomboss .pose, .bubble.laugh span { animation: none !important; }
  .stage.shake { animation: none; }
  .reel.spinning .strip { animation-duration: 1.2s; }
  .needle { transition-duration: .2s; }
}

/* ---------- ink doodles ---------- */
.doodle { display: inline-block; overflow: visible; }
.doodle path { fill: none; stroke: #7b2fbe; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.inked .doodle path { animation: ink .9s cubic-bezier(.5,.1,.3,1) var(--d, 0s) forwards; }
.inked .doodle path + path { animation-delay: calc(var(--d, 0s) + .35s); }
.inked .doodle path + path + path { animation-delay: calc(var(--d, 0s) + .6s); }
@keyframes ink { to { stroke-dashoffset: 0; } }
.r-grade .letter { position: relative; }
.r-grade .ring { position: absolute; inset: -16px; width: calc(100% + 32px); height: calc(100% + 32px); }
.r-grade .ring path { stroke: #b0161b; stroke-width: 3.5; }
.plan-label { position: relative; display: inline-block; margin-bottom: 14px; }
.plan-label .underline { position: absolute; left: -2px; right: -2px; bottom: -10px; width: calc(100% + 4px); height: 12px; }
.plan-label .underline path { stroke: #b0161b; stroke-width: 2.5; }
.combo-h { display: flex; align-items: center; gap: 6px; margin-top: 16px !important; }
.combo-h .icon, #buildH .icon { width: 26px; }
#buildH { display: flex; align-items: center; gap: 6px; }
.signature { margin: 12px 0 0; text-align: right; font: 700 1.3rem var(--display); color: #7b2fbe; transform: rotate(-4deg); }
.signature .sig { display: block; width: 110px; height: 14px; margin-left: auto; }
.tips li { display: flex; gap: 8px; align-items: flex-start; }
.tip-arrow { width: 30px; flex: none; margin-top: -4px; }
.sample-stamp { display: inline-block; margin-bottom: 6px; padding: 2px 10px; border: 2px solid #b0161b; border-radius: 6px; color: #b0161b; font: 700 .9rem var(--display); transform: rotate(-3deg); }
.r-title { margin-top: 0; }
h3 small { font: 700 .85rem var(--body); color: #6b5a8a; margin-left: 6px; }

/* ---------- sample link + jar panel ---------- */
.sample-link { justify-self: center; margin-top: 18px; padding: 7px 16px; border-radius: 999px; border: 1px solid rgba(243,210,124,.45); background: rgba(18,13,34,.55); color: #f6e5b8; font-weight: 700; cursor: pointer; backdrop-filter: blur(3px); }
.sample-link:hover { background: rgba(243,210,124,.12); }
.jar-panel { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--site-line); }
.jar-panel summary { cursor: pointer; font-weight: 600; color: var(--site-text-2); }
.jar-panel summary:hover { color: #fff; }
.jar-panel p { margin: 8px 0; font-size: .9rem; }
.jar-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.jar-row input { margin: 0; }
.jar-row .btn { margin: 0; white-space: nowrap; }
.jar-code { flex: 1; padding: 9px 10px; border-radius: 8px; background: #141a1d; border: 1px solid rgba(255,255,255,.08); font: 700 .92rem ui-monospace, Menlo, monospace; letter-spacing: .04em; user-select: all; }
@media (prefers-reduced-motion: reduce) {
  .doodle path, .inked .doodle path { animation: none; stroke-dashoffset: 0; }
  .bar .track i, .curve-chart i, .answers .meter i { transition: none; }
}

/* ---------- deck builder hand-off (shown on the request screen) ---------- */
.from-panel { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed rgba(166,227,90,.25); color: #d6ffb0; font-family: ui-monospace, Menlo, monospace; }
.from-panel[hidden] { display: none; }
.from-cards { display: flex; align-items: center; flex: none; }
.from-card { position: relative; width: 36px; height: 38px; margin-right: -10px; }
.from-card img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)) saturate(.9); }
.from-card i { position: absolute; right: -2px; bottom: -3px; font: 800 .6rem ui-monospace, Menlo, monospace; font-style: normal; color: #ffd98a; background: #120b05; border-radius: 4px; padding: 0 3px; }
.from-more { margin-left: 16px; font: 800 .8rem ui-monospace, Menlo, monospace; color: var(--toxic); }
.from-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-left: 10px; }
.from-text b { font-size: .82rem; line-height: 1.3; color: #d6ffb0; text-shadow: 0 0 6px rgba(166,227,90,.4); }
.from-clear { align-self: flex-start; border: 0; background: none; padding: 0; color: rgba(166,227,90,.7); text-decoration: underline; font: .76rem ui-monospace, Menlo, monospace; cursor: pointer; }
.from-clear:hover { color: var(--toxic); }
@media (max-width: 760px) { .from-panel { flex-direction: column; align-items: flex-start; } .from-text { margin-left: 0; } }
