/* Coup: palette from the Board & Card Games hub so it reads as a sibling. */
:root {
  --bg: #0f1117;
  --bg-soft: #161923;
  --card: #1a1e2b;
  --card-hover: #212636;
  --line: #2a3042;
  --text: #e8eaf0;
  --muted: #969db4;
  --accent: #6ea8fe;
  --warm: #f0b354;
  --good: #6ee7a8;
  --bad: #f08c8c;
  --felt: #141a2a;
  --radius: 12px;
  --tabh: 58px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow: hidden; overflow-x: clip; touch-action: manipulation;
}
button { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ shell */
.app { height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; min-height: 0; position: relative; }
.tab { position: absolute; inset: 0; display: none; flex-direction: column; padding: 10px 12px 8px; overflow: hidden; }
.tab.active { display: flex; }
.tab.scroll { overflow-y: auto; }
nav.tabs {
  height: calc(var(--tabh) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: var(--bg-soft); border-top: 1px solid var(--line); flex: none;
}
nav.tabs button {
  flex: 1; background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer;
}
nav.tabs button svg { width: 22px; height: 22px; }
nav.tabs button.on { color: var(--accent); }
nav.tabs .brand { display: none; }

@media (min-width: 900px) {
  .app { flex-direction: row-reverse; }
  nav.tabs { flex-direction: column; width: 200px; height: 100dvh; border-top: 0; border-left: 0; border-right: 1px solid var(--line); padding: 18px 10px; justify-content: flex-start; gap: 4px; }
  nav.tabs button { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 14px; border-radius: 10px; font-size: 15px; }
  nav.tabs button.on { background: rgba(110,168,254,.12); }
  nav.tabs .brand { display: flex; align-items: center; gap: 10px; padding: 4px 12px 18px; font-weight: 800; font-size: 20px; letter-spacing: .02em; }
  nav.tabs .brand img { width: 30px; height: 30px; border-radius: 7px; }
  .tab { padding: 18px 22px; }
}

/* ---------------------------------------------------------------- basics */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 16px; min-height: 44px; cursor: pointer; font-weight: 650;
  transition: background .12s, border-color .12s, transform .08s, opacity .2s;
}
@media (hover: hover) { .btn:not(.primary):not(.warm):not(.danger):hover:not(:disabled) { background: var(--card-hover); border-color: #3a4258; } }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .38; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0d1424; }
.btn.warm { background: var(--warm); border-color: var(--warm); color: #231703; }
.btn.danger { background: rgba(240,140,140,.14); border-color: var(--bad); color: #ffc9c9; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: 6px 11px; font-size: 13.5px; border-radius: 8px; }
.btn.hinted { outline: 2px solid var(--warm); outline-offset: 2px; }
.q { display: inline-flex; width: 19px; height: 19px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted);
  font-size: 12px; font-weight: 700; align-items: center; justify-content: center; cursor: pointer; background: var(--bg-soft); vertical-align: 2px; margin-left: 4px; padding: 0; }
.label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.muted { color: var(--muted); }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; min-height: 44px;
  cursor: pointer; font-size: 14px; font-weight: 650; line-height: 1.2; transition: background .12s, border-color .12s; }
.seg button small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); margin-top: 2px; }
.seg button.on { background: rgba(110,168,254,.14); border-color: var(--accent); color: var(--accent); }
.seg button.on small { color: #9dc3ff; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #2b3246; border-radius: 15px; transition: background .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
input[type=text] { background: var(--bg-soft); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; width: 100%; }

/* ------------------------------------------------------------- cards */
.cardf { width: 64px; height: 90px; border-radius: 8px; flex: none; position: relative; perspective: 600px; }
.cardf .in { position: absolute; inset: 0; transition: transform .45s cubic-bezier(.3,.7,.3,1); transform-style: preserve-3d; }
.cardf .face, .cardf .back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.cardf .face svg, .cardf .back svg { width: 100%; height: 100%; display: block; }
.cardf .face { transform: rotateY(180deg); }
.cardf.up .in { transform: rotateY(180deg); }
.cardf.dead { opacity: .45; filter: grayscale(.6); }
.cardf.dead::after { content: ""; position: absolute; inset: 0; border-radius: 8px; background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(0,0,0,.35) 7px 9px); pointer-events: none; }
.cardf.pickable { cursor: pointer; }
.cardf.pickable .in { animation: bob 1.4s ease-in-out infinite; }
.cardf.pickable:hover .in { transform: rotateY(180deg) translateY(-4px); }
.cardf.chosen { outline: 3px solid var(--warm); outline-offset: 2px; }
.cardf.sm { width: 34px; height: 48px; border-radius: 5px; }
.cardf.sm .face, .cardf.sm .back { border-radius: 5px; }
.cardf.lg { width: 92px; height: 129px; }
@keyframes bob { 0%,100% { transform: rotateY(180deg) translateY(0); } 50% { transform: rotateY(180deg) translateY(-4px); } }
.fallback-card { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: #fff; }

.coin { display: inline-flex; align-items: center; gap: 4px; font-weight: 750; font-variant-numeric: tabular-nums; }
.coin:not(.pile) i { width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe08a, #e0a43a 60%, #a8741d); box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.18); display: inline-block; }

/* ------------------------------------------------------------- play: setup */
.hero { text-align: center; padding: 6px 0 10px; }
.hero img { width: 64px; height: 64px; border-radius: 14px; box-shadow: var(--shadow); }
.hero h1 { margin: 6px 0 0; font-size: 30px; letter-spacing: .02em; }
.hero p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.panel h2 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; justify-content: space-between; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.fan { display: flex; justify-content: center; gap: 6px; margin: 4px 0 8px; height: 100px; }   /* 90px cards plus their 8px tilt */
.fan .cardf { transition: transform .4s; }
.fan .cardf:nth-child(1) { transform: rotate(-12deg) translateY(8px); }
.fan .cardf:nth-child(2) { transform: rotate(-6deg) translateY(2px); }
.fan .cardf:nth-child(4) { transform: rotate(6deg) translateY(2px); }
.fan .cardf:nth-child(5) { transform: rotate(12deg) translateY(8px); }
.setup-wrap { max-width: 520px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.record { display: flex; gap: 14px; justify-content: center; font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ------------------------------------------------------------- play: table */
.game { display: grid; grid-template-rows: auto minmax(40px, 1fr) auto auto auto; gap: 8px; flex: 1; min-height: 0; }
.opps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(112px, 100%), 1fr)); gap: 6px; position: relative; }
.opp { background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 6px 7px 5px; position: relative; min-width: 0;
  transition: border-color .2s, box-shadow .2s, opacity .3s, transform .15s; }
.opp.turn { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(110,168,254,.18); }
.opp.out { opacity: .4; }
.opp.targetable { cursor: pointer; border-color: var(--warm); animation: pulse 1.2s ease-in-out infinite; }
.opp.targetable:active { transform: scale(.97); }
.opp.targeted { border-color: var(--bad); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(240,179,84,.0); } 50% { box-shadow: 0 0 0 3px rgba(240,179,84,.35); } }
.opp .top { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; }
.opp .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opp .mid { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: 4px; }
.opp .cards { display: flex; gap: 3px; }
.playwrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.bars { display: flex; gap: 2px; align-items: flex-end; height: 34px; flex: 1; justify-content: flex-end; min-width: 0; }
.bars .b { flex: 1; max-width: 7px; min-width: 3px; background: #232a3c; border-radius: 2px; position: relative; height: 100%; overflow: hidden; }
.bars .b i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 2px; transition: height .5s ease; }
.say { position: absolute; left: 50%; top: -6px; transform: translate(-50%, -100%); background: var(--text); color: #11141c; font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 8px; white-space: nowrap; z-index: 3; animation: pop .25s ease-out; pointer-events: none; }
.say::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--text); }
.opp:first-child .say, .opps .opp:nth-child(-n+3) .say { top: auto; bottom: -6px; transform: translate(-50%, 100%); }
.opps .opp:nth-child(-n+3) .say::after { bottom: auto; top: -5px; border: 5px solid transparent; border-top: 0; border-bottom-color: var(--text); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -80%) scale(.9); } }

.log { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 11px; padding: 6px 10px; overflow-y: auto; min-height: 0; font-size: 13px; color: var(--muted); }
.log div { padding: 1.5px 0; }
.log div.me { color: var(--text); }
.log div.big { color: var(--warm); font-weight: 600; }

.stage { background: linear-gradient(180deg, #1c2233, #171b28); border: 1px solid var(--line); border-radius: 13px; padding: 10px 12px; min-height: 118px;
  display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.stage .what { display: flex; align-items: center; gap: 12px; }
.stage .what .txt { flex: 1; min-width: 0; }
.stage .t1 { font-weight: 750; font-size: 15.5px; }
.stage .t2 { color: var(--muted); font-size: 13px; }
.stage .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.stage .acts .btn { flex: 1; min-width: 0; }
.stage .why { font-size: 12.5px; color: var(--warm); }
.pct { text-align: center; flex: none; min-width: 66px; }
.pct b { display: block; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.pct small { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }

.me-row { display: flex; align-items: center; gap: 10px; }
.me-row .cards { display: flex; gap: 6px; }
.me-row .side { flex: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.me-row .coin { font-size: 22px; }
.me-row .coin:not(.pile) i { width: 22px; height: 22px; }

.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.act { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 5px 3px; min-height: 46px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; transition: background .12s, transform .08s, opacity .2s, border-color .12s; }
.act b { font-size: 13px; }
.act small { font-size: 10.5px; color: var(--muted); }
.act small.bluff { color: var(--warm); }
.act:active:not(:disabled) { transform: scale(.96); }
.act:disabled { opacity: .3; cursor: default; }
.act.sel { border-color: var(--warm); background: rgba(240,179,84,.12); }
.act.hinted { outline: 2px solid var(--warm); outline-offset: 1px; }

.side-col { display: none; }
@media (min-width: 900px) {
  .playwrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; flex: 1; min-height: 0; }
  .side-col { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
  .game { grid-template-rows: auto minmax(150px, 1fr) auto auto; gap: 14px; }
  .game > .log { display: none; }
  .game .stage { background: radial-gradient(ellipse at 50% 40%, #1f2a44, #151a28 70%); align-items: center; text-align: center; border-radius: 18px; }
  .game .stage .what { justify-content: center; max-width: 640px; width: 100%; }
  .game .stage .what .txt { flex: none; }
  .game .stage .acts { max-width: 520px; width: 100%; }
  .game .stage .t1 { font-size: 22px; }
  .game .stage .t2 { font-size: 15px; }
  .me-row .cardf { width: 104px; height: 146px; }
  .side-col .log { flex: 1; }
  .opps { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .opp { padding: 10px 12px 8px; }
  .opp .top { font-size: 15px; }
  .opp .cardf.sm { width: 52px; height: 73px; }
  .bars { height: 46px; }
  .bars .b { width: 9px; }
  .cardf { width: 84px; height: 118px; }
  .fan { height: 130px; }               /* the bigger laptop cards plus their tilt */
  .stage { min-height: 140px; padding: 14px 16px; }
  .stage .t1 { font-size: 18px; }
  .pct b { font-size: 34px; }
  .act { min-height: 56px; }
  .act b { font-size: 14.5px; }
}
@media (min-width: 900px) and (max-height: 760px) {
  .me-row .cardf { width: 80px; height: 112px; }
}
.oddsT { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.oddsT th, .oddsT td { padding: 5px 4px; text-align: center; border-bottom: 1px solid var(--line); }
.oddsT th:first-child, .oddsT td:first-child { text-align: left; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oddsT th { font-size: 11px; color: var(--muted); font-weight: 700; }
.chip { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 3px; }

/* -------------------------------------------------------------- sheets */
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 0 0; width: 100%; max-width: 560px; max-height: 88dvh; display: flex; flex-direction: column;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); animation: up .25s cubic-bezier(.3,.7,.3,1); }
.sheet h3 { margin: 0 0 6px; font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
.sheet .body { overflow-y: auto; min-height: 0; flex: 1; }
.sheet .foot { display: flex; gap: 8px; margin-top: 10px; }
.sheet .foot .btn { flex: 1; }
@media (min-width: 900px) { .sheet-back { align-items: center; } .sheet { border-radius: 16px; max-width: 480px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.choose { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 8px 0; }

/* -------------------------------------------------------------- review */
.rv { display: flex; gap: 8px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rv .tag { flex: none; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 6px; margin-top: 1px; }
.tag.ok { background: rgba(110,231,168,.15); color: var(--good); }
.tag.no { background: rgba(240,140,140,.15); color: var(--bad); }
.tag.meh { background: rgba(240,179,84,.15); color: var(--warm); }
.sumrow { display: flex; gap: 8px; margin: 4px 0 8px; }
.sumrow > div { flex: 1; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 7px; text-align: center; }
.sumrow b { display: block; font-size: 20px; }
.sumrow small { color: var(--muted); font-size: 11px; }
.hands-reveal { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 6px 0 4px; }
.hands-reveal > div { display: flex; align-items: center; gap: 4px; font-size: 12.5px; }

/* -------------------------------------------------------------- table tab */
.tbl { display: grid; grid-template-rows: auto auto minmax(40px, 1fr) auto; gap: 8px; flex: 1; min-height: 0; }
.tplayers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 6px; }
.tp { background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 6px 8px; display: flex; gap: 8px; align-items: center; min-width: 0; }
.tp.turn { border-color: var(--accent); }
.tp.out { opacity: .4; }
.tp .info { flex: 1; min-width: 0; }
.tp .nm { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp .sub { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.ask { background: linear-gradient(180deg, #1c2233, #171b28); border: 1px solid var(--line); border-radius: 13px; padding: 10px 12px; }
.ask .opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ask .opts .btn { flex: 1 1 auto; }
.namegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (min-width: 900px) {
  .tblwrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; flex: 1; min-height: 0; }
  .tbl > .log { display: none; }
}

/* -------------------------------------------------------------- learn */
.learn { max-width: 860px; width: 100%; margin: 0 auto; }
.learn h2 { font-size: 17px; margin: 18px 0 8px; }
.learn h2:first-child { margin-top: 4px; }
.learn table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.learn td, .learn th { padding: 6px 5px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.learn th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.learn p { color: var(--muted); margin: 6px 0; font-size: 14px; }
.cardrow { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; }
.cardrow .cardf { width: 86px; height: 120px; }
.calc { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; font-size: 14px; }
.calc input[type=range] { width: 100%; accent-color: var(--accent); }
.bigpct { font-size: 34px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.barrow { display: grid; grid-template-columns: 120px 1fr 48px; gap: 8px; align-items: center; font-size: 13px; padding: 2px 0; }
.barrow .track { height: 10px; background: #232a3c; border-radius: 5px; overflow: hidden; }
.barrow .track i { display: block; height: 100%; border-radius: 5px; }

/* -------------------------------------------------------------- settings */
.set { max-width: 560px; width: 100%; margin: 0 auto; }
.setrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.setrow .k { font-weight: 600; }
.setrow .k small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.setrow .seg { min-width: 200px; }
.build { color: var(--muted); font-size: 12px; text-align: center; margin: 14px 0 4px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabh) + 14px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: #11141c;
  padding: 8px 14px; border-radius: 10px; font-weight: 650; font-size: 14px; z-index: 60; animation: pop2 .25s; max-width: 90vw; }
@keyframes pop2 { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* ---------- online ---------- */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field span { font-size: 13px; color: var(--muted); }
.lobby .code { font-size: 44px; font-weight: 800; letter-spacing: 10px; text-align: center; color: var(--warm); padding: 6px 0 4px; font-variant-numeric: tabular-nums; user-select: all; }
.seatrow { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--line); }
.seatrow:last-of-type { border-bottom: 0; }
.seatrow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seatrow .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.seatrow .dot.human { background: var(--good); }
.seatrow .dot.computer { background: var(--accent); }
.seatrow .dot.off { background: var(--bad); }
.opp .away { color: var(--bad); font-weight: 600; font-size: 11px; }

/* table: 5-6 players fit on a phone */
.tbl { overflow-y: auto; }
@media (max-width: 899px) {
  .tplayers.many { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .tplayers.many .tp { flex-wrap: wrap; padding: 5px 6px; gap: 3px 5px; }
  .tplayers.many .tp .cardf.sm { width: 26px; height: 37px; }
  .tplayers.many .tp .info { flex-basis: 100%; order: 3; }
  .tplayers.many .tp .bars { height: 30px; }
  .tbl .ask .opts .btn { min-height: 38px; padding: 6px 10px; }
}

/* ============================================================ design pass (2026-10-20)
   Polish only: hierarchy, legibility, turn feedback, tap targets. No structure changes. */

/* bigger, readable tap targets */
.btn.small { min-height: 40px; }
.q { width: 22px; height: 22px; position: relative; }
.q::after { content: ""; position: absolute; inset: -10px; }      /* 42px hit area, same look */

/* setup screens sit in the middle of the space instead of hugging the top */
#tab-play .setup-wrap::before, #tab-play .setup-wrap::after { content: ""; flex: 1 1 0; min-height: 0; }

/* Play: the stage (what's happening / what you must do) gets the space, the log gets less */
.game { grid-template-rows: auto minmax(44px, 1fr) minmax(min-content, 1.6fr) auto auto; }
.stage { background: radial-gradient(ellipse at 50% 35%, #1f2942, #161b29 75%); transition: border-color .25s, box-shadow .25s; }
.stage .t1 { font-size: 18px; line-height: 1.25; }
.stage .t2 { font-size: 14px; }
.stage .why { font-size: 13.5px; }
/* it's on you: the stage lights up (your action, a claim to answer, a card to give up) */
.game:has(.act:not(:disabled)) .stage,
.game:has(.me-row .pickable) .stage,
.stage:has([data-ch], [data-blk], [data-exam], [data-openx], [data-cancel]) {
  border-color: rgba(110,168,254,.7); box-shadow: 0 0 0 1px rgba(110,168,254,.35), 0 0 22px rgba(110,168,254,.14);
}
/* game over: the result is the headline; the dead action grid steps back (kept in place so nothing jumps) */
.stage:has([data-review]) .t1 { font-size: 26px; color: var(--warm); }
.game:has([data-review]) .actions { visibility: hidden; }

/* your hand: bigger cards when there's room (up to 3 opponents) */
.me-row .cards { gap: 8px; }
.game:not(:has(.opp:nth-child(4))) .me-row .cardf { width: 78px; height: 109px; }
.me-row .side .row { gap: 8px; }

/* action buttons: equal rows, readable labels */
.actions { grid-auto-rows: 1fr; }
.act { min-height: 50px; }
.act b { font-size: 14px; }
.act small { font-size: 11.5px; }
.act:not(:disabled) { border-color: #333b52; }

/* the tiny card subtitle is unreadable on small cards: the name says it */
.me-row .cardf .sub, .fan .cardf .sub, .opp .cardf .sub, .tp .cardf .sub { display: none; }

/* review sheet */
.sumrow small { display: block; line-height: 1.25; font-size: 11.5px; }
.sumrow b { font-size: 22px; }

/* learn: card name never splits from its colour chip */
.learn td:first-child { white-space: nowrap; }

/* settings: the label keeps the room, the choice sizes to its words */
@media (max-width: 520px) {
  .setrow .seg { min-width: 0; flex: none; }
  .setrow .seg button { flex: none; padding: 8px 11px; }
}

/* table setup fits a phone without scrolling */
@media (max-width: 899px) {
  #tab-table .setup-wrap .panel { padding: 9px 12px; margin-bottom: 6px; }
  #tab-table .setup-wrap .panel h2 { margin-bottom: 6px; }
  #tab-table .setup-wrap .seg button { min-height: 40px; }
  #tab-table .namegrid input[type=text] { padding: 8px 12px; }
}

@media (min-width: 900px) {
  .game { grid-template-rows: auto minmax(150px, 1fr) auto auto; }
  .stage .t1, .game .stage .t1 { font-size: 24px; }
  .game .stage .t2 { font-size: 16px; }
  .stage:has([data-review]) .t1, .game .stage:has([data-review]) .t1 { font-size: 34px; }
  .game:not(:has(.opp:nth-child(4))) .me-row .cardf, .me-row .cardf { width: 104px; height: 146px; }
  .act b { font-size: 15px; }
  .act small { font-size: 12px; }
  /* setup uses the laptop: wider column, bigger fan */
  #tab-play .setup-wrap { max-width: 600px; }
  #tab-play .fan { height: 176px; gap: 10px; margin-bottom: 14px; }
  #tab-play .fan .cardf { width: 112px; height: 157px; }
  #tab-play .hero h1 { font-size: 40px; }
  #tab-play .hero p { font-size: 16px; }
  #tab-play .seg button { min-height: 50px; font-size: 15px; }
  #tab-play .seg button small { font-size: 12px; }
  #tab-play .record { font-size: 14px; margin-top: 8px; }
  #tab-table .setup-wrap { max-width: 600px; }
}
@media (min-width: 900px) and (max-height: 760px) {
  .game:not(:has(.opp:nth-child(4))) .me-row .cardf, .me-row .cardf { width: 80px; height: 112px; }
  #tab-play .fan { height: 150px; }
  #tab-play .fan .cardf { width: 96px; height: 134px; }
}

/* ---------- Sound & effects rows (shared fx.js) match the other Settings rows ---------- */
.fx-set .fx-row { justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 0; border-bottom: 1px solid var(--line); min-height: 0; }
.fx-set .fx-lab { font-weight: 600; }
.fx-set .fx-row.dim { opacity: .45; }
.fx-set .fx-why { font-size: 12.5px; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--line); }
.fx-set .fx-vol { flex: 0 1 170px; accent-color: var(--accent); }
.fx-set .fx-test { min-height: 40px; padding: 6px 11px; font-size: 13.5px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.fx-set .seg { min-width: 0; flex: none; }
.fx-set .seg button { flex: none; padding: 8px 11px; }
.fx-set .seg button[aria-pressed="true"] { background: rgba(110,168,254,.14); border-color: var(--accent); color: var(--accent); }.fx-set .switch { width: 50px; height: 30px; }
.fx-set .switch input { opacity: 0; width: 0; height: 0; inset: auto; }
.fx-set .switch span { background: #2b3246; border-radius: 15px; transition: background .2s; cursor: pointer; }
.fx-set .switch span::after { width: 24px; height: 24px; transition: transform .2s; }
.fx-set .switch input:checked + span { background: var(--accent); }
.fx-set .switch input:checked + span::after { transform: translateX(20px); }

/* ============================================================ table look (2026-10-20)
   The Play tab is a real Coup table seen from your seat (shared game-table kit: css/table.css + js/tablekit.js).
   Far side: each opponent's name plate, their 2 cards lying on the table, their coins. Middle: the Court deck
   and the Treasury heap, with what is happening. Near side: your 2 cards, your coins, your reference card
   (its printed actions are the action buttons). Odds stay on the seats (bars) and in the laptop side panel. */
#tab-play { padding: 0; }
#tab-play .felt { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px 12px 8px; }
#tab-play .felt .muted, #tab-play .record, #tab-play .hero p { color: rgba(246, 239, 220, .72); }
#tab-play .panel { background: rgba(18, 21, 30, .9); border-color: rgba(0, 0, 0, .45); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }

/* cards are printed card stock: a soft shadow on the table and a light sheen */
#tab-play .cardf .face, #tab-play .cardf .back { box-shadow: 0 1px 1px rgba(0, 0, 0, .4), 0 3px 8px rgba(0, 0, 0, .45); }
#tab-play .cardf .face::after, #tab-play .cardf .back::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .2), transparent 38%, transparent 70%, rgba(0, 0, 0, .1));
}
/* a lost card is turned face up and pushed aside: darker, no stripes */
#tab-play .opp .cardf.dead, #tab-play .me-row .cardf.dead { opacity: 1; filter: brightness(.78) saturate(.75); }
#tab-play .opp .cardf.dead::after, #tab-play .me-row .cardf.dead::after { display: none; }

/* coins: real metal coins in short stacks, the count beside them */
.coin.pile { --coin-size: 15px; display: inline-flex; align-items: flex-end; gap: 4px; flex: none; }
.coin.pile .heap { position: relative; display: inline-block; flex: none; width: calc(var(--coin-size) * (1 + .62 * (var(--st) - 1))); height: calc(var(--coin-size) * .72 + 18px); }
.coin.pile .heap.none { width: 0; }
.coin.pile .heap.none + b { opacity: .45; }
.coin.pile .tbl-coin { position: absolute; left: calc(var(--j) * var(--coin-size) * .62); bottom: calc(var(--k) * 4px); height: calc(var(--coin-size) * .72);
  box-shadow: inset 0 -1px 1px rgba(0, 0, 0, .3), 0 2px 0 var(--metal-d), 0 3px 3px rgba(0, 0, 0, .45); }
.coin.pile b { font-size: 13px; font-weight: 800; color: #f6efdc; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); line-height: 1; }

/* opponents: seats round the far side, no boxes */
#tab-play .opp { background: none; border: 0; border-radius: 14px; padding: 2px 2px 4px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
#tab-play .opp.turn { box-shadow: none; }
#tab-play .opp.out { opacity: .5; }
#tab-play .opp .top { justify-content: center; align-items: flex-end; gap: 6px; max-width: 100%; min-width: 0; }
#tab-play .opp .nm { min-width: 0; }
/* phone: the log is two faint lines; the middle of the table gets the room */
#tab-play .game { grid-template-rows: auto auto minmax(min-content, 1fr) auto auto; }
.game > .tlog { max-height: 38px; }
#tab-play .opp .nm {
  max-width: 100%; padding: 1px 8px; border-radius: 4px; font-size: 12.5px; line-height: 18px; color: #f6efdc; letter-spacing: .02em;
  background: linear-gradient(#3b2a1a, #24180d); border: 1px solid #7a5a2e; box-shadow: inset 0 1px 0 rgba(255, 220, 150, .25), 0 2px 4px rgba(0, 0, 0, .4);
}
#tab-play .opp.turn .nm { border-color: #f0c35a; box-shadow: 0 0 0 2px rgba(240, 195, 90, .5), 0 2px 4px rgba(0, 0, 0, .4); }
#tab-play .opp.targeted .nm { border-color: var(--bad); }
#tab-play .opp.targetable { background: rgba(240, 179, 84, .1); }
#tab-play .opp .mid { justify-content: center; align-items: flex-end; margin-top: 0; gap: 6px; max-width: 100%; }
#tab-play .opp .cards { gap: 2px; padding: 2px; }
#tab-play .bars { flex: 0 1 34px; height: 30px; }
#tab-play .bars .b { background: rgba(0, 0, 0, .32); }

/* the log: a faint line on the table; tap it for the whole game */
.game > .tlog { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 0 4px; cursor: pointer;
  color: rgba(246, 239, 220, .55); font-size: 12.5px; line-height: 19px; overflow: hidden; }
.game > .tlog div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game > .tlog div + div { opacity: .5; }
.game > .tlog div.me { color: rgba(246, 239, 220, .9); }
.game > .tlog div.big { color: var(--warm); }
.log.full { background: none; border: 0; padding: 0; overflow: visible; }

/* the middle of the table: Court deck, what is happening, Treasury */
#tab-play .stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; background: none; border: 0; border-radius: 22px; padding: 6px 2px; min-height: 104px; }
#tab-play .game:has(.act:not(:disabled)) .stage, #tab-play .game:has(.me-row .pickable) .stage,
#tab-play .stage:has([data-ch], [data-blk], [data-exam], [data-openx], [data-cancel]) {
  border-color: transparent; box-shadow: none; background: radial-gradient(ellipse 60% 65% at 50% 50%, rgba(255, 232, 170, .14), transparent 75%);
}
.stage .prompt { display: flex; flex-direction: column; gap: 8px; justify-content: center; min-width: 0; }
#tab-play .stage .t1 { color: #f6efdc; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
#tab-play .stage .t2 { color: rgba(246, 239, 220, .75); }
#tab-play .stage:has([data-review]) .t1 { color: var(--warm); }
.court { display: flex; align-items: center; justify-content: center; padding: 10px 6px 0 0; }
.court-deck { --card-w: 38px; }
.court-deck .tbl-badge { right: -9px; bottom: -7px; font-size: 10.5px; }
.coup-back { padding: 0; overflow: hidden; background: #141a30; border: 0; }
.coup-back svg { display: block; width: 100%; height: 100%; }
.coup-ghost { --card-w: 38px; border-radius: 4px; box-shadow: 0 6px 14px rgba(0, 0, 0, .45); }
.treasury { --coin-size: 19px; position: relative; width: 58px; height: 52px; flex: none; }
.treasury .tbl-coin { position: absolute; margin: calc(var(--coin-size) / -2) 0 0 calc(var(--coin-size) / -2); }

/* near side: your cards lying in front of you, your coins */
#tab-play .me-row { padding: 2px 4px 0; }
#tab-play .me-row .cards { gap: 4px; }
#tab-play .me-row .coin.pile { --coin-size: 24px; align-self: center; margin-left: 4px; }
#tab-play .me-row .coin.pile b { font-size: 22px; }

/* your reference card: the printed list of actions (tap one to take it) */
.actions.refcard {
  gap: 0; padding: 5px; border-radius: 10px; color: #2a1d10;
  background: radial-gradient(ellipse at 30% 20%, #fbf5e6, #ece0c3 75%); border: 1px solid rgba(60, 40, 20, .45);
  box-shadow: inset 0 0 0 3px #fbf5e6, inset 0 0 0 4px rgba(120, 80, 30, .35), 0 1px 1px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .45);
  transition: box-shadow .25s ease, translate .25s ease;
}
.refcard .act { background: none; border: 0; border-radius: 6px; color: #2a1d10; box-shadow: inset -1px 0 0 rgba(90, 60, 25, .2), inset 0 -1px 0 rgba(90, 60, 25, .2); }
.refcard .act:nth-child(4n) { box-shadow: inset 0 -1px 0 rgba(90, 60, 25, .2); }
.refcard .act:nth-child(n+5) { box-shadow: inset -1px 0 0 rgba(90, 60, 25, .2); }
.refcard .act:nth-child(n+5):last-child { box-shadow: none; }
.refcard .act b { color: #2a1d10; }
.refcard .act small { color: #6d5a40; }
.refcard .act small.bluff { color: #b35f0c; font-weight: 700; }
.refcard .act:disabled { opacity: .38; }
@media (hover: hover) { .refcard .act:not(:disabled):hover { background: rgba(90, 60, 25, .1); } }
.refcard .act.sel { background: rgba(240, 179, 84, .45); }
.refcard .act.hinted { outline: 2px solid #c07a12; outline-offset: -2px; }
.game:has(.refcard .act:not(:disabled)) .refcard { translate: 0 -2px; box-shadow: inset 0 0 0 3px #fbf5e6, inset 0 0 0 4px rgba(120, 80, 30, .35), 0 2px 3px rgba(0, 0, 0, .35), 0 12px 24px rgba(0, 0, 0, .5); }

#tab-play .hero h1 { text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }

/* short or narrow phones (iPhone SE): smaller cards so the whole table still fits */
@media (max-width: 899px) and (max-height: 620px) {
  #tab-play .game .me-row .cardf { width: 60px; height: 84px; }
  #tab-play .stage { min-height: 0; }
  #tab-play .game { gap: 6px; }
}
@media (max-width: 360px) {
  #tab-play .opps { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 2px 4px; }
  #tab-play .opp .cardf.sm { width: 30px; height: 42px; }
  #tab-play .bars { flex-basis: 22px; gap: 1px; height: 26px; }
  #tab-play .opp .nm { padding: 0 6px; font-size: 12px; }
  .refcard .act b { font-size: 13px; }
  .refcard .act small { font-size: 10.5px; }
  .court-deck { --card-w: 32px; }
  .treasury { --coin-size: 16px; width: 46px; }
}
@media (max-width: 360px) and (max-height: 620px) {
  #tab-play .opps:has(.opp:nth-child(4)) ~ .tlog { display: none; }
  #tab-play .opps:has(.opp:nth-child(4)) .opp .cardf.sm { width: 26px; height: 36px; }
}

/* phone on its side: your cards and your reference card share the near edge */
@media (max-width: 899px) and (max-height: 500px) and (orientation: landscape) {
  #tab-play .felt { padding: 6px 12px 6px; }
  #tab-play .game { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 6px 12px;
    grid-template-areas: "opps opps" "log stage" "me acts"; }
  #tab-play .opps { grid-area: opps; }
  #tab-play .game > .tlog { grid-area: log; max-height: none; align-self: stretch; }
  #tab-play .stage { grid-area: stage; min-height: 0; padding: 0; }
  #tab-play .me-row { grid-area: me; }
  #tab-play .actions { grid-area: acts; align-self: end; }
  #tab-play .game .me-row .cardf { width: 58px; height: 81px; }
  #tab-play .refcard .act { min-height: 40px; }
  #tab-play .opp .cardf.sm { width: 30px; height: 42px; }
  #tab-play .hero .fan { display: none; }
  #tab-play .hero { padding: 0 0 6px; }
  #tab-play .hero h1 { font-size: 22px; margin: 0; }
  #tab-play .setup-wrap .panel { padding: 8px 12px; margin-bottom: 6px; }
}

@media (min-width: 900px) {
  #tab-play .felt { padding: 16px 22px 18px; }
  #tab-play .game { grid-template-rows: auto minmax(150px, 1fr) auto auto; }
  .game > .tlog { display: none; }
  #tab-play .playwrap > .game { min-width: 0; }
  #tab-play .opps { display: flex; justify-content: space-around; align-items: flex-start; gap: 8px; padding-bottom: 30px; }
  #tab-play .opp { flex: 0 1 180px; min-width: 0; translate: 0 calc(var(--arc, 0) * 30px); padding: 4px 4px 6px; }
  #tab-play .opps:has(.opp:nth-child(4)) .opp .cardf.sm { width: 44px; height: 62px; }
  #tab-play .opps:has(.opp:nth-child(4)) .bars { flex-basis: 30px; }
  #tab-play .opp .nm { font-size: 14px; line-height: 22px; padding: 1px 12px; }
  #tab-play .bars { flex-basis: 46px; height: 46px; }
  .coin.pile { --coin-size: 20px; }
  .coin.pile b { font-size: 15px; }
  #tab-play .me-row .coin.pile { --coin-size: 30px; }
  #tab-play .stage { min-height: 150px; gap: 24px; padding: 6px 24px; }
  .court-deck, .coup-ghost { --card-w: 60px; }
  .treasury { --coin-size: 26px; width: 120px; height: 92px; }
  .actions.refcard { width: 100%; max-width: 640px; justify-self: center; padding: 7px; }
  #tab-play .side-col .panel, #tab-play .side-col .log { background: rgba(18, 21, 30, .92); border-color: rgba(0, 0, 0, .45); }
}

/* ============================================================ visibility pass (2026-10-21)
   Opponents' cards fill the far side of the table (size worked out in fitSeats, js/app.js), never squeezed
   out of shape; the seats never push the table under the laptop side panel; buttons never clipped. */
#tab-play .opps, #tab-play .opp { min-width: 0; }
#tab-play .game .opps.fit .opp .cardf.sm { width: var(--ocw); height: calc(var(--ocw) * 88 / 63); border-radius: calc(var(--ocw) * .1); }
#tab-play .game .opps.fit .opp .cardf.sm .face, #tab-play .game .opps.fit .opp .cardf.sm .back { border-radius: calc(var(--ocw) * .1); }
#tab-play .game .opps.fit .bars { height: calc(var(--ocw) * .9); }
#tab-play .game .opps.rows2 { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 4px 8px; padding-bottom: 0; }
#tab-play .game .opps.rows2 .opp { translate: none; }
#tab-play .opp { cursor: pointer; }
/* a seat up close (tap an opponent) */
.seat-h { display: flex; align-items: center; gap: 12px; }
.seat-cards { padding: 10px 0 14px; gap: 14px; }
.seat-cards .cardf.lg { width: 112px; height: 156px; }
/* odds bars beside the cards stay readable but take less width on a phone */
@media (max-width: 899px) {
  #tab-play .bars { flex-basis: 22px; gap: 1px; }
  #tab-play .bars .b { min-width: 3px; }
  /* phone: Challenge / Block / Allow use the whole width of the table (under the deck and the Treasury),
     so they stay on one line and never spill onto your cards */
  #tab-play .stage .prompt { display: contents; }
  #tab-play .stage .court { grid-column: 1; grid-row: 1; }
  #tab-play .stage .what { grid-column: 2; grid-row: 1; }
  #tab-play .stage .treasury { grid-column: 3; grid-row: 1; }
  #tab-play .stage .acts { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; gap: 6px; }
  #tab-play .stage .acts .btn { flex: 1 1 auto; padding: 8px 10px; white-space: nowrap; font-size: 14.5px; }
  #tab-play .stage { row-gap: 8px; }
  /* the Hint's reason shows in the log strip just above, so the table doesn't grow when you ask */
  #tab-play .stage .why { display: none; }
  .game > .tlog div.why { white-space: normal; color: var(--warm); opacity: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .game > .tlog div.why ~ div { display: none; }  /* the hint takes the strip; the move is in the middle already */
  /* tight: the reference card goes compact while a question needs the room (it can't be used then) */
  #tab-play .game.tight { gap: 4px; }
  #tab-play .game.tight .refcard .act { min-height: 30px; padding: 0 2px; }
  #tab-play .game.tight .actions.refcard { padding: 3px; }
  /* the log strip holds exactly two whole lines */
  .game > .tlog div { padding: 0; }
  #tab-play .game.tight:not(:has(.refcard .act:not(:disabled))) .refcard .act small { display: none; }
  #tab-play .game.tight .stage .acts .btn { min-height: 40px; }
}
@media (max-width: 360px) and (max-height: 620px) {
  #tab-play .opps:has(.opp:nth-child(4)) ~ .tlog:has(.why) { display: block; }
}
/* phone upright: the table is one column exactly the screen's width (at 320px its content used to push
   13px past the right gutter) */
@media (max-width: 899px) and (orientation: portrait) {
  #tab-play .game { grid-template-columns: minmax(0, 1fr); }
  #tab-play .game > * { min-width: 0; }
}
/* iPhone SE upright: Hint and Quit stack beside your coins so neither runs off the edge, and a big coin
   heap no longer squeezes a short name to "A…" */
@media (max-width: 360px) and (orientation: portrait) {
  #tab-play .me-row .side .row { flex-direction: column; align-items: stretch; gap: 6px; }
  #tab-play .me-row .side .btn.small { min-height: 40px; }
  #tab-play .opp .top { gap: 2px; }
  #tab-play .opp .coin.pile { gap: 2px; }
}
/* laptop: seats share the table width evenly instead of overflowing it */
@media (min-width: 900px) {
  #tab-play .opps:not(.rows2) .opp { flex: 1 1 0; max-width: 220px; }
  #tab-play .game .opps.fit .opp .nm { font-size: 15px; }
}
/* Table tab: the players' cards are bigger (5-6 players on a phone, every count on a laptop) */
@media (max-width: 899px) {
  #tab-table .tplayers.many .tp .cardf.sm { width: 34px; height: 47px; }
}
@media (max-width: 360px) {
  #tab-table .tplayers.many .tp .cardf.sm { width: 30px; height: 42px; }
}
@media (min-width: 900px) {
  #tab-table .tplayers { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
  #tab-table .tplayers.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #tab-table .tp { padding: 8px 12px; gap: 12px; }
  #tab-table .tp .cardf.sm { width: 52px; height: 73px; }
  #tab-table .tp .nm { font-size: 16px; }
  #tab-table .tp .sub { font-size: 14px; }
  #tab-table .tp .bars { height: 52px; }
}
/* phone on its side: Hint and Quit stack so neither hides under the reference card */
@media (max-width: 899px) and (max-height: 500px) and (orientation: landscape) {
  #tab-play .me-row { min-width: 0; }
  #tab-play .me-row .side .row { flex-direction: column; align-items: stretch; gap: 6px; }
  #tab-play .me-row .side .btn.small { min-height: 40px; }
  /* the middle of the table is its own column here: its buttons stay beside the deck */
  #tab-play .stage .prompt { display: flex; }
  #tab-play .stage .acts .btn { white-space: normal; padding: 6px 8px; }
}