/* Restroom Games: Miller dark brand. Black, white, company red, Montserrat, uppercase heads, no pills. */
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #000000; --card: #111213; --card2: #1a1b1d; --line: #26272b; --char: #35363a;
  --fg: #ffffff; --dim: #a9acb1; --dim2: #82858b; --red: #a9242e; --red-dark: #921e27; --red-text: #e5535d;
  --pink: #f2a5aa; --gray: #8e8f94; --good: #4caf5c; --warn: #e8a33a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 500; font-size: 15px; line-height: 1.5; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0; text-transform: uppercase; font-weight: 900; line-height: 0.98; text-wrap: balance; }
p { margin: 0; }
a { color: var(--red-text); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red-text); outline-offset: 2px; }
.hidden { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }
.dim2 { color: var(--dim2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.warn { color: var(--warn) !important; }
.good { color: var(--good) !important; }
.red { color: var(--red-text); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 4px solid var(--red); }
.top .logo { display: block; width: 124px; height: auto; }
.top .where { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); text-align: right; }
.top .where b { color: var(--fg); font-weight: 800; }
.top .where span { display: inline-flex; align-items: center; gap: 4px; }
.top .where .icon { width: 14px; height: 14px; stroke: var(--red-text); }
.back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--fg); text-decoration: none; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; background: none; border: 0; cursor: pointer; }

/* Layout */
.page { padding: 18px 16px 40px; display: flex; flex-direction: column; gap: 16px; max-width: 1200px; margin: 0 auto; }
.page.narrow { max-width: 560px; }
.cols { display: flex; flex-direction: column; gap: 16px; }
.main, .side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 900px) {
  .top { padding: 16px 40px; }
  .top .logo { width: 170px; }
  .top .where { flex-direction: row; gap: 20px; font-size: 13px; }
  .page { padding: 28px 40px 56px; }
  .cols { flex-direction: row; align-items: flex-start; gap: 32px; }
  .main { flex: 1 1 560px; }
  .side { flex: 0 1 360px; }
}

/* Type pieces */
.eyebrow { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; color: var(--red-text); }
.h-xl { font-size: 40px; }
.h-l { font-size: 28px; }
.h-m { font-size: 20px; letter-spacing: 0.02em; }
.h-s { font-size: 15px; letter-spacing: 0.04em; }
.rule { width: 56px; height: 4px; background: var(--red); }
@media (min-width: 900px) { .h-xl { font-size: 60px; } .h-l { font-size: 36px; } }

/* Cards and buttons */
.card { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--char); border-radius: 6px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card.hot { border-top-color: var(--red); }
.card.ok { border-top-color: var(--good); }
.card.plain { border-top-width: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: 6px; border: 2px solid var(--char); background: var(--card); color: var(--fg); text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; text-align: center; }
.btn-red { background: var(--red); border-color: var(--red); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--char); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }
.tag.live { border-color: var(--good); color: var(--good); }
.tag.fan { border-color: var(--gray); }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }

/* Lobby */
.you { display: flex; gap: 8px; align-items: stretch; }
.you .who { flex: 1 1 auto; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; display: flex; flex-direction: column; }
.you .who span { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim2); }
.you .who b { font-size: 16px; font-weight: 900; text-transform: uppercase; }
.live-line { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; color: var(--dim); }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--good); display: inline-block; margin-right: 6px; }
.games { display: flex; flex-direction: column; gap: 8px; }
.game { display: flex; gap: 12px; align-items: center; padding: 12px; min-height: 64px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; color: var(--fg); text-decoration: none; cursor: pointer; text-align: left; width: 100%; }
.game .ico { flex: none; width: 44px; height: 44px; border-radius: 6px; background: var(--red); display: grid; place-items: center; }
.game .ico .icon { width: 22px; height: 22px; stroke: #fff; }
.game .txt { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.game .txt b { font-size: 15px; font-weight: 900; text-transform: uppercase; }
.game .txt span { font-size: 13px; color: var(--dim); }
.game .new { color: var(--red-text); }
@media (min-width: 900px) {
  .games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
  .game { flex-direction: column; align-items: flex-start; min-height: 150px; padding: 16px; border-top: 6px solid var(--char); }
  .game:hover { border-top-color: var(--red); }
}
.bar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--card2); }
.bar .a { background: var(--red); }
.bar .b { background: var(--gray); }
.vs { display: flex; justify-content: space-between; align-items: baseline; font-weight: 900; text-transform: uppercase; font-size: 20px; gap: 8px; }
.vs small { font-size: 12px; color: var(--dim2); }
.pts { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; }
.promise { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; padding-top: 14px; border-top: 2px solid var(--char); }

/* Map */
.map { width: 100%; height: auto; display: block; }
.map text { font-family: "Montserrat", Arial, sans-serif; font-weight: 700; font-size: 10.5px; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; font-weight: 700; color: var(--dim); }
.legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: -2px; }
.legend .l0 { background: #161719; border: 1px solid var(--char); } .legend .l1 { background: #5e1a20; } .legend .l2 { background: #a9242e; } .legend .l3 { background: #e5535d; } .legend .l4 { background: #fff; }
.ranks { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ranks div { display: flex; justify-content: space-between; padding: 5px 8px; border-radius: 6px; border: 1px solid transparent; }
.ranks div.me { border-color: var(--fg); }

/* Game chrome */
.gamebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border-bottom: 4px solid var(--red); min-height: 56px; }
.gamebar h1 { font-size: 15px; letter-spacing: 0.04em; text-align: center; }
.gamebar .meta { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); min-width: 64px; text-align: right; }
.versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.versus .side-a, .versus .side-b { display: flex; flex-direction: column; min-width: 0; }
.versus .side-b { align-items: flex-end; text-align: right; }
.versus .lab { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-text); }
.versus b { font-size: 15px; font-weight: 900; text-transform: uppercase; line-height: 1.1; overflow-wrap: anywhere; }
.versus .town { font-size: 12px; color: var(--dim); }
.versus .score { font-size: 32px; font-weight: 900; }
.pips { display: flex; gap: 6px; justify-content: center; }
.pips span { width: 40px; height: 8px; border-radius: 4px; background: var(--line); }
.pips .w { background: var(--red); } .pips .l { background: var(--gray); } .pips .now { background: var(--fg); }
.pad { width: 100%; min-height: 320px; border-radius: 12px; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.pad big { font-size: 60px; font-weight: 900; line-height: 1; text-transform: uppercase; }
.pad span { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.pad.wait { background: var(--card2); color: var(--dim); }
.pad.go { background: var(--good); color: #000; }
.pad.red { background: var(--red); color: #fff; }
.pad.done { background: var(--card); color: var(--fg); }
.react { display: flex; flex-direction: column; gap: 6px; }
.react .row4 button { min-height: 44px; background: var(--card); border: 2px solid var(--char); border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; cursor: pointer; }
.said { font-size: 12px; color: var(--dim2); min-height: 18px; }
.note { padding-top: 12px; border-top: 2px solid var(--char); font-size: 12px; color: var(--dim); }
.center { text-align: center; }
.rope { position: relative; height: 44px; }
.rope .line { position: absolute; left: 0; right: 0; top: 18px; height: 8px; border-radius: 4px; background: var(--line); }
.rope .mid { position: absolute; left: 50%; top: 2px; width: 2px; height: 40px; background: var(--gray); }
.rope .knot { position: absolute; top: 8px; width: 28px; height: 28px; margin-left: -14px; border-radius: 6px; background: var(--red); box-shadow: 0 0 0 3px #fff; transition: left 160ms ease-out; }
.picks { display: flex; flex-direction: column; gap: 10px; }
.pick { min-height: 92px; border-radius: 6px; background: var(--card); border: 2px solid var(--char); display: flex; align-items: center; gap: 18px; padding: 0 20px; cursor: pointer; font-size: 22px; font-weight: 900; text-transform: uppercase; }
.pick .icon { width: 40px; height: 40px; stroke: var(--red-text); }
.pick.sel { border-color: var(--fg); background: var(--card2); }
@media (min-width: 900px) { .picks { display: grid; grid-template-columns: repeat(3, 1fr); } .pick { flex-direction: column; justify-content: center; min-height: 200px; } .pick .icon { width: 64px; height: 64px; } }
.timer { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--fg); transition: width 250ms linear; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.answer { min-height: 88px; border-radius: 6px; border: 0; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 12px; cursor: pointer; text-align: left; font-size: 17px; font-weight: 800; }
.answer small { font-size: 12px; font-weight: 900; }
.answer.c0 { background: var(--red); color: #fff; } .answer.c1 { background: #fff; color: #000; } .answer.c2 { background: var(--pink); color: #000; } .answer.c3 { background: var(--char); color: #fff; box-shadow: inset 0 0 0 2px var(--gray); }
.answer.dim { opacity: 0.3; } .answer.right { box-shadow: 0 0 0 4px var(--good); } .answer.mine { outline: 4px solid #fff; outline-offset: -4px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.num { min-height: 64px; background: var(--card); color: var(--fg); border: 2px solid var(--fg); border-radius: 6px; padding: 0 16px; font-size: 30px; font-weight: 900; width: 100%; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; }
.stat b { font-size: 26px; font-weight: 900; }
.stat span { font-size: 12px; color: var(--dim); }
.word { min-height: 64px; border-bottom: 3px solid var(--fg); display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 900; letter-spacing: 0.12em; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile { min-height: 64px; background: #fff; color: #000; border: 2px solid #fff; border-radius: 6px; font-size: 28px; font-weight: 900; cursor: pointer; }
.tile[disabled] { background: var(--card2); color: #5a5b60; border-color: var(--line); }
.tile.act { background: var(--card); color: #fff; border-color: var(--char); font-size: 11px; font-weight: 800; text-transform: uppercase; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 4px 8px; background: var(--card); border: 1px solid var(--char); border-radius: 4px; font-size: 13px; font-weight: 800; text-transform: uppercase; }
.chips span.bad { color: var(--dim2); text-decoration: line-through; }
.flash { min-height: 20px; font-size: 13px; font-weight: 700; }
canvas.play { width: 100%; display: block; border-radius: 12px; background: #0b0b0c; touch-action: none; user-select: none; -webkit-user-select: none; }
.hud { display: flex; justify-content: space-between; align-items: baseline; font-weight: 900; font-size: 15px; text-transform: uppercase; }
.hud .big { font-size: 26px; }

/* Report and rent */
.opts { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.opt { display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 0 14px; background: var(--card); border: 2px solid var(--char); border-radius: 6px; font-weight: 700; cursor: pointer; }
.opt input { width: 20px; height: 20px; accent-color: var(--red); }
.opt:has(input:checked) { border-color: var(--fg); background: var(--card2); }
.opt.flag { color: var(--warn); }
@media (min-width: 900px) { .opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.list { display: flex; flex-direction: column; gap: 8px; }
.list span { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.list span::before { content: ""; width: 8px; height: 8px; background: var(--red); border-radius: 2px; }
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.92); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 10; }
.overlay .card { max-width: 420px; width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
