/* BANG! — styles. The screen, lobby, chat, modal, tip and overlay chrome is
   the collection's shared shell; everything under "the saloon table" below
   is this game's own. */

:root {
  --bg-1: #4a2a17;
  --bg-2: #1a0e07;
  --ink: #f5e7c9;
  --dim: #c0a688;
  --panel: #2c1a0f;
  --panel-2: #3c2415;
  --line: rgba(255, 228, 190, 0.13);
  --accent: #f0b955;
  --accent-dim: rgba(240, 185, 85, 0.16);
  --blood: #e0553f;
  --blood-ink: #ffa08c;
  /* the cards as printed: cream stock, a brown or a blue border */
  --paper: #f7efdc;
  --paper-ink: #2a1a0e;
  --brown-card: #8a5527;
  --blue-card: #4f80c8;
  --suit-red: #c62a1f;
  /* the roles, as their cards colour them */
  --law: #f0c050;
  --deputy: #9cc2ec;
  --outlaw: #e8664f;
  --renegade: #79cf9e;
  --win: #8fe3b2;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  --radius: 14px;
  --slab: 'Rockwell', 'Rockwell Nova', 'American Typewriter', 'Roboto Slab', 'Courier New', serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'Avenir Next', Avenir, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--bg-2);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* The backdrop is pinned to the screen. Painted on the body it would be one
   screen tall and start over below that, and the lobby and the table on a
   phone are longer than a screen. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1000px 620px at 50% -8%, rgba(240, 185, 85, 0.16), transparent 62%),
    radial-gradient(900px 600px at 50% 116%, rgba(142, 42, 30, 0.24), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
}

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

.hidden {
  display: none !important;
}

/* ---------------------------------------------------------------- screens */

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#screen-home,
#screen-lobby {
  justify-content: center;
  padding: 24px;
  gap: 14px;
}

/* the long tagline fills a phone, so leave room for the fixed "← Collection"
   link above the logo and the version badge below the small print */
#screen-home {
  padding-block: 64px 44px;
}

.back-home {
  position: fixed;
  top: 14px;
  left: 16px;
  color: var(--dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  z-index: 5;
}

.back-home:hover {
  color: var(--ink);
}

/* ---------------------------------------------------------------- home */

.logo {
  margin: 0;
  font-size: clamp(34px, 8vw, 58px);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.55);
}

@keyframes sway {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg) translateY(-3px); }
}

.tagline {
  margin: 0 0 10px;
  color: var(--dim);
  text-align: center;
  max-width: 47em;
  line-height: 1.6;
}

.field {
  width: min(340px, 86vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 17px;
  padding: 13px 16px;
  outline: none;
}

.field:focus {
  border-color: rgba(255, 194, 51, 0.55);
}

.field::placeholder {
  color: #9a8064;
}

.btn {
  border-radius: var(--radius);
  padding: 13px 22px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.06s ease, filter 0.15s ease;
  box-shadow: var(--shadow);
}

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

.btn:disabled {
  filter: grayscale(0.55) brightness(0.65);
  cursor: default;
}

.btn.primary {
  background: linear-gradient(180deg, #ffd25e, #f0a91f);
  color: #2a1d00;
  width: min(340px, 86vw);
}

.btn.secondary {
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
  color: var(--dim);
  font-weight: 600;
  padding: 9px 16px;
  font-size: 14px;
}

.join-row {
  display: flex;
  gap: 10px;
  width: min(340px, 86vw);
}

.join-row .field {
  flex: 1;
  width: auto;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.divider {
  color: #9a8064;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(340px, 86vw);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

#home-status {
  min-height: 22px;
  color: var(--dim);
  text-align: center;
  max-width: 36em;
}

#home-status.error {
  color: #ff9c9c;
}

.small-print {
  color: #9a8064;
  font-size: 12.5px;
  text-align: center;
  max-width: 47em;
  line-height: 1.55;
}

/* ---------------------------------------------------------------- lobby */

.lobby-panel {
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 28px;
  width: min(430px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.lobby-label {
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#lobby-code {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 0.32em;
  margin-right: -0.32em;
  color: var(--accent);
  text-shadow: 0 4px 18px rgba(255, 194, 51, 0.25);
  user-select: all;
}

.copy-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

#lobby-players {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.seat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
}

.seat-row.empty {
  opacity: 0.4;
  border-style: dashed;
}

.seat-name {
  font-weight: 700;
}

.seat-name.dim {
  color: var(--dim);
  font-weight: 500;
}

.chip {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--dim);
}

.chip.you {
  background: var(--accent-dim);
  color: var(--accent);
}

.chip.bot {
  background: rgba(63, 159, 216, 0.22);
  color: #9fd2f0;
}

.kick {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--dim);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  flex: none;
}

.kick:hover {
  background: rgba(229, 72, 77, 0.32);
  color: #ffb4b4;
}

/* Two lines reserved, not one. The hint rewrites itself as the table fills
   ("Share the code or link — or add a bot" becoming "4 aboard — ten rounds"),
   and the long one wraps: every button below it moved down the moment somebody
   joined. It is the only thing on this screen whose height depends on content. */
#lobby-hint {
  color: var(--dim);
  font-size: 14px;
  text-align: center;
  line-height: 1.5; min-height: 3em;
}

.side-pick {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--dim);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.side-pick.on {
  background: var(--accent-dim);
  border-color: rgba(255, 194, 51, 0.6);
  color: var(--accent);
}

.side-pick:disabled {
  cursor: default;
}

.av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex: none;
  color: #101418;
}

.av.empty {
  background: rgba(255, 255, 255, 0.07);
  color: var(--dim);
}

.av.bot {
  background: #4a2c17;
  color: #ffd25e;
  font-size: 17px;
}

.av.s0 { background: #8fd6a8; }
.av.s1 { background: #58b7ff; }
.av.s2 { background: #ffd166; }
.av.s3 { background: #ff5d8f; }
.av.s4 { background: #b98aff; }
.av.s5 { background: #63e0dc; }
.av.s6 { background: #ff9c5e; }
.av.s7 { background: #d3e15c; }

/* ---------------------------------------------------------------- topbar */

.topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  flex-wrap: wrap;
  min-height: 50px;
}

.topbar .spacer {
  flex: 1;
}

/* ---------------------------------------------------------------- action bar */

#action-bar {
  width: min(1080px, 100%);
  padding: 10px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 66px;
}

.pick {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 15px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.pick:hover:not(:disabled) {
  border-color: rgba(255, 194, 51, 0.6);
}

.pick:disabled {
  opacity: 0.35;
  cursor: default;
}

.pick.go {
  background: linear-gradient(180deg, #ffd25e, #f0a91f);
  color: #2a1d00;
  border: 0;
}

.pick.warn {
  background: rgba(229, 72, 77, 0.12);
  border-color: rgba(229, 72, 77, 0.45);
}

/* ---------------------------------------------------------------- feed */

#feed {
  position: fixed;
  right: 12px;
  top: 58px;
  width: 300px;
  max-height: min(300px, 34dvh);
  overflow-y: auto;
  background: rgba(22, 12, 6, 0.62);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--dim);
  z-index: 6;
}

.feed-line {
  padding: 2px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.feed-line:last-child {
  border-bottom: 0;
}

/* ---------------------------------------------------------------- chat */

#chat {
  position: fixed;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 7;
}

#chat-panel {
  width: 300px;
  height: 340px;
  max-height: 46dvh;
  background: rgba(30, 17, 9, 0.97);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.chat-head {
  padding: 9px 13px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
}

#chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chat-msg {
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
}

.chat-time {
  color: #8d7660;
  font-size: 11px;
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
}

.chat-name {
  font-weight: 800;
  margin-right: 6px;
}

.chat-name.s0 { color: #8fd6a8; }
.chat-name.s1 { color: #58b7ff; }
.chat-name.s2 { color: #ffd166; }
.chat-name.s3 { color: #ff5d8f; }
.chat-name.s4 { color: #b98aff; }
.chat-name.s5 { color: #63e0dc; }
.chat-name.s6 { color: #ff9c5e; }
.chat-name.s7 { color: #d3e15c; }

.chat-msg.mine .chat-text {
  color: #f8e6c4;
}

#chat-form {
  display: flex;
  border-top: 1px solid var(--line);
}

#chat-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ink);
  font-size: 14px;
  padding: 11px 12px;
}

.chat-send {
  padding: 0 14px;
  color: var(--accent);
  cursor: pointer;
  font-size: 16px;
}

#chat-toggle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  position: relative;
}

#chat-unread {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e5484d;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

#chat-peek {
  max-width: 300px;
  background: rgba(30, 17, 9, 0.97);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}

#chat-peek .chat-text {
  color: var(--dim);
}

.chat-bubble {
  position: absolute;
  top: -8px;
  left: 10px;
  transform: translateY(-100%);
  background: #fff;
  color: #2a1a0e;
  border-radius: 12px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 600;
  max-width: 240px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  z-index: 8;
  pointer-events: none;
  word-break: break-word;
}

.chat-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 16px;
  border: 6px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
}

/* ---------------------------------------------------------------- modal */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 7, 3, 0.76);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 18px;
}

.panel {
  background: linear-gradient(180deg, #3e2615, #1f120a);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 26px;
  width: min(440px, 94vw);
  max-height: 88dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow);
  text-align: center;
}

.panel.wide {
  width: min(700px, 94vw);
  text-align: left;
  align-items: stretch;
}

.panel h2 {
  margin: 0;
  font-size: 24px;
}

.rules {
  margin: 0;
  padding-left: 20px;
  color: var(--dim);
  line-height: 1.6;
  font-size: 14.5px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rules b,
.rules i {
  color: var(--ink);
}

.credit {
  color: #9a8064;
  font-size: 12.5px;
  line-height: 1.55;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

#go-table th,

#go-rank {
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
}

.rank-row.me {
  border-color: rgba(255, 194, 51, 0.5);
}

.rank-pos {
  font-weight: 900;
  font-size: 16px;
  width: 22px;
  text-align: center;
  color: var(--dim);
}

.rank-name {
  font-weight: 700;
  flex: 1;
  text-align: left;
}

.rank-score {
  font-weight: 800;
  color: var(--accent);
}

#go-wait {
  color: var(--dim);
  font-size: 13.5px;
}

/* ---------------------------------------------------------------- toasts, flash */

#toasts {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 30;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: rgba(30, 17, 9, 0.96);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast.gone {
  opacity: 0;
  transform: translateY(-8px);
}

.flash {
  position: fixed;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(24px, 5.4vw, 40px);
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 14px 34px;
  border-radius: 18px;
  background: rgba(28, 15, 7, 0.95);
  border: 2px solid var(--accent);
  color: var(--accent);
  z-index: 25;
  animation: flashpop 1.7s ease forwards;
  text-align: center;
  pointer-events: none;
}

.flash.plain {
  border-color: var(--line);
  color: var(--ink);
}

@keyframes flashpop {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  12% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
  22% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 26;
  overflow: hidden;
}

#confetti i {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% { transform: translateY(-10px) rotate(0); opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(105dvh) rotate(660deg); opacity: 0; }
}

/* ---------------------------------------------------------------- layout: desktop gutter */

@media (min-width: 1000px) {
  #screen-game {
    /* keep the docked log + chat column clear of the play area */
    padding-right: 320px;
  }
}

/* ---------------------------------------------------------------- narrow screens
   (keep this block at the END of the file: it must win the cascade) */

@media (max-width: 999px) {
  #feed {
    position: static;
    width: auto;
    margin: 8px 14px;
    max-height: 150px;
    order: 9;
  }

  #screen-game {
    padding-bottom: 90px;
  }

  #chat {
    bottom: 10px;
    right: 10px;
  }

  #chat-panel {
    width: min(300px, calc(100vw - 20px));
  }

  #board-wrap {
    align-self: center;
  }
}

/* Disconnect banner: the table stalls until the player returns or the host
   resolves it (neutral tones so it reads on any of our palettes) */
#dc-banner { display: none; }
#dc-banner.on { display: flex; flex-direction: column; gap: 6px; margin: 10px auto 2px; max-width: 620px; padding: 0 10px; }
#dc-banner .dc-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; background: rgba(255, 92, 92, 0.14); border: 1px solid rgba(255, 92, 92, 0.55); border-radius: 10px; padding: 7px 12px; font-size: 13px; line-height: 1.35; }
#dc-banner .dc-row.covered { background: rgba(127, 127, 127, 0.12); border-color: rgba(127, 127, 127, 0.45); }
#dc-banner .dc-btn { border: 1px solid rgba(127, 127, 127, 0.55); background: rgba(127, 127, 127, 0.16); color: inherit; border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
#dc-banner .dc-btn:hover { background: rgba(127, 127, 127, 0.28); }

/* Observers: watch chip, lobby note, and the shadow-a-player bar */
#watch-chip { display: none; }
#watch-chip.on { display: inline-block; margin-left: 8px; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(127, 127, 127, 0.16); border: 1px solid rgba(127, 127, 127, 0.4); vertical-align: middle; }
#lobby-watch { display: none; }
#lobby-watch.on { display: block; margin: 6px auto 0; font-size: 12.5px; opacity: 0.85; text-align: center; }
#ob-bar { display: none; }
#ob-bar.on { display: flex; flex-direction: column; gap: 6px; margin: 10px auto 2px; max-width: 620px; padding: 0 10px; }
#ob-bar .ob-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; background: rgba(120, 160, 255, 0.12); border: 1px solid rgba(120, 160, 255, 0.5); border-radius: 10px; padding: 7px 12px; font-size: 13px; line-height: 1.35; }
#ob-bar .ob-switch { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
#ob-bar .ob-btn { border: 1px solid rgba(127, 127, 127, 0.55); background: rgba(127, 127, 127, 0.16); color: inherit; border-radius: 8px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
#ob-bar .ob-btn:hover { background: rgba(127, 127, 127, 0.28); }
#ob-bar .ob-btn.on { background: rgba(120, 160, 255, 0.3); border-color: rgba(120, 160, 255, 0.75); cursor: default; }

/* Seat claiming / resigning */
#ob-bar .ob-btn.claim { background: rgba(120, 230, 160, 0.18); border-color: rgba(120, 230, 160, 0.6); }
#ob-bar .ob-btn.claim:hover { background: rgba(120, 230, 160, 0.3); }
#lobby-watch button { margin-left: 8px; border: 1px solid rgba(120, 230, 160, 0.6); background: rgba(120, 230, 160, 0.18); color: inherit; border-radius: 8px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
#lobby-watch button:hover { background: rgba(120, 230, 160, 0.3); }

/* Announcements must survive any browser width: wrap instead of clipping */
.flash { max-width: min(92vw, 780px); width: max-content; white-space: normal; overflow-wrap: break-word; text-align: center; box-sizing: border-box; }


/* ---------------------------------------------------------------- tips and card texts */

.tb-tip {
  position: fixed;
  z-index: 40;
  max-width: min(300px, calc(100vw - 16px));
  pointer-events: none;
  background: #1e110a;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  padding: 9px 11px;
}

.tb-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  line-height: 1.42;
  color: var(--ink);
  text-align: left;
}

.tb-card-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-left: 7px;
  border-left: 3px solid var(--set, var(--dim));
}


.tb-card-glyph { font-size: 18px; line-height: 1; align-self: center; }
.tb-card-name { font-size: 14.5px; }

.tb-card-str {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.tb-card-cry { color: var(--accent); opacity: 0.9; }
.tb-card-note { color: var(--dim); font-size: 12.5px; }
.tb-card-why { color: #ffb4a0; font-size: 12.5px; }

.tb-card-base {
  margin-top: 2px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

/* a card's tip is edged in the colour of its border */
.tb-card-head.brown { border-left-color: #b98a52; }
.tb-card-head.blue { border-left-color: var(--blue-card); }


/* ================================================================ the saloon table */

.logo-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.logo-pre {
  font-family: var(--slab);
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  padding-left: 0.32em;
}
.logo {
  font-family: var(--slab);
  font-weight: 900;
  letter-spacing: 0.06em;
  padding-left: 0.06em;
  font-size: clamp(56px, 15vw, 104px);
  background: linear-gradient(180deg, #fff0bf 8%, #f0b955 52%, #d9662f 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(3px 4px 0 #6e1d12) drop-shadow(0 10px 24px rgba(0, 0, 0, 0.55));
  text-shadow: none;
}

h2 { font-family: var(--slab); font-weight: 700; letter-spacing: 0.02em; }

/* ---------------------------------------------------------------- lobby: roles */

#cast-summary {
  width: 100%;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.cast-head { color: var(--dim); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.cast-roles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cast-note { color: var(--dim); font-size: 12.5px; max-width: 34ch; }

/* ---------------------------------------------------------------- roles */

.role-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
  cursor: help;
}
.role-tag.r-sheriff { color: #2a1a05; background: linear-gradient(180deg, #ffd77a, #e0a83a); border-color: #8a5a12; }
.role-tag.r-deputy { color: #d6e7ff; background: rgba(156, 194, 236, 0.18); border-color: rgba(156, 194, 236, 0.6); }
.role-tag.r-outlaw { color: #ffb6a8; background: rgba(232, 102, 79, 0.18); border-color: rgba(232, 102, 79, 0.62); }
.role-tag.r-renegade { color: #bdf2d3; background: rgba(121, 207, 158, 0.16); border-color: rgba(121, 207, 158, 0.6); }
.role-tag.hidden-role { color: var(--dim); background: rgba(255, 255, 255, 0.05); min-width: 20px; justify-content: center; }
.role-tag.peek { border-style: dashed; opacity: 0.8; }

/* ---------------------------------------------------------------- topbar and layout */

#screen-game .topbar #turn-chip,
#screen-game .topbar #alive-chip {
  font-size: 12.5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  white-space: nowrap;
}
#alive-chip { cursor: help; }
#turn-chip.mine { color: #2a1a05; background: linear-gradient(180deg, #ffd77a, #e0a83a) !important; border-color: #8a5a12 !important; font-weight: 800; }

#table {
  width: min(1340px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 14px;
  padding: 6px 14px 16px;
  align-items: start;
}
#stage { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
#side { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: sticky; top: 8px; }
.side-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}
.dim { color: var(--dim); }

/* the log lives in the side column */
#feed {
  position: static;
  width: auto;
  max-height: min(640px, calc(100dvh - 110px));
  z-index: auto;
}

/* ---------------------------------------------------------------- the ring of seats */

.ring { position: relative; }

/* round on a wide screen: the seats about a wooden table, you at the bottom */
/* tall enough for seven seats, short enough that the prompt and your hand
   stay on the screen below it */
.ring.round {
  height: clamp(420px, min(50vw, calc(100dvh - 400px)), 640px);
  margin: 2px 0;
}
.ring.round::before {
  content: '';
  position: absolute;
  inset: 13% 11%;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(255, 214, 150, 0.12), transparent),
    repeating-linear-gradient(97deg, rgba(0, 0, 0, 0.07) 0 2px, transparent 2px 9px, rgba(255, 220, 170, 0.03) 9px 11px, transparent 11px 19px),
    radial-gradient(closest-side, #73431f, #4c2b14);
  border: 7px solid #2c180b;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(240, 185, 85, 0.22), 0 16px 40px rgba(0, 0, 0, 0.5);
}
.ring.round .seat {
  position: absolute;
  transform: translate(-50%, -50%);
  width: clamp(132px, 16.5%, 176px);
}
.ring.round .tableau {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* a list on a phone: the piles first, then the seats two to a row */
.ring:not(.round) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.ring:not(.round) .tableau {
  grid-column: 1 / -1;
  padding: 10px 8px;
  border-radius: 14px;
  background:
    repeating-linear-gradient(97deg, rgba(0, 0, 0, 0.07) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #5d3519, #44260f);
  border: 3px solid #2c180b;
}

.seat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 8px 8px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  text-align: left;
  min-width: 0;
  z-index: 1;
}
.seat.me { background: linear-gradient(180deg, #43291a, var(--panel)); border-color: rgba(255, 228, 190, 0.26); }
.seat.turn { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(240, 185, 85, 0.4), 0 0 22px rgba(240, 185, 85, 0.22), 0 6px 16px rgba(0, 0, 0, 0.4); }
.seat.asked { border-color: var(--blood); box-shadow: 0 0 0 2px rgba(224, 85, 63, 0.45), 0 6px 16px rgba(0, 0, 0, 0.4); }
.seat.out { opacity: 0.55; filter: grayscale(0.75); }
.seat.gone { opacity: 0.6; }
button.seat.target {
  cursor: pointer;
  border: 2px dashed var(--blood);
  background: linear-gradient(180deg, rgba(224, 85, 63, 0.22), var(--panel));
  transition: background 120ms ease, transform 120ms ease;
}
button.seat.target:hover { background: linear-gradient(180deg, rgba(224, 85, 63, 0.38), var(--panel)); }
button.seat.target:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ring.round button.seat.target:hover { transform: translate(-50%, -50%) scale(1.03); }
.seat.chosen { box-shadow: 0 0 0 3px var(--blood), 0 6px 16px rgba(0, 0, 0, 0.4); }
/* a wound shakes the seat; `translate` leaves the seat's own transform alone */
.seat.shake { animation: shake 0.42s ease; }

@keyframes shake {
  20% { translate: -5px 0; }
  40% { translate: 5px 0; }
  60% { translate: -3px 0; }
  80% { translate: 2px 0; }
}

.seat-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.seat .av { width: 26px; height: 26px; font-size: 12.5px; }
.seat-name {
  font-weight: 800;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.you-tag {
  margin-left: auto;
  flex: none;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.seat-char {
  font-family: var(--slab);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  cursor: help;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seat-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 18px; }
.seat-line.small { font-size: 11.5px; color: var(--dim); }
.out-note { font-style: italic; }

/* life points as cartridges, like the bullets on the character card */
.life { display: inline-flex; gap: 3px; align-items: center; cursor: help; }
.life i {
  width: 7px;
  height: 14px;
  border-radius: 4px 4px 1.5px 1.5px;
  border: 1.5px solid rgba(240, 185, 85, 0.55);
  background: transparent;
  display: block;
}
.life i.full { background: linear-gradient(180deg, #ffe08a 0 38%, #c98f24 38% 100%); border-color: #8a5a12; }

.hand-count { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--ink); cursor: help; font-variant-numeric: tabular-nums; }
.mini-back {
  width: 10px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(135deg, #a8392a, #6e1d12);
  border: 1px solid #f0b955;
  display: block;
}
.dist {
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  cursor: help;
  white-space: nowrap;
}
.dist.reach { color: var(--blood-ink); border-color: rgba(224, 85, 63, 0.55); background: rgba(224, 85, 63, 0.12); }
.dist.mine { color: var(--ink); }
.tok.turn {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2a1a05;
  background: linear-gradient(180deg, #ffd77a, #e0a83a);
  cursor: help;
}

/* cards in play, as chips on their owner's seat */
.seat-table { display: flex; flex-wrap: wrap; gap: 3px; }
.inplay {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px 3px 4px;
  border-radius: 6px;
  border: 1px solid rgba(79, 128, 200, 0.7);
  background: rgba(79, 128, 200, 0.2);
  color: #d4e3ff;
  white-space: nowrap;
  cursor: help;
}
.inplay .ip-glyph { font-size: 11px; }
.inplay.weapon .ip-glyph { font-size: 12px; font-weight: 900; }
.inplay.weapon { border-color: rgba(122, 166, 230, 0.9); background: rgba(79, 128, 200, 0.32); color: #fff; }
.inplay.k-jail,
.inplay.k-dynamite { border-color: rgba(224, 85, 63, 0.75); background: rgba(224, 85, 63, 0.2); color: #ffd1c6; }

/* ---------------------------------------------------------------- the cards */

.card {
  --cw: 86px;
  position: relative;
  flex: none;
  width: var(--cw);
  height: calc(var(--cw) * 1.42);
  border-radius: calc(var(--cw) * 0.1);
  background: var(--paper);
  color: var(--paper-ink);
  border: calc(var(--cw) * 0.05) solid var(--brown-card);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--cw) * 0.07) 3px;
  font-family: var(--slab);
  cursor: help;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}
.card.blue { border-color: var(--blue-card); }
.cd-name {
  font-size: calc(var(--cw) * 0.125);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.05;
}
.cd-name.long { font-size: calc(var(--cw) * 0.104); letter-spacing: 0; }
.cd-glyph { font-size: calc(var(--cw) * 0.36); line-height: 1; margin: auto 0; }
/* a weapon's picture is its gunsight, the range in the middle */
.cd-range {
  margin: auto 0;
  width: calc(var(--cw) * 0.46);
  height: calc(var(--cw) * 0.46);
  border-radius: 50%;
  border: 2px solid var(--paper-ink);
  display: grid;
  place-items: center;
  font-size: calc(var(--cw) * 0.24);
  font-weight: 800;
  background:
    linear-gradient(var(--paper-ink), var(--paper-ink)) center / 1.5px 100% no-repeat,
    linear-gradient(var(--paper-ink), var(--paper-ink)) center / 100% 1.5px no-repeat;
  color: var(--paper-ink);
  text-shadow: 0 0 3px var(--paper), 0 0 3px var(--paper), 0 0 3px var(--paper), 0 0 2px var(--paper);
}
.cd-corner {
  position: absolute;
  left: calc(var(--cw) * 0.06);
  bottom: calc(var(--cw) * 0.035);
  font-size: calc(var(--cw) * 0.14);
  font-weight: 800;
  color: #1c1c1c;
  font-family: 'Avenir Next', Avenir, 'Segoe UI', Roboto, Arial, sans-serif;
}
.cd-corner.red { color: var(--suit-red); }

.card.small { --cw: 56px; }
.card.small .cd-name,
.card.small .cd-name.long { font-size: 7.5px; }
.card.back {
  background:
    repeating-linear-gradient(45deg, rgba(240, 185, 85, 0.14) 0 3px, transparent 3px 8px),
    linear-gradient(160deg, #a8392a, #5e170e);
  border-color: #2c180b;
  justify-content: center;
}
.back-mark {
  font-family: var(--slab);
  font-weight: 900;
  font-size: calc(var(--cw) * 0.2);
  color: #ffd77a;
  transform: rotate(-14deg);
  text-shadow: 1px 2px 0 #3a0d06;
}
.card.empty { background: transparent; border: 2px dashed rgba(255, 228, 190, 0.2); box-shadow: none; }

button.card { cursor: pointer; }
button.card.can:hover { transform: translateY(-5px); }
button.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.card.cannot { opacity: 0.6; }
button.card.cannot:hover { opacity: 0.85; }
.card.selected { transform: translateY(-12px); box-shadow: 0 0 0 3px var(--accent), 0 10px 20px rgba(0, 0, 0, 0.5); opacity: 1; }
.card.picked { transform: translateY(-10px) rotate(-2deg); box-shadow: 0 0 0 3px var(--blood), 0 10px 20px rgba(0, 0, 0, 0.5); }
.card.answer { box-shadow: 0 0 0 3px var(--win), 0 6px 14px rgba(0, 0, 0, 0.45); }
.card.unpicked { opacity: 0.45; }

.card-row { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }

/* ---------------------------------------------------------------- the middle of the table */

.tableau {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 0;
}
.piles { display: flex; gap: 16px; align-items: flex-end; justify-content: center; }
.pile { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: help; }
.pile .card { cursor: inherit; }
.pile-n {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8d3b0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.flip-cards { display: flex; gap: 4px; }
.flip.ok .pile-n { color: var(--win); }
.flip.bad .pile-n { color: var(--blood-ink); }
.ring.round .tableau .card { --cw: 62px; }
.ring.round .tableau .card .cd-name,
.ring.round .tableau .card .cd-name.long { font-size: 7.5px; }

/* ---------------------------------------------------------------- the action panel */

#action {
  background: rgba(44, 26, 15, 0.88);
  border: 1px solid rgba(240, 185, 85, 0.28);
  border-radius: 14px;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  min-height: 92px;
}
#action.mine { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(240, 185, 85, 0.16); }
#action.mine.act-shot,
#action.mine.act-indians,
#action.mine.act-duel,
#action.mine.act-dying { border-color: var(--blood); box-shadow: 0 0 0 2px rgba(224, 85, 63, 0.22); }
#action p { margin: 0; max-width: 62ch; }
.act-head { font-family: var(--slab); font-size: 17px; line-height: 1.35; text-wrap: balance; }
.act-head.danger { color: var(--blood-ink); }
.act-head.win-law { color: var(--law); }
.act-head.win-outlaws { color: var(--outlaw); }
.act-head.win-renegade { color: var(--renegade); }
.act-card { font-weight: 800; color: var(--accent); margin-right: 2px; }
.act-sub { color: var(--dim); font-size: 13.5px; line-height: 1.45; }
.act-warn { color: var(--blood-ink); font-size: 13.5px; font-weight: 700; }
.act-note { color: var(--dim); font-size: 12.5px; font-style: italic; }
.act-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 3px; }
.act-row .act-note { flex: 0 1 26ch; text-align: left; line-height: 1.35; }
#action .btn { padding: 10px 16px; font-size: 15px; }
#action .btn.primary { width: auto; min-width: 150px; }
#action .btn.ghost { padding: 9px 14px; font-size: 14px; }
.btn.danger { background: linear-gradient(180deg, #e0553f, #a3301f); color: #fff4ef; border: 0; }
.btn.end-turn { min-width: 170px; }

/* ---------------------------------------------------------------- your hand */

#hand {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 12px 14px;
}
.hand-head { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 4px; }
.hand-hint { color: var(--dim); font-size: 12px; font-style: italic; }
.hand-row { padding-top: 10px; }
.hand-empty { margin: 8px 0; font-size: 13.5px; }

/* ---------------------------------------------------------------- what just happened */

#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 24; overflow: hidden; }
.stamp {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--slab);
  font-weight: 900;
  font-size: 19px;
  line-height: 1.1;
  padding: 4px 12px;
  border-radius: 8px;
  white-space: nowrap;
  animation: stamp 1.4s ease forwards;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.stamp.bang { background: linear-gradient(180deg, #ffe08a, #f0a92b); color: #3a1405; border: 2px solid #3a1405; font-size: 22px; }
.stamp.play { background: var(--paper); color: var(--paper-ink); border: 2px solid var(--brown-card); font-size: 15px; }
.stamp.missed { background: #e9f1ff; color: #23477a; border: 2px solid #4f80c8; }
.stamp.hit { background: none; box-shadow: none; color: #ff6a50; font-size: 34px; text-shadow: 0 2px 0 #3a0d06, 0 0 14px rgba(0, 0, 0, 0.7); }
.stamp.heal { background: none; box-shadow: none; color: var(--win); font-size: 30px; text-shadow: 0 2px 0 #08301a, 0 0 14px rgba(0, 0, 0, 0.7); }

@keyframes stamp {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.14); }
  22% { transform: translate(-50%, -50%) scale(1); }
  72% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -95%); }
}

.flash.boom { background: linear-gradient(180deg, #f0a92b, #b33a12); color: #fff; border-color: #ffd77a; }
.flash.dead { background: linear-gradient(180deg, #8e2a1e, #4a120b); color: #fff; border-color: var(--blood-ink); }

/* ---------------------------------------------------------------- your role */

.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 2px solid var(--line);
  text-align: center;
}
.role-card.r-sheriff { border-color: var(--law); background: linear-gradient(180deg, rgba(240, 192, 80, 0.28), rgba(240, 192, 80, 0.05)); }
.role-card.r-deputy { border-color: var(--deputy); background: linear-gradient(180deg, rgba(156, 194, 236, 0.24), rgba(156, 194, 236, 0.04)); }
.role-card.r-outlaw { border-color: var(--outlaw); background: linear-gradient(180deg, rgba(232, 102, 79, 0.26), rgba(232, 102, 79, 0.05)); }
.role-card.r-renegade { border-color: var(--renegade); background: linear-gradient(180deg, rgba(121, 207, 158, 0.24), rgba(121, 207, 158, 0.04)); }
.rc-pre { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.rc-name { font-family: var(--slab); font-size: 30px; font-weight: 800; }
.role-card.r-sheriff .rc-name { color: var(--law); }
.role-card.r-deputy .rc-name { color: var(--deputy); }
.role-card.r-outlaw .rc-name { color: var(--outlaw); }
.role-card.r-renegade .rc-name { color: var(--renegade); }
.rc-goal { margin: 2px 0 0; line-height: 1.5; max-width: 38ch; }
.char-card {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--paper-ink);
  border: 4px solid #b98a52;
  text-align: left;
}
.char-card .rc-pre { color: #7a5a36; }
.cc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cc-name { font-family: var(--slab); font-size: 19px; font-weight: 800; }
.char-card .life i { border-color: #8a5a12; }
.cc-text { margin: 6px 0 0; line-height: 1.45; font-size: 14px; }
.rc-facts { margin: 12px 0 0; padding-left: 20px; text-align: left; line-height: 1.55; font-size: 14px; }
.rc-secret { color: var(--dim); font-size: 12px; font-style: italic; margin: 4px 0 10px; }
.rc-secret:empty { display: none; }

/* ---------------------------------------------------------------- game over */

#go-title.win-law { color: var(--law); }
#go-title.win-outlaws { color: var(--outlaw); }
#go-title.win-renegade { color: var(--renegade); }
#go-rank { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 5px; }
#go-rank .rank-row { border-left: 3px solid var(--line); }
#go-rank .rank-row.won { border-left-color: var(--accent); background: linear-gradient(90deg, rgba(240, 185, 85, 0.12), var(--panel)); }
#go-rank .rank-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#go-rank .rank-name small { color: var(--dim); font-size: 12px; font-weight: 600; }

/* ---------------------------------------------------------------- narrow screens */

@media (max-width: 999px) {
  #table { grid-template-columns: minmax(0, 1fr); padding: 4px 10px 16px; }
  #side { order: 2; position: static; }
  #feed { max-height: 220px; }
}

@media (max-width: 659px) {
  .card { --cw: 72px; }
  .ring:not(.round) .tableau .card { --cw: 52px; }
  .ring:not(.round) .tableau .card .cd-name,
  .ring:not(.round) .tableau .card .cd-name.long { font-size: 7px; }
  .card-row { gap: 7px; }
  .act-row .btn { flex: 1 1 40%; min-width: 0; }
  #action .btn.primary { min-width: 0; }
  #screen-game .topbar .btn.ghost { padding: 6px 12px; font-size: 13.5px; }
}

@media (min-width: 1000px) {
  #screen-game { padding-right: 0; }
  /* keep clear of the fixed ⚙ and log toggle in the corner */
  #screen-game .topbar { padding-right: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  button.seat.target { transition: none; }
  .seat.shake { animation: none; }
  .stamp { animation-name: stamp-still; }
  @keyframes stamp-still {
    0%, 80% { opacity: 1; }
    100% { opacity: 0; }
  }
}
