/* TinRounds board refresh: this stylesheet intentionally wins over legacy layout rules. */
:root {
  --tr-bg: #06101d;
  --tr-surface: #0a1728;
  --tr-surface-strong: #0d1d32;
  --tr-line: #234c78;
  --tr-line-bright: #3c85bb;
  --tr-text: #f4f8ff;
  --tr-muted: #aec0d7;
  --tr-cyan: #2bc5ff;
  --tr-green: #39d98a;
  --tr-gold: #f2c94c;
  --tr-red: #ff5f6d;
  --tr-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

* {
  letter-spacing: 0;
}

body {
  min-width: 0;
  color: var(--tr-text);
  background-color: var(--tr-bg);
  background-image:
    linear-gradient(rgba(76, 144, 198, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 144, 198, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
}

body::before,
body::after,
.orb,
.hero-panel {
  display: none !important;
}

.sidebar,
.stage-card,
.summary-panel,
.feature-card,
.board,
.side-panel,
.modal-card {
  border: 1px solid var(--tr-line);
  border-radius: 8px;
  background: var(--tr-surface);
  box-shadow: var(--tr-shadow);
}

.brand-mark {
  gap: 5px;
}

.brand-wordmark {
  color: var(--tr-text);
  background: none;
  -webkit-text-fill-color: currentColor;
  font-weight: 900;
}

.brand-subtitle,
.section-kicker,
.eyebrow {
  color: var(--tr-cyan);
}

.nav-item,
.tool-button,
.top-action,
.pill,
.button,
.text-input,
.entry-panel,
.spotlight-card,
.phase-preview-card,
.stat-row,
.setting-choice,
.presence-item {
  border-color: var(--tr-line);
  border-radius: 7px;
  background: #0b1a2c;
}

.nav-item:hover,
.tool-button:hover,
.top-action:hover,
.button:hover:not(:disabled) {
  border-color: var(--tr-line-bright);
  background: #102740;
}

.nav-item.is-active,
.button--primary,
.draw-cta {
  border-color: #1870a8;
  background: #147fc4;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13), 0 8px 20px rgba(20, 127, 196, 0.22);
}

.button--accent {
  border-color: #208858;
  background: #16754d;
}

.top-action--danger,
.button--danger {
  border-color: #b74450;
  color: #ffe7ea;
  background: #35151d;
}

.top-action--save {
  border-color: #208858;
  background: #123a2b;
  color: #ecfff4;
}

.pile-card--back::after {
  content: none !important;
}

.pill::before,
.status-dot {
  background: var(--tr-green);
}

.status-note,
.player-zone__score,
.player-zone__counter,
.player-zone--self-seat span,
.seat-card span,
.selection-summary {
  color: var(--tr-muted);
}

/* Lobby stays compact. The first usable control is always above the fold. */
body:not(.is-board-mode) .app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 16px auto;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 20px;
}

body:not(.is-board-mode) .sidebar {
  padding: 24px 20px;
}

body:not(.is-board-mode) .main-shell {
  gap: 16px;
}

body:not(.is-board-mode) .topbar {
  align-items: center;
}

body:not(.is-board-mode) .topbar-copy h1 {
  font-size: clamp(2.25rem, 4vw, 4.25rem);
}

body:not(.is-board-mode) .preboard-stage,
body:not(.is-board-mode) .feature-strip {
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
}

body:not(.is-board-mode) .stage-card,
body:not(.is-board-mode) .summary-panel {
  min-height: 0;
  padding: 22px;
}

body:not(.is-board-mode) #lobby-view .entry-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body:not(.is-board-mode) #lobby-view .entry-panel {
  min-height: 250px;
  padding: 16px;
}

/* Desktop and laptop: one proportional board, matching the reference composition. */
body.is-desktop-board-fit {
  overflow: hidden;
}

body.is-desktop-board-fit .app-shell {
  position: absolute !important;
  top: var(--board-fit-top) !important;
  left: var(--board-fit-left) !important;
  display: grid !important;
  grid-template-columns: 270px minmax(0, 1fr) !important;
  gap: 20px !important;
  width: 1680px !important;
  height: 900px !important;
  min-height: 900px !important;
  max-width: none !important;
  margin: 0 !important;
  overflow: hidden !important;
  transform: scale(var(--board-fit-scale)) !important;
  transform-origin: top left !important;
}

body.is-desktop-board-fit .sidebar {
  display: flex;
  height: 900px;
  min-height: 900px;
  padding: 26px 20px;
  overflow: hidden;
}

body.is-desktop-board-fit .brand-lockup {
  margin-bottom: 22px;
}

body.is-desktop-board-fit .side-nav,
body.is-desktop-board-fit .side-tools {
  gap: 10px;
}

body.is-desktop-board-fit .nav-item,
body.is-desktop-board-fit .tool-button {
  min-height: 54px;
}

body.is-desktop-board-fit .sidebar-footer {
  margin-top: 18px;
}

body.is-desktop-board-fit .main-shell {
  display: flex;
  height: 900px;
  min-height: 900px;
  gap: 12px;
  overflow: hidden;
}

body.is-desktop-board-fit .game-topbar {
  flex: 0 0 80px;
  display: grid;
  grid-template-columns: 220px minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: center;
}

body.is-desktop-board-fit .game-topbar__title h1 {
  font-size: 2.55rem;
  line-height: 1;
  white-space: nowrap;
}

body.is-desktop-board-fit .game-topbar__title p {
  margin-top: 6px;
  font-size: 1.05rem;
}

body.is-desktop-board-fit .topbar-actions {
  gap: 8px;
  flex-wrap: nowrap;
}

body.is-desktop-board-fit .top-action,
body.is-desktop-board-fit .pill {
  min-height: 48px;
  padding: 0 14px;
  font-size: 0.9rem;
  white-space: nowrap;
}

body.is-desktop-board-fit .top-action--back {
  min-width: 206px;
}

body.is-desktop-board-fit .top-action--danger {
  min-width: 160px;
}

body.is-desktop-board-fit .top-action--menu {
  min-width: 110px;
}

body.is-desktop-board-fit .game-shell {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

body.is-desktop-board-fit .board-stage {
  display: grid;
  grid-template-columns: 970px 400px;
  gap: 18px;
  height: 808px;
  min-height: 808px;
}

body.is-desktop-board-fit .board {
  display: flex;
  height: 808px;
  min-height: 808px;
  padding: 12px;
  gap: 12px;
  overflow: hidden;
}

body.is-desktop-board-fit .playfield {
  flex: 0 0 546px;
  min-height: 546px;
  height: 546px;
  overflow: hidden;
  border: 1px solid rgba(52, 132, 184, 0.32);
  border-radius: 7px;
  background-color: #091a2c;
}

body.is-desktop-board-fit .table-orbit {
  inset: 46px 64px 26px;
}

body.is-desktop-board-fit .table-orbit__ring {
  border-color: rgba(43, 197, 255, 0.38);
}

body.is-desktop-board-fit .table-orbit__ring--two {
  inset: 26px 58px;
  border-color: rgba(57, 217, 138, 0.32);
}

body.is-desktop-board-fit .table-orbit__ring--three {
  inset: 52px 108px;
  border-color: rgba(242, 201, 76, 0.45);
}

body.is-desktop-board-fit .player-zone--opponent {
  top: 10px;
  width: 420px;
  min-height: 108px;
  padding: 10px 14px 2px;
  border: 1px solid var(--tr-line);
  background: rgba(7, 19, 34, 0.94);
}

body.is-desktop-board-fit .hidden-hand--arched {
  min-height: 78px;
}

body.is-desktop-board-fit .stacked-backs--arched .card--back {
  width: 48px;
  min-height: 72px;
  margin-left: -24px;
}

body.is-desktop-board-fit .seat-card--round,
body.is-desktop-board-fit .player-zone--self-seat {
  top: 258px;
  width: 118px;
  min-width: 118px;
  min-height: 144px;
  border: 1px solid var(--tr-line);
  background: rgba(7, 19, 34, 0.94);
}

body.is-desktop-board-fit .seat-card--round {
  left: 16px;
}

body.is-desktop-board-fit .player-zone--self-seat {
  right: 16px;
}

body.is-desktop-board-fit .seat-card--guest {
  bottom: 10px;
  width: 330px;
  min-height: 70px;
  border: 1px solid var(--tr-line);
  background: rgba(7, 19, 34, 0.94);
}

body.is-desktop-board-fit .center-table {
  top: 322px;
  width: 350px;
}

body.is-desktop-board-fit .pile-stack--board {
  grid-template-columns: 126px 30px 126px;
  gap: 18px;
}

body.is-desktop-board-fit .pile {
  min-height: 184px;
}

body.is-desktop-board-fit .pile-card,
body.is-desktop-board-fit .discard-card-slot,
body.is-desktop-board-fit .discard-card-slot .card {
  width: 104px;
  min-height: 150px;
  height: 150px;
}

body.is-desktop-board-fit .meld-area--opponent {
  left: 14px;
  top: auto;
  bottom: 12px;
  width: 214px;
  max-width: 214px;
}

body.is-desktop-board-fit .meld-area--self {
  right: 14px;
  top: auto;
  bottom: 12px;
  width: 214px;
  max-width: 214px;
}

body.is-desktop-board-fit .meld-group {
  gap: 5px;
  padding: 7px;
  border-radius: 7px;
}

body.is-desktop-board-fit .meld-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

body.is-desktop-board-fit .meld-group__header .status-note {
  min-width: 0;
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-desktop-board-fit .meld-group__header .button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.72rem;
  white-space: nowrap;
}

body.is-desktop-board-fit .meld-group .card-row {
  gap: 5px;
}

body.is-desktop-board-fit .meld-group .card {
  width: 40px;
  min-height: 60px;
  border-radius: 6px;
}

body.is-desktop-board-fit .meld-group .card__value {
  font-size: 1rem;
}

/* The board owns the full desktop canvas while a game is in progress. */
body.is-desktop-board-fit.is-board-mode .app-shell {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

body.is-desktop-board-fit.is-board-mode .sidebar {
  display: none !important;
}

body.is-desktop-board-fit.is-board-mode .main-shell {
  width: 1680px;
}

body.is-desktop-board-fit.is-board-mode .board-stage {
  grid-template-columns: 1200px 462px;
  gap: 18px;
}

body.is-desktop-board-fit.is-board-mode .meld-area--opponent,
body.is-desktop-board-fit.is-board-mode .meld-area--self {
  width: 238px;
  max-width: 238px;
}

body.is-desktop-board-fit.is-board-mode .meld-area--opponent {
  left: 18px;
}

body.is-desktop-board-fit.is-board-mode .meld-area--self {
  right: 18px;
}

body.is-desktop-board-fit.is-board-mode .meld-group .card {
  width: 44px;
  min-height: 66px;
}

body.is-desktop-board-fit .hand-panel {
  flex: 0 0 226px;
  min-height: 226px;
  height: 226px;
  margin: 0;
  padding: 12px 16px 14px;
  border: 1px solid var(--tr-line);
  border-radius: 7px;
  box-shadow: none;
  background: #091728;
}

body.is-desktop-board-fit .hand--table {
  min-height: 96px;
  padding: 6px 0;
  gap: 8px;
  scrollbar-width: thin;
}

body.is-desktop-board-fit .hand--table .card {
  width: 64px;
  min-height: 94px;
  border-radius: 7px;
}

body.is-desktop-board-fit .hand-panel__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: center;
}

body.is-desktop-board-fit .action-rail {
  gap: 7px;
}

body.is-desktop-board-fit .action-rail__button {
  min-width: 104px;
  min-height: 38px;
  padding: 0 10px;
  font-size: 0.82rem;
}

body.is-desktop-board-fit .discard-action {
  min-width: 142px;
  font-weight: 800;
}

.discard-action.is-ready {
  border-color: #ef5b68;
  background: #6c202a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 18px rgba(239, 91, 104, 0.22);
}

body.is-desktop-board-fit .draw-cta {
  min-width: 120px;
}

body.is-desktop-board-fit .game-sidebar {
  display: grid;
  grid-template-rows: 262px 172px minmax(0, 1fr);
  gap: 12px;
  height: 808px;
  min-height: 808px;
}

body.is-desktop-board-fit .side-panel {
  min-height: 0;
  padding: 18px 20px;
  overflow: hidden;
}

body.is-desktop-board-fit .side-panel--phase,
body.is-desktop-board-fit .side-panel--phases,
body.is-desktop-board-fit .side-panel--log {
  min-height: 0;
  order: initial;
}

body.is-desktop-board-fit .side-panel--log .log-list {
  max-height: 114px;
  overflow: hidden;
}

body.is-desktop-board-fit .board-status-grid .stat-row {
  min-height: 39px;
  padding: 7px 9px;
}

/* Below the scaled-board threshold, the board stays usable and scrolls vertically only. */
@media (max-width: 899px), (orientation: portrait) {
  body.is-board-mode {
    overflow-x: hidden;
  }

  body.is-board-mode .app-shell {
    width: min(100% - 20px, 740px);
    margin: 10px auto 24px;
    display: block;
  }

  body.is-board-mode .sidebar {
    display: none;
  }

  body.is-board-mode .main-shell {
    gap: 12px;
  }

  body.is-board-mode .game-topbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.is-board-mode .game-topbar__back,
  body.is-board-mode .game-topbar__title {
    text-align: center;
  }

  body.is-board-mode .topbar-actions {
    justify-content: center;
  }

  body.is-board-mode .top-action,
  body.is-board-mode .pill {
    min-height: 42px;
    padding: 0 11px;
  }

  body.is-board-mode .board-stage {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.is-board-mode .board {
    min-height: 0;
    padding: 8px;
    border-radius: 7px;
  }

  body.is-board-mode .playfield {
    min-height: 500px;
  }

  body.is-board-mode .table-orbit {
    inset: 56px 26px 20px;
  }

  body.is-board-mode .player-zone--opponent {
    width: min(330px, calc(100% - 132px));
  }

  body.is-board-mode .center-table {
    top: 312px;
    width: 300px;
  }

  body.is-board-mode .pile-stack--board {
    grid-template-columns: 112px 26px 112px;
    gap: 12px;
  }

  body.is-board-mode .seat-card--round,
  body.is-board-mode .player-zone--self-seat {
    top: 245px;
    width: 96px;
    min-width: 96px;
  }

  body.is-board-mode .meld-area--opponent {
    left: 16px;
    top: 390px;
  }

  body.is-board-mode .meld-area--self {
    right: 16px;
    top: 390px;
  }

  body.is-board-mode .hand-panel {
    min-height: 212px;
    margin: 10px 0 0;
    padding: 12px;
    border-radius: 7px;
  }

  body.is-board-mode .hand-panel__footer {
    display: grid;
    gap: 10px;
  }

  body.is-board-mode .action-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-board-mode .action-rail__button,
  body.is-board-mode .draw-cta {
    min-width: 0;
    width: 100%;
  }

  body.is-board-mode .game-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.is-board-mode .side-panel {
    padding: 16px;
    border-radius: 7px;
  }
}

@media (max-width: 760px) {
  body:not(.is-board-mode) .app-shell {
    width: min(100% - 20px, 560px);
    display: block;
    margin: 10px auto 24px;
  }

  body:not(.is-board-mode) .sidebar {
    display: none;
  }

  body:not(.is-board-mode) .topbar,
  body:not(.is-board-mode) .preboard-stage,
  body:not(.is-board-mode) .feature-strip {
    grid-template-columns: 1fr;
  }

  body:not(.is-board-mode) .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  body:not(.is-board-mode) #lobby-view .entry-stack,
  body:not(.is-board-mode) .stage-card--quickstart,
  body:not(.is-board-mode) #room-view .start-grid {
    grid-template-columns: 1fr;
  }

  body:not(.is-board-mode) #lobby-view .entry-panel {
    min-height: 0;
  }
}

/* Desktop lobby: one composed screen instead of a second page below it. */
@media (min-width: 900px) and (min-height: 720px) and (orientation: landscape) {
  body:not(.is-board-mode) {
    overflow: hidden;
  }

  body:not(.is-board-mode) .app-shell {
    height: calc(var(--vh, 1vh) * 100 - 24px);
    min-height: 0;
    margin: 12px auto;
    overflow: hidden;
  }

  body:not(.is-board-mode) .sidebar,
  body:not(.is-board-mode) .main-shell {
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }

  body:not(.is-board-mode) .sidebar {
    padding: 20px;
    background: #09182a;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  }

  body:not(.is-board-mode) .main-shell {
    gap: 12px;
  }

  body:not(.is-board-mode) .topbar {
    min-height: 108px;
  }

  body:not(.is-board-mode) .topbar-copy h1 {
    font-size: clamp(2.5rem, 3.6vw, 4rem);
    line-height: 0.95;
  }

  body:not(.is-board-mode) .preboard-stage {
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
  }

  body:not(.is-board-mode) .stage-card,
  body:not(.is-board-mode) .summary-panel {
    height: 100%;
    min-height: 0;
  }

  body:not(.is-board-mode) .stage-card--quickstart,
  body:not(.is-board-mode) #lobby-view .entry-stack {
    align-content: center;
  }

  body:not(.is-board-mode) .stage-card--quickstart {
    border-color: #168bd1;
    background: #0b2139;
    box-shadow: inset 0 1px 0 rgba(116, 215, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.28);
  }

  body:not(.is-board-mode) .summary-panel {
    border-color: #246da3;
    background: #0a1d32;
  }

  body:not(.is-board-mode) .summary-step {
    padding-block: 7px;
  }

  body:not(.is-board-mode) .summary-number {
    box-shadow: 0 0 18px rgba(43, 197, 255, 0.2);
  }

  body:not(.is-board-mode) .feature-strip {
    display: none;
  }
}

/* The game room uses the same bright table language as the reference lobby. */
body.is-board-mode .game-topbar {
  border-bottom: 1px solid rgba(39, 164, 235, 0.22);
}

body.is-board-mode .board,
body.is-board-mode .hand-panel,
body.is-board-mode .side-panel {
  border-color: #1b79b4;
  background-color: #0a2850;
  box-shadow: inset 0 1px 0 rgba(115, 220, 255, 0.11), 0 16px 34px rgba(0, 0, 0, 0.25);
}

body.is-board-mode .playfield {
  border-color: #1f8ed2;
  background-color: #071d3a;
}

body.is-board-mode .table-orbit__ring--one {
  border-color: rgba(38, 204, 255, 0.78);
  box-shadow: 0 0 24px rgba(30, 180, 255, 0.18);
}

body.is-board-mode .table-orbit__ring--two {
  border-color: rgba(188, 70, 255, 0.58);
}

body.is-board-mode .table-orbit__ring--three {
  border-color: rgba(255, 206, 61, 0.56);
}

body.is-board-mode .player-zone--opponent,
body.is-board-mode .player-zone--self-seat,
body.is-board-mode .seat-card,
body.is-board-mode .seat-card--guest {
  border-color: #1d74a9;
  background-color: #09264a;
  box-shadow: inset 0 1px 0 rgba(121, 219, 255, 0.1);
}

body.is-board-mode .pile-card,
body.is-board-mode .discard-card-slot {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(119, 222, 255, 0.12);
}

body.is-board-mode .board-status-grid .stat-row,
body.is-board-mode .side-panel .stat-row {
  background-color: #092343;
}

body.is-board-mode .hand-panel__header {
  border-bottom-color: rgba(50, 166, 229, 0.26);
}

body.is-board-mode .hand--table {
  background-color: #071c36;
}

body.is-board-mode .draw-cta {
  border-color: #39d9ff;
  background-color: #087fcb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 22px rgba(0, 129, 210, 0.24);
}

/* Final desktop reference polish: keep the start card and status card readable. */
@media (min-width: 900px) and (min-height: 720px) and (orientation: landscape) {
  body:not(.is-board-mode) .quickstart-copy {
    width: 100%;
    max-width: none;
  }

  body:not(.is-board-mode) .stage-card--quickstart .text-input,
  body:not(.is-board-mode) .stage-card--quickstart .button--primary {
    width: 100%;
  }

  body:not(.is-board-mode) .summary-panel {
    padding: 18px;
    gap: 8px;
  }

  body:not(.is-board-mode) .summary-panel .summary-block,
  body:not(.is-board-mode) .summary-panel .summary-steps {
    gap: 4px;
  }

  body:not(.is-board-mode) .summary-panel .summary-subtitle {
    font-size: 0.92rem;
  }

  body:not(.is-board-mode) .summary-panel .summary-step {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    padding-block: 4px;
  }

  body:not(.is-board-mode) .summary-panel .summary-step__icon {
    width: 38px;
    height: 38px;
  }

  body:not(.is-board-mode) .summary-panel .summary-step p {
    font-size: 0.82rem;
  }

  body:not(.is-board-mode) .summary-panel > .stats-grid .stat-row {
    min-height: 30px;
    padding: 4px 7px;
  }

  body:not(.is-board-mode) .feature-card .phase-preview-grid,
  body:not(.is-board-mode) .feature-card .feature-card__button {
    display: none;
  }
}

@media (max-width: 899px), (orientation: portrait) {
  body:not(.is-board-mode) {
    overflow-y: auto;
  }
}

/* TinRounds lobby finish: brighter hierarchy, calm panels, unmistakable actions. */
body:not(.is-board-mode) .brand-lockup {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(43, 197, 255, 0.18);
}

body:not(.is-board-mode) .brand-mark {
  width: 104px;
  height: 104px;
}

body:not(.is-board-mode) .brand-wordmark {
  font-size: clamp(1.8rem, 2.2vw, 2.35rem);
}

body:not(.is-board-mode) .nav-item {
  min-height: 64px;
  border-color: #17629b;
  font-size: 1.02rem;
  font-weight: 800;
}

body:not(.is-board-mode) .nav-item.is-active {
  color: #ffffff;
  background: #1688d8;
  border-color: #3cd8ff;
  box-shadow: 0 0 0 1px rgba(116, 232, 255, 0.25), 0 12px 24px rgba(0, 140, 255, 0.25);
}

body:not(.is-board-mode) .topbar-copy .eyebrow {
  font-weight: 900;
  letter-spacing: 0.14em;
}

body:not(.is-board-mode) .topbar-copy h1 {
  color: #f8fbff;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.24);
}

body:not(.is-board-mode) .topbar-copy h1::first-letter {
  color: #ffffff;
}

body:not(.is-board-mode) .topbar-actions .pill,
body:not(.is-board-mode) .topbar-actions .top-action {
  min-height: 54px;
  border-color: #1677bb;
  background: #0a1d32;
  font-weight: 800;
}

body:not(.is-board-mode) .topbar-actions .pill {
  box-shadow: inset 0 0 0 1px rgba(86, 220, 255, 0.1);
}

body:not(.is-board-mode) .stage-card--quickstart {
  overflow: hidden;
}

body:not(.is-board-mode) .quickstart-copy {
  max-width: 46%;
}

body:not(.is-board-mode) .stage-card__headline h2 {
  font-size: clamp(2.1rem, 3vw, 3.2rem);
  line-height: 1;
}

body:not(.is-board-mode) .input-label {
  color: #d7edff;
  font-weight: 800;
}

body:not(.is-board-mode) .text-input {
  min-height: 58px;
  border-color: #1b7fba;
  background: #08182a;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body:not(.is-board-mode) .button--primary {
  min-height: 60px;
  border-color: #39dcff;
  background: #087ece;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 24px rgba(0, 132, 224, 0.28);
}

body:not(.is-board-mode) .quickstart-art::before {
  border-color: rgba(43, 197, 255, 0.42);
  box-shadow: 0 0 38px rgba(25, 145, 255, 0.17);
}

body:not(.is-board-mode) .hero-cards--inside {
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.36));
}

body:not(.is-board-mode) .summary-panel {
  box-shadow: inset 0 1px 0 rgba(104, 219, 255, 0.11), 0 18px 40px rgba(0, 0, 0, 0.27);
}

body:not(.is-board-mode) .summary-panel .section-kicker {
  letter-spacing: 0.12em;
  font-weight: 900;
}

body:not(.is-board-mode) .summary-step {
  border-bottom: 1px solid rgba(48, 126, 180, 0.2);
}

body:not(.is-board-mode) .summary-step:last-child {
  border-bottom: 0;
}

body:not(.is-board-mode) #lobby-view .entry-panel {
  border-color: #1a6da5;
  background: #0a1c30;
  box-shadow: inset 0 1px 0 rgba(116, 220, 255, 0.07);
}

body:not(.is-board-mode) #lobby-view .entry-panel--code {
  border-color: #9a4ddd;
}

body:not(.is-board-mode) #lobby-view .entry-panel--ai {
  border-color: #28a969;
}

body:not(.is-board-mode) #lobby-view .entry-panel--success {
  border-color: #2b94d4;
}

body:not(.is-board-mode) .player-count-option.is-active {
  background: #168ad7;
  border-color: #42dcff;
  color: #ffffff;
}

@media (max-width: 899px), (orientation: portrait) {
  body:not(.is-board-mode) .quickstart-copy {
    max-width: none;
  }
}

/* One continuous TinRounds background across lobby, room, and board. */
.app-shell,
.main-shell,
.stage-main,
.game-shell,
.board-stage {
  background-color: #071526;
}

.app-shell {
  box-shadow: inset 0 0 0 1px rgba(56, 151, 211, 0.13);
}

.main-shell {
  padding: 4px;
}

.stage-main,
.game-shell {
  border: 1px solid rgba(50, 128, 183, 0.2);
}

.sidebar {
  background-color: #08182b;
}

.stage-card,
.summary-panel,
.feature-card,
.board,
.side-panel,
.hand-panel {
  background-color: #0a1b2f;
}

.playfield {
  background-color: #071b2e;
}

.entry-panel,
.spotlight-card,
.phase-preview-card,
.stat-row,
.presence-item,
.setting-choice {
  background-color: #0d2238;
}

.player-zone--opponent,
.player-zone--self-seat,
.seat-card,
.player-zone--self {
  background-color: #081a2e;
}

.meld-area,
.meld-group {
  background-color: #0a2035;
}

/* Reference composition for the desktop launch screen. */
@media (min-width: 900px) and (min-height: 720px) and (orientation: landscape) {
  body:not(.is-board-mode) .main-shell {
    gap: 14px;
  }

  body:not(.is-board-mode) .topbar {
    min-height: 132px;
  }

  body:not(.is-board-mode) .preboard-stage {
    flex: 0 0 500px;
    min-height: 500px;
  }

  body:not(.is-board-mode) .feature-strip {
    display: grid;
    flex: 1 1 auto;
    min-height: 118px;
    overflow: hidden;
  }

  body:not(.is-board-mode) .feature-card {
    min-height: 118px;
    padding: 18px 22px;
    border-color: #1c80bf;
    background-color: #09254a;
    box-shadow: inset 0 1px 0 rgba(105, 218, 255, 0.1), 0 16px 34px rgba(0, 0, 0, 0.26);
  }

  body:not(.is-board-mode) .stage-card--quickstart,
  body:not(.is-board-mode) #lobby-view {
    height: 500px;
    min-height: 500px;
    border-color: #1ba8f6;
    background-color: #0a2d5c;
    box-shadow: inset 0 1px 0 rgba(132, 229, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.28);
  }

  body:not(.is-board-mode) .summary-panel {
    height: 500px;
    min-height: 500px;
    border-color: #1b91d8;
    background-color: #0a2850;
  }

  body:not(.is-board-mode) .quickstart-copy {
    max-width: 47%;
  }

  body:not(.is-board-mode) .quickstart-art {
    transform: translateX(-2%);
  }

  body:not(.is-board-mode) .hero-cards--inside {
    transform: scale(1.08);
  }

  body:not(.is-board-mode) #lobby-view .entry-stack {
    align-content: stretch;
    height: 334px;
  }

  body:not(.is-board-mode) #lobby-view .entry-panel {
    min-height: 334px;
    padding: 18px;
  }

  body:not(.is-board-mode) #lobby-view .entry-panel--code {
    background-color: #28165c;
    box-shadow: inset 0 1px 0 rgba(224, 151, 255, 0.16), 0 12px 24px rgba(27, 6, 82, 0.22);
  }

  body:not(.is-board-mode) #lobby-view .entry-panel--ai {
    background-color: #083d65;
    box-shadow: inset 0 1px 0 rgba(94, 222, 255, 0.15), 0 12px 24px rgba(0, 66, 117, 0.22);
  }

  body:not(.is-board-mode) #lobby-view .entry-panel--success {
    background-color: #251660;
    box-shadow: inset 0 1px 0 rgba(196, 133, 255, 0.16), 0 12px 24px rgba(35, 8, 92, 0.22);
  }

  body:not(.is-board-mode) .summary-panel > .stats-grid {
    border-color: rgba(67, 177, 243, 0.45);
    background-color: #092344;
  }

  body:not(.is-board-mode) .summary-panel > .stats-grid .stat-row {
    background-color: transparent;
  }
}
