:root {
  color-scheme: light;
  --bg: #15110d;
  --felt: #4f544f;
  --board: #dbe5da;
  --paper: #fffdf1;
  --paper-warm: #f3efd9;
  --ink: #171717;
  --muted: #5b5f59;
  --line: #080808;
  --accent: #cb2f29;
  --accent-2: #0b83ad;
  --accent-3: #efc43e;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  --red: #e31f24;
  --blue: #08a8db;
  --green: #16b85c;
  --yellow: #f0cf25;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.06), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%) 0 0 / 22px 22px,
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.35;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.app-shell {
  min-height: 100vh;
  padding: clamp(10px, 2.6vw, 28px);
}

.app-frame {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  color: #fffaf0;
}

.brand {
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 7vw, 4.4rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.32);
}

.brand-kicker {
  margin: 7px 0 0;
  color: #efe7d5;
  font-size: clamp(0.88rem, 2vw, 1.02rem);
  max-width: 660px;
}

.field {
  display: grid;
  gap: 7px;
}

label,
.label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: 9px 11px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.18);
}

.launch-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 18px;
  align-items: start;
}

.panel,
.game-card,
.lobby-card,
.players-card {
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-warm);
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(16px, 3vw, 24px);
}

.player-setup {
  display: grid;
  gap: 14px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mode-card {
  display: grid;
  gap: 12px;
  align-content: space-between;
  min-height: 245px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 16px;
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.03);
}

.mode-card h2,
.lobby-card h2,
.side-panel h2 {
  margin: 0;
  font-size: 1.12rem;
}

.mode-card p {
  margin: 0;
  color: var(--muted);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 14px;
  font-weight: 950;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}

.btn:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.22);
}

.btn:active:not(:disabled) {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.18);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-secondary {
  background: var(--accent-2);
  color: #ffffff;
}

.btn-warning {
  background: var(--accent-3);
  color: #1b1712;
}

.btn-quiet {
  background: transparent;
  box-shadow: none;
}

.btn-tiny {
  min-height: 28px;
  border-width: 1.5px;
  padding: 4px 8px;
  font-size: 0.72rem;
  box-shadow: none;
}

.status-strip {
  margin-top: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 10px 12px;
  color: var(--muted);
}

.status-strip strong {
  color: var(--ink);
}

.lobby-card {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 24px);
}

.room-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  border: 3px dashed var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 12px 18px;
  font-size: clamp(1.75rem, 9vw, 3.2rem);
  font-weight: 1000;
  letter-spacing: 0.12em;
}

.seat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.seat-card {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 12px;
}

.seat-card[data-color="red"] {
  border-color: var(--red);
}

.seat-card[data-color="blue"] {
  border-color: var(--blue);
}

.seat-card[data-color="green"] {
  border-color: var(--green);
}

.seat-card[data-color="yellow"] {
  border-color: var(--yellow);
}

.seat-name {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 4px;
  font-weight: 950;
}

.seat-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.game-shell {
  display: grid;
  grid-template-columns: minmax(310px, 1fr) minmax(250px, 330px);
  gap: 16px;
  align-items: start;
}

.game-card {
  padding: clamp(7px, 1.5vw, 12px);
  background: #26241d;
}

.board-wrap {
  display: grid;
  place-items: center;
}

.board {
  position: relative;
  display: grid;
  width: min(98vw, 760px);
  max-width: 100%;
  aspect-ratio: 1;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(15, 1fr);
  gap: 0;
  border: clamp(4px, 1.1vw, 8px) solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.46), rgba(87, 122, 103, 0.16)),
    var(--board);
  background-size: 16px 16px, 16px 16px, auto, auto;
  box-shadow:
    inset 0 0 0 clamp(2px, 0.6vw, 4px) rgba(255, 255, 255, 0.72),
    0 14px 30px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.board-space {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border: 1.5px solid rgba(8, 8, 8, 0.82);
  border-radius: clamp(3px, 0.65vw, 6px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(235, 225, 196, 0.92)),
    var(--paper);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  overflow: visible;
}

.track-space:nth-child(2n) {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(228, 221, 194, 0.95)),
    #f7f2df;
}

.home-lane {
  border-width: 2px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.35),
    inset 0 -8px 14px rgba(0, 0, 0, 0.14);
}

.home-lane::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.36rem, 1.45vw, 0.62rem);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.42);
  text-transform: uppercase;
  content: "Safe";
}

.home-lane[data-color="red"] {
  background: linear-gradient(145deg, #ff7b72, var(--red));
}

.home-lane[data-color="blue"] {
  background: linear-gradient(145deg, #72dcf6, var(--blue));
}

.home-lane[data-color="green"] {
  background: linear-gradient(145deg, #64dc91, var(--green));
}

.home-lane[data-color="yellow"] {
  background: linear-gradient(145deg, #ffe777, var(--yellow));
}

.home-lane[data-color="yellow"]::before {
  color: rgba(30, 24, 6, 0.8);
  text-shadow: none;
}

.slip-lane {
  --slip: var(--accent);
  --slip-deep: #7d1715;
  --slip-mark: #ffffff;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: clamp(1px, 0.35vw, 4px);
  align-self: stretch;
  justify-self: stretch;
  margin: clamp(2px, 0.45vw, 4px);
  border: clamp(1px, 0.35vw, 2px) solid rgba(8, 8, 8, 0.76);
  border-radius: clamp(5px, 1vw, 9px);
  background:
    linear-gradient(var(--slip-angle, 90deg), var(--slip-deep), var(--slip)),
    var(--slip);
  color: var(--slip-mark);
  font-size: clamp(0.42rem, 1.45vw, 0.72rem);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.46);
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    1px 2px 0 rgba(0, 0, 0, 0.18);
}

.slip-lane[data-color="red"] {
  --slip: #f34343;
  --slip-deep: #a9141d;
}

.slip-lane[data-color="blue"] {
  --slip: #21bce8;
  --slip-deep: #08779b;
}

.slip-lane[data-color="green"] {
  --slip: #23c766;
  --slip-deep: #097c43;
}

.slip-lane[data-color="yellow"] {
  --slip: #f7d547;
  --slip-deep: #c0960c;
  --slip-mark: #211b06;
  text-shadow: none;
}

.slip-lane[data-direction="west"] {
  --slip-angle: 270deg;
  flex-direction: row-reverse;
}

.slip-lane[data-direction="south"] {
  --slip-angle: 180deg;
  flex-direction: column;
}

.slip-lane[data-direction="north"] {
  --slip-angle: 0deg;
  flex-direction: column-reverse;
}

.slip-label {
  position: relative;
  z-index: 1;
  padding: 0 clamp(1px, 0.4vw, 4px);
}

.slip-lane[data-direction="north"] .slip-label,
.slip-lane[data-direction="south"] .slip-label {
  transform: rotate(90deg);
}

.slip-arrow {
  position: relative;
  flex: 1 1 auto;
  height: clamp(3px, 0.9vw, 6px);
  min-width: clamp(10px, 2vw, 24px);
  border-radius: 999px;
  background: var(--slip-mark);
  opacity: 0.88;
}

.slip-lane[data-direction="north"] .slip-arrow,
.slip-lane[data-direction="south"] .slip-arrow {
  width: clamp(3px, 0.9vw, 6px);
  min-width: 0;
  min-height: clamp(10px, 2vw, 24px);
  height: auto;
}

.slip-arrow::after {
  position: absolute;
  top: 50%;
  right: calc(clamp(4px, 1vw, 7px) * -1);
  width: 0;
  height: 0;
  border-top: clamp(4px, 0.9vw, 7px) solid transparent;
  border-bottom: clamp(4px, 0.9vw, 7px) solid transparent;
  border-left: clamp(5px, 1vw, 8px) solid var(--slip-mark);
  transform: translateY(-50%);
  content: "";
}

.slip-lane[data-direction="west"] .slip-arrow::after {
  right: auto;
  left: calc(clamp(4px, 1vw, 7px) * -1);
  border-right: clamp(5px, 1vw, 8px) solid var(--slip-mark);
  border-left: 0;
}

.slip-lane[data-direction="south"] .slip-arrow::after {
  top: auto;
  right: auto;
  bottom: calc(clamp(4px, 1vw, 7px) * -1);
  left: 50%;
  border-top: clamp(5px, 1vw, 8px) solid var(--slip-mark);
  border-right: clamp(4px, 0.9vw, 7px) solid transparent;
  border-bottom: 0;
  border-left: clamp(4px, 0.9vw, 7px) solid transparent;
  transform: translateX(-50%);
}

.slip-lane[data-direction="north"] .slip-arrow::after {
  top: calc(clamp(4px, 1vw, 7px) * -1);
  right: auto;
  bottom: auto;
  left: 50%;
  border-top: 0;
  border-right: clamp(4px, 0.9vw, 7px) solid transparent;
  border-bottom: clamp(5px, 1vw, 8px) solid var(--slip-mark);
  border-left: clamp(4px, 0.9vw, 7px) solid transparent;
  transform: translateX(-50%);
}

.slip-entry {
  width: 0;
  height: 0;
  border-top: clamp(5px, 1vw, 8px) solid transparent;
  border-bottom: clamp(5px, 1vw, 8px) solid transparent;
  border-left: clamp(7px, 1.3vw, 12px) solid var(--slip-mark);
  opacity: 0.94;
}

.slip-lane[data-direction="west"] .slip-entry {
  border-right: clamp(7px, 1.3vw, 12px) solid var(--slip-mark);
  border-left: 0;
}

.slip-lane[data-direction="south"] .slip-entry {
  border-top: clamp(7px, 1.3vw, 12px) solid var(--slip-mark);
  border-right: clamp(5px, 1vw, 8px) solid transparent;
  border-bottom: 0;
  border-left: clamp(5px, 1vw, 8px) solid transparent;
}

.slip-lane[data-direction="north"] .slip-entry {
  border-top: 0;
  border-right: clamp(5px, 1vw, 8px) solid transparent;
  border-bottom: clamp(7px, 1.3vw, 12px) solid var(--slip-mark);
  border-left: clamp(5px, 1vw, 8px) solid transparent;
}

.slip-exit {
  width: clamp(7px, 1.4vw, 12px);
  height: clamp(7px, 1.4vw, 12px);
  border: clamp(2px, 0.45vw, 3px) solid var(--slip-mark);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.start-base,
.finish-zone {
  z-index: 3;
  display: grid;
  gap: clamp(3px, 0.8vw, 7px);
  align-content: center;
  justify-items: center;
  min-width: 0;
  min-height: 0;
  border: clamp(2px, 0.65vw, 4px) solid var(--line);
  background: var(--paper);
}

.start-base {
  border-radius: 50%;
  padding: clamp(5px, 1.2vw, 10px);
  box-shadow:
    inset 0 0 0 clamp(4px, 1vw, 8px) rgba(255, 255, 255, 0.74),
    inset 0 -16px 24px rgba(0, 0, 0, 0.12),
    4px 5px 0 rgba(0, 0, 0, 0.24);
}

.start-base[data-color="red"] {
  background: var(--red);
}

.start-base[data-color="blue"] {
  background: var(--blue);
}

.start-base[data-color="green"] {
  background: var(--green);
}

.start-base[data-color="yellow"] {
  background: var(--yellow);
}

.base-label {
  display: grid;
  gap: 1px;
  max-width: 100%;
  color: var(--line);
  font-size: clamp(0.48rem, 1.9vw, 0.82rem);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.start-base[data-color="red"] .base-label,
.start-base[data-color="blue"] .base-label,
.start-base[data-color="green"] .base-label {
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}

.finish-zone {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  align-content: center;
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(243, 239, 217, 0.92)),
    var(--paper);
  padding: clamp(8px, 1.7vw, 15px);
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow:
    inset 0 0 0 clamp(3px, 0.8vw, 6px) rgba(226, 46, 43, 0.13),
    inset 0 -18px 26px rgba(0, 0, 0, 0.08),
    4px 6px 0 rgba(0, 0, 0, 0.2);
}

.center-logo-text {
  display: grid;
  color: var(--line);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.88rem, 3.3vw, 2.05rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.92;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.center-logo-text span + span {
  color: #bb1f26;
  font-size: 0.82em;
}

.finish-zone .pawn {
  width: clamp(13px, 3.2vw, 22px);
  height: clamp(13px, 3.2vw, 22px);
  font-size: clamp(0.46rem, 1.4vw, 0.68rem);
}

.piece-stack,
.base-pieces,
.home-pieces {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 0.6vw, 5px);
  min-width: 0;
}

.piece-stack {
  width: 100%;
  height: 100%;
  padding: 1px;
}

.pawn {
  position: relative;
  z-index: 4;
  display: inline-grid;
  place-items: center;
  width: clamp(18px, 5.8vw, 34px);
  height: clamp(18px, 5.8vw, 34px);
  border: 2px solid var(--line);
  border-radius: 50% 50% 45% 45%;
  color: #ffffff;
  font-size: clamp(0.56rem, 2vw, 0.9rem);
  font-weight: 1000;
  line-height: 1;
  box-shadow:
    inset -3px -4px 0 rgba(0, 0, 0, 0.18),
    2px 3px 0 rgba(0, 0, 0, 0.24);
}

.pawn::after {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 58%;
  height: clamp(4px, 1vw, 6px);
  border: 2px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: inherit;
}

.pawn[data-color="red"] {
  background: var(--red);
}

.pawn[data-color="blue"] {
  background: var(--blue);
}

.pawn[data-color="green"] {
  background: var(--green);
}

.pawn[data-color="yellow"] {
  background: var(--yellow);
  color: #1c1605;
}

.pawn.is-moveable {
  outline: clamp(3px, 1vw, 5px) solid #ffffff;
  outline-offset: 2px;
  animation: pulse 1s ease-in-out infinite;
}

button.pawn {
  padding: 0;
}

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

  50% {
    transform: translateY(-3px) scale(1.05);
  }
}

.board-dice {
  position: absolute;
  z-index: 5;
  top: 61%;
  left: 42%;
  display: grid;
  gap: clamp(4px, 1.1vw, 8px);
  place-items: center;
  width: clamp(42px, 8.5vw, 70px);
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--line);
  padding: 0;
  opacity: 1;
}

.board-dice:disabled {
  opacity: 0.9;
}

.die-cube {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 9%;
  width: 100%;
  aspect-ratio: 1;
  border: clamp(3px, 0.9vw, 5px) solid var(--line);
  border-radius: clamp(8px, 2vw, 14px);
  background:
    radial-gradient(circle at 30% 24%, #ffffff 0 18%, transparent 19%),
    linear-gradient(145deg, #fffdf7 0%, #e8dfc4 100%);
  padding: 18%;
  box-shadow:
    inset -8px -10px 0 rgba(0, 0, 0, 0.12),
    5px 7px 0 rgba(0, 0, 0, 0.28);
  transform-origin: center;
}

.pip {
  display: block;
  border-radius: 50%;
}

.pip.is-on {
  background: var(--line);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.16);
}

.board-dice:not(:disabled):hover .die-cube {
  transform: translateY(-2px);
}

.board-dice:not(:disabled):active .die-cube {
  transform: translateY(2px) scale(0.97);
}

.board-dice.is-rolling .die-cube {
  animation: dice-roll 620ms cubic-bezier(0.2, 0.75, 0.18, 1);
}

.board-dice.is-rolling .pip.is-on {
  animation: pip-flash 180ms linear infinite;
}

.dice-caption {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: 1px 9px;
  color: var(--line);
  font-size: clamp(0.58rem, 2vw, 0.78rem);
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.22);
}

@keyframes dice-roll {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  22% {
    transform: translate(-8%, -12%) rotate(-24deg) scale(1.08);
  }

  48% {
    transform: translate(10%, 8%) rotate(30deg) scale(0.96);
  }

  76% {
    transform: translate(-4%, 4%) rotate(-12deg) scale(1.04);
  }

  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

@keyframes pip-flash {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.28;
  }
}

.side-panel {
  display: grid;
  gap: 12px;
}

.players-card {
  padding: 13px;
}

.players-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.turn-actions {
  display: grid;
  gap: 9px;
}

.hint {
  margin: 0;
  color: var(--muted);
}

.players-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.player-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 8px;
}

.player-row.is-current {
  background: #f6d75b;
}

.player-progress {
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.empty-note {
  color: var(--muted);
  font-style: italic;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

.dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 50%;
  flex: 0 0 auto;
}

.dot[data-color="red"] {
  background: var(--red);
}

.dot[data-color="blue"] {
  background: var(--blue);
}

.dot[data-color="green"] {
  background: var(--green);
}

.dot[data-color="yellow"] {
  background: var(--yellow);
}

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

@media (max-width: 900px) {
  .topbar,
  .launch-grid,
  .game-shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .mode-card {
    min-height: auto;
  }

  .game-shell {
    gap: 10px;
  }

  .side-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 2px;
  }

  .brand-kicker {
    display: none;
  }

  .topbar {
    margin-bottom: 3px;
  }

  .view-game .brand-title {
    font-size: clamp(1.5rem, 7vw, 1.85rem);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .button-row {
    display: grid;
  }

  .btn {
    width: 100%;
  }

  .game-card {
    border-width: 0;
    border-radius: 4px;
    padding: 0;
    box-shadow: none;
  }

  .board {
    width: calc(100vw - 4px);
    border-width: 1px;
    border-radius: 4px;
    box-shadow:
      inset 0 0 0 1px #f6f1df,
      0 3px 8px rgba(0, 0, 0, 0.22);
  }

  .board-space {
    border-width: 1px;
    border-radius: 3px;
  }

  .home-lane {
    border-width: 1px;
  }

  .home-lane::before {
    font-size: 0.34rem;
  }

  .slip-lane {
    margin: 1px;
    border-width: 1px;
    border-radius: 5px;
    font-size: 0.38rem;
  }

  .slip-label {
    padding: 0 1px;
  }

  .base-label {
    font-size: clamp(0.42rem, 2vw, 0.6rem);
  }

  .finish-zone {
    width: 28%;
    padding: 7px;
  }

  .center-logo-text {
    font-size: clamp(0.72rem, 3.9vw, 1rem);
  }

  .pawn {
    width: clamp(17px, 5.7vw, 30px);
    height: clamp(17px, 5.7vw, 30px);
    font-size: clamp(0.5rem, 2vw, 0.68rem);
  }

  .board-dice {
    top: 61%;
    left: 42%;
    width: clamp(30px, 8.8vw, 38px);
    gap: 2px;
  }

  .die-cube {
    border-width: 2px;
    border-radius: 6px;
    box-shadow:
      inset -4px -5px 0 rgba(0, 0, 0, 0.1),
      2px 3px 0 rgba(0, 0, 0, 0.24);
  }

  .dice-caption {
    min-height: 13px;
    border-width: 1px;
    padding: 0 4px;
    font-size: 0.44rem;
  }

  .players-card-header .btn-tiny {
    width: auto;
    min-height: 22px;
    padding: 2px 6px;
    font-size: 0.54rem;
  }

  .players-card {
    padding: 10px;
  }

  .players-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-row {
    grid-template-columns: auto 1fr;
  }

  .player-progress {
    grid-column: 2;
    white-space: normal;
  }
}

@media (max-width: 390px) {
  .board {
    width: calc(100vw - 4px);
  }

  .players-list {
    grid-template-columns: 1fr;
  }
}
