:root {
  color-scheme: dark;
  --bg: #0b0e1c;
  --surface: #14182b;
  --surface-soft: rgba(25, 30, 52, 0.82);
  --ink: #f8f7ff;
  --muted: #a9acbe;
  --line: rgba(255, 255, 255, 0.11);
  --purple: #806dff;
  --purple-light: #a99cff;
  --red: #ff5573;
  --blue: #4f98ff;
  --green: #42dda9;
  --yellow: #ffd04a;
  --font-display: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: Inter, ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 82% 2%, rgba(128, 109, 255, 0.25), transparent 31rem),
    radial-gradient(circle at 4% 45%, rgba(255, 85, 115, 0.11), transparent 28rem),
    var(--bg);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
}

button,
input { font: inherit; }

button { color: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.access-gate {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  place-items: center;
  overflow-y: auto;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 208, 74, 0.13), transparent 25rem),
    radial-gradient(circle at 80% 10%, rgba(128, 109, 255, 0.27), transparent 27rem),
    #0b0e1c;
}

.access-gate[hidden] { display: none; }

body.access-locked { overflow: hidden; }

body.access-locked > :not(.access-gate):not(script) {
  visibility: hidden;
  pointer-events: none;
}

.access-card {
  width: min(100%, 450px);
  padding: clamp(30px, 7vw, 48px);
  border: 1px solid rgba(169, 156, 255, 0.28);
  border-radius: 30px;
  text-align: center;
  background: rgba(19, 23, 42, 0.95);
  box-shadow: 0 35px 110px rgba(0, 0, 0, 0.45);
}

.four-mark {
  position: relative;
  display: block;
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  transform: rotate(45deg);
}

.four-mark i {
  position: absolute;
  width: 37px;
  height: 37px;
  border-radius: 22px 22px 7px 22px;
}

.four-mark i:nth-child(1) { top: 2px; left: 2px; background: var(--red); }
.four-mark i:nth-child(2) { top: 2px; right: 2px; background: var(--blue); transform: rotate(90deg); }
.four-mark i:nth-child(3) { right: 2px; bottom: 2px; background: var(--yellow); transform: rotate(180deg); }
.four-mark i:nth-child(4) { bottom: 2px; left: 2px; background: var(--green); transform: rotate(270deg); }
.four-mark b {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #17192a;
  background: white;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--purple-light);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.access-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(35px, 9vw, 48px);
  line-height: 0.88;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.access-card > p:not(.eyebrow):not(.access-error) {
  margin: 20px auto 25px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.access-card label {
  display: block;
  margin-bottom: 9px;
  color: #d7d6e1;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

#access-code {
  width: min(100%, 220px);
  height: 62px;
  padding-left: 13px;
  border: 1px solid rgba(169, 156, 255, 0.4);
  border-radius: 15px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.37em;
  text-align: center;
  background: #0e1120;
}

.access-error {
  min-height: 20px;
  margin: 10px 0 5px;
  color: #ff7890;
  font-size: 12px;
  font-weight: 750;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 54px;
  padding: 13px 20px;
  border-radius: 15px;
  font-weight: 900;
  cursor: pointer;
}

.primary-button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, #836dff, #5d49df);
  box-shadow: 0 15px 30px rgba(87, 68, 213, 0.28);
}

.primary-button:disabled { cursor: wait; opacity: 0.65; }

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

.home-screen { min-height: 100dvh; }

.site-header,
.hero,
.setup-panel,
.games-section,
.table-tip,
footer {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  height: 88px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.hub-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d8d6e8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-decoration: none;
}

.house-icon,
.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.house-icon { color: var(--purple-light); font-size: 21px; }

.icon-button {
  color: var(--green);
  font-size: 20px;
  cursor: pointer;
}

.icon-button[aria-pressed="false"] { color: var(--muted); }

.hero {
  display: grid;
  min-height: 610px;
  padding: clamp(70px, 9vw, 120px) 0 80px;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  align-items: center;
  gap: 50px;
}

.hero-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-copy .eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(66, 221, 169, 0.1);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 6.6vw, 88px);
  line-height: 0.91;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}

.hero h1 em {
  color: transparent;
  font-style: normal;
  -webkit-text-stroke: 2px var(--purple-light);
}

.hero-copy > p:last-child {
  max-width: 650px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 560;
  line-height: 1.65;
}

.table-preview {
  position: relative;
  display: grid;
  min-height: 390px;
  place-items: center;
}

.table-preview::before {
  content: "";
  position: absolute;
  width: 390px;
  height: 390px;
  border-radius: 50%;
  background: rgba(128, 109, 255, 0.12);
  filter: blur(2px);
}

.preview-device {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 390px);
  aspect-ratio: 1.36;
  padding: 10px;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border: 5px solid #292d46;
  border-radius: 29px;
  background: #080a12;
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.45);
  transform: perspective(800px) rotateX(9deg) rotateZ(-5deg);
}

.preview-zone {
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.75);
  font: 900 25px/1 var(--font-display);
  font-style: normal;
}

.preview-red { background: linear-gradient(145deg, #74233a, #38192a); transform: rotate(180deg); }
.preview-blue { background: linear-gradient(145deg, #244a86, #182641); transform: rotate(180deg); }
.preview-green { background: linear-gradient(145deg, #1f6e58, #17372f); }
.preview-yellow { color: #2c2816; background: linear-gradient(145deg, #cda730, #71601f); }

.preview-device b {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 7px solid #0b0e1c;
  border-radius: 50%;
  color: #15182b;
  font: 900 20px/1 var(--font-display);
  background: white;
  transform: translate(-50%, -50%);
}

.preview-hand {
  position: absolute;
  z-index: 3;
  font-size: 58px;
  filter: drop-shadow(0 12px 11px rgba(0, 0, 0, 0.35));
}

.hand-one { right: 1%; bottom: 15%; transform: rotate(-28deg); }
.hand-two { top: 8%; left: 6%; transform: rotate(151deg); }

.setup-panel {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--surface-soft);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}

.setup-heading,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
}

.setup-heading h2,
.section-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(27px, 4vw, 43px);
  line-height: 1;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.setup-heading > p,
.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.player-counts {
  display: grid;
  margin-top: 25px;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.player-counts button {
  display: flex;
  min-height: 88px;
  padding: 15px 18px;
  align-items: center;
  gap: 14px;
  border: 2px solid var(--line);
  border-radius: 17px;
  color: var(--muted);
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: 0.18s ease;
}

.player-counts button:hover { transform: translateY(-2px); }

.player-counts button[aria-pressed="true"] {
  border-color: var(--purple-light);
  color: white;
  background: rgba(128, 109, 255, 0.14);
  box-shadow: 0 0 0 3px rgba(128, 109, 255, 0.1);
}

.player-counts strong {
  color: white;
  font: 900 30px/1 var(--font-display);
}

.player-counts span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.games-section { padding: 100px 0 30px; }

.game-grid {
  display: grid;
  margin-top: 35px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.game-card {
  position: relative;
  display: grid;
  min-height: 310px;
  padding: 27px;
  overflow: hidden;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  gap: 17px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 25px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.17);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.game-card::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(255, 255, 255, 0.025), 0 0 0 70px rgba(255, 255, 255, 0.018);
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.27);
}

.game-reaction { background: linear-gradient(145deg, #5d2037, #251629 66%, #161624); }
.game-math { background: linear-gradient(145deg, #2e2972, #1a1d47 66%, #131625); }
.game-color { background: linear-gradient(145deg, #1b6050, #162f32 66%, #131b25); }
.game-quiz { background: linear-gradient(145deg, #785d1d, #3c311c 66%, #1b1a21); }

.game-number {
  color: rgba(255, 255, 255, 0.48);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.game-icon {
  z-index: 1;
  display: grid;
  width: 88px;
  height: 88px;
  grid-column: 1;
  grid-row: 2;
  place-items: center;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 26px;
  font: 900 39px/1 var(--font-display);
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(-5deg);
}

.game-copy {
  z-index: 1;
  display: flex;
  grid-column: 2 / -1;
  grid-row: 2;
  align-self: center;
  flex-direction: column;
  gap: 8px;
}

.game-copy strong {
  font-family: var(--font-display);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.game-copy > span:last-child {
  max-width: 370px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.game-kicker {
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.play-chip {
  z-index: 1;
  display: inline-flex;
  min-height: 37px;
  padding: 8px 12px;
  grid-column: 1 / -1;
  align-items: center;
  justify-self: start;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.13em;
  background: rgba(255, 255, 255, 0.065);
}

.play-chip b { font-size: 17px; }

.table-tip {
  display: flex;
  margin-top: 60px;
  margin-bottom: 25px;
  padding: 24px 27px;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(66, 221, 169, 0.2);
  border-radius: 21px;
  background: rgba(66, 221, 169, 0.055);
}

.table-tip > span {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: #0e2c25;
  font-size: 24px;
  background: var(--green);
  transform: rotate(-5deg);
}

.table-tip p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.table-tip strong { color: var(--ink); }

footer {
  display: flex;
  min-height: 95px;
  align-items: center;
  justify-content: space-between;
  color: #76798f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

/* Arena compartida */

.game-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: #080a12;
  touch-action: none;
}

.player-zones {
  display: grid;
  width: 100%;
  height: 100%;
  gap: 3px;
  background: #05060c;
}

.player-count-2 { grid-template-rows: 1fr 1fr; }
.player-count-3,
.player-count-4 { grid-template: 1fr 1fr / 1fr 1fr; }
.player-count-3 .player-zone:last-child { grid-column: 1 / -1; }

.player-zone {
  --player-color: white;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: clamp(12px, 2.4vw, 27px);
  overflow: hidden;
  justify-content: center;
  isolation: isolate;
  transition: filter 0.18s ease, opacity 0.18s ease;
}

.player-zone::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.28;
  background: radial-gradient(circle at 50% 50%, var(--player-color), transparent 67%);
}

.player-zone::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background: #121625;
}

.player-zone.is-top {
  padding-top: max(clamp(12px, 3.5vh, 34px), env(safe-area-inset-top));
  align-items: flex-start;
}

.player-zone.is-bottom {
  padding-bottom: max(clamp(12px, 3.5vh, 34px), env(safe-area-inset-bottom));
  align-items: flex-end;
}

.player-zone.is-locked { filter: grayscale(0.65); opacity: 0.58; }

.player-zone.is-winner {
  animation: winner-flash 0.75s ease both;
}

.player-zone.is-winner::before { opacity: 0.68; }

@keyframes winner-flash {
  0%, 100% { filter: brightness(1); }
  40% { filter: brightness(1.7); }
}

.player-content {
  display: flex;
  width: min(100%, 520px);
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: clamp(5px, 1.2vh, 11px);
  text-align: center;
}

.player-zone.is-top .player-content { transform: rotate(180deg); }

.player-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.player-name {
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.player-score {
  display: grid;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  place-items: center;
  border-radius: 99px;
  color: #111522;
  font: 900 20px/1 var(--font-display);
  background: var(--player-color);
}

.zone-status {
  min-height: 1.2em;
  color: rgba(255, 255, 255, 0.73);
  font-size: clamp(13px, 1.7vw, 16px);
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.zone-controls {
  display: grid;
  width: min(100%, 400px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(5px, 1vw, 9px);
}

.response-button {
  display: grid;
  min-width: 0;
  min-height: clamp(64px, 10.5vh, 96px);
  padding: 8px 5px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: clamp(12px, 2vw, 18px);
  color: white;
  overflow-wrap: anywhere;
  font: 900 clamp(22px, 4.4vw, 36px)/0.95 var(--font-display);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 8px 20px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.response-button:active { transform: scale(0.96); }
.response-button:disabled { opacity: 0.4; }

.player-count-2 .response-button {
  min-height: clamp(80px, 12vh, 110px);
  font-size: clamp(28px, 6vw, 44px);
}

.reaction-control { grid-template-columns: 1fr; }

.reaction-button {
  min-height: clamp(96px, 17vh, 145px);
  border-width: 2px;
  border-color: color-mix(in srgb, var(--player-color), white 20%);
  color: #101420;
  font-size: clamp(36px, 7vw, 62px);
  background: var(--player-color);
}

.reaction-button.is-live { animation: live-pulse 0.62s ease-in-out infinite alternate; }

@keyframes live-pulse {
  to { box-shadow: 0 0 0 8px color-mix(in srgb, var(--player-color), transparent 78%); }
}

.color-button { min-height: clamp(70px, 11vh, 98px); }

.color-dot {
  width: clamp(40px, 6.5vw, 58px);
  height: clamp(40px, 6.5vw, 58px);
  border: 3px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  box-shadow: 0 5px 13px rgba(0, 0, 0, 0.25);
}

.center-stage {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  display: flex;
  width: clamp(280px, 42vw, 470px);
  min-height: clamp(190px, 28vh, 260px);
  padding: clamp(23px, 3.2vw, 32px) clamp(20px, 3.2vw, 34px)
    clamp(50px, 5.5vw, 62px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: clamp(5px, 0.8vw, 9px) solid #080a12;
  border-radius: clamp(22px, 4vw, 36px);
  text-align: center;
  background: rgba(249, 249, 255, 0.97);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
}

.round-pill {
  position: absolute;
  top: -16px;
  display: inline-flex;
  min-height: 40px;
  padding: 8px 14px;
  align-items: center;
  gap: 6px;
  border: 4px solid #080a12;
  border-radius: 99px;
  color: white;
  font-size: 12px;
  letter-spacing: 0.08em;
  background: #24283d;
}

.center-kicker {
  margin: 0 0 6px;
  color: #6858db;
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 950;
  letter-spacing: 0.13em;
}

.center-stage h2 {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: #17192a;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 52px);
  line-height: 0.93;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.center-stage > p:last-of-type {
  margin: 8px 0 0;
  color: #6a6d7c;
  font-size: clamp(14px, 1.9vw, 17px);
  font-weight: 750;
}

.center-actions {
  position: absolute;
  right: 10px;
  bottom: 9px;
  display: flex;
  gap: 5px;
}

.center-actions button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(23, 25, 42, 0.13);
  border-radius: 50%;
  color: #3e4257;
  font-size: 17px;
  background: #edeef5;
  cursor: pointer;
}

.game-dialog {
  width: min(92vw, 420px);
  max-height: 92dvh;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 27px;
  color: var(--ink);
  background: transparent;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.5);
}

.game-dialog::backdrop {
  background: rgba(3, 5, 12, 0.78);
  backdrop-filter: blur(7px);
}

.dialog-panel {
  padding: 29px;
  border: 1px solid rgba(169, 156, 255, 0.25);
  border-radius: inherit;
  text-align: center;
  background: #171b30;
}

.dialog-panel h2 {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.dialog-panel button + button { margin-top: 9px; }
.danger-button { color: #ff8095; }

.result-crown {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 21px;
  color: #322b14;
  font-size: 28px;
  background: var(--yellow);
  transform: rotate(-5deg);
}

.result-panel > p:not(.eyebrow) {
  margin: -11px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.final-scores {
  display: flex;
  margin-bottom: 22px;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}

.final-score {
  display: inline-flex;
  padding: 8px 10px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: #d7d8e2;
  font-size: 10px;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.05);
}

.final-score b { color: white; font-family: var(--font-display); }

@media (max-width: 760px) {
  .site-header,
  .hero,
  .setup-panel,
  .games-section,
  .table-tip,
  footer { width: min(100% - 28px, 560px); }

  .hero {
    min-height: 0;
    padding: 65px 0 60px;
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .table-preview { min-height: 310px; }
  .table-preview::before { width: 310px; height: 310px; }
  .preview-device { width: min(90%, 390px); }

  .setup-heading,
  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .player-counts { grid-template-columns: 1fr; }
  .player-counts button { min-height: 70px; }
  .games-section { padding-top: 70px; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card { min-height: 290px; }
  footer { flex-direction: column; justify-content: center; gap: 7px; }
}

@media (max-width: 430px) {
  .hub-link > span:last-child { display: none; }
  .hero h1 { font-size: clamp(43px, 13vw, 60px); }
  .preview-hand { font-size: 47px; }
  .game-card { padding: 21px; grid-template-columns: auto 1fr; }
  .game-icon { width: 69px; height: 69px; font-size: 31px; }
  .game-copy { grid-column: 2; }

  .player-count-4[data-active-game="quiz"] .zone-controls,
  .player-count-3[data-active-game="quiz"] .player-zone.is-top .zone-controls {
    width: min(100%, 150px);
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .player-count-4[data-active-game="quiz"] .response-button,
  .player-count-3[data-active-game="quiz"] .player-zone.is-top .response-button {
    min-height: 52px;
    font-size: 24px;
    line-height: 1;
  }
}

@media (max-height: 560px) {
  .player-zone { padding-block: 7px; }
  .player-content { gap: 3px; }
  .player-head { gap: 5px; }
  .player-count-4 .player-zone.is-top:nth-child(odd) .player-head { justify-content: flex-end; }
  .player-count-4 .player-zone.is-top:nth-child(even) .player-head { justify-content: flex-start; }
  .player-count-4 .player-zone.is-bottom:nth-child(odd) .player-head { justify-content: flex-start; }
  .player-count-4 .player-zone.is-bottom:nth-child(even) .player-head { justify-content: flex-end; }
  .player-name { font-size: 14px; }
  .player-score { height: 36px; min-width: 36px; font-size: 18px; }
  .zone-status { display: none; }
  .response-button { min-height: 56px; font-size: clamp(22px, 3.6vw, 30px); }
  .player-count-2 .response-button { min-height: 68px; font-size: clamp(28px, 5vw, 38px); }
  .reaction-button { min-height: 78px; font-size: clamp(34px, 6vw, 50px); }
  .center-stage {
    width: min(58vw, 520px);
    min-height: 165px;
    padding: 16px 20px 42px;
  }
  .center-stage h2 { font-size: clamp(32px, 4.6vw, 42px); line-height: 0.88; }
  .center-kicker { font-size: 11px; }
  .center-stage > p:last-of-type { margin-top: 6px; font-size: 13px; }
  .center-actions { right: 7px; bottom: 6px; }
  .center-actions button { width: 25px; height: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
