/* The Occasional Store, online games. Same look as the store: charcoal, bronze, Inter Tight headings, DM Sans body,
   pill buttons. Each pack sets --accent (its cover colour) and --accent2 (its eyebrow colour) from the pack file. */
:root {
  --bg: #161616; --panel: #222222; --panel2: #2a2a2a; --ink: #ffffff; --mute: rgba(255, 255, 255, .66); --line: rgba(255, 255, 255, .14);
  --accent: #d8bfa9; --accent-ink: #1d1d1d; --accent2: #a8713f; --gold: #d8bfa9; --soft: #2a2a2a;
  --good: #5fcf8a; --bad: #ff6b6b; --warn: #e9b949; --wa: #25d366; --radius: 16px;
  --serif: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}
/* light packs keep their own feel while the murder mysteries are the only ones on sale: all dark for now */

* { 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.45; }
body { min-height: 100vh; min-height: 100dvh; }
#app { max-width: 640px; margin: 0 auto; padding: 12px 16px calc(40px + env(safe-area-inset-bottom)); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.05; margin: 0 0 8px; letter-spacing: -0.03em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 8.5vw, 3rem); }
h2 { font-size: 1.5rem; } h3 { font-size: 1.1rem; letter-spacing: -0.02em; }
p { margin: 0 0 12px; }
a { color: var(--accent); }
.mute { color: var(--mute); } .small { font-size: .875rem; } .center { text-align: center; } .tiny { font-size: .75rem; }
.eyebrow { font-family: var(--serif); font-size: .72rem; letter-spacing: .16em; 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; }

/* brand bar */
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0 14px; }
.brandbar img { height: 26px; width: auto; display: block; }
.brandbar .pill { font-family: var(--serif); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }

/* cards + buttons */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card, .card + .btn, .btn + .card, .card + .dossier, .dossier + .card { margin-top: 14px; }
.card.flat { border: 0; }
.card.dim { background: var(--panel2); }
.btn { font-family: var(--serif); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: transform .06s, background .15s, opacity .15s; text-decoration: none; }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.green { background: var(--good); color: #0d1f14; border-color: transparent; }
.btn.wa { background: var(--wa); color: #06230f; border-color: transparent; }
.btn.gold { background: #ffffff; color: #1d1d1d; border-color: transparent; }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn.big { min-height: 60px; font-size: 1.1rem; }
.btn[disabled], .btn.off { opacity: .4; pointer-events: none; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sel { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn + .btn { margin-top: 10px; }
.row > .btn + .btn, .opts > .btn + .btn, .stepper > .btn + .btn, .tabs > .btn + .btn { margin-top: 0; }
input, select, textarea { font: inherit; width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: #1a1a1a; color: var(--ink); }
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, .35); }
textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: block; font-family: var(--serif); font-weight: 600; 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 inside a room */
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.top .title { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); font-family: var(--serif); font-weight: 600; font-size: .82rem; white-space: nowrap; }
.badge { display: inline-block; font-family: var(--serif); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--accent2); color: #fff; }
.badge.red { background: #8c5b2e; color: #fff; }
.badge.green { background: var(--good); color: #0d1f14; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; flex: none; }
.tdot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); vertical-align: middle; }

/* home */
.hero { padding: 14px 0 10px; }
.hero h1 { margin-bottom: 10px; }
.hero .lead { font-size: 1.05rem; color: var(--mute); }
.code { font-family: var(--serif); font-weight: 800; font-size: 3rem; letter-spacing: .14em; color: var(--accent); line-height: 1; margin: 6px 0 10px; }
.codeinput { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-weight: 800; font-size: 1.4rem; font-family: var(--serif); }
.licinput { text-transform: uppercase; letter-spacing: .1em; text-align: center; font-weight: 700; font-size: 1.05rem; font-family: var(--serif); }
.packbtn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); font: inherit; cursor: pointer; margin-top: 10px; }
.packbtn.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.packbtn img { width: 52px; border-radius: 6px; flex: none; }
.packbtn b { font-family: var(--serif); font-size: 1.05rem; display: block; letter-spacing: -0.02em; }
.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: 3px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-family: var(--serif); font-weight: 800; display: grid; place-items: center; font-size: .9rem; }
.coverrow { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.coverrow::-webkit-scrollbar { display: none; }
.coverrow img { width: 72px; border-radius: 6px; flex: none; opacity: .9; }
.cover-hero { width: 120px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); margin: 12px 0 6px; transform: rotate(-2deg); }
.hero-case { display: flex; gap: 14px; align-items: center; }
.hero-case img { width: 84px; border-radius: 8px; flex: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); }

/* 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: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel2); 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: 1px solid var(--line); }
.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.05rem; letter-spacing: -0.02em; }
.g.dis .name { opacity: .55; }
.grouphead { font-family: var(--serif); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--mute); margin: 18px 0 0; }
details.guide summary { cursor: pointer; font-weight: 700; font-family: var(--serif); font-size: 1.05rem; letter-spacing: -0.02em; }
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: 600; line-height: 1.1; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); 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: #1d1d1d; }
.cell.hot { outline: 2px 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); letter-spacing: -0.02em; text-align: center; padding: 26px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel2); overflow-wrap: anywhere; }
.bigcard .lead { display: block; font-size: .75rem; 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: 500; 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(--panel2); overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: var(--accent); }
.opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.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(--accent); color: var(--accent-ink); }
.opts .btn.win { background: var(--gold); color: #1d1d1d; }
.res { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.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: 16px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-family: var(--serif); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.note { padding: 12px 14px; border-radius: 12px; background: var(--panel2); font-size: .92rem; border: 1px solid var(--line); }
.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: 1px 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: 700; padding: 1px 8px; border-radius: 999px; background: var(--panel2); border: 1px 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(--panel2); 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: #1d1d1d; }
.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: 600; font-size: .85rem; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel2); }
.words span.done { text-decoration: line-through; opacity: .5; }

/* categories */
.cats label { margin: 10px 0 3px; }
.cgrid .catrow { padding: 10px 0; border-top: 1px solid var(--line); }
.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: 1px solid var(--line); font-size: .88rem; font-weight: 600; background: var(--panel2); cursor: default; }
.ans.ok { background: var(--good); color: #0d1f14; border-color: var(--good); }
.ans.dup { background: var(--warn); color: #1d1d1d; 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: 1px solid var(--line); background: var(--panel2); color: var(--ink); cursor: pointer; margin-bottom: 10px; }
.sip .n { margin-left: auto; min-width: 28px; text-align: center; background: var(--accent); color: var(--accent-ink); 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 10px 30px rgba(0,0,0,.5); }
.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: 1px solid var(--line); }
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; color: #1d1d1d; }
.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: 1px solid var(--line); 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(--panel2); 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: 1px solid var(--line); cursor: pointer; }
.chk:first-of-type { border-top: 0; }
.chk .box { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); display: grid; place-items: center; font-weight: 900; color: #0d1f14; }
.chk.on .box { background: var(--good); }
.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-radius: 6px; padding: 14px; transform: rotate(var(--tilt, 0deg)); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.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: 1px 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(--accent); color: var(--accent-ink); } .podium .p2 { min-height: 100px; } .podium .p3 { min-height: 80px; }
.cert { border: 4px 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: 1px 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,.6); 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: 1px 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: #fff; color: #1d1d1d; padding: 10px 18px; border-radius: 999px; font-family: var(--serif); font-weight: 600; z-index: 30; transition: transform .25s, opacity .25s; max-width: 92vw; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.4); pointer-events: none; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }
.gate { text-align: center; }

/* murder mystery party */
.dossier { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.dossier .stamp { background: var(--accent); color: var(--accent-ink); font-family: var(--serif); font-weight: 700; letter-spacing: .14em; font-size: .72rem; text-transform: uppercase; padding: 7px 14px; }
.dossier .in { padding: 16px; }
.dossier h4 { margin: 14px 0 4px; font-family: var(--serif); font-size: 1rem; color: var(--accent); letter-spacing: -0.01em; }
.evcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel2); margin-top: 10px; }
.evcard b.n { font-family: var(--serif); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; 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: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--panel2); }
.cast .c.taken { opacity: .55; }
.cast .c b { font-family: var(--serif); display: block; letter-spacing: -0.02em; }

/* crack the case */
.casebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.casebar b { font-family: var(--serif); font-size: 1.05rem; letter-spacing: -0.02em; }
.casebar .eyebrow { margin-bottom: 2px; }
.letter { background: #1d1a17; border-color: rgba(216, 191, 169, .25); }
.letter .type { font-family: "Courier New", Courier, monospace; font-size: .95rem; line-height: 1.5; color: #f3ead9; white-space: pre-line; }
.letter .signed { font-family: var(--serif); font-style: italic; color: var(--accent); margin-top: 6px; }
.stampx { font-family: var(--serif); font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--bad); border: 1px solid var(--bad); border-radius: 4px; padding: 3px 8px; transform: rotate(-4deg); }
.victim .oneline { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; color: var(--accent); margin: 10px 0; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 8px; }
.facts div { border-top: 1px solid var(--line); padding-top: 6px; }
.facts b { display: block; font-family: var(--serif); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.facts span { font-size: .9rem; }
.tl { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.tl b { min-width: 72px; font-family: var(--serif); color: var(--accent); }
.suspect .quote, .quote { font-style: italic; color: #f3ead9; }
.alibi { background: var(--panel2); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.alibi b { display: block; font-family: var(--serif); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.job { background: #1d1a17; border-color: rgba(216, 191, 169, .25); }
.qgroup { padding: 10px 0 2px; border-top: 1px solid var(--line); }
.qgroup h3 { margin: 4px 0 8px; color: var(--accent); }
.qa { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 8px 0; }
.qa .qq { flex: 1 1 200px; }
.qa.closed .qq { opacity: .6; }
.qa.asked { display: block; background: var(--panel2); border-radius: 12px; padding: 10px 12px; margin: 6px 0; }
.qa.asked .qq { font-weight: 600; margin-bottom: 4px; }
.qa .ans { font-style: italic; color: #f3ead9; }
.qa .ans b { font-style: normal; font-family: var(--serif); color: var(--accent); margin-right: 4px; }
.logrow { padding: 10px 0; border-top: 1px solid var(--line); }
.logrow input { margin-top: 8px; min-height: 42px; font-size: .95rem; }
.confirm { border: 1px solid var(--accent); border-radius: 14px; padding: 12px; }
.confirm .small { margin-bottom: 10px; }
.stepper { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.stepper .btn { min-width: 42px; padding: 6px 10px; }
.scorerow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.scorerow .t { flex: 1; min-width: 0; font-size: .92rem; }
.scorerow .pts { font-family: var(--serif); font-size: 1.3rem; min-width: 44px; text-align: right; color: var(--accent); }
.total { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 0; border-top: 2px solid var(--accent); margin-top: 6px; font-family: var(--serif); font-weight: 700; }
.total b { font-size: 2rem; color: var(--accent); }

/* confetti-ish cheer */
.cheer { font-family: var(--serif); font-weight: 900; font-size: clamp(2rem, 11vw, 3.4rem); text-align: center; color: var(--accent); 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; } }

/* portraits of the victim and the characters */
.portrait { display: block; width: 100%; max-width: 150px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--panel2); }
.portrait.big { max-width: 160px; margin-bottom: 10px; }
.portrait.card { width: 100%; max-width: none; margin-bottom: 8px; }
.portrait.small { width: 36px; height: 48px; border-radius: 6px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.portrait.tiny { width: 28px; height: 36px; border-radius: 5px; margin-right: 8px; flex: none; }
.who { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.who .portrait { width: 64px; height: 84px; flex: none; margin: 0; }
.who .portrait.big { width: 84px; height: 112px; }
h3.who, b.who { display: flex; align-items: center; gap: 0; }

/* who has the floor (murder mystery party) */
.spot { border-color: var(--accent); }
.spot .line { font-size: 1.1rem; line-height: 1.5; margin: 10px 0; }
button.chip { font-family: var(--serif); cursor: pointer; color: var(--ink); }
.chip.done { opacity: .55; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
