@font-face { font-family: 'Fuzzy Bubbles'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/6qLbKZMbrgv9pwtjPEVNV0F2Ds_WcxoKZ3M1.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fuzzy Bubbles'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/6qLbKZMbrgv9pwtjPEVNV0F2Ds_WcxQKZw.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #000; --surface: #080808; --surface-2: #111; --card: #0b0b0b;
  --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.16);
  --text: #f0f0f0; --soft: #b9b9b9; --muted: #7a7a7a;
  --pen: #b5571f; --pen-hover: #c5622a; --on-pen: #fff; --pen-dim: #22120a; --pen-border: rgba(181,87,31,.6);
  --stop: #ff4b4b; --stop-deep: #a51f1f; --stop-dim: #3a1414;
  --go: #5fe39b; --go-dim: #12301f;
  --font: 'Inter','Segoe UI',system-ui,sans-serif;
  --mono: 'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-spring: cubic-bezier(.2,1.4,.4,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); overscroll-behavior: none; }
body { margin: 0; color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip; }
[hidden] { display: none !important; }
.bg-grid { position: fixed; inset: 0; z-index: -2; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 40px 40px; background-position: center top; }
.backdrop { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
.backdrop.show { opacity: 1; }
button { font: inherit; color: inherit; }
input { font: inherit; color: inherit; }

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px var(--font); border-radius: 10px; padding: 12px 20px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s var(--ease-out); }
.btn:hover:not(:disabled) { border-color: rgba(255,255,255,.3); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.pen { background: var(--pen); color: var(--on-pen); border-color: var(--pen); }
.btn.pen:hover:not(:disabled) { background: var(--pen-hover); border-color: var(--pen-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--soft); }
.btn.ghost:hover:not(:disabled) { color: var(--text); border-color: var(--border); }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn.wide { min-width: 210px; }
.btn.on { background: var(--pen-dim); border-color: var(--pen-border); color: #f3b48c; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--soft); cursor: pointer; padding: 0; }
.icon-btn:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--pen-dim); border-color: var(--pen-border); color: #f3b48c; }
.chip.pill { cursor: default; justify-content: center; font-variant-numeric: tabular-nums; }
#roundsPill { width: 98px; }
#timerPill { width: 68px; }
#langPill { width: 80px; }
#morePill { width: 64px; }
.chip.pill.editable { cursor: pointer; }
.chip.pill.editable:hover { border-color: var(--border-strong); }
.muted { color: var(--muted); font-weight: 500; }
.row { display: flex; gap: 12px; align-items: center; }
.hint { color: #6a6a6a; font-size: 13px; }
.err { color: var(--stop); font-size: 14px; margin: 0; }

.blob { display: inline-block; width: 64px; height: 64px; position: relative; flex: none; transition: opacity .3s, filter .3s; }
.blob svg { width: 100%; height: 100%; display: block; overflow: visible; --mo-track-travel: 3px; }
.blob.away { opacity: .55; filter: saturate(.6); }
.blob.pop { animation: blob-pop 520ms var(--ease-spring); }
@keyframes blob-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.12, .92); } 100% { transform: none; } }
.blob-zzz { display: none; }
.blob.dozing .blob-zzz { display: block; position: absolute; top: 18%; right: 8%; width: 0; height: 0; font-family: var(--font); font-weight: 800; font-size: 15px; color: #6c86ff; pointer-events: none; }
.blob-zzz i { position: absolute; left: 0; bottom: 0; font-style: normal; line-height: 1; opacity: 0; animation: blob-zzz 2.7s ease-out infinite; }
.blob-zzz i:nth-child(2) { animation-delay: .9s; }
.blob-zzz i:nth-child(3) { animation-delay: 1.8s; }
@keyframes blob-zzz {
  0% { opacity: 0; transform: translate(0, 0) scale(.45) rotate(-8deg); }
  18% { opacity: 1; }
  50% { transform: translate(.6em, -1em) scale(.8) rotate(6deg); }
  75% { opacity: .85; }
  100% { opacity: 0; transform: translate(1em, -2em) scale(1.05) rotate(-6deg); }
}

.corner { position: fixed; top: max(16px, env(safe-area-inset-top)); right: 18px; display: flex; gap: 8px; align-items: center; z-index: 30; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch button { padding: 6px 10px; border-radius: 7px; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); background: transparent; cursor: pointer; }
.lang-switch button.on { color: #000; background: var(--text); border-color: var(--text); }
body.in-room .corner { display: none; }
body.in-game .legal-links { display: none; }

body { --frame-h: clamp(520px, calc(100svh - 48px), 820px); }
.screen { display: none; min-height: 100vh; min-height: 100svh; padding: 24px; }
#screen-start { padding-bottom: 100px; }
.screen.active { display: flex; align-items: center; justify-content: center; animation: screen-in 380ms var(--ease-out); }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.letter { width: 92px; height: 92px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); color: var(--pen); display: grid; place-items: center; font-size: 64px; font-weight: 900; flex: none; overflow: hidden; position: relative; font-variant-numeric: tabular-nums; }
.letter.small { width: 52px; height: 52px; font-size: 34px; border-radius: 12px; }
.letter.awaiting span { visibility: hidden; }
.letter.landed span { display: inline-block; animation: letter-land 560ms var(--ease-spring); }
@keyframes letter-land { 0% { transform: translateY(-30%) scale(1.25); } 100% { transform: none; } }

.wm { font-family: 'Fuzzy Bubbles', var(--font); font-weight: 700; text-transform: uppercase; letter-spacing: 0; line-height: 1; color: var(--text); }
.peek { position: relative; display: inline-block; font-size: 104px; padding: .1em .2em .06em; margin-top: .5em; user-select: none; }
.peek .plate { position: absolute; inset: 0; background: var(--pen); border-radius: .04em; transform: skew(-8deg) rotate(-1.5deg); z-index: 1; }
.peek .riser { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% - .3em); width: .78em; height: .78em; z-index: 0; }
.peek .riser .blob { position: absolute; inset: 0; width: 100%; height: 100%; animation: logo-rise 900ms var(--ease-spring) 250ms both; }
@keyframes logo-rise { from { transform: translateY(70%); } to { transform: none; } }
.peek .txt { position: relative; z-index: 2; color: #fff; white-space: nowrap; }
.peek .w { display: inline-flex; transition: margin .4s var(--ease-out); }
.peek .rest { display: grid; grid-template-columns: 0fr; transition: grid-template-columns .4s var(--ease-out); }
.peek .rest > span { min-width: 0; overflow: hidden; text-transform: none; white-space: nowrap; }
.peek .w:hover .rest { grid-template-columns: 1fr; transition-delay: .18s; }
.peek .w:hover { margin-inline: .14em; transition-delay: .18s; }
.peek .w:first-child:hover { margin-left: 0; }
.peek .w:last-child:hover { margin-right: 0; }

.start-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 16px; align-items: stretch; text-align: left; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; }
.panel h2, .panel h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; font-size: 15px; font-weight: 700; color: var(--text); }
.panel h3 { font-size: 14px; margin-bottom: 12px; }
.panel h2 .icon, .panel h3 .icon { width: 17px; height: 17px; color: var(--muted); }
.panel-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.player-customizer { box-sizing: border-box; display: flex; flex: 1 1 auto; flex-direction: column; width: 100%; min-height: 0; padding: 18px; }
.customizer-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.customizer-heading h2 { margin-bottom: 0; }
.customizer-body { display: flex; flex: 1; flex-direction: column; justify-content: center; }
.avatar-build { display: flex; flex-direction: column; align-items: center; gap: 15px; padding-top: 10px; }
.player-customizer .avatar-build { padding-top: 0; }
.avatar-build.intro { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 22px; }
.avatar-blob { width: 120px; height: auto; aspect-ratio: 1; box-sizing: border-box; position: relative; }
.avatar-build .avatar-blob { margin: 0; }
.avatar-build.intro .avatar-blob { flex: 0 0 auto; width: clamp(104px, 12vw, 128px); }
.name-line { margin: 0; max-width: 100%; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 3px 8px; font-size: .96rem; line-height: 1.3; }
.avatar-build.intro .name-line { flex: 1 1 auto; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding-left: 4px; font-size: 1.34rem; text-align: left; }
.intro-greeting { color: var(--muted); white-space: nowrap; }
.name-field { position: relative; display: inline-block; flex: 0 0 auto; width: 7ch; max-width: 100%; font-weight: 700; padding-bottom: 2px; border-bottom: 1px dashed var(--border-strong); transition: width .26s cubic-bezier(.22, 1, .36, 1), border-color .2s, border-bottom-style .2s; }
.name-field:hover { border-bottom-color: var(--muted); }
.name-field:focus-within { border-bottom-style: solid; border-bottom-color: var(--text); }
.name-mirror, .name-field input { padding: 0 6px; font: inherit; font-weight: 700; letter-spacing: -0.01em; text-align: center; white-space: pre; }
.name-mirror { position: absolute; top: 0; left: 0; visibility: hidden; pointer-events: none; }
.name-field input { display: block; width: 100%; min-width: 0; appearance: none; border: 0; outline: 0; border-radius: 0; background: transparent; color: var(--text); text-overflow: ellipsis; }
.name-field input::placeholder { color: var(--muted); opacity: .6; }
.btn.full { width: 100%; }
.play-panel .panel-section { margin-top: auto; }
.play-panel .btn.full { margin-bottom: 20px; }
.join-row { display: flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 12px; }
.join-row:focus-within { border-color: var(--pen); }
.code-input { flex: 1; min-width: 0; background: transparent; border: 0; padding: 0 10px; font-family: var(--mono); font-size: 16px; letter-spacing: .08em; outline: none; text-transform: lowercase; }
.join-row .btn { padding: 10px 16px; border-color: transparent; }
.rejoin-panel { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 25; flex-direction: row; align-items: center; gap: 18px; width: max-content; max-width: calc(100% - 32px); padding: 12px 14px 12px 18px; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.rejoin-panel[hidden] { display: none; }
.rejoin-panel { transition: opacity .3s var(--ease-out), transform .42s var(--ease-spring); }
.rejoin-panel.out { opacity: 0; transform: translate(-50%, calc(100% + 32px)); transition: opacity .3s var(--ease-out), transform .36s var(--ease-out); pointer-events: none; }
.rejoin-panel h2 { margin: 0; white-space: nowrap; }
.rejoin-panel code { font-family: var(--mono); font-size: 14px; letter-spacing: .04em; color: #f3b48c; background: var(--pen-dim); border: 1px solid var(--pen-border); border-radius: 7px; padding: 3px 8px; }
.rejoin-actions { display: flex; gap: 8px; }
.rejoin-actions .btn { padding: 9px 14px; }
.start-stats { color: var(--muted); font-size: 13px; margin: 0; }
.start-stats.connecting { animation: connecting 1.2s ease-in-out infinite; }
@keyframes connecting { 50% { opacity: .45; } }

.lobby { position: relative; width: min(1240px, 100%); background: var(--bg); display: grid; grid-template-columns: 252px 1fr; border: 1px solid var(--border-strong); border-radius: 18px; overflow: hidden; height: var(--frame-h); }
.roster { background: var(--surface); border-right: 1px solid var(--border); padding: 22px 14px 16px; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.roster h3 { margin: 0 0 8px 6px; font-size: 15px; }
.roster-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-height: 0; }
.pl { display: flex; align-items: center; gap: 12px; padding: 4px 6px; border-radius: 12px; font-size: 16px; font-weight: 700; min-height: 62px; }
.pl .blob { width: 54px; height: 54px; }
.pl .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl.self .nm { color: #f3b48c; }
.pl .tag { margin-left: auto; font-size: 10px; font-weight: 800; background: var(--pen); color: var(--on-pen); padding: 2px 7px; border-radius: 999px; }
.pl .kick { margin-left: auto; width: 26px; height: 26px; border-radius: 7px; border: 0; background: transparent; color: #4a4a4a; cursor: pointer; display: grid; place-items: center; padding: 0; }
.pl .kick .icon { width: 14px; height: 14px; }
.pl .kick:hover, .pl .kick.arm { color: var(--stop); background: var(--stop-dim); }
.pl.away .nm { color: var(--muted); }
.invite { margin-top: auto; background: var(--bg); border: 1px dashed var(--pen-border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.invite-code { margin: 0; text-align: center; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invite code { color: #f3a06c; font-size: 15px; font-weight: 700; font-family: var(--mono); }
.invite .btn { padding: 8px; font-size: 13px; }
.cats { padding: 22px 26px; display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; overflow-y: auto; }
.cats-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cats-head h2 { margin: 0; font-size: 24px; }
.cats-head .count { color: var(--muted); font-size: 14px; }
.cats-head .settings { margin-left: auto; display: flex; gap: 6px; }
.sec { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--soft); font-weight: 600; flex-wrap: wrap; }
.sec .chips { position: relative; display: flex; gap: 6px; margin-left: 6px; flex-wrap: wrap; }
.sec .chips .chip { position: relative; z-index: 1; background: transparent; border-color: var(--border); transition: color .25s; }
.sec .chips .chip.on { background: transparent; border-color: transparent; }
.sec .chips .chip:not(.on):hover { border-color: var(--border-strong); }
.glider { position: absolute; left: 0; top: 0; height: 100%; border-radius: 999px; background: var(--pen-dim); border: 1px solid var(--pen-border); z-index: 0; transition: transform .45s cubic-bezier(.2,1.25,.4,1), width .45s cubic-bezier(.2,1.25,.4,1), height .45s cubic-bezier(.2,1.25,.4,1); pointer-events: none; }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 10px; padding-top: 6px; }
.cat { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 12px 12px; font-size: 16px; font-weight: 700; min-height: 64px; display: flex; align-items: flex-end; text-align: left; cursor: pointer; color: var(--text); line-height: 1.2; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; transition: border-color .15s, background .15s, transform .2s var(--ease-out); }
.cat.long { font-size: 13px; }
.cat:hover { border-color: var(--border-strong); }
.cat.in { background: var(--pen-dim); border-color: var(--pen-border); }
.cat.in:hover { border-color: var(--pen); }
.cat.voted { box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.cat.add { border-style: dashed; color: var(--muted); font-weight: 500; font-size: 14px; gap: 6px; align-items: center; justify-content: center; }
.cat.add .icon { width: 16px; height: 16px; }
.cat.adding { padding: 8px; align-items: center; cursor: default; border-color: var(--pen-border); border-style: solid; }
.cat.adding input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--pen); outline: none; font-size: 16px; font-weight: 600; padding: 4px 2px; }
.cat.readonly { cursor: default; }
.cat .del { position: absolute; top: 6px; right: 6px; display: flex; padding: 4px; border-radius: 6px; color: var(--muted); }
.cat .del .icon { width: 14px; height: 14px; }
.cat .used { position: absolute; top: 9px; right: 9px; display: flex; color: var(--muted); }
.cat .used .icon { width: 14px; height: 14px; }
.cat .del:not([hidden]) ~ .used { right: 34px; }
.cat .del:hover { color: #ff8a8a; background: var(--stop-dim); }
.dots { position: absolute; top: -7px; left: 10px; display: flex; gap: 3px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg); box-shadow: 0 0 0 1px rgba(255,255,255,.35); display: block; }
.tip { position: absolute; bottom: calc(100% + 10px); left: -6px; background: #1a1a1a; border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 10px; display: none; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; z-index: 5; color: var(--text); pointer-events: none; }
.tip span { display: flex; align-items: center; gap: 6px; }
.tip span i { width: 8px; height: 8px; border-radius: 50%; border: 0; box-shadow: none; }
.dots:hover .tip, .dots.show .tip { display: flex; }
.go { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: auto; padding-top: 8px; }
.go-btn { padding: 14px 20px; font-size: 16px; width: 300px; }
.go-btn.waiting, .go-btn.waiting:disabled { opacity: 1; background: transparent; border: 1px dashed var(--border-strong); color: var(--soft); font-weight: 600; }
.go-btn.waiting .icon { display: none; }
.go-btn.waiting span { animation: connecting 1.6s ease-in-out infinite; }
.popover { position: absolute; z-index: 20; background: #141414; border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 10px; min-width: 190px; }
.pop-title { font-size: 13px; color: var(--soft); font-weight: 600; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pop-value { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 92px; text-align: center; }
.pop-langs { display: flex; gap: 6px; }
.pop-more, .pop-group { display: flex; flex-direction: column; gap: 10px; }
.pop-more { width: 250px; }
.pop-sub { font-size: 13px; color: var(--muted); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 6px 0 0; background: none; border: 0; border-top: 1px solid var(--border); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.switch i { flex: none; position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); transition: background .2s, border-color .2s; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .25s cubic-bezier(.2,1.4,.4,1), background .2s; }
.switch.on i { background: var(--pen); border-color: var(--pen); }
.switch.on i::after { transform: translateX(16px); background: #fff; }

.sheet-play { width: min(1240px, 100%); height: var(--frame-h); display: grid; grid-template-columns: minmax(0, 1fr) 252px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 18px; overflow: hidden; }
.play-side { order: 2; background: var(--surface); border-left: 1px solid var(--border); padding: 20px 16px 16px; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.sp-main { display: flex; flex-direction: column; gap: 12px; padding: 22px 26px; min-width: 0; min-height: 0; }
.topbar { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; }
.topbar .letter { width: 84px; height: 84px; font-size: 58px; }
.topbar .btn.reroll { grid-column: 1 / -1; width: 100%; }
.meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.meta .round { color: var(--muted); font-size: 14px; }
.meta .timer { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; transform-origin: left center; }
.meta .timer.low { color: var(--stop); }
.meta .timer.off { font-size: 20px; color: var(--soft); }
.bar { width: 100%; height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--pen); transform-origin: left; }
.bar.low i { background: var(--stop); }
.banner { padding: 10px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--soft); font-size: 14px; font-weight: 600; }
.sheet { flex: 1 1 auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow-x: hidden; overflow-y: auto; min-height: 0; background: var(--card); }
.line { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 9px 22px; border-bottom: 1px solid var(--border); cursor: text; transition: background .15s; }
.line:last-child { border-bottom: 0; }
.line .lab { font-size: 15px; color: var(--soft); font-weight: 500; cursor: text; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 12px; }
.line.long .lab { font-size: 14px; }
.line input { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; outline: none; font: 700 24px var(--font); color: var(--text); width: 100%; padding: 8px 16px; caret-color: var(--pen); transition: border-color .15s, background .15s, box-shadow .15s; }
.line input::placeholder { color: #4a4a4a; font-weight: 600; }
.line input:hover:not(:disabled) { border-color: rgba(255,255,255,.26); }
.line input:focus { border-color: var(--pen-border); background: #160c06; box-shadow: 0 0 0 3px rgba(181,87,31,.18); }
.line input:disabled { color: var(--soft); background: transparent; border-color: var(--border); }
.line input:disabled::placeholder { color: transparent; }
.line.focus { background: var(--pen-dim); }
.line.focus .lab { color: #f08a4f; }
.sheet.locked .line { cursor: default; }
.mate-list { display: flex; flex-direction: column; gap: 2px; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; min-height: 0; border-top: 1px solid var(--border); padding-top: 12px; }
.mate-list::-webkit-scrollbar { display: none; }
.mate { display: flex; align-items: center; gap: 12px; padding: 4px 6px; min-height: 52px; font-size: 15px; font-weight: 700; color: var(--soft); font-variant-numeric: tabular-nums; }
.mate .blob { width: 44px; height: 44px; flex: none; }
.mate .nm { flex: 1; min-width: 0; font-size: 15px; color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mate b { font-weight: 700; }
.mate b.full { color: #f08a4f; }
.mate-list.many .mate { min-height: 40px; }
.mate-list.many .mate .blob { width: 34px; height: 34px; }
.stopp-wrap { margin-top: auto; position: relative; }
.stopbtn { width: 100%; padding: 20px 0 18px; border-radius: 16px; border: 0; background: var(--stop); color: #fff; font: 900 19px var(--font); letter-spacing: .04em; box-shadow: 0 6px 0 var(--stop-deep); cursor: pointer; margin-bottom: 6px; transition: transform .08s, box-shadow .08s; }
.stopbtn:hover:not(:disabled) { filter: brightness(1.06); }
.stopbtn:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 1px 0 var(--stop-deep); }
.stopbtn:disabled { opacity: .35; cursor: default; }
.stopbtn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.stopbtn small { display: block; margin-top: 4px; font-size: 13px; font-weight: 800; letter-spacing: 0; opacity: .85; font-variant-numeric: tabular-nums; }
.stopbtn.on, .stopbtn.on:disabled { opacity: 1; transform: translateY(5px); box-shadow: 0 1px 0 var(--stop-deep); background: var(--stop-deep); }
.btn.reroll { width: 176px; justify-content: center; background: var(--surface-2); border-color: var(--border-strong); color: var(--text); transition: color .2s, border-color .2s, background .2s; }
.btn.reroll .icon { transition: transform .35s cubic-bezier(.2,1.4,.4,1); }
.btn.reroll.arm, .btn.reroll.arm:hover:not(:disabled) { color: #ff8a8a; border-color: rgba(255,75,75,.55); background: var(--stop-dim); }
.btn.reroll.arm .icon { transform: rotate(-180deg); }
.leave-game { align-self: center; width: 170px; }
.leave-game.arm, .leave-game.arm:hover:not(:disabled) { color: #ff8a8a; border-color: rgba(255,75,75,.55); background: var(--stop-dim); }
.play-side .leave-game { margin-top: -6px; }
#screen-vote.active, #screen-summary.active { flex-direction: column; gap: 12px; }
.pod-right .leave-game { margin-top: -4px; }
.confirm { position: absolute; left: 0; right: 0; bottom: calc(100% + 14px); background: #141414; border: 1px solid var(--border-strong); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.6); z-index: 10; }
.confirm p { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.confirm .btn { width: 100%; }
.confirm .stop-yes { background: var(--stop); border-color: var(--stop); color: #fff; }
.slot { position: fixed; inset: 0; z-index: 24; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 44px; }
.slot-round { color: var(--soft); font-size: 20px; font-weight: 700; }
.slot-machine { --cell: min(300px, 31vh); position: relative; }
.slot-window { position: relative; width: calc(var(--cell) * 1.15); height: calc(var(--cell) * 1.75); overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.slot-strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; transition: opacity .25s ease-out; }
.slot.lead .slot-strip { opacity: 0; }
.slot-cell { height: var(--cell); display: grid; place-items: center; padding-top: .09em; box-sizing: border-box; font-size: calc(var(--cell) * .82); font-weight: 900; line-height: 1; color: var(--pen); }
.slot.won .slot-cell { color: #f08a4f; }
.slot.won .slot-machine { animation: slot-thunk 420ms cubic-bezier(.2,1.4,.4,1); }
@keyframes slot-thunk { 0% { transform: scale(1); } 35% { transform: scale(1.035); } 100% { transform: scale(1); } }
.fly-letter { position: fixed; z-index: 26; display: grid; place-items: center; font-weight: 900; line-height: 1; color: var(--pen); pointer-events: none; transform-origin: center; will-change: transform; }
.callout { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; background: rgba(0,0,0,.72); z-index: 25; pointer-events: none; animation: callout-in 200ms var(--ease-out); }
.stamp-wrap { display: flex; flex-direction: column; align-items: center; }
.callout .blob { width: 120px; height: 120px; margin-bottom: -30px; }
.callout .stamp { position: relative; font-size: clamp(64px, 13vw, 150px); font-weight: 900; line-height: 1.05; letter-spacing: .02em; color: var(--stop); background: #1a0606; border: .065em solid var(--stop); border-radius: .14em; padding: .03em .24em 0; transform: rotate(-8deg); }
.callout-text { font-size: 28px; font-weight: 800; color: #fff; text-align: center; padding: 0 20px; }
.callout.slam .stamp { animation: stamp-slam 400ms cubic-bezier(.55,0,.6,1) both; }
.callout.slam .blob { animation: callout-blob 520ms 160ms var(--ease-spring) both; }
.callout.slam .callout-text { animation: callout-line 320ms 280ms var(--ease-out) both; }
@keyframes callout-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes stamp-slam { 0% { opacity: 0; transform: rotate(-16deg) scale(2.8); } 42% { opacity: 1; transform: rotate(-8deg) scale(.94); } 70% { transform: rotate(-8deg) scale(1.04); } 100% { transform: rotate(-8deg) scale(1); } }
@keyframes callout-blob { from { transform: translateY(46px) scale(.7); } to { transform: none; } }
@keyframes callout-line { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.x2 { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 6px; background: var(--pen); color: var(--on-pen); font-size: 12px; font-weight: 900; transform: rotate(-4deg); vertical-align: 1px; }
.card-head .x2 { margin-left: 0; font-size: 15px; padding: 2px 9px; }
.slot-round { display: flex; align-items: center; gap: 14px; }
.slot-double { display: inline-flex; align-items: center; gap: 10px; color: #f08a4f; }
.slot-double b { background: var(--pen); color: var(--on-pen); padding: 2px 10px; border-radius: 8px; font-weight: 900; transform: rotate(-6deg); animation: double-pop 620ms 260ms var(--ease-spring) both; }
@keyframes double-pop { from { opacity: 0; transform: rotate(-30deg) scale(2.2); } to { opacity: 1; transform: rotate(-6deg); } }
.meta .timer.urgent { text-shadow: 0 0 18px rgba(255,75,75,.45); }
.blob.hop { animation: blob-hop 440ms cubic-bezier(.3,0,.3,1); }
@keyframes blob-hop { 0% { transform: none; } 32% { transform: translateY(-11px) scale(.94, 1.07); } 58% { transform: translateY(0) scale(1.09, .9); } 78% { transform: scale(.98, 1.02); } 100% { transform: none; } }
.face { position: relative; display: grid; flex: none; }
.face > .blob { grid-area: 1 / 1; }
.peek-mark { position: absolute; right: -6px; bottom: -4px; display: grid; color: #ff8a8a; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s var(--ease-spring); }
.peek-mark .icon { width: 15px; height: 15px; }
.mate.peeking .peek-mark { opacity: 1; transform: none; }

.card { position: relative; width: min(980px, 100%); background: var(--card); border: 1px solid var(--border-strong); border-radius: 20px; padding: 24px 26px; }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.card-head h3 { margin: 0; font-size: 26px; min-width: 0; overflow-wrap: anywhere; }
.card-head .count { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 10px; }
.count .waiting { display: inline-flex; align-items: center; gap: 6px; }
.count .waiting::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: currentColor; margin-right: 4px; }
.wait-blobs { display: inline-flex; gap: 1px; }
.wait-blobs .blob { width: 24px; height: 24px; animation: blob-pop 420ms var(--ease-spring); }
.btn.pen.nudge:not(.on) { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(181,87,31,.55); } 55% { box-shadow: 0 0 0 9px rgba(181,87,31,0); } }
.ans.anon .blob { filter: grayscale(1) brightness(.8); }
.roll { display: inline-grid; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; }
.roll > span { grid-area: 1 / 1; white-space: nowrap; }
.vote-rows { max-height: calc(100svh - 260px); overflow-y: auto; }
.ans { display: grid; grid-template-columns: 44px minmax(0, 1fr) 72px 332px; gap: 14px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--border); }
.ans .blob { width: 40px; height: 40px; }
.ans .w { font-size: 19px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.ans .who { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 8px; white-space: nowrap; }
.ans.empty .w { color: #4c4c4c; font-weight: 500; font-style: italic; font-size: 16px; }
.pts { justify-self: end; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pts.u { background: var(--pen-dim); color: #f08a4f; }
.pts.x { background: var(--stop-dim); color: var(--stop); text-decoration: line-through; }
.acts { display: grid; grid-template-columns: 92px 112px 96px; gap: 10px; }
.a { position: relative; display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 7px 0; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); white-space: nowrap; cursor: pointer; text-decoration: none; font-family: var(--font); }
.a .icon { width: 14px; height: 14px; }
.a:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }
.a:disabled { cursor: default; }
.a .n { font-variant-numeric: tabular-nums; opacity: .75; }
.a.nope.on { background: var(--stop-dim); color: var(--stop); border-color: var(--stop); }
.a.good.on { background: var(--go-dim); color: var(--go); border-color: var(--go); }
.badge { position: absolute; right: -7px; bottom: -8px; background: var(--go); color: #000; font-size: 11px; font-weight: 800; padding: 1px 5px; border-radius: 5px; transform: rotate(-8deg); font-variant-numeric: tabular-nums; animation: badge-pop 360ms var(--ease-spring); }
@keyframes badge-pop { from { transform: rotate(-8deg) scale(.4); } to { transform: rotate(-8deg); } }
.ans.dead .w { color: #555; }
.ans .txt { position: relative; }
.ans .same { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--pen-dim); border: 1px solid var(--pen-border); color: #f3b48c; font-size: 11px; font-weight: 800; vertical-align: 3px; }
.ans .peeked { display: inline-flex; margin-left: 6px; color: #ff8a8a; vertical-align: -2px; }
.ans .peeked .icon { width: 15px; height: 15px; }
.ans.dead .txt::after { content: ''; position: absolute; left: -2px; right: -2px; top: 54%; height: 2px; border-radius: 2px; background: currentColor; }
.ans.dead .txt.strike::after { animation: strike 380ms cubic-bezier(.65,0,.35,1) both; transform-origin: left center; }
@keyframes strike { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ans.mine .acts .a:not(.search), .ans.spectator .acts .a:not(.search) { opacity: .25; }
.ans.mine .acts .a.search { opacity: .25; pointer-events: none; }
.ans.empty .acts { visibility: hidden; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 14px; }
.foot-btn { min-width: 156px; }
.back-btn { padding: 12px 14px; }
.btn.pen.on { background: var(--go-dim); border-color: var(--go); color: var(--go); }

.sum-rows { display: flex; flex-direction: column; }
.srow { display: grid; grid-template-columns: 34px 44px minmax(0, 1fr) 90px 90px; gap: 14px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.srow .rk { color: var(--muted); font-weight: 800; text-align: center; }
.srow .blob { width: 40px; height: 40px; }
.srow .nm { font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .delta { justify-self: end; color: #f08a4f; font-weight: 800; }
.srow .tot { justify-self: end; font-size: 20px; font-weight: 800; }
.srow.lead .rk { color: #f08a4f; }
.srow .crown { position: absolute; left: 9px; top: -15px; width: 22px; height: 22px; color: #f5b23d; opacity: 0; transform: rotate(-12deg); transition: opacity .25s; }
.srow .crown .icon { width: 100%; height: 100%; fill: currentColor; }
.srow.lead .crown { opacity: 1; }

.podium { width: min(1240px, 100%); background: var(--bg); display: grid; grid-template-columns: 1.3fr 1fr; border: 1px solid var(--border-strong); border-radius: 18px; overflow: hidden; height: var(--frame-h); }
.pod-left { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 28px 20px 0; min-width: 0; }
.pod-left h2 { font-size: 42px; line-height: 1.25; margin: 0 0 auto; padding-top: 6px; text-align: center; }
.win-name { display: inline-block; background: var(--pen); color: var(--on-pen); padding: 0 .25em; border-radius: 10px; transform: rotate(-1.5deg); }
.step.first .blob { animation: blob-cheer 1.3s ease-in-out var(--cheer-delay, 1.2s) infinite; transform-origin: 50% 90%; }
@keyframes blob-cheer { 0%, 100% { transform: none; } 20% { transform: translateY(-7%) rotate(-7deg); } 40% { transform: scale(1.04, .96); } 60% { transform: translateY(-7%) rotate(7deg); } 80% { transform: scale(1.04, .96); } }
.steps { display: flex; align-items: flex-end; gap: 10px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 170px; }
.step .who { display: flex; justify-content: center; gap: 2px; }
.step .blob { width: 96px; height: 96px; }
.step.first .blob { width: 124px; height: 124px; }
.step .who.multi .blob { width: 64px; height: 64px; }
.step.first .who.multi .blob { width: 80px; height: 80px; }
.step .nm { font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.step .sc { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.block { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-bottom: 0; border-radius: 12px 12px 0 0; display: grid; place-items: center; font-size: 40px; font-weight: 900; color: #333; }
.first .block { height: 170px; background: var(--pen); color: var(--on-pen); border-color: var(--pen); }
.second .block { height: 120px; }
.third .block { height: 84px; }
.step { animation: step-up 600ms var(--ease-spring) both; }
.step.first { animation-delay: .16s; }
.step.second { animation-delay: .08s; }
@keyframes step-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.pod-right { background: var(--surface); border-left: 1px solid var(--border); padding: 28px; display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; }
.stat-list, .best-list { display: flex; flex-direction: column; gap: 10px; }
.stat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.award { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); min-width: 0; }
.award .blob { width: 46px; height: 46px; flex: none; }
.aw-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.aw-txt b { font-size: 15px; font-weight: 800; color: #f08a4f; }
.aw-who { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-val { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.best { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; font-size: 14px; display: flex; justify-content: space-between; gap: 12px; }
.best em { font-style: normal; color: var(--go); font-weight: 700; }
.sub { font-size: 13px; color: var(--soft); font-weight: 600; margin-top: 6px; }
.pod-actions { margin-top: auto; }
.pod-actions .btn { flex: 1; }

.connect { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-block: auto; }
.connect .blob { width: 92px; height: 92px; }
.connect p { margin: 0; font-size: 16px; font-weight: 600; color: var(--soft); animation: connecting 1.6s ease-in-out infinite; }
.message { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; max-width: 420px; }
.message .blob { width: 110px; height: 110px; }
.message p { font-size: 18px; font-weight: 600; margin: 0; line-height: 1.4; }

.rules { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.62); animation: callout-in 220ms ease-out; }
.rules.out { animation: rules-out 200ms ease-in forwards; }
.rules-card { width: min(540px, 100%); max-height: calc(100svh - 40px); overflow-y: auto; background: #111; border: 1px solid var(--border-strong); border-radius: 18px; padding: 18px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.6); display: flex; flex-direction: column; animation: rules-in 380ms var(--ease-out); }
.rules.out .rules-card { animation: rules-card-out 200ms ease-in forwards; }
.tut-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tut-head h2 { margin: 0; font-size: 20px; }
.tut-stage { position: relative; height: 210px; border-radius: 14px; border: 1px solid var(--border); background-color: var(--bg); background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 22px 22px; background-position: center; overflow: hidden; display: grid; place-items: center; touch-action: pan-y; user-select: none; }
.tut-copy { padding: 18px 2px 4px; min-height: 104px; }
.tut-big { margin: 0 0 6px; font-size: 19px; font-weight: 800; line-height: 1.25; color: var(--text); }
.tut-small { margin: 0; font-size: 15px; line-height: 1.5; color: var(--soft); max-width: 46ch; }
.tut-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.tut-dots { display: flex; gap: 6px; margin-right: auto; }
.tut-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--border-strong); cursor: pointer; transition: width .3s var(--ease-out), background .3s; }
.tut-dot.on { width: 22px; background: var(--pen); }
.tut-back { width: 104px; }
.tut-next { width: 140px; }
.sc { display: flex; align-items: center; justify-content: center; gap: 22px; width: 100%; height: 100%; padding: 16px; }
.sc.from-right { animation: sc-right 360ms var(--ease-out); }
.sc.from-left { animation: sc-left 360ms var(--ease-out); }
@keyframes sc-right { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes sc-left { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.sc-letter .letter { animation: none; }
.sc-letter .letter span { animation-delay: 80ms; animation-fill-mode: both; }
.sc-sheet { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sc-line { display: grid; grid-template-columns: 64px auto; align-items: baseline; gap: 12px; border-bottom: 1px dashed var(--border-strong); padding: 2px 4px 5px; min-width: 190px; }
.sc-line .k { font-size: 12px; font-weight: 700; color: var(--muted); }
.sc-line .v { justify-self: start; font-size: 18px; font-weight: 700; color: var(--text); clip-path: inset(0 100% 0 0); animation: sc-type calc(var(--chars) * 70ms) steps(var(--chars)) var(--delay) forwards; }
@keyframes sc-type { to { clip-path: inset(0 0 0 0); } }
.sc-stopp { flex-direction: column; gap: 0; }
.sc-crowd { display: flex; gap: 4px; margin-bottom: -16px; position: relative; z-index: 1; }
.sc-crowd .blob { width: 64px; height: 64px; animation: callout-blob 520ms 260ms var(--ease-spring) both; }
.sc-crowd .blob + .blob { width: 48px; height: 48px; align-self: flex-end; }
.sc-stamp { font-size: 54px; font-weight: 900; line-height: 1.05; letter-spacing: .02em; color: var(--stop); background: #1a0606; border: .065em solid var(--stop); border-radius: .14em; padding: .03em .24em 0; transform: rotate(-8deg); animation: stamp-slam 400ms 120ms cubic-bezier(.55,0,.6,1) both; }
.sc-timer .blob { width: 72px; height: 72px; }
.sc-clock { font-size: 64px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--stop); animation: sc-pulse 1s ease-in-out infinite; }
@keyframes sc-pulse { 50% { transform: scale(1.06); } }
.sc-vote { flex-direction: column; gap: 10px; align-items: stretch; max-width: 420px; }
.sc-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; }
.sc-row .blob { width: 38px; height: 38px; }
.sc-row .w { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; }
.sc-row .pts { justify-self: auto; }
.sc-row .a { cursor: default; width: 96px; flex: none; padding: 6px 0; }
.sc-row .a.good.on { animation: sc-pop 420ms 600ms var(--ease-spring) both; }
@keyframes sc-pop { 0% { background: var(--surface-2); color: var(--muted); border-color: var(--border); transform: scale(.9); } 100% { transform: none; } }
.sc-row.dead .w { color: #555; }
.sc-row .txt { position: relative; }
.sc-row.dead .txt::after { content: ''; position: absolute; left: -2px; right: -2px; top: 54%; height: 2px; border-radius: 2px; background: currentColor; transform-origin: left center; animation: strike 380ms 900ms cubic-bezier(.65,0,.35,1) both; }
.sc-points { flex-direction: column; align-items: stretch; gap: 7px; max-width: 460px; }
.sc-pt { display: grid; grid-template-columns: 34px 168px minmax(0, 1fr); align-items: center; gap: 12px; animation: sc-right 360ms var(--delay) var(--ease-out) both; }
.sc-pt .pts { justify-self: stretch; text-align: center; font-size: 13px; }
.sc-pt .ex { display: flex; gap: 6px; }
.sc-pt .lab { font-size: 13px; color: var(--soft); }
.sc-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px 0 3px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; font-weight: 700; white-space: nowrap; }
.sc-chip .blob { width: 20px; height: 20px; }
.sc-chip.empty { border-style: dashed; color: var(--muted); }
.sc-chip.empty span:not(.blob) { width: 22px; }
.sc-chip.dead span:not(.blob) { color: #666; text-decoration: line-through; }
.sc-win { align-items: flex-end; gap: 10px; padding-bottom: 0; }
.sc-place { display: flex; flex-direction: column; align-items: center; position: relative; }
.sc-place .blob { width: 54px; height: 54px; margin-bottom: -4px; animation: sc-drop 520ms var(--ease-spring) both; }
.sc-place.p1 .blob { width: 66px; height: 66px; animation-delay: 520ms; }
.sc-place.p2 .blob { animation-delay: 260ms; }
.sc-block { width: 84px; display: grid; place-items: start center; padding-top: 8px; background: var(--surface-2); border: 1px solid var(--border-strong); border-bottom: 0; border-radius: 10px 10px 0 0; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--soft); }
.sc-place.p1 .sc-block { height: 74px; background: var(--pen-dim); border-color: var(--pen-border); color: #f3b48c; }
.sc-place.p2 .sc-block { height: 52px; }
.sc-place.p3 .sc-block { height: 36px; }
.sc-crown { position: absolute; top: -20px; color: #f5c451; animation: sc-drop 520ms 820ms var(--ease-spring) both; }
.sc-crown .icon { width: 24px; height: 24px; }
@keyframes sc-drop { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: none; } }
@keyframes rules-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rules-out { to { opacity: 0; } }
@keyframes rules-card-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
.toast { position: fixed; left: 50%; top: max(16px, env(safe-area-inset-top)); transform: translateX(-50%); background: #1a1a1a; border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 600; z-index: 40; animation: toast-in 300ms var(--ease-out); }
.toast.bad { border-color: var(--stop); color: #ffb3b3; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.legal-links--fixed { z-index: 15; }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .screen { padding: 64px 12px 84px; align-items: flex-start !important; }
  .summary-card { margin-block: auto; }
  .peek { font-size: min(84px, 20vw); }
  .lobby { grid-template-columns: 1fr; height: auto; border-radius: 14px; }
  .roster { border-right: 0; border-bottom: 1px solid var(--border); }
  .roster-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .pl { padding: 4px 4px 4px 4px; gap: 6px; background: var(--bg); border: 1px solid var(--border); min-height: 0; min-width: 0; font-size: 14px; }
  .pl .blob { width: 32px; height: 32px; }
  .pl .tag { font-size: 9px; padding: 2px 5px; }
  .pl .nm { flex: 1; min-width: 0; }
  .pl .end { flex: none; }
  .pl .tag { margin-left: 0; }
  .pl .kick { margin-left: 0; width: 26px; height: 30px; }
  .start-inner { width: 100%; }
  .home-grid { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .panel { padding: 18px; }
  .rejoin-panel { position: static; transform: none; order: 1; width: 100%; max-width: none; flex-direction: column; align-items: stretch; gap: 12px; box-shadow: none; padding: 14px; }
  .rejoin-panel.out { transform: translateY(14px); }
  .rejoin-panel h2 { justify-content: center; }
  .rejoin-actions .btn { flex: 1; }
  .home-grid { order: 2; }
  .start-inner > .err, .start-inner > .start-stats { order: 3; }
  .cats-head .settings { margin-left: 0; width: 100%; flex-wrap: nowrap; }
  .cats-head .settings .chip.pill { padding: 6px 4px; flex: 1 1 0; width: auto; min-width: 0; }
  .cats-head .settings #roundsPill { flex-grow: 1.35; }
  .cats-head .settings .icon-btn { flex: none; }
  html body > nav.legal-links--fixed, html.is-handheld body > nav.legal-links--fixed { position: static; translate: none; display: flex; justify-content: center; margin: 0 auto 24px; }
  .invite { margin-top: 8px; }
  .cats { padding: 18px 14px; overflow: visible; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .go { flex-direction: column; align-items: stretch; }
  .go-btn { width: 100%; }
  .sheet-play { grid-template-columns: 1fr; height: auto; gap: 12px; background: none; border: 0; border-radius: 0; overflow: visible; }
  .play-side { display: contents; }
  .sp-main { order: 3; padding: 0; }
  .play-side .leave-game { order: 4; justify-self: center; margin-top: 4px; }
  .mate-list { order: 1; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 6px 4px; overflow: visible; padding: 4px 0; border-top: 0; min-width: 0; }
  .mate { width: 62px; flex-direction: column; gap: 0; padding: 0; min-height: 0; font-size: 14px; }
  .mate .nm { flex: none; max-width: 62px; font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; }
  .mate .blob { width: 48px; height: 48px; }
  .mate-list.many { gap: 4px 2px; }
  .mate-list.many .mate { width: 50px; min-height: 0; }
  .mate-list.many .mate .nm { max-width: 50px; }
  .mate-list.many .mate .blob { width: 38px; height: 38px; }
  .stopp-wrap { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 22; }
  .stopbtn { width: 100%; padding: 16px 0 14px; }
  .confirm { left: 0; right: 0; width: auto; }
  .topbar { order: 2; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; }
  .topbar .btn.reroll { grid-column: auto; width: 150px; }
  .topbar .letter { width: 64px; height: 64px; font-size: 44px; border-radius: 14px; }
  .meta .timer { font-size: 26px; }
  .bar { width: 140px; }
  .sheet { flex: none; overflow: hidden; }
  .line { flex: none; padding: 8px 16px; gap: 6px; min-height: 64px; }
  .line .lab { font-size: 13px; }
  .line input { font-size: 20px; padding: 6px 12px; }
  .card { padding: 16px 14px; border-radius: 16px; }
  .card-head { flex-wrap: wrap; }
  .card-head .count { margin-left: 0; width: 100%; }
  .vote-rows { max-height: none; }
  .ans { grid-template-columns: 40px minmax(0, 1fr) 64px; gap: 10px; }
  .acts { grid-column: 1 / -1; grid-template-columns: 1fr 1.2fr 1fr; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .card-foot .row { width: 100%; }
  .card-foot .row .btn { flex: 1; min-width: 0; }
  .card-foot .row .back-btn { flex: 0 0 auto; }
  .srow { grid-template-columns: 24px 40px minmax(0, 1fr) 54px 60px; gap: 8px; }
  .podium { grid-template-columns: 1fr; height: auto; }
  .pod-left { padding-top: 22px; }
  .pod-left h2 { font-size: 32px; margin-bottom: 24px; }
  .steps { width: 100%; gap: 6px; }
  .step { width: auto; flex: 1; min-width: 0; }
  .step .nm { font-size: 13px; }
  .step .who.multi .blob, .step.first .who.multi .blob { width: 44px; height: 44px; }
  .step .blob { width: 64px; height: 64px; }
  .step.first .blob { width: 80px; height: 80px; }
  .pod-right { border-left: 0; border-top: 1px solid var(--border); padding: 20px 16px; }
  .callout-text { font-size: 22px; }
  .stat-list { grid-template-columns: minmax(0, 1fr); }
  .rules-card { padding: 16px 14px 14px; }
  .sc { gap: 14px; padding: 12px; }
  .sc-line { min-width: 150px; grid-template-columns: 50px auto; }
  .sc-pt { grid-template-columns: 30px minmax(0, 1fr); row-gap: 2px; }
  .sc-pt .lab { grid-column: 2; font-size: 12px; }
  .tut-stage { height: 232px; }
  .sc-row .a { width: 84px; font-size: 11px; }
  .tut-copy { min-height: 132px; }
  .tut-back { width: 84px; }
  .tut-next { width: 112px; }
  .callout .blob { width: 96px; height: 96px; margin-bottom: -24px; }
  .slot-machine { --cell: min(190px, 28vh); }
}

@media (max-width: 560px) {
  .avatar-build.intro { gap: 18px; }
  .avatar-build.intro .avatar-blob { width: clamp(92px, 27vw, 128px); }
  .avatar-build.intro .name-line { padding-left: 0; font-size: 1.22rem; }
}

@media (pointer: coarse) {
  .dots { padding: 8px; margin: -8px; }
  .name-field input { font-size: inherit; }
}
