/* The Occasional Store: party games. One stylesheet, one set of tokens per pack theme. */
:root {
  --bg: #fff6e5; --panel: #ffffff; --ink: #17332a; --mute: #5d7168; --line: #17332a;
  --accent: #d6382f; --accent-ink: #fff; --accent2: #1e7b4f; --gold: #f2b134; --soft: #f6e8cc;
  --good: #1e7b4f; --bad: #d6382f; --warn: #c98a12; --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* ---- pack themes (set on <html data-theme>) ---- */
html[data-theme="naughty"] { --bg: #150e1f; --panel: #231633; --ink: #f7ecff; --mute: #b79fd0; --line: #f7ecff; --accent: #ff3d81; --accent-ink: #1a0b17; --accent2: #8e5bff; --gold: #ffc857; --soft: #33214a; --good: #46d39a; --bad: #ff6b8a; --warn: #ffc857; }
html[data-theme="stag"] { --bg: #0f1a24; --panel: #17283a; --ink: #eef4fa; --mute: #98aec4; --line: #eef4fa; --accent: #f59e0b; --accent-ink: #1a1100; --accent2: #38bdf8; --gold: #fcd34d; --soft: #223a52; --good: #4ade80; --bad: #fb7185; --warn: #fbbf24; }
html[data-theme="stagx"] { --bg: #0b0b0d; --panel: #1b1b20; --ink: #f6f1ea; --mute: #a9a29a; --line: #f6f1ea; --accent: #ef4444; --accent-ink: #fff; --accent2: #f59e0b; --gold: #fcd34d; --soft: #2b2b32; --good: #4ade80; --bad: #fb7185; --warn: #fbbf24; }
html[data-theme="hen"] { --bg: #fff0f6; --panel: #ffffff; --ink: #3b1230; --mute: #8a5a7b; --line: #3b1230; --accent: #e11d74; --accent-ink: #fff; --accent2: #7c3aed; --gold: #f5b301; --soft: #fbd9e8; --good: #15803d; --bad: #be123c; }
html[data-theme="henx"] { --bg: #14070f; --panel: #26101e; --ink: #ffe8f3; --mute: #c99ab4; --line: #ffe8f3; --accent: #ff2d8f; --accent-ink: #1a0510; --accent2: #b983ff; --gold: #ffd166; --soft: #3a1830; --good: #4ade80; --bad: #fb7185; --warn: #ffd166; }
html[data-theme="baby"] { --bg: #f2f9ff; --panel: #ffffff; --ink: #24425f; --mute: #5d7b98; --line: #24425f; --accent: #4f9dde; --accent-ink: #fff; --accent2: #f08bb0; --gold: #ffd166; --soft: #dcecfa; --good: #2f9e6e; --bad: #d9534f; --radius: 22px; }
html[data-theme="bridal"] { --bg: #fff8f3; --panel: #ffffff; --ink: #4a3235; --mute: #8c6b6f; --line: #4a3235; --accent: #bf6b7e; --accent-ink: #fff; --accent2: #6f9a82; --gold: #c9a14a; --soft: #f6e4dc; --good: #4f8a63; --bad: #b94a48; }
html[data-theme="kids"] { --bg: #fffbe0; --panel: #ffffff; --ink: #26324b; --mute: #5d6b86; --line: #26324b; --accent: #ff5a5f; --accent-ink: #fff; --accent2: #17b3a3; --gold: #ffbe0b; --soft: #ffeeb0; --good: #17a773; --bad: #e0393e; --radius: 24px; }
html[data-theme="holiday"] { --bg: #e6f6ff; --panel: #ffffff; --ink: #0d3b52; --mute: #4c7690; --line: #0d3b52; --accent: #ff7a00; --accent-ink: #fff; --accent2: #0aa6a6; --gold: #ffc61a; --soft: #cdeeff; --good: #0f9d6a; --bad: #e0393e; --radius: 24px; }
html[data-theme="murder"] { --bg: #14110f; --panel: #221b17; --ink: #f0e6d2; --mute: #b3a58c; --line: #d4af37; --accent: #c0392b; --accent-ink: #fff; --accent2: #b8903a; --gold: #d4af37; --soft: #33271f; --good: #6fbf73; --bad: #e0675a; --warn: #d4af37; }
html[data-theme="braai"] { --bg: #2a1608; --panel: #3d2210; --ink: #ffeacc; --mute: #d1a77c; --line: #ffd9a0; --accent: #ff6a1a; --accent-ink: #1d0d00; --accent2: #ffb703; --gold: #ffc43d; --soft: #52301a; --good: #7bd36b; --bad: #ff7a5c; --warn: #ffc43d; }
html[data-theme="roller"] { --bg: #120a2b; --panel: #1f1247; --ink: #f4eeff; --mute: #b7a6ea; --line: #ff5bd8; --accent: #ff3fc4; --accent-ink: #1a0630; --accent2: #22e1ff; --gold: #ffe14d; --soft: #2d1b66; --good: #43f0a0; --bad: #ff6b8a; --warn: #ffe14d; }
html[data-theme="seance"] { --bg: #0e0b14; --panel: #1a1424; --ink: #efe6ff; --mute: #a99bbf; --line: #8fe3c8; --accent: #b14dff; --accent-ink: #fff; --accent2: #2fb895; --gold: #e8c46a; --soft: #2a2138; --good: #5fe0a8; --bad: #ff6b8a; --warn: #e8c46a; }
html[data-theme="nye"] { --bg: #0b0b14; --panel: #16162b; --ink: #fff7e0; --mute: #b5b0c9; --line: #f5c542; --accent: #f5c542; --accent-ink: #1a1200; --accent2: #8b5cf6; --gold: #f5c542; --soft: #22223f; --good: #4ade80; --bad: #fb7185; --warn: #f5c542; }
html[data-theme="office"] { --bg: #f2f6fc; --panel: #ffffff; --ink: #14213d; --mute: #566581; --line: #14213d; --accent: #1d4ed8; --accent-ink: #fff; --accent2: #0f9d8a; --gold: #f59e0b; --soft: #dfe8f7; --good: #0f9d8a; --bad: #dc2626; --radius: 14px; }
html[data-theme="santa"] { --bg: #fff3ee; --panel: #ffffff; --ink: #3a1a14; --mute: #86554b; --line: #3a1a14; --accent: #c62828; --accent-ink: #fff; --accent2: #2e7d32; --gold: #f0b429; --soft: #fbdad0; --good: #2e7d32; --bad: #c62828; }
html[data-theme="valentine"] { --bg: #fff0f3; --panel: #ffffff; --ink: #4a1626; --mute: #8f5468; --line: #4a1626; --accent: #d6336c; --accent-ink: #fff; --accent2: #9c36b5; --gold: #f59f00; --soft: #fcd5e0; --good: #2b8a3e; --bad: #c92a2a; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.4; }
body { min-height: 100vh; min-height: 100dvh; }
#app { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(40px + env(safe-area-inset-bottom)); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.1; margin: 0 0 8px; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 9vw, 3.2rem); }
h2 { font-size: 1.5rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 12px; }
a { color: var(--accent); }
.mute { color: var(--mute); } .small { font-size: .85rem; } .center { text-align: center; } .tiny { font-size: .75rem; }
.eyebrow { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }
.gap { margin-top: 14px; }

/* cards + buttons */
.card { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: 0 5px 0 var(--line); }
.card + .card, .card + .btn, .btn + .card { margin-top: 18px; }
.card.flat { box-shadow: none; }
.card.dim { background: var(--soft); box-shadow: none; }
.btn { font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 var(--line); transition: transform .06s, box-shadow .06s; text-decoration: none; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.green { background: var(--accent2); color: #fff; }
.btn.gold { background: var(--gold); color: #2a1d00; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: .9rem; border-radius: 11px; box-shadow: 0 3px 0 var(--line); }
.btn.block { width: 100%; }
.btn.big { min-height: 64px; font-size: 1.15rem; }
.btn[disabled], .btn.off { opacity: .45; pointer-events: none; }
.btn.ghost { box-shadow: none; background: transparent; }
.btn.sel { background: var(--accent2); color: #fff; }
.btn + .btn { margin-top: 10px; }
.row > .btn + .btn, .opts > .btn + .btn { margin-top: 0; }
input, select, textarea { font: inherit; width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .cell:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
label { display: block; font-weight: 700; font-size: .85rem; margin: 12px 0 5px; }
.err { color: var(--bad); font-weight: 600; margin: 10px 0 0; }
.ok-msg { color: var(--good); font-weight: 600; }

/* header */
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.top .title { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; border: 2px solid var(--line); background: var(--panel); font-weight: 700; font-size: .85rem; }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--gold); color: #2a1d00; }
.badge.red { background: var(--accent); color: var(--accent-ink); }
.badge.green { background: var(--accent2); color: #fff; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; flex: none; border: 2px solid var(--line); }
.tdot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); vertical-align: middle; }

/* home */
.hero { padding: 26px 0 8px; }
.hero .brand { font-size: .72rem; letter-spacing: .3em; font-weight: 800; color: var(--accent); }
.code { font-family: var(--serif); font-weight: 800; font-size: 3rem; letter-spacing: .18em; color: var(--accent); }
.codeinput { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-weight: 800; font-size: 1.4rem; }
.licinput { text-transform: uppercase; letter-spacing: .1em; text-align: center; font-weight: 800; font-size: 1.05rem; }
.packbtn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; box-shadow: 0 4px 0 var(--line); margin-top: 10px; }
.packbtn.sel { background: var(--accent); color: var(--accent-ink); }
.packbtn b { font-family: var(--serif); font-size: 1.1rem; display: block; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 10px 40px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; display: grid; place-items: center; }

/* player list */
.plist { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.plist li { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 2px solid var(--line); border-radius: 999px; background: var(--bg); font-weight: 600; }
.plist li.off { opacity: .5; }
.plist .x { border: 0; background: none; color: var(--mute); cursor: pointer; font-size: 1.1rem; padding: 0 0 0 2px; }
.plist .tm { border: 0; background: none; cursor: pointer; padding: 0; }

/* game list */
.g { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; padding: 14px 0; border-top: 2px dashed var(--soft); }
.g:first-of-type { border-top: 0; }
.g .info { flex: 1 1 100%; min-width: 0; }
.g .gacts .btn { flex: 1; min-width: 110px; }
.g .name { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; }
.g.dis .name { opacity: .55; }
.grouphead { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 800; color: var(--mute); margin: 18px 0 0; }
details.guide summary { cursor: pointer; font-weight: 800; font-family: var(--serif); font-size: 1.1rem; }
details.guide ul { margin: 8px 0 0; padding-left: 20px; }

/* bingo */
.bingo { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.cell { aspect-ratio: 1; display: grid; place-items: center; text-align: center; font: inherit; font-size: clamp(.56rem, 2.55vw, .85rem); font-weight: 700; line-height: 1.1; border-radius: 10px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; min-width: 0; padding: 2px; position: relative; }
.cell.marked { background: var(--accent); color: var(--accent-ink); }
.cell.free { background: var(--gold); color: #2a1d00; }
.cell.hot { outline: 3px dashed var(--gold); outline-offset: -3px; }
.cell .sig { display: block; font-size: .8em; font-weight: 800; margin-top: 2px; background: rgba(0,0,0,.22); border-radius: 6px; padding: 0 3px; }
.cell input { min-height: 0; height: 100%; width: 100%; border: 0; background: transparent; text-align: center; padding: 1px; font: inherit; font-size: inherit; color: inherit; }
.bingo.fill .cell { cursor: text; }
.called-word { font-family: var(--serif); font-size: clamp(1.8rem, 8vw, 2.6rem); font-weight: 800; text-align: center; color: var(--accent); padding: 10px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip { font-size: .78rem; padding: 2px 9px; }

/* generic game bits */
.bigcard { font-family: var(--serif); font-weight: 700; font-size: clamp(1.5rem, 6.5vw, 2.1rem); text-align: center; padding: 26px 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--soft); overflow-wrap: anywhere; }
.bigcard .lead { display: block; font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.bigcard .sub { display: block; font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--mute); margin-top: 10px; }
.timer { font-family: var(--serif); font-weight: 800; font-size: 2rem; text-align: center; color: var(--accent); }
.bar { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; border: 2px solid var(--line); }
.bar > i { display: block; height: 100%; background: var(--accent2); }
.opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.opts.one { grid-template-columns: 1fr; }
.opts.three { grid-template-columns: repeat(3, 1fr); }
.opts .btn { justify-content: flex-start; text-align: left; }
.opts .btn.sel { background: var(--accent2); color: #fff; }
.opts .btn.win { background: var(--gold); color: #2a1d00; }
.res { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 2px dashed var(--soft); }
.res:first-child { border-top: 0; }
.res .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mark { font-weight: 900; font-size: 1.2rem; width: 28px; text-align: center; }
.mark.y { color: var(--good); } .mark.n { color: var(--bad); }
.fingers { letter-spacing: 3px; font-size: .8rem; }
.banner { text-align: center; padding: 14px; border-radius: 14px; background: var(--gold); color: #2a1d00; font-family: var(--serif); font-weight: 800; font-size: 1.3rem; border: 2px solid var(--line); }
.note { padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: .92rem; }
.vs { text-align: center; font-weight: 800; letter-spacing: .2em; color: var(--mute); margin: 10px 0; }
.split { height: 14px; border-radius: 999px; overflow: hidden; display: flex; border: 2px solid var(--line); }
.split i { display: block; height: 100%; }
.split .a { background: var(--accent); } .split .b { background: var(--accent2); }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--soft); border: 2px solid var(--line); margin-left: 4px; }

/* word search */
.ws { display: grid; gap: 2px; user-select: none; touch-action: manipulation; }
.ws button { aspect-ratio: 1; padding: 0; border: 0; border-radius: 5px; background: var(--panel); color: var(--ink); font: 700 clamp(.7rem, 3.2vw, 1rem)/1 var(--sans); cursor: pointer; min-width: 0; }
.ws button.start { background: var(--gold); color: #2a1d00; }
.ws button[class*="w"] { color: #fff; }
.w0 { background: #d6382f !important; } .w1 { background: #1e7b4f !important; } .w2 { background: #3b6fd1 !important; } .w3 { background: #a35bd6 !important; }
.w4 { background: #cc7a00 !important; } .w5 { background: #0e8c8c !important; } .w6 { background: #c2418f !important; } .w7 { background: #6a7d1e !important; }
.words { display: flex; flex-wrap: wrap; gap: 6px; }
.words span { font-weight: 700; font-size: .85rem; padding: 3px 10px; border: 2px solid var(--line); border-radius: 999px; background: var(--panel); }
.words span.done { text-decoration: line-through; opacity: .5; background: var(--soft); }

/* categories */
.cats label { margin: 10px 0 3px; }
.cgrid .catrow { padding: 10px 0; border-top: 2px dashed var(--soft); }
.cgrid .catrow:first-child { border-top: 0; }
.ans { display: inline-flex; gap: 6px; align-items: center; margin: 3px 6px 3px 0; padding: 3px 10px; border-radius: 999px; border: 2px solid var(--line); font-size: .88rem; font-weight: 600; background: var(--panel); cursor: default; }
.ans.ok { background: var(--good); color: #fff; border-color: var(--good); }
.ans.dup { background: var(--warn); color: #2a1d00; border-color: var(--warn); }
.ans.bad, .ans.vetoed { text-decoration: line-through; opacity: .6; }
button.ans { font-family: inherit; cursor: pointer; color: inherit; }

/* sip */
.sip { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; font-weight: 600; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 var(--line); margin-bottom: 11px; }
.sip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.sip .n { margin-left: auto; min-width: 28px; text-align: center; background: var(--gold); color: #2a1d00; border-radius: 999px; font-weight: 800; padding: 1px 8px; }

/* playing cards (King's Cup) */
.playing { width: 150px; height: 210px; margin: 0 auto; border-radius: 16px; background: #fff; color: #111; border: 3px solid #111; display: grid; place-items: center; font-family: var(--serif); font-weight: 800; position: relative; box-shadow: 0 6px 0 rgba(0,0,0,.35); }
.playing.red { color: #c0222b; }
.playing .r { font-size: 4.2rem; line-height: 1; }
.playing .s { font-size: 2.6rem; line-height: 1; margin-top: -10px; }
.playing .c1, .playing .c2 { position: absolute; font-size: 1.1rem; line-height: 1; text-align: center; }
.playing .c1 { top: 8px; left: 10px; } .playing .c2 { bottom: 8px; right: 10px; transform: rotate(180deg); }
.minicards { display: flex; gap: 6px; flex-wrap: wrap; }
.minicards span { background: #fff; color: #111; border: 2px solid #111; border-radius: 8px; padding: 2px 7px; font-weight: 800; font-size: .85rem; }
.minicards span.red { color: #c0222b; }

/* medals / tables */
table.score { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.score th, table.score td { padding: 7px 5px; text-align: center; border-bottom: 2px dashed var(--soft); }
table.score th:first-child, table.score td:first-child { text-align: left; }
table.score td.tot { font-weight: 800; font-size: 1rem; }
.medal { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .75rem; font-weight: 900; border: 2px solid var(--line); color: #2a1d00; }
.medal.gold { background: #ffd24a; } .medal.silver { background: #d9dde3; } .medal.bronze { background: #d58a4b; }
.evt { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 2px dashed var(--soft); cursor: pointer; }
.evt:first-child { border-top: 0; }
.evt .n { font-family: var(--serif); font-weight: 800; color: var(--accent); width: 26px; }
.evt.cur { background: var(--soft); border-radius: 10px; padding-left: 8px; }

/* checklists, claims */
.chk { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; font: inherit; background: none; border: 0; color: var(--ink); padding: 10px 0; border-top: 2px dashed var(--soft); cursor: pointer; }
.chk:first-of-type { border-top: 0; }
.chk .box { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); background: var(--bg); display: grid; place-items: center; font-weight: 900; color: #fff; }
.chk.on .box { background: var(--accent2); }
.chk.on .txt { text-decoration: line-through; opacity: .6; }
.chk .pts { margin-left: auto; font-weight: 800; color: var(--accent); white-space: nowrap; }

/* wall of cards */
.wallgrid { display: grid; gap: 12px; }
.paper { background: #fffdf5; color: #3a2e1b; border: 2px solid var(--line); border-radius: 6px; padding: 14px; transform: rotate(var(--tilt, 0deg)); box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.paper .by { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8a6d3b; margin-top: 8px; }
.paper .k { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #8a6d3b; margin-top: 8px; }
.paper .v { font-family: var(--serif); font-size: 1.1rem; overflow-wrap: anywhere; white-space: pre-wrap; }

/* parcel */
.vinyl { width: 120px; height: 120px; margin: 6px auto; border-radius: 50%; background: radial-gradient(circle, var(--accent) 0 18%, #111 19% 100%); border: 4px solid var(--line); animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.countbig { font-family: var(--serif); font-weight: 900; font-size: 7rem; text-align: center; line-height: 1; color: var(--accent); }

/* scoreboard + finale */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 14px 0; }
.podium .p { flex: 1; text-align: center; border: 2px solid var(--line); border-radius: 14px 14px 0 0; padding: 10px 4px; background: var(--panel); font-weight: 700; overflow-wrap: anywhere; }
.podium .p b { display: block; font-family: var(--serif); font-size: 1.6rem; }
.podium .p1 { min-height: 130px; background: var(--gold); color: #2a1d00; } .podium .p2 { min-height: 100px; } .podium .p3 { min-height: 80px; }
.cert { border: 6px double var(--accent); border-radius: 8px; padding: 26px 18px; text-align: center; background: var(--panel); }
.cert .who { font-family: var(--serif); font-size: clamp(1.8rem, 8vw, 2.6rem); font-weight: 800; color: var(--accent); border-bottom: 2px solid var(--line); display: inline-block; padding: 0 12px 4px; margin: 8px 0; overflow-wrap: anywhere; }
.cert ul { list-style: none; padding: 0; margin: 10px auto; max-width: 280px; text-align: left; }
.cert li::before { content: "\2611  "; color: var(--accent); }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: end center; z-index: 20; padding: 0; }
.overlay .sheet { width: 100%; max-width: 640px; max-height: 88vh; overflow: auto; background: var(--bg); border: 2px solid var(--line); border-radius: 22px 22px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
#toast { position: fixed; left: 50%; top: 14px; transform: translate(-50%, -140%); opacity: 0; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 30; transition: transform .25s, opacity .25s; max-width: 92vw; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.3); pointer-events: none; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }
.gate { text-align: center; }

/* murder mystery */
.dossier { border: 2px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.dossier .stamp { background: var(--accent); color: var(--accent-ink); font-weight: 800; letter-spacing: .18em; font-size: .72rem; text-transform: uppercase; padding: 6px 12px; }
.dossier .in { padding: 14px; }
.dossier h4 { margin: 14px 0 4px; font-family: var(--serif); font-size: 1.05rem; color: var(--accent2); }
.evcard { border: 2px solid var(--line); border-radius: 12px; padding: 12px; background: var(--soft); margin-top: 10px; }
.evcard b.n { font-size: .72rem; letter-spacing: .16em; color: var(--accent); }
.tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px 8px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .btn { flex: none; white-space: nowrap; }
.cast { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cast .c { border: 2px solid var(--line); border-radius: 14px; padding: 10px; background: var(--panel); }
.cast .c.taken { opacity: .55; }
.cast .c b { font-family: var(--serif); display: block; }

/* confetti-ish cheer */
.cheer { font-family: var(--serif); font-weight: 900; font-size: clamp(2rem, 11vw, 3.4rem); text-align: center; color: var(--gold); animation: pop .6s ease-out; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media print {
  body { background: #fff; color: #000; }
  #app > *:not(.printme) { display: none !important; }
  .printme { box-shadow: none; border: 0; }
  .noprint, #toast { display: none !important; }
  .cert { color: #000; border-color: #c00; }
  .paper { break-inside: avoid; box-shadow: none; transform: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
