@font-face { font-family: 'Big Shoulders'; font-weight: 800; font-display: swap; src: url(/fonts/big-shoulders-display/files/big-shoulders-display-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Big Shoulders'; font-weight: 900; font-display: swap; src: url(/fonts/big-shoulders-display/files/big-shoulders-display-latin-900-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 400; font-display: swap; src: url(/fonts/archivo/files/archivo-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 600; font-display: swap; src: url(/fonts/archivo/files/archivo-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 700; font-display: swap; src: url(/fonts/archivo/files/archivo-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url(/fonts/jetbrains-mono/files/jetbrains-mono-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 700; font-display: swap; src: url(/fonts/jetbrains-mono/files/jetbrains-mono-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Noto Sans Telugu'; font-weight: 500; font-display: swap; src: url(/fonts/noto-sans-telugu/files/noto-sans-telugu-telugu-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Noto Sans Telugu'; font-weight: 700; font-display: swap; src: url(/fonts/noto-sans-telugu/files/noto-sans-telugu-telugu-700-normal.woff2) format('woff2'); }

:root {
  --ink: #06080f;
  --panel: #0a0d15;
  --panel-2: #10141f;
  --line: #222838;
  --text: #f3efe6;
  --mute: #8d93a5;
  --ghost: #ff2e88;
  --auto: #ffc531;
  --bus: #ff4a3d;
  --metro: #3d8bff;
  --boat: #23d5c4;
  --display: 'Big Shoulders', 'Arial Narrow', sans-serif;
  --ui: 'Archivo', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --te: 'Noto Sans Telugu', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); font: 400 15px/1.45 var(--ui); overflow: hidden; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ghost); outline-offset: 2px; }
[lang='te'] { font-family: var(--te); }

/* ---------- city canvas and its labels ---------- */
.city { position: fixed; inset: 0; }
.city canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.chips, .districts { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.chip {
  position: absolute; left: 0; top: 0; margin: 6px 0 0 -15px; min-width: 30px; height: 20px; padding: 0 4px; /* sits just below the stop so pieces stay visible */
  font: 700 11px/18px var(--mono); letter-spacing: -0.02em; text-align: center; color: var(--text);
  background: rgb(8 10 17 / 0.86); border: 1px solid var(--ring); border-radius: 3px; pointer-events: auto;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.5); transition: scale 0.2s, background-color 0.2s, color 0.2s;
}
.chip:hover { background: var(--text); color: var(--ink); }
.chip.possible { border-color: var(--ghost); color: var(--ghost); }
.chip.target { background: var(--text); color: var(--ink); border-color: var(--text); scale: 1.3; z-index: 2; animation: beckon 1.1s ease-in-out infinite; }
@keyframes beckon { 50% { box-shadow: 0 0 0 4px rgb(243 239 230 / 0.25), 0 0 18px rgb(243 239 230 / 0.5); } }
.chips.far .chip, .chip.dot:not(.target) { min-width: 0; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; padding: 0; font-size: 0; border-radius: 50%; background: var(--ring); border: 0; }
.chip.dot.possible { background: var(--ghost); }
.chips.far .chip.target { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--text); }
.chips.far .chip.possible { background: var(--ghost); }
.district { position: absolute; left: 0; top: 0; transition: opacity 0.4s; white-space: nowrap; }
.district > span { display: block; transform: translateX(-50%); text-align: center; text-shadow: 0 1px 8px rgb(0 0 0 / 0.9); }
.district .en { font: 800 15px/1 var(--display); text-transform: uppercase; letter-spacing: 0.16em; color: rgb(243 239 230 / 0.62); }
.district .te { margin-top: 3px; font-size: 11px; font-weight: 500; color: rgb(243 239 230 / 0.42); }
.district.campus .en { font-size: 12px; color: rgb(184 255 140 / 0.45); }
.city.hero .district .en { font-size: 17px; }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: 0.09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- loading ---------- */
.loading { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; justify-content: flex-end; padding: 8vh 7vw; background: var(--ink); transition: opacity 0.8s; }
.loading.done { opacity: 0; pointer-events: none; }
.loading .lk { margin: 0; font: 500 12px var(--mono); color: var(--mute); letter-spacing: 0.08em; }
.loading .lt { margin: 10px 0 0; font: 900 clamp(64px, 12vw, 160px)/0.82 var(--display); text-transform: uppercase; }
.loading .ll { margin: 22px 0 10px; font: 500 13px var(--mono); color: var(--ghost); }
.lbar { display: block; width: min(420px, 80vw); height: 2px; background: var(--line); overflow: hidden; position: relative; }
.lbar::after { content: ''; position: absolute; inset: 0; width: 40%; background: var(--ghost); animation: scan 1.2s ease-in-out infinite; }
@keyframes scan { from { translate: -100% 0; } to { translate: 250% 0; } }

/* ---------- shared controls ---------- */
.screen { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.screen > * { pointer-events: auto; }
.kicker { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.pip { width: 8px; height: 8px; background: var(--ghost); box-shadow: 0 0 12px var(--ghost); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  font: 700 15px var(--ui); letter-spacing: 0.01em; background: var(--panel-2); border: 1px solid #343b50; border-radius: 4px;
  transition: background-color 0.15s, border-color 0.15s, translate 0.15s;
}
.btn:hover { border-color: var(--text); }
.btn:active { translate: 0 1px; }
.btn.primary { background: var(--ghost); border-color: var(--ghost); color: #12020a; }
.btn.primary:hover { background: #ff5aa2; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.link { background: none; border: 0; padding: 6px 0; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.link:hover { color: var(--text); }
.field { display: grid; gap: 6px; }
.field > span { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.field input {
  height: 46px; padding: 0 14px; font: 600 16px var(--ui); color: var(--text); background: rgb(6 8 15 / 0.8);
  border: 1px solid #343b50; border-radius: 4px;
}
.field input:focus { border-color: var(--ghost); outline: none; }
.err { min-height: 1.4em; margin: 0; color: #ff8aa0; font-size: 13px; }
.hint { margin: 0; color: var(--mute); font-size: 13px; }
.seg { display: inline-flex; border: 1px solid #343b50; border-radius: 4px; overflow: hidden; }
.seg button { min-height: 40px; padding: 0 16px; background: transparent; border: 0; font-weight: 600; font-size: 14px; color: var(--mute); }
.seg button + button { border-left: 1px solid #343b50; }
.seg button[aria-pressed='true'] { background: var(--text); color: var(--ink); }
.stepper { display: inline-flex; align-items: center; border: 1px solid #343b50; border-radius: 4px; }
.stepper button { width: 40px; height: 40px; background: transparent; border: 0; font-size: 18px; }
.stepper output { min-width: 34px; text-align: center; font: 900 24px var(--display); }

/* ---------- home: poster over the live city ---------- */
.home { background: linear-gradient(90deg, rgb(6 8 15 / 0.94) 0%, rgb(6 8 15 / 0.7) 34%, rgb(6 8 15 / 0) 62%); }
.poster { position: absolute; left: clamp(20px, 6vw, 96px); top: 50%; translate: 0 -54%; width: min(560px, calc(100vw - 40px)); max-height: calc(100dvh - 70px); }
.poster h1 { margin: 18px 0 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: 0.8; letter-spacing: -0.01em; }
.poster .t1 { display: block; font-size: min(17vw, 25vh, 236px); }
.poster .t2 { display: block; margin-top: 10px; font-size: min(6.1vw, 9vh, 85px); color: var(--ghost); letter-spacing: 0.01em; }
.poster .te { margin: 14px 0 0; font-size: 20px; font-weight: 700; color: rgb(243 239 230 / 0.5); }
.lede { max-width: 46ch; margin: 18px 0 26px; color: #c9c6be; font-size: 16px; }
.entry { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; max-width: 460px; }
.entry .field:first-child { grid-column: 1; }
.entry #createBtn { grid-column: 2; }
.join { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; padding-top: 14px; border-top: 1px dashed #2b3244; }
.join input { font: 700 18px var(--mono); letter-spacing: 0.3em; text-transform: uppercase; }
.entry .err { grid-column: 1 / -1; }
.foot { position: absolute; left: clamp(20px, 6vw, 96px); bottom: calc(18px + var(--safe-b)); display: flex; gap: 22px; align-items: center; font-size: 12px; color: var(--mute); }

/* ---------- lobby ---------- */
.lobby { background: linear-gradient(90deg, rgb(6 8 15 / 0.95) 0%, rgb(6 8 15 / 0.75) 36%, rgb(6 8 15 / 0) 64%); }
.sheet { position: absolute; left: clamp(20px, 6vw, 96px); top: 0; bottom: 0; width: min(440px, calc(100vw - 40px)); padding: clamp(24px, 7vh, 72px) 0 24px; overflow-y: auto; scrollbar-width: thin; }
.code { margin: 8px 0 14px; font: 900 clamp(96px, 12vw, 150px)/0.82 var(--display); letter-spacing: 0.06em; color: var(--text); }
.sheet h2 { margin: 30px 0 10px; font: 800 26px var(--display); text-transform: uppercase; letter-spacing: 0.04em; }
.sheet h3 { margin: 0 0 8px; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.group { margin-top: 20px; }
.players { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.player { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--line); }
.player .dot { width: 8px; height: 8px; border-radius: 50%; background: #5cff9d; box-shadow: 0 0 8px #5cff9d; flex: none; }
.player.offline .dot { background: #4a5063; box-shadow: none; }
.player .pname { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .tag { font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 6px; border: 1px solid #3a4157; border-radius: 2px; color: var(--mute); }
.player .tag.you { border-color: var(--text); color: var(--text); }
.player .prole { margin-left: auto; font: 800 15px var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.player.ghost .prole { color: var(--ghost); }
.player .kick { width: 30px; height: 30px; background: none; border: 0; color: var(--mute); font-size: 18px; }
.player .kick:hover { color: #ff8aa0; }
.go { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.go .primary { flex: 1; }
#startHint { margin-top: 10px; }
.sheet-foot { display: flex; gap: 22px; margin-top: 26px; }

/* ---------- game HUD ---------- */
.hud-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; gap: 16px; padding: 14px 16px 0; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.round { display: grid; grid-template-columns: auto auto; align-items: end; column-gap: 4px; padding: 6px 12px 8px; background: rgb(8 10 17 / 0.86); border: 1px solid var(--line); border-radius: 4px; flex: none; }
.round .lbl { grid-column: 1 / -1; font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--mute); }
.round .big { font: 900 44px/0.9 var(--display); }
.round .of { font: 800 18px var(--display); color: var(--mute); padding-bottom: 3px; }
.log { display: flex; gap: 3px; margin: 0; padding: 6px; list-style: none; background: rgb(8 10 17 / 0.86); border: 1px solid var(--line); border-radius: 4px; overflow-x: auto; scrollbar-width: none; flex: 0 1 auto; min-width: 0; }
.slot { position: relative; display: grid; grid-template-rows: 12px 22px 14px; justify-items: center; width: 30px; flex: none; border-radius: 3px; background: #111521; }
.slot .n { font: 500 9px/12px var(--mono); color: #5c6378; }
.slot .tk { font: 900 17px/22px var(--display); color: #2b3143; }
.slot .at { font: 700 9px/14px var(--mono); color: var(--mute); }
.slot .at.shown { color: var(--ghost); }
.slot.reveal { box-shadow: inset 0 0 0 1px rgb(255 46 136 / 0.55); }
.slot.reveal .tk { color: rgb(255 46 136 / 0.6); font-size: 13px; }
.slot.now { box-shadow: inset 0 0 0 1px var(--text); }
.slot.used .tk { color: #0b0b0b; }
.slot.used { background: var(--c); }
.slot.used .n, .slot.used .at { color: rgb(0 0 0 / 0.6); }
.slot.used .at.shown { color: #000; text-decoration: underline; }
.t-taxi { --c: var(--auto); } .t-bus { --c: var(--bus); } .t-underground { --c: var(--metro); } .t-ferry { --c: var(--boat); } .t-double { --c: var(--text); }
.t-black { --c: #000; }
.slot.used.t-black { background: #000; box-shadow: inset 0 0 0 1px var(--ghost); }
.slot.used.t-black .tk, .slot.used.t-black .at { color: var(--ghost); }
.slot.used.t-black .n { color: #6b2448; }
.tools { display: flex; gap: 6px; margin-left: auto; flex: none; }
.icon { width: 42px; height: 42px; display: grid; place-items: center; background: rgb(8 10 17 / 0.86); border: 1px solid var(--line); border-radius: 4px; }
.icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon:hover { border-color: var(--text); }
.icon[aria-pressed='true'] { color: var(--ghost); border-color: rgb(255 46 136 / 0.6); }

.roster { position: absolute; right: 16px; top: 86px; width: 268px; display: grid; gap: 4px; }
.row { display: grid; grid-template-columns: 10px 1fr auto; grid-template-areas: 'sw who stop' 'sw owner owner' 'sw mini mini'; column-gap: 10px; padding: 8px 10px; background: rgb(8 10 17 / 0.86); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.row.active { border-color: var(--c, var(--ghost)); box-shadow: 0 0 0 1px var(--c, var(--ghost)), 0 0 24px -6px var(--c, var(--ghost)); }
.row .swatch { grid-area: sw; width: 4px; border-radius: 2px; background: var(--c, var(--ghost)); box-shadow: 0 0 10px var(--c, var(--ghost)); }
.row .who { grid-area: who; font: 800 16px/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.06em; }
.row.ghost .who { color: var(--ghost); }
.row .owner { grid-area: owner; font-size: 12px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .stop { grid-area: stop; font: 700 12px var(--mono); color: var(--mute); }
.mini { grid-area: mini; display: flex; gap: 4px; margin-top: 6px; }
.mt { min-width: 30px; padding: 1px 5px; font: 700 10px/16px var(--mono); text-align: center; color: #0b0b0b; background: var(--c); border-radius: 2px; }
.mt.t-black { color: var(--ghost); box-shadow: inset 0 0 0 1px var(--ghost); }

.bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 16px calc(16px + var(--safe-b)); display: grid; justify-items: center; gap: 10px; pointer-events: none; }
.bottom > * { pointer-events: auto; }
.turn { margin: 0; padding: 8px 16px; font-size: 14px; background: rgb(8 10 17 / 0.9); border: 1px solid var(--line); border-radius: 4px; }
.turn:empty { display: none; }
.turn strong { font: 900 18px var(--display); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ghost); }
.turn.mine { border-color: var(--ghost); box-shadow: 0 0 30px -8px var(--ghost); }
.turn .wait::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--mute); animation: blink 1s steps(2) infinite; vertical-align: 1px; }
@keyframes blink { 50% { opacity: 0.2; } }
.hand { display: flex; gap: 8px; }
.watching { margin: 0; color: var(--mute); }

/* Tickets look like printed transit tickets: notched sides and a perforated stub. */
.ticket {
  --notch: radial-gradient(circle at 0 50%, #0000 7px, #000 7.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, #0000 7px, #000 7.5px) right / 51% 100% no-repeat;
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'count name' 'count te'; align-items: center; column-gap: 10px;
  min-width: 108px; padding: 8px 14px 8px 16px; color: #0d0d0d; background: var(--c); border: 0; border-radius: 5px; text-align: left;
  -webkit-mask: var(--notch); mask: var(--notch);
}
.ticket::after { content: ''; position: absolute; top: 8px; bottom: 8px; left: 50px; border-left: 2px dotted rgb(0 0 0 / 0.28); }
.ticket .count { grid-area: count; min-width: 26px; font: 900 34px/0.9 var(--display); text-align: center; }
.ticket .tname { grid-area: name; font: 800 15px/1 var(--display); text-transform: uppercase; letter-spacing: 0.08em; padding-left: 8px; }
.ticket .tte { grid-area: te; font: 700 11px/1.3 var(--te); opacity: 0.7; padding-left: 8px; }
.ticket.t-black { background: #050507; color: var(--ghost); box-shadow: inset 0 0 0 1px var(--ghost); }
.ticket.t-black::after { border-color: rgb(255 46 136 / 0.4); }
.ticket.empty { filter: grayscale(1) brightness(0.45); }

.picker {
  position: absolute; left: 50%; bottom: calc(16px + var(--safe-b)); translate: -50% 0; z-index: 20; width: min(560px, calc(100vw - 24px));
  padding: 16px; background: rgb(8 10 17 / 0.96); border: 1px solid var(--text); border-radius: 6px; box-shadow: 0 20px 60px rgb(0 0 0 / 0.7);
  display: grid; gap: 12px; animation: rise 0.18s ease-out;
}
@keyframes rise { from { opacity: 0; translate: -50% 10px; } }
.phead { display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'num name' 'num street'; column-gap: 12px; }
.pnum { grid-area: num; font: 900 46px/0.85 var(--display); }
.pname { grid-area: name; font: 800 20px/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.05em; }
.pstreet { grid-area: street; font-size: 12px; color: var(--mute); }
.prow { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket.go { grid-template-areas: 'name count' 'te count'; grid-template-columns: 1fr auto; min-height: 58px; flex: 1; min-width: 150px; cursor: pointer; transition: filter 0.15s, translate 0.15s; }
.ticket.go::after { left: auto; right: 54px; }
.ticket.go .tname, .ticket.go .tte { padding-left: 0; }
.ticket.go .count { font-size: 22px; opacity: 0.55; padding-left: 14px; }
.ticket.go:hover { filter: brightness(1.15); translate: 0 -2px; }
.ticket.go:disabled { opacity: 0.5; }
.dbl { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--mute); }
.dbl input { width: 18px; height: 18px; accent-color: var(--ghost); }
.picker .link { justify-self: start; }

/* ---------- banners and end ---------- */
.banner {
  position: fixed; left: 0; right: 0; top: 34%; z-index: 30; display: grid; justify-items: center; gap: 6px; padding: 22px 16px;
  background: linear-gradient(90deg, #0000, rgb(6 8 15 / 0.92) 20%, rgb(6 8 15 / 0.92) 80%, #0000); pointer-events: none; animation: sweep 3.6s ease forwards;
}
.banner strong { font: 900 clamp(44px, 7vw, 84px)/0.9 var(--display); text-transform: uppercase; letter-spacing: 0.02em; text-align: center; }
.banner span { font: 500 13px var(--mono); color: var(--mute); text-transform: uppercase; letter-spacing: 0.08em; text-align: center; }
.banner.ghost strong { color: var(--ghost); text-shadow: 3px 0 0 rgb(61 139 255 / 0.6), -3px 0 0 rgb(255 197 49 / 0.35); animation: glitch 0.5s steps(3) 3; }
@keyframes sweep { 0% { opacity: 0; clip-path: inset(0 50%); } 12%, 82% { opacity: 1; clip-path: inset(0 0); } 100% { opacity: 0; } }
@keyframes glitch { 33% { translate: -4px 0; } 66% { translate: 3px 0; } }
.toast { position: fixed; left: 50%; top: 84px; translate: -50% 0; z-index: 31; max-width: min(560px, calc(100vw - 24px)); padding: 10px 14px; font-size: 13px; background: rgb(8 10 17 / 0.95); border: 1px solid #3a4157; border-radius: 4px; }
.net { position: fixed; left: 0; right: 0; top: 0; z-index: 70; padding: 8px; text-align: center; font: 700 13px var(--mono); background: #ff4a3d; color: #120202; }

.end { position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(20px, 6vw, 96px); background: linear-gradient(90deg, rgb(6 8 15 / 0.95) 0%, rgb(6 8 15 / 0.75) 40%, rgb(6 8 15 / 0.1) 75%); }
.end-title { margin: 14px 0 0; font: 900 clamp(120px, 20vw, 280px)/0.8 var(--display); text-transform: uppercase; }
.end-reason { max-width: 40ch; margin: 20px 0 4px; font-size: 18px; }
.end-stats { margin: 0; font: 500 12px var(--mono); color: var(--mute); text-transform: uppercase; letter-spacing: 0.06em; }
.end-note { margin: 18px 0 0; font-size: 13px; color: var(--ghost); }
.end .go { max-width: 460px; align-items: center; }

.help { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); padding: 28px; color: var(--text); background: var(--panel); border: 1px solid #343b50; border-radius: 6px; }
.help::backdrop { background: rgb(3 4 8 / 0.7); }
.help h2 { margin: 0 0 14px; font: 900 44px/1 var(--display); text-transform: uppercase; }
.help ol { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 10px; color: #cfccc4; }
.help strong { color: var(--text); }
.help-tip { color: var(--mute); font-size: 13px; }
.k { display: inline-block; padding: 0 6px; font: 800 13px/18px var(--display); text-transform: uppercase; letter-spacing: 0.06em; color: #0b0b0b; background: var(--c); border-radius: 2px; }
.k.t-black { color: var(--ghost); box-shadow: inset 0 0 0 1px var(--ghost); }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .home, .lobby { background: linear-gradient(0deg, rgb(6 8 15 / 0.97) 0%, rgb(6 8 15 / 0.85) 55%, rgb(6 8 15 / 0.2) 100%); }
  .poster { top: auto; bottom: calc(52px + var(--safe-b)); translate: none; left: 16px; width: calc(100vw - 32px); }
  .poster .t1 { font-size: 30vw; }
  .poster .t2 { font-size: 11vw; }
  .lede { font-size: 14px; margin: 12px 0 18px; }
  .poster .te { font-size: 16px; }
  .entry { grid-template-columns: 1fr; }
  .entry #createBtn { grid-column: 1; }
  .foot { left: 16px; }
  .sheet { left: 16px; width: calc(100vw - 32px); }
  .hud-top { flex-wrap: wrap; padding: 10px 10px 0; gap: 8px; }
  .round .big { font-size: 34px; }
  .log { order: 3; flex: 1 1 100%; }
  .roster { top: auto; right: 10px; left: 10px; bottom: calc(150px + var(--safe-b)); width: auto; display: flex; overflow-x: auto; scrollbar-width: none; }
  .row { min-width: 158px; padding: 6px 8px; }
  .icon { width: 38px; height: 38px; }
  .ticket { min-width: 0; padding: 6px 10px 6px 12px; column-gap: 6px; }
  .ticket .count { font-size: 26px; }
  .ticket .tname { font-size: 12px; padding-left: 6px; }
  .ticket .tte { font-size: 9px; padding-left: 6px; }
  .ticket::after { left: 38px; }
  .hand { gap: 4px; max-width: calc(100vw - 20px); overflow-x: auto; scrollbar-width: none; }
  .hand .ticket { flex: none; }
  .ticket .tte { display: none; }
  .end-title { font-size: 34vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
