:root {
  --navy: #071332;
  --navy-2: #0f214c;
  --ink: #f8f3c7;
  --muted: #c8c7d6;
  --gold: #f7c94b;
  --hot: #e93e6d;
  --blue: #62b7ff;
  --line: rgba(248, 201, 75, 0.34);
  --panel: rgba(7, 19, 50, 0.88);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(7, 19, 50, 0.95), rgba(7, 19, 50, 0.78)),
    url("assets/game/box-open.jpg") center / cover fixed,
    var(--navy);
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #11172d;
  background: var(--gold);
  font-weight: 950;
  cursor: pointer;
}

a {
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.game-shell {
  min-height: 100vh;
  padding: clamp(1rem, 3vw, 2rem);
}

.kicker {
  margin: 0 0 0.35rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1rem;
}

.login-card {
  width: min(100%, 420px);
  padding: 1.3rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(233, 62, 109, 0.18), rgba(247, 201, 75, 0.14)),
    var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.login-card h1,
.game-topbar h1,
.admin-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 8vw, 4rem);
  line-height: 0.95;
}

.login-card form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.2rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.error {
  color: #ff8faf;
  font-weight: 900;
}

.success {
  color: #98f0bd;
  font-weight: 900;
}

.muted {
  color: var(--muted);
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ghost,
.secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.danger {
  color: white;
  background: var(--hot);
}

.now-card,
.vote-panel,
.my-countries,
.big-now,
.admin-setup,
.rank-board,
.pending-board {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.now-card {
  display: grid;
  gap: 0.5rem;
  min-height: 230px;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(247, 201, 75, 0.18), rgba(233, 62, 109, 0.14)),
    var(--panel);
}

.now-card h2,
.big-now h2 {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin: 0;
  font-size: clamp(2.1rem, 12vw, 4.8rem);
  line-height: 0.95;
}

.timer {
  color: var(--gold);
  font-size: clamp(3rem, 18vw, 7rem);
  line-height: 0.9;
}

.player-page {
  max-width: 760px;
  margin: 0 auto;
}

.vote-panel,
.my-countries {
  margin-top: 1rem;
}

.score-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.score-card,
.home-card {
  min-height: 74px;
  border: 2px solid #ffe87e;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(7, 19, 50, 0.94), rgba(15, 33, 76, 0.96)),
    var(--navy);
  box-shadow: inset 0 0 0 2px rgba(233, 62, 109, 0.58);
  font-size: 1.65rem;
}

.score-card.nil,
.home-card {
  grid-column: 1 / -1;
  color: #11172d;
  background: var(--gold);
  box-shadow: none;
}

.score-card.used {
  text-decoration: line-through;
}

.country-grid {
  display: grid;
  gap: 0.75rem;
}

.country-score-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.country-score-card > span {
  font-size: 2rem;
}

.country-score-card h3,
.country-score-card p {
  grid-column: 2;
  margin: 0;
}

.country-score-card .owner-chip {
  grid-column: 2;
}

.country-score-card strong {
  grid-column: 3;
  grid-row: 1 / 3;
  color: var(--gold);
  font-size: 2.5rem;
}

.admin-shell {
  background:
    linear-gradient(180deg, rgba(7, 19, 50, 0.82), rgba(7, 19, 50, 0.98)),
    url("assets/game/admin-background.jpg") center / cover fixed;
}

.admin-page {
  max-width: 1600px;
  margin: 0 auto;
}

.admin-actions,
.admin-utility-actions,
.admin-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.admin-utility-actions {
  justify-content: flex-end;
}

.admin-primary-actions {
  justify-content: flex-end;
}

.admin-title-block {
  max-width: none;
}

.admin-title-block h1 {
  max-width: 100%;
}

.admin-actions button,
.admin-utility-actions button,
.admin-primary-actions button,
.setup-link,
.pending-row button {
  padding: 0 1rem;
}

.admin-utility-actions .compact,
.setup-link.compact {
  min-height: 36px;
  padding: 0 0.75rem;
  font-size: 0.85rem;
}

.setup-link {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 950;
  text-decoration: none;
}

.big-now {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.big-now .owner-chip {
  gap: 0.9rem;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem 0.5rem 0.5rem;
  font-size: 1.85rem;
  line-height: 1;
}

.big-now .owner-chip img {
  width: 4.4rem;
  height: 4.4rem;
}

.admin-setup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.7fr);
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.setup-page .admin-setup {
  align-items: start;
  margin-top: 1rem;
}

.admin-setup h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 3rem);
}

.admin-setup form {
  display: grid;
  grid-template-columns: 8rem 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

.semi-admin-setup {
  align-items: start;
}

.semi-setup-controls {
  display: grid;
  gap: 0.85rem;
}

.semi-setup-controls > form {
  grid-template-columns: 1fr auto;
}

.semi-status-grid {
  display: grid;
  gap: 0.65rem;
}

.semi-status-grid form {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(18rem, 1.2fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.semi-status-controls {
  display: grid;
  justify-items: end;
  gap: 0.55rem;
}

.semi-status-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.semi-status-switch button {
  min-height: 40px;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.88rem;
}

.semi-status-switch button.active {
  color: #11172d;
  background: var(--gold);
}

.semi-status-switch button[data-semi-status-option="open"].active {
  background: #59e989;
}

.semi-status-switch button[data-semi-status-option="locked"].active {
  background: #7ab6ff;
}

.semi-reset-button {
  min-height: 34px;
  padding: 0 0.75rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.semi-finalise-form {
  display: grid;
  grid-template-columns: minmax(9rem, 0.35fr) auto;
  gap: 0.75rem;
  align-items: end;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.link-visibility-setup {
  align-items: start;
}

.link-switch-grid {
  display: grid;
  gap: 0.65rem;
}

.link-switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.link-switch-row strong,
.link-switch-row small {
  display: block;
}

.link-switch-row small {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.direct-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
}

.link-toggle {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  min-width: 13.5rem;
  min-height: 3.25rem;
  padding: 0.32rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.link-toggle.active {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

.link-toggle::before {
  content: "";
  position: absolute;
  inset: 0.32rem auto 0.32rem 0.32rem;
  width: calc(50% - 0.32rem);
  border-radius: 999px;
  background: var(--gold);
  transition: transform 0.18s ease;
}

.link-toggle.active::before {
  transform: translateX(100%);
}

.link-toggle span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 2.55rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1;
}

.link-toggle:not(.active) span:first-child,
.link-toggle.active span:last-child {
  color: #11172d;
}

.big-now strong {
  color: var(--gold);
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.85;
}

.admin-vote-tracker {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.admin-vote-tracker .kicker {
  margin-bottom: 0;
}

.admin-vote-headshots {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: clamp(0.55rem, 1.5vw, 1rem);
  align-items: start;
}

.admin-vote-person {
  display: grid;
  justify-items: center;
  gap: 0.38rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.admin-vote-avatar {
  position: relative;
  display: block;
  width: clamp(3.3rem, 5.2vw, 4.6rem);
  height: clamp(3.3rem, 5.2vw, 4.6rem);
}

.admin-vote-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
  filter: grayscale(0.8) brightness(0.78);
}

.admin-vote-person > span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-vote-person.voted,
.admin-vote-person.home {
  color: var(--ink);
}

.admin-vote-person.voted img,
.admin-vote-person.home img {
  filter: none;
}

.vote-status-badge {
  position: absolute;
  right: -0.18rem;
  bottom: -0.18rem;
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 2px solid var(--navy);
  border-radius: 50%;
  color: #092113;
  background: #59e989;
  font-size: 0.95rem;
  font-weight: 950;
}

.vote-status-badge.home {
  color: #11172d;
  background: var(--gold);
}

.live-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.7fr);
  gap: 1rem;
}

.rank-board h2,
.pending-board h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.compact-scoreboard {
  grid-template-columns: 1fr;
  margin-top: 1rem;
}

.owner-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: max-content;
  max-width: 100%;
  margin-top: 0.35rem;
  padding: 0.25rem 0.45rem 0.25rem 0.25rem;
  border: 1px solid rgba(247, 201, 75, 0.28);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 900;
}

.owner-chip img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.15);
}

.owner-chip-tbc > span:first-child {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: #11172d;
  background: var(--gold);
  font-weight: 950;
}

.rank-row,
.pending-row {
  display: grid;
  gap: 0.75rem;
  align-items: center;
  min-height: 72px;
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.rank-row {
  grid-template-columns: 2.5rem 1fr auto 3.5rem;
}

.rank-row > span {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  color: #11172d;
  background: var(--gold);
  font-weight: 950;
}

.rank-row small,
.pending-row small {
  display: block;
  color: var(--muted);
}

.rank-row > div > strong {
  font-size: clamp(1.45rem, 2.4vw, 2.3rem);
}

.rank-row > div,
.pending-country-details {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.pending-country-details strong,
.pending-country-details small {
  overflow-wrap: anywhere;
}

.rank-row em {
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.rank-row > b {
  color: var(--gold);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 650;
  text-align: right;
}

.vote-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.vote-pill {
  display: inline-grid;
  grid-template-columns: 2.15rem auto;
  gap: 0.28rem;
  align-items: center;
  min-height: 2.2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 600;
}

.vote-pill img {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(247, 201, 75, 0.45);
}

.vote-pill b {
  min-width: 1rem;
  color: var(--gold);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
}

.vote-pill.nil,
.vote-pill.home {
  color: var(--muted);
  background: transparent;
}

.vote-pill.home b {
  font-size: 1.75rem;
  line-height: 1;
}

.vote-pill.missing {
  color: var(--muted);
  background: transparent;
  opacity: 0.5;
}

.vote-pill.missing b {
  color: var(--muted);
  font-size: 1rem;
}

.pending-row {
  grid-template-columns: 2rem minmax(0, 1fr);
}

.pending-country-details {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.75rem;
}

.pending-row .owner-chip {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: end;
  margin-top: 0;
}

.pending-country-details strong {
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
}

.running-order-row {
  grid-template-columns: 2rem minmax(0, 1fr) auto;
}

.running-order-row em {
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.running-order-row.performed {
  opacity: 0.42;
}

.running-order-row.current {
  opacity: 1;
  background: rgba(247, 201, 75, 0.12);
  box-shadow: inset 3px 0 0 var(--gold);
}

.running-order-row.current em {
  color: var(--gold);
}

.running-order-row:not(.performed):not(.current) .pending-country-details strong {
  color: var(--ink);
}

.vote-details {
  margin-top: 0.55rem;
}

.vote-details summary {
  width: max-content;
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}

.game-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.7rem;
  padding: 1.2rem 0 0.4rem;
}

.game-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.game-footer-links a + a::before {
  content: "";
  width: 1px;
  height: 1em;
  background: rgba(196, 208, 240, 0.35);
}

.game-footer-links a:hover {
  color: var(--gold);
}

.room-shell {
  display: grid;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(7, 19, 50, 0.96), rgba(7, 19, 50, 0.78)),
    url("assets/game/admin-background.jpg") center / cover fixed,
    var(--navy);
}

.room-display {
  display: grid;
  grid-template-rows: minmax(13rem, 32vh) minmax(0, 1fr);
  min-height: calc(100vh - clamp(2rem, 6vw, 4rem));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 8%, rgba(247, 201, 75, 0.12), transparent 30rem),
    linear-gradient(135deg, rgba(233, 62, 109, 0.12), rgba(98, 183, 255, 0.06)),
    rgba(7, 19, 50, 0.86);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
}

.room-country-band {
  display: grid;
  align-content: center;
  gap: clamp(0.65rem, 1vw, 1rem);
  padding: clamp(1.25rem, 2.8vw, 3rem);
  border-bottom: 1px solid rgba(247, 201, 75, 0.22);
}

.room-country-band h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24em;
  align-items: center;
  max-width: 100%;
  margin: 0;
  font-size: clamp(4.4rem, 8.2vw, 10rem);
  line-height: 0.88;
}

.room-country-band p:not(.kicker) {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(1.45rem, 2.2vw, 2.8rem);
  font-weight: 850;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-lower-band {
  display: grid;
  grid-template-columns: minmax(26rem, 0.95fr) minmax(30rem, 1.45fr);
  min-height: 0;
}

.room-votes-panel {
  display: grid;
  align-content: center;
  gap: clamp(1rem, 1.6vw, 1.6rem);
  min-width: 0;
  padding: clamp(1.25rem, 2.8vw, 3rem);
}

.room-vote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.4vw, 1.25rem);
}

.room-voter {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.room-voter img {
  width: clamp(4.3rem, 6.2vw, 7rem);
  height: clamp(4.3rem, 6.2vw, 7rem);
  border: 0.34rem solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.62);
}

.room-voter.voted img,
.room-voter.home img {
  filter: none;
}

.room-voter.voted img {
  border-color: #58ee91;
}

.room-voter.home img {
  border-color: var(--gold);
}

.room-voter span {
  overflow: hidden;
  max-width: 100%;
  color: var(--ink);
  font-size: clamp(1rem, 1.45vw, 1.45rem);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-vote-badge {
  position: absolute;
  top: clamp(3.2rem, 4.9vw, 5.6rem);
  right: 50%;
  display: grid;
  width: clamp(1.8rem, 2.5vw, 2.5rem);
  height: clamp(1.8rem, 2.5vw, 2.5rem);
  translate: 2.8rem 0;
  place-items: center;
  border-radius: 50%;
  color: #071332;
  background: #58ee91;
  font-size: clamp(1rem, 1.6vw, 1.45rem);
  font-style: normal;
  font-weight: 950;
}

.room-vote-badge.home {
  background: var(--gold);
}

.room-vote-summary {
  justify-self: center;
  margin: 0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  color: #071332;
  background: var(--gold);
  font-size: clamp(1.35rem, 2vw, 2.2rem);
  font-weight: 950;
}

.room-timer-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  padding: clamp(1rem, 2vw, 2rem);
  border-left: 1px solid rgba(247, 201, 75, 0.22);
  background: rgba(255, 255, 255, 0.035);
}

.room-timer-panel strong,
.room-score-reveal strong {
  color: var(--gold);
  font-size: clamp(9rem, 18vw, 23rem);
  line-height: 0.78;
}

.room-timer-panel p {
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: clamp(1.2rem, 1.8vw, 2rem);
  font-weight: 850;
  text-align: center;
}

.room-start-button {
  width: min(100%, 34rem);
  min-height: clamp(8rem, 15vw, 18rem);
  border: 0;
  border-radius: 8px;
  color: #071332;
  background: var(--gold);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
  font-size: clamp(4.5rem, 9vw, 12rem);
  line-height: 0.9;
}

.room-start-button:active {
  transform: translateY(2px);
}

.room-complete-message {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.4rem, 4vw, 5rem);
  font-weight: 950;
  text-align: center;
}

.room-next-display {
  grid-template-rows: minmax(6rem, 18vh) minmax(0, 1fr);
}

.room-next-title {
  display: grid;
  align-content: center;
  padding: clamp(1.25rem, 2.8vw, 3rem);
  border-bottom: 1px solid rgba(247, 201, 75, 0.22);
}

.room-next-title h1 {
  margin: 0;
  color: var(--muted);
  font-size: clamp(2.8rem, 5.2vw, 6.2rem);
  font-weight: 950;
  line-height: 0.95;
}

.room-next-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(22rem, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
  padding: clamp(1.25rem, 2.8vw, 3rem);
}

.room-next-country {
  display: grid;
  gap: clamp(0.75rem, 1.3vw, 1.3rem);
  min-width: 0;
}

.room-next-country h2 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24em;
  align-items: center;
  margin: 0;
  font-size: clamp(4.4rem, 8vw, 10rem);
  line-height: 0.88;
}

.room-winner-display {
  grid-template-rows: minmax(13rem, 28vh) minmax(0, 1fr);
}

.room-winner-lower {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(26rem, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
  padding: clamp(1.25rem, 2.8vw, 3rem);
  border-top: 1px solid rgba(247, 201, 75, 0.22);
}

.room-next-owner,
.room-winner-owner {
  display: grid;
  justify-items: center;
}

.room-next-owner .owner-chip,
.room-winner-owner .owner-chip {
  display: grid;
  justify-items: center;
  gap: clamp(1rem, 1.8vw, 1.8rem);
  width: min(100%, 32rem);
  padding: clamp(1.25rem, 2.3vw, 2.3rem);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.room-next-owner .owner-chip img,
.room-winner-owner .owner-chip img {
  width: clamp(8rem, 13vw, 15rem);
  height: clamp(8rem, 13vw, 15rem);
  border: 0.35rem solid var(--gold);
}

.room-next-owner .owner-chip span,
.room-winner-owner .owner-chip span {
  font-size: clamp(4rem, 7vw, 9rem);
  line-height: 0.85;
}

.room-next-owner .owner-chip-tbc,
.room-winner-owner .owner-chip-tbc {
  align-content: center;
  min-height: clamp(8rem, 13vw, 14rem);
  gap: 0.45rem;
}

.room-next-owner .owner-chip-tbc::before,
.room-winner-owner .owner-chip-tbc::before {
  content: "Scoobie";
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.55rem);
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.room-next-owner .owner-chip-tbc > span:first-child,
.room-winner-owner .owner-chip-tbc > span:first-child {
  display: none;
}

.room-next-owner .owner-chip-tbc > span:last-child,
.room-winner-owner .owner-chip-tbc > span:last-child {
  color: var(--yellow);
  font-size: clamp(3rem, 5vw, 6rem);
  line-height: 0.9;
  text-align: center;
}

.room-score-reveal {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
}

.room-score-reveal span {
  color: var(--muted);
  font-size: clamp(1.6rem, 2.5vw, 3rem);
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 780px) {
  .game-topbar,
  .admin-setup,
  .big-now {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .big-now strong {
    justify-self: center;
    font-size: clamp(4.2rem, 22vw, 6.8rem);
    text-align: center;
  }

  .admin-vote-headshots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-items: center;
    gap: 0.75rem;
  }

  .admin-vote-avatar {
    width: 4rem;
    height: 4rem;
  }

  .admin-utility-actions,
  .admin-primary-actions {
    justify-content: stretch;
  }

  .admin-utility-actions > *,
  .admin-primary-actions > * {
    flex: 1 1 auto;
  }

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

  .semi-setup-controls > form,
  .semi-status-grid form,
  .semi-status-controls,
  .semi-finalise-form,
  .link-switch-row {
    grid-template-columns: 1fr;
  }

  .semi-status-controls {
    justify-items: stretch;
  }

  .live-scoreboard {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 2.5rem 1fr auto;
  }

  .rank-row em {
    grid-column: 2 / -1;
  }

  .rank-row b {
    grid-column: 3;
    grid-row: 1;
  }

  .vote-strip {
    gap: 0.45rem;
  }

  .vote-pill {
    grid-template-columns: 1.85rem auto;
    font-size: 0.76rem;
  }

  .vote-pill img {
    width: 1.85rem;
    height: 1.85rem;
  }

  .player-scoreboard .rank-row {
    grid-template-columns: 2.5rem 1fr 3rem;
  }

  .player-scoreboard .rank-row > b {
    font-size: 2rem;
  }

  .pending-country-details {
    grid-template-columns: 1fr;
  }

  .pending-row .owner-chip {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .running-order-row {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .running-order-row em {
    grid-column: 2;
  }

  .room-display {
    grid-template-rows: auto auto;
  }

  .room-lower-band,
  .room-next-lower,
  .room-winner-lower {
    grid-template-columns: 1fr;
  }

  .room-timer-panel {
    border-top: 1px solid rgba(247, 201, 75, 0.22);
    border-left: 0;
  }

  .room-timer-panel strong,
  .room-score-reveal strong {
    font-size: clamp(7rem, 25vw, 12rem);
  }

  .room-vote-grid {
    width: 100%;
    max-width: 34rem;
    justify-self: center;
  }
}
