/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --bg: #111316;
  --panel: #1b2027;
  --panel-strong: #232a33;
  --text: #f7f4ea;
  --muted: #a9b0bb;
  --line: rgba(255, 255, 255, 0.12);
  --cyan: #4dd7ff;
  --green: #3de28f;
  --amber: #ffc857;
  --pink: #ff5d8f;
  --red: #ff6b5f;
  --blue: #5e9bff;
  --cream: #fff4d6;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 48px),
    linear-gradient(135deg, rgba(255, 200, 87, 0.1), transparent 34%),
    linear-gradient(225deg, rgba(77, 215, 255, 0.1), transparent 36%),
    var(--bg);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.home-shell {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 32px;
  font-family: ui-rounded, "SF Pro Rounded", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  isolation: isolate;
  position: relative;
}

.home-shell::before {
  content: "";
  position: absolute;
  inset: 16px -20px auto auto;
  z-index: -1;
  width: min(420px, 72vw);
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, transparent 0 45%, rgba(255, 200, 87, 0.14) 45% 55%, transparent 55%),
    linear-gradient(45deg, transparent 0 45%, rgba(255, 93, 143, 0.14) 45% 55%, transparent 55%);
  opacity: 0.8;
  transform: rotate(-3deg);
}

.home-hero,
.lobby-layout,
.host-round-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 20px;
  align-items: stretch;
}

.home-hero {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 32px;
  align-items: center;
}

.home-hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(3.2rem, 6.4vw, 5.7rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
}

.join-room-panel h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 0.9;
}

.hero-copy,
.muted {
  color: var(--muted);
}

.hero-copy {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: 1.15rem;
  font-weight: 520;
  line-height: 1.6;
}

.hero-content {
  min-width: 0;
  padding: 10px 0 0;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-stats span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.86rem;
  font-weight: 750;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.join-panel,
.join-room-panel,
.code-stage,
.leaderboard,
.waiting-stage,
.final-stage,
.locked-answer,
.reveal-result {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(27, 32, 39, 0.86);
  box-shadow: var(--shadow);
}

.join-panel,
.join-room-panel,
.code-stage,
.waiting-stage,
.final-stage,
.locked-answer,
.reveal-result {
  padding: 24px;
}

.join-panel h2,
.section-heading h2,
.leaderboard h2,
.waiting-stage h2,
.final-stage h2,
.player-prompt h2 {
  margin: 0;
}

.final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.final-actions .primary-link,
.final-actions .secondary-button {
  min-width: min(100%, 170px);
}

.home-action-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.play-preview {
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 93, 143, 0.18), transparent 48%),
    linear-gradient(225deg, rgba(77, 215, 255, 0.18), transparent 42%),
    rgba(32, 36, 44, 0.88);
  box-shadow: var(--shadow);
}

.preview-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.preview-code {
  color: var(--amber);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}

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

.preview-tile {
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.08) 50% 75%, transparent 75%),
    rgba(13, 15, 18, 0.72);
  background-size: 28px 28px;
}

.preview-tile.is-photo {
  background:
    linear-gradient(135deg, rgba(77, 215, 255, 0.34), rgba(94, 155, 255, 0.1)),
    url("/locations/shibuya.jpg") center / cover;
}

.preview-tile.is-goal {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, rgba(61, 226, 143, 0.3), rgba(255, 200, 87, 0.12)),
    #12331f;
  background-size: 18px 18px, 18px 18px, auto, auto;
}

.preview-tile.is-active {
  border-color: rgba(255, 200, 87, 0.85);
  background:
    linear-gradient(135deg, rgba(255, 200, 87, 0.36), rgba(255, 93, 143, 0.16)),
    #2b2217;
}

.preview-players {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.preview-players span {
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.preview-players span:nth-child(2) {
  background: var(--cyan);
}

.preview-players span:nth-child(3) {
  background: var(--amber);
}

.preview-players span:nth-child(4) {
  background: var(--pink);
}

.home-action-stack .join-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent),
    rgba(27, 32, 39, 0.9);
}

.join-form,
.nickname-form {
  display: grid;
  gap: 12px;
}

.join-form {
  grid-template-columns: 1fr auto;
  margin-top: 18px;
}

.nickname-form {
  max-width: 460px;
  margin-top: 24px;
}

.nickname-form label {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-label {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.head-picker {
  display: grid;
  gap: 10px;
}

.head-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.team-picker,
.mode-picker {
  display: grid;
  gap: 10px;
}

.team-options,
.mode-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.team-option,
.mode-option {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 850;
  text-align: center;
  cursor: pointer;
}

.team-option input,
.mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.team-option:has(input:checked),
.mode-option:has(input:checked) {
  border-color: rgba(255, 200, 87, 0.78);
  background: rgba(255, 200, 87, 0.13);
}

.mode-option-practice:has(input:checked) {
  border-color: rgba(61, 226, 143, 0.78);
  background: rgba(61, 226, 143, 0.15);
}

.team-option-red:has(input:checked) {
  border-color: rgba(255, 93, 108, 0.8);
  background: rgba(255, 93, 108, 0.16);
}

.team-option-blue:has(input:checked) {
  border-color: rgba(77, 215, 255, 0.8);
  background: rgba(77, 215, 255, 0.16);
}

.head-option {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.head-option:hover,
.head-option:has(input:checked) {
  border-color: rgba(255, 200, 87, 0.75);
  background: rgba(255, 200, 87, 0.12);
}

.head-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.head-option-face {
  display: inline-flex;
}

.head-option-name {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.avatar-head {
  width: 38px;
  height: 38px;
  display: inline-block;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 38%, #fffaf0 0 4px, #101317 4.2px 5.6px, transparent 5.9px),
    radial-gradient(circle at 67% 38%, #fffaf0 0 4px, #101317 4.2px 5.6px, transparent 5.9px),
    radial-gradient(ellipse at 34% 59%, rgba(255, 117, 126, 0.24) 0 5px, transparent 5.5px),
    radial-gradient(ellipse at 68% 59%, rgba(255, 117, 126, 0.2) 0 5px, transparent 5.5px),
    radial-gradient(ellipse at 50% 65%, transparent 0 8px, #101317 8px 9.6px, transparent 10px),
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.86) 0 8px, transparent 13px),
    linear-gradient(145deg, #ffe0b6 0%, #f1c18a 58%, #a9693e 100%);
  box-shadow:
    inset 0 -6px 0 rgba(0, 0, 0, 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    0 5px 14px rgba(0, 0, 0, 0.24);
  overflow: visible;
  position: relative;
}

.avatar-head-large {
  width: 56px;
  height: 56px;
}

.head-star {
  background:
    radial-gradient(ellipse at 34% 59%, rgba(255, 117, 126, 0.24) 0 5px, transparent 5.5px),
    radial-gradient(ellipse at 68% 59%, rgba(255, 117, 126, 0.2) 0 5px, transparent 5.5px),
    radial-gradient(ellipse at 50% 66%, transparent 0 8px, #101317 8px 9.6px, transparent 10px),
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.82) 0 8px, transparent 13px),
    linear-gradient(145deg, #ffd3c8 0%, #f3b1a4 58%, #b65f6f 100%);
}

.head-star::before,
.head-star::after {
  content: "";
  position: absolute;
  top: 12px;
  width: 11px;
  height: 11px;
  background: #fff4d6;
  clip-path: polygon(50% 0, 61% 34%, 98% 34%, 68% 55%, 79% 91%, 50% 68%, 21% 91%, 32% 55%, 2% 34%, 39% 34%);
}

.head-star::before {
  left: 8px;
}

.head-star::after {
  right: 8px;
}

.head-robot {
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 0 26%, rgba(16, 19, 23, 0.56) 26% 74%, transparent 74%),
    radial-gradient(circle at 34% 42%, var(--cyan) 0 3px, transparent 3.5px),
    radial-gradient(circle at 66% 42%, var(--green) 0 3px, transparent 3.5px),
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.78) 0 8px, transparent 13px),
    linear-gradient(145deg, #c9d2dc 0%, #aeb8c5 56%, #566170 100%);
}

.head-robot::before {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 9px;
  height: 4px;
  border-radius: 999px;
  background: #101317;
}

.head-ninja {
  background:
    radial-gradient(circle at 35% 43%, #101317 0 3px, transparent 3.5px),
    radial-gradient(circle at 65% 43%, #101317 0 3px, transparent 3.5px),
    linear-gradient(90deg, transparent 0 20%, #f2d5af 20% 80%, transparent 80%),
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.18) 0 8px, transparent 13px),
    linear-gradient(145deg, #1a1d22, #080a0d);
}

.head-ninja::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 16px;
  height: 4px;
  border-radius: 999px;
  background: #101317;
  box-shadow: 8px 0 0 #101317;
}

.head-crown {
  background:
    radial-gradient(circle at 31% 39%, #fffaf0 0 4px, #101317 4.2px 5.6px, transparent 5.9px),
    radial-gradient(circle at 67% 39%, #fffaf0 0 4px, #101317 4.2px 5.6px, transparent 5.9px),
    radial-gradient(ellipse at 34% 60%, rgba(255, 117, 126, 0.22) 0 5px, transparent 5.5px),
    radial-gradient(ellipse at 68% 60%, rgba(255, 117, 126, 0.18) 0 5px, transparent 5.5px),
    radial-gradient(ellipse at 50% 67%, transparent 0 8px, #101317 8px 9.6px, transparent 10px),
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.78) 0 8px, transparent 13px),
    linear-gradient(145deg, #ffc29a 0%, #df9a62 58%, #88431f 100%);
}

.head-crown::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: -9px;
  height: 15px;
  background: var(--amber);
  clip-path: polygon(0 100%, 0 36%, 25% 72%, 50% 0, 75% 72%, 100% 36%, 100% 100%);
}

.head-cyclops {
  background:
    radial-gradient(circle at 50% 40%, #101317 0 6px, #fffaf0 6px 9px, transparent 9.5px),
    radial-gradient(ellipse at 50% 68%, transparent 0 8px, #101317 8px 9.6px, transparent 10px),
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.8) 0 8px, transparent 13px),
    linear-gradient(145deg, #d5fbff 0%, #b9ecff 58%, #47788b 100%);
}

.head-cyclops::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 15px;
  height: 3px;
  border-radius: 999px;
  background: #101317;
}

.code-input,
.nickname-input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  color: var(--text);
  background: #0d0f12;
  outline: none;
}

.code-input {
  text-transform: uppercase;
}

.code-input:focus,
.nickname-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(77, 215, 255, 0.16);
}

.name-generator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.name-generator-button {
  min-height: 48px;
  border: 1px solid rgba(255, 200, 87, 0.34);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--cream);
  background: rgba(255, 200, 87, 0.13);
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.name-generator-button:hover {
  border-color: rgba(255, 200, 87, 0.62);
  background: rgba(255, 200, 87, 0.2);
  transform: translateY(-1px);
}

.primary-button,
.secondary-button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 18px;
  color: #07100d;
  background: var(--green);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.primary-link:hover {
  transform: translateY(-1px);
}

.secondary-button {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.11);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.wide-button {
  width: 100%;
}

.text-link {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 800;
}

.my-sessions {
  display: grid;
  gap: 14px;
}

.my-sessions-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.my-session-totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.my-session-totals span,
.my-session-details span,
.my-session-state {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.my-session-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}

.my-session-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(77, 215, 255, 0.1), transparent 44%),
    rgba(27, 32, 39, 0.78);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.my-session-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(77, 215, 255, 0.16), transparent 44%),
    rgba(33, 39, 47, 0.84);
  transform: translateY(-2px);
}

.my-session-card.is-closed {
  background:
    linear-gradient(135deg, rgba(255, 200, 87, 0.08), transparent 44%),
    rgba(25, 28, 34, 0.72);
}

.my-session-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 10px;
  align-items: center;
}

.my-session-state {
  color: #07100d;
  background: var(--green);
}

.my-session-card.is-closed .my-session-state {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.13);
}

.my-session-code {
  overflow: hidden;
  color: var(--amber);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 0.95;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-session-game {
  grid-column: 2;
  color: var(--cream);
  font-weight: 900;
}

.my-session-details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.my-session-details .my-session-role {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.11);
}

.my-session-action {
  justify-self: start;
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 900;
}

.game-picker {
  display: grid;
  gap: 16px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.game-card {
  min-height: 235px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  position: relative;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 17px, rgba(255, 255, 255, 0.06) 17px 18px, transparent 18px 36px),
    linear-gradient(0deg, transparent 0 17px, rgba(255, 255, 255, 0.04) 17px 18px, transparent 18px 36px);
  opacity: 0.45;
  pointer-events: none;
}

.game-card > * {
  position: relative;
}

.game-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.26);
  transform: translateY(-2px);
}

.game-card.geo-guess {
  background:
    linear-gradient(135deg, rgba(77, 215, 255, 0.24), transparent 44%),
    linear-gradient(225deg, rgba(255, 200, 87, 0.14), transparent 44%),
    var(--panel);
}

.game-card.mini-soccer {
  background:
    linear-gradient(135deg, rgba(61, 226, 143, 0.24), transparent 44%),
    linear-gradient(225deg, rgba(255, 93, 143, 0.13), transparent 44%),
    var(--panel);
}

.game-card.arcade-volleyball {
  background:
    linear-gradient(135deg, rgba(255, 200, 87, 0.24), transparent 42%),
    linear-gradient(225deg, rgba(77, 215, 255, 0.17), transparent 42%),
    var(--panel);
}

.game-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.game-label {
  margin: 0;
  color: var(--amber);
  font-size: 0.86rem;
  font-weight: 760;
  text-transform: uppercase;
}

.game-card-visual {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  position: relative;
}

.geo-guess .game-card-visual {
  background:
    linear-gradient(135deg, rgba(77, 215, 255, 0.26), rgba(255, 200, 87, 0.16)),
    url("/locations/golden-gate.jpg") center / cover;
}

.geo-guess .game-card-visual::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 13px;
  width: 16px;
  height: 16px;
  border: 4px solid var(--amber);
  border-radius: 50% 50% 50% 0;
  background: rgba(17, 19, 22, 0.74);
  transform: rotate(-45deg);
}

.mini-soccer .game-card-visual {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    rgba(61, 226, 143, 0.2);
  background-size: 14px 14px;
}

.mini-soccer .game-card-visual::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 16px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(7, 16, 13, 0.8);
  border-radius: 50%;
  background: var(--cream);
  box-shadow:
    inset 7px 0 0 rgba(7, 16, 13, 0.8),
    inset -4px -5px 0 rgba(7, 16, 13, 0.2);
}

.arcade-volleyball .game-card-visual {
  background:
    linear-gradient(90deg, transparent 0 47%, rgba(255, 244, 214, 0.82) 47% 53%, transparent 53%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(180deg, #5cd7ff 0 40%, #ffd878 40% 100%);
  background-size: auto, 100% 12px, auto;
}

.arcade-volleyball .game-card-visual::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 8px;
  width: 16px;
  height: 16px;
  border: 2px solid #101317;
  border-radius: 50%;
  background: var(--cream);
  box-shadow:
    -18px 22px 0 -3px #ff5d6c,
    18px 22px 0 -3px var(--cyan);
}

.arcade-volleyball .game-card-visual::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 19, 22, 0.2);
}

.game-card h3 {
  margin: 0;
  font-size: clamp(1.7rem, 2.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
}

.game-description {
  max-width: 500px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 520;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.game-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.game-feature-list li {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.075);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.practice-button {
  border: 1px solid rgba(61, 226, 143, 0.22);
  background: rgba(61, 226, 143, 0.12);
}

.practice-button:hover {
  background: rgba(61, 226, 143, 0.18);
}

.game-meta span,
.round-pill,
.score-chip,
.choice-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  font-weight: 800;
}

.session-topbar,
.player-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.session-topbar h1,
.player-topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.95;
}

.round-pill,
.score-chip {
  color: var(--text);
  white-space: nowrap;
}

.session-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.session-close-form {
  margin: 0;
}

.session-close-button {
  width: auto;
  min-height: 42px;
  border: 1px solid rgba(255, 107, 95, 0.28);
  padding: 0 14px;
  color: var(--cream);
  background: rgba(255, 107, 95, 0.13);
  white-space: nowrap;
}

.session-close-button:hover {
  background: rgba(255, 107, 95, 0.2);
}

.room-code {
  margin: 12px 0;
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 950;
  line-height: 0.9;
  color: var(--amber);
}

.room-code-small {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
}

.code-stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-content: center;
}

.join-qr-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.join-qr-code {
  width: clamp(116px, 18vw, 168px);
  border-radius: 6px;
  padding: 8px;
  background: #fff;
  line-height: 0;
}

.join-qr-code svg {
  display: block;
  width: 100%;
  height: auto;
}

.join-qr-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.join-url {
  overflow-wrap: anywhere;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 760;
  text-decoration: none;
}

.join-url:hover {
  color: var(--cream);
}

.host-side {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 16px;
}

.round-stage {
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #080a0d;
  position: relative;
}

.round-status {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.round-status span {
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.62);
  font-weight: 900;
}

.geo-stage,
.soccer-stage {
  min-height: 620px;
  position: relative;
}

.geo-image {
  width: 100%;
  height: 620px;
  display: block;
  object-fit: cover;
}

.geo-pin-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 0;
  background:
    linear-gradient(135deg, rgba(77, 215, 255, 0.12), transparent 42%),
    #101822;
}

.geo-photo-panel {
  min-width: 0;
  min-height: 620px;
}

.geo-photo-panel .geo-image {
  height: 100%;
}

.geo-host-map-panel {
  display: grid;
  grid-template-rows: minmax(300px, 1fr) auto auto;
  gap: 12px;
  min-width: 0;
  padding: 70px 16px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    rgba(10, 13, 18, 0.9);
}

.geo-map-shell {
  min-height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  overflow: hidden;
  background: #b8d6e4;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 18px 42px rgba(0, 0, 0, 0.24);
  position: relative;
}

.geo-leaflet-map {
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: #b8d6e4;
  font-family: inherit;
}

.geo-map-shell .leaflet-container {
  background: #b8d6e4;
  font-family: inherit;
}

.geo-map-shell .leaflet-control-container {
  font-family: inherit;
}

.geo-map-shell .leaflet-control-zoom a {
  color: #101317;
  font-weight: 950;
}

.geo-map-shell .leaflet-control-attribution {
  font-size: 0.66rem;
}

.geo-host-map,
.geo-result-map {
  aspect-ratio: 2 / 1;
}

.geo-map-picker {
  min-height: 300px;
  aspect-ratio: 2 / 1;
  cursor: crosshair;
  touch-action: none;
}

.geo-map-picker::after {
  content: "Tap to place pin";
  position: absolute;
  z-index: 500;
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--cream);
  background: rgba(0, 0, 0, 0.48);
  font-size: 0.78rem;
  font-weight: 900;
  pointer-events: none;
}

.geo-leaflet-marker {
  background: transparent;
  border: 0;
}

.geo-leaflet-pin {
  width: 28px;
  height: 28px;
  border: 2px solid #101317;
  border-radius: 50% 50% 50% 0;
  display: grid;
  place-items: center;
  color: #101317;
  font-size: 0.74rem;
  font-weight: 950;
  transform: rotate(-45deg);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28);
}

.geo-leaflet-pin > span {
  transform: rotate(45deg);
}

.geo-leaflet-pin-player {
  background: linear-gradient(135deg, #5cf4ff, #2bb9ff);
}

.geo-leaflet-pin-closest {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #74ff9a, #2fd064);
  box-shadow:
    0 0 0 5px rgba(116, 255, 154, 0.24),
    0 12px 20px rgba(0, 0, 0, 0.3);
}

.geo-leaflet-pin-answer {
  width: 34px;
  height: 34px;
  border-color: var(--cream);
  background: linear-gradient(135deg, #ff7b7b, #ff365d);
}

.geo-leaflet-pin-answer::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cream);
}

.geo-leaflet-pin-draft {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ffe978, #ffb347);
}

.geo-map-waiting {
  position: absolute;
  z-index: 520;
  inset: 16px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.34);
  text-align: center;
}

.geo-map-waiting strong {
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.9;
}

.geo-map-waiting span {
  color: var(--muted);
  font-weight: 850;
}

.geo-answer-card,
.geo-distance-board {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.075);
}

.geo-answer-card {
  padding: 14px;
}

.geo-answer-card h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
}

.geo-answer-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.geo-distance-board {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px;
  list-style-position: inside;
}

.geo-distance-board li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border-radius: 6px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.geo-distance-board span {
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-distance-board strong {
  color: var(--cyan);
}

.geo-distance-board em {
  color: var(--green);
  font-style: normal;
  font-weight: 950;
}

.choice-strip {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-pill {
  border-radius: var(--radius);
  padding: 14px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.62);
}

.choice-pill.is-answer {
  border-color: rgba(61, 226, 143, 0.9);
  background: rgba(61, 226, 143, 0.24);
}

.submissions-meter {
  border-radius: var(--radius);
  padding: 18px;
  background: var(--panel-strong);
}

.submissions-meter span {
  display: block;
  font-size: 3rem;
  font-weight: 950;
  line-height: 1;
}

.submissions-meter p {
  margin: 6px 0 0;
  color: var(--muted);
}

.leaderboard {
  padding: 16px;
}

.leaderboard-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.leaderboard-heading span {
  color: var(--muted);
  font-size: 0.9rem;
}

.leaderboard-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-list li {
  display: grid;
  grid-template-columns: 32px 42px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border-radius: var(--radius);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.055);
}

.leaderboard-list li.is-live-match {
  grid-template-columns: 28px 42px auto 1fr auto;
}

.leaderboard-compact {
  padding: 10px;
}

.leaderboard-compact .leaderboard-list li {
  grid-template-columns: 26px 38px minmax(0, 1fr) auto;
  min-height: 48px;
  padding: 7px 9px;
}

.leaderboard-list strong {
  white-space: nowrap;
}

.rank {
  color: var(--muted);
  font-weight: 900;
}

.avatar {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #111316;
  background: var(--amber);
  font-size: 0.8rem;
  font-weight: 900;
}

.name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-badge {
  border-radius: 999px;
  padding: 6px 8px;
  color: #07100d;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.team-badge-red {
  background: #ff5d6c;
}

.team-badge-blue {
  background: var(--cyan);
}

.player-shell {
  max-width: 720px;
}

.player-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.player-identity h1 {
  overflow-wrap: anywhere;
}

.live-match {
  display: grid;
  gap: 16px;
}

.live-cup-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(201, 244, 93, 0.18);
  border-radius: var(--radius);
  padding: 10px 14px;
  background: rgba(201, 244, 93, 0.07);
}

.live-cup-strip span {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.live-cup-strip strong {
  min-width: 0;
  overflow: hidden;
  color: var(--cream);
  font-size: 0.96rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(27, 32, 39, 0.86);
  box-shadow: var(--shadow);
}

.live-team {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.live-team-blue {
  justify-content: flex-end;
}

.live-team strong {
  min-width: 50px;
  border-radius: var(--radius);
  padding: 9px 12px;
  color: #07100d;
  font-size: 1.8rem;
  line-height: 1;
  text-align: center;
}

.live-team-red strong {
  background: #ff5d6c;
}

.live-team-blue strong {
  background: var(--cyan);
}

.volleyball-scoreboard {
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 93, 108, 0.1), transparent 34%, rgba(77, 215, 255, 0.1)),
    rgba(17, 21, 27, 0.72);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.volleyball-scoreboard .live-team {
  gap: 9px;
}

.volleyball-scoreboard .live-team::before {
  content: "";
  width: 5px;
  height: 30px;
  border-radius: 999px;
  background: #ff5d6c;
  box-shadow: 0 0 12px rgba(255, 93, 108, 0.28);
}

.volleyball-scoreboard .live-team-blue::before {
  order: 3;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(77, 215, 255, 0.28);
}

.volleyball-scoreboard .live-team strong {
  min-width: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.45rem;
}

.volleyball-scoreboard .live-team span {
  overflow: hidden;
  color: rgba(255, 244, 214, 0.86);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-match-status {
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.live-field-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #062615;
  box-shadow: var(--shadow);
  position: relative;
}

.live-field {
  width: 100%;
  aspect-ratio: 1000 / 560;
  display: block;
  backface-visibility: hidden;
  contain: paint;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.live-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: rgba(0, 0, 0, 0.32);
  font-size: clamp(2.5rem, 9vw, 7rem);
  font-weight: 950;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: scale(0.92);
  transition: opacity 160ms ease, transform 160ms ease;
}

.live-overlay.is-visible {
  opacity: 1;
  transform: scale(1);
}

.team-final-score {
  margin: 10px 0 20px;
  color: var(--amber);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 900;
}

.mini-controller {
  display: grid;
}

.controller-pitch {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 93, 108, 0.13), transparent 42%),
    linear-gradient(225deg, rgba(77, 215, 255, 0.13), transparent 42%),
    rgba(27, 32, 39, 0.9);
  box-shadow: var(--shadow);
  position: relative;
}

.controller-hud {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.controller-field {
  width: 100%;
  aspect-ratio: 1000 / 560;
  display: block;
  cursor: grab;
  touch-action: none;
  user-select: none;
  backface-visibility: hidden;
  contain: paint;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.controller-field.is-dragging-head {
  cursor: grabbing;
}

.controller-field-shell {
  position: relative;
}

.controller-player {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(52vw, 360px);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}

.controller-player h2 {
  margin: 0;
  font-size: clamp(1.25rem, 5vw, 2.6rem);
  line-height: 0.98;
}

.volleyball-controller-player {
  max-width: min(42vw, 310px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 5px solid #ff5d6c;
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(16, 19, 23, 0.32);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.volleyball-controller-player-blue {
  border-left-color: var(--cyan);
}

.volleyball-controller-player .eyebrow {
  color: rgba(255, 244, 214, 0.72);
  font-size: 0.68rem;
}

.volleyball-controller-player h2 {
  font-size: clamp(1.08rem, 4vw, 2rem);
}

.controller-score {
  border-radius: var(--radius);
  padding: 12px;
  color: var(--cream);
  background: rgba(0, 0, 0, 0.42);
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.controller-status {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 18px;
  max-width: 280px;
  margin: 0;
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--cream);
  background: rgba(0, 0, 0, 0.42);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.player-round,
.answer-grid {
  display: grid;
  gap: 14px;
}

.player-prompt {
  padding: 18px 0 6px;
}

.player-prompt h2 {
  font-size: clamp(1.8rem, 7vw, 3.4rem);
  line-height: 1.02;
}

.timer-line {
  color: var(--amber);
  font-weight: 900;
}

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

.answer-button {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  background: var(--panel-strong);
  font-size: clamp(1rem, 4.5vw, 1.45rem);
  font-weight: 900;
  cursor: pointer;
}

.answer-button:nth-child(1) {
  background: rgba(77, 215, 255, 0.2);
}

.answer-button:nth-child(2) {
  background: rgba(255, 200, 87, 0.2);
}

.answer-button:nth-child(3) {
  background: rgba(255, 93, 143, 0.2);
}

.answer-button:nth-child(4),
.answer-button:nth-child(5) {
  background: rgba(61, 226, 143, 0.18);
}

.locked-answer,
.reveal-result {
  margin-top: 12px;
}

.locked-answer h3,
.reveal-result h3 {
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 3rem);
}

.reveal-result.is-correct {
  border-color: rgba(61, 226, 143, 0.5);
}

.reveal-result.is-wrong {
  border-color: rgba(255, 107, 95, 0.5);
}

.geo-player-round {
  grid-template-rows: auto minmax(0, 1fr);
}

.geo-player-round:has(.geo-live-panels) {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.geo-game-hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "player score"
    "round timer";
  gap: 3px 12px;
  align-items: center;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 7px 9px;
  background: rgba(17, 19, 22, 0.72);
}

.geo-hud-player {
  grid-area: player;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.geo-hud-player .avatar-head {
  width: 34px;
  height: 34px;
}

.geo-hud-player strong {
  min-width: 0;
  overflow: hidden;
  color: var(--cream);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-hud-round,
.geo-hud-timer,
.geo-hud-score {
  font-weight: 950;
  white-space: nowrap;
}

.geo-hud-round {
  grid-area: round;
  color: var(--cyan);
  font-size: 0.82rem;
}

.geo-hud-timer {
  grid-area: timer;
  justify-self: end;
  color: var(--amber);
  font-size: 0.95rem;
}

.geo-hud-score {
  grid-area: score;
  justify-self: end;
  color: var(--cream);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
}

.geo-waiting-for-round {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(61, 226, 143, 0.12), transparent 46%),
    rgba(17, 19, 22, 0.7);
  text-align: center;
}

.geo-waiting-for-round div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
}

.geo-waiting-for-round strong {
  color: var(--cyan);
  font-size: clamp(1.4rem, 4vw, 2.6rem);
}

.geo-waiting-for-round span {
  color: var(--green);
  font-weight: 950;
}

.geo-waiting-for-round p {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.geo-live-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-height: 0;
}

.geo-live-panels:has(.geo-history) {
  grid-template-columns: minmax(260px, 0.84fr) minmax(240px, 1fr);
}

.geo-standings {
  --geo-standings-row-height: 42px;
  --geo-standings-row-gap: 6px;
}

.geo-standings,
.geo-history {
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.geo-standings-heading,
.geo-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  min-height: 18px;
}

.geo-standings-heading strong,
.geo-history-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.geo-standings-heading span,
.geo-history-heading strong {
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 950;
  white-space: nowrap;
}

.geo-standings-list,
.geo-history-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.geo-standings-list {
  gap: var(--geo-standings-row-gap);
  max-height: calc((var(--geo-standings-row-height) * 3) + (var(--geo-standings-row-gap) * 2));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.geo-history-list {
  grid-auto-flow: column;
  grid-auto-columns: minmax(108px, 128px);
  overflow-x: auto;
  overflow-y: hidden;
}

.geo-standings-list li,
.geo-history-list li {
  display: grid;
  gap: 8px;
  align-items: center;
  border-radius: 7px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.84rem;
}

.geo-standings-list li {
  grid-template-columns: 18px 32px minmax(0, 1fr) auto auto 12px;
  min-height: var(--geo-standings-row-height);
}

.geo-standings-list li.is-current-player {
  background: rgba(77, 215, 255, 0.12);
}

.geo-standings-list .avatar-head {
  width: 32px;
  height: 32px;
}

.geo-standings-list .name {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-standings-progress,
.geo-history-round,
.geo-history-time {
  color: var(--muted);
  font-weight: 850;
  white-space: nowrap;
}

.geo-standings-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.geo-standings-status.is-pinned {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(61, 226, 143, 0.14);
}

.geo-standings-status.is-pending {
  background: var(--amber);
}

.geo-history-distance {
  color: var(--cyan);
  white-space: nowrap;
}

.geo-history-list li {
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "round total"
    "distance distance"
    "time time";
}

.geo-history-round {
  grid-area: round;
}

.geo-history-distance {
  grid-area: distance;
  font-size: 0.98rem;
}

.geo-history-time {
  grid-area: time;
}

.geo-history-list em {
  grid-area: total;
  justify-self: end;
  color: var(--green);
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.geo-final-stage {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: 10px;
  align-self: start;
  height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.geo-final-stage .geo-history {
  min-width: 0;
}

.geo-final-stage .geo-history-list {
  grid-auto-flow: row;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  max-height: none;
  overflow: visible;
}

.geo-results {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(10px, 1.7dvh, 16px);
  min-height: 0;
  font-family: ui-rounded, "SF Pro Rounded", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.geo-results-header,
.geo-round-summary-heading,
.geo-rank-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.geo-results-header h2 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(2.2rem, 5.8dvh, 4.6rem);
  line-height: 0.92;
}

.geo-results-score {
  display: grid;
  justify-items: end;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 -8px 18px rgba(0, 0, 0, 0.16);
}

.geo-results-score span,
.geo-round-summary-heading span,
.geo-rank-heading span,
.geo-round-tile-main span,
.geo-round-tile-score span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.geo-results-score strong {
  color: var(--cream);
  font-size: clamp(1.1rem, 2.3dvh, 1.55rem);
}

.geo-results-actions {
  margin-top: 0;
}

.geo-results-board {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(230px, 0.48fr);
  gap: 10px;
  min-height: 0;
}

.geo-results-board:not(:has(.geo-rank-card)) {
  grid-template-columns: 1fr;
}

.geo-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-height: clamp(190px, 31dvh, 285px);
}

.geo-podium-count-1 {
  grid-template-columns: minmax(190px, 320px);
  justify-content: center;
}

.geo-podium-count-2 {
  grid-template-columns: repeat(2, minmax(0, 260px));
  justify-content: center;
}

.geo-podium-place {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  min-height: clamp(142px, 22dvh, 195px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 13px 10px 17px;
  background:
    linear-gradient(145deg, rgba(94, 155, 255, 0.16), transparent 48%),
    rgba(33, 39, 48, 0.9);
  box-shadow: inset 0 -18px 38px rgba(0, 0, 0, 0.2), var(--shadow);
}

.geo-podium-place::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 14px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.14));
}

.geo-podium-place > * {
  position: relative;
  z-index: 1;
}

.geo-podium-place-1 {
  min-height: clamp(178px, 31dvh, 265px);
  border-color: rgba(255, 200, 87, 0.46);
  background:
    linear-gradient(145deg, rgba(255, 200, 87, 0.28), transparent 52%),
    linear-gradient(225deg, rgba(61, 226, 143, 0.14), transparent 44%),
    rgba(39, 39, 33, 0.94);
  transform: translateY(-8px);
}

.geo-podium-place-2 {
  border-color: rgba(77, 215, 255, 0.28);
}

.geo-podium-place-3 {
  min-height: clamp(130px, 20dvh, 178px);
  border-color: rgba(255, 93, 143, 0.24);
}

.geo-podium-place.is-current-player,
.geo-rank-list li.is-current-player {
  outline: 2px solid rgba(77, 215, 255, 0.55);
  outline-offset: -2px;
}

.geo-podium-rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #101317;
  background: var(--amber);
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.geo-podium-place .avatar-head {
  width: clamp(46px, 7dvh, 66px);
  height: clamp(46px, 7dvh, 66px);
}

.geo-podium-place-1 .avatar-head {
  width: clamp(58px, 9dvh, 86px);
  height: clamp(58px, 9dvh, 86px);
}

.geo-podium-place strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--cream);
  font-size: clamp(1rem, 2.4dvh, 1.35rem);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-podium-place em {
  color: var(--cyan);
  font-size: clamp(1.15rem, 3dvh, 1.85rem);
  font-style: normal;
  font-weight: 950;
}

.geo-rank-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.geo-rank-heading strong,
.geo-round-summary-heading strong {
  color: var(--cream);
  font-size: 1rem;
}

.geo-rank-list {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.geo-rank-list li {
  display: grid;
  grid-template-columns: 24px 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 7px;
  padding: 7px 9px;
  background: rgba(0, 0, 0, 0.2);
}

.geo-rank-list .avatar-head {
  width: 34px;
  height: 34px;
}

.geo-rank-list .rank,
.geo-rank-list strong {
  color: var(--cream);
  font-weight: 950;
}

.geo-rank-list .name {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-round-summary {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.geo-round-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: auto hidden;
  list-style: none;
}

.geo-round-tiles li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  grid-template-areas:
    "number main score"
    "stats stats stats";
  gap: 8px 9px;
  min-width: 0;
  min-height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  padding: 9px;
  background:
    linear-gradient(135deg, rgba(77, 215, 255, 0.13), transparent 45%),
    rgba(18, 21, 26, 0.86);
}

.geo-round-tile-number {
  grid-area: number;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #101317;
  background: var(--green);
  font-weight: 950;
}

.geo-round-tile-main {
  grid-area: main;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.geo-round-tile-main strong {
  min-width: 0;
  overflow: hidden;
  color: var(--cream);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-round-tile-score {
  grid-area: score;
  display: grid;
  justify-items: end;
}

.geo-round-tile-score strong {
  color: var(--amber);
  font-size: 1rem;
  font-weight: 950;
}

.geo-round-tile-stats {
  grid-area: stats;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.geo-round-tile-stats span {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.8rem;
  font-weight: 950;
  white-space: nowrap;
}

.geo-pin-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.geo-player-card,
.geo-reveal-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: stretch;
  min-height: 0;
}

.geo-player-photo {
  width: 100%;
  min-height: 300px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block;
  object-fit: cover;
}

.geo-pin-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(17, 19, 22, 0.88);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.geo-pin-controls p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.geo-pin-controls .primary-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.geo-confirm-pin-button {
  min-width: 138px;
}

.geo-pin-form.is-pin-ready .geo-pin-controls {
  border-color: rgba(61, 226, 143, 0.42);
  background:
    linear-gradient(135deg, rgba(61, 226, 143, 0.14), rgba(77, 215, 255, 0.08)),
    rgba(17, 19, 22, 0.92);
}

.geo-pin-form.is-pin-ready .geo-confirm-pin-button {
  box-shadow: 0 0 0 4px rgba(61, 226, 143, 0.18);
}

.geo-locked-answer p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 850;
}

.geo-result-map {
  min-height: 260px;
}

.soccer-stage {
  display: grid;
  align-content: center;
  padding: 70px 24px 24px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 90px),
    linear-gradient(180deg, #14593c, #0d3f2c);
}

.goal-frame {
  width: min(780px, 100%);
  min-height: 260px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  border: 8px solid rgba(255, 255, 255, 0.82);
  border-bottom: 0;
  padding: 10px;
}

.goal-zone {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
  font-weight: 900;
}

.keeper-zone {
  color: #07100d;
  background: var(--amber);
}

.pitch-lines {
  width: min(820px, 100%);
  height: 190px;
  margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top: 0;
  position: relative;
}

.penalty-dot {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  transform: translateX(-50%);
}

.keeper-reveal {
  width: min(820px, 100%);
  margin: 16px auto 0;
  border-radius: var(--radius);
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.4);
  text-align: center;
}

.form-error,
.flash-alert {
  color: #1b0505;
  background: var(--red);
}

.flash-stack {
  position: fixed;
  z-index: 20;
  top: 16px;
  right: 16px;
  display: grid;
  gap: 8px;
}

.flash {
  margin: 0;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-weight: 800;
}

.flash-notice {
  color: #07100d;
  background: var(--green);
}

.form-error {
  border-radius: var(--radius);
  padding: 12px;
  font-weight: 800;
}

@media (max-width: 820px) {
  .app-shell {
    width: min(calc(100% - 22px), 720px);
    padding: 18px 0;
  }

  .home-shell {
    align-content: start;
    gap: 24px;
    overflow-x: hidden;
  }

  .home-hero,
  .lobby-layout,
  .host-round-layout,
  .game-grid,
  .join-form {
    grid-template-columns: 1fr;
  }

  .home-shell::before {
    display: none;
  }

  .home-hero {
    gap: 20px;
  }

  .home-hero h1 {
    font-size: clamp(2.4rem, 10.5vw, 3rem);
  }

  .hero-copy {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 8px;
    margin-top: 18px;
  }

  .hero-stats span {
    flex: 1 1 110px;
    padding: 7px 9px;
    text-align: center;
  }

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

  .team-options {
    grid-template-columns: 1fr;
  }

  .leaderboard-list li.is-live-match {
    grid-template-columns: 28px 42px 1fr auto;
  }

  .leaderboard-list li.is-live-match .team-badge {
    display: none;
  }

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

  .join-qr-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .join-qr-code {
    width: 104px;
    padding: 6px;
  }

  .live-team,
  .live-team-blue {
    justify-content: space-between;
  }

  .controller-hud {
    position: static;
    display: grid;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
  }

  .controller-player {
    max-width: none;
  }

  .controller-status {
    display: none;
  }

  .play-preview {
    padding: 14px;
  }

  .preview-tile {
    min-height: 62px;
  }

  .game-card {
    min-height: 220px;
  }

  .session-topbar,
  .player-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .round-stage,
  .geo-stage,
  .soccer-stage,
  .geo-image {
    min-height: 480px;
    height: 480px;
  }

  .geo-pin-stage,
  .geo-player-card,
  .geo-reveal-grid {
    grid-template-columns: 1fr;
  }

  .geo-host-map-panel {
    padding-top: 16px;
  }

  .geo-photo-panel,
  .geo-photo-panel .geo-image,
  .geo-player-photo {
    min-height: 240px;
    height: 240px;
  }

  .geo-pin-controls {
    grid-template-columns: 1fr;
  }

  .geo-live-panels,
  .geo-final-stage {
    grid-template-columns: 1fr;
  }

  .geo-results-header {
    align-items: start;
  }

  .geo-results-board {
    grid-template-columns: 1fr;
  }

  .geo-podium {
    min-height: 0;
  }

  .geo-podium-place-1 {
    transform: none;
  }

  .geo-rank-card {
    min-height: 130px;
  }

  .play-page .geo-results,
  .host-page .host-shell.is-geo-results .geo-results {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .play-page .geo-results-board,
  .host-page .host-shell.is-geo-results .geo-results-board {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .geo-standings-list li {
    grid-template-columns: 18px 30px minmax(0, 1fr) auto auto 12px;
  }

  .play-page .geo-player-card,
  .play-page .geo-reveal-grid {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 0.42fr) minmax(0, 0.58fr);
  }

  .geo-history-list li {
    grid-template-columns: auto 1fr;
  }

  .geo-history-time {
    display: none;
  }

  .play-page .geo-pin-controls {
    gap: 8px;
    padding: 8px;
  }

  .play-page .geo-confirm-pin-button {
    width: 100%;
    min-height: 48px;
  }

  .choice-strip,
  .answer-grid {
    grid-template-columns: 1fr;
  }

  .answer-button {
    min-height: 86px;
  }

  .goal-frame {
    min-height: 220px;
    grid-template-columns: 1fr;
  }

  .goal-zone {
    min-height: 54px;
  }

  .pitch-lines {
    display: none;
  }
}

@media (max-width: 500px) {
  .app-shell {
    width: min(calc(100% - 22px), 368px);
  }
}

/* UI refresh */
body.home-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 38%),
    linear-gradient(135deg, rgba(61, 226, 143, 0.12), transparent 34%),
    linear-gradient(225deg, rgba(255, 200, 87, 0.1), transparent 32%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 56px),
    var(--bg);
}

.home-page .home-shell {
  align-content: center;
  gap: 28px;
}

.home-page .app-shell {
  width: min(1360px, calc(100% - 32px));
}

.home-page .home-shell::before {
  inset: 24px auto auto -32px;
  width: min(500px, 72vw);
  height: 140px;
  border-color: rgba(255, 255, 255, 0.07);
  opacity: 0.48;
  transform: rotate(4deg);
}

.home-page .home-hero {
  grid-template-columns: minmax(320px, 0.72fr) minmax(520px, 1.28fr);
  gap: clamp(28px, 4vw, 52px);
}

.home-page .home-hero h1 {
  font-size: clamp(3rem, 5.8vw, 5.35rem);
  font-weight: 840;
  line-height: 0.98;
}

.home-page .hero-copy {
  max-width: 560px;
  margin-top: 16px;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
}

.home-page .hero-stats span {
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.home-field-preview {
  gap: 16px;
  padding: clamp(16px, 2vw, 22px);
  background:
    linear-gradient(135deg, rgba(61, 226, 143, 0.18), transparent 42%),
    linear-gradient(225deg, rgba(255, 200, 87, 0.16), transparent 40%),
    rgba(22, 27, 34, 0.94);
}

.preview-pitch {
  min-height: clamp(330px, 34vw, 460px);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 42px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 18% 82%, rgba(255, 255, 255, 0.08)),
    linear-gradient(180deg, #24a262, #117246);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.08);
  position: relative;
}

.preview-volley-court {
  background:
    radial-gradient(circle at 82% 19%, rgba(255, 250, 210, 0.95) 0 7%, rgba(255, 206, 93, 0.48) 8% 17%, transparent 18%),
    linear-gradient(180deg, #43bdfb 0 28%, #a8edff 43%, #fce18b 55%, #df9551 100%);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.09);
}

.preview-volley-court::before {
  content: none;
}

.preview-volley-court::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 43%;
  height: 26%;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(30, 93, 78, 0.54) 0 8%, transparent 9%),
    radial-gradient(ellipse at 86% 18%, rgba(29, 96, 84, 0.48) 0 10%, transparent 11%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.46) 0 2px, transparent 2px 17px),
    linear-gradient(180deg, #178fc8, #2bc9d0 58%, rgba(255, 255, 255, 0.74) 74%, rgba(255, 226, 146, 0.72));
  clip-path: polygon(0 0, 100% 0, 100% 78%, 82% 67%, 62% 82%, 42% 69%, 18% 84%, 0 70%);
}

.preview-cloud {
  position: absolute;
  z-index: 3;
  width: 92px;
  height: 24px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 36%, rgba(255, 255, 255, 0.78) 0 28%, transparent 29%),
    radial-gradient(circle at 58% 20%, rgba(255, 255, 255, 0.72) 0 30%, transparent 31%),
    rgba(255, 255, 255, 0.42);
}

.preview-cloud-one {
  top: 17%;
  left: 14%;
}

.preview-cloud-two {
  top: 21%;
  right: 16%;
  width: 122px;
}

.preview-net-post {
  position: absolute;
  z-index: 4;
  bottom: 8%;
  width: 8px;
  height: 53%;
  border-radius: 999px;
  background: #54321d;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
}

.preview-net-post-left {
  left: calc(50% - 25px);
}

.preview-net-post-right {
  left: calc(50% + 17px);
}

.preview-net {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 12%;
  width: min(44px, 6.4%);
  height: 52%;
  border-top: 7px solid #ff5d6c;
  border-left: 3px solid rgba(255, 244, 214, 0.72);
  border-right: 3px solid rgba(255, 244, 214, 0.72);
  background:
    repeating-linear-gradient(90deg, rgba(17, 19, 22, 0.28) 0 2px, transparent 2px 15px),
    repeating-linear-gradient(0deg, rgba(17, 19, 22, 0.24) 0 2px, transparent 2px 17px),
    rgba(255, 244, 214, 0.18);
  clip-path: polygon(12% 0, 88% 0, 76% 100%, 24% 100%);
  transform: translateX(-50%);
}

.preview-center-line,
.preview-center-circle,
.preview-goal,
.preview-player,
.preview-ball {
  position: absolute;
}

.preview-center-line {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.28);
  transform: translateX(-50%);
}

.preview-center-circle {
  top: 50%;
  left: 50%;
  width: 86px;
  height: 86px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.preview-goal {
  top: 35%;
  width: 22px;
  height: 30%;
  border: 2px solid rgba(255, 255, 255, 0.68);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 10px),
    rgba(255, 255, 255, 0.05);
}

.preview-goal-left {
  left: -2px;
  border-left: 0;
}

.preview-goal-right {
  right: -2px;
  border-right: 0;
}

.preview-player {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24), inset 0 -6px 0 rgba(0, 0, 0, 0.16);
}

.preview-player::before,
.preview-player::after {
  content: "";
  position: absolute;
  top: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #101317;
}

.preview-player::before {
  left: 10px;
}

.preview-player::after {
  right: 10px;
}

.preview-player-red {
  background: #ffc857;
}

.preview-player-blue {
  background: #75e1ff;
}

.preview-player-one {
  left: 20%;
  top: 28%;
}

.preview-player-two {
  left: 31%;
  top: 63%;
}

.preview-player-three {
  right: 28%;
  top: 23%;
}

.preview-player-four {
  right: 16%;
  top: 58%;
}

.preview-ball {
  left: 53%;
  top: 52%;
  width: 22px;
  height: 22px;
  border: 2px solid #101317;
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 44%, #101317 0 3px, transparent 3.5px),
    var(--cream);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, -50%);
}

.preview-volley-head {
  position: absolute;
  z-index: 6;
  width: clamp(46px, 6vw, 70px);
  height: clamp(46px, 6vw, 70px);
  border: 6px solid;
  border-radius: 50%;
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.24), inset 0 -9px 0 rgba(0, 0, 0, 0.14);
}

.preview-volley-head::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: -12%;
  height: 32%;
  border-radius: 999px 999px 42% 42%;
  background:
    repeating-linear-gradient(90deg, #3a2518 0 5px, transparent 5px 9px),
    #3a2518;
  clip-path: ellipse(50% 72% at 50% 82%);
  transform: rotate(-2deg);
}

.preview-volley-head::after {
  content: "";
  position: absolute;
  inset: 33% 27% auto;
  height: 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 50%, #101317 0 5px, transparent 5.5px),
    radial-gradient(circle at 100% 50%, #101317 0 5px, transparent 5.5px);
}

.preview-volley-head-red {
  border-color: #ff5d6c;
  background: #ffc857;
}

.preview-volley-head-blue {
  border-color: var(--cyan);
  background: #75e1ff;
}

.preview-volley-head-left {
  left: 22%;
  bottom: 12%;
}

.preview-volley-head-right {
  right: 21%;
  bottom: 20%;
}

.preview-volley-ball {
  z-index: 7;
  left: 48%;
  top: 27%;
  width: clamp(22px, 3vw, 34px);
  height: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(22, 28, 54, 0.42);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 14%, transparent 15%),
    conic-gradient(from 20deg, #ff3478 0 18%, #f8fbff 18% 29%, #563ed6 29% 47%, #f8fbff 47% 58%, #16d69f 58% 75%, #ffd43d 75% 100%);
  box-shadow: 0 9px 18px rgba(22, 28, 54, 0.28), inset -5px -6px 0 rgba(22, 28, 54, 0.2);
}

.preview-scoreline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-size: 0.9rem;
  font-weight: 900;
}

.preview-scoreline span {
  min-width: 0;
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.075);
  text-align: center;
}

.preview-scoreline span:first-child {
  color: #ff8792;
}

.preview-scoreline span:last-child {
  color: var(--cyan);
}

.home-page .join-panel {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 52%),
    rgba(27, 32, 39, 0.92);
}

.home-page .game-card {
  min-height: 300px;
}

.session-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 34%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 52px),
    var(--bg);
}

.host-page .host-shell {
  width: min(1280px, calc(100% - 24px));
}

.host-page .session-topbar {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(27, 32, 39, 0.74);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.host-page .session-topbar h1 {
  font-size: clamp(1.8rem, 3.8vw, 3.6rem);
  font-weight: 840;
}

.host-page .lobby-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.55fr);
  align-items: stretch;
}

.host-page .code-stage {
  justify-content: space-between;
  gap: 16px;
  background:
    linear-gradient(135deg, rgba(255, 200, 87, 0.14), transparent 44%),
    linear-gradient(225deg, rgba(77, 215, 255, 0.1), transparent 44%),
    rgba(27, 32, 39, 0.9);
}

.code-stage-primary {
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 34px);
  background: rgba(0, 0, 0, 0.16);
  text-align: center;
}

.code-stage-primary .room-code {
  margin: 8px 0 12px;
  font-size: clamp(4rem, 11vw, 8.8rem);
  letter-spacing: 0;
}

.code-stage-primary .muted {
  max-width: 420px;
  margin: 0 auto;
  font-weight: 650;
  line-height: 1.45;
}

.join-qr-label {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
}

.host-page .join-qr-card {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

.host-page .leaderboard {
  min-height: 0;
}

.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 0.7fr);
  gap: 20px;
  align-items: stretch;
}

.setup-copy,
.setup-form,
.volleyball-lobby-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 52%),
    rgba(27, 32, 39, 0.88);
  box-shadow: var(--shadow);
}

.setup-copy {
  min-height: 360px;
  display: grid;
  align-content: center;
  padding: clamp(22px, 4vw, 42px);
}

.setup-copy h2 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.94;
}

.setup-form {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: clamp(18px, 3vw, 28px);
}

.setup-player-fields {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.setup-player-fields h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label,
.form-hint {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.form-hint {
  margin: -4px 0 0;
}

.setting-input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 15px;
  color: var(--text);
  background: #0d0f12;
  outline: none;
}

.setting-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(77, 215, 255, 0.16);
}

.team-name-input-red:focus {
  border-color: #ff5d6c;
  box-shadow: 0 0 0 3px rgba(255, 93, 108, 0.16);
}

body.setup-session-page {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

.setup-session-page .host-shell {
  width: min(1280px, calc(100% - 18px));
  height: 100dvh;
  min-height: 0;
  padding: clamp(6px, 1.2dvh, 14px) 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(8px, 1.2dvh, 12px);
}

.setup-session-page .session-topbar {
  min-height: 0;
  margin-bottom: 0;
  padding: clamp(8px, 1.3dvh, 12px) 14px;
}

.setup-session-page .session-topbar h1 {
  font-size: clamp(1.8rem, 4.2dvh, 3.2rem);
}

.setup-session-page .setup-layout {
  min-height: 0;
  height: 100%;
  grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1fr);
  gap: clamp(10px, 1.4vw, 16px);
}

.setup-session-page .setup-copy,
.setup-session-page .setup-form {
  min-height: 0;
}

.setup-session-page .setup-copy {
  padding: clamp(16px, 2.4vw, 28px);
}

.setup-session-page .setup-copy h2 {
  font-size: clamp(2rem, 6.2dvh, 4.5rem);
}

.setup-session-page .setup-copy .hero-copy {
  margin-top: 12px;
  font-size: clamp(0.9rem, 1.7dvh, 1.05rem);
  line-height: 1.45;
}

.setup-session-page .setup-form {
  gap: clamp(8px, 1.1dvh, 12px);
  align-content: start;
  padding: clamp(12px, 1.8dvh, 18px);
  overflow: hidden;
}

.setup-session-page .form-grid,
.setup-session-page .setup-player-fields,
.setup-session-page .head-picker,
.setup-session-page .team-picker,
.setup-session-page .mode-picker {
  gap: clamp(7px, 0.9dvh, 10px);
}

.setup-session-page .setup-player-fields {
  padding: clamp(10px, 1.4dvh, 13px);
}

.setup-session-page .setup-player-fields h3 {
  font-size: clamp(1.2rem, 2.5dvh, 1.65rem);
}

.setup-session-page .setting-input {
  padding: clamp(9px, 1.25dvh, 12px) 12px;
}

.setup-session-page .head-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(7px, 0.9dvh, 10px);
}

.setup-session-page .head-option {
  gap: 5px;
  padding: clamp(7px, 1dvh, 9px) 6px;
}

.setup-session-page .avatar-head {
  width: clamp(30px, 4dvh, 38px);
  height: clamp(30px, 4dvh, 38px);
}

.setup-session-page .head-option-name,
.setup-session-page .form-label,
.setup-session-page .form-field label,
.setup-session-page .form-hint {
  font-size: clamp(0.72rem, 1.45dvh, 0.86rem);
}

.setup-session-page .team-options,
.setup-session-page .mode-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(7px, 0.9dvh, 10px);
}

.setup-session-page .mode-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setup-session-page .team-option,
.setup-session-page .mode-option {
  padding: clamp(8px, 1.1dvh, 11px) 8px;
}

.setup-session-page .name-generator-button {
  min-height: clamp(38px, 4.4dvh, 45px);
  padding: 0 11px;
  font-size: clamp(0.76rem, 1.45dvh, 0.88rem);
}

.volleyball-lobby-room {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.28fr);
  gap: 16px;
  align-items: stretch;
}

.volleyball-lobby-field {
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 82% 16%, rgba(255, 250, 211, 0.95) 0 6%, rgba(255, 206, 93, 0.5) 7% 16%, transparent 17%),
    linear-gradient(180deg, #42bcfb 0 27%, #aaeaff 43%, #ffe08e 56%, #d88a47 100%);
  box-shadow: var(--shadow);
  position: relative;
}

.volleyball-lobby-topline {
  position: absolute;
  z-index: 7;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.volleyball-lobby-topline > div,
.volleyball-lobby-topline > span {
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--cream);
  background: rgba(17, 19, 22, 0.58);
  backdrop-filter: blur(10px);
}

.volleyball-lobby-topline strong {
  display: block;
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  line-height: 0.95;
}

.volleyball-lobby-topline span {
  align-self: start;
  font-weight: 900;
}

.volleyball-lobby-qr {
  position: absolute;
  z-index: 8;
  top: 118px;
  right: 16px;
  width: min(282px, 31%);
}

.volleyball-lobby-qr .join-qr-card {
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  background: rgba(17, 19, 22, 0.76);
  backdrop-filter: blur(10px);
}

.volleyball-lobby-qr .join-qr-code {
  width: 88px;
  padding: 6px;
}

.volleyball-lobby-qr .join-url {
  font-size: 0.72rem;
}

.volleyball-lobby-court {
  position: absolute;
  inset: 0;
}

.volleyball-lobby-court::before {
  content: none;
}

.volleyball-lobby-court::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 42%;
  height: 27%;
  background:
    radial-gradient(ellipse at 17% 10%, rgba(30, 93, 78, 0.54) 0 8%, transparent 9%),
    radial-gradient(ellipse at 87% 18%, rgba(29, 96, 84, 0.48) 0 10%, transparent 11%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.46) 0 2px, transparent 2px 18px),
    linear-gradient(180deg, #178fc8, #2bc9d0 58%, rgba(255, 255, 255, 0.74) 74%, rgba(255, 226, 146, 0.72));
  clip-path: polygon(0 0, 100% 0, 100% 80%, 84% 68%, 64% 82%, 43% 70%, 18% 85%, 0 72%);
}

.volleyball-lobby-cloud {
  position: absolute;
  z-index: 3;
  width: 110px;
  height: 28px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 36%, rgba(255, 255, 255, 0.78) 0 28%, transparent 29%),
    radial-gradient(circle at 58% 20%, rgba(255, 255, 255, 0.72) 0 30%, transparent 31%),
    rgba(255, 255, 255, 0.42);
}

.volleyball-lobby-cloud-one {
  top: 18%;
  left: 20%;
}

.volleyball-lobby-cloud-two {
  top: 24%;
  right: 31%;
  width: 150px;
}

.volleyball-lobby-net-post {
  position: absolute;
  z-index: 5;
  bottom: 8%;
  width: 9px;
  height: 54%;
  border-radius: 999px;
  background: #54321d;
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.28);
}

.volleyball-lobby-net-post-left {
  left: calc(50% - 27px);
}

.volleyball-lobby-net-post-right {
  left: calc(50% + 18px);
}

.volleyball-lobby-net {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 10%;
  width: min(48px, 5.8%);
  height: 52%;
  border-top: 8px solid #ff5d6c;
  border-left: 3px solid rgba(255, 244, 214, 0.72);
  border-right: 3px solid rgba(255, 244, 214, 0.72);
  background:
    repeating-linear-gradient(90deg, rgba(17, 19, 22, 0.28) 0 2px, transparent 2px 15px),
    repeating-linear-gradient(0deg, rgba(17, 19, 22, 0.22) 0 2px, transparent 2px 18px),
    rgba(255, 244, 214, 0.18);
  clip-path: polygon(12% 0, 88% 0, 76% 100%, 24% 100%);
  transform: translateX(-50%);
}

.volleyball-lobby-team {
  position: absolute;
  z-index: 6;
  bottom: 9%;
  width: 42%;
  height: 39%;
}

.volleyball-lobby-team-red {
  left: 6%;
}

.volleyball-lobby-team-blue {
  right: 6%;
}

.volleyball-lobby-team h3 {
  position: absolute;
  top: 8px;
  left: 16px;
  margin: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: #07100d;
  background: rgba(255, 244, 214, 0.78);
  font-size: 0.9rem;
  font-weight: 900;
}

.volleyball-lobby-player {
  position: absolute;
  bottom: 10px;
  display: grid;
  justify-items: center;
  gap: 5px;
  transform: translateX(-50%);
}

.volleyball-lobby-player strong {
  max-width: 90px;
  overflow: hidden;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--cream);
  background: rgba(17, 19, 22, 0.56);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.volleyball-lobby-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 16px;
}

.volleyball-lobby-count {
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.07);
}

.volleyball-lobby-count span {
  display: block;
  font-size: 3.2rem;
  font-weight: 950;
  line-height: 1;
}

.volleyball-lobby-count p {
  margin: 4px 0 0;
  color: var(--muted);
}

.volleyball-team-list {
  display: grid;
  gap: 10px;
}

.volleyball-team-list > div {
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.065);
}

.volleyball-team-list h3,
.volleyball-team-list p {
  margin: 0;
}

.volleyball-team-list p {
  margin-top: 4px;
  color: var(--muted);
}

.volleyball-ai-control {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(17, 19, 22, 0.34);
}

.volleyball-ai-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.volleyball-ai-summary h3,
.volleyball-ai-summary p {
  margin: 0;
}

.volleyball-ai-summary p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.volleyball-ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.volleyball-ai-form .wide-button {
  width: auto;
}

.wait-room {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.3fr);
  gap: 16px;
  align-items: stretch;
}

.wait-room-stage,
.wait-room-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.wait-room-stage {
  min-height: 620px;
  overflow: hidden;
  position: relative;
}

.wait-room-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 52%),
    rgba(27, 32, 39, 0.88);
}

.wait-room-topline {
  position: absolute;
  z-index: 7;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.wait-room-topline > div,
.wait-room-topline > span {
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--cream);
  background: rgba(17, 19, 22, 0.62);
  backdrop-filter: blur(10px);
}

.wait-room-topline strong {
  display: block;
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  line-height: 0.95;
}

.wait-room-topline span {
  align-self: start;
  font-weight: 900;
}

.wait-room-qr {
  position: absolute;
  z-index: 8;
  top: 118px;
  right: 16px;
  width: min(282px, 31%);
}

.wait-room-qr .join-qr-card {
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  background: rgba(17, 19, 22, 0.76);
  backdrop-filter: blur(10px);
}

.wait-room-qr .join-qr-code {
  width: 88px;
  padding: 6px;
}

.wait-room-qr .join-url {
  font-size: 0.72rem;
}

.wait-room-count {
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.07);
}

.wait-room-count span {
  display: block;
  font-size: 3.2rem;
  font-weight: 950;
  line-height: 1;
}

.wait-room-count p,
.wait-room-copy p {
  margin: 4px 0 0;
  color: var(--muted);
}

.wait-room-copy {
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.065);
}

.wait-room-copy h3 {
  margin: 0;
}

.soccer-wait-field {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.075) 0 82px, rgba(0, 0, 0, 0.08) 82px 164px),
    linear-gradient(135deg, #148653, #0b6b42 52%, #084f37);
}

.soccer-wait-field::before {
  content: "";
  position: absolute;
  inset: 6%;
  border: 5px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(16, 19, 23, 0.2);
}

.soccer-wait-markings {
  position: absolute;
  inset: 0;
}

.soccer-wait-center,
.soccer-wait-center::before {
  position: absolute;
  content: "";
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.soccer-wait-center {
  width: min(23vw, 220px);
  aspect-ratio: 1;
  border: 5px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
}

.soccer-wait-center::before {
  width: 5px;
  height: 560px;
  background: rgba(255, 255, 255, 0.62);
}

.soccer-wait-goal {
  position: absolute;
  top: 36%;
  width: 11%;
  height: 28%;
  border: 5px solid rgba(255, 255, 255, 0.68);
}

.soccer-wait-goal-left {
  left: 6%;
  border-left: 0;
}

.soccer-wait-goal-right {
  right: 6%;
  border-right: 0;
}

.soccer-wait-ball {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  border: 3px solid #101317;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #101317 0 4px, transparent 4.5px),
    var(--cream);
  box-shadow: 0 14px 22px rgba(0, 0, 0, 0.26);
  transform: translate(-50%, -50%);
}

.soccer-wait-team {
  position: absolute;
  z-index: 6;
  top: 34%;
  width: 32%;
  height: 42%;
  display: grid;
  grid-template-columns: repeat(4, minmax(54px, 1fr));
  grid-auto-rows: minmax(76px, auto);
  align-content: center;
  gap: 10px;
}

.soccer-wait-team-red {
  left: 11%;
}

.soccer-wait-team-blue {
  right: 11%;
}

.soccer-wait-team h3 {
  grid-column: 1 / -1;
  justify-self: start;
  margin: 0 0 12px;
  border-radius: 999px;
  padding: 8px 12px;
  display: inline-block;
  color: #07100d;
  background: rgba(255, 244, 214, 0.78);
  font-size: 0.9rem;
  font-weight: 900;
}

.soccer-wait-player {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
}

.soccer-wait-player strong,
.geo-wait-player strong {
  max-width: 92px;
  overflow: hidden;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--cream);
  background: rgba(17, 19, 22, 0.56);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-wait-stage {
  background:
    linear-gradient(150deg, rgba(255, 200, 87, 0.2), transparent 34%),
    linear-gradient(35deg, rgba(77, 215, 255, 0.18), transparent 52%),
    #14212c;
}

.geo-photo-stack {
  position: absolute;
  inset: 18% 10% 18% 8%;
}

.geo-photo-card {
  position: absolute;
  border: 10px solid rgba(255, 244, 214, 0.9);
  border-bottom-width: 34px;
  border-radius: 4px;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.32);
}

.geo-photo-card-one {
  left: 6%;
  top: 10%;
  width: min(42vw, 420px);
  height: 270px;
  background:
    linear-gradient(180deg, #73d7ff 0 42%, #d0d98f 42% 58%, #7bbf71 58%),
    #73d7ff;
  transform: rotate(-5deg);
}

.geo-photo-card-two {
  left: 28%;
  top: 20%;
  width: min(40vw, 390px);
  height: 250px;
  background:
    linear-gradient(180deg, #ffcf7b 0 34%, #d96d57 34% 48%, #5b6f91 48%),
    #ffcf7b;
  transform: rotate(6deg);
}

.geo-photo-pin {
  position: absolute;
  left: min(60%, 520px);
  top: 18%;
  width: 58px;
  height: 58px;
  border: 8px solid #ff5d6c;
  border-radius: 50% 50% 50% 0;
  background: var(--cream);
  box-shadow: 0 18px 26px rgba(0, 0, 0, 0.28);
  transform: rotate(-45deg);
}

.geo-photo-pin::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #ff5d6c;
}

.geo-wait-roster {
  position: absolute;
  z-index: 6;
  left: 8%;
  right: 8%;
  bottom: 8%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.geo-wait-player {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.host-action-stack {
  display: grid;
  gap: 10px;
}

body.play-page,
body.live-session-page {
  --game-bottom-gap: clamp(14px, 2.4dvh, 30px);
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

.play-page .app-shell,
.live-session-page .app-shell {
  width: min(1320px, calc(100% - 18px));
  height: 100dvh;
  min-height: 0;
  padding: clamp(8px, 1.5vh, 16px) 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: clamp(8px, 1.4vh, 14px);
}

.play-page .player-shell {
  max-width: none;
}

.play-page .player-shell.is-geo-focused,
.host-page .host-shell.is-geo-results {
  grid-template-rows: minmax(0, 1fr);
}

.host-page .host-shell.is-geo-results {
  height: 100dvh;
  min-height: 0;
  padding: clamp(8px, 1.5vh, 16px) 0;
}

.play-page .player-shell.is-geo-guess .player-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.play-page .player-shell.is-geo-guess .player-identity {
  min-width: 0;
}

.play-page .player-shell.is-geo-guess .avatar-head-large {
  width: clamp(44px, 6dvh, 62px);
  height: clamp(44px, 6dvh, 62px);
}

.play-page .player-shell.is-geo-guess .player-topbar h1 {
  overflow: hidden;
  font-size: clamp(1.6rem, 5.4dvh, 3.2rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-page .player-topbar,
.live-session-page .session-topbar {
  min-height: 0;
  margin-bottom: 0;
}

.play-page .player-shell.is-live-player {
  width: min(100%, calc(100% - 10px));
  grid-template-rows: minmax(0, 1fr);
  padding: 5px 0;
}

.play-page .player-shell.is-live-player > .player-topbar {
  display: none;
}

.play-page .player-shell.is-live-player .controller-pitch {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
  row-gap: clamp(18px, 2.8vw, 28px);
  column-gap: 10px;
  padding: 10px;
}

.play-page .player-shell.is-live-player .controller-pitch {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.play-page .player-shell.is-live-player .controller-hud {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0;
  pointer-events: none;
}

.play-page .player-shell.is-live-player .controller-player {
  min-width: 0;
  max-width: none;
  border: 0;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}

.play-page .player-shell.is-live-player .controller-player h2 {
  overflow: hidden;
  font-size: clamp(1.05rem, 3.2vw, 1.55rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-page .player-shell.is-live-player .controller-player .eyebrow {
  margin-bottom: 3px;
  font-size: 0.64rem;
}

.play-page .player-shell.is-live-player .controller-score {
  max-width: min(42vw, 220px);
  overflow: hidden;
  padding: 9px 10px;
  font-size: clamp(0.76rem, 2.5vw, 0.95rem);
  text-overflow: ellipsis;
}

.play-page .player-shell.is-live-player .controller-field-shell {
  width: 100%;
  max-height: none;
  aspect-ratio: auto;
  justify-self: center;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
}

.play-page .player-round,
.play-page .mini-controller,
.play-page .waiting-stage,
.play-page .final-stage,
.live-session-page .live-match {
  min-height: 0;
  height: 100%;
}

.play-page .player-round {
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.play-page .geo-game-round {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.play-page .player-prompt {
  min-height: 0;
  padding: 4px 0 0;
}

.play-page .player-prompt h2 {
  font-size: clamp(1.5rem, 5.8vw, 3rem);
}

.play-page .geo-history {
  padding: 8px;
}

.play-page .geo-live-panels {
  min-height: 0;
}

.play-page .geo-results,
.host-page .host-shell.is-geo-results .geo-results {
  height: 100%;
  overflow: hidden;
}

.play-page .geo-results-board,
.host-page .host-shell.is-geo-results .geo-results-board,
.play-page .geo-rank-card,
.host-page .host-shell.is-geo-results .geo-rank-card {
  min-height: 0;
}

.play-page .geo-round-tiles,
.host-page .host-shell.is-geo-results .geo-round-tiles {
  grid-auto-flow: column;
  grid-auto-columns: minmax(164px, 1fr);
  grid-template-columns: none;
  overflow-x: auto;
  overflow-y: hidden;
}

.play-page .geo-history-heading {
  margin-bottom: 6px;
}

.play-page .geo-history-heading h3,
.play-page .geo-history-heading .eyebrow {
  display: none;
}

.play-page .geo-standings-list {
  max-height: calc((var(--geo-standings-row-height) * 3) + (var(--geo-standings-row-gap) * 2));
}

.play-page .geo-history-list li {
  min-width: 0;
}

.play-page .answer-grid {
  min-height: 0;
  grid-auto-rows: minmax(0, 1fr);
}

.play-page .answer-button {
  min-height: 0;
}

.play-page .geo-pin-form {
  height: 100%;
  min-height: 0;
  padding-bottom: var(--game-bottom-gap);
  box-sizing: border-box;
}

.play-page .geo-player-card,
.play-page .geo-reveal-grid {
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.play-page .geo-player-photo,
.play-page .geo-map-picker,
.play-page .geo-result-map {
  min-height: 0;
  height: 100%;
}

.play-page .geo-map-picker {
  aspect-ratio: auto;
}

.play-page .geo-leaflet-map {
  min-height: 0;
}

.play-page .geo-pin-controls {
  position: relative;
  z-index: 20;
}

.play-page .controller-pitch {
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: start center;
  padding-bottom: var(--game-bottom-gap);
  box-sizing: border-box;
}

.play-page .controller-hud {
  top: calc(10px + env(safe-area-inset-top));
  left: calc(10px + env(safe-area-inset-left));
  right: calc(10px + env(safe-area-inset-right));
}

.play-page .controller-field-shell {
  min-height: 0;
  width: min(100%, calc((100dvh - var(--game-bottom-gap)) * 1000 / 560));
  max-height: calc(100% - var(--game-bottom-gap));
  aspect-ratio: 1000 / 560;
}

.play-page .controller-field {
  width: 100%;
  aspect-ratio: 1000 / 560;
}

.play-page .controller-status {
  bottom: calc(14px + env(safe-area-inset-bottom));
}

.live-session-page .live-match {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
}

.live-session-page .live-scoreboard {
  min-height: 74px;
  margin-right: min(282px, 30vw);
}

.live-session-page .live-match > .join-qr-card {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  width: min(266px, 29vw);
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  background: rgba(17, 19, 22, 0.82);
  backdrop-filter: blur(10px);
}

.live-session-page .live-match > .join-qr-card .join-qr-code {
  width: 76px;
  padding: 5px;
}

.live-session-page .join-qr-label,
.live-session-page .join-url {
  font-size: 0.76rem;
}

.live-session-page .live-field-wrap {
  min-height: 0;
  width: min(100%, calc((100dvh - clamp(210px, 29dvh, 310px) - var(--game-bottom-gap)) * 1000 / 560));
  height: auto;
  max-height: calc(100% - var(--game-bottom-gap));
  aspect-ratio: 1000 / 560;
  justify-self: center;
  align-self: start;
  margin-bottom: var(--game-bottom-gap);
}

.live-session-page .live-field {
  width: 100%;
  height: 100%;
  aspect-ratio: 1000 / 560;
}

@media (max-width: 820px) {
  .home-page .home-hero,
  .setup-layout,
  .volleyball-lobby-room,
  .wait-room,
  .host-page .lobby-layout {
    grid-template-columns: 1fr;
  }

  .home-page .home-hero {
    gap: 18px;
  }

  .setup-session-page .setup-layout {
    grid-template-columns: minmax(190px, 0.62fr) minmax(340px, 1fr);
  }

  .setup-session-page .setup-copy h2 {
    font-size: clamp(1.75rem, 5.8dvh, 3.4rem);
  }

  .home-page .home-hero h1 {
    font-size: clamp(2.75rem, 13vw, 4rem);
  }

  .preview-pitch {
    min-height: 220px;
  }

  .host-page .host-shell {
    width: min(calc(100% - 18px), 720px);
  }

  .host-page .session-topbar {
    flex-direction: row;
    align-items: center;
  }

  .host-page .session-topbar h1 {
    font-size: clamp(1.7rem, 8vw, 2.8rem);
  }

  .code-stage-primary .room-code {
    font-size: clamp(3.2rem, 18vw, 5.7rem);
  }

  body:not(.setup-session-page) .setup-copy {
    min-height: 260px;
  }

  .volleyball-lobby-field {
    min-height: 500px;
  }

  .wait-room-stage {
    min-height: 500px;
  }

  .volleyball-lobby-qr,
  .wait-room-qr {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
    margin: 98px 12px 0 auto;
    max-width: 260px;
  }

  .volleyball-lobby-topline strong {
    font-size: clamp(1.6rem, 10vw, 3.2rem);
  }

  .volleyball-lobby-topline > span,
  .wait-room-topline > span {
    max-width: 44%;
  }

  .soccer-wait-team {
    width: 38%;
    grid-template-columns: repeat(2, minmax(54px, 1fr));
  }

  .geo-photo-card-one,
  .geo-photo-card-two {
    width: 62vw;
  }

  .play-page .app-shell,
  .live-session-page .app-shell {
    width: min(100% - 10px, 760px);
    padding: 5px 0;
  }

  .play-page .controller-hud {
    position: absolute;
    display: flex;
    padding: 0;
    background: transparent;
  }

  .play-page .player-shell.is-geo-guess .player-topbar {
    align-items: center;
  }

  .play-page .controller-player {
    max-width: min(64vw, 320px);
    padding: 8px;
  }

  .play-page .controller-player h2 {
    font-size: clamp(1rem, 5.2vw, 1.75rem);
  }

  .play-page .controller-score {
    padding: 9px 10px;
    font-size: 0.8rem;
  }

  .live-session-page .live-scoreboard {
    min-height: 0;
    margin-right: 0;
  }

  .live-session-page .live-match > .join-qr-card {
    display: none;
  }
}

@media (max-width: 500px) {
  body.setup-session-page {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  .setup-session-page .host-shell {
    height: auto;
  }

  .setup-session-page .setup-layout {
    grid-template-columns: 1fr;
  }

  .name-generator {
    grid-template-columns: 1fr;
  }

  .play-page .app-shell {
    width: calc(100% - 8px);
  }

  .play-page .controller-player .avatar-head-large {
    width: 42px;
    height: 42px;
  }

  .play-page .controller-player {
    gap: 8px;
  }

  .play-page .controller-score {
    max-width: 34vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Modern competitive refresh */
:root {
  --bg: #101113;
  --panel: #18191d;
  --panel-strong: #22242a;
  --text: #f5f2ea;
  --muted: #a7abb5;
  --line: rgba(255, 255, 255, 0.13);
  --cyan: #4fd4dc;
  --green: #d6ef72;
  --amber: #ffba4a;
  --pink: #ff7187;
  --red: #ff6661;
  --blue: #7b92ff;
  --cream: #faf3e3;
  --radius: 8px;
  --shadow: 0 22px 72px rgba(0, 0, 0, 0.3);
}

html {
  background: #101113;
}

body {
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 32rem),
    linear-gradient(115deg, rgba(201, 244, 93, 0.08), transparent 30rem),
    linear-gradient(245deg, rgba(79, 212, 220, 0.08), transparent 28rem),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 72px),
    #101113;
}

.home-shell,
.home-page .home-shell {
  align-content: start;
  gap: clamp(28px, 4vw, 46px);
  padding: clamp(26px, 5vw, 68px) 0 56px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.home-shell::before,
.home-page .home-shell::before,
.game-card::before {
  content: none;
}

.home-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.042), transparent 34rem),
    linear-gradient(130deg, rgba(201, 244, 93, 0.1), transparent 34rem),
    linear-gradient(235deg, rgba(255, 186, 74, 0.085), transparent 26rem),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 76px),
    #101113;
}

.home-page .home-hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.72fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
}

.home-page .hero-content {
  padding-top: clamp(16px, 5vw, 58px);
}

.eyebrow,
.game-label {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 680;
  letter-spacing: 0;
}

.home-page .home-hero h1,
.session-topbar h1,
.player-topbar h1,
.setup-copy h2 {
  font-weight: 760;
  letter-spacing: 0;
}

.home-page .home-hero h1 {
  max-width: 650px;
  font-size: clamp(3.1rem, 6.4vw, 5.9rem);
  font-weight: 650;
  line-height: 1;
}

.home-page .hero-copy {
  max-width: 610px;
  color: #c0c3ca;
  font-size: clamp(1.02rem, 1.45vw, 1.18rem);
  font-weight: 400;
}

.hero-stats {
  gap: 8px;
}

.hero-stats span,
.game-feature-list li,
.game-meta span,
.round-pill,
.score-chip,
.choice-pill,
.my-session-totals span,
.my-session-details span,
.my-session-state {
  border-color: rgba(255, 255, 255, 0.14);
  color: #dadddf;
  background: rgba(255, 255, 255, 0.065);
  font-weight: 620;
}

.home-action-stack {
  gap: 16px;
}

.play-preview,
.home-stage-preview,
.join-panel,
.join-room-panel,
.code-stage,
.leaderboard,
.waiting-stage,
.final-stage,
.locked-answer,
.reveal-result,
.setup-copy,
.setup-form,
.volleyball-lobby-panel,
.wait-room-panel,
.game-card,
.my-session-card {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(24, 25, 29, 0.9);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.25);
}

.home-stage-preview {
  display: grid;
  gap: 14px;
  padding: clamp(14px, 2vw, 18px);
  min-height: clamp(430px, 45vw, 560px);
}

.stage-preview-top,
.stage-preview-roster,
.preview-scoreline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stage-preview-top {
  color: #c9ccd2;
  font-size: 0.9rem;
  font-weight: 720;
}

.preview-code {
  color: var(--green);
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  font-weight: 720;
  letter-spacing: 0;
}

.stage-preview-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 0.36fr);
  gap: 12px;
  min-height: 0;
}

.stage-preview-main,
.stage-preview-side > div {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.stage-preview-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.stage-preview-mode {
  width: max-content;
  border-radius: 999px;
  padding: 6px 9px;
  color: #121316;
  background: var(--amber);
  font-size: 0.74rem;
  font-weight: 700;
}

.stage-preview-main strong {
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  font-weight: 650;
  line-height: 1.05;
}

.stage-preview-photo {
  min-height: 230px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, transparent 45%, rgba(16, 17, 19, 0.62)),
    url("/locations/shibuya.jpg") center / cover;
  box-shadow: none;
  position: relative;
}

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

.stage-preview-side > div {
  display: grid;
  align-content: space-between;
  min-height: 0;
  padding: 12px;
}

.stage-preview-side span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 620;
}

.stage-preview-side strong {
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  font-weight: 650;
  line-height: 1;
}

.stage-preview-roster {
  justify-content: start;
  flex-wrap: wrap;
}

.stage-preview-roster span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 10px;
  color: #e7e7e4;
  background: rgba(255, 255, 255, 0.065);
  font-size: 0.82rem;
  font-weight: 620;
}

.home-page .join-panel {
  padding: 18px;
}

.join-panel h2,
.section-heading h2,
.leaderboard h2,
.waiting-stage h2,
.final-stage h2,
.player-prompt h2,
.game-card h3 {
  font-weight: 650;
  letter-spacing: 0;
}

.join-form {
  gap: 10px;
}

.code-input,
.nickname-input,
.setting-input {
  min-height: 50px;
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
  background: rgba(6, 7, 8, 0.68);
  font-weight: 620;
}

.code-input::placeholder,
.nickname-input::placeholder {
  color: rgba(245, 242, 234, 0.44);
}

.code-input:focus,
.nickname-input:focus,
.setting-input:focus {
  border-color: rgba(201, 244, 93, 0.72);
  box-shadow: 0 0 0 3px rgba(201, 244, 93, 0.16);
}

.primary-button,
.primary-link {
  min-height: 48px;
  color: #101113;
  background: var(--green);
  font-weight: 680;
}

.primary-button:hover,
.primary-link:hover {
  background: #dbff84;
}

.secondary-button,
.name-generator-button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
  font-weight: 640;
}

.secondary-button:hover,
.name-generator-button:hover {
  border-color: rgba(201, 244, 93, 0.42);
  background: rgba(255, 255, 255, 0.11);
}

.text-link,
.my-session-action {
  color: var(--green);
}

.game-grid {
  gap: 14px;
}

.home-page .game-card,
.game-card {
  min-height: 292px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    #18191d;
}

.game-card.geo-guess,
.game-card.mini-soccer,
.game-card.arcade-volleyball {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    #18191d;
}

.game-card.geo-guess {
  border-top: 4px solid var(--cyan);
}

.game-card.mini-soccer {
  border-top: 4px solid var(--green);
}

.game-card.arcade-volleyball {
  border-top: 4px solid var(--amber);
}

.game-card:hover,
.my-session-card:hover {
  border-color: rgba(201, 244, 93, 0.32);
  box-shadow: 0 22px 62px rgba(0, 0, 0, 0.32);
}

.game-card-head {
  align-items: start;
}

.game-card-visual {
  width: 62px;
  height: 62px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.055);
}

.geo-guess .game-card-visual {
  background:
    linear-gradient(180deg, rgba(16, 17, 19, 0.04), rgba(16, 17, 19, 0.54)),
    url("/locations/golden-gate.jpg") center / cover;
}

.mini-soccer .game-card-visual {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    #1f5a3e;
  background-size: 16px 16px;
}

.arcade-volleyball .game-card-visual {
  background:
    linear-gradient(90deg, transparent 0 47%, rgba(250, 243, 227, 0.58) 47% 53%, transparent 53%),
    linear-gradient(180deg, #283846 0 48%, #594835 48% 100%);
}

.game-card h3 {
  font-size: clamp(1.45rem, 2.2vw, 2.05rem);
  font-weight: 650;
}

.game-description {
  color: #b8bbc3;
  font-weight: 400;
}

.game-card-actions {
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
}

.practice-button {
  border-color: rgba(201, 244, 93, 0.24);
  background: rgba(201, 244, 93, 0.08);
}

.my-session-code,
.room-code {
  color: var(--green);
}

.session-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28rem),
    linear-gradient(125deg, rgba(79, 212, 220, 0.075), transparent 28rem),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 72px),
    #101113;
}

.host-page .session-topbar {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    rgba(22, 23, 26, 0.92);
}

.session-close-button {
  border-color: rgba(255, 102, 97, 0.3);
  background: rgba(255, 102, 97, 0.1);
}

.code-stage-primary {
  border-color: rgba(255, 255, 255, 0.11);
  background:
    linear-gradient(135deg, rgba(201, 244, 93, 0.09), transparent 46%),
    rgba(255, 255, 255, 0.045);
}

.code-stage-primary .room-code,
.volleyball-lobby-topline strong,
.wait-room-topline strong {
  font-weight: 680;
  letter-spacing: 0;
}

.join-qr-card,
.host-page .join-qr-card,
.live-session-page .live-match > .join-qr-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(18, 19, 22, 0.82);
}

.setup-copy,
.setup-form,
.setup-player-fields,
.team-option,
.mode-option,
.head-option,
.volleyball-ai-control,
.volleyball-team-list > div,
.wait-room-copy,
.volleyball-lobby-count,
.wait-room-count {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
}

.team-option,
.mode-option,
.head-option {
  color: var(--text);
}

.team-option:has(input:checked),
.mode-option:has(input:checked),
.head-option:has(input:checked),
.head-option:hover {
  border-color: rgba(201, 244, 93, 0.54);
  background: rgba(201, 244, 93, 0.1);
}

.team-option-red:has(input:checked) {
  border-color: rgba(255, 102, 97, 0.58);
  background: rgba(255, 102, 97, 0.11);
}

.team-option-blue:has(input:checked) {
  border-color: rgba(79, 212, 220, 0.58);
  background: rgba(79, 212, 220, 0.11);
}

.volleyball-lobby-field,
.wait-room-stage {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.volleyball-lobby-field {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 36%),
    linear-gradient(180deg, #273844 0 40%, #5c4c37 40% 100%);
}

.volleyball-lobby-cloud,
.preview-cloud {
  display: none;
}

.volleyball-lobby-court::after,
.preview-volley-court::after {
  background:
    repeating-linear-gradient(0deg, rgba(250, 243, 227, 0.22) 0 1px, transparent 1px 19px),
    linear-gradient(180deg, rgba(79, 212, 220, 0.36), rgba(250, 243, 227, 0.32));
  clip-path: polygon(0 0, 100% 0, 100% 76%, 78% 70%, 56% 82%, 34% 71%, 0 80%);
}

.volleyball-lobby-topline > div,
.volleyball-lobby-topline > span,
.wait-room-topline > div,
.wait-room-topline > span,
.volleyball-lobby-player strong,
.soccer-wait-player strong,
.geo-wait-player strong {
  color: var(--text);
  background: rgba(16, 17, 19, 0.72);
  backdrop-filter: blur(14px);
}

.volleyball-lobby-team h3,
.soccer-wait-team h3 {
  color: #101113;
  background: rgba(250, 243, 227, 0.86);
}

.soccer-wait-field {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 82px, rgba(0, 0, 0, 0.08) 82px 164px),
    linear-gradient(135deg, #1b6f52, #144d3e 58%, #123631);
}

.geo-wait-stage {
  background:
    linear-gradient(150deg, rgba(255, 186, 74, 0.13), transparent 34%),
    linear-gradient(35deg, rgba(79, 212, 220, 0.13), transparent 52%),
    #161c21;
}

.geo-photo-card {
  border-color: rgba(250, 243, 227, 0.82);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.answer-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    #18191d;
  font-weight: 620;
}

.answer-button:nth-child(1) {
  border-left: 5px solid var(--green);
  background:
    linear-gradient(90deg, rgba(201, 244, 93, 0.12), transparent 36%),
    #18191d;
}

.answer-button:nth-child(2) {
  border-left: 5px solid var(--cyan);
  background:
    linear-gradient(90deg, rgba(79, 212, 220, 0.12), transparent 36%),
    #18191d;
}

.answer-button:nth-child(3) {
  border-left: 5px solid var(--amber);
  background:
    linear-gradient(90deg, rgba(255, 186, 74, 0.12), transparent 36%),
    #18191d;
}

.answer-button:nth-child(4),
.answer-button:nth-child(5) {
  border-left: 5px solid var(--pink);
  background:
    linear-gradient(90deg, rgba(255, 113, 135, 0.12), transparent 36%),
    #18191d;
}

.answer-button:hover {
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.live-scoreboard,
.controller-hud,
.geo-game-hud,
.geo-standings,
.geo-history,
.geo-player-card,
.geo-reveal-grid,
.geo-results-board,
.geo-rank-card,
.geo-round-summary,
.mini-controller,
.locked-answer,
.reveal-result {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(22, 23, 26, 0.9);
}

.geo-leaflet-pin-answer,
.geo-leaflet-pin-closest {
  --pin-color: var(--green);
}

@media (max-width: 820px) {
  .home-page .home-hero {
    grid-template-columns: 1fr;
  }

  .home-stage-preview {
    min-height: 360px;
  }

  .stage-preview-board {
    grid-template-columns: 1fr;
  }

  .stage-preview-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stage-preview-side > div {
    min-height: 88px;
  }

  .stage-preview-photo {
    min-height: 190px;
  }
}

@media (max-width: 500px) {
  .home-page .home-shell {
    padding-top: 24px;
  }

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

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

  .home-stage-preview {
    min-height: 0;
  }

  .stage-preview-photo {
    min-height: 170px;
  }

  .volleyball-lobby-team {
    width: 43%;
    display: flex;
    align-items: end;
    justify-content: space-evenly;
    gap: 4px;
    padding-bottom: 10px;
  }

  .volleyball-lobby-player,
  .soccer-wait-player {
    gap: 3px;
  }

  .volleyball-lobby-player {
    position: static;
    transform: none;
  }

  .volleyball-lobby-player .avatar-head-large,
  .soccer-wait-player .avatar-head {
    width: 44px;
    height: 44px;
  }

  .volleyball-lobby-player strong,
  .soccer-wait-player strong {
    max-width: 48px;
    padding: 4px 6px;
    font-size: 0.64rem;
  }
}

/* Layout reorganization */
.home-page .home-shell {
  gap: clamp(22px, 3vw, 34px);
}

.home-page .home-hero {
  grid-template-columns: minmax(320px, 0.72fr) minmax(500px, 1fr);
  grid-template-areas:
    "intro stage"
    "join stage";
  gap: clamp(16px, 2vw, 22px) clamp(34px, 5vw, 72px);
  align-items: start;
}

.home-page .hero-content {
  grid-area: intro;
  padding-top: clamp(10px, 3vw, 34px);
}

.home-join-panel {
  grid-area: join;
  align-self: start;
  max-width: 580px;
}

.home-stage-preview {
  grid-area: stage;
  min-height: clamp(390px, 35vw, 500px);
}

.stage-preview-photo {
  min-height: clamp(180px, 18vw, 245px);
}

.home-page .game-picker {
  display: grid;
  grid-template-columns: minmax(190px, 0.22fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
}

.home-page .game-picker .section-heading {
  padding-top: 8px;
}

.home-page .game-picker .section-heading h2 {
  max-width: 180px;
  font-size: clamp(1.7rem, 2.5vw, 2.5rem);
  line-height: 1;
}

.home-page .game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-page .game-card {
  min-height: 0;
  gap: 20px;
}

.home-page .game-card-head {
  margin-bottom: 28px;
}

.home-page .my-sessions {
  grid-template-columns: minmax(190px, 0.22fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
}

.home-page .my-sessions-heading {
  display: grid;
  align-items: start;
  gap: 12px;
}

.home-page .my-session-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.host-page .host-shell:not(.is-geo-results) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.host-page .session-topbar {
  margin-bottom: 0;
}

.volleyball-lobby-room,
.wait-room,
.host-page .lobby-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.34fr);
  gap: 14px;
}

.volleyball-lobby-panel,
.wait-room-panel,
.host-side {
  align-self: stretch;
}

.volleyball-lobby-count,
.wait-room-count {
  min-height: 112px;
  display: grid;
  align-content: center;
}

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

.volleyball-ai-control {
  gap: 14px;
}

.setup-layout {
  grid-template-columns: minmax(260px, 0.5fr) minmax(460px, 1fr);
  gap: 14px;
}

.setup-copy {
  min-height: 0;
  align-content: start;
}

.setup-copy h2 {
  font-size: clamp(2.25rem, 4.6vw, 4.8rem);
}

.setup-copy .hero-copy {
  max-width: 520px;
}

.setup-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.setup-form > .form-grid {
  grid-column: 1 / -1;
  grid-template-columns: minmax(150px, 0.58fr) repeat(2, minmax(0, 1fr));
}

.setup-form > .form-grid .mode-picker {
  grid-column: 1 / -1;
}

.setup-form > .setup-player-fields,
.setup-form > .wide-button,
.setup-form > .form-error {
  grid-column: 1 / -1;
}

.setup-form .primary-button,
.setup-form .wide-button {
  justify-self: end;
  width: min(100%, 320px);
}

@media (max-width: 980px) {
  .home-page .home-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "join"
      "stage";
  }

  .home-join-panel {
    max-width: none;
  }

  .home-page .game-picker,
  .home-page .my-sessions {
    grid-template-columns: 1fr;
  }

  .home-page .game-picker .section-heading h2 {
    max-width: none;
  }

  .home-page .game-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  }

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

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

@media (max-width: 820px) {
  .volleyball-lobby-room,
  .wait-room,
  .host-page .lobby-layout,
  .setup-layout {
    grid-template-columns: 1fr;
  }

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

  .setup-copy h2 {
    font-size: clamp(2.25rem, 9vw, 3.4rem);
    line-height: 1.02;
  }
}

@media (max-width: 500px) {
  .setup-copy h2 {
    font-size: clamp(2.15rem, 11vw, 3rem);
  }
}

/* Twitch-style landing */
body.landing-page {
  --stream-bg: #0e0e10;
  --stream-panel: #18181b;
  --stream-panel-strong: #1f1f23;
  --stream-accent: #9147ff;
  --stream-accent-soft: rgba(145, 71, 255, 0.2);
  --stream-live: #eb0400;
  background:
    linear-gradient(180deg, rgba(145, 71, 255, 0.1), transparent 280px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 72px),
    var(--stream-bg);
}

.twitch-home-shell {
  width: min(1480px, calc(100% - 28px));
  min-height: 100vh;
  align-content: start;
  gap: 14px;
  padding: 14px 0 48px;
}

.landing-nav {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: rgba(24, 24, 27, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.landing-brand,
.landing-nav-links,
.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-brand {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 760;
  text-decoration: none;
}

.landing-brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 10px 24px rgba(145, 71, 255, 0.28);
}

.landing-nav-links {
  justify-content: center;
}

.landing-nav-links a,
.sidebar-game,
.sidebar-session-link {
  color: #d5d5dc;
  font-weight: 650;
  text-decoration: none;
}

.landing-nav-links a {
  border-radius: 6px;
  padding: 9px 10px;
}

.landing-nav-links a:hover,
.sidebar-game:hover,
.sidebar-session-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
}

.landing-nav-actions {
  justify-content: end;
}

.landing-session-link,
.landing-join-link {
  min-height: 38px;
  width: auto;
  padding: 0 14px;
}

.landing-join-link {
  color: #fff;
  background: var(--stream-accent);
}

.landing-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.landing-sidebar {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(24, 24, 27, 0.92);
}

.sidebar-section {
  display: grid;
  gap: 8px;
}

.sidebar-room,
.sidebar-game,
.sidebar-session-link {
  min-width: 0;
  border-radius: 6px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.sidebar-room {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.sidebar-room strong,
.sidebar-room span,
.sidebar-game span,
.sidebar-session-link {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-room strong {
  display: block;
  color: var(--text);
}

.sidebar-room span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.sidebar-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--stream-live);
  box-shadow: 0 0 0 4px rgba(235, 4, 0, 0.14);
}

.sidebar-game {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.sidebar-game-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(145, 71, 255, 0.24);
}

.sidebar-game-icon.geo-guess {
  background:
    linear-gradient(180deg, rgba(14, 14, 16, 0.08), rgba(14, 14, 16, 0.58)),
    url("/locations/golden-gate.jpg") center / cover;
}

.sidebar-game-icon.mini-soccer {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    #1f6a46;
  background-size: 10px 10px;
}

.sidebar-game-icon.arcade-volleyball {
  background:
    linear-gradient(90deg, transparent 0 47%, rgba(250, 243, 227, 0.62) 47% 53%, transparent 53%),
    linear-gradient(180deg, #273844 0 50%, #6a5539 50% 100%);
}

.landing-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.home-page .twitch-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.34fr);
  grid-template-areas:
    "stream intro"
    "stream join"
    "meta join";
  gap: 14px;
  align-items: stretch;
}

.home-page .twitch-hero .hero-content,
.home-page .twitch-hero .home-join-panel,
.stream-card-meta,
.home-page .twitch-hero .home-stage-preview {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.046), rgba(255, 255, 255, 0.014)),
    rgba(24, 24, 27, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
}

.home-page .twitch-hero .hero-content {
  grid-area: intro;
  display: grid;
  align-content: center;
  min-height: 260px;
  padding: clamp(20px, 3vw, 34px);
}

.home-page .twitch-hero .hero-content h1 {
  font-size: clamp(3rem, 4vw, 4.25rem);
}

.home-page .twitch-hero .home-stage-preview {
  grid-area: stream;
  gap: 12px;
  min-height: 620px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(145, 71, 255, 0.16), transparent 42%),
    rgba(24, 24, 27, 0.94);
}

.stream-status-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #d5d5dc;
  font-weight: 680;
}

.stream-live-badge {
  border-radius: 4px;
  padding: 5px 8px;
  color: #fff;
  background: var(--stream-live);
  font-size: 0.76rem;
  font-weight: 780;
  text-transform: uppercase;
}

.home-page .twitch-hero .preview-code {
  color: #fff;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
}

.home-page .twitch-hero .stage-preview-board {
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.26fr);
}

.home-page .twitch-hero .stage-preview-photo {
  min-height: 360px;
}

.home-page .twitch-hero .home-join-panel {
  grid-area: join;
  max-width: none;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
}

.home-page .twitch-hero .home-join-panel h2 {
  margin: 0;
}

.stream-card-meta {
  grid-area: meta;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.stream-card-meta strong,
.stream-card-meta span {
  display: block;
}

.stream-card-meta span {
  margin-top: 3px;
  color: var(--muted);
}

.stream-card-actions {
  display: flex;
  gap: 8px;
  justify-content: end;
}

.stream-card-actions .primary-link,
.stream-card-actions .secondary-button {
  min-height: 38px;
  width: auto;
  padding: 0 13px;
}

.stream-avatar {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(145, 71, 255, 0.92), rgba(79, 212, 220, 0.8)),
    #29292f;
}

.home-page .landing-game-picker {
  grid-template-columns: 1fr;
  gap: 14px;
}

.home-page .landing-game-picker .section-heading {
  display: grid;
  justify-content: start;
  gap: 4px;
  align-items: start;
  padding: 4px 0 0;
}

.home-page .landing-game-picker .section-heading h2 {
  max-width: none;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.home-page .landing-game-picker .game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-page .landing-game-picker .game-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.012)),
    var(--stream-panel);
}

.home-page .landing-game-picker .game-card:hover {
  border-color: rgba(145, 71, 255, 0.66);
}

.home-page .landing-game-picker .game-card-cover {
  min-height: 172px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  background: #111114;
  position: relative;
}

.home-page .landing-game-picker .game-card-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 56%;
  background: linear-gradient(180deg, transparent, rgba(14, 14, 16, 0.86));
  pointer-events: none;
}

.home-page .landing-game-picker .game-card-cover .game-card-visual {
  width: 100%;
  height: 100%;
  min-height: 172px;
  display: block;
  border: 0;
  border-radius: 0;
  transform: scale(1.01);
  transition: transform 180ms ease, filter 180ms ease;
}

.home-page .landing-game-picker .game-card:hover .game-card-visual {
  filter: saturate(1.08);
  transform: scale(1.04);
}

.home-page .landing-game-picker .geo-guess .game-card-cover .game-card-visual {
  background:
    linear-gradient(180deg, rgba(14, 14, 16, 0.04), rgba(14, 14, 16, 0.36)),
    url("/locations/golden-gate.jpg") center / cover;
}

.home-page .landing-game-picker .mini-soccer .game-card-cover .game-card-visual {
  background:
    radial-gradient(circle at 73% 36%, rgba(250, 243, 227, 0.92) 0 12px, transparent 13px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, #197649, #104f38);
  background-size: auto, 30px 30px, 30px 30px, auto;
}

.home-page .landing-game-picker .arcade-volleyball .game-card-cover .game-card-visual {
  background:
    radial-gradient(circle at 56% 28%, rgba(250, 243, 227, 0.96) 0 12px, transparent 13px),
    linear-gradient(90deg, transparent 0 48%, rgba(250, 243, 227, 0.58) 48% 52%, transparent 52%),
    linear-gradient(180deg, #263746 0 48%, #715a3b 48% 100%);
}

.home-page .landing-game-picker .geo-guess .game-card-cover .game-card-visual::after,
.home-page .landing-game-picker .mini-soccer .game-card-cover .game-card-visual::after,
.home-page .landing-game-picker .arcade-volleyball .game-card-cover .game-card-visual::after,
.home-page .landing-game-picker .arcade-volleyball .game-card-cover .game-card-visual::before {
  content: none;
}

.game-card-cover-overlay {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 720;
}

.game-card-cover-overlay span:last-child {
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.52);
}

.home-page .landing-game-picker .game-card-body {
  display: grid;
  gap: 10px;
  padding: 0 20px;
}

.home-page .landing-game-picker .game-card-head {
  margin-bottom: 0;
}

.home-page .landing-game-picker .game-card h3 {
  font-size: clamp(1.65rem, 2.3vw, 2.35rem);
}

.home-page .landing-game-picker .game-description {
  margin-top: 0;
}

.home-page .landing-game-picker .game-meta,
.home-page .landing-game-picker .game-card-actions {
  padding: 0 20px;
}

.home-page .landing-game-picker .game-card-actions {
  padding-bottom: 20px;
}

.sessions-shell {
  width: min(1180px, calc(100% - 28px));
  min-height: 100vh;
  align-content: start;
  display: grid;
  gap: 18px;
  padding: 28px 0 56px;
}

.sessions-header,
.sessions-empty {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(24, 25, 29, 0.94);
  box-shadow: var(--shadow);
}

.sessions-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: clamp(18px, 3vw, 30px);
}

.sessions-header h1,
.sessions-empty h2 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
}

.sessions-back-link {
  width: auto;
  min-width: 170px;
}

.sessions-page .my-sessions.is-page {
  grid-template-columns: 1fr;
}

.sessions-empty {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding: clamp(20px, 4vw, 40px);
}

@media (max-width: 1100px) {
  .landing-layout {
    grid-template-columns: 1fr;
  }

  .landing-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-sidebar .sidebar-section:last-child:nth-child(3) {
    grid-column: 1 / -1;
  }

  .home-page .twitch-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "stream"
      "join"
      "meta";
  }
}

@media (max-width: 820px) {
  .landing-nav {
    grid-template-columns: 1fr;
  }

  .landing-nav-links {
    justify-content: start;
    overflow-x: auto;
  }

  .landing-nav-actions {
    justify-content: start;
  }

  .landing-sidebar {
    display: none;
  }

  .home-page .twitch-hero .home-stage-preview {
    min-height: 0;
  }

  .home-page .twitch-hero .stage-preview-board,
  .home-page .landing-game-picker .game-grid {
    grid-template-columns: 1fr;
  }

  .home-page .twitch-hero .stage-preview-photo {
    min-height: 220px;
  }

  .sessions-header {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 500px) {
  .twitch-home-shell,
  .sessions-shell {
    width: min(100% - 20px, 430px);
  }

  .home-page .twitch-hero .hero-content {
    min-height: 0;
  }

  .home-page .twitch-hero .hero-content h1 {
    font-size: clamp(3rem, 16vw, 4.2rem);
  }

  .home-page .twitch-hero .stage-preview-side {
    grid-template-columns: 1fr;
  }

  .stream-status-bar {
    grid-template-columns: auto 1fr;
  }

  .stream-status-bar .preview-code {
    grid-column: 1 / -1;
  }

  .landing-nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .stream-card-meta {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .stream-card-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .stream-card-actions .primary-link,
  .stream-card-actions .secondary-button {
    width: 100%;
  }
}

/* Landing typography rhythm pass */
body.landing-page {
  --landing-space-1: 4px;
  --landing-space-2: 8px;
  --landing-space-3: 12px;
  --landing-space-4: 16px;
  --landing-space-5: 24px;
  --landing-h1: clamp(2.55rem, 3.1vw, 3.8rem);
  --landing-h2: clamp(1.75rem, 2.2vw, 2.35rem);
  --landing-h3: clamp(1.32rem, 1.55vw, 1.65rem);
  --landing-body: 0.98rem;
  --landing-small: 0.8rem;
}

.landing-page .eyebrow,
.landing-page .game-label {
  margin: 0;
  color: #d6ef72;
  font-size: 0.7rem;
  font-weight: 740;
  line-height: 1.15;
}

.landing-page .hero-copy,
.landing-page .game-description,
.landing-page .stream-card-meta span,
.landing-page .sidebar-room span {
  color: #bfc0ca;
  font-size: var(--landing-body);
  font-weight: 400;
  line-height: 1.48;
}

.twitch-home-shell {
  gap: var(--landing-space-4);
  padding-top: var(--landing-space-4);
}

.landing-layout,
.landing-main,
.home-page .twitch-hero,
.home-page .landing-game-picker {
  gap: var(--landing-space-4);
}

.landing-nav {
  min-height: 62px;
  padding: var(--landing-space-2);
}

.landing-sidebar {
  padding: var(--landing-space-3);
}

.landing-sidebar,
.sidebar-section {
  gap: var(--landing-space-3);
}

.home-page .twitch-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.32fr);
}

.home-page .twitch-hero .hero-content,
.home-page .twitch-hero .home-join-panel {
  padding: var(--landing-space-5);
}

.home-page .twitch-hero .hero-content {
  align-content: start;
  gap: var(--landing-space-3);
  min-height: 0;
}

.home-page .twitch-hero .hero-content h1,
.sessions-header h1 {
  margin: 0;
  font-size: var(--landing-h1);
  font-weight: 680;
  line-height: 1.02;
}

.home-page .twitch-hero .hero-content .hero-copy {
  max-width: 30rem;
  margin: 0;
}

.landing-page .hero-stats {
  margin-top: var(--landing-space-1);
}

.landing-page .hero-stats span,
.landing-page .game-feature-list li,
.landing-page .game-meta span,
.landing-page .stage-preview-roster span {
  padding: 6px 9px;
  font-size: var(--landing-small);
  font-weight: 650;
  line-height: 1.1;
}

.home-page .twitch-hero .home-stage-preview {
  gap: var(--landing-space-3);
  padding: var(--landing-space-3);
}

.stream-status-bar {
  min-height: 42px;
}

.home-page .twitch-hero .preview-code {
  font-size: clamp(2.25rem, 3.2vw, 3.5rem);
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1;
}

.stage-preview-main {
  gap: var(--landing-space-3);
  padding: var(--landing-space-4);
}

.stage-preview-main strong {
  font-size: clamp(1.5rem, 2vw, 2.05rem);
  font-weight: 650;
  line-height: 1.08;
}

.stage-preview-side {
  gap: var(--landing-space-3);
}

.stage-preview-side > div {
  padding: var(--landing-space-3);
}

.stage-preview-side strong {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 660;
  line-height: 1;
}

.home-page .twitch-hero .home-join-panel {
  gap: var(--landing-space-4);
}

.home-page .twitch-hero .home-join-panel > div {
  display: grid;
  gap: var(--landing-space-2);
}

.home-page .twitch-hero .home-join-panel h2,
.sessions-empty h2 {
  font-size: var(--landing-h3);
  font-weight: 680;
  line-height: 1.12;
}

.stream-card-meta {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: var(--landing-space-3);
  padding: var(--landing-space-3);
}

.stream-card-meta strong {
  font-size: 1rem;
  line-height: 1.2;
}

.home-page .landing-game-picker {
  margin-top: 0;
}

.home-page .landing-game-picker .section-heading {
  gap: var(--landing-space-2);
  padding: 0;
}

.home-page .landing-game-picker .section-heading h2 {
  margin: 0;
  font-size: var(--landing-h2);
  font-weight: 680;
  line-height: 1.04;
}

.home-page .landing-game-picker .game-grid {
  gap: var(--landing-space-3);
}

.home-page .landing-game-picker .game-card {
  gap: var(--landing-space-3);
}

.home-page .landing-game-picker .game-card-body {
  gap: var(--landing-space-2);
  padding: 0 var(--landing-space-4);
}

.home-page .landing-game-picker .game-card h3 {
  margin: 0;
  font-size: var(--landing-h3);
  font-weight: 670;
  line-height: 1.12;
}

.home-page .landing-game-picker .game-description {
  max-width: 30rem;
}

.home-page .landing-game-picker .game-feature-list {
  gap: 7px;
  margin-top: var(--landing-space-1);
}

.home-page .landing-game-picker .game-meta {
  gap: 8px;
  padding: 0 var(--landing-space-4);
}

.home-page .landing-game-picker .game-card-actions {
  gap: 8px;
  padding: 0 var(--landing-space-4) var(--landing-space-4);
}

.home-page .landing-game-picker .game-card-cover {
  min-height: 158px;
}

.home-page .landing-game-picker .game-card-cover .game-card-visual {
  min-height: 158px;
}

@media (max-width: 820px) {
  .home-page .twitch-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "stream"
      "join"
      "meta";
  }

  .landing-layout,
  .landing-main,
  .home-page .twitch-hero,
  .home-page .landing-game-picker {
    gap: var(--landing-space-3);
  }

  .home-page .twitch-hero .hero-content,
  .home-page .twitch-hero .home-join-panel {
    padding: var(--landing-space-4);
  }

  .home-page .twitch-hero .hero-content h1 {
    font-size: clamp(2.35rem, 9vw, 3.2rem);
  }

  .home-page .landing-game-picker .section-heading h2 {
    font-size: clamp(1.65rem, 7vw, 2.15rem);
  }
}

@media (max-width: 500px) {
  .home-page .twitch-hero {
    grid-template-columns: 1fr;
  }

  .home-page .twitch-hero .hero-content,
  .home-page .twitch-hero .home-join-panel {
    padding: var(--landing-space-4);
  }

  .home-page .twitch-hero .hero-content h1 {
    font-size: clamp(2.35rem, 12vw, 2.9rem);
  }

  .home-page .twitch-hero .preview-code {
    font-size: clamp(2rem, 11vw, 2.85rem);
  }

  .home-page .landing-game-picker .game-card-body,
  .home-page .landing-game-picker .game-meta,
  .home-page .landing-game-picker .game-card-actions {
    padding-right: var(--landing-space-3);
    padding-left: var(--landing-space-3);
  }

  .home-page .landing-game-picker .game-card-actions {
    padding-bottom: var(--landing-space-3);
  }
}

/* Work-meeting gaming landing */
body.landing-page {
  --landing-h1: clamp(2.75rem, 4vw, 4.7rem);
  --landing-h2: clamp(1.75rem, 2.2vw, 2.35rem);
  --landing-h3: clamp(1.3rem, 1.7vw, 1.75rem);
}

.twitch-home-shell {
  width: min(1240px, calc(100% - 32px));
  gap: 24px;
  padding-top: 24px;
}

.landing-layout {
  grid-template-columns: 1fr;
}

.landing-main {
  gap: 24px;
}

.landing-sidebar {
  display: none;
}

.landing-nav {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(24, 24, 27, 0.94);
}

.landing-nav-actions {
  min-width: 0;
}

.landing-nav-actions .primary-link,
.landing-nav-actions .secondary-button {
  width: auto;
}

.home-page .twitch-hero {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.46fr);
  grid-template-areas:
    "intro join"
    "usp join"
    "stream stream";
  gap: 16px;
}

.home-page .twitch-hero .hero-content {
  align-content: start;
  min-height: 0;
  gap: 14px;
  padding: clamp(26px, 4vw, 42px);
}

.home-page .twitch-hero .hero-content h1 {
  max-width: 760px;
  font-size: var(--landing-h1);
  font-weight: 700;
  line-height: 0.98;
}

.home-page .twitch-hero .hero-content .hero-copy {
  max-width: 680px;
  font-size: clamp(1rem, 1.25vw, 1.08rem);
  line-height: 1.54;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.hero-actions .primary-link,
.hero-actions .secondary-button {
  width: auto;
  min-width: 150px;
}

.usp-strip {
  grid-area: usp;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.usp-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014)),
    rgba(24, 24, 27, 0.9);
}

.usp-card strong {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.18;
}

.usp-card span,
.join-helper {
  color: #bfc0ca;
  font-size: 0.92rem;
  line-height: 1.42;
}

.home-page .twitch-hero .home-join-panel {
  align-content: start;
  gap: 18px;
  border-color: rgba(214, 239, 114, 0.34);
  background:
    linear-gradient(135deg, rgba(214, 239, 114, 0.1), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(24, 24, 27, 0.96);
}

.home-page .twitch-hero .home-join-panel h2 {
  font-size: clamp(1.65rem, 2.2vw, 2.25rem);
}

.join-helper {
  max-width: 28rem;
  margin: 0;
}

.home-page .twitch-hero .home-join-panel .join-form {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.home-page .twitch-hero .home-join-panel .primary-button {
  width: 100%;
}

.home-page .twitch-hero .home-stage-preview {
  min-height: 430px;
}

.stream-status-bar {
  color: #dfe1e6;
}

.room-badge {
  border-radius: 4px;
  padding: 5px 8px;
  color: #101113;
  background: var(--green);
  font-size: 0.74rem;
  font-weight: 780;
  line-height: 1;
  text-transform: uppercase;
}

.stage-preview-main strong {
  max-width: 18rem;
}

.home-page .landing-game-picker .section-heading {
  display: grid;
  align-items: start;
  justify-content: start;
  gap: 8px;
}

.home-page .landing-game-picker .section-heading h2 {
  max-width: none;
}

@media (max-width: 980px) {
  .home-page .twitch-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "join"
      "usp"
      "stream";
  }

  .home-page .twitch-hero .home-stage-preview {
    min-height: 0;
  }
}

@media (max-width: 820px) {
  .twitch-home-shell {
    width: min(100% - 24px, 760px);
    padding-top: 16px;
  }

  .home-page .twitch-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "join"
      "usp"
      "stream";
  }

  .usp-strip {
    grid-template-columns: 1fr;
  }

  .home-page .twitch-hero .hero-content h1 {
    font-size: clamp(2.35rem, 9vw, 3.6rem);
  }
}

@media (max-width: 500px) {
  .landing-nav-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .landing-nav-actions .primary-link,
  .landing-nav-actions .secondary-button,
  .hero-actions .primary-link,
  .hero-actions .secondary-button {
    width: 100%;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Games-first landing layout */
.twitch-home-shell {
  width: min(1360px, calc(100% - 32px));
  gap: 22px;
}

.landing-main {
  gap: clamp(30px, 4vw, 46px);
}

.home-page .games-first-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
  grid-template-areas: "intro join";
  grid-template-rows: auto;
  gap: clamp(22px, 4vw, 48px);
  align-items: end;
}

.home-page .games-first-hero .hero-content {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: clamp(18px, 4vw, 42px) 0 0;
}

.home-page .games-first-hero .hero-content h1 {
  max-width: 820px;
  font-size: clamp(2.8rem, 5.1vw, 5.6rem);
  line-height: 0.98;
}

.home-page .games-first-hero .hero-content .hero-copy {
  max-width: 700px;
  font-size: clamp(1rem, 1.35vw, 1.14rem);
}

.home-page .games-first-hero .home-join-panel {
  align-self: end;
  padding: 20px;
}

.games-showcase {
  gap: 18px;
}

.home-page .games-showcase .section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  align-items: end;
  gap: 18px;
  padding: 0;
}

.home-page .games-showcase .section-heading h2 {
  max-width: 760px;
  font-size: clamp(2.45rem, 4.6vw, 4.75rem);
  font-weight: 700;
  line-height: 0.98;
}

.section-copy {
  max-width: 34rem;
  margin: 0;
  color: #bfc0ca;
  font-size: 1rem;
  line-height: 1.48;
}

.home-page .games-showcase .game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.7vw, 22px);
}

.home-page .games-showcase .game-card {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
    #18181b;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.home-page .games-showcase .game-card-cover,
.home-page .games-showcase .game-card-cover .game-card-visual {
  min-height: clamp(220px, 20vw, 300px);
}

.home-page .games-showcase .game-card-body {
  gap: 10px;
  padding: 0 clamp(16px, 1.5vw, 22px);
}

.home-page .games-showcase .game-card h3 {
  font-size: clamp(1.55rem, 2vw, 2.1rem);
}

.home-page .games-showcase .game-description {
  font-size: 1rem;
  line-height: 1.48;
}

.home-page .games-showcase .game-meta {
  padding: 0 clamp(16px, 1.5vw, 22px);
}

.home-page .games-showcase .game-card-actions {
  padding: 0 clamp(16px, 1.5vw, 22px) clamp(16px, 1.5vw, 22px);
}

.landing-support {
  display: grid;
  grid-template-columns: minmax(240px, 0.28fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 36px);
  align-items: start;
}

.landing-support .usp-strip {
  grid-area: auto;
  grid-template-columns: 1fr;
  gap: 0;
}

.landing-support .usp-card {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  padding: 16px 0;
  background: transparent;
}

.landing-support .usp-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.landing-support .home-stage-preview {
  grid-area: auto;
  min-height: 0;
  padding: 14px;
}

.landing-support .stage-preview-photo {
  min-height: clamp(210px, 22vw, 310px);
}

@media (max-width: 980px) {
  .home-page .games-first-hero,
  .home-page .games-showcase .section-heading,
  .landing-support {
    grid-template-columns: 1fr;
  }

  .home-page .games-first-hero {
    grid-template-areas:
      "intro"
      "join";
    align-items: stretch;
  }

  .home-page .games-first-hero .home-join-panel {
    align-self: stretch;
  }

  .home-page .games-showcase .game-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  }

  .landing-support .usp-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .landing-support .usp-card {
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0 0 0 14px;
  }

  .landing-support .usp-card:first-child {
    border-left: 0;
    padding-left: 0;
  }
}

@media (min-width: 641px) and (max-width: 980px) {
  .home-page .games-first-hero .home-join-panel {
    grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr);
    align-items: end;
    gap: 18px;
  }

  .home-page .games-first-hero .home-join-panel .join-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .home-page .games-first-hero .home-join-panel .primary-button {
    width: auto;
    min-width: 120px;
  }
}

@media (max-width: 640px) {
  .home-page .games-first-hero .hero-content h1,
  .home-page .games-showcase .section-heading h2 {
    font-size: clamp(2.35rem, 11vw, 3.25rem);
  }

  .landing-support .usp-strip,
  .home-page .games-showcase .game-grid {
    grid-template-columns: 1fr;
  }

  .landing-support .usp-card,
  .landing-support .usp-card:first-child {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px 0 0;
  }

  .landing-support .usp-card:first-child {
    border-top: 0;
    padding-top: 0;
  }
}

/* Nav and spacing polish */
.twitch-home-shell {
  gap: clamp(16px, 2vw, 22px);
  padding-top: clamp(14px, 2vw, 22px);
}

.landing-main {
  gap: clamp(24px, 3vw, 36px);
}

.landing-nav {
  position: sticky;
  top: 10px;
  z-index: 10;
  min-height: 54px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 7px;
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.024)),
    rgba(18, 18, 20, 0.88);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.landing-brand {
  gap: 9px;
  padding-left: 3px;
  font-size: 1rem;
}

.landing-brand-mark {
  width: 44px;
  height: 44px;
}

.landing-nav-links {
  justify-self: center;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.045);
}

.landing-nav-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: #cfd1d8;
  font-size: 0.9rem;
  line-height: 1;
}

.landing-nav-links a:first-child {
  color: #101113;
  background: var(--green);
}

.landing-nav-actions {
  gap: 8px;
}

.landing-session-link,
.landing-join-link {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 14px;
}

.home-page .games-first-hero {
  gap: clamp(18px, 3vw, 38px);
}

.home-page .games-first-hero .hero-content {
  padding-top: clamp(8px, 2vw, 24px);
}

.games-showcase {
  gap: clamp(14px, 1.6vw, 20px);
}

.landing-support {
  padding-top: clamp(6px, 1.2vw, 14px);
}

@media (max-width: 820px) {
  .landing-nav {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .landing-nav-links {
    justify-self: center;
    overflow-x: visible;
  }

  .landing-nav-actions {
    justify-content: end;
  }
}

@media (max-width: 640px) {
  .twitch-home-shell {
    width: min(100% - 20px, 460px);
    gap: 16px;
  }

  .landing-main {
    gap: 26px;
  }

  .landing-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "links links";
    gap: 7px 10px;
    padding: 7px;
  }

  .landing-brand {
    grid-area: brand;
  }

  .landing-nav-links {
    grid-area: links;
    justify-self: stretch;
    justify-content: space-between;
  }

  .landing-nav-links a {
    flex: 1 1 0;
    justify-content: center;
    padding: 0 8px;
  }

  .landing-nav-actions {
    grid-area: actions;
  }

  .landing-join-link {
    min-width: 112px;
  }
}

/* Section breathing room pass */
.home-page .twitch-home-shell,
.twitch-home-shell {
  gap: clamp(26px, 3.2vw, 40px);
  padding-top: clamp(18px, 2.4vw, 28px);
  padding-bottom: clamp(56px, 7vw, 86px);
}

.home-page .landing-main,
.landing-main {
  gap: clamp(44px, 5vw, 72px);
}

.home-page .games-first-hero {
  gap: clamp(28px, 4.4vw, 58px);
}

.home-page .games-first-hero .hero-content {
  padding-top: clamp(16px, 2.8vw, 34px);
}

.home-page .games-showcase,
.games-showcase {
  gap: clamp(26px, 3vw, 38px);
}

.home-page .games-showcase .section-heading {
  gap: clamp(20px, 3vw, 34px);
}

.home-page .games-showcase .game-grid {
  gap: clamp(18px, 2.2vw, 28px);
}

.home-page .landing-support,
.landing-support {
  padding-top: clamp(12px, 2vw, 28px);
}

@media (max-width: 980px) {
  .home-page .twitch-home-shell,
  .twitch-home-shell {
    gap: 34px;
  }

  .home-page .landing-main,
  .landing-main {
    gap: 46px;
  }

  .home-page .games-showcase,
  .games-showcase {
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .home-page .twitch-home-shell,
  .twitch-home-shell {
    gap: 28px;
  }

  .home-page .landing-main,
  .landing-main {
    gap: 40px;
  }

  .home-page .games-first-hero {
    gap: 24px;
  }

  .home-page .games-showcase,
  .games-showcase {
    gap: 24px;
  }
}

/* Cross-page game-room layout pass */
body.session-page,
body.sessions-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.036), transparent 26rem),
    linear-gradient(125deg, rgba(201, 244, 93, 0.065), transparent 24rem),
    linear-gradient(235deg, rgba(79, 212, 220, 0.07), transparent 28rem),
    #101113;
}

.session-page .app-shell:not(.home-shell),
.join-shell,
.sessions-shell {
  width: min(1240px, calc(100% - 40px));
  padding-top: clamp(22px, 3vw, 34px);
  padding-bottom: clamp(64px, 7vw, 92px);
}

.session-topbar,
.player-topbar,
.sessions-header {
  min-height: 76px;
  margin-bottom: clamp(24px, 3vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  padding: clamp(14px, 2.2vw, 22px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(21, 22, 25, 0.92);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
}

.session-topbar h1,
.player-topbar h1,
.sessions-header h1 {
  font-size: clamp(1.8rem, 3.4vw, 3.2rem);
  font-weight: 680;
  line-height: 1.02;
}

.session-topbar-actions {
  flex-wrap: wrap;
}

body.setup-session-page {
  height: auto;
  min-height: 100vh;
  overflow: auto;
  overscroll-behavior: auto;
}

.setup-session-page .host-shell {
  width: min(1240px, calc(100% - 40px));
  height: auto;
  min-height: 100vh;
  padding-top: clamp(20px, 3vw, 32px);
  padding-bottom: clamp(64px, 7vw, 92px);
  grid-template-rows: auto auto;
  gap: clamp(24px, 3vw, 38px);
}

.setup-session-page .session-topbar {
  margin-bottom: 0;
  padding: clamp(14px, 2.2vw, 22px);
}

.setup-session-page .session-topbar h1 {
  font-size: clamp(1.8rem, 3.4vw, 3.2rem);
}

.setup-session-page .setup-layout,
.setup-layout {
  grid-template-columns: minmax(270px, 0.48fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 38px);
  align-items: start;
}

.setup-session-page .setup-copy,
.setup-copy {
  min-height: 0;
  align-content: start;
  gap: clamp(14px, 2vw, 20px);
  padding: clamp(24px, 3.5vw, 42px);
}

.setup-copy h2,
.setup-session-page .setup-copy h2 {
  max-width: 620px;
  font-size: clamp(2.25rem, 4.8vw, 4.7rem);
  line-height: 1.02;
}

.setup-copy .hero-copy,
.setup-copy .muted {
  max-width: 560px;
  margin: 0;
  color: #bfc0ca;
  font-size: 1rem;
  line-height: 1.55;
}

.setup-session-page .setup-form,
.setup-form {
  gap: clamp(16px, 2vw, 24px);
  padding: clamp(20px, 3vw, 30px);
  overflow: visible;
}

.setup-session-page .form-grid,
.setup-session-page .setup-player-fields,
.setup-session-page .head-picker,
.setup-session-page .team-picker,
.setup-session-page .mode-picker {
  gap: 12px;
}

.setup-session-page .head-options,
.head-options {
  gap: 12px;
}

.setup-session-page .team-options,
.setup-session-page .mode-options,
.team-options,
.mode-options {
  gap: 10px;
}

.setup-player-fields {
  padding: clamp(16px, 2vw, 22px);
}

.setup-player-fields h3 {
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.12;
}

.match-lobby {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.34fr);
  gap: clamp(24px, 3vw, 38px);
  align-items: start;
}

.match-lobby-stage,
.match-lobby-panel {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(24, 25, 29, 0.94);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.25);
}

.match-lobby-stage {
  min-height: 0;
  display: grid;
  gap: clamp(24px, 3vw, 34px);
  padding: clamp(22px, 3vw, 34px);
  overflow: hidden;
  position: relative;
}

.match-lobby-soccer .match-lobby-stage {
  background:
    linear-gradient(135deg, rgba(201, 244, 93, 0.09), transparent 42%),
    linear-gradient(225deg, rgba(79, 212, 220, 0.07), transparent 46%),
    rgba(24, 25, 29, 0.94);
}

.match-lobby-volleyball .match-lobby-stage {
  background:
    linear-gradient(135deg, rgba(255, 200, 87, 0.09), transparent 42%),
    linear-gradient(225deg, rgba(79, 212, 220, 0.08), transparent 46%),
    rgba(24, 25, 29, 0.94);
}

.match-lobby-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
}

.match-lobby-hero h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2.25rem, 4.2vw, 4.4rem);
  font-weight: 680;
  line-height: 1.02;
}

.match-lobby-hero .muted {
  max-width: 560px;
  margin: 12px 0 0;
  line-height: 1.48;
}

.match-lobby-code {
  min-width: min(220px, 28vw);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.055);
}

.match-lobby-code span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  text-transform: uppercase;
}

.match-lobby-code .room-code {
  display: block;
  margin: 5px 0 0;
  color: var(--green);
  font-size: clamp(3rem, 5.5vw, 5.8rem);
  font-weight: 720;
  letter-spacing: 0;
  line-height: 0.92;
}

.match-lobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 2.5vw, 28px);
  align-items: start;
}

.match-lobby-join {
  display: grid;
  gap: 14px;
  align-content: start;
}

.match-lobby .join-qr-card {
  grid-template-columns: minmax(118px, 150px) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.match-lobby .join-qr-code {
  width: 100%;
  max-width: 150px;
}

.match-lobby-panel .match-lobby-sidebar-join {
  gap: 10px;
}

.match-lobby-panel .join-qr-card {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.match-lobby-panel .join-qr-code {
  width: min(100%, 154px);
  max-width: 154px;
}

.match-lobby-panel .join-qr-copy {
  width: 100%;
}

.match-lobby-teams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.match-lobby-team {
  min-width: 0;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.048);
}

.match-lobby-team-red {
  border-top: 4px solid #ff4f73;
}

.match-lobby-team-blue {
  border-top: 4px solid #56d8ff;
}

.match-lobby-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.match-lobby-team-head h3 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  font-weight: 680;
  line-height: 1.12;
}

.match-lobby-team-head span {
  min-width: 34px;
  border-radius: 999px;
  padding: 6px 9px;
  color: #101113;
  background: var(--green);
  font-size: 0.8rem;
  font-weight: 760;
  text-align: center;
}

.match-lobby-roster {
  display: grid;
  gap: 10px;
}

.match-lobby .soccer-wait-player,
.match-lobby .volleyball-lobby-player,
.match-lobby-player {
  position: static;
  left: auto;
  bottom: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: stretch;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.052);
  transform: none;
}

.match-lobby-player.is-ai {
  grid-template-columns: auto minmax(0, 1fr) auto;
  border-color: rgba(201, 244, 93, 0.24);
  background: rgba(201, 244, 93, 0.08);
}

.match-lobby .soccer-wait-player strong,
.match-lobby .volleyball-lobby-player strong,
.match-lobby-player strong {
  max-width: none;
  overflow: hidden;
  border-radius: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  font-size: 0.95rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-lobby .avatar-head {
  width: 40px;
  height: 40px;
}

.match-lobby-ai-player-info {
  min-width: 0;
}

.match-lobby-ai-player-info p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 680;
  line-height: 1.2;
}

.match-lobby-player.is-ai form {
  margin: 0;
}

.match-lobby-empty {
  margin: 0;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 620;
}

.match-lobby-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: clamp(18px, 2.5vw, 24px);
}

.match-lobby-count {
  min-height: 120px;
  display: grid;
  align-content: center;
  border-radius: var(--radius);
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(201, 244, 93, 0.1), transparent 52%),
    rgba(255, 255, 255, 0.055);
}

.match-lobby-count span {
  display: block;
  color: var(--green);
  font-size: clamp(3rem, 6vw, 4.7rem);
  font-weight: 720;
  line-height: 0.94;
}

.match-lobby-count p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.match-lobby-ai-control {
  gap: 14px;
  padding: 14px;
}

.match-lobby-ai-control .volleyball-ai-form {
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.55fr) auto;
}

.match-lobby-team-ai-control {
  gap: 8px;
  border-color: rgba(255, 255, 255, 0.085);
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.match-lobby-team-ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.match-lobby-team-ai-form .setting-input {
  min-height: 42px;
}

.match-lobby-team-ai-form .wide-button {
  width: 100%;
  min-height: 42px;
}

.match-lobby-ai-list {
  display: grid;
  gap: 10px;
}

.match-lobby-ai-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.match-lobby-ai-row strong,
.match-lobby-ai-row p {
  margin: 0;
}

.match-lobby-ai-row p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 620;
}

.match-lobby-ai-row form {
  margin: 0;
}

.match-lobby-ai-remove {
  min-height: 36px;
  width: auto;
  padding: 0 11px;
  font-size: 0.82rem;
}

.match-lobby-actions {
  display: grid;
  gap: 10px;
}

.match-lobby-actions form {
  margin: 0;
}

.match-lobby-note {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.join-shell {
  min-height: 100vh;
  display: grid;
  align-content: start;
  gap: clamp(22px, 3vw, 34px);
}

.join-shell > .text-link {
  width: max-content;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.055);
}

.join-room-panel {
  width: min(780px, 100%);
  justify-self: center;
  display: grid;
  gap: clamp(18px, 2.5vw, 26px);
  padding: clamp(24px, 4vw, 44px);
}

.join-room-panel h1 {
  max-width: 680px;
  font-size: clamp(2.5rem, 6.5vw, 5.2rem);
  font-weight: 680;
  line-height: 1.02;
}

.nickname-form {
  display: grid;
  gap: clamp(18px, 2.5vw, 26px);
}

.nickname-form .primary-button {
  justify-self: start;
  width: min(100%, 260px);
}

.waiting-stage,
.final-stage,
.locked-answer,
.reveal-result {
  width: min(780px, 100%);
  justify-self: center;
  padding: clamp(24px, 4vw, 44px);
}

.waiting-stage h2,
.final-stage h2,
.player-prompt h2 {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  line-height: 1.03;
}

.play-page .player-shell:not(.is-live-player) .final-stage,
.host-page .host-shell:not(.is-geo-results) .match-result-stage {
  height: auto;
  min-height: 0;
}

.player-result-stage,
.match-result-stage {
  width: min(980px, 100%);
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.result-hero,
.result-card,
.player-result-stage .leaderboard,
.match-result-stage .leaderboard {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(24, 25, 29, 0.94);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.25);
}

.result-hero {
  display: grid;
  gap: 12px;
  padding: clamp(24px, 4vw, 44px);
}

.result-hero h2 {
  max-width: 780px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  font-weight: 680;
  line-height: 1.02;
}

.result-score {
  margin: 0;
  color: var(--green);
  font-size: clamp(1.05rem, 2.4vw, 1.55rem);
  font-weight: 680;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: clamp(18px, 2.5vw, 28px);
  align-items: start;
}

.match-result-stage .result-grid {
  grid-template-columns: 1fr;
}

.result-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.result-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  font-weight: 680;
  line-height: 1.12;
}

.result-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 640;
}

.player-result-stage .leaderboard,
.match-result-stage .leaderboard {
  padding: clamp(16px, 2.5vw, 22px);
}

.player-result-stage .final-actions,
.match-result-stage .final-actions {
  margin-top: 0;
}

.player-result-stage .leaderboard-list li.is-live-match,
.match-result-stage .leaderboard-list li.is-live-match {
  grid-template-columns: 28px 42px minmax(74px, auto) minmax(0, 1fr) auto;
}

.live-session-page .host-shell,
.live-session-page .player-shell.is-live-player {
  width: min(1480px, calc(100% - 24px));
  padding-top: 16px;
}

.live-session-page .live-match,
.mini-controller {
  gap: clamp(16px, 2vw, 24px);
}

.live-scoreboard {
  grid-template-columns: minmax(120px, 1fr) minmax(150px, auto) minmax(120px, 1fr);
  min-height: 72px;
  padding: 14px 16px;
}

.live-field-wrap,
.controller-pitch {
  border-color: rgba(255, 255, 255, 0.12);
  background: #081715;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.volleyball-field-wrap,
.volleyball-controller-pitch {
  background: #142332;
}

.live-field,
.controller-field {
  image-rendering: auto;
}

.controller-hud {
  top: 16px;
  left: 16px;
  right: 16px;
}

.controller-player,
.controller-score,
.controller-status {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 16, 18, 0.66);
}

.sessions-shell {
  gap: clamp(26px, 4vw, 44px);
}

.sessions-header {
  margin-bottom: 0;
}

.sessions-header .hero-copy {
  margin-top: 10px;
}

.sessions-page .my-session-list {
  gap: 16px;
}

.sessions-empty {
  padding: clamp(24px, 4vw, 44px);
}

@media (max-width: 1040px) {
  .setup-session-page .setup-layout,
  .setup-layout,
  .match-lobby,
  .match-lobby-grid {
    grid-template-columns: 1fr;
  }

  .match-lobby-code {
    width: min(100%, 300px);
  }
}

@media (max-width: 740px) {
  .session-page .app-shell:not(.home-shell),
  .join-shell,
  .sessions-shell,
  .setup-session-page .host-shell {
    width: min(100% - 22px, 560px);
  }

  .session-topbar,
  .player-topbar,
  .sessions-header {
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .session-topbar,
  .player-topbar,
  .sessions-header {
    align-items: start;
  }

  .match-lobby .join-qr-card {
    grid-template-columns: 116px minmax(0, 1fr);
  }

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

  .live-match-status {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .live-team-red {
    grid-column: 1;
    grid-row: 2;
  }

  .live-team-blue {
    grid-column: 2;
    grid-row: 2;
  }

  .live-team,
  .live-team-blue {
    justify-content: space-between;
  }

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

  .match-lobby-ai-control .volleyball-ai-form {
    grid-template-columns: 1fr;
  }

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

  .player-result-stage .leaderboard-list li.is-live-match,
  .match-result-stage .leaderboard-list li.is-live-match {
    grid-template-columns: 28px 42px minmax(0, 1fr) auto;
  }

  .player-result-stage .team-badge,
  .match-result-stage .team-badge {
    display: none;
  }

  .volleyball-ai-form .wide-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .match-lobby-hero,
  .match-lobby-teams {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .match-lobby-stage,
  .match-lobby-panel,
  .join-room-panel,
  .waiting-stage,
  .final-stage {
    padding: 18px;
  }

  .match-lobby .join-qr-card {
    grid-template-columns: 1fr;
  }

  .match-lobby .join-qr-code {
    max-width: 180px;
  }

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

  .live-match-status,
  .live-team-red,
  .live-team-blue {
    grid-column: 1;
    grid-row: auto;
  }

  .live-team,
  .live-team-blue {
    justify-content: space-between;
  }
}

.session-page.play-page .player-shell .final-stage.player-result-stage,
.session-page.host-page .host-shell .final-stage.match-result-stage {
  height: auto;
  min-height: 0;
  align-self: start;
}

.session-page.host-page .result-shell {
  width: min(1360px, calc(100% - 32px));
  min-height: 100vh;
  padding-top: clamp(18px, 3vw, 30px);
  padding-bottom: clamp(58px, 7vw, 88px);
  gap: clamp(22px, 3vw, 34px);
}

.session-page.host-page .result-shell .match-result-page {
  width: 100%;
  max-width: none;
}

.match-result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(248px, 0.32fr);
  gap: clamp(18px, 2.6vw, 34px);
  align-items: start;
}

.match-result-main {
  min-width: 0;
  display: grid;
  gap: clamp(16px, 2.3vw, 24px);
}

.match-result-page .match-result-hero {
  gap: clamp(18px, 2.5vw, 28px);
  padding: clamp(22px, 3.5vw, 40px);
}

.match-result-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(14px, 2vw, 20px);
  align-items: start;
}

.match-result-title .sidebar-game-icon {
  width: clamp(44px, 5vw, 64px);
  height: clamp(44px, 5vw, 64px);
}

.match-result-page .match-result-hero h2 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(2.4rem, 5.4vw, 5.5rem);
  font-weight: 680;
  line-height: 0.98;
}

.match-result-page .match-result-hero .muted {
  margin: 10px 0 0;
  font-weight: 650;
}

.match-result-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 18px);
}

.match-result-team-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-top: 4px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: clamp(16px, 2.4vw, 24px);
  background: rgba(255, 255, 255, 0.052);
}

.match-result-team-red {
  border-top-color: #ff4f73;
}

.match-result-team-blue {
  border-top-color: #56d8ff;
}

.match-result-team-card.is-winner {
  border-color: rgba(201, 244, 93, 0.45);
  border-top-color: var(--green);
  background:
    linear-gradient(135deg, rgba(201, 244, 93, 0.15), transparent 56%),
    rgba(255, 255, 255, 0.062);
}

.match-result-team-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.match-result-team-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(3rem, 6vw, 5.8rem);
  font-weight: 720;
  line-height: 0.92;
}

.match-result-team-card.is-winner strong {
  color: var(--green);
}

.match-result-team-card p {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 680;
  line-height: 1.1;
}

.match-result-side {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  padding: clamp(16px, 2vw, 22px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(24, 25, 29, 0.94);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.25);
}

.match-result-summary h3,
.match-result-summary p {
  margin: 0;
}

.match-result-summary h3 {
  overflow-wrap: anywhere;
  font-size: clamp(1.22rem, 2vw, 1.6rem);
  font-weight: 680;
  line-height: 1.14;
}

.match-result-summary p:not(.eyebrow) {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 620;
  line-height: 1.45;
}

.match-result-page .leaderboard {
  padding: clamp(16px, 2.5vw, 22px);
}

.match-result-page .leaderboard-list li.is-live-match {
  grid-template-columns: 28px 42px minmax(78px, auto) minmax(0, 1fr) auto;
}

.match-result-page .final-actions {
  margin: 0;
}

.match-result-page .final-actions .primary-link {
  width: 100%;
}

.match-result-page .final-actions .button_to,
.match-result-page .final-actions .primary-button {
  width: 100%;
}

@media (min-width: 700px) and (max-width: 1040px) {
  .match-result-layout {
    grid-template-columns: minmax(0, 1fr) minmax(248px, 0.36fr);
  }

  .match-result-page .match-result-hero h2 {
    font-size: clamp(2.1rem, 4.6vw, 3.8rem);
  }

  .match-result-team-card strong {
    font-size: clamp(2.7rem, 5vw, 4.3rem);
  }
}

@media (max-width: 699px) {
  .session-page.host-page .result-shell {
    width: min(100% - 20px, 460px);
  }

  .match-result-layout,
  .match-result-scoreboard {
    grid-template-columns: 1fr;
  }

  .match-result-side {
    position: static;
  }
}

@media (max-width: 520px) {
  .match-result-title {
    grid-template-columns: 1fr;
  }

  .match-result-page .leaderboard-list li.is-live-match {
    grid-template-columns: 28px 40px minmax(0, 1fr) auto;
  }

  .match-result-page .team-badge {
    display: none;
  }
}

/* Final setup flow pass */
.setup-session-page .host-shell {
  width: min(1180px, calc(100% - 28px));
  min-height: 100vh;
  padding-top: clamp(18px, 3vw, 30px);
  padding-bottom: clamp(58px, 7vw, 88px);
  gap: clamp(22px, 3vw, 34px);
}

.setup-session-page .session-topbar {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(21, 22, 25, 0.86);
}

.setup-session-page .session-topbar h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.45rem);
}

.setup-session-page .room-setup {
  grid-template-columns: minmax(230px, 0.42fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 34px);
  align-items: start;
}

.setup-session-page .setup-intro {
  min-height: 0;
  position: sticky;
  top: 18px;
  display: grid;
  align-content: start;
  gap: clamp(13px, 1.8vw, 18px);
  border: 0;
  border-radius: 0;
  padding: clamp(8px, 1.6vw, 18px) 0;
  background: transparent;
  box-shadow: none;
}

.setup-session-page .setup-intro .sidebar-game-icon {
  width: 48px;
  height: 48px;
}

.setup-session-page .setup-intro h2 {
  max-width: 520px;
  font-size: clamp(2.45rem, 5.2vw, 4.85rem);
  font-weight: 680;
  line-height: 0.98;
}

.setup-session-page .setup-intro .hero-copy,
.setup-session-page .setup-intro .muted {
  max-width: 430px;
  margin: 0;
  color: #c5c7cf;
  font-size: clamp(0.95rem, 1.25vw, 1.06rem);
  font-weight: 520;
  line-height: 1.58;
}

.setup-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setup-pill-list span {
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 0 10px;
  color: #dcd6c7;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1;
}

.setup-session-page .room-setup-form {
  gap: clamp(16px, 2vw, 22px);
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.setup-section {
  display: grid;
  gap: clamp(14px, 1.8vw, 18px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  padding: clamp(17px, 2.25vw, 24px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(24, 25, 29, 0.94);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.setup-section-header {
  display: grid;
  gap: 5px;
}

.setup-section-header .eyebrow {
  margin: 0;
}

.setup-section-header h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 680;
  line-height: 1.1;
}

.room-setup .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.room-setup .mode-picker {
  grid-column: 1 / -1;
}

.room-setup .setting-input {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(7, 8, 10, 0.72);
}

.room-setup .form-field label,
.room-setup .form-label,
.room-setup .form-hint {
  color: #bfc0ca;
  font-size: 0.82rem;
  font-weight: 760;
}

.setup-session-page .setup-player-fields {
  gap: clamp(14px, 1.8vw, 18px);
  padding: clamp(17px, 2.25vw, 24px);
}

.room-setup .name-generator {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.room-setup .name-generator-button {
  min-height: 48px;
}

.room-setup .head-options,
.room-setup .team-options,
.room-setup .mode-options {
  gap: 10px;
}

.room-setup .head-option,
.room-setup .team-option,
.room-setup .mode-option {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.052);
}

.room-setup .head-option {
  min-height: 94px;
  justify-content: center;
}

.room-setup .head-option-name,
.room-setup .team-option span,
.room-setup .mode-option span {
  overflow-wrap: anywhere;
}

.setup-submit-row {
  display: flex;
  justify-content: flex-end;
}

.setup-submit-row .primary-button {
  width: min(100%, 320px);
}

.geo-guess-setup .room-setup .form-grid,
.setup-copy-geo + .room-setup-form .form-grid {
  grid-template-columns: minmax(220px, 0.4fr);
}

@media (min-width: 681px) and (max-width: 1040px) {
  .setup-session-page .host-shell {
    width: min(920px, calc(100% - 28px));
  }

  .setup-session-page .room-setup {
    grid-template-columns: minmax(210px, 0.38fr) minmax(0, 1fr);
    gap: 22px;
  }

  .setup-session-page .setup-intro h2 {
    font-size: clamp(2.35rem, 5.5vw, 3.95rem);
  }

  .setup-session-page .setup-intro .hero-copy,
  .setup-session-page .setup-intro .muted {
    font-size: 0.95rem;
    line-height: 1.52;
  }

  .room-setup .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-setup .form-grid .mode-picker {
    grid-column: 1 / -1;
  }

  .room-setup .head-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .setup-session-page .host-shell {
    width: min(100% - 22px, 560px);
  }

  .setup-session-page .room-setup {
    grid-template-columns: 1fr;
  }

  .setup-session-page .setup-intro {
    position: static;
    padding: 4px 0 0;
  }

  .setup-session-page .setup-intro h2 {
    font-size: clamp(2.3rem, 12vw, 3.6rem);
  }

  .room-setup .form-grid,
  .geo-guess-setup .room-setup .form-grid,
  .setup-copy-geo + .room-setup-form .form-grid {
    grid-template-columns: 1fr;
  }

  .room-setup .name-generator {
    grid-template-columns: 1fr;
  }

  .setup-submit-row .primary-button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .room-setup .head-options,
  .room-setup .team-options,
  .room-setup .mode-options {
    grid-template-columns: 1fr;
  }
}

/* Landing-aligned setup flow */
body.setup-session-page {
  --stream-bg: #0e0e10;
  --stream-panel: #18181b;
  --stream-accent: #9147ff;
  --stream-accent-soft: rgba(145, 71, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(145, 71, 255, 0.1), transparent 280px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 72px),
    #0e0e10;
}

.setup-session-page .setup-shell {
  width: min(1360px, calc(100% - 32px));
  gap: clamp(28px, 4vw, 56px);
  padding-top: clamp(18px, 2.4vw, 28px);
}

.setup-session-page .setup-nav {
  position: sticky;
  top: 10px;
  z-index: 10;
  margin: 0;
}

.setup-nav .landing-nav-links a,
.setup-nav .landing-nav-links span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: #cfd1d8;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
}

.setup-nav .landing-nav-links a:first-child {
  color: #cfd1d8;
  background: transparent;
}

.setup-nav .landing-nav-links .is-active {
  color: #101113;
  background: var(--green);
}

.setup-nav-code,
.setup-room-code {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 780;
  letter-spacing: 0;
}

.setup-session-page .setup-nav .session-close-button {
  min-height: 36px;
  border-radius: 999px;
}

.setup-session-page .setup-landing-flow {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
  gap: clamp(28px, 4.4vw, 58px);
  align-items: end;
}

.setup-session-page .setup-landing-hero {
  position: static;
  min-height: 0;
  display: grid;
  align-content: end;
  gap: clamp(14px, 2vw, 22px);
  border: 0;
  padding: clamp(16px, 2.8vw, 34px) 0 0;
  background: transparent;
  box-shadow: none;
}

.setup-session-page .setup-landing-hero .sidebar-game-icon {
  width: 54px;
  height: 54px;
}

.setup-session-page .setup-landing-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.8rem, 5.1vw, 5.6rem);
  font-weight: 700;
  line-height: 0.98;
}

.setup-session-page .setup-landing-hero .hero-copy {
  max-width: 700px;
  margin: 0;
  color: #bfc0ca;
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.54;
}

.setup-session-page .setup-pill-list {
  margin-top: 2px;
}

.setup-session-page .setup-game-cover {
  min-height: clamp(220px, 20vw, 300px);
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: clamp(16px, 2vw, 22px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  position: relative;
}

.setup-session-page .setup-game-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 64%;
  background: linear-gradient(180deg, transparent, rgba(14, 14, 16, 0.9));
  pointer-events: none;
}

.setup-session-page .setup-game-cover > * {
  position: relative;
  z-index: 1;
}

.setup-session-page .setup-game-cover strong {
  max-width: 17rem;
  color: #fff;
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  font-weight: 700;
  line-height: 1.02;
}

.setup-session-page .setup-game-cover.arcade-volleyball {
  background:
    radial-gradient(circle at 56% 28%, rgba(250, 243, 227, 0.96) 0 12px, transparent 13px),
    linear-gradient(90deg, transparent 0 48%, rgba(250, 243, 227, 0.58) 48% 52%, transparent 52%),
    linear-gradient(180deg, #263746 0 48%, #715a3b 48% 100%);
}

.setup-session-page .setup-game-cover.mini-soccer {
  background:
    radial-gradient(circle at 73% 36%, rgba(250, 243, 227, 0.92) 0 12px, transparent 13px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, #197649, #104f38);
  background-size: auto, 30px 30px, 30px 30px, auto;
}

.setup-session-page .setup-game-cover.geo-guess {
  background:
    linear-gradient(180deg, rgba(14, 14, 16, 0.04), rgba(14, 14, 16, 0.36)),
    url("/locations/golden-gate.jpg") center / cover;
}

.setup-session-page .setup-builder-panel {
  gap: clamp(16px, 2vw, 22px);
  align-self: end;
  border: 1px solid rgba(214, 239, 114, 0.34);
  border-radius: var(--radius);
  padding: clamp(18px, 2.2vw, 22px);
  background:
    linear-gradient(135deg, rgba(214, 239, 114, 0.1), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(24, 24, 27, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
}

.setup-builder-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.setup-builder-header h2 {
  margin: 0;
  font-size: clamp(1.65rem, 2.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.06;
}

.setup-builder-header .join-helper {
  margin-top: 8px;
}

.setup-session-page .setup-builder-panel .setup-section {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  padding: clamp(16px, 2vw, 20px) 0 0;
  background: transparent;
  box-shadow: none;
}

.setup-session-page .setup-section-header {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.setup-session-page .setup-section-header h3 {
  font-size: clamp(1.22rem, 1.7vw, 1.55rem);
}

.setup-session-page .setup-builder-panel .form-grid {
  grid-template-columns: 1fr;
}

.setup-session-page .setup-builder-panel .mode-options,
.setup-session-page .setup-builder-panel .team-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setup-session-page .setup-builder-panel .team-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.setup-session-page .setup-builder-panel .head-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.setup-session-page .setup-builder-panel .head-option {
  min-height: 86px;
}

.setup-session-page .setup-builder-panel .setup-submit-row {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: clamp(16px, 2vw, 20px);
}

.setup-session-page .setup-builder-panel .primary-button {
  width: 100%;
}

@media (max-width: 980px) {
  .setup-session-page .setup-landing-flow {
    grid-template-columns: 1fr;
    gap: clamp(22px, 4vw, 34px);
  }

  .setup-session-page .setup-landing-hero {
    align-content: start;
    padding-top: clamp(8px, 2vw, 22px);
  }

  .setup-session-page .setup-builder-panel {
    align-self: stretch;
  }

  .setup-session-page .setup-builder-panel .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .setup-session-page .setup-builder-panel .mode-picker,
  .setup-session-page .setup-builder-panel .head-picker,
  .setup-session-page .setup-builder-panel .team-picker {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .setup-session-page .setup-shell {
    width: min(100% - 24px, 760px);
    padding-top: 16px;
  }

  .setup-session-page .setup-nav {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .setup-session-page .setup-landing-hero h1 {
    font-size: clamp(2.35rem, 9vw, 3.6rem);
  }
}

@media (max-width: 640px) {
  .setup-session-page .setup-shell {
    width: min(100% - 20px, 460px);
    gap: 28px;
  }

  .setup-session-page .setup-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "links links";
    gap: 7px 10px;
  }

  .setup-session-page .setup-nav .landing-brand {
    grid-area: brand;
  }

  .setup-session-page .setup-nav .landing-nav-links {
    grid-area: links;
    justify-self: stretch;
    justify-content: space-between;
  }

  .setup-session-page .setup-nav .landing-nav-links a,
  .setup-session-page .setup-nav .landing-nav-links span {
    flex: 1 1 0;
    justify-content: center;
    padding: 0 8px;
  }

  .setup-session-page .setup-nav .landing-nav-actions {
    grid-area: actions;
  }

  .setup-nav-code {
    display: none;
  }

  .setup-session-page .setup-builder-panel .form-grid,
  .setup-session-page .setup-builder-panel .mode-options,
  .setup-session-page .setup-builder-panel .team-options,
  .setup-session-page .setup-builder-panel .head-options {
    grid-template-columns: 1fr;
  }

  .setup-builder-header {
    grid-template-columns: 1fr;
  }
}

.session-page.setup-session-page .app-shell.setup-shell {
  width: min(1360px, calc(100% - 32px));
}

@media (min-width: 700px) and (max-width: 980px) {
  .session-page.setup-session-page .app-shell.setup-shell {
    width: min(920px, calc(100% - 24px));
  }

  .setup-session-page .setup-landing-flow {
    grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  .setup-session-page .setup-landing-hero {
    align-content: start;
  }

  .setup-session-page .setup-landing-hero h1 {
    font-size: clamp(2.15rem, 5vw, 3.35rem);
  }

  .setup-session-page .setup-landing-hero .hero-copy {
    font-size: 0.95rem;
    line-height: 1.48;
  }

  .setup-session-page .setup-game-cover {
    min-height: 180px;
    padding: 16px;
  }

  .setup-session-page .setup-builder-panel .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .setup-session-page .setup-builder-panel .setup-player-fields {
    grid-template-columns: minmax(0, 0.45fr) minmax(0, 1fr);
    column-gap: 16px;
  }

  .setup-session-page .setup-builder-panel .setup-player-fields .setup-section-header,
  .setup-session-page .setup-builder-panel .setup-player-fields .team-picker {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .session-page.setup-session-page .app-shell.setup-shell {
    width: min(100% - 24px, 760px);
  }
}

@media (max-width: 699px) {
  .setup-session-page .setup-landing-flow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .session-page.setup-session-page .app-shell.setup-shell {
    width: min(100% - 20px, 460px);
  }
}

/* Guided host setup */
.session-page.setup-session-page .app-shell.setup-shell {
  width: min(1180px, calc(100% - 32px));
  gap: clamp(22px, 3vw, 34px);
  padding-top: clamp(16px, 2.2vw, 24px);
  padding-bottom: clamp(54px, 7vw, 82px);
}

.setup-guide-flow {
  display: grid;
  gap: clamp(20px, 3vw, 30px);
}

.setup-guide-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 230px);
  gap: clamp(18px, 3vw, 34px);
  align-items: end;
}

.setup-guide-title {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
}

.setup-guide-title .eyebrow {
  margin: 0;
}

.setup-guide-title h1,
.setup-guide-title .hero-copy {
  grid-column: 1 / -1;
}

.setup-guide-title h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  font-weight: 700;
  line-height: 0.98;
}

.setup-guide-title .hero-copy {
  max-width: 640px;
  margin: 0;
  color: #bfc0ca;
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  line-height: 1.5;
}

.setup-guide-title .sidebar-game-icon {
  width: 44px;
  height: 44px;
}

.setup-guide-code,
.setup-guide-aside,
.setup-guide-form {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(24, 25, 29, 0.94);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.setup-guide-code {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.setup-guide-code span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.setup-guide-code strong {
  color: var(--green);
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 760;
  line-height: 0.9;
}

.setup-guide-code p,
.setup-guide-aside p,
.setup-form-header p,
.setup-section-header p,
.setup-step-submit p {
  margin: 0;
  color: #bfc0ca;
  font-size: 0.94rem;
  line-height: 1.45;
}

.setup-guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.28fr);
  gap: clamp(18px, 2.6vw, 28px);
  align-items: start;
}

.setup-guide-form {
  display: grid;
  gap: 0;
  padding: clamp(18px, 2.4vw, 26px);
}

.setup-form-header {
  display: grid;
  gap: 6px;
  padding-bottom: clamp(16px, 2vw, 22px);
}

.setup-form-header h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.05;
}

.setup-session-page .setup-guide-form .setup-section {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  padding: clamp(18px, 2.2vw, 24px) 0;
  background: transparent;
  box-shadow: none;
}

.setup-session-page .setup-guide-form .setup-section:last-of-type {
  padding-bottom: clamp(18px, 2.2vw, 24px);
}

.setup-step-marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #101113;
  background: var(--green);
  font-size: 0.9rem;
  font-weight: 820;
  line-height: 1;
}

.setup-step-body {
  min-width: 0;
  display: grid;
  gap: clamp(14px, 2vw, 18px);
}

.setup-session-page .setup-guide-form .setup-section-header {
  display: grid;
  gap: 5px;
}

.setup-session-page .setup-guide-form .setup-section-header h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 680;
  line-height: 1.1;
}

.setup-session-page .setup-guide-form .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.setup-session-page .setup-guide-form .mode-picker,
.setup-session-page .setup-guide-form .head-picker,
.setup-session-page .setup-guide-form .team-picker {
  grid-column: 1 / -1;
}

.setup-session-page .setup-guide-form .mode-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setup-session-page .setup-guide-form .team-options,
.setup-session-page .setup-guide-form .head-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.setup-session-page .setup-guide-form .head-option {
  min-height: 86px;
}

.setup-step-submit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 16px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: clamp(18px, 2.2vw, 24px);
}

.setup-step-submit div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.setup-step-submit span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
}

.setup-step-submit strong {
  color: var(--text);
  font-size: clamp(1.12rem, 1.8vw, 1.45rem);
  font-weight: 700;
  line-height: 1.12;
}

.setup-step-submit .primary-button {
  width: 100%;
}

.setup-guide-aside {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.setup-guide-aside h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.08;
}

.setup-next-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-next-list li {
  min-height: 38px;
  display: grid;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
  color: #d9dbe0;
  font-size: 0.93rem;
  font-weight: 660;
}

@media (max-width: 960px) {
  .setup-guide-layout {
    grid-template-columns: 1fr;
  }

  .setup-guide-aside {
    position: static;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.48fr);
    align-items: start;
  }
}

@media (max-width: 760px) {
  .setup-guide-header,
  .setup-guide-aside,
  .setup-step-submit {
    grid-template-columns: 1fr;
  }

  .setup-session-page .setup-guide-form .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .setup-guide-title h1 {
    font-size: clamp(2.25rem, 10vw, 3.6rem);
  }
}

@media (max-width: 520px) {
  .setup-session-page .setup-guide-form .setup-section {
    grid-template-columns: 1fr;
  }

  .setup-step-marker {
    width: 30px;
    height: 30px;
  }

  .setup-session-page .setup-guide-form .form-grid,
  .setup-session-page .setup-guide-form .mode-options,
  .setup-session-page .setup-guide-form .team-options,
  .setup-session-page .setup-guide-form .head-options,
  .room-setup .head-options,
  .room-setup .team-options,
  .room-setup .mode-options {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 641px) and (max-width: 760px) {
  .setup-guide-header {
    grid-template-columns: minmax(0, 1fr) minmax(176px, 200px);
    gap: 18px;
  }

  .setup-guide-title h1 {
    font-size: clamp(2.15rem, 7vw, 3.25rem);
  }

  .setup-guide-code {
    padding: 14px;
  }

  .setup-guide-code strong {
    font-size: clamp(2.35rem, 6vw, 3.6rem);
  }

  .setup-session-page .setup-guide-form .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .setup-session-page .setup-guide-form .setup-player-fields .setup-step-body {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
    column-gap: 14px;
  }

  .setup-session-page .setup-guide-form .setup-player-fields .head-picker {
    grid-column: auto;
  }

  .setup-session-page .setup-guide-form .setup-player-fields .setup-section-header,
  .setup-session-page .setup-guide-form .setup-player-fields .team-picker {
    grid-column: 1 / -1;
  }

  .setup-step-submit {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  }

  .setup-guide-aside {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.52fr);
  }
}

/* Host setup reset: task-first, landing-width */
.session-page.setup-session-page .app-shell.setup-shell {
  width: min(1360px, calc(100% - 32px));
  display: grid;
  gap: clamp(26px, 3.2vw, 40px);
  padding-top: clamp(18px, 2.4vw, 28px);
  padding-bottom: clamp(56px, 7vw, 86px);
}

.host-setup-topbar {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  padding: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    rgba(18, 18, 20, 0.9);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
}

.host-setup-brand,
.host-setup-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.host-setup-brand {
  color: var(--text);
  font-weight: 760;
  text-decoration: none;
}

.host-setup-room-chip {
  justify-self: center;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.055);
}

.host-setup-room-chip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.host-setup-room-chip strong {
  color: var(--green);
  font-size: 1.15rem;
  font-weight: 780;
  letter-spacing: 0;
}

.host-setup-actions {
  justify-content: end;
}

.host-setup-actions .secondary-button,
.host-setup-actions .session-close-button {
  width: auto;
  min-height: 36px;
  border-radius: 999px;
  padding: 0 13px;
}

.host-setup-flow {
  display: grid;
  gap: clamp(16px, 2.4vw, 24px);
}

.host-setup-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.host-setup-header .sidebar-game-icon {
  width: 44px;
  height: 44px;
}

.host-setup-header h1 {
  margin: 2px 0 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
}

.host-setup-header p:not(.eyebrow) {
  max-width: 39rem;
  margin: 8px 0 0;
  color: #bfc0ca;
  font-size: 0.98rem;
  line-height: 1.45;
}

.host-setup-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 22px);
  align-items: start;
}

.host-setup-rail,
.host-setup-form,
.host-setup-card,
.host-setup-submit {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(24, 25, 29, 0.94);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
}

.host-setup-rail {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.host-setup-rail ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.host-setup-rail li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.host-setup-rail li:first-child {
  border-top: 0;
  padding-top: 0;
}

.host-setup-rail li > span,
.host-setup-card-header > span {
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #101113;
  background: var(--green);
  font-weight: 820;
  line-height: 1;
}

.host-setup-rail li > span {
  width: 26px;
  height: 26px;
  font-size: 0.78rem;
}

.host-setup-rail strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.16;
}

.host-setup-rail p {
  margin: 4px 0 0;
  color: #bfc0ca;
  font-size: 0.78rem;
  line-height: 1.34;
}

.host-setup-form {
  display: grid;
  gap: 12px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.host-setup-card,
.host-setup-submit {
  padding: clamp(14px, 2vw, 18px);
}

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

.host-setup-card-header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.host-setup-card-header > span {
  width: 32px;
  height: 32px;
  font-size: 0.86rem;
}

.host-setup-card-header h2 {
  margin: 1px 0 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 680;
  line-height: 1.1;
}

.host-setup-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.host-setup-fields .mode-picker,
.host-setup-fields .head-picker,
.host-setup-fields .team-picker {
  grid-column: 1 / -1;
}

.host-setup-fields .mode-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.host-setup-fields .team-options,
.host-setup-fields .head-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.host-setup-fields .head-option {
  min-height: 68px;
  gap: 4px;
  padding: 7px 6px;
}

.host-setup-fields .avatar-head {
  width: 30px;
  height: 30px;
}

.host-setup-fields .head-option-name {
  font-size: 0.7rem;
}

.host-player-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.host-player-fields > .form-field {
  grid-column: 1 / -1;
}

.host-player-fields .head-picker {
  grid-column: 1 / -1;
}

.host-player-fields .team-picker {
  grid-column: 1 / -1;
}

.host-setup-submit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
  gap: 14px;
  align-items: center;
  border-color: rgba(61, 226, 143, 0.24);
}

.host-setup-submit strong {
  display: block;
  color: var(--text);
  font-size: clamp(1.12rem, 1.8vw, 1.42rem);
  line-height: 1.12;
}

.host-setup-submit p {
  margin: 5px 0 0;
  color: #bfc0ca;
  font-size: 0.9rem;
  line-height: 1.38;
}

.host-setup-submit .primary-button {
  width: 100%;
}

@media (min-width: 700px) and (max-width: 920px) {
  .host-setup-workspace {
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 14px;
  }

  .host-setup-card,
  .host-setup-submit {
    padding: 14px;
  }
}

@media (max-width: 699px) {
  .host-setup-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .host-setup-room-chip {
    justify-self: end;
  }

  .host-setup-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .host-setup-actions .secondary-button,
  .host-setup-actions .session-close-form,
  .host-setup-actions .session-close-button {
    width: 100%;
  }

  .host-setup-workspace,
  .host-setup-submit {
    grid-template-columns: 1fr;
  }

  .host-setup-rail {
    position: static;
  }

  .host-setup-rail ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .host-setup-header {
    grid-template-columns: 1fr;
  }

  .host-setup-fields,
  .host-player-fields,
  .host-setup-fields .mode-options,
  .host-setup-fields .team-options,
  .host-setup-fields .head-options,
  .host-setup-rail ol {
    grid-template-columns: 1fr;
  }

  .host-player-fields > .form-field,
  .host-player-fields .head-picker,
  .host-player-fields .team-picker {
    grid-column: 1;
  }
}

/* Host lobby alignment with landing shell */
.session-page.host-page:not(.live-session-page) .host-shell {
  width: min(1360px, calc(100% - 32px));
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby {
  grid-template-columns: minmax(0, 1fr) minmax(248px, 0.34fr);
  gap: clamp(18px, 2.4vw, 28px);
}

@media (min-width: 700px) and (max-width: 1040px) {
  .session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby {
    grid-template-columns: minmax(0, 1fr) minmax(248px, 0.36fr);
  }

  .session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-panel {
    position: sticky;
    top: 16px;
  }
}

@media (max-width: 699px) {
  .session-page.host-page:not(.live-session-page) .host-shell {
    width: min(100% - 20px, 460px);
  }

  .session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby {
    grid-template-columns: 1fr;
  }
}

/* Lobby pages in the current landing/setup style */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.session-page.host-page .lobby-shell {
  width: min(1360px, calc(100% - 32px));
  display: grid;
  gap: clamp(26px, 3.2vw, 40px);
  padding-top: clamp(18px, 2.4vw, 28px);
  padding-bottom: clamp(56px, 7vw, 86px);
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.32fr);
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-stage,
.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(24, 25, 29, 0.94);
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-stage {
  gap: clamp(18px, 2.2vw, 26px);
  padding: clamp(18px, 2.2vw, 24px);
}

.match-lobby-title {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.match-lobby-title .sidebar-game-icon {
  width: 44px;
  height: 44px;
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-hero h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-hero .muted {
  margin-top: 8px;
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-code {
  min-width: 176px;
  padding: 12px 14px;
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-code .room-code {
  font-size: clamp(2.6rem, 5vw, 4.4rem);
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 2vw, 24px);
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-panel {
  gap: 14px;
  padding: clamp(16px, 2vw, 20px);
}

.match-lobby-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.match-lobby-panel-head h2 {
  margin: 2px 0 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 680;
  line-height: 1.1;
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-count {
  min-height: 0;
  min-width: 74px;
  justify-items: center;
  padding: 10px;
  text-align: center;
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-count span {
  font-size: clamp(2rem, 4vw, 3rem);
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-count p {
  margin-top: 3px;
  font-size: 0.8rem;
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-actions {
  gap: 8px;
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-panel .join-qr-card {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-panel .join-qr-code {
  width: min(154px, 100%);
  max-width: 154px;
  justify-self: center;
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-panel .join-qr-copy {
  width: 100%;
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-ai-control {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-ai-control .volleyball-ai-form {
  grid-template-columns: 1fr;
}

.geo-lobby-grid {
  grid-template-columns: minmax(0, 1fr);
}

.geo-lobby-preview {
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(255, 200, 87, 0.16), transparent 34%),
    linear-gradient(35deg, rgba(77, 215, 255, 0.13), transparent 52%),
    #14212c;
  position: relative;
}

.geo-lobby-preview .geo-photo-stack {
  position: absolute;
  inset: 18px 18px 72px;
}

.geo-lobby-preview .geo-photo-card-one {
  width: min(72%, 320px);
  height: 170px;
}

.geo-lobby-preview .geo-photo-card-two {
  width: min(68%, 300px);
  height: 160px;
}

.geo-lobby-preview .geo-photo-pin {
  left: min(68%, 360px);
}

.geo-lobby-preview .geo-wait-roster {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
}

.geo-lobby-preview .geo-wait-player {
  position: static;
}

@media (min-width: 700px) and (max-width: 1040px) {
  .session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby {
    grid-template-columns: minmax(0, 1fr) minmax(248px, 0.36fr);
  }

  .session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-grid,
  .geo-lobby-grid {
    grid-template-columns: 1fr;
  }

  .session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-teams {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  .session-page.host-page .lobby-shell {
    width: min(100% - 20px, 460px);
  }

  .session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-hero,
  .match-lobby-panel-head,
  .session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-grid,
  .geo-lobby-grid {
    grid-template-columns: 1fr;
  }

  .session-page.host-page:not(.setup-session-page):not(.live-session-page) .match-lobby-code {
    width: 100%;
  }
}

/* Mini Soccer arcade polish */
.mini-controller:not(.volleyball-controller) {
  isolation: isolate;
}

.mini-controller:not(.volleyball-controller) .controller-pitch,
.live-match[data-controller~="mini-soccer-host"] .live-field-wrap {
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 93, 108, 0.28), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(77, 215, 255, 0.24), transparent 30%),
    linear-gradient(180deg, #172331 0%, #0a1416 64%, #071013 100%);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.mini-controller:not(.volleyball-controller) .controller-pitch::before,
.live-match[data-controller~="mini-soccer-host"] .live-field-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 93, 108, 0.14), transparent 28%, transparent 72%, rgba(77, 215, 255, 0.13)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 38px);
  opacity: 0.42;
  pointer-events: none;
}

.mini-controller:not(.volleyball-controller) .controller-hud,
.mini-controller:not(.volleyball-controller) .controller-field-shell,
.live-match[data-controller~="mini-soccer-host"] .live-field,
.live-match[data-controller~="mini-soccer-host"] .live-overlay {
  position: relative;
  z-index: 1;
}

.mini-controller:not(.volleyball-controller) .controller-field-shell,
.live-match[data-controller~="mini-soccer-host"] .live-field {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: #071411;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.mini-controller:not(.volleyball-controller) .controller-field {
  border-radius: 6px;
}

.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-pitch {
  height: auto;
  row-gap: clamp(22px, 3.4vw, 34px);
  column-gap: clamp(12px, 2.2vw, 18px);
  padding: clamp(10px, 1.8vw, 16px);
}

.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-pitch::before {
  display: none;
}

.session-page.play-page .player-shell.is-live-player {
  width: min(1180px, calc(100% - 10px));
}

.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) {
  height: auto;
  align-self: start;
}

.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-hud {
  gap: clamp(10px, 1.6vw, 16px);
}

.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-player,
.mini-controller:not(.volleyball-controller) .controller-score,
.mini-controller:not(.volleyball-controller) .controller-status {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(5, 9, 13, 0.72);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-player {
  padding: 8px 10px;
}

.mini-controller:not(.volleyball-controller) .controller-score {
  color: #fffaf0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.34);
}

.mini-controller:not(.volleyball-controller) .controller-status {
  bottom: 14px;
  max-width: min(78%, 430px);
  border-radius: 999px;
  color: rgba(255, 250, 232, 0.92);
  font-size: clamp(0.76rem, 2vw, 0.88rem);
}

.mini-controller:not(.volleyball-controller) .controller-player .avatar-head-large {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.12),
    0 10px 20px rgba(0, 0, 0, 0.24);
}

/* Live player view: HUD should float around the game, not create nested panels. */
.session-page.play-page .player-shell.is-live-player {
  --live-play-inset: clamp(4px, 0.8vw, 10px);
  --live-hud-gap: clamp(16px, 2.4vw, 26px);
  width: 100%;
  padding: var(--live-play-inset);
}

.play-page .player-shell.is-live-player .mini-controller {
  width: 100%;
  height: auto;
  align-self: start;
  gap: 0;
}

.play-page .player-shell.is-live-player .controller-pitch,
.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-pitch {
  height: auto;
  min-height: 0;
  grid-template-rows: auto minmax(0, auto);
  row-gap: var(--live-hud-gap);
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-pitch::before {
  display: none;
}

.play-page .player-shell.is-live-player .controller-hud {
  width: min(100%, 1120px);
  justify-self: center;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 18px);
  padding: 0 max(2px, env(safe-area-inset-right)) 0 max(2px, env(safe-area-inset-left));
}

.play-page .player-shell.is-live-player .controller-player,
.play-page .player-shell.is-live-player .volleyball-controller .volleyball-controller-player,
.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-player {
  min-width: 0;
  width: auto;
  max-width: min(68vw, 520px);
  justify-self: start;
  border: 0;
  border-left: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.play-page .player-shell.is-live-player .controller-player {
  gap: clamp(9px, 1.7vw, 14px);
}

.play-page .player-shell.is-live-player .controller-player > div {
  min-width: 0;
}

.play-page .player-shell.is-live-player .controller-player .avatar-head-large {
  width: clamp(40px, 6.8vw, 54px);
  height: clamp(40px, 6.8vw, 54px);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.22);
}

.play-page .player-shell.is-live-player .controller-player .eyebrow {
  margin-bottom: 2px;
  color: rgba(255, 250, 232, 0.58);
  font-size: clamp(0.6rem, 1.7vw, 0.72rem);
}

.play-page .player-shell.is-live-player .controller-player h2 {
  font-size: clamp(1.08rem, 3.3vw, 1.7rem);
  letter-spacing: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.34);
}

.play-page .player-shell.is-live-player .controller-score,
.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-score {
  max-width: min(42vw, 260px);
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: #fffaf0;
  background: rgba(5, 9, 13, 0.58);
  box-shadow: none;
  backdrop-filter: blur(10px);
  font-size: clamp(0.78rem, 2.2vw, 0.98rem);
}

.play-page .player-shell.is-live-player .controller-field-shell,
.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-field-shell {
  width: min(100%, calc((100dvh - 92px) * 1000 / 560));
  max-height: calc(100dvh - 92px);
  overflow: hidden;
  border: 0;
  border-radius: clamp(6px, 1.2vw, 10px);
  background: transparent;
  box-shadow: none;
}

.play-page .player-shell.is-live-player .controller-field {
  width: 100%;
  border-radius: inherit;
}

.play-page .player-shell.is-live-player .controller-player-red,
.play-page .player-shell.is-live-player .volleyball-controller-player-red,
.play-page .player-shell.is-live-player .controller-score-red {
  --hud-team: #ff4f73;
  --hud-team-soft: rgba(255, 79, 115, 0.18);
}

.play-page .player-shell.is-live-player .controller-player-blue,
.play-page .player-shell.is-live-player .volleyball-controller-player-blue,
.play-page .player-shell.is-live-player .controller-score-blue {
  --hud-team: #56d8ff;
  --hud-team-soft: rgba(86, 216, 255, 0.18);
}

.play-page .player-shell.is-live-player .controller-hud {
  --hud-team: #ffc857;
  --hud-team-soft: rgba(255, 200, 87, 0.16);
  grid-template-columns: minmax(0, max-content) max-content;
  justify-content: space-between;
  align-items: start;
}

.play-page .player-shell.is-live-player .controller-player,
.play-page .player-shell.is-live-player .volleyball-controller .volleyball-controller-player,
.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-player {
  min-height: clamp(42px, 7vw, 56px);
  max-width: min(58vw, 440px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  background:
    linear-gradient(90deg, var(--hud-team-soft), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(7, 10, 14, 0.62);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
  position: relative;
}

.play-page .player-shell.is-live-player .volleyball-controller .volleyball-controller-player {
  padding-left: 18px;
}

.play-page .player-shell.is-live-player .controller-player::before {
  content: "";
  width: 4px;
  height: 26px;
  border-radius: 999px;
  background: var(--hud-team);
  box-shadow: 0 0 14px var(--hud-team);
  flex: 0 0 auto;
}

.play-page .player-shell.is-live-player .controller-player .avatar-head-large {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 0 0 2px var(--hud-team-soft),
    0 8px 18px rgba(0, 0, 0, 0.22);
}

.play-page .player-shell.is-live-player .controller-player .eyebrow {
  color: rgba(255, 250, 232, 0.62);
  font-size: clamp(0.58rem, 1.55vw, 0.7rem);
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.play-page .player-shell.is-live-player .controller-player h2 {
  max-width: 100%;
  color: #fffaf0;
  font-size: clamp(1.02rem, 3vw, 1.55rem);
  font-weight: 950;
  line-height: 1.02;
}

.play-page .player-shell.is-live-player .controller-score,
.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: clamp(36px, 6vw, 46px);
  max-width: min(38vw, 260px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 14px;
  background:
    linear-gradient(90deg, transparent, var(--hud-team-soft)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(7, 10, 14, 0.66);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.23),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
  color: #fffaf0;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  line-height: 1;
}

.play-page .player-shell.is-live-player .controller-score::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--hud-team);
  box-shadow: 0 0 12px var(--hud-team);
  flex: 0 0 auto;
}

@media (max-width: 520px) {
  .play-page .player-shell.is-live-player .controller-hud {
    gap: 8px;
  }

  .play-page .player-shell.is-live-player .controller-player,
  .play-page .player-shell.is-live-player .volleyball-controller .volleyball-controller-player,
  .play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-player {
    max-width: 58vw;
    padding-right: 10px;
  }

  .play-page .player-shell.is-live-player .controller-score,
  .play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-score {
    max-width: 36vw;
    padding-inline: 11px;
  }
}

/* Broadcast-style live HUD: minimal identity, centered score, no chunky capsules. */
.session-page.play-page .player-shell.is-live-player {
  --live-hud-gap: 0px;
}

.play-page .player-shell.is-live-player .controller-hud {
  grid-template-columns: minmax(0, 1fr) minmax(150px, max-content) minmax(0, 1fr);
  justify-content: stretch;
  align-items: start;
  gap: clamp(10px, 1.8vw, 18px);
}

.play-page .player-shell.is-live-player .controller-player,
.play-page .player-shell.is-live-player .volleyball-controller .volleyball-controller-player,
.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-player {
  min-height: 0;
  max-width: min(34vw, 300px);
  border: 0;
  border-left: 0;
  border-radius: 0;
  padding: 2px 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.play-page .player-shell.is-live-player .controller-player::before {
  width: 3px;
  height: clamp(28px, 4.8vw, 38px);
  margin-right: 2px;
  box-shadow: 0 0 10px var(--hud-team);
}

.play-page .player-shell.is-live-player .controller-player .avatar-head-large {
  width: clamp(34px, 5.8vw, 44px);
  height: clamp(34px, 5.8vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.play-page .player-shell.is-live-player .controller-player .eyebrow {
  margin-bottom: 3px;
  color: rgba(255, 250, 232, 0.56);
  font-size: clamp(0.56rem, 1.45vw, 0.68rem);
  font-weight: 800;
}

.play-page .player-shell.is-live-player .controller-player h2 {
  color: rgba(255, 250, 232, 0.96);
  font-size: clamp(0.98rem, 2.7vw, 1.4rem);
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.play-page .player-shell.is-live-player .controller-score,
.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-score {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  min-width: clamp(150px, 28vw, 260px);
  min-height: clamp(34px, 5.4vw, 42px);
  max-width: min(46vw, 320px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  padding: 9px 18px 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(4, 7, 10, 0.72);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: rgba(255, 250, 232, 0.96);
  font-size: clamp(0.78rem, 2vw, 0.96rem);
  letter-spacing: 0;
  position: relative;
}

.play-page .player-shell.is-live-player .controller-score::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 8px;
  right: 8px;
  width: auto;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #ff4f73, #ffc857 50%, #56d8ff);
  box-shadow: none;
}

.play-page .player-shell.is-live-player .controller-score::after {
  content: "";
  width: 0;
  height: 0;
}

@media (max-width: 520px) {
  .play-page .player-shell.is-live-player .controller-hud {
    grid-template-columns: minmax(0, 0.74fr) minmax(136px, 1fr) minmax(0, 0.34fr);
  }

  .play-page .player-shell.is-live-player .controller-player,
  .play-page .player-shell.is-live-player .volleyball-controller .volleyball-controller-player,
  .play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-player {
    max-width: 32vw;
  }

  .play-page .player-shell.is-live-player .controller-score,
  .play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-score {
    min-width: 136px;
    max-width: 48vw;
    padding-inline: 12px;
  }
}

/* Structured live HUD container: left identity, centered score, right status. */
.play-page .player-shell.is-live-player .controller-hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, max-content) minmax(0, 1fr);
  grid-template-areas: "identity score status";
  align-items: center;
  width: min(100%, 1120px);
  min-height: clamp(40px, 6vw, 52px);
  padding: clamp(4px, 0.7vw, 8px) clamp(8px, 1.4vw, 14px);
}

.play-page .player-shell.is-live-player .controller-player {
  grid-area: identity;
  justify-self: start;
}

.play-page .player-shell.is-live-player .controller-score {
  grid-area: score;
  justify-self: center;
}

.play-page .player-shell.is-live-player .controller-status,
.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-status {
  grid-area: status;
  justify-self: end;
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: clamp(30px, 4.8vw, 38px);
  max-width: min(28vw, 240px);
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: rgba(255, 250, 232, 0.58);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  font-size: clamp(0.66rem, 1.7vw, 0.82rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  transform: none;
}

.play-page .player-shell.is-live-player .controller-status::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 999px;
  background: #d6ef72;
  box-shadow: 0 0 10px rgba(214, 239, 114, 0.5);
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .play-page .player-shell.is-live-player .controller-hud {
    grid-template-columns: minmax(0, 0.92fr) minmax(136px, auto) minmax(0, 0.72fr);
  }

  .play-page .player-shell.is-live-player .controller-status,
  .play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-status {
    max-width: min(23vw, 170px);
  }
}

@media (max-width: 460px) {
  .play-page .player-shell.is-live-player .controller-hud {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "identity score";
  }

  .play-page .player-shell.is-live-player .controller-status,
  .play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-status {
    display: none;
  }
}

/* Transparent HUD: layout only, no component backgrounds. */
.play-page .player-shell.is-live-player .controller-score,
.play-page .player-shell.is-live-player .mini-controller:not(.volleyball-controller) .controller-score {
  min-height: auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
}

.play-page .player-shell.is-live-player .controller-score::before,
.play-page .player-shell.is-live-player .controller-score::after {
  display: none;
}

.cup-organizer {
  display: grid;
  gap: clamp(18px, 2.4vw, 26px);
  width: 100%;
  margin-top: clamp(24px, 3vw, 34px);
  padding: clamp(18px, 2.6vw, 26px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 200, 87, 0.1), transparent 34%),
    rgba(6, 9, 13, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cup-organizer-header {
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.cup-organizer-header h3 {
  margin: 0;
  color: #fffaf0;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  line-height: 1.05;
}

.cup-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 6px;
}

.cup-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(82, 255, 168, 0.34);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(82, 255, 168, 0.1);
  color: #a9ffd0;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.cup-organizer-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: clamp(12px, 2vw, 16px);
  background: rgba(255, 255, 255, 0.035);
}

.cup-control-group {
  display: grid;
  align-content: start;
  gap: 9px;
}

.cup-control-label {
  color: rgba(255, 250, 232, 0.58);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.cup-organizer-form {
  display: grid;
  grid-template-columns: minmax(132px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

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

.cup-button-group .cup-organizer-form,
.cup-button-group .button_to {
  flex: 1 1 132px;
}

.cup-button-group .cup-organizer-form {
  display: block;
}

.cup-button-group input[type="submit"],
.cup-button-group button {
  width: 100%;
}

.cup-team-count {
  width: 100%;
  min-width: 118px;
}

.cup-save-form {
  display: grid;
  gap: clamp(16px, 2.2vw, 22px);
}

.cup-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: clamp(12px, 2vw, 16px);
}

.cup-team {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 190px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.cup-team.is-over {
  border-color: rgba(255, 200, 87, 0.68);
  background: rgba(255, 200, 87, 0.09);
  transform: translateY(-1px);
}

.cup-team-pool {
  background: rgba(86, 216, 255, 0.06);
}

.cup-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cup-team-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cup-team-head h4,
.cup-team-name {
  margin: 0;
  color: #fffaf0;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.1;
}

.cup-team-name {
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  padding: 0 0 5px;
  background: transparent;
  outline: none;
}

.cup-team-name:focus {
  border-color: #ffc857;
}

.cup-team-name-button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  padding: 5px 9px;
  color: rgba(255, 250, 232, 0.82);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}

.cup-team-name-button:hover {
  border-color: rgba(201, 244, 93, 0.36);
  color: #fffaf0;
}

.cup-team-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 250, 232, 0.1);
  color: rgba(255, 250, 232, 0.82);
  font-size: 0.78rem;
  font-weight: 900;
  flex: 0 0 auto;
}

.cup-team-members {
  display: grid;
  gap: 8px;
  min-height: 118px;
}

.cup-player {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(4, 7, 10, 0.56);
  cursor: grab;
  user-select: none;
}

.cup-player:active {
  cursor: grabbing;
}

.cup-player.is-dragging {
  opacity: 0.48;
}

.cup-player .avatar-head {
  width: 34px;
  height: 34px;
}

.cup-player strong {
  display: block;
  overflow: hidden;
  color: #fffaf0;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cup-player p {
  margin: 3px 0 0;
  color: rgba(255, 250, 232, 0.54);
  font-size: 0.7rem;
  font-weight: 760;
  line-height: 1;
}

.cup-player.is-ai {
  background:
    linear-gradient(90deg, rgba(86, 216, 255, 0.12), transparent),
    rgba(4, 7, 10, 0.56);
}

.cup-empty,
.cup-empty-state {
  margin: 0;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 14px;
  color: rgba(255, 250, 232, 0.58);
  font-size: 0.82rem;
  font-weight: 780;
  text-align: center;
}

.cup-empty-state {
  display: grid;
  gap: 4px;
  min-height: 96px;
  place-content: center;
}

.cup-empty-state strong {
  color: #fffaf0;
  font-size: 1rem;
}

.cup-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: clamp(14px, 2vw, 18px);
}

.cup-save-row .primary-button {
  min-width: 132px;
}

@media (max-width: 720px) {
  .cup-organizer-header,
  .cup-save-row {
    display: grid;
  }

  .cup-organizer-actions,
  .cup-organizer-form,
  .cup-button-group {
    justify-content: stretch;
  }

  .cup-organizer-actions form,
  .cup-organizer-actions .button_to,
  .cup-organizer-actions .button_to button,
  .cup-organizer-actions input[type="submit"],
  .cup-save-row input[type="submit"] {
    width: 100%;
  }
}

.cup-overview {
  display: grid;
  gap: clamp(22px, 3vw, 34px);
  width: min(100%, 1180px);
  margin: 0 auto;
}

.cup-overview-hero,
.cup-overview-layout,
.cup-overview-grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 24px);
}

.cup-overview-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding: clamp(16px, 2.6vw, 24px) 0 0;
}

.cup-overview-title {
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.cup-overview-title h2 {
  margin: 0;
  color: #fffaf0;
  font-size: clamp(2rem, 4.4vw, 4rem);
  font-weight: 760;
  line-height: 0.96;
}

.cup-overview-progress {
  display: grid;
  place-items: center;
  min-width: 112px;
  min-height: 92px;
  border: 1px solid rgba(201, 244, 93, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(201, 244, 93, 0.1), rgba(201, 244, 93, 0.025)),
    rgba(255, 255, 255, 0.045);
}

.cup-overview-progress span {
  color: var(--green);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.cup-overview-progress p,
.cup-wait-note {
  margin: 0;
}

.cup-intermission {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto) minmax(180px, 240px);
  align-items: center;
  gap: clamp(18px, 3vw, 30px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 42px);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(255, 79, 115, 0.28), transparent 42%),
    linear-gradient(315deg, rgba(86, 216, 255, 0.24), transparent 42%),
    rgba(13, 15, 20, 0.92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.cup-intermission::before {
  content: "";
  position: absolute;
  inset: -24%;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 250, 240, 0.2) 0 9deg, transparent 9deg 18deg);
  opacity: 0.13;
  pointer-events: none;
}

.cup-intermission-red {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(255, 79, 115, 0.34), transparent 48%),
    linear-gradient(315deg, rgba(255, 200, 87, 0.18), transparent 42%),
    rgba(13, 15, 20, 0.92);
}

.cup-intermission-blue {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(86, 216, 255, 0.34), transparent 48%),
    linear-gradient(315deg, rgba(145, 71, 255, 0.22), transparent 42%),
    rgba(13, 15, 20, 0.92);
}

.cup-intermission-copy,
.cup-intermission-score,
.cup-intermission-action {
  position: relative;
  z-index: 1;
}

.cup-intermission-copy {
  display: grid;
  gap: 8px;
}

.cup-pam-pam {
  color: #fffaf0;
  font-size: clamp(4.2rem, 11vw, 9rem);
  font-weight: 950;
  line-height: 0.82;
  text-shadow:
    0 8px 0 rgba(0, 0, 0, 0.18),
    0 0 34px rgba(255, 255, 255, 0.22);
}

.cup-intermission h3 {
  margin: 0;
  color: var(--green);
  font-size: clamp(1.6rem, 4vw, 3.4rem);
  font-weight: 930;
  line-height: 1;
}

.cup-intermission-score {
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.2);
}

.cup-intermission-score span {
  max-width: 190px;
  overflow: hidden;
  color: rgba(255, 250, 240, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cup-intermission-score strong {
  color: #fffaf0;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  font-weight: 950;
  line-height: 1;
}

.cup-overview-layout {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  align-items: stretch;
}

.cup-overview-layout:has(.cup-player-card) {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
}

.cup-active-card,
.cup-player-card,
.cup-schedule,
.cup-team-overview,
.cup-live-follow-bar {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    rgba(14, 16, 20, 0.82);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.24);
}

.cup-active-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(16px, 2.4vw, 24px);
  padding: clamp(18px, 2.8vw, 28px);
  background:
    linear-gradient(135deg, rgba(145, 71, 255, 0.15), transparent 42%),
    linear-gradient(315deg, rgba(25, 211, 255, 0.11), transparent 38%),
    rgba(14, 16, 20, 0.86);
}

.cup-active-card h3,
.cup-player-card h3,
.cup-section-heading h3,
.cup-team-card h4 {
  margin: 0;
  color: #fffaf0;
  font-weight: 900;
  line-height: 1.06;
}

.cup-active-card h3 {
  max-width: 760px;
  font-size: clamp(1.55rem, 3.6vw, 3rem);
}

.cup-active-score {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 12px;
  margin: 14px 0 12px;
  color: #fffaf0;
}

.cup-active-score span {
  min-width: 58px;
  color: var(--green);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.cup-active-score strong {
  color: rgba(255, 250, 240, 0.48);
  font-size: 1.2rem;
}

.cup-overview-actions {
  display: grid;
  justify-items: stretch;
  gap: 10px;
  min-width: min(240px, 100%);
}

.cup-player-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: clamp(16px, 2.4vw, 22px);
}

.cup-player-card h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
}

.cup-overview-grid {
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1fr);
  align-items: start;
}

.cup-schedule,
.cup-team-overview {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 2.4vw, 22px);
}

.cup-section-heading {
  display: grid;
  gap: 4px;
}

.cup-section-heading h3 {
  font-size: clamp(1.18rem, 2.2vw, 1.65rem);
}

.cup-match-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cup-match {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.045);
}

.cup-match.is-current {
  border-color: rgba(201, 244, 93, 0.34);
  background:
    linear-gradient(90deg, rgba(201, 244, 93, 0.11), transparent 44%),
    rgba(255, 255, 255, 0.055);
}

.cup-match strong {
  min-width: 0;
  overflow: hidden;
  color: #fffaf0;
  font-size: 0.92rem;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cup-match-status,
.cup-match-score {
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.cup-match-status {
  justify-self: start;
  border-radius: 999px;
  padding: 7px 8px;
  color: rgba(255, 250, 240, 0.72);
  background: rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
}

.cup-match.is-playing .cup-match-status {
  color: #101113;
  background: var(--green);
}

.cup-match.is-finished .cup-match-status {
  color: #a9ffd0;
  background: rgba(82, 255, 168, 0.12);
}

.cup-match-score {
  color: #fffaf0;
}

.cup-team-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.cup-team-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 148px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.cup-team-card.is-player-team {
  border-color: rgba(25, 211, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(25, 211, 255, 0.1), transparent 42%),
    rgba(255, 255, 255, 0.045);
}

.cup-team-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.cup-team-card h4 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.cup-team-card-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 8px;
  color: var(--green);
  background: rgba(201, 244, 93, 0.1);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
}

.cup-team-card-members {
  display: grid;
  gap: 8px;
}

.cup-team-card-member {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.cup-team-card-member .avatar-head {
  width: 30px;
  height: 30px;
}

.cup-team-card-member strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 250, 240, 0.86);
  font-size: 0.82rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cup-live-follow-bar {
  width: min(100%, 1180px);
  margin: 0 auto clamp(14px, 2vw, 20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
}

.cup-live-follow-bar strong {
  color: #fffaf0;
}

@media (max-width: 860px) {
  .cup-overview-hero,
  .cup-intermission,
  .cup-overview-layout,
  .cup-overview-layout:has(.cup-player-card),
  .cup-overview-grid,
  .cup-active-card {
    grid-template-columns: 1fr;
  }

  .cup-overview-progress {
    justify-self: start;
  }

  .cup-intermission {
    align-items: start;
  }

  .cup-intermission-score {
    justify-items: start;
  }

  .cup-overview-actions {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .cup-match {
    grid-template-columns: 1fr auto;
  }

  .cup-match-status {
    grid-column: 1 / -1;
  }

  .cup-live-follow-bar {
    display: grid;
  }
}
