/* Game Night design system: one set of tokens and components shared by every game. */
:root {
  /* colour */
  --bg: #ffffff; --ink: #37352f; --muted: #787774; --faint: #a5a29c; --line: #e9e9e7;
  --hover: #f1f1ef; --chip: #f4f3f0; --sel: #37352f; --sel-ink: #ffffff;
  --green: #448361; --green-bg: #edf3ec; --red: #d44c47; --red-bg: #fdebec;
  --yellow: #a26a14; --yellow-bg: #fbf3db; --blue: #337ea9; --blue-bg: #e7f3f8;
  --purple: #9065b0; --purple-bg: #f6f3f9;
  /* secret cards: dark in both themes so they stay discreet in a dim room */
  --secret: #37352f; --secret-ink: #ffffff; --secret-edge: transparent;
  /* shape & type */
  --r-sm: 8px; --r: 12px; --r-lg: 20px;
  --tap: 52px; --tap-lg: 58px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --gutter: 16px; --max: 560px;
  /* spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191919; --ink: #e6e6e4; --muted: #9b9b98; --faint: #6b6b68; --line: #2f2f2f;
    --hover: #252525; --chip: #252525; --sel: #e6e6e4; --sel-ink: #191919;
    --green: #6aa884; --green-bg: #1f2b23; --red: #e06c66; --red-bg: #33201f;
    --yellow: #d4a650; --yellow-bg: #2f2817; --blue: #5aa3cf; --blue-bg: #1b2a33;
    --purple: #b48fd1; --purple-bg: #2a2231;
    --secret: #2a2926; --secret-ink: #f2f1ee; --secret-edge: #3a3936;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
html { touch-action: manipulation; }
body {
  font: 17px/1.45 var(--font);
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
input { -webkit-user-select: text; user-select: text; }
main {
  max-width: var(--max); margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 8px) var(--gutter) calc(env(safe-area-inset-bottom) + 32px);
}
main.has-dock { padding-bottom: calc(env(safe-area-inset-bottom) + 170px); }

h1 { font-size: 2rem; font-weight: 700; margin: var(--s4) 0 var(--s1); letter-spacing: -.015em; line-height: 1.15; }
h1.md { font-size: 1.5rem; }
h1 + p.muted { margin-bottom: var(--s2); line-height: 1.4; }
h2 { font-size: .8rem; font-weight: 600; color: var(--muted); margin: var(--s6) 0 var(--s3); text-transform: uppercase; letter-spacing: .06em; }
p { margin: 4px 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .85rem; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: var(--s4); }
.danger { color: var(--red); }
.good { color: var(--green); }
.lead { color: var(--green); }
.suit.red { color: #d44c47; }

/* buttons */
button {
  font: inherit; color: inherit; background: none; border: 0; border-radius: 10px;
  padding: 8px 12px; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
button:active { background: var(--hover); }
@media (hover: hover) { button:not(:disabled):hover { background: var(--hover); } }
button:disabled { opacity: .35; cursor: default; background: none; }
.btn { border: 1px solid var(--line); min-height: var(--tap); padding: 0 18px; font-weight: 500; border-radius: var(--r); display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.2; text-align: center; }
.btn.dark { background: var(--sel); color: var(--sel-ink); border-color: var(--sel); font-weight: 600; }
.btn.dark:active, .btn.dark:disabled { background: var(--sel); }
@media (hover: hover) { .btn.dark:not(:disabled):hover { background: var(--sel); opacity: .9; } }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn.green:active, .btn.red:active { opacity: .85; }
.btn.wide { width: 100%; min-height: var(--tap-lg); font-size: 1.1rem; margin-top: var(--s3); }
.btn.huge { min-height: 72px; font-size: 1.25rem; }
.btn.ghost { border-color: transparent; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s3); }
.btns .btn { min-height: var(--tap-lg); }
.btns.three { grid-template-columns: 1fr 1fr 1fr; }
.btns > .span { grid-column: 1 / -1; }
.ghost { color: var(--muted); min-height: 44px; }
p.center > .ghost { margin-top: var(--s2); }

input[type=text] {
  font: inherit; font-size: 1.1rem; color: inherit; width: 100%; border: 0; background: none;
  padding: 0 6px; min-height: var(--tap); border-radius: var(--r-sm); outline: none;
}
input[type=text]:focus { background: var(--hover); }
input[type=text].boxed { background: var(--chip); padding: 0 14px; }
input::placeholder { color: var(--faint); }

/* top bar: back on the left, title truly centred, action on the right; text lines up with the gutter */
.topbar { display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr); align-items: center; min-height: 48px; gap: var(--s2); }
.topbar > button { white-space: nowrap; }
.topbar > :first-child { justify-self: start; margin-left: -12px; }
.topbar > :last-child { justify-self: end; margin-right: -12px; }
.topbar .title { font-size: .95rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; text-align: center; }

/* settings & option chips */
.setting { padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
h2 + .setting { border-top: 1px solid var(--line); }
.setting + .list > .item:first-child, .setting + .room { border-top: 0; }
.setting > .k { font-size: .95rem; color: var(--ink); font-weight: 500; margin-bottom: var(--s3); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.setting > .k > span:last-child { color: var(--muted); font-weight: 400; font-size: .85rem; white-space: nowrap; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: var(--s2); }
.opt { min-height: 50px; padding: 6px 10px; border-radius: var(--r); background: var(--chip); font-size: 1rem; line-height: 1.2; display: flex; align-items: center; justify-content: center; text-align: center; min-width: 0; }
.opt.on, .opt.on:active { background: var(--sel); color: var(--sel-ink); font-weight: 600; }
@media (hover: hover) { .opt.on:hover { background: var(--sel); } }

.pill.good { background: var(--green-bg); }
.pill.danger { background: var(--red-bg); }
.pill { padding: 4px 10px; border-radius: var(--r-sm); background: var(--chip); font-size: .95rem; display: inline-block; }
.pills { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tag { font-size: .75rem; padding: 2px 8px; border-radius: 6px; background: var(--yellow-bg); color: var(--yellow); white-space: nowrap; font-weight: 600; }
.tag.blue { background: var(--blue-bg); color: var(--blue); }
.tag.green { background: var(--green-bg); color: var(--green); }
.tag.red { background: var(--red-bg); color: var(--red); }
.tag.gray { background: var(--chip); color: var(--muted); }

.callout { display: flex; gap: var(--s3); padding: 14px var(--s4); border-radius: var(--r); background: var(--chip); align-items: flex-start; font-size: .98rem; line-height: 1.45; margin-top: var(--s3); }
.callout > span:first-child { flex-shrink: 0; width: 1.4em; text-align: center; line-height: 1.45; }
.callout:first-child { margin-top: 0; }
.dock .callout { margin: 0 0 var(--s2); padding: 10px 14px; align-items: center; }
.callout.good { background: var(--green-bg); color: var(--ink); }
.callout.bad { background: var(--red-bg); color: var(--red); }
.callout.warn { background: var(--yellow-bg); color: var(--yellow); }
.callout.info { background: var(--blue-bg); }

/* lists */
.list > .item { display: flex; align-items: center; gap: var(--s2); border-bottom: 1px solid var(--line); min-height: 60px; }
.list > .item:first-child { border-top: 1px solid var(--line); }
.list > .item.out { opacity: .45; }
.list > .item.out .nm { text-decoration: line-through; }
.list > button.item { width: 100%; text-align: left; border-radius: 0; padding: 0 2px; }
.list > .item > .x:last-child { margin-right: -10px; }
.handle { width: 22px; color: var(--faint); font-size: .9rem; text-align: right; flex-shrink: 0; }
.x { min-width: 44px; min-height: 44px; color: var(--faint); font-size: 1.1rem; }
.nm { font-size: 1.1rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* bottom dock: the primary action lives within thumb reach */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: var(--s3) var(--gutter) calc(env(safe-area-inset-bottom) + var(--s3));
}
.dock > div { max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; }
.dock .btn.wide { margin-top: var(--s2); }
.dock .btns { margin-top: 0; }
.dock > div > .btn.wide:first-child { margin-top: 0; }
.dock .row .btn { min-height: var(--tap-lg); }

/* hub */
.hero { margin-top: var(--s5); display: flex; gap: var(--s4); align-items: center; }
.hero p { margin: 2px 0 0; }
.hero img { border-radius: 15px; }
.hero h1 { margin: 0; }
.gamelist { margin-top: 4px; }
.game { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: var(--s3) 0; border-radius: 0; border-bottom: 1px solid var(--line); min-height: 76px; }
.game .grow > span + span { margin-top: 2px; }
.gamelist .game:first-child { border-top: 1px solid var(--line); }
.emo { width: 48px; height: 48px; border-radius: var(--r); background: var(--chip); display: grid; place-items: center; font-size: 1.6rem; flex-shrink: 0; }
.game .t { display: block; font-weight: 600; font-size: 1.05rem; }
.game .d { display: block; color: var(--muted); font-size: .88rem; line-height: 1.3; }
.game .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; color: var(--faint); font-size: .78rem; white-space: nowrap; }
.roster-card { display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left; margin-top: var(--s5); padding: 14px; background: var(--chip); border-radius: var(--r); min-height: 76px; }
.roster-card + .roster-card { margin-top: var(--s2); }
.roster-card .names { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* secret card + pass-the-phone */
.pass { text-align: center; padding: var(--s6) 0 var(--s4); }
.pass .who { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: var(--s2) 0; word-break: break-word; }
.pass h1 { margin: var(--s2) 0 var(--s1); }
.pass.full { min-height: calc(100svh - 240px); display: flex; flex-direction: column; justify-content: center; padding: var(--s4) 0; }
.big-count { font-size: 5.5rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.list > .item.team { display: block; padding: 10px 0 12px; }
.list > .item.team input { margin-left: -6px; width: calc(100% + 6px); min-height: 40px; font-weight: 600; }
.list > .item.team .small { margin-top: 2px; }
.pass > p { margin: var(--s1) 0; }
.steps { display: flex; gap: 6px; justify-content: center; margin: var(--s3) 0; flex-wrap: wrap; }
.steps i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--ink); }
.secret {
  background: var(--secret); color: var(--secret-ink); box-shadow: inset 0 0 0 1px var(--secret-edge); border-radius: var(--r-lg); padding: var(--s6) var(--s5); text-align: center;
  min-height: 44vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3); margin-top: var(--s3);
}
.secret .em { font-size: 3.6rem; line-height: 1; }
.secret .big { font-size: 2.3rem; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; word-break: break-word; }
.secret .lbl { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; opacity: .65; font-weight: 600; }
.secret .sub { opacity: .8; font-size: 1rem; line-height: 1.45; max-width: 30ch; }
.secret.alt { background: var(--red); color: #fff; box-shadow: none; }

/* prompt card (for everyone to see) */
.card {
  background: var(--chip); border-radius: var(--r-lg); padding: var(--s6) var(--s5); text-align: center; margin-top: var(--s3);
  min-height: 36vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3);
}
.card .lbl { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.card .big { font-size: 2rem; font-weight: 800; line-height: 1.15; word-break: break-word; }
.card .txt { font-size: 1.45rem; font-weight: 600; line-height: 1.3; }
.card .sub { color: var(--muted); }
.card.truth { background: var(--blue-bg); }
.card.dare { background: var(--red-bg); }
.no-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.no-list li { font-size: 1.15rem; font-weight: 600; color: var(--red); }
.secret .no-list li { color: #ffb4b0; }
.vs { display: grid; grid-template-columns: 1fr; gap: var(--s2); margin-top: var(--s3); }
.vs .opt { min-height: 96px; font-size: 1.2rem; font-weight: 600; padding: 12px 16px; line-height: 1.3; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.vs .opt b { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.vs .or { text-align: center; color: var(--faint); font-weight: 700; font-size: .85rem; }

/* timer */
.timer { text-align: center; margin: var(--s5) 0 var(--s1); }
.timer .clock { font-size: 4.5rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; }
/* segmented control (timer presets) */
.seg { display: grid; gap: 4px; padding: 4px; background: var(--chip); border-radius: var(--r); }
.seg .opt { min-height: 40px; background: transparent; font-size: .95rem; color: var(--muted); border-radius: 9px; }
.seg .opt.on, .seg .opt.on:active { background: var(--bg); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 1px var(--line); }
@media (hover: hover) { .seg .opt.on:hover { background: var(--bg); } }
.timer.low .clock { color: var(--red); }
.timer.done .clock { color: var(--red); }
.timer .bar { margin: var(--s4) 0 0; }
.timer.compact { margin-top: var(--s3); }
.timer.compact .clock { font-size: 2.8rem; }
.timer.compact .bar { margin-top: var(--s3); }
.bar { height: 8px; background: var(--chip); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--ink); opacity: .7; transition: width .25s linear; }

/* big tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: var(--s2); margin: var(--s4) 0 var(--s1); }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tile { background: var(--chip); border-radius: var(--r); padding: var(--s3) var(--s2); text-align: center; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.tile b { display: block; font-size: 1.5rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile small { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.letter { font-size: 7rem; font-weight: 800; line-height: 1; text-align: center; margin: var(--s5) 0 var(--s3); letter-spacing: -.02em; }

/* scores */
.score { display: flex; align-items: center; gap: var(--s2); min-height: 68px; border-bottom: 1px solid var(--line); }
.score:first-child { border-top: 1px solid var(--line); }
.score .nm { flex: 1; }
.score .v { min-width: 56px; text-align: center; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.score .st { width: 52px; height: 52px; padding: 0; border-radius: var(--r); background: var(--chip); font-size: 1.4rem; font-weight: 600; }
.score.cur { background: linear-gradient(90deg, var(--chip), transparent 70%); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }

.stand { display: flex; align-items: center; gap: var(--s3); padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
.stand:first-child { border-top: 1px solid var(--line); }
.stand .pos { width: 24px; color: var(--faint); }
.stand .s { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.3rem; }

/* number chips (bids, tricks, counts) */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.chips.few { grid-template-columns: repeat(var(--n), 1fr); }
.chip {
  height: 56px; padding: 0; border-radius: var(--r); background: var(--chip);
  font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; border: 2px solid transparent;
}
.chip.on, .chip.on:active { background: var(--sel); color: var(--sel-ink); }
@media (hover: hover) { .chip.on:hover { background: var(--sel); } }
.chip.bid { border-color: var(--faint); }
.chip.no { color: var(--red); text-decoration: line-through; opacity: .45; }
.chip.on.no { opacity: 1; background: var(--red); color: #fff; text-decoration: none; }

/* sticky segmented tabs */
.tabs {
  position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 4px;
  background: var(--bg); padding: calc(env(safe-area-inset-top) + 6px) 0 8px; margin-top: calc(-1 * env(safe-area-inset-top));
}
.tabs button { min-height: 46px; background: var(--chip); color: var(--muted); font-size: .95rem; font-weight: 500; }
.tabs button.on, .tabs button.on:active { background: var(--sel); color: var(--sel-ink); }
@media (hover: hover) { .tabs button.on:hover { background: var(--sel); } }

/* tables */
.table-wrap { overflow-x: auto; margin: 8px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 1rem; }
th, td { padding: 0 10px; height: 52px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:last-child, td:last-child { border-right: 0; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; height: 40px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--bg); z-index: 1; }
tr.clickable { cursor: pointer; }
tr.clickable:active td { background: var(--hover); }
tr.cur td { background: var(--chip); }
tr.total td { font-weight: 800; font-size: 1.15rem; border-bottom: 0; }
.edit-ico { color: var(--faint); font-size: .8rem; margin-left: 4px; }

/* narrator script */
.script { counter-reset: s; margin-top: 4px; }
.script .st { display: flex; gap: var(--s3); padding: 14px 0; line-height: 1.4; border-bottom: 1px solid var(--line); color: var(--faint); }
.script .st:first-child { border-top: 1px solid var(--line); }
.script .st::before { counter-increment: s; content: counter(s); width: 24px; flex-shrink: 0; text-align: right; font-weight: 600; }
.script .st.done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.script .st.now { color: var(--ink); font-size: 1.2rem; font-weight: 600; background: linear-gradient(90deg, var(--chip), transparent 80%); margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); }
.script .st.now::before { color: var(--blue); }

/* spectrum dial */
.spectrum { position: relative; height: 80px; border-radius: var(--r); margin: var(--s3) 0 var(--s2); overflow: hidden;
  background: linear-gradient(90deg, var(--blue-bg), var(--chip) 50%, var(--red-bg)); }
.spectrum .band { position: absolute; top: 0; bottom: 0; }
.spectrum .b2 { background: color-mix(in srgb, var(--yellow) 30%, transparent); }
.spectrum .b3 { background: color-mix(in srgb, var(--yellow) 55%, transparent); }
.spectrum .b4 { background: var(--yellow); }
.spectrum .needle { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: var(--ink); border-radius: 2px; }
.ends { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 1.1rem; }
.ends span:last-child { text-align: right; }
input[type=range] { width: 100%; height: 48px; accent-color: var(--ink); margin: 0; }

/* forehead: two halves you can hit blind */
.halves { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s4); }
.halves button { min-height: 140px; border-radius: var(--r-lg); font-size: 1.3rem; font-weight: 700; color: #fff; }
.halves .no { background: var(--red); }
.halves .yes { background: var(--green); }
.halves button:active { opacity: .8; }
.forehead .big { font-size: 2.8rem; }

/* explosion */
.boom { text-align: center; font-size: 6rem; margin-top: 24px; animation: shake .4s 3; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-10px) rotate(-6deg); } 75% { transform: translateX(10px) rotate(6deg); } }
.pulse { animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }

/* dice */
.dice { display: flex; gap: 12px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.die { width: 84px; height: 84px; border-radius: 18px; background: var(--sel); color: var(--sel-ink); display: grid; place-items: center; font-size: 2.6rem; font-weight: 800; }

/* rules sheet */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--bg); border-radius: 18px 18px 0 0;
  max-height: 86vh; overflow-y: auto; padding: 8px var(--gutter) calc(env(safe-area-inset-bottom) + 20px);
}
.sheet > div { max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 8px; }
.sheet ol, .sheet ul { padding-left: 22px; margin: 8px 0; }
.sheet li { margin: 8px 0; }

/* Judgement: bid / trick entry */
.deal { min-height: 44px; min-width: 64px; font-size: .85rem; color: var(--faint); border-radius: var(--r-sm); }
.deal.on, .deal.on:active { background: var(--yellow-bg); color: var(--yellow); font-weight: 600; }
.entry .p { padding: 14px 0; border-bottom: 1px solid var(--line); scroll-margin: 70px 0 170px; }
.entry .p:first-child { border-top: 1px solid var(--line); }
.entry .name { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 26px; }
.entry .name b { font-weight: 600; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry .meta { margin-left: auto; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.p.next { background: linear-gradient(90deg, var(--chip), transparent 70%); margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); }
.p.next .name b::after { content: "  ← bids now"; color: var(--blue); font-weight: 500; font-size: .85rem; }
.p.made .meta { color: var(--green); }
.p.missed .meta { color: var(--red); }
td .bw { display: block; color: var(--faint); font-size: .72rem; line-height: 1; margin-top: 2px; }
td .pts { display: block; line-height: 1.1; }
td.made .pts { color: var(--green); font-weight: 700; }
td.miss .pts { color: var(--faint); }

/* rooms */
.room { display: flex; gap: 16px; align-items: center; padding: 14px; background: var(--chip); border-radius: var(--r); margin-top: 12px; }
.room .qr { width: 132px; height: 132px; flex-shrink: 0; background: #fff; border-radius: var(--r-sm); padding: 4px; }
.room .qr svg { width: 100%; height: 100%; display: block; }
.room .lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.room .code { font-size: 2.6rem; font-weight: 800; letter-spacing: .12em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.secret .sub b { font-weight: 700; }
