/* The Strategy Game (for Regulatory Affairs) — "Sticker-Comic" stylesheet — v2.2 (16JUN2026)
 *
 * A board game you can play in a browser. Not a war-room terminal, not the
 * default-AI rounded-glass look — the literal soul of Angie's 2018 board,
 * rebuilt in CSS: flat cream + board-cyan, every card a die-cut STICKER with a
 * hard black outline and a SOLID offset shadow (never a blur), the REG badge as
 * a recurring stamp, real character art for the founders. The joke of the art
 * (a serious FDA topic dressed as a goofy family board game) becomes the look.
 *
 * Five things we never do here: border-radius > 6px on cards, glassmorphism,
 * soft blurry shadows, uniform green pills, emoji-as-chrome. Color is assigned
 * by MEANING (cyan = the board, purple = authority, green = go, yellow = money,
 * orange = cost). Brand palette + 8px grid locked by TRCL-BRAND-STYLE-GUIDE.
 */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --c-purple: #4a0873;
    --c-purple-80: rgba(74, 8, 115, 0.82);
    --c-green: #5bb545;
    --c-green-soft: #c7e3b1;
    --c-yellow: #e8e52a;
    --c-orange: #f5841f;
    --c-cream: #FAFAF5;
    --c-cream-deep: #f3eede;
    --c-cyan: #2bb8d8;       /* the board's sky — the DOMINANT accent */
    --c-cyan-soft: #d8f3fb;
    --ink: #1b1b1b;          /* the heavy comic outline. NOT pure black (brand rule) */

    --font-display: "Bricolage Grotesque", "Inter", sans-serif;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0; min-height: 100%;
    font-family: var(--font); color: var(--c-purple);
    background-color: var(--c-cream);
    /* kraft paper grain + faint halftone dots — comic print, zero HTTP deps */
    background-image:
        radial-gradient(circle at 1px 1px, rgba(74,8,115,0.05) 1px, transparent 0),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.42  0 0 0 0 0.30  0 0 0 0 0.12  0 0 0 0.035 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
    background-size: 22px 22px, 160px 160px;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--c-purple); text-decoration-color: var(--c-cyan); }

/* ==========================================================================
   SIGNATURE SURFACES — the sticker system
   ========================================================================== */
.panel-comic, .scenario-card, .res, .action, .log, .card-modal, .review-modal,
.end-modal, .choice-box, .panel, .how-card, .founder-card {
    background: var(--c-cream);
    border: 3px solid var(--ink);
    border-radius: 6px;
    box-shadow: 6px 6px 0 0 var(--ink);
}
/* hand-placed tilt for grids of stickers */
.sticker-tilt:nth-child(3n+1) { transform: rotate(-1.3deg); }
.sticker-tilt:nth-child(3n+2) { transform: rotate(0.9deg); }
.sticker-tilt:nth-child(3n+3) { transform: rotate(-0.5deg); }
.sticker-tilt:hover { transform: rotate(0deg) translateY(-3px); }

/* ==========================================================================
   BUTTONS — chunky game pieces that press down
   ========================================================================== */
.btn-comic, .cta-big, .btn-primary, .action.advance {
    font-family: var(--font-display); font-weight: 800; letter-spacing: 0.01em;
    color: var(--c-purple); background: var(--c-yellow);
    border: 3px solid var(--ink); border-radius: 6px; cursor: pointer;
    box-shadow: 5px 5px 0 0 var(--ink);
    transition: transform .08s, box-shadow .08s, background .12s;
    text-decoration: none; display: inline-block;
}
.btn-comic:hover, .cta-big:hover, .btn-primary:hover, .action.advance:hover:not(:disabled) {
    background: var(--c-green); color: var(--c-purple);
}
.btn-comic:active, .cta-big:active, .btn-primary:active, .action.advance:active {
    transform: translate(5px,5px); box-shadow: 0 0 0 0 var(--ink);
}
.btn-comic:disabled, .action.advance:disabled {
    background: #e6e2d6; color: #9a93a6; box-shadow: 5px 5px 0 0 #bdb6a6;
    cursor: not-allowed; transform: none;
}
.cta-big { font-size: 21px; padding: 16px 40px; }
.btn-primary { font-size: 15px; padding: 12px 26px; }

/* the REG badge — the 2018 spine mark, recurring stamp */
.reg-badge {
    display: inline-grid; place-items: center; width: 46px; height: 46px;
    background: var(--c-yellow); color: var(--c-purple);
    font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.04em;
    border: 4px solid var(--ink); border-radius: 8px; box-shadow: 4px 4px 0 0 var(--ink);
    transform: rotate(-6deg);
}

/* ==========================================================================
   HEADER — purple authority bar with the REG stamp
   ========================================================================== */
.game-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 20px; background: var(--c-purple);
    border-bottom: 4px solid var(--ink); position: sticky; top: 0; z-index: 50;
}
.game-header .brand { display: flex; align-items: center; gap: 10px; color: var(--c-cream);
    font-family: var(--font-display); font-weight: 800; font-size: 19px; }
.game-header .brand .logo-dot { width: 0; height: 0; }
.game-header .brand::before {
    content: "REG"; display: inline-grid; place-items: center; width: 38px; height: 38px;
    background: var(--c-yellow); color: var(--c-purple); font-weight: 800; font-size: 15px;
    border: 3px solid var(--ink); border-radius: 7px; box-shadow: 3px 3px 0 0 var(--ink); transform: rotate(-6deg);
}
.game-header nav { display: flex; gap: 8px; align-items: center; }
.ghost-btn {
    color: var(--c-purple); background: var(--c-cream); text-decoration: none;
    font-family: var(--font-display); font-size: 13px; font-weight: 700;
    border: 2px solid var(--ink); border-radius: 6px; padding: 6px 12px; cursor: pointer;
    box-shadow: 3px 3px 0 0 var(--ink); transition: transform .08s, box-shadow .08s, background .12s;
}
.ghost-btn:hover { background: var(--c-cyan-soft); }
.ghost-btn:active { transform: translate(3px,3px); box-shadow: 0 0 0 0 var(--ink); }

/* ==========================================================================
   SCREENS
   ========================================================================== */
.screen { display: none; max-width: 1080px; margin: 0 auto; padding: 28px 20px 80px; }
.screen.active { display: block; animation: screenIn 0.35s ease; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- INTRO ---- */
.hero { text-align: center; padding: 28px 16px 8px; }
.hero .kicker { font-family: var(--font-display); font-size: 13px; font-weight: 800; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--c-purple); background: var(--c-yellow); display: inline-block;
    padding: 4px 12px; border: 2px solid var(--ink); transform: rotate(-1deg); margin-bottom: 18px; }
.hero h1 {
    font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em;
    font-size: clamp(44px, 9vw, 92px); line-height: 0.95; margin: 0 0 14px; color: var(--c-purple);
    position: relative; display: inline-block;
}
.hero h1::after {     /* hand-drawn marker swipe */
    content: ""; position: absolute; left: -2%; right: -2%; bottom: 6%; height: 0.3em;
    background: var(--c-yellow); z-index: -1; transform: skewX(-12deg) rotate(-1deg); border-radius: 2px;
}
.hero .sub { font-size: clamp(16px, 2.3vw, 20px); color: var(--c-purple-80); max-width: 660px;
    margin: 8px auto 24px; line-height: 1.55; }
.hero .credlinks { font-size: 12.5px; color: var(--c-purple-80); margin-top: 28px; line-height: 1.6; }
.hero-cover { max-width: 720px; width: 94%; margin: 12px auto 22px; display: block;
    border: 4px solid var(--ink); border-radius: 6px; box-shadow: 8px 8px 0 0 var(--ink); transform: rotate(-1deg); }

.how-row { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin: 36px 0 0; }
.how-card { flex: 1 1 220px; max-width: 280px; padding: 18px; text-align: left; }
.how-card h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 15px; color: var(--c-purple); }
.how-card p { margin: 0; font-size: 13px; color: var(--c-purple-80); line-height: 1.5; }
.how-card:nth-child(1) { background: var(--c-cyan-soft); }
.how-card:nth-child(2) { background: #fdf6a8; }
.how-card:nth-child(3) { background: var(--c-green-soft); }

/* ---- REGISTER ---- */
.panel { padding: 26px; max-width: 460px; margin: 26px auto; }
.panel h2 { margin: 0 0 6px; font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.panel .panel-sub { color: var(--c-purple-80); font-size: 13px; margin-bottom: 18px; line-height: 1.5; }
.field { margin-bottom: 14px; }
.field label { display: block; font-family: var(--font-display); font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-purple); margin-bottom: 5px; }
.field input {
    width: 100%; padding: 11px 13px; font-family: var(--font); font-size: 15px;
    background: #fff; border: 2px solid var(--ink); border-radius: 5px; color: var(--c-purple); outline: none;
}
.field input:focus { box-shadow: 3px 3px 0 0 var(--c-cyan); }
.field .hint { font-size: 11px; color: var(--c-purple-80); margin-top: 4px; }
.row2 { display: flex; gap: 12px; } .row2 .field { flex: 1; }
.err { color: var(--c-orange); font-size: 13px; min-height: 18px; margin-top: 4px; font-weight: 600; }

/* ---- FOUNDER SELECT — the real 2018 character cards ---- */
.char-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px;
    max-width: 900px; margin: 10px auto 0; }
.founder-card { padding: 0; overflow: hidden; cursor: pointer; text-align: left;
    transition: transform .1s, box-shadow .1s; display: flex; flex-direction: column; }
.founder-card:hover { transform: translateY(-4px) rotate(0deg); box-shadow: 9px 9px 0 0 var(--ink); }
.founder-card.is-selected { box-shadow: 6px 6px 0 0 var(--c-green), 6px 6px 0 3px var(--ink); }
.founder-card__art { width: 100%; display: block; border-bottom: 3px solid var(--ink); }
.founder-card__blurb { display: block; padding: 9px 11px; font: 500 12px/1.45 var(--font); color: var(--c-purple); background: var(--c-cream); }

/* ==========================================================================
   PLAY
   ========================================================================== */
.scenario-card { padding: 16px 18px; margin-bottom: 18px; background: var(--c-cyan-soft); }
.scenario-card .tag { display: inline-block; font-family: var(--font-display); font-size: 10px; font-weight: 800;
    letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; margin: 0 5px 5px 0;
    border: 2px solid var(--ink); background: var(--c-green); color: var(--c-purple); }
.scenario-card .tag.alt { background: var(--c-yellow); }
.scenario-card .tag.path { background: var(--c-orange); color: #fff; }
.scenario-card h2 { margin: 6px 0 4px; font-family: var(--font-display); font-size: 19px; font-weight: 800; line-height: 1.25; color: var(--c-purple); }
.scenario-card .meta { font-size: 12.5px; color: var(--c-purple-80); }
.scenario-card .nct { font-family: var(--font-mono); color: var(--c-purple); font-weight: 700; }

/* HUD */
.hud { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.res { padding: 12px 14px; position: relative; }
.res .ico { font-size: 18px; }
.res .lab { font-family: var(--font-display); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-purple-80); }
.res .val { font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1; margin-top: 2px; font-variant-numeric: tabular-nums; }
.res .bar { height: 5px; background: rgba(27,27,27,0.12); margin-top: 8px; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 3px; }
.res .bar > i { display: block; height: 100%; transition: width 0.4s ease; }
.res.value .val { color: var(--c-orange); } .res.value .bar > i { background: var(--c-yellow); }
.res.value { background: #fdf6a8; }
.res.capital .val { color: #2f8a1c; } .res.capital .bar > i { background: var(--c-green); }
.res.evidence .val { color: var(--c-purple); } .res.evidence .bar > i { background: var(--c-cyan); }
.res.evidence { background: var(--c-cyan-soft); }
.res.reputation .val { color: #b5870a; } .res.reputation .bar > i { background: var(--c-yellow); }
.res.time .val { color: var(--c-orange); } .res.time .bar > i { background: var(--c-orange); }
.res.flash { box-shadow: 6px 6px 0 0 var(--c-green), 6px 6px 0 3px var(--ink); }

/* Competitor tension meter — orange→red halftone urgency */
.tension { margin-bottom: 18px; }
.tension .lab { display: flex; justify-content: space-between; font-family: var(--font-display); font-size: 12px; color: var(--c-purple); margin-bottom: 4px; font-weight: 700; }
.tension .track { height: 12px; background: var(--c-cream); border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; box-shadow: 3px 3px 0 0 var(--ink); }
.tension .track > i { display: block; height: 100%; background: repeating-linear-gradient(45deg, var(--c-orange) 0 6px, #ff3b3b 6px 12px); transition: width 0.5s ease; }

/* The board — cyan play surface with white rounded-square spaces (the homage) */
.board { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin-bottom: 18px;
    background-color: var(--c-cyan);
    background-image: linear-gradient(rgba(255,255,255,.45) 2px, transparent 2px), linear-gradient(90deg, rgba(255,255,255,.45) 2px, transparent 2px);
    background-size: 32px 32px;
    border: 3px solid var(--ink); border-radius: 6px; box-shadow: 6px 6px 0 0 var(--ink); padding: 18px 10px 10px; }
.node { flex: 1 1 0; min-width: 84px; position: relative; background: #fff; border: 3px solid var(--ink);
    border-radius: 6px; padding: 10px 8px; text-align: center; box-shadow: 3px 3px 0 0 var(--ink); transition: all 0.2s; }
.node .n-name { font-family: var(--font-display); font-size: 11px; font-weight: 700; line-height: 1.2; color: var(--c-purple); }
.node .n-num { font-size: 9px; color: var(--c-purple-80); letter-spacing: 0.1em; font-weight: 700; }
.node.done { background: var(--c-green-soft); }
.node.current { background: var(--c-yellow); transform: translateY(-3px); box-shadow: 5px 5px 0 0 var(--ink); }
.node .token { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 22px; animation: bobToken 1.1s ease-in-out infinite; }
@keyframes bobToken { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-4px); } }

/* Readiness */
.readiness { margin-bottom: 16px; }
.readiness .lab { display: flex; justify-content: space-between; font-family: var(--font-display); font-size: 12px; font-weight: 700; margin-bottom: 5px; color: var(--c-purple); }
.readiness .lab b { color: #2f8a1c; }
.readiness .track { height: 16px; background: var(--c-cream); border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; box-shadow: 3px 3px 0 0 var(--ink); }
.readiness .track > i { display: block; height: 100%; background: repeating-linear-gradient(45deg, var(--c-green) 0 8px, #4ca037 8px 16px); transition: width 0.5s ease; }

/* Actions */
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.action { text-align: left; cursor: pointer; font-family: var(--font); padding: 13px 15px; color: var(--c-purple);
    transition: transform .08s, box-shadow .08s, background .12s; }
.action:hover:not(:disabled) { background: var(--c-cyan-soft); transform: translate(2px,2px); box-shadow: 4px 4px 0 0 var(--ink); }
.action:active:not(:disabled) { transform: translate(6px,6px); box-shadow: 0 0 0 0 var(--ink); }
.action .a-name { font-family: var(--font-display); font-weight: 800; font-size: 14px; display: block; }
.action .a-desc { font-size: 11.5px; color: var(--c-purple-80); display: block; margin: 3px 0 6px; line-height: 1.4; }
.action .a-cost { font-size: 11px; font-weight: 700; font-family: var(--font-display); }
.action .a-cost .up { color: #2f8a1c; } .action .a-cost .down { color: var(--c-orange); }
.action.advance { padding: 13px 15px; }
.action.advance .a-name { color: var(--c-purple); }
.action.advance .a-desc { color: var(--c-purple-80); }

/* Event log — taped to the board */
.log { padding: 12px 16px; max-height: 200px; overflow-y: auto; }
.log h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-purple-80); }
.log .entry { font-size: 13px; padding: 5px 0; border-bottom: 2px dotted rgba(27,27,27,0.15); line-height: 1.4; color: var(--c-purple); }
.log .entry:last-child { border-bottom: none; }
.log .entry.good { color: #2f8a1c; font-weight: 600; } .log .entry.bad { color: var(--c-orange); font-weight: 600; } .log .entry.turn { color: var(--c-purple-80); font-style: italic; }

/* ==========================================================================
   MODALS — sticker cards on a dimmed board
   ========================================================================== */
.overlay { position: fixed; inset: 0; background: rgba(27,3,38,0.66); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.overlay.active { display: flex; }
.card-modal, .review-modal, .end-modal, .choice-box { padding: 26px; max-width: 480px; width: 100%; animation: dealWobble 0.4s cubic-bezier(.2,.9,.2,1) both; }
@keyframes dealWobble { 0% { transform: rotate(-5deg) translateY(-14px); opacity: 0; } 60% { transform: rotate(1.2deg); opacity: 1; } 100% { transform: rotate(-0.6deg); } }
.card-modal.good { background: var(--c-green-soft); } .card-modal.bad { background: #ffe0c2; } .card-modal.swing { background: #fdf6a8; }
.card-modal .card-kind { font-family: var(--font-display); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.card-modal.good .card-kind { color: #2f8a1c; } .card-modal.bad .card-kind { color: var(--c-orange); } .card-modal.swing .card-kind { color: #b5870a; }
.card-modal h2 { margin: 6px 0 10px; font-family: var(--font-display); font-size: 23px; font-weight: 800; line-height: 1.1; color: var(--c-purple); }
.card-modal .card-flavor { color: var(--c-purple-80); font-size: 14.5px; line-height: 1.55; margin-bottom: 16px; }
.card-modal .card-effect { font-family: var(--font-display); font-size: 14px; font-weight: 700; margin-bottom: 20px; }
.card-modal .card-effect .up { color: #2f8a1c; } .card-modal .card-effect .down { color: var(--c-orange); }

.review-modal h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.review-modal .reviewer { font-size: 12px; color: var(--c-orange); font-weight: 700; margin-bottom: 14px; }
.review-modal textarea { width: 100%; min-height: 110px; resize: vertical; font-family: var(--font); font-size: 14px;
    background: #fff; border: 2px solid var(--ink); border-radius: 5px; color: var(--c-purple); padding: 11px 13px; outline: none; }
.review-modal textarea:focus { box-shadow: 3px 3px 0 0 var(--c-cyan); }
/* the FDA letter — letterhead look */
.review-letter { white-space: pre-wrap; font-size: 14px; line-height: 1.6; background: #fff; border: 2px solid var(--ink);
    border-left: 6px solid var(--c-purple); border-radius: 0 5px 5px 0; padding: 14px 16px; margin: 8px 0 10px; color: var(--c-purple); }
.review-verdict { font-family: var(--font-display); font-size: 14px; font-weight: 800; letter-spacing: 0.04em; color: var(--c-purple);
    background: var(--c-yellow); display: inline-block; padding: 5px 12px; border: 3px solid var(--ink); transform: rotate(-2deg); margin: 4px 0 16px; }
.review-badge { font-family: var(--font-display); font-size: 10px; font-weight: 800; padding: 3px 8px; letter-spacing: 0.05em; border: 2px solid var(--ink); }
.review-badge.llm { background: var(--c-green); color: var(--c-purple); } .review-badge.scripted { background: var(--c-cream-deep); color: var(--c-purple-80); }

.choice-box .card-kind { font-family: var(--font-display); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #b5870a; }
.choice-box h2 { margin: 6px 0 10px; font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--c-purple); }

/* End screen */
.end-modal { max-width: 560px; text-align: center; }
.end-modal h1 { font-family: var(--font-display); font-size: 42px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.02em; }
.end-modal.won h1 { color: #2f8a1c; } .end-modal.lost h1 { color: var(--c-orange); }
.end-title2 { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin: -2px 0 10px; color: var(--c-purple); }
.end-modal.lost .end-title2 { color: var(--c-orange); }
.end-modal .end-sub { color: var(--c-purple-80); font-size: 15px; line-height: 1.5; margin-bottom: 16px; }
.score-big { font-family: var(--font-display); font-size: 60px; font-weight: 800; color: var(--c-orange); line-height: 1; margin: 10px 0; font-variant-numeric: tabular-nums;
    background: var(--c-yellow); display: inline-block; padding: 4px 22px; border: 4px solid var(--ink); transform: rotate(-1.5deg); box-shadow: 6px 6px 0 0 var(--ink); }
.score-rank { font-size: 14px; color: var(--c-purple-80); margin: 18px 0 18px; font-weight: 600; }

.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

/* Leaderboard */
.leaderboard { width: 100%; border-collapse: separate; border-spacing: 0 4px; margin-top: 14px; font-size: 13px; }
.leaderboard th { font-family: var(--font-display); text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-purple-80); padding: 4px 8px; }
.leaderboard td { padding: 8px; background: var(--c-cream); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); vertical-align: middle; }
.leaderboard td:first-child { border-left: 2px solid var(--ink); border-radius: 5px 0 0 5px; }
.leaderboard td:last-child { border-right: 2px solid var(--ink); border-radius: 0 5px 5px 0; }
.leaderboard tr:nth-child(2) td { background: #fdf6a8; font-weight: 800; }
.leaderboard .rank { font-family: var(--font-mono); color: var(--c-purple); font-weight: 700; }
.leaderboard .rtitle { font-size: 11px; color: var(--c-purple-80); font-weight: 600; }
.leaderboard .you td { background: var(--c-cyan-soft); }

/* screen-shake for big bad events */
.shake { animation: shake 0.5s; }
@keyframes shake { 0%,100% { transform: none; } 20% { transform: translate(-6px,2px); } 40% { transform: translate(6px,-2px); } 60% { transform: translate(-4px,1px); } 80% { transform: translate(4px,-1px); } }

.footnote { text-align: center; font-size: 11px; color: var(--c-purple-80); margin-top: 40px; line-height: 1.5; }
.footnote a { color: var(--c-purple); }

/* ==========================================================================
   GLOSSARY / LEARN-MORE — jargon links, cost chips, the dictionary popup
   ========================================================================== */
/* A jargon term: dotted-cyan underline that says "there's more here". */
.jr { cursor: help; border-bottom: 2px dotted var(--c-cyan); font-weight: 600; }
.jr:hover { background: var(--c-cyan-soft); border-bottom-color: var(--c-purple); }
.res .lab .jr { color: inherit; }

/* Action cost line → tidy token chips instead of a dot-separated run-on. */
.action .a-cost { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.chip { display: inline-block; font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
    padding: 2px 7px; border: 2px solid var(--ink); border-radius: 4px; background: var(--c-cream); color: var(--c-purple); }
.chip.up { color: #2f8a1c; background: #eaf6e2; }
.chip.down { color: var(--c-orange); background: #ffeede; }

/* The "this is a real trial" banner at the top of the scenario card. */
.real-note { font-size: 12.5px; line-height: 1.5; color: var(--c-purple); background: var(--c-cream);
    border: 2px dashed var(--c-cyan); border-radius: 5px; padding: 8px 11px; margin-bottom: 10px; }
.real-note .nct { font-family: var(--font-mono); font-weight: 700; }

/* The dictionary popup. */
.glossary-box { max-width: 440px; background: var(--c-cyan-soft); }
.gloss-kind { color: var(--c-purple) !important; }
#gloss-term { text-transform: capitalize; }
#gloss-def { min-height: 2.4em; }
.gloss-actions { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; flex-wrap: wrap; }
.gloss-badge { font-family: var(--font-display); font-size: 10px; font-weight: 800; padding: 3px 8px;
    border: 2px solid var(--ink); letter-spacing: 0.04em; }
.gloss-badge.seed { background: var(--c-green); color: var(--c-purple); }
.gloss-badge.llm { background: var(--c-yellow); color: var(--c-purple); }
.gloss-badge.pending { background: var(--c-orange); color: #fff; }

/* Even founder cards: equal height per row, blurb fills the bottom. */
.founder-card__blurb { flex: 1 0 auto; }

/* The real board on the race page — the cat climbs the value track. */
.value-board-wrap { margin-bottom: 18px; }
.vb-label { font-family: var(--font-display); font-size: 12.5px; font-weight: 700; color: var(--c-purple); margin-bottom: 6px; }
.vb-label b { color: var(--c-orange); }
.value-board { position: relative; border: 3px solid var(--ink); border-radius: 6px; box-shadow: 6px 6px 0 0 var(--ink); overflow: hidden; background: var(--c-cyan-soft); }
.value-board img { width: 100%; display: block; }
.board-cat { position: absolute; top: 1%; left: 6%; z-index: 3; font-size: clamp(18px, 3.4vw, 30px);
    transform: translateX(-50%); transition: left 0.7s cubic-bezier(.2,.8,.2,1);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45)); animation: bobToken 1.1s ease-in-out infinite; pointer-events: none; }
/* The competition, racing you up the same board (moves every turn). */
.board-rival { position: absolute; top: 20%; left: 6%; z-index: 2; font-size: clamp(15px, 2.8vw, 24px);
    transform: translateX(-50%) scaleX(-1); transition: left 0.7s cubic-bezier(.2,.8,.2,1);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45)) grayscale(0.2); animation: bobToken 1.35s ease-in-out infinite; pointer-events: none; opacity: 0.92; }
.vb-label .leg { font-weight: 700; }
.vb-label .leg-you { color: #2f8a1c; }
.vb-label .leg-rival { color: var(--c-orange); }

/* ---- Action PLAYING CARDS: a colored header band over a cream body, so it's
   unmistakable these are cards you PLAY (vs the info tiles up top). ---- */
.actions-label { font-family: var(--font-display); font-weight: 800; font-size: 14.5px; color: var(--c-purple); margin: 6px 0 10px; }
.card-play { padding: 0 !important; overflow: visible; display: flex; flex-direction: column; background: var(--c-cream) !important; position: relative; min-height: 176px; }
/* Stacked-card look: two offset card backs peek out behind, so each action
   reads as a DECK you draw from, not a flat panel. */
.card-play::before, .card-play::after { content: ""; position: absolute; inset: 0; background: var(--c-cream-deep);
    border: 3px solid var(--ink); border-radius: 6px; z-index: -1; }
.card-play::before { transform: translate(4px, 5px); }
.card-play::after { transform: translate(8px, 10px); }
.card-play > .card-head, .card-play > .card-body { position: relative; z-index: 1; }
.card-play:hover:not(:disabled) { transform: translateY(-4px); }
.card-head { background: var(--c-purple); color: var(--c-cream); font-family: var(--font-display); font-weight: 800;
    font-size: 14px; padding: 8px 12px; border-bottom: 3px solid var(--ink); display: flex; align-items: center; gap: 7px; }
.card-suit { color: var(--c-yellow); font-size: 12px; line-height: 1; }
.card-body { padding: 11px 14px; display: block; }
.card-body .a-desc { margin: 0 0 8px; }
.card-play:hover:not(:disabled) .card-body { background: var(--c-cyan-soft); }
/* The advance/file card is the special move: a gold header marks it apart. */
.action.advance.card-play .card-head { background: var(--c-yellow); color: var(--c-purple); }
.action.advance.card-play .card-suit { color: var(--c-purple); }
.action.card-play:disabled { opacity: 0.55; }
.action.card-play:disabled .card-head { background: #9a93a6; color: var(--c-cream); }

/* ======================================================================== */
/* BOARD MODE — the snake, the tokens, the spinner, the deck flip.           */
/* Sticker-comic to the bone: hard ink, SOLID offset shadows, no blur.       */
/* ======================================================================== */

/* The board stage: the generated SVG fills it; tokens layer on top by %. */
.board-stage { position: relative; margin: 4px 0 14px; border: 3px solid var(--ink);
    border-radius: 8px; box-shadow: 7px 7px 0 0 var(--ink); overflow: hidden; background: var(--c-cyan); }
#board-svg { display: block; line-height: 0; }
#board-svg svg.board-svg-el { display: block; width: 100%; height: auto; }
/* current-square highlight — pulse the landed tile's outline (no transform, so it
   never fights the <g> translate that places the tile). */
@keyframes curPulse { 0%,100% { stroke: var(--ink); stroke-width: 4; } 50% { stroke: var(--c-orange); stroke-width: 7; } }
.tile.is-current .tile-face { animation: curPulse 1.05s ease-in-out infinite; }

/* "Next gate" objective pill — sticker-comic, readable where the tiles aren't. */
.gate-status { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; margin: 0 0 12px;
    background: var(--c-cream); border: 3px solid var(--ink); border-radius: 8px; box-shadow: 4px 4px 0 0 var(--ink);
    padding: 8px 14px; font-family: var(--font-display); font-weight: 800; }
.gate-status .gs-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-purple); }
.gate-status .gs-name { font-size: 16px; color: var(--ink); }
.gate-status .gs-ready { font-size: 13px; font-weight: 700; color: var(--c-purple-80); }
.gate-status .gs-bar { flex: 1 1 80px; min-width: 80px; height: 12px; background: var(--c-cream-deep);
    border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.gate-status .gs-bar > i { display: block; height: 100%; transition: width .4s ease;
    background: repeating-linear-gradient(45deg, var(--c-green) 0 8px, #4ca037 8px 16px); }
.gate-status.ready { background: var(--c-green-soft); }
.gate-status.ready .gs-bar > i { background: var(--c-green); }

/* Avatar tokens — die-cut discs that ride above (cat) / below (dog) their tile. */
.token { position: absolute; left: 6%; top: 80%; z-index: 6;
    width: clamp(34px, 5vw, 50px); height: clamp(34px, 5vw, 50px);
    display: grid; place-items: center; font-size: clamp(17px, 2.7vw, 26px);
    background: var(--c-cream); border: 3px solid var(--ink); border-radius: 50%;
    box-shadow: 4px 5px 0 0 var(--ink); will-change: left, top, transform; pointer-events: none; }
.token::after { position: absolute; top: calc(100% - 2px); left: 50%; transform: translateX(-50%);
    font-family: var(--font-display); font-weight: 800; font-size: 9px; letter-spacing: .04em;
    color: var(--c-cream); padding: 1px 5px; border: 2px solid var(--ink); border-radius: 4px; white-space: nowrap; }
.token.cat { z-index: 7; }
.token.cat::after { content: "YOU"; background: var(--c-green); color: var(--ink); }
.token.rival { z-index: 6; filter: grayscale(.25); opacity: .94; }
.token.rival::after { content: "RIVAL"; background: var(--c-orange); color: var(--ink); }

/* The spinner dock + wheel (ux-patterns Pattern 1). */
.spinner-dock { display: flex; justify-content: center; margin: 0 0 14px; }
.spinner-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.spinner-stage { position: relative; width: 148px; height: 148px; filter: drop-shadow(6px 6px 0 var(--ink)); }
.spinner-wheel { width: 100%; height: 100%; transform: rotate(0deg);
    transition: transform 2.7s cubic-bezier(.13,.86,.27,1); transform-origin: 50% 50%; will-change: transform; }
.spinner-pointer { position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent;
    border-top: 22px solid var(--c-yellow); z-index: 3; filter: drop-shadow(0 2px 0 var(--ink)); }
.spinner-hub { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-6deg);
    width: 38px; height: 38px; display: grid; place-items: center; z-index: 2; background: var(--c-yellow);
    color: var(--c-purple); font-family: var(--font-display); font-weight: 800; font-size: 13px;
    border: 3px solid var(--ink); border-radius: 7px; box-shadow: 2px 2px 0 0 var(--ink); }
.spinner-btn { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: .02em;
    color: var(--c-purple); background: var(--c-green); border: 3px solid var(--ink); border-radius: 6px;
    padding: 10px 26px; cursor: pointer; box-shadow: 4px 4px 0 0 var(--ink);
    transition: transform .08s, box-shadow .08s, background .12s; }
.spinner-btn:hover:not(:disabled) { background: var(--c-yellow); }
.spinner-btn:active:not(:disabled) { transform: translate(4px,4px); box-shadow: 0 0 0 0 var(--ink); }
.spinner-btn:disabled { background: #e6e2d6; color: #9a93a6; box-shadow: 4px 4px 0 0 #bdb6a6; cursor: not-allowed; }
.spinner-result { font-family: var(--font-display); font-weight: 800; font-size: 13px; color: var(--c-purple);
    min-height: 18px; text-transform: uppercase; letter-spacing: .04em; }

/* Deck stacks: a color tab per deck so the four read as distinct hands. */
.deck-rnd .card-head { background: #1f7a3a; }
.deck-enroll .card-head { background: #b3261a; }
.deck-fda .card-head { background: var(--c-purple); }
.deck-funding .card-head { background: #8a6d00; }
.deck-funding .card-suit, .deck-funding .card-head { color: var(--c-yellow); }

/* Deck-draw 3D flip card (ux-patterns Pattern 2). */
#overlay-flip .flip-mount { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.flip-scene { perspective: 1200px; width: 300px; max-width: 88vw; }
.flip-card { position: relative; width: 100%; aspect-ratio: 3/4; transform-style: preserve-3d;
    transition: transform .62s cubic-bezier(.2,.9,.2,1); transform: rotateY(180deg); }
.flip-card.is-flipped { transform: rotateY(0deg); }
.flip-face, .flip-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
    border: 4px solid var(--ink); border-radius: 8px; box-shadow: 7px 7px 0 0 var(--ink);
    display: flex; flex-direction: column; overflow: hidden; }
.flip-back { transform: rotateY(0deg); background: var(--c-purple);
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.10) 1px, transparent 0); background-size: 14px 14px;
    align-items: center; justify-content: center; }
.flip-back .reg-stamp { font-family: var(--font-display); font-weight: 800; font-size: 46px; color: var(--c-yellow);
    border: 5px solid var(--c-yellow); border-radius: 12px; padding: 10px 18px; transform: rotate(-6deg);
    text-shadow: 3px 3px 0 var(--ink); letter-spacing: -.04em; }
.flip-back .deck-name { position: absolute; bottom: 14px; font-family: var(--font-display); font-weight: 700;
    font-size: 13px; color: var(--c-cream); letter-spacing: .16em; text-transform: uppercase; }
.flip-face { transform: rotateY(180deg); background: var(--c-cream); padding: 18px 16px; text-align: left; position: relative; }
.flip-face.good { background: var(--c-green-soft); } .flip-face.bad { background: #ffe0c2; } .flip-face.swing { background: #fdf6a8; }
.flip-face .fc-kind { font-family: var(--font-display); font-weight: 800; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-purple); }
.flip-face .fc-suit { position: absolute; top: 12px; right: 14px; font-size: 22px; }
.flip-face h3 { margin: 8px 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.08; color: var(--c-purple); }
.flip-face .fc-flavor { font-size: 13px; line-height: 1.5; color: var(--c-purple-80); flex: 1; overflow: auto; }
.flip-face .fc-effect { font-family: var(--font-display); font-weight: 700; font-size: 14px; margin-top: 8px; }
.flip-face .fc-effect .up { color: #2f8a1c; } .flip-face .fc-effect .down { color: var(--c-orange); }
#overlay-flip #flip-ok { width: 300px; max-width: 88vw; }

@media (max-width: 680px) {
    /* Header: let the brand hold line 1 and the nav wrap to its own right-aligned
       row, instead of shoving 4 buttons off-screen (the 114px overflow culprit). */
    .game-header { flex-wrap: wrap; gap: 8px; padding: 9px 14px; }
    .game-header nav { flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; }
    .ghost-btn { padding: 5px 10px; font-size: 12px; }
    .hud { grid-template-columns: repeat(2, 1fr); }
    .row2 { flex-direction: column; gap: 0; }
    .spinner-stage { width: 116px; height: 116px; }
    .token::after { font-size: 8px; padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .token, .tension .track > i, .tile.is-current .tile-face { animation: none !important; }
    .flip-card { transition: none; }
    .spinner-wheel { transition: transform .25s linear !important; }
    .screen.active, .card-modal, .review-modal, .end-modal, .choice-box, .shake { animation: none !important; }
}
