/* PLAYER_COLORS (script.js) spans the whole hue wheel — red, blue, gold,
   green, purple, orange, cyan, pink — so any saturated UI accent would
   collide with some player's identity color. The chrome is therefore warm
   neutral throughout: player color stays the only saturated color on screen,
   which is what it has to identify. */
:root {
  --bg: #16131d;
  --surface: #211c2b;
  --border: #363044;
  --fg: #ece7e0;
  --fg-dim: #a197ab;
  --accent: #ffd9a0;
  --accent-ink: #201a12;
  --danger: #ff6b6b;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  padding: 1.5rem;
  -webkit-tap-highlight-color: transparent;
}

/* Fraunces carries the display voice (title, player names, results); Inter
   handles everything functional. Both fall back to a stack that keeps the
   layout intact if Google Fonts is slow or blocked mid-playtest. */
.title,
.instructions-heading,
.turn-player-name,
.winner-announcement,
.score-gauge-label,
.online-room-code,
.award-value {
  font-family: var(--font-display);
  font-optical-sizing: auto;
}

#app {
  width: 100%;
  max-width: 480px;
}

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

/* Buttons */

button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn {
  font: inherit;
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  opacity: 0.9;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--fg-dim);
  color: var(--fg);
}

.btn-danger {
  background: var(--danger);
}

.btn-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* For vertically stacked action buttons (e.g. Start/Play Online on the
   title screen): stretches every .btn to the width of the widest one,
   rather than each hugging its own label. The container's own width still
   shrinks to that widest child (flex column + align-items: stretch), so
   the group stays centered instead of spanning the full screen. */
.btn-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.btn-stack .btn {
  width: 100%;
}

/* Title screen */

/* "Constellationz" is 14 characters, so a fixed size overflows a narrow
   phone. Scale with the viewport and cap at the size the old short title
   used. */
.title {
  font-size: clamp(1.9rem, 9.5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* Pinned to the viewport corner (not the title screen's own box, which is
   only as tall as its content) so it reads as a persistent build watermark
   rather than shifting with the layout above it. */
.version-label {
  position: fixed;
  right: 0.75rem;
  bottom: 0.6rem;
  font-size: 0.75rem;
  color: var(--fg-dim);
  opacity: 0.6;
  font-family: var(--font-ui);
}

/* Instructions screen */

.instructions-screen {
  gap: 0.85rem;
}

.instructions-heading {
  font-size: 1.75rem;
  letter-spacing: 0.02em;
}

.instructions-list {
  text-align: left;
  list-style: disc;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--fg);
  font-size: 0.88rem;
  line-height: 1.3;
  max-width: 34ch;
}

strong {
  color: var(--accent);
  font-weight: 700;
}

/* .circle-wrap.circle-wrap-demo (not just .circle-wrap-demo) so this
   reliably outranks the base .circle-wrap width rule regardless of
   source order — both are otherwise single-class selectors of equal
   specificity. */
.circle-wrap.circle-wrap-demo {
  width: min(55vw, 220px);
}

@media (min-width: 480px) {
  .circle-wrap.circle-wrap-demo {
    width: 170px;
  }
}

.demo-hint {
  min-height: 2.2em;
  font-size: 0.85rem;
}

/* Config screen */

.config-section {
  width: 100%;
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.config-section h2 {
  font-size: 1rem;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.stepper-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}

.stepper-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.stepper-value {
  font-size: 1.5rem;
  min-width: 2ch;
  text-align: center;
}

.player-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-row input[type="text"] {
  flex: 1;
  font: inherit;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
}

/* Wraps because there are now more modes than fit across a phone in one
   row — five buttons at a readable size is two rows, not five slivers. */
.mode-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.mode-btn {
  flex: 1 1 7rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
}

.mode-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.mode-description {
  max-width: none;
}

/* Mode callout — the accent left edge is the whole point: it has to be the
   thing your eye lands on when the screen is otherwise a list of rules you
   already know. */
.mode-callout {
  width: 100%;
  max-width: 34ch;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0.6rem;
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mode-callout-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.mode-callout-body {
  font-size: 0.88rem;
  line-height: 1.35;
}

/* Draft screen */

.draft-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.draft-prompt {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.draft-grid {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.draft-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: 0.7rem;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}

.draft-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Once the quota is met the words you didn't take go quiet rather than
   disappearing, so the trade-off stays visible. */
.draft-chip:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Judge screen */

.judge-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.judge-option {
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.7rem 1rem;
  border-radius: 0.7rem;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  text-align: left;
}

.judge-option.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Turn screen */

.turn-round {
  color: var(--fg-dim);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.turn-player-name {
  font-size: 2.5rem;
  font-weight: 600;
}

.turn-hint {
  color: var(--fg-dim);
  font-size: 0.95rem;
  max-width: 32ch;
}

.round-prompt {
  width: 100%;
  max-width: 32ch;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 0.6rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-style: italic;
  color: var(--fg);
}

/* Game screen */

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.game-header .turn-round {
  text-align: left;
}

.lines-remaining {
  font-size: 1rem;
  color: var(--fg-dim);
}

.circle-wrap {
  position: relative;
  width: min(85vw, 380px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.circle-wrap svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.no-matches-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg-dim);
  background: rgba(22, 19, 29, 0.88);
  border-radius: 1rem;
  pointer-events: none;
}

/* In-game reminder of Bonus scores mode's two extra objectives. Sits between
   the header and the circle, so it stays in view while picking without
   competing with the words themselves. */
.bonus-reminder {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
}

.bonus-reminder-item {
  font-weight: 600;
  white-space: nowrap;
}

.bonus-reminder-note {
  color: var(--fg-dim);
  font-size: 0.72rem;
  white-space: nowrap;
}

.bonus-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--surface);
  border-radius: 0.6rem;
  padding: 0.75rem 1rem;
}

.bonus-panel-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--fg);
}

.bonus-row-swatch {
  width: 1.6rem;
  height: 0.5rem;
  flex-shrink: 0;
  align-self: center;
}

.bonus-row-label {
  font-weight: 600;
}

.bonus-row-pair {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 700;
}

.bonus-row-credit {
  color: var(--fg-dim);
}

.bonus-row-name {
  font-weight: 700;
}

.bonus-row-empty {
  color: var(--fg-dim);
  font-style: italic;
}

/* The points are the answer to "wait, who scored?", so they get a chip
   rather than trailing prose. */
.bonus-row-points {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

/* Rounded tiles rather than full pills — the flat capsule read as generic,
   and the squarer corner gives the words an object-like presence.

   max-width plus wrapping rather than nowrap: 93% of the bank is 8
   characters or fewer and never reaches the cap, but the long tail
   ("Constellation", "Caterpillar") would otherwise punch out of the circle
   at the 3 and 9 o'clock positions. */
.word-node {
  position: absolute;
  transform: translate(-50%, -50%);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 30%;
  padding: 0.45rem 0.7rem;
  border-radius: 0.7rem;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  white-space: normal;
  overflow-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  /* none, not manipulation: a drag starting on a word is a connection
     gesture, so the browser must not claim it as a scroll or a pan. Only the
     nodes opt out — dragging anywhere else on the page still scrolls. */
  touch-action: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease,
    box-shadow 0.15s ease;
}

.word-node:hover {
  border-color: var(--accent);
}

/* Connect / disconnect feedback. The line itself animates via inline
   stroke-dashoffset (see addLine/removeLine in script.js); these are the
   accompanying flourishes on the midpoint and the two connected words.

   transform-box: view-box makes transform-origin resolve in the SVG's
   viewBox units, so the ring can be scaled about the line midpoint that
   script.js writes into transform-origin. */
.spark-ring {
  transform-box: view-box;
  animation: spark-ring 380ms ease-out forwards;
}

@keyframes spark-ring {
  from {
    transform: scale(0.35);
    opacity: 0.95;
  }
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

.word-node.pop {
  animation: node-pop 300ms ease-out;
}

@keyframes node-pop {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  45% {
    transform: translate(-50%, -50%) scale(1.18);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.word-node.unpop {
  animation: node-unpop 260ms ease-out;
}

@keyframes node-unpop {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  40% {
    transform: translate(-50%, -50%) scale(0.88);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spark-ring,
  .word-node.pop,
  .word-node.unpop {
    animation: none;
  }
}

.word-node.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: translate(-50%, -50%) scale(1.08);
}

/* A connected word keeps full opacity and gains a ring — dimming it read as
   "disabled" in playtesting (see SPEC.md, round 1). The soft halo makes the
   connected set legible at a glance without another border weight. */
.word-node.used {
  border-color: var(--accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(255, 217, 160, 0.13);
}

/* The node a drag started from, held until the pointer is released. Same
   accent as .selected, since it means the same thing — this is one end of the
   line you're making — but scaled down rather than up, so it reads as
   "anchored" while the rubber band stretches away from it. */
.word-node.dragging {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: translate(-50%, -50%) scale(0.96);
}

.word-node:disabled {
  cursor: not-allowed;
}

/* The rubber band follows the pointer, so it must never eat the hit test that
   decides which node the drag was released over. */
.drag-preview {
  pointer-events: none;
  opacity: 0.85;
}

/* max-width is a share of the circle, so the demo and carousel circles (both
   much smaller than the game one) get a proportionally tighter cap. Scale the
   type down with them so ordinary words still sit on one line there. */
.circle-wrap-demo .word-node,
.carousel-circle .word-node {
  font-size: 0.62rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0.5rem;
}

.word-node-badge {
  display: none;
  position: absolute;
  top: -0.45rem;
  right: -0.45rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.65rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.word-node-badge.visible {
  display: flex;
}

/* Scoring screen */

.details-toggle {
  font-size: 0.9rem;
  padding: 0.5rem 1.5rem;
}

.details-panel {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.details-panel.open {
  display: flex;
}

/* Still used by the online screens, which render their own player dots. */
.legend-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  flex-shrink: 0;
}

/* A player's identity marker: their shape, filled in their color. Slightly
   larger than the dot it replaces, since a silhouette needs more room to be
   recognisable than a circle does. */
.player-mark {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  overflow: visible;
}

.player-mark-md {
  width: 1.75rem;
  height: 1.75rem;
}

.player-mark-lg {
  width: 3rem;
  height: 3rem;
  margin: 0 auto;
}

.carousel-header-mark {
  display: inline-flex;
  align-items: center;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 0.6rem;
  overflow: hidden;
  font-size: 0.85rem;
}

.score-table th,
.score-table td {
  padding: 0.5rem 0.6rem;
  text-align: center;
}

.score-table thead th {
  color: var(--fg-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.score-table-player-col {
  text-align: left;
}

.score-table-player {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.score-table-total {
  font-weight: 700;
  color: var(--accent);
}

.connections-col {
  text-align: left;
}

.connections-cell {
  text-align: left;
  font-size: 0.78rem;
  color: var(--fg-dim);
}

.match-players-cell {
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.match-player-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--fg-dim);
  white-space: nowrap;
}

/* Section heading inside the details panel (used by the picks carousel and
   the pair scores table). */
.round-score-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-dim);
}

/* Pair scores (Bonus scores mode) */

.pair-scores {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.pair-scores-hint {
  font-size: 0.78rem;
  color: var(--fg-dim);
  max-width: 34ch;
}

/* Round 3 is 9 words = 36 pairs, far too many to sit inline in the details
   panel — cap the height and scroll instead. */
.pair-scores-scroll {
  width: 100%;
  max-height: 15rem;
  overflow-y: auto;
  border-radius: 0.6rem;
}

.pair-scores-table {
  border-radius: 0;
}

.pair-scores-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
}

.pair-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pair-words {
  color: var(--fg);
}

.pair-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--fg-dim);
  white-space: nowrap;
}

.pair-score-cell {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  width: 3.5rem;
}

.carousel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.carousel-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.carousel-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.carousel-arrow {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--fg-dim);
  background: transparent;
  color: var(--fg);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.carousel-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.carousel-circle {
  width: min(62vw, 260px);
  touch-action: pan-y;
}

.carousel-dots {
  display: flex;
  gap: 0.4rem;
}

.carousel-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  touch-action: manipulation;
}

.carousel-dot.active {
  background: var(--accent);
}

/* Online (multiplayer) screens */

.online-screen {
  gap: 1rem;
}

.online-error {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem;
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid var(--danger);
  color: var(--fg);
  font-size: 0.85rem;
}

.online-name-input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  text-align: center;
}

.online-code-input {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
}

.online-room-code {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.online-player-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.online-player-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border-radius: 0.6rem;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
}

.online-end-results {
  width: 100%;
}

/* End screen */

.winner-announcement {
  margin-bottom: 1rem;
  width: 100%;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-ink);
  background: linear-gradient(135deg, #ffd9a0, #f0a868);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
}

/* End screen superlative award */

.award {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: var(--surface);
  border-radius: 0.6rem;
  padding: 0.8rem 1rem;
}

.award-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-dim);
  margin-bottom: 0.15rem;
}

.award-value {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1rem;
  font-weight: 700;
}

.award-round {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
}

.award-note {
  font-size: 0.75rem;
  color: var(--fg-dim);
}

/* Wraps every award card the registry produced, under one heading, so the
   End screen reads as a single "Awards" block rather than a stack of
   unrelated panels. */
.awards {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.awards-heading {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.25rem 0 0;
}

.score-gauge {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.score-gauge-label {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
}

.score-gauge-track {
  width: 100%;
  height: 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}

.score-gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd9a0, #f0a868);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.score-gauge-score {
  color: var(--fg-dim);
  font-size: 0.9rem;
}

/* ---- Wide viewports ---------------------------------------------------- */

/* The layout was capped at a 480px phone column at every size, which on a
   laptop left the game as a narrow strip in the middle of an empty screen.

   This scales the column and the circle up rather than filling the viewport
   edge to edge: the circle is the game and benefits from the room, but a
   score table stretched to 1200px is harder to read, not easier, so the
   tables keep a comfortable measure and stay centered.

   .game-screen/.scoring-screen scope the circle rule deliberately. A bare
   .circle-wrap here would also match .carousel-circle and (by source order,
   at equal specificity) override its own narrower width. */
@media (min-width: 760px) {
  #app {
    max-width: 680px;
  }

  .game-screen .circle-wrap,
  .scoring-screen .circle-wrap {
    width: min(58vw, 460px);
  }

  .game-screen .word-node,
  .scoring-screen .word-node {
    font-size: 0.95rem;
    padding: 0.55rem 0.85rem;
  }

  .title {
    font-size: 4.5rem;
  }

  .judge-list,
  .draft-grid,
  .score-table,
  .pair-scores-scroll,
  .pair-scores-hint,
  .bonus-panel,
  .bonus-reminder,
  .award,
  .winner-announcement,
  .score-gauge {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Eight player rows in one column is a lot of scrolling on a screen with
     room to spare. */
  .player-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .instructions-list {
    font-size: 0.95rem;
    max-width: 46ch;
  }

  .mode-callout {
    max-width: 46ch;
  }
}
