/*
 * Ouster: "Agitprop" theme.
 * Printed-poster look: warm newsprint, heavy ink, one signal red, hard offset
 * shadows instead of soft blur. Each role has its own ink colour and glyph.
 * Fonts: Unbounded 800 (display) and Schibsted Grotesk 400/700 (text), both
 * self-hosted under the SIL Open Font License (see fonts/).
 */

@font-face {
  font-family: 'Unbounded';
  src: url('fonts/unbounded-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('fonts/schibsted-grotesk-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('fonts/schibsted-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ece3cf;
  --paper-2: #e3d8bf;
  --paper-hi: #f7f1e3;
  --ink: #1b1916;
  --ink-2: #3a352f;
  --ink-soft: #5c554b;
  --red: #cf2e1f;
  --red-ink: #a3201a;
  --red-hi: #ff8f80;
  --gold: #c9962b;
  --gold-ink: #8a6312;
  --focus: #1f56a8;

  --duke: #5d3b8e;
  --assassin: #1b1916;
  --captain: #1f56a8;
  --ambassador: #2e7a4c;
  --contessa: #b0285a;

  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --text: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 8px 8px 0 var(--ink);
  --card-w: 116px;
  --radius: 4px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .1  0 0 0 0 .09  0 0 0 0 .08  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Role colour hooks */
.role-duke { --role: var(--duke); }
.role-assassin { --role: var(--assassin); }
.role-captain { --role: var(--captain); }
.role-ambassador { --role: var(--ambassador); }
.role-contessa { --role: var(--contessa); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper) var(--grain);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Glyphs ------------------------------------------------------------------ */
.glyph, .glyph-xs, .glyph-sm, .glyph-lg, .card-glyph {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: square;
  stroke-linejoin: miter;
  flex: none;
}
.glyph { width: 24px; height: 24px; }
.glyph-xs { width: 14px; height: 14px; stroke-width: 2.8; }
.glyph-sm { width: 18px; height: 18px; stroke-width: 2.6; }
.glyph-lg { width: 34px; height: 34px; }

/* Badges: each player is a shape ------------------------------------------- */
.badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  flex: none;
}
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--ink); }
.badge-mono {
  position: relative;
  font-family: var(--display);
  font-size: 12px;
  line-height: 1;
  color: var(--paper-hi);
  transform: translateY(1px);
}
.badge-you svg { fill: var(--red); }
.badge-triangle .badge-mono { transform: translateY(3px) scale(.85); }
.badge-sm { width: 22px; height: 22px; }
.badge-sm .badge-mono { font-size: 9px; }
.badge-xs { width: 16px; height: 16px; }
.badge-xs .badge-mono { font-size: 7px; }

/* Coins --------------------------------------------------------------------- */
.coin {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3d27a 0 25%, var(--gold) 26% 70%, var(--gold-ink) 71%);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  flex: none;
}
.coin-lg { width: 22px; height: 22px; box-shadow: inset 0 0 0 2px var(--ink); }

/* ==========================================================================
   App frame
   ========================================================================== */
.app {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "table" "bar";
  height: 100vh;
  height: 100dvh;
}

.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(8px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
  background: var(--ink);
  color: var(--paper);
}
.brand { display: flex; align-items: center; gap: 12px; }
.wordmark {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
  padding: 5px 10px 4px;
  background: var(--red);
  color: var(--paper-hi);
  transform: rotate(-3deg);
  box-shadow: 3px 3px 0 var(--paper);
}
.chip {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: .85;
}
.chip b { font-family: var(--display); font-weight: 800; }
.topbar-tools { display: flex; gap: 8px; }
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  border: 2px solid var(--paper);
  border-radius: var(--radius);
  background: transparent;
  color: var(--paper);
  font-weight: 700;
  font-size: 14px;
}
.tool-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.tool-btn:hover { background: var(--paper); color: var(--ink); }
.topbar :focus-visible { outline-color: #ffd166; }

/* ==========================================================================
   Table
   ========================================================================== */
.table {
  grid-area: table;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left));
  overflow-x: hidden;
  overflow-y: auto;
  isolation: isolate;
}
/* Poster geometry behind the table: a big ring and a red wedge. */
.table::before,
.table::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.table::before {
  width: min(70vh, 640px);
  aspect-ratio: 1;
  left: 50%;
  top: 52%;
  transform: translate(-62%, -50%);
  border-radius: 50%;
  border: 28px solid rgba(27, 25, 22, .07);
}
.table::after {
  right: 0;
  top: 22%;
  width: 46%;
  height: 56%;
  background: var(--red);
  opacity: .14;
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
}

/* Seats ---------------------------------------------------------------------- */
.seats-wrap { flex: none; }
.seats {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  max-width: calc(var(--cols, 3) * 250px);
}
.seats[data-count="1"] { --cols: 1; }
.seats[data-count="2"] { --cols: 2; }
.seats[data-count="3"] { --cols: 3; }
.seats[data-count="4"] { --cols: 4; }
.seats[data-count="5"] { --cols: 5; }

.seat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px 12px;
  background: var(--paper-hi);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, opacity .3s ease, filter .3s ease;
}
.seat-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.seat-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.seat-name {
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seat-style {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.seat-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.purse { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.purse b { font-family: var(--display); font-size: 20px; line-height: 1; }
.minis { display: inline-flex; gap: 5px; }
.mini {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 34px;
  border: 2px solid var(--ink);
  border-radius: 3px;
}
.mini-back {
  background:
    linear-gradient(135deg, transparent 0 46%, var(--red) 46% 62%, transparent 62%),
    var(--ink);
}
.mini-lost {
  position: relative;
  background: var(--paper-2);
  color: var(--role);
  opacity: .8;
}
.mini-lost::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(to top right, transparent calc(50% - 1.5px), var(--red) calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px));
}

.claim-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.claim-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 5px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--paper-hi);
  background: var(--role);
}
.claim-chip.is-caught { background: var(--paper-2); color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.claim-chip.is-caught .chip-mark { color: var(--red); text-decoration: none; }
.chip-n { opacity: .85; font-weight: 400; }
.chip-mark { font-weight: 700; }
.claim-none { margin: 0; font-size: 12px; color: var(--ink-soft); font-style: italic; }

.seat-tag {
  position: absolute;
  top: -11px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper-hi);
  border-radius: 2px;
}
.tag-pass { background: var(--paper-hi); color: var(--ink); border: 2px solid var(--ink); padding: 0 6px; }
.tag-out { background: var(--ink-soft); }

.dots { display: inline-flex; gap: 3px; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: dot 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.seat.is-turn { border-color: var(--red); box-shadow: 4px 4px 0 var(--red); }
.seat.is-turn::before {
  content: '';
  position: absolute;
  left: -2px; top: -2px;
  width: 0; height: 0;
  border-top: 18px solid var(--red);
  border-right: 18px solid transparent;
}
.seat.is-thinking { transform: translateY(-2px); }
.seat.is-out { filter: grayscale(1); opacity: .5; box-shadow: none; }
.seat.is-out .seat-name { text-decoration: line-through; text-decoration-thickness: 2px; }

.seat.is-target {
  border-style: dashed;
  border-color: var(--red);
  box-shadow: 6px 6px 0 var(--red);
  transform: translate(-2px, -2px);
  animation: aim 1.2s ease-in-out infinite;
}
@keyframes aim { 50% { box-shadow: 3px 3px 0 var(--red); transform: translate(0, 0); } }
.seat-hit {
  position: absolute;
  inset: -2px;
  z-index: 2;
  border: 0;
  background: transparent;
  border-radius: var(--radius);
}
.seat-hit::after {
  content: 'Tap to target';
  position: absolute;
  left: 50%;
  bottom: -11px;
  transform: translateX(-50%);
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--red);
  color: var(--paper-hi);
  border-radius: 2px;
}
.seat-hit:hover { background: rgba(207, 46, 31, .06); }
.seat-hit:focus-visible { outline-offset: 4px; }

/* Stage: the current claim --------------------------------------------------- */
.stage {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 0;
}
.stage-card {
  position: relative;
  width: min(100%, 560px);
  padding: 22px 20px 16px;
  background: var(--paper-hi);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.stage-kicker {
  position: absolute;
  top: -16px;
  left: 16px;
  margin: 0;
  padding: 5px 12px 4px;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.1;
  background: var(--ink);
  color: var(--paper-hi);
  transform: rotate(-2deg);
}
.stage-card.is-you .stage-kicker,
.stage-card.is-claim .stage-kicker { background: var(--red); }
.stage-card.is-loss .stage-kicker { background: var(--ink); box-shadow: 3px 3px 0 var(--red); }
.stage-body { display: flex; flex-direction: column; gap: 10px; }
.stage-lede {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}
.stage-note { margin: 0; font-size: 14px; color: var(--ink-soft); }

.claim {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff8;
  overflow: hidden;
  transition: opacity .2s ease;
}
.claim-role {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 92px;
  padding: 8px 10px;
  background: var(--role);
  color: var(--paper-hi);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  padding-right: 18px;
}
.claim-plain .claim-role { background: var(--paper-2); color: var(--ink); }
.claim-text {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.claim.is-dim { opacity: .62; }
.claim.is-dim .claim-text { font-size: 15px; font-weight: 400; }

.stage-card.slam { animation: slam .32s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes slam {
  from { transform: scale(1.06) rotate(-1.2deg); box-shadow: 14px 14px 0 var(--ink); }
  to { transform: none; box-shadow: var(--shadow-lg); }
}

/* Known-cards strip */
.court {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.court-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.court-hint { font-weight: 400; text-transform: none; letter-spacing: 0; }
.court-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; }
.court-role { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; }
.court-role .glyph-xs { color: var(--role); }
.pips { display: inline-flex; gap: 3px; }
.pip { width: 9px; height: 9px; border: 2px solid var(--role); border-radius: 50%; }
.pip-mine { background: var(--role); }
.pip-out { border-color: var(--ink-soft); background: linear-gradient(to top right, transparent 40%, var(--red) 40% 60%, transparent 60%); }

/* My area -------------------------------------------------------------------- */
.me {
  position: relative;
  flex: none;
  align-self: center;
  width: min(100%, 640px);
  padding: 12px 16px 14px;
  background: var(--paper-hi);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.me.is-turn { border-color: var(--red); box-shadow: 6px 6px 0 var(--red); }
.me.is-out { filter: grayscale(.8); opacity: .75; }
.me-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.me-name { margin: 0; font-family: var(--display); font-size: 16px; text-transform: uppercase; letter-spacing: .04em; }
.turn-pill {
  padding: 2px 10px;
  background: var(--red);
  color: var(--paper-hi);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 2px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .65; } }
.me-body { display: flex; align-items: center; gap: 18px; }
.me-purse { flex: 1; }
.me-cards { display: flex; gap: 12px; }
.me-purse { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.me-purse .purse b { font-size: 34px; }
.purse-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.me-claims { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.me-claims-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }

/* Cards ---------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--card-w);
  aspect-ratio: 5 / 7;
  padding: 0 6px 7px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--paper-hi);
  color: var(--ink);
  overflow: hidden;
  text-align: center;
  box-shadow: 3px 3px 0 var(--ink);
  flex: none;
}
.card-band {
  position: absolute;
  inset: 0 0 auto 0;
  height: 44%;
  background: var(--role);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
}
.card-glyph {
  position: relative;
  width: 36%;
  height: auto;
  aspect-ratio: 1;
  margin-top: 9%;
  color: var(--paper-hi);
  stroke-width: 2;
}
.card-name {
  position: relative;
  margin-top: auto;
  padding-top: 4px;
  font-family: var(--display);
  font-size: calc(var(--card-w) * .1);
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.1;
  color: var(--role);
}
.role-assassin .card-name { color: var(--ink); }
.card-does, .card-blocks {
  position: relative;
  font-size: max(11px, calc(var(--card-w) * .095));
  line-height: 1.2;
  margin-top: 3px;
}
.card-blocks { color: var(--ink-soft); }
.card.is-lost { opacity: .55; filter: grayscale(.6); box-shadow: none; }
.card-stamp {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  padding: 2px 8px;
  border: 3px solid var(--red);
  color: var(--red);
  font-family: var(--display);
  font-size: 15px;
  text-transform: uppercase;
  background: var(--paper-hi);
}
button.card { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.card.is-pickable { animation: wobble 1.4s ease-in-out infinite; box-shadow: 5px 5px 0 var(--red); }
.card.is-pickable:hover { transform: translateY(-4px); }
@keyframes wobble { 50% { transform: translateY(-3px) rotate(-1deg); } }

/* ==========================================================================
   Action bar
   ========================================================================== */
.actionbar {
  grid-area: bar;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px max(14px, env(safe-area-inset-right)) calc(12px + var(--safe-b)) max(14px, env(safe-area-inset-left));
  background: var(--ink);
  color: var(--paper);
  border-top: 4px solid var(--red);
}
.actionbar :focus-visible { outline-color: #ffd166; }
.status { min-height: 2.6em; }
.status p { margin: 0; }
.status-event { font-size: 14px; color: #cfc5b0; line-height: 1.35; }
.status-prompt { font-size: 16px; font-weight: 700; color: var(--paper-hi); }
.status-event:empty { display: none; }

.actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
}
.actions:empty { display: none; }
.actions[data-kind="challenge"], .actions[data-kind="block_challenge"], .actions[data-kind="block"], .actions[data-kind="lose"] {
  grid-template-columns: repeat(auto-fit, minmax(150px, 220px));
}
.actions[data-kind="aim"] { grid-template-columns: repeat(auto-fit, minmax(130px, 200px)); }

.move {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 7px;
  min-height: 54px;
  padding: 7px 10px 7px 12px;
  text-align: left;
  border: 2px solid var(--paper);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 3px 0 #000;
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.move > .glyph-sm, .move > .badge { grid-row: 1 / span 2; }
.move:not(.has-role):not(.move-target) .move-name,
.move:not(.has-role):not(.move-target) .move-sub { grid-column: 1 / -1; }
.move-name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.move-sub { font-size: 12px; line-height: 1.25; color: var(--ink-soft); }
.move:hover:not(:disabled) { background: var(--paper-hi); }
.move:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.move:disabled { opacity: .38; box-shadow: none; }
.move.has-role { border-left: 8px solid var(--role); padding-left: 8px; }
.move.has-role > .glyph-sm { color: var(--role); }
.move-primary { background: var(--red); border-color: var(--red); color: var(--paper-hi); }
.move-primary .move-sub { color: #ffd9d3; }
.move-primary:hover:not(:disabled) { background: #e03a2a; }
.move-danger { background: var(--red); border-color: var(--red); color: var(--paper-hi); }
.move-danger .move-sub { color: #ffd9d3; }
.move-danger:hover:not(:disabled) { background: #e03a2a; }
.move-cancel { background: transparent; color: var(--paper); box-shadow: none; }
.move-cancel .move-sub { color: #bdb3a0; }
.move-cancel:hover:not(:disabled) { background: rgba(236, 227, 207, .1); }

.tag {
  position: absolute;
  top: -8px;
  right: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 2px;
  line-height: 1.4;
}
.tag-true { background: var(--ambassador); color: #fff; }
.tag-bluff { background: var(--ink); color: var(--red-hi); border: 1.5px solid var(--red-hi); }

/* ==========================================================================
   Dispatches (log)
   ========================================================================== */
.dispatches {
  position: fixed;
  z-index: 20;
  left: 0; right: 0; bottom: 0;
  max-height: 70dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper-hi) var(--grain);
  border-top: 4px solid var(--ink);
  box-shadow: 0 -8px 0 rgba(27, 25, 22, .15);
  transform: translateY(105%);
  visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
}
.dispatches.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
.dispatches-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  border-bottom: 2px solid var(--ink);
}
.dispatches-head h2 { margin: 0; font-family: var(--display); font-size: 16px; text-transform: uppercase; letter-spacing: .04em; }
.dispatches-head h2:focus { outline: none; }
.dispatches-close { border-color: var(--ink); color: var(--ink); }
.dispatches-close:hover { background: var(--ink); color: var(--paper); }
.dispatch-list {
  list-style: none;
  margin: 0;
  padding: 8px 16px calc(16px + var(--safe-b));
  overflow-y: auto;
  font-size: 14px;
}
.dispatch { padding: 6px 0; border-bottom: 1px dashed rgba(27, 25, 22, .2); }
.dispatch-turn {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  border-bottom: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--red-ink);
}

@media (min-width: 1100px) {
  .app {
    grid-template-columns: minmax(0, 1fr) 330px;
    grid-template-areas: "top top" "table log" "bar log";
  }
  .dispatches {
    position: static;
    grid-area: log;
    max-height: none;
    transform: none;
    visibility: visible;
    border-top: 0;
    border-left: 3px solid var(--ink);
    box-shadow: none;
    min-height: 0;
  }
  .dispatches-close, .log-toggle { display: none; }
}

/* ==========================================================================
   Dialogs
   ========================================================================== */
dialog {
  color: var(--ink);
  padding: 0;
  border: 0;
}
dialog::backdrop { background: rgba(27, 25, 22, .62); }

.sheet {
  width: min(92vw, 460px);
  max-height: 90dvh;
  overflow: auto;
  padding: 26px 24px 20px;
  background: var(--paper-hi) var(--grain);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.sheet-wide { width: min(94vw, 680px); }
.sheet-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.15;
}
.sheet-sub { margin: 0 0 16px; color: var(--ink-2); }
.sheet-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }

dialog[open] { animation: rise .22s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .45; box-shadow: none; }
.btn-primary { background: var(--red); color: var(--paper-hi); }
.btn-primary:hover:not(:disabled) { background: #e03a2a; }
.btn-secondary { background: var(--paper); }
.btn-secondary:hover { background: var(--paper-2); }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--paper-2); }
.btn-lg { min-height: 54px; padding: 12px 26px; font-size: 18px; }
.btn-block { width: 100%; }
.btn-link {
  border: 0;
  background: none;
  padding: 8px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.error-text { color: var(--red-ink); font-weight: 700; margin: 0; }

/* Setup screen --------------------------------------------------------------- */
.screen {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  background: var(--paper) var(--grain);
  overflow-y: auto;
}
.screen::backdrop { background: var(--paper); }
.setup-inner {
  position: relative;
  min-height: 100%;
  width: min(100%, 620px);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px calc(24px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.poster {
  position: relative;
  height: 210px;
  margin: 4px -20px 0;
  overflow: hidden;
}
.poster-sun {
  position: absolute;
  width: 230px; height: 230px;
  left: 50%; top: 50%;
  transform: translate(-70%, -46%);
  border-radius: 50%;
  background: var(--ink);
}
.poster-wedge {
  position: absolute;
  right: 0; top: 10%;
  width: 62%; height: 80%;
  background: var(--red);
  clip-path: polygon(100% 0, 100% 100%, 0 52%);
}
.poster-fan { position: absolute; left: 50%; bottom: -26px; width: 0; height: 0; }
.poster-card {
  --card-w: 92px;
  position: absolute;
  left: 0; bottom: 0;
  transform-origin: 50% 120%;
  transform: translateX(calc(-50% + (var(--k) - 2) * var(--spread, 24px))) rotate(calc((var(--k) - 2) * 11deg)) translateY(calc(var(--lift) * 8px));
  animation: deal .6s cubic-bezier(.2, 1.3, .4, 1) both;
  animation-delay: calc(var(--k) * 70ms + 120ms);
}
.poster-card .card-blocks, .poster-card .card-does { display: none; }
@keyframes deal {
  from { opacity: 0; transform: translateX(-50%) translateY(60px) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) { .poster-card { animation: none; } }
.setup-title {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: clamp(44px, 14vw, 84px);
  line-height: .9;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--red);
  text-shadow: 5px 5px 0 var(--ink);
}
.setup-tagline { margin: 0; font-size: 18px; max-width: 34em; }
.setup-form { display: flex; flex-direction: column; gap: 16px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.count-row { display: flex; gap: 8px; }
.count-opt { position: relative; flex: 1; }
.count-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.count-num {
  display: grid;
  place-items: center;
  height: 52px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-hi);
  font-family: var(--display);
  font-size: 20px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: background .12s ease, color .12s ease, transform .08s ease;
}
.count-opt input:checked + .count-num { background: var(--ink); color: var(--paper-hi); box-shadow: 3px 3px 0 var(--red); }
.count-opt input:focus-visible + .count-num { outline: 3px solid var(--focus); outline-offset: 3px; }
.count-opt:hover .count-num { transform: translateY(-1px); }

.rival-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rival {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  padding: 8px 10px;
  background: var(--paper-hi);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}
.rival .badge { grid-row: 1 / span 2; }
.rival-name { font-weight: 700; font-size: 17px; }
.rival-blurb { grid-column: 2; font-size: 13px; color: var(--ink-soft); }
.rival-style {
  grid-column: 3;
  grid-row: 1 / span 2;
  min-height: 42px;
  padding: 6px 30px 6px 10px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%231b1916' stroke-width='2'/></svg>") no-repeat right 10px center / 12px;
  appearance: none;
  font-weight: 700;
}
.setup-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: 4px; }

/* Exchange ------------------------------------------------------------------- */
.exchange-cards {
  --card-w: 112px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 6px 0 4px;
}
.ex-card { transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.ex-card:hover { transform: translateY(-3px); }
.ex-card.is-kept { transform: translateY(-8px); box-shadow: 5px 5px 0 var(--red); border-color: var(--red); }
.card-from {
  position: absolute;
  top: 5px; left: 5px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--paper-hi);
  color: var(--ink);
  border-radius: 2px;
}
.card-check {
  position: absolute;
  top: 38%; left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg) scale(.6);
  padding: 2px 10px;
  border: 3px solid var(--red);
  background: var(--paper-hi);
  color: var(--red);
  font-family: var(--display);
  font-size: 14px;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .12s ease, transform .18s cubic-bezier(.2, 1.6, .4, 1);
}
.ex-card.is-kept .card-check { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
.ex-card .card-blocks { display: none; }
.ex-card .card-glyph { margin-top: 26px; width: 30%; }
#exchange-dialog { width: min(94vw, 600px); }

/* Rules ---------------------------------------------------------------------- */
.rules-text { max-height: 62dvh; overflow-y: auto; padding-right: 4px; }
.rules-text section + section { margin-top: 14px; }
.rules-text h3 { margin: 0 0 4px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--red-ink); }
.rules-text p { margin: 0 0 6px; }
.rules-moves { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.rules-moves li { display: block; }
.rules-moves .glyph-xs { color: var(--role); vertical-align: -2px; margin-right: 5px; }
.rules-text span[class^="role-"] { color: var(--role); font-weight: 700; }

/* Menu ----------------------------------------------------------------------- */
.menu-actions { display: flex; flex-direction: column; gap: 10px; }
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  border: 2px dashed var(--ink);
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
}
.toggle input { width: 20px; height: 20px; accent-color: var(--red); }
.kbd-help { margin-top: 18px; font-size: 14px; }
.kbd-help h3 { margin: 0 0 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.kbd-help dl { margin: 0; display: grid; gap: 4px; }
.kbd-help dl div { display: flex; gap: 10px; }
.kbd-help dt { min-width: 64px; }
.kbd-help dd { margin: 0; }
kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 5px;
  border: 1.5px solid var(--ink);
  border-bottom-width: 3px;
  border-radius: 3px;
  font-family: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  background: var(--paper);
}

/* Game over ------------------------------------------------------------------ */
.over-kicker {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 10px;
  background: var(--ink);
  color: var(--paper-hi);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}
.over-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: clamp(26px, 7vw, 36px);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--red);
  text-shadow: 3px 3px 0 var(--ink);
}
.standings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.standing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}
.standing.is-winner { background: var(--ink); color: var(--paper-hi); box-shadow: 3px 3px 0 var(--red); }
.standing.is-winner .badge svg { fill: var(--paper-hi); }
.standing.is-winner .badge-mono { color: var(--ink); }
.standing.is-winner .badge-you svg { fill: var(--red); }
.badge-triangle .badge-mono { transform: translateY(3px) scale(.85); }
.standing.is-you .standing-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.standing-rank { font-family: var(--display); width: 18px; }
.standing-name { font-weight: 700; flex: 1; }
.standing-status { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.over-log { margin-top: 14px; }
.over-log summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.over-log .dispatch-list { max-height: 30dvh; padding: 0 4px 0 0; }

/* ==========================================================================
   Effects
   ========================================================================== */
.fx {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 30%;
  pointer-events: none;
  font-family: var(--display);
  text-transform: uppercase;
  white-space: nowrap;
}
.fx-coin, .fx-coin-loss {
  font-size: 22px;
  color: var(--gold-ink);
  text-shadow: 2px 2px 0 var(--paper-hi);
  animation: float-up 1.4s ease-out forwards;
}
.fx-coin-loss { color: var(--red-ink); }
@keyframes float-up {
  from { opacity: 0; transform: translate(-50%, 6px); }
  15% { opacity: 1; }
  to { opacity: 0; transform: translate(-50%, -38px); }
}
.fx-bluff, .fx-proven, .fx-block, .fx-out {
  top: 44%;
  padding: 2px 10px;
  font-size: 18px;
  border: 3px solid currentColor;
  background: var(--paper-hi);
  animation: stamp 1.7s cubic-bezier(.2, 1.6, .4, 1) forwards;
}
.fx-bluff { color: var(--red); }
.fx-proven { color: var(--ambassador); }
.fx-block { color: var(--captain); }
.fx-out { color: var(--ink); }
@keyframes stamp {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(2.2); }
  14% { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(1); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .seats[data-count="4"], .seats[data-count="5"] { --cols: 3; }
}

@media (max-width: 600px) {
  :root { --card-w: 70px; }
  .topbar { padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: 6px; }
  .wordmark { font-size: 16px; padding: 5px 8px 4px; }
  .brand { gap: 10px; }
  .tool-btn { min-height: 38px; padding: 5px 10px; }
  .table { gap: 10px; padding: 12px 10px 10px; }
  .seats { gap: 8px; }
  .seats[data-count="3"], .seats[data-count="4"], .seats[data-count="5"] { --cols: 3; }
  .seat { padding: 7px 8px 8px; gap: 5px; box-shadow: 3px 3px 0 var(--ink); }
  .seat-name { font-size: 14px; }
  .seat-style { display: none; }
  .badge { width: 22px; height: 22px; }
  .badge .badge-mono { font-size: 9px; }
  .purse b { font-size: 16px; }
  .coin { width: 12px; height: 12px; }
  .mini { width: 16px; height: 23px; border-width: 1.5px; }
  .mini .glyph-xs { width: 10px; height: 10px; }
  .claim-none { display: none; }
  .claim-chip { padding: 2px 4px; font-size: 11px; }
  .claim-chip > span:not(.chip-n):not(.chip-mark):not(.sr-only) { display: none; }
  .seats[data-count="1"] .claim-chip > span, .seats[data-count="2"] .claim-chip > span { display: inline !important; }
  .seat-tag { top: -9px; right: 6px; font-size: 10px; padding: 1px 5px; }
  .seat-hit::after { font-size: 10px; bottom: -9px; content: 'Target'; }

  .table::before { width: 120vw; border-width: 18px; }
  .stage { gap: 8px; }
  .stage-card { padding: 18px 12px 10px; box-shadow: 5px 5px 0 var(--ink); }
  .stage-kicker { font-size: 12px; top: -13px; left: 10px; }
  .stage-lede { font-size: 16px; }
  .stage-note { font-size: 13px; }
  .claim-role { min-width: 66px; padding: 6px 14px 6px 6px; font-size: 9px; }
  .claim-role .glyph-lg { width: 24px; height: 24px; }
  .claim-text { font-size: 15px; padding: 8px 10px; }
  .claim.is-dim .claim-text { font-size: 13px; }
  .court { gap: 6px; }
  .court-title { display: none; }
  .court-list { gap: 4px 9px; }
  .court-role { font-size: 0; gap: 3px; }
  .court-role .glyph-xs { width: 13px; height: 13px; }
  .pip { width: 7px; height: 7px; border-width: 1.5px; }

  .me { padding: 8px 10px 10px; }
  .me-head { margin-bottom: 6px; }
  .me-name { font-size: 13px; }
  .me-body { gap: 12px; }
  .me-cards { gap: 8px; }
  .card { padding: 0 3px 5px; border-radius: 5px; box-shadow: 2px 2px 0 var(--ink); }
  .me .card-does, .me .card-blocks { display: none; }
  .card-name { font-size: 9px; }
  .card-stamp { font-size: 11px; padding: 1px 5px; border-width: 2px; }
  .me-purse .purse b { font-size: 26px; }
  .me-purse { gap: 6px; }

  .actionbar { gap: 8px; padding-top: 9px; padding-bottom: calc(10px + var(--safe-b)); }
  .status { min-height: 0; }
  .status-event { font-size: 13px; }
  .status-prompt { font-size: 15px; }
  .actions { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .actions[data-kind="challenge"], .actions[data-kind="block_challenge"], .actions[data-kind="block"], .actions[data-kind="lose"], .actions[data-kind="aim"] {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }
  .move { min-height: 50px; padding: 5px 6px 5px 8px; column-gap: 4px; }
  .move.has-role { border-left-width: 5px; padding-left: 5px; }
  .move-name { font-size: 13px; }
  .move-sub { font-size: 11px; }
  .actions[data-kind="action"] .move > .glyph-sm { display: none; }
  .actions[data-kind="action"] .move-name, .actions[data-kind="action"] .move-sub { grid-column: 1 / -1; }
  .tag { font-size: 9px; top: -7px; right: 3px; padding: 0 4px; }

  .exchange-cards { --card-w: 84px; gap: 10px; }
  .exchange-cards .card-does { font-size: 10px; }
  .sheet { padding: 22px 16px 16px; }
  .poster { height: 170px; }
  .poster-sun { width: 180px; height: 180px; }
  .poster-card { --card-w: 72px; }
}

@media (max-width: 600px) and (max-height: 700px) {
  .court { display: none; }
}

/* Phones: keep your own cards on screen while you decide. */
@media (max-width: 600px) {
  .seat { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head head" "body body" "chips chips"; row-gap: 4px; min-height: 0; }
  .seat-head { grid-area: head; gap: 6px; }
  .seat-body { grid-area: body; }
  .seat .claim-chips { grid-area: chips; min-height: 18px; }
  .seat:not(:has(.claim-chips))::after { content: ''; grid-area: chips; height: 18px; }
  .stage-note { display: none; }
  .me { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "cards head" "cards purse"; column-gap: 12px; row-gap: 4px; align-items: start; }
  .me-body { display: contents; }
  .me-head { grid-area: head; margin: 0; }
  .me-cards { grid-area: cards; }
  .me-purse { grid-area: purse; gap: 4px; }
  .me .card { --card-w: 68px; }
  .me .role-ambassador .card-name { font-size: 10.5px; letter-spacing: -.03em; }
  .me .card-glyph { margin-top: 10%; }
  .me .claim-chip > span:not(.chip-n):not(.chip-mark):not(.sr-only) { display: none; }
  .me-claims { flex-direction: row; align-items: center; gap: 6px; }
  .me-claims-label { font-size: 10px; }
  .turn-pill { font-size: 10px; padding: 1px 6px; }
  .status-event { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .move { min-height: 46px; }
  .move-name { font-size: 12.5px; hyphens: auto; overflow-wrap: break-word; }
  .move-sub { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .exchange-cards { --card-w: 72px; gap: 8px; }
  .ex-card .card-glyph { margin-top: 20px; }
  .ex-card .card-from { font-size: 8px; padding: 0 3px; left: 3px; top: 3px; }
  .card-name, .role-ambassador .card-name { font-family: var(--text); font-weight: 700; text-transform: none; letter-spacing: -.01em; font-size: 11px; }
}
@media (min-width: 601px) {
  .role-ambassador .card-name { font-size: calc(var(--card-w) * .085); }
}

@media (min-width: 601px) and (max-height: 820px) {
  :root { --card-w: 100px; }
  .table { gap: 12px; padding-top: 14px; }
  .stage { gap: 10px; }
  .stage-card { padding: 20px 18px 12px; }
  .claim-text { padding: 8px 12px; }
  .me { padding: 10px 14px 12px; }
  .me-head { margin-bottom: 8px; }
  .me .card-blocks { display: none; }
}

/* Reduced motion: no movement, just state changes. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .seat.is-target, .card.is-pickable, .turn-pill, .dots i { animation: none !important; }
  .seat.is-thinking, .seat.is-target { transform: none; }
  .fx { display: none; }
}

/* Setup on wide screens: poster on the left, form on the right. */
@media (min-width: 900px) {
  .setup-inner {
    width: min(100%, 1120px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
    grid-template-rows: auto auto 1fr;
    column-gap: 56px;
    align-content: center;
    padding: 40px 48px;
  }
  .poster { grid-column: 1; grid-row: 1 / span 3; height: auto; min-height: 520px; margin: 0; overflow: visible; }
  .poster-sun { width: 380px; height: 380px; transform: translate(-62%, -58%); }
  .poster-wedge { top: 10%; height: 66%; width: 72%; right: 0; }
  .poster-fan { bottom: 70px; left: 46%; }
  .poster-card { --card-w: 132px; --spread: 52px; transform-origin: 50% 130%; }
  .poster-card .card-does { display: block; }
  .setup-title, .setup-tagline, .setup-form { grid-column: 2; }
  .setup-title { align-self: end; }
}

/* Narrow phones: the longer wordmark needs the room the button icons took. */
@media (max-width: 400px) {
  .tool-btn svg { display: none; }
  .topbar { gap: 8px; }
  .topbar-tools { gap: 6px; }
}
