/* The Court of Aura: one judge centre stage, drawn rough and animated "on twos". Built for a 16:9 projector. */
:root {
  --stage: #141418;
  --panel: #1d1d23;
  --line: #2c2c35;
  --text: #f4f1ea;
  --soft: #a4a1ad;
  --dim: #6f6c78;
  --lime: #c6ff3d;
  --pink: #ff4fa3;
  --ink: #0d0d10;
  --marker: "Permanent Marker", "Comic Sans MS", cursive;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --desk-h: 218px;
  --move: .6s cubic-bezier(.7, 0, .2, 1);
  --pop: cubic-bezier(.2, 1.6, .4, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
p, h2 { margin: 0; font-weight: 400; }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.defs { position: absolute; }

html { background: var(--stage); }
body {
  margin: 0; height: 100vh; height: 100dvh; min-height: 560px; overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: var(--stage); color: var(--text); font-family: var(--body);
}

/* ---------- top: only the rizz line ---------- */
.top { position: relative; display: flex; justify-content: center; align-items: center; padding: 14px 190px 4px; }
.rizz { font-family: var(--marker); font-size: clamp(15px, 1.5vw, 19px); line-height: 1.2; text-align: center; color: var(--soft); }
.rizz span { display: inline-block; color: var(--lime); filter: url(#boil-s); }
.top-actions { position: absolute; right: 16px; top: 8px; display: flex; gap: 4px; }
.icon { position: relative; width: 38px; height: 38px; padding: 5px; background: transparent; border: 0; border-radius: 8px; cursor: pointer; color: var(--soft); transition: transform .12s var(--pop); }
.icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: url(#boil-s); }
.icon:hover { color: var(--text); transform: rotate(-6deg) scale(1.1); }
.icon:active { transform: scale(.85); }
.icon .mute { display: none; stroke: var(--pink); }
.icon[aria-pressed="false"] .waves { display: none; }
.icon[aria-pressed="false"] .mute { display: inline; }
.count:not(:empty) { position: absolute; right: -2px; top: -2px; min-width: 17px; padding: 0 4px; border-radius: 9px; background: var(--lime); color: var(--ink); font-size: 12px; font-weight: 700; line-height: 17px; text-align: center; }
.mini {
  background: transparent; color: var(--soft); border: 2px solid var(--line); border-radius: 8px;
  padding: 4px 10px; cursor: pointer; font-family: var(--body); font-size: 14px; font-weight: 700; white-space: nowrap;
}
.mini:hover { color: var(--text); border-color: var(--soft); }
.mini.danger:hover { color: var(--pink); border-color: var(--pink); }

/* ---------- the stage ---------- */
.stage { position: relative; min-height: 0; overflow: hidden; }
.stage.bang { animation: bang .35s steps(6) both; }
@keyframes bang { 20% { transform: translate(-7px, 5px); } 40% { transform: translate(7px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } }
.flash { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; background: var(--pink); }
.flash.pos { background: var(--lime); }
.flash.go { animation: flash .28s steps(3) both; }
@keyframes flash { 0% { opacity: .3; } 100% { opacity: 0; } }

.judge-wrap {
  position: absolute; left: 50%; bottom: var(--desk-h); height: calc(100% - var(--desk-h) - 6px);
  aspect-ratio: 400 / 440; max-width: 94vw; transform: translateX(-50%);
  transition: left var(--move), bottom var(--move), height var(--move);
}
body.in-verdict .judge-wrap { left: 23%; bottom: 8px; height: min(80%, 580px); }
.judge { display: block; width: 100%; height: 100%; overflow: visible; }

/* the judge only speaks up at home when something is wrong or the court is busy */
.bubble {
  position: absolute; left: 72%; top: 12%; z-index: 2; width: max-content; max-width: 220px;
  background: var(--text); color: var(--ink); border-radius: 18px; padding: 9px 14px;
  font-family: var(--marker); font-size: 17px; line-height: 1.2;
  transform: rotate(2deg) scale(.6); transform-origin: 0 100%; opacity: 0; visibility: hidden;
  transition: transform .18s var(--pop), opacity .12s, visibility 0s .18s;
}
.bubble::after { content: ""; position: absolute; left: 14px; bottom: -14px; border: 9px solid transparent; border-top: 13px solid var(--text); border-left-width: 3px; }
.bubble.show { transform: rotate(2deg) scale(1); opacity: 1; visibility: visible; transition-delay: 0s; }
body.in-verdict .bubble { display: none; }

/* ---------- the judge: parts for the current state, animated in steps like a flipbook ---------- */
.m, .arm, .sweat, .eyes-happy { display: none; }
#judge[data-mouth="idle"] .m-idle, #judge[data-mouth="talk"] .m-talk,
#judge[data-mouth="shock"] .m-shock, #judge[data-mouth="smile"] .m-smile { display: inline; }
#judge[data-arm="up"] .arm-up, #judge[data-arm="wind"] .arm-up, #judge[data-arm="down"] .arm-down { display: inline; }
#judge[data-face="proud"] .eyes-open { display: none; }
#judge[data-face="proud"] .eyes-happy { display: inline; }
body.long-text #judge[data-face="typing"] .sweat { display: inline; animation: drip 1.4s steps(5) infinite; }
@keyframes drip { from { transform: translateY(0); opacity: 1; } to { transform: translateY(24px); opacity: 0; } }

.j-body { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 3.2s steps(4) infinite alternate; }
@keyframes breathe { to { transform: scaleY(1.018); } }
.j-head { transform-box: fill-box; transform-origin: 50% 100%; animation: bob 3.6s steps(5) infinite; transition: transform .25s steps(3); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-1.5deg); } }
.wig { transform-box: fill-box; transform-origin: 50% 80%; }
.eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.6s steps(1) infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 95%, 98% { transform: scaleY(.1); } }
.pupils { transform: translate(var(--px, 0px), var(--py, 0px)); transition: transform .18s steps(2); }
.brow { transform-box: fill-box; transform-origin: center; transition: transform .2s steps(2); }
.arm-up { transform-box: view-box; transform-origin: 262px 316px; animation: tap 3.4s steps(8) infinite; }
@keyframes tap { 0%, 76%, 100% { transform: rotate(0); } 84% { transform: rotate(11deg); } 92% { transform: rotate(-3deg); } }

/* leaning in while you type: one eyebrow up, quicker gavel */
#judge[data-face="typing"] .j-head { animation: none; transform: translateY(5px) rotate(3deg); }
#judge[data-face="typing"] .brow-l { transform: translateY(-7px) rotate(-10deg); }
#judge[data-face="typing"] .arm-up { animation-duration: 1.2s; }
/* deliberating */
#judge[data-face="think"] .j-head { animation: none; transform: rotate(-5deg); }
#judge[data-face="think"] .brow-l { transform: translateY(-3px) rotate(8deg); }
#judge[data-face="think"] .brow-r { transform: translateY(-8px) rotate(-8deg); }
#judge[data-face="think"] .arm-up { animation-duration: .7s; }
/* verdict: wind up, then slam */
#judge[data-arm="wind"] .arm-up { animation: none; transform: rotate(-26deg); }
#judge[data-face="shock"] .eyes-open { animation: none; transform: scale(1.45); }
#judge[data-face="shock"] .pupils circle { r: 3; }
#judge[data-face="shock"] .brow { transform: translateY(-14px); }
#judge[data-face="shock"] .j-body { animation: jump .5s steps(6) both; }
#judge[data-face="shock"] .wig { animation: wigpop .7s steps(8) both; }
#judge[data-face="proud"] .brow { transform: translateY(-5px); }
#judge[data-face="proud"] .j-body { animation: hop .9s steps(9) both; }
#judge[data-face="proud"] .j-head { animation: nod .5s .9s steps(4) 3; }
@keyframes jump { 30% { transform: translateY(-20px) scaleY(1.06); } 60% { transform: translateY(0) scaleY(.94); } }
@keyframes wigpop { 25% { transform: translateY(-34px) rotate(8deg); } 60% { transform: translateY(4px) rotate(-3deg); } }
@keyframes hop { 20% { transform: translateY(-14px); } 40% { transform: translateY(0) scaleY(.96); } 60% { transform: translateY(-9px); } 80% { transform: translateY(0); } }
@keyframes nod { 50% { transform: translateY(5px) rotate(2deg); } }
/* idle fidgets, picked at random in app.js */
#judge[data-fidget="yawn"] .eyes { animation: none; transform: scaleY(.12); }
#judge[data-fidget="yawn"] .j-head { animation: none; transform: translateY(-4px) rotate(-4deg); }
#judge[data-fidget="wig"] .wig { animation: wigslip 1.5s steps(10) both; }
#judge[data-fidget="tap"] .arm-up { animation: tap2 1s steps(10) both; }
@keyframes wigslip { 20%, 55% { transform: translate(9px, 5px) rotate(9deg); } 70% { transform: translate(-2px, -3px) rotate(-2deg); } }
@keyframes tap2 { 20%, 60% { transform: rotate(13deg); } 40%, 80% { transform: rotate(-2deg); } }

/* aura rings */
.rings { stroke: #2b2b33; transition: stroke .6s; }
body[data-sign="neg"] .rings { stroke: #5e2743; }
body[data-sign="pos"] .rings { stroke: #4c5f22; }
.ring { transform-box: view-box; transform-origin: 200px 190px; animation: spin 90s steps(180) infinite; }
.ring.r2 { animation-duration: 140s; animation-direction: reverse; }
.ring.r3 { animation-duration: 200s; }
@keyframes spin { to { transform: rotate(360deg); } }
.rings.burst { animation: burst .5s steps(6) both; transform-box: view-box; transform-origin: 200px 190px; }
@keyframes burst { 30% { transform: scale(1.22); } }
.bang-lines { stroke: var(--lime); }
#judge[data-face="shock"] .bang-lines { stroke: var(--pink); }

/* ---------- your aura ---------- */
.score { position: absolute; left: calc(50% + min(25vw, 300px)); top: 24%; transition: opacity .3s, transform var(--move); }
body.in-verdict .score { opacity: 0; transform: translateX(40px); pointer-events: none; }
.label { font-family: var(--marker); font-size: 17px; color: var(--soft); }
.num { --h: 1.1em; font-weight: 700; font-size: clamp(40px, 7vh, 54px); line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; height: 1.1em; overflow: hidden; }
body[data-sign="neg"] .num { color: var(--pink); }
body[data-sign="pos"] .num { color: var(--lime); }
.od, .oc { display: inline-block; height: var(--h); vertical-align: top; }
.od .strip { display: block; transform: translateY(calc(var(--d, 0) * -1 * var(--h))); transition: transform .9s cubic-bezier(.3, 1.3, .4, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.od .strip i { display: block; height: var(--h); font-style: normal; }
.num.shake { animation: shake .5s steps(8) both; }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
.num.bounce { animation: bounce .55s var(--pop) both; transform-origin: left center; }
@keyframes bounce { 40% { transform: scale(1.12); } }
/* the rank only shows up for a few seconds after a verdict */
.rank { display: inline-block; margin-top: 6px; font-family: var(--marker); font-size: 18px; line-height: 1.25; padding: 1px 10px; background: var(--soft); color: var(--ink); transform: rotate(-3deg) scale(0); transform-origin: left center; transition: transform .25s var(--pop); }
.rank.show { transform: rotate(-3deg) scale(1); }
body[data-sign="neg"] .rank { background: var(--pink); }
body[data-sign="pos"] .rank { background: var(--lime); }

/* ---------- the desk ---------- */
.desk {
  position: absolute; left: 50%; bottom: 0; width: min(640px, 92%); height: var(--desk-h); padding-top: 14px;
  display: flex; flex-direction: column; gap: 11px; transform: translateX(-50%);
  transition: transform var(--move), opacity .3s;
}
body.in-verdict .desk { transform: translate(-50%, 110%); opacity: 0; }
body.deliberating .desk { opacity: .45; }
.field { position: relative; }
textarea {
  display: block; width: 100%; height: 78px; resize: none;
  border: 3px solid var(--lime); background: var(--panel); border-radius: 8px; padding: 10px 14px;
  font: 400 20px/1.35 var(--body); color: var(--text); caret-color: var(--lime);
}
textarea:focus { outline: none; background: #22222a; }
textarea::placeholder { color: var(--dim); }
textarea.nope { animation: shake .4s steps(8) both; border-color: var(--pink); }
/* LARP check: paperclip + screenshot thumbnail inside the box */
textarea { padding-right: 52px; }
body.has-shot textarea { padding-right: 88px; }
.attach { position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; padding: 5px; border: 0; border-radius: 8px; background: transparent; color: var(--soft); cursor: pointer; transition: transform .14s var(--pop); }
.attach svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: url(#boil-s); }
.attach:hover:not(:disabled) { color: var(--pink); transform: rotate(-12deg) scale(1.12); }
.shot { position: absolute; right: 10px; top: 8px; width: 66px; height: 60px; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border: 2px solid var(--pink); border-radius: 4px; transform: rotate(3deg); }
.shot.in { animation: pin .35s steps(5) both; }
@keyframes pin { from { transform: translateY(-26px) rotate(-14deg) scale(1.3); opacity: 0; } 70% { transform: translateY(2px) rotate(2deg); opacity: 1; } }
.shot-x { position: absolute; right: -8px; top: -8px; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid var(--stage); background: var(--pink); color: var(--ink); font-weight: 700; line-height: 1; cursor: pointer; }
.desk.drop textarea { border-style: dashed; border-color: var(--pink); background: #2a1a24; }
.who-posted { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; padding-left: 12px; border-left: 2px solid var(--line); }
#handle { width: 136px; padding: 3px 8px; border: 2px dashed #4a4a55; border-radius: 6px; background: transparent; color: var(--pink); font: 400 15px var(--body); }
#handle:focus { outline: none; border-color: var(--pink); border-style: solid; }
#handle::placeholder { color: var(--dim); }
.plat { width: 30px; padding: 2px 0; border: 2px solid #4a4a55; border-radius: 6px; background: transparent; color: var(--soft); font: 700 14px var(--body); cursor: pointer; }
.plat:hover:not(:disabled) { color: var(--pink); border-color: var(--pink); }
.btn.nope { animation: shake .4s steps(8) both; }
.counter { position: absolute; right: 12px; bottom: 5px; font-size: 13px; color: var(--pink); pointer-events: none; }
.chips { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; font-size: 15px; color: var(--soft); }
.chip { background: transparent; border: 2px dashed #4a4a55; padding: 2px 10px; border-radius: 6px; color: var(--text); cursor: pointer; font-size: 15px; transition: transform .14s var(--pop); }
.chip:hover:not(:disabled) { border-color: var(--lime); color: var(--lime); transform: translateY(-2px) rotate(-2deg); }
.chip:active:not(:disabled) { transform: scale(1.06, .82); }
.chip:disabled { opacity: .4; cursor: default; }
.btns { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.btn {
  font-family: var(--marker); font-size: 21px; line-height: 1.2; padding: 7px 20px 5px; border-radius: 8px;
  border: 3px solid var(--lime); background: transparent; color: var(--lime); cursor: pointer;
  transition: transform .14s var(--pop);
}
.btn:hover:not(:disabled) { transform: translateY(-3px) rotate(-2deg); }
.btn:active:not(:disabled) { transform: scale(1.06, .82); }
.btn.go { background: var(--lime); color: var(--ink); transform: rotate(-1.5deg); }
.btn.go:hover:not(:disabled) { transform: translateY(-3px) rotate(-3deg); }
.btn.go:active:not(:disabled) { transform: scale(1.06, .82) rotate(-1.5deg); }
.btn.lock { border-style: dashed; border-color: #4a4a55; color: var(--dim); cursor: not-allowed; }
.btn.lock small { font-family: var(--body); font-size: 14px; }
.btn.lock.on { border-style: solid; border-color: var(--pink); color: var(--pink); cursor: pointer; }
.btn:disabled:not(.lock) { opacity: .5; cursor: wait; }
.btn.lock.on:disabled { opacity: .5; cursor: wait; }
.btn:focus-visible, .chip:focus-visible, .mini:focus-visible, .icon:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

/* ---------- the verdict ---------- */
.verdict {
  position: absolute; left: 45%; right: 4%; top: 0; bottom: 0; padding: 12px 0 14px 26px;
  display: flex; flex-direction: column; justify-content: center; justify-content: safe center; gap: 12px; overflow-y: auto;
  animation: slidein .4s .3s var(--pop) both;
}
.verdict > * { flex: none; }
@keyframes slidein { from { transform: translateX(60px) scale(.9); opacity: 0; } }
.verdict.leaving { animation: slideout .2s ease-in both; }
@keyframes slideout { to { transform: translateX(60px); opacity: 0; } }
.v-bubble {
  position: relative; background: var(--text); color: var(--ink); border-radius: 22px; padding: 13px 20px;
  font-weight: 700; font-size: clamp(19px, 3vh, 23px); line-height: 1.3; cursor: pointer; min-height: 4.4em; transform: rotate(-.6deg);
}
.v-bubble::before { content: ""; position: absolute; left: -20px; top: 34px; border: 12px solid transparent; border-right: 22px solid var(--text); }
.v-bubble .who { display: block; font-family: var(--marker); font-weight: 400; font-size: 16px; color: #6b6875; margin-bottom: 2px; }
.v-bubble .hot { color: #d81b72; }
.caret { display: inline-block; width: .5em; height: 1em; margin-left: 2px; background: var(--ink); vertical-align: -.15em; animation: caret .7s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.result { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.chopped {
  font-family: var(--marker); font-size: clamp(32px, 6.4vh, 50px); line-height: 1; text-transform: uppercase;
  color: var(--pink); margin-top: 8px; transform: rotate(-2.5deg); transform-origin: left center; filter: url(#boil-s);
}
.chopped.pos { color: var(--lime); }
.chopped .w { display: inline-block; margin-right: .28em; animation: wordslam .32s calc(var(--i) * 120ms) var(--pop) both; }
@keyframes wordslam { from { transform: translateY(-.5em) scale(2.2) rotate(8deg); opacity: 0; } }
.v-amount { font-weight: 700; font-size: clamp(36px, 7vh, 54px); line-height: 1.05; letter-spacing: -.02em; color: var(--pink); font-variant-numeric: tabular-nums; animation: slam .5s var(--d, .2s) cubic-bezier(.2, 1.4, .4, 1) both; transform-origin: left center; }
.v-amount.pos { color: var(--lime); }
.v-amount small { font-size: .32em; color: var(--soft); margin-left: 8px; letter-spacing: 0; }
@keyframes slam { from { transform: scale(2.4) rotate(-6deg); opacity: 0; } 60% { transform: scale(.95) rotate(1deg); } }
.v-ref { font-size: 13px; color: var(--dim); }
.send-block, .sentence, .v-ref, .src { animation: rise .35s calc(var(--d, .2s) + .3s) ease-out both; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.rec { display: inline-block; font-family: var(--marker); font-size: 19px; padding: 1px 12px; color: var(--ink); background: var(--pink); transform: rotate(-1deg); animation: stamp .3s calc(var(--d, .2s) + .3s) steps(4) both; }
.rec.pos { background: var(--lime); }
@keyframes stamp { from { transform: scale(2.2) rotate(-9deg); opacity: 0; } 70% { transform: scale(.94) rotate(0); opacity: 1; } }
.send-block { animation: none; }
.sub { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 5px; font-family: var(--marker); color: var(--soft); font-size: 16px; animation: rise .3s calc(var(--d, .2s) + .5s) ease-out both; }
.sub .keys { font-family: var(--body); font-size: 12px; color: var(--dim); }

/* three ready-to-send replies, dealt in like cards, safest first */
.replies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.reply {
  position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 6px 8px 6px 10px; background: var(--panel); border: 2px solid var(--line); border-radius: 8px;
  animation: deal .34s calc(var(--d, .2s) + .6s + var(--k, 0) * 140ms) var(--pop) both;
  transition: border-color .15s, transform .14s var(--pop);
}
.reply:hover { border-color: #4a4a55; }
@keyframes deal { from { transform: translate(70px, -6px) rotate(6deg); opacity: 0; } }
.tag { display: flex; flex-direction: column; line-height: 1.15; }
.tag b { font-family: var(--marker); font-weight: 400; font-size: 15px; color: var(--soft); }
.stakes { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--dim); white-space: nowrap; }
.stakes .pos { color: var(--lime); } .stakes .neg { color: var(--pink); }
.r-balanced { border-color: #4c5f22; }
.r-balanced .tag b { color: var(--lime); }
.r-bold { border-style: dashed; border-color: #5e2743; }
.r-bold .tag b { color: var(--pink); display: inline-block; animation: jitter 1.6s steps(1) infinite; }
@keyframes jitter { 0%, 70%, 100% { transform: none; } 74% { transform: translate(1px, -1px) rotate(-3deg); } 80% { transform: translate(-1px, 1px) rotate(2deg); } 86% { transform: rotate(-1deg); } }
.r-text { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.copy { padding: 3px 10px; font-size: 13px; }
.reply.copied { border-color: var(--lime); border-style: solid; }
.reply.copied .copy { color: var(--ink); background: var(--lime); border-color: var(--lime); }
/* a little rubber stamp lands on the card you copied */
.reply.copied::after {
  content: "COPIED"; position: absolute; right: 84px; top: 50%; padding: 0 8px; pointer-events: none;
  font-family: var(--marker); font-size: 18px; color: var(--lime); border: 3px solid var(--lime); border-radius: 6px; background: var(--panel);
  animation: copystamp 1.1s steps(6) both;
}
@keyframes copystamp {
  0% { transform: translateY(-50%) scale(2.4) rotate(-14deg); opacity: 0; }
  20% { transform: translateY(-50%) scale(.95) rotate(-8deg); opacity: 1; }
  75% { transform: translateY(-50%) scale(1) rotate(-8deg); opacity: 1; }
  100% { transform: translateY(-50%) scale(1) rotate(-8deg); opacity: 0; }
}
.sentence { border: 3px dashed var(--lime); border-radius: 8px; padding: 8px 14px; font-size: 18px; }
.sentence b { font-family: var(--marker); font-weight: 400; color: var(--lime); margin-right: 6px; }
.src { font-size: 13px; color: var(--dim); }
.src:empty { display: none; }
.next { align-self: flex-start; flex: none; }
.next.ready { animation: nudge 1.2s steps(6) infinite; }
@keyframes nudge { 0%, 100% { transform: rotate(-1.5deg) translateY(0); } 50% { transform: rotate(-1.5deg) translateY(-4px); } }
/* "should I send?" verdicts carry a rewrite too, so things tighten to keep CONTINUE on one screen */
.verdict.has-send { gap: 8px; }
.verdict.has-send .result { gap: 5px; }
.verdict.has-send .chopped { font-size: clamp(26px, 5vh, 38px); }
.verdict.has-send .v-amount { font-size: clamp(30px, 5.6vh, 42px); }
.verdict.has-send .v-ref, .verdict.has-send .src { display: none; }
.verdict.has-send .sentence { animation-delay: calc(var(--d, .2s) + 1.1s); }
.verdict.has-send .sentence { font-size: 16px; padding-top: 4px; padding-bottom: 4px; }
.verdict.has-send .sub { margin: 2px 0; }
.verdict.has-send .v-bubble { font-size: clamp(18px, 2.8vh, 21px); padding: 10px 18px; min-height: 0; }

/* LARP verdicts: the suspect's debt statement prints in line by line */
.dossier { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 14px; margin: 2px 0 0; padding: 8px 12px; background: var(--panel); border-left: 4px solid var(--pink); font-size: 15px; line-height: 1.3; }
.dossier dt { font-family: var(--marker); font-size: 14px; color: var(--soft); white-space: nowrap; }
.dossier dd { margin: 0; color: var(--text); }
.dossier dd.neg { color: var(--pink); font-weight: 700; }
.dossier dt, .dossier dd { animation: print .2s calc(var(--d, .2s) + .45s + var(--k, 0) * 120ms) steps(3) both; }
@keyframes print { from { clip-path: inset(0 100% 0 0); } }
.verdict.has-dossier { gap: 9px; }
.verdict.has-dossier .chopped { font-size: clamp(26px, 5vh, 40px); }
.verdict.has-dossier .v-amount { font-size: clamp(30px, 5.6vh, 44px); }
.verdict.has-dossier .v-bubble { font-size: clamp(17px, 2.7vh, 21px); min-height: 0; }

/* ---------- receipts ---------- */
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .6); }
.sheet {
  position: fixed; z-index: 35; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(720px, calc(100% - 24px)); max-height: 82vh; overflow-y: auto;
  background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 20px 22px;
  animation: sheetin .25s var(--pop) both;
}
@keyframes sheetin { from { transform: translate(-50%, -46%) scale(.94); opacity: 0; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sheet-head h2 { font-family: var(--marker); font-size: 26px; }
.standing-line { margin-bottom: 12px; color: var(--soft); font-size: 16px; }
.standing-line b { font-family: var(--marker); font-weight: 400; color: var(--text); margin-right: 6px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 17px; }
th { text-align: left; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); padding: 6px 8px 8px 0; border-bottom: 2px solid var(--line); }
td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.num-col, td.amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 0; padding-left: 8px; }
td.amt.neg { color: var(--pink); } td.amt.pos { color: var(--lime); }
td.c-date { white-space: nowrap; color: var(--soft); font-size: 14px; padding-top: 11px; }
.empty { color: var(--soft); padding: 12px 0; }
#reset { margin-top: 14px; }

/* ---------- demo video ---------- */
.demo-sheet { width: min(940px, calc(100% - 24px)); padding-bottom: 22px; }
.demo-sheet video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 3px solid var(--lime); border-radius: 6px; }

/* ---------- Most Wanted: paper posters pinned to the board ---------- */
.wanted-sheet { width: min(760px, calc(100% - 24px)); }
.natdebt { margin-bottom: 14px; color: var(--soft); font-size: 15px; }
.natdebt b { font-size: 22px; color: var(--pink); font-variant-numeric: tabular-nums; margin: 0 4px; }
.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; padding: 6px 4px 4px; }
.poster {
  position: relative; padding: 14px 14px 12px; background: #efe9da; color: var(--ink); text-align: center;
  animation: posterin .4s calc(var(--k, 0) * 110ms) steps(5) both;
}
.poster::before { content: ""; position: absolute; inset: 3px; border: 3px solid var(--ink); filter: url(#boil-s); pointer-events: none; }
.poster::after { content: ""; position: absolute; left: 50%; top: -6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--pink); border: 2px solid var(--ink); }
.poster:nth-child(3n+1) { rotate: -1.4deg; } .poster:nth-child(3n+2) { rotate: 1.1deg; } .poster:nth-child(3n) { rotate: -.6deg; }
@keyframes posterin { from { transform: translateY(-40px) rotate(-10deg); opacity: 0; } 60% { transform: translateY(3px) rotate(1deg); opacity: 1; } }
.p-wanted { font-family: var(--marker); font-size: 32px; line-height: 1; letter-spacing: .04em; text-transform: uppercase; }
.p-for { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5b5866; margin-bottom: 8px; }
.p-user { font-family: var(--marker); font-size: 19px; overflow-wrap: anywhere; }
.p-debt { font-size: 26px; font-weight: 700; color: #d81b72; font-variant-numeric: tabular-nums; line-height: 1.15; }
.p-debt small { font-size: 12px; color: #5b5866; font-weight: 700; }
.p-meta { font-size: 12px; color: #4a4754; margin: 4px 0 6px; }
.p-last { font-size: 14px; font-style: italic; line-height: 1.25; }
.p-pay { margin-top: 8px; padding-top: 6px; border-top: 2px dashed #b9b2a2; font-size: 12px; color: #4a4754; }
#wanted-src { margin-top: 12px; }

/* ---------- phones: judge on top, everything else underneath ---------- */
@media (max-width: 820px) {
  :root { --desk-h: 262px; }
  .top { padding: 10px 150px 2px 14px; }
  .top-actions { gap: 0; }
  .icon { width: 35px; height: 35px; }
  .rizz { text-align: left; font-size: 14px; }
  .top-actions { right: 8px; top: 6px; }
  .score { left: 14px; top: 6px; }
  .num { font-size: 34px; }
  .bubble { left: 58%; top: 2%; max-width: 150px; font-size: 14px; }
  .btn { font-size: 18px; padding: 6px 12px 4px; }
  .btns { gap: 10px; }
  body.in-verdict .judge-wrap { left: 50%; bottom: 68%; height: 32%; }
  .verdict { left: 0; right: 0; top: 32%; padding: 8px 16px 16px; justify-content: flex-start; }
  .v-bubble::before { display: none; }
  .chopped { font-size: 32px; }
  .v-amount { font-size: 38px; }
  .c-date { display: none; }
  .reply { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .tag { grid-column: 1 / -1; flex-direction: row; gap: 8px; align-items: baseline; }
  .r-text { font-size: 15px; }
  .sub .keys { display: none; }
  .who-posted { margin-left: 0; padding-left: 0; border-left: 0; }
  body.larp-on { --desk-h: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}
