:root {
  --bg: #140c0a;
  --paper: #f6efe6;
  --muted: #b5a89c;
  --amber: #ffb703;
  --amber-ink: #1a1008;
  --hot: #ff5a28;
  --line: rgba(246, 239, 230, 0.12);
  --good: #d8f3c5;
  --bad: #ffb4a6;
  --aqua: #7ee0c6;
  --rose: #ff8aa8;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background:
    linear-gradient(165deg, #24110f 0%, var(--bg) 42%, #101614 100%);
  color: var(--paper);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(720px 420px at 110% -8%, rgba(255, 90, 40, 0.28), transparent 60%),
    radial-gradient(560px 360px at -12% 108%, rgba(126, 224, 198, 0.16), transparent 62%),
    radial-gradient(480px 280px at 50% -20%, rgba(255, 138, 168, 0.12), transparent 70%),
    radial-gradient(640px 380px at 0% 40%, rgba(255, 183, 3, 0.1), transparent 64%);
  z-index: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--amber);
  color: var(--amber-ink);
  padding: 8px 12px;
  z-index: 20;
}

.skip:focus { top: 12px; }

.page, .site-foot { position: relative; z-index: 0; }

a { color: var(--amber); }

a:hover { color: #ffd36a; }

h1, h2, p { margin: 0; }

h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.6rem);
  line-height: 0.92;
}

h2 { font-size: 1.3rem; letter-spacing: -0.03em; }

.lead { color: var(--muted); max-width: 38rem; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow a { color: inherit; text-decoration: none; }

.wordmark {
  color: var(--paper);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.15rem;
}

.wordmark span { color: var(--amber); }

.wordmark-hero { font-size: 1rem; letter-spacing: 0.14em; text-transform: uppercase; }

.topbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 8px;
  background: rgba(20, 12, 10, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
  isolation: isolate;
  pointer-events: auto;
  backdrop-filter: blur(14px);
}

.top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-row .balance-pill { margin-left: auto; }

.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.nav::-webkit-scrollbar { display: none; }

.nav a, .text-btn {
  color: var(--paper);
  text-decoration: none;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
  pointer-events: auto;
}

.nav a[aria-current="page"] {
  background: rgba(255, 183, 3, 0.16);
  color: var(--amber);
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--amber-ink);
  text-decoration: none;
  font-family: Unbounded, Manrope, sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
}

.balance-pill:hover { color: var(--amber-ink); }

.page { padding: 8px 18px 48px; }

.hero, .hall, .sheet {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 28px 0 20px;
}

.hall { padding: 28px 0 12px; display: flex; flex-direction: column; gap: 22px; }

.hall.narrow, .sheet { width: min(560px, 100%); }

.sheet { padding: 36px 0 12px; display: flex; flex-direction: column; gap: 16px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn { transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease; }

.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary { background: linear-gradient(180deg, #ffc53d, var(--amber)); color: var(--amber-ink); }

.btn-primary:hover { color: var(--amber-ink); background: #ffc53d; }

.btn-ghost { background: transparent; color: var(--paper); border-color: var(--line); }

.btn-ghost:hover { color: var(--paper); border-color: var(--amber); }

button:disabled { opacity: 0.65; cursor: progress; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  list-style: none;
  margin: 8px 0 0;
  padding: 4px 2px 8px;
  mask-image: linear-gradient(90deg, #000 0 88%, transparent);
}

.chips::-webkit-scrollbar { height: 0; }

.chips li {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 183, 3, 0.4);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 0.92rem;
}

.rooms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.room {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 176px;
  padding: 20px 20px 16px;
  border-radius: 22px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, rgba(246, 239, 230, 0.045), rgba(246, 239, 230, 0.02));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.frame-no {
  color: var(--hot);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stake, .balance-xl {
  font-family: Unbounded, Manrope, sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stake { font-size: clamp(2.4rem, 6vw, 3.3rem); }

.balance-xl { font-size: clamp(2.8rem, 8vw, 4.2rem); }

.meta, .hint, .site-foot { color: var(--muted); }
.pay-url { overflow-wrap: anywhere; }

.state {
  margin-top: auto;
  color: var(--amber);
  font-size: 0.92rem;
  font-weight: 700;
}

.callout, .panel, .notice, .alert {
  border-radius: 20px;
  padding: 16px 18px;
}

.callout, .panel {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: rgba(246, 239, 230, 0.03);
}

.callout p, .panel p { max-width: 40rem; }

.form-panel { flex-direction: column; align-items: stretch; }

.form-panel .stack { width: 100%; }

.periods { display: flex; flex-wrap: wrap; gap: 8px; }

.periods a { color: var(--paper); text-decoration: none; font-weight: 700; }

.periods a[aria-current="page"] { color: var(--amber); }

.people, .ledger { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.people a, .ledger li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
}

.choice { display: flex; flex-wrap: wrap; gap: 14px; }

.notice {
  background: rgba(216, 243, 197, 0.1);
  color: var(--good);
  border: 1px solid rgba(216, 243, 197, 0.24);
}

.alert {
  background: rgba(255, 90, 40, 0.1);
  color: var(--bad);
  border: 1px solid rgba(255, 90, 40, 0.28);
}

.stack { display: flex; flex-direction: column; gap: 8px; }

label { font-weight: 700; }

input[type="text"], input[type="password"], input[type="number"], input[type="search"], input[type="file"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #1c1411;
  color: var(--paper);
  font: inherit;
  font-size: 16px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  min-height: 44px;
}

.check input { width: 18px; height: 18px; accent-color: var(--amber); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
  margin: 0;
}

.facts div {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.facts dt { color: var(--muted); font-size: 0.85rem; }

.facts dd {
  margin: 4px 0 0;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 1.3rem;
}

.status { color: var(--amber); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.82rem; }

.meter {
  width: min(420px, 100%);
  height: 8px;
  border-radius: 999px;
  background: rgba(246, 239, 230, 0.1);
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--hot), var(--amber));
}

.seats {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.seat {
  min-height: 92px;
  border-radius: 18px;
  border: 1px dashed rgba(246, 239, 230, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  color: var(--muted);
}

.seat strong, .shot figcaption { color: var(--paper); font-size: 0.95rem; overflow-wrap: anywhere; }

.seat.in-duel {
  border-style: solid;
  border-color: var(--hot);
  background: rgba(255, 90, 40, 0.08);
}

.seat.mine {
  border-style: solid;
  border-color: var(--amber);
  background: rgba(255, 183, 3, 0.08);
  color: var(--amber);
}

.site-foot {
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto 28px;
  font-size: 0.85rem;
}

.page { animation: rise 0.35s ease; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

::selection { background: var(--amber); color: var(--amber-ink); }

@media (hover: hover) {
  .room { transition: transform 0.16s ease, border-color 0.16s ease; }
  .room:hover { transform: translateY(-2px); border-color: rgba(255, 183, 3, 0.55); }
}

@media (min-width: 700px) {
  .seats { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 860px) {
  .topbar { flex-direction: row; align-items: center; padding: 14px 22px; }
  .top-row { flex: 1; }
  .nav { margin-left: 12px; }
}

@media (max-width: 640px) {
  .actions, .actions .btn, .sheet .btn, .callout .btn { width: 100%; }
  #live > .btn, #live form:not(.hand-dock):not([data-vote]) > .btn { width: 100%; }
  .nav a, .text-btn { min-height: 40px; }
}

.phase-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 90, 40, 0.16);
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.shot {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #1c1411;
}

.shot img, .frame-empty {
  width: 100%;
  height: min(46vw, 220px);
  object-fit: cover;
  display: block;
}

.shot img { animation: reveal 0.45s ease; }

.frame-empty {
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  color: var(--muted);
  background: rgba(246, 239, 230, 0.04);
}

.shot figcaption {
  padding: 10px 12px 12px;
  font-weight: 700;
}

.devbox {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 183, 3, 0.4);
}

.devbox .btn { min-height: 40px; }

@media (min-width: 560px) {
  .shots { grid-template-columns: 1fr 1fr; }
  .shot img, .frame-empty { height: 240px; }
}

.vote-count {
  font-family: Unbounded, Manrope, sans-serif;
  color: var(--aqua);
}

.vote-stage {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: max(28px, env(safe-area-inset-top, 0px)) 12px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(20, 12, 10, 0.52);
  backdrop-filter: blur(12px);
}

.vote-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 7px;
  background: rgba(246, 239, 230, 0.12);
}

.vote-bar span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(1);
  transform-origin: left center;
  background: var(--amber);
}

.vote-stage-copy {
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
}

.vote-fly {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: min(3vw, 18px);
  width: min(94vw, 760px);
  height: min(62dvh, 480px);
}

form.vote-fly {
  margin: 0;
}

.vote-shot {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #1c1411;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: var(--shadow);
}

button.vote-shot {
  cursor: pointer;
  font: inherit;
}

.vote-shot img {
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: cover;
  display: block;
}

.vote-shot span, .vote-shot figcaption {
  padding: 10px 12px 12px;
  text-align: center;
  font-weight: 700;
}

.vote-shot.left { animation: vote-in-left 0.55s ease-out; }
.vote-shot.right { animation: vote-in-right 0.55s ease-out; }

.vote-stage.landed .vote-shot { animation: none; }
.vote-stage.picked .vote-shot, .vote-stage.sending .vote-shot { pointer-events: none; }
.vote-stage.hurry {
  background: rgba(72, 8, 6, 0.62);
}
.vote-stage.hurry .vote-bar span { background: var(--hot); }
.vote-stage.hurry .vote-shot { animation: vote-shake 0.28s ease-in-out infinite; }
.vote-stage.can-pick .vote-shot:hover, .vote-stage.can-pick .vote-shot:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

@keyframes vote-in-left {
  from { opacity: 0; transform: translate(-18vw, 16vh) rotate(-8deg) scale(0.42); }
  to { opacity: 1; transform: none; }
}

@keyframes vote-in-right {
  from { opacity: 0; transform: translate(18vw, 16vh) rotate(8deg) scale(0.42); }
  to { opacity: 1; transform: none; }
}

@keyframes vote-shake {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-4px) rotate(-0.6deg); }
  70% { transform: translateX(4px) rotate(0.6deg); }
}

#live[data-phase="voting"] .phase-label {
  background: rgba(126, 224, 198, 0.16);
  color: var(--aqua);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, 12px, 0); }
}

@keyframes shimmer {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

@keyframes reveal {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: none; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.felt {
  position: relative;
  width: 100%;
  height: min(52dvh, 420px);
  min-height: 240px;
  margin: 4px 0 8px;
}

.felt-oval {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 20%;
  bottom: 20%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(126, 224, 198, 0.18), rgba(18, 52, 40, 0.72) 72%);
  border: 10px solid rgba(92, 48, 24, 0.72);
}

.board {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: min(42%, 260px);
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  gap: 8px;
}

.card-fly {
  width: 48%;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #1c1411;
  border: 1px solid rgba(246, 239, 230, 0.18);
}

.card-fly img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  display: block;
}

.card-fly figcaption {
  padding: 4px 6px 6px;
  font-size: 0.72rem;
  text-align: center;
}

.face-down {
  min-height: 88px;
  background: repeating-linear-gradient(135deg, #2a1814, #2a1814 6px, #3a2218 6px, #3a2218 12px);
}

.throw .card-fly.left { animation: fly-left 0.5s ease-out; }
.throw .card-fly.right { animation: fly-right 0.5s ease-out; }
.show-winner .won { outline: 2px solid var(--amber); animation: win-card 0.45s ease-out; }
.felt.settled .card-fly,
.felt.settled .winner { animation: none; }

.felt-wait {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
}

.pawn {
  position: absolute;
  z-index: 2;
  width: 74px;
  text-align: center;
  left: calc(50% + cos((var(--i) / var(--n) * 360 - 90) * 1deg) * 34%);
  top: calc(48% + sin((var(--i) / var(--n) * 360 - 90) * 1deg) * 36%);
  transform: translate(-50%, -50%);
}

.silhouette {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(20, 12, 10, 0.8);
  border: 1px solid rgba(246, 239, 230, 0.18);
}

.silhouette svg { width: 26px; height: 26px; fill: currentColor; }
.silhouette.mine { color: var(--amber-ink); background: var(--amber); }
.silhouette.in-duel { color: var(--bad); border-color: var(--hot); }
.silhouette.winner { color: var(--amber-ink); background: var(--amber); animation: win-pawn 0.45s ease-out; }

.pawn-name, .pawn-role {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pawn-name { font-size: 0.75rem; font-weight: 700; }
.pawn-role { color: var(--muted); font-size: 0.68rem; }

.hand {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}

.hand-card {
  width: 74px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #1c1411;
  cursor: pointer;
}

.hand-card img {
  width: 74px;
  height: 96px;
  object-fit: cover;
  display: block;
}

.hand-card:active { transform: translateY(-6px); }

@keyframes fly-left {
  from { opacity: 0; transform: translate(-24px, 12px) rotate(-6deg); }
  to { opacity: 1; transform: none; }
}

@keyframes fly-right {
  from { opacity: 0; transform: translate(24px, 12px) rotate(6deg); }
  to { opacity: 1; transform: none; }
}

@keyframes win-card {
  from { transform: translateY(8px); }
  to { transform: none; }
}

@keyframes win-pawn {
  from { transform: translateY(4px); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .vote-stage.hurry .vote-shot,
  .hurry-play .hand-card { animation: none !important; }
}

.clock-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 45;
  height: 6px;
  pointer-events: none;
  background: rgba(246, 239, 230, 0.12);
}

.clock-bar span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(1);
  transform-origin: left center;
  background: var(--amber);
}

.clock-bar.hurry span { background: var(--hot); }

.table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.table-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.hand-dock {
  position: sticky;
  bottom: 0;
  z-index: 25;
  margin: 0 -18px;
  padding: 8px 18px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(20, 12, 10, 0), rgba(20, 12, 10, 0.96) 28%);
  pointer-events: auto;
}

.hand-copy {
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 700;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pick-slot {
  position: relative;
  min-height: 108px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px dashed rgba(246, 239, 230, 0.28);
  background: rgba(246, 239, 230, 0.03);
}

.pick-slot label {
  display: block;
  height: 100%;
  min-height: 108px;
  cursor: pointer;
  font-weight: 700;
}

.pick-slot input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.pick-empty {
  display: grid;
  place-items: center;
  height: 108px;
  color: var(--muted);
  font-size: 0.85rem;
}

.pick-slot img {
  width: 100%;
  height: 108px;
  object-fit: cover;
  display: none;
}

.pick-slot.filled {
  border-style: solid;
  border-color: rgba(255, 183, 3, 0.45);
}

.pick-slot.filled .pick-empty { display: none; }
.pick-slot.filled img { display: block; }
.pick-clear[hidden] { display: none !important; }

.pick-slot.bad {
  border-color: var(--hot);
}

.pick-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 12, 10, 0.82);
  color: var(--paper);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.pick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}

.pick-actions .btn { min-height: 40px; }

.pick-all {
  position: relative;
  overflow: hidden;
}

.pick-all input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

@media (min-width: 720px) {
  .pick-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.hand {
  justify-content: flex-start;
}

body:has(.vote-stage) .topbar {
  visibility: hidden;
  pointer-events: none;
}

body:has(.vote-stage) .clock-bar { display: none; }

.on-table .site-foot { display: none; }

.on-table .page {
  padding: 6px 14px 12px;
}

.on-table .hall {
  padding: 4px 0 0;
  gap: 10px;
  width: min(1120px, 100%);
}

.on-table .topbar {
  gap: 4px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px;
}

.on-table .felt {
  height: clamp(220px, calc(100dvh - 250px), 400px);
  min-height: 200px;
}

.on-table:has(#live[data-phase="hand"]) .felt {
  height: min(32dvh, 180px);
  min-height: 140px;
}

.hurry-play .hand-card { animation: vote-shake 0.28s ease-in-out infinite; }
.hurry-play .hand-dock { box-shadow: 0 -12px 40px rgba(255, 90, 40, 0.28); }

@media (max-width: 720px) {
  .on-table .page { padding: 4px 10px 8px; }
  .on-table .felt {
    height: clamp(200px, calc(100dvh - 230px), 320px);
    min-height: 188px;
  }
  .felt-oval {
    left: 10%;
    right: 10%;
    top: 16%;
    bottom: 16%;
    border-width: 7px;
  }
  .pawn { width: 58px; }
  .silhouette { width: 34px; height: 34px; }
  .silhouette svg { width: 20px; height: 20px; }
  .pawn-role { display: none; }
  .pawn-name { font-size: 0.68rem; }
  .board { width: min(48%, 180px); }
  .card-fly img, .face-down { height: 64px; min-height: 64px; }
  .hand-dock { margin: 0 -10px; padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .hand-card { width: 64px; }
  .hand-card img { width: 64px; height: 84px; }
  .vote-fly {
    width: 100%;
    height: min(56dvh, 420px);
    gap: 8px;
  }
  .vote-stage-copy { font-size: 0.95rem; }
  .phase-label { min-height: 28px; font-size: 0.7rem; }
  .winner-banner { padding: 10px 12px; }
}

@media (max-width: 420px) {
  .on-table .felt {
    height: clamp(190px, calc(100dvh - 210px), 260px);
  }
  .pawn { width: 48px; }
  .hand { gap: 6px; }
  .hand-card { width: 56px; }
  .hand-card img { width: 56px; height: 74px; }
}
