:root {
  color-scheme: light;
  --ink: #12151f;
  --muted: #687080;
  --paper: #f7f8fb;
  --line: #dfe4ed;
  --electric: #1b64ff;
  --mint: #12b886;
  --sun: #ffbf3f;
  --coral: #f05d5e;
  --night: #172033;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
* { touch-action: manipulation; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

button, input, select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
}

button.active, button.primary {
  background: var(--electric);
  border-color: var(--electric);
  color: #ffffff;
}

button.danger {
  background: #fff1f1;
  border-color: #f2b8b8;
  color: #a53131;
}

button.closed {
  border-color: var(--mint);
}

button.locked,
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button.locked {
  background: #eef0f5;
  color: var(--muted);
}

input, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
}

select.selected {
  border-color: rgba(18, 184, 134, 0.55);
  background: #e9fbf4;
  color: #0f5c45;
  font-weight: 800;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
}

[v-cloak] { display: none; }

.lock-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.lock-ok { color: var(--mint); }
.lock-bad { color: var(--coral); }

.lock-matches-table {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px 2px;
}

.lock-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.lock-match-row strong { display: block; font-size: 0.85rem; }
.lock-match-row small { color: var(--muted); font-size: 0.75rem; }
.lock-match-locked { background: #f3f5f9; opacity: 0.65; }

.lock-match-status { white-space: nowrap; }
.lock-pill-locked, .lock-pill-due, .lock-pill-pending {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
}
.lock-pill-locked { background: #f3f5f9; color: var(--muted); }
.lock-pill-due { background: rgba(240, 93, 94, 0.14); color: var(--coral); }
.lock-pill-pending { background: rgba(27, 100, 255, 0.1); color: var(--electric); }

.lock-log {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  background: #0f172a;
  color: #d1e3ff;
  padding: 12px;
  border-radius: 8px;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}

.perf-table {
  display: grid;
  gap: 6px;
}

.perf-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 70px 70px 70px 70px 50px;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 0.82rem;
}

.perf-row span,
.perf-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.perf-head {
  background: #f6f9ff;
}

.scroll-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--electric);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(23, 32, 51, 0.25);
  z-index: 90;
  cursor: pointer;
}

.hero {
  min-height: 390px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(18, 21, 31, 0.92), rgba(18, 21, 31, 0.35)),
    url("https://images.unsplash.com/photo-1517927033932-b3d18e61fb3a?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero.compact {
  min-height: auto;
  background:
    linear-gradient(135deg, rgba(18, 21, 31, 0.96), rgba(18, 21, 31, 0.9)),
    url("https://images.unsplash.com/photo-1517927033932-b3d18e61fb3a?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.brand, .nav-actions, .topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  font-weight: 800;
}

.topbar-tools {
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--sun);
  color: var(--night);
}

.nav-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  height: 44px;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.nav-actions button.active {
  background: #ffffff;
  color: var(--ink);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.lang-btn {
  min-width: 31px;
  width: 31px;
  min-height: 31px;
  height: 31px;
  padding: 0;
  border-radius: 7px;
  font-size: 0.78rem;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 700;
}

.user-chip-session {
  border-color: rgba(27, 100, 255, 0.7);
  background: rgba(27, 100, 255, 0.22);
  color: #dfeaff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.user-chip-button {
  cursor: pointer;
}

.hero-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 18px 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 26px;
  align-items: end;
}

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

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  max-width: 760px;
  font-size: clamp(2.25rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-panel {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.hero-panel strong {
  font-size: 1.45rem;
}

main {
  max-width: 1180px;
  margin: -34px auto 60px;
  padding: 0 18px;
}

.hero.compact + main {
  margin-top: 18px;
}

.layout, .admin-layout {
  display: grid;
  gap: 18px;
}

.auth-screen {
  display: grid;
  place-items: center;
}

.auth-box {
  display: grid;
  gap: 16px;
  width: min(100%, 720px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 60px rgba(23, 32, 51, 0.08);
}

.home-lead {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.home-auth {
  width: min(100%, 860px);
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f6fb;
}

.mode-tabs button {
  border-color: transparent;
  background: transparent;
}

.auth-flow, .prode-gateway, .gateway-grid, .prode-list, .pending-box, .home-actions, .home-action-card {
  display: grid;
  gap: 14px;
}

.home-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.home-action-card, .gateway-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.home-action-card h3,
.gateway-card h3 {
  margin-bottom: 6px;
}

.home-action-card p,
.gateway-card p {
  color: var(--muted);
}

.primary-card {
  background:
    linear-gradient(135deg, rgba(27, 100, 255, 0.1), rgba(18, 184, 134, 0.1)),
    #ffffff;
}

.invite-preview, .pending-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f8ff;
}

.invite-preview span {
  color: var(--muted);
}

.prode-gateway {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 60px rgba(23, 32, 51, 0.08);
}

.gateway-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.gateway-side-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.gateway-side-actions button:disabled {
  opacity: 0.6;
  cursor: default;
}

.google-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.google-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  color: #4285f4;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.prode-tile {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 16px;
  text-align: left;
  align-content: center;
}

.prode-tile strong {
  font-size: 1.1rem;
}

.prode-tile span {
  color: var(--muted);
}

.gateway-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: stretch;
}

.enter-card {
  background:
    linear-gradient(135deg, rgba(27, 100, 255, 0.08), rgba(255, 255, 255, 0)),
    #ffffff;
}

.create-card {
  background:
    linear-gradient(135deg, rgba(255, 191, 63, 0.16), rgba(255, 255, 255, 0)),
    #ffffff;
}

.create-prode-card {
  align-content: center;
}

.home-switch-card .prode-list .prode-tile.active {
  border-color: rgba(27, 100, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(27, 100, 255, 0.10), rgba(255, 255, 255, 0)),
    #ffffff;
}

.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emoji-option {
  min-width: 46px;
  width: 46px;
  min-height: 46px;
  height: 46px;
  padding: 0;
  font-size: 1.35rem;
  border-radius: 10px;
}

.empty-inline {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f7f8fb;
}

.layout {
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: start;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.bottom-nav {
  display: flex;
  justify-content: space-around;
  position: sticky;
  top: 0;
  z-index: 60;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 6px 0 4px;
  box-shadow: 0 2px 8px rgba(23, 32, 51, 0.06);
}

.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  touch-action: manipulation;
}

.bottom-nav button.active {
  color: var(--electric);
}

.bottom-nav button svg {
  flex-shrink: 0;
}

.pool-sticky-name {
  position: sticky;
  top: 63px;
  z-index: 55;
  background: rgba(18, 100, 255, 0.1);
  border-bottom: 1px solid rgba(27, 100, 255, 0.18);
  backdrop-filter: blur(6px);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pool-sticky-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  width: 100%;
}

.pool-sticky-chip {
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  padding: 0;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(27, 100, 255, 0.22);
}

.pool-sticky-name span {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 28px;
  width: 100%;
  padding: 0 10px;
  border-radius: 999px;
  background: transparent;
  color: #0d4ed8;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pool-sticky-chip:hover {
  background: #ffffff;
}

.pool-sticky-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(27, 100, 255, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: #0d4ed8;
  padding: 0;
}

.pool-sticky-edit {
  height: 28px;
}

.pool-sticky-icon:hover {
  background: #ffffff;
}

.modal-note.neutral {
  background: #f8fafc;
  border-color: var(--line);
  color: var(--muted);
}

.modal-prode-list {
  max-height: min(48vh, 360px);
  overflow: auto;
}

.modal-prode-list .prode-tile.active {
  border-color: var(--electric);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.share-invite-actions {
  justify-content: stretch;
}

.share-invite-actions button {
  flex: 1 1 180px;
}

.invite-welcome-card {
  gap: 16px;
}

.invite-welcome-card input[readonly] {
  width: 100%;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
}

.invite-welcome-secondary {
  justify-content: stretch;
}

.invite-welcome-secondary button {
  width: 100%;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--coral);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

.nav-attention {
  position: relative;
  z-index: 72;
  background: rgba(37, 99, 235, 0.10) !important;
  border-radius: 14px;
  box-shadow: 0 0 0 10px rgba(15, 23, 42, 0.18);
}

.requests-prompt-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.38);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.requests-prompt-card {
  width: min(420px, 100%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
}

.requests-prompt-card strong {
  display: block;
  margin-bottom: 6px;
}

.requests-prompt-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.tab-content {
  padding: 16px;
  display: grid;
  gap: 16px;
}

.tab-home,
.tab-minijuegos,
.tab-ranking,
.tab-solicitudes,
.tab-jugar {
  display: grid;
  gap: 16px;
}

.tab-solicitudes .request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.side-panel, .content-stack, .admin-card, .admin-login, .empty-state, .leaderboard {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(23, 32, 51, 0.08);
}

.side-panel {
  overflow: hidden;
}

.panel-block {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-block:last-child {
  border-bottom: 0;
}

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

.invite code {
  display: block;
  overflow-wrap: anywhere;
  padding: 12px;
  border-radius: 8px;
  background: #eef3ff;
}

.invite-link-box {
  display: grid;
  gap: 10px;
}

.invite-link-box code {
  width: 100%;
}

.gateway-invite {
  margin-top: 6px;
}

.content-stack {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.pool-banner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(27, 100, 255, 0.08), rgba(18, 184, 134, 0.08)),
    #ffffff;
}

.pool-banner h2 {
  margin-bottom: 4px;
}

.pool-banner-actions,
.prediction-toolbar button {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stage-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.05);
}

.stage-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.stage-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #eef3ff;
  color: var(--electric);
  padding: 0;
}

.stage-arrow svg {
  width: 26px;
  height: 26px;
}

.stage-arrow:disabled {
  background: #f3f5f9;
  color: #9aa4b5;
  opacity: 0.5;
}

.stage-select {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  border: none;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 4px;
  cursor: pointer;
}

.rules-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 191, 63, 0.08), rgba(27, 100, 255, 0.05)),
    #ffffff;
}

.rules-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

.rules-summary::-webkit-details-marker {
  display: none;
}

.rules-summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
}

.rules-panel[open] .rules-summary::after {
  content: "-";
}

.home-play-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 14px;
}

.home-play-cta .primary {
  min-width: 180px;
}

.minigames-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.minigames-grid-inline {
  margin-top: 0;
}

.minigame-tile {
  min-height: 84px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.minigame-tile.blocked,
.minigame-tile:disabled {
  opacity: 0.62;
  background: rgba(241, 245, 249, 0.9);
  color: var(--muted);
}

.minigame-icon {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.12);
  font-size: 1.2rem;
}

.minigame-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.minigame-copy strong {
  color: var(--text);
}

.minigame-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.home-create-card,
.minigames-card {
  align-self: start;
}

.rule-card-wide {
  grid-column: 1 / -1;
}

.penalty-entry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ordergame-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ordergame-card {
  position: relative;
  width: min(760px, 100%);
  max-height: min(92svh, 860px);
  overflow: auto;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98)),
    radial-gradient(circle at top, rgba(37, 99, 235, 0.16), transparent 48%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 24px 80px rgba(8, 12, 20, 0.45);
  display: grid;
  gap: 18px;
  padding: 24px;
  color: #f8fafc;
}

.ordergame-head,
.ordergame-challenge,
.ordergame-result {
  display: grid;
  gap: 10px;
}

.ordergame-head h2,
.ordergame-challenge h3 {
  margin: 0;
  color: #fff;
}

.ordergame-head .identity-note,
.ordergame-challenge .identity-note {
  color: #94a3b8;
}

.ordergame-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  color: #cbd5e1;
}

.ordergame-stats strong {
  color: #f8fafc;
}

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

.ordergame-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.9);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.ordergame-item.is-dragging {
  opacity: 0.52;
  transform: scale(0.985);
}

.ordergame-item.is-touch-target {
  border-color: rgba(96, 165, 250, 0.72);
  background: rgba(30, 64, 175, 0.22);
}

.ordergame-item.is-correct {
  border-color: rgba(34, 197, 94, 0.56);
  background: rgba(20, 83, 45, 0.34);
}

.ordergame-item.is-wrong {
  border-color: rgba(248, 113, 113, 0.48);
  background: rgba(127, 29, 29, 0.26);
}

.ordergame-rank {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  font-weight: 900;
}

.ordergame-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ordergame-copy strong {
  color: #fff;
}

.ordergame-copy small {
  color: #94a3b8;
}

.ordergame-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ordergame-arrow {
  width: 30px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(51, 65, 85, 0.95);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.ordergame-arrow:disabled {
  opacity: 0.38;
}

.ordergame-result {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.72);
}

.ordergame-result strong {
  color: #fff;
}

.ordergame-answer {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: #cbd5e1;
}

.ordergame-answer li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.rule-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(207, 215, 230, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.rule-card h4 {
  margin: 0;
  font-size: 0.95rem;
}

.rule-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.rule-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.rule-list li::marker {
  color: var(--electric);
}

.section-head-copy {
  display: grid;
  gap: 2px;
}

.stage-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid #cfd7e6;
  border-radius: 8px;
  background: #eef3ff;
  scrollbar-width: thin;
}

.stage-strip button {
  flex: 0 0 auto;
  min-width: 136px;
  border-color: #d9e2f2;
  background: #ffffff;
  white-space: nowrap;
  font-weight: 800;
}

.stage-strip button.active {
  background: var(--electric);
  border-color: var(--electric);
  color: #ffffff;
}

.stage-strip button.locked {
  background: #f1f4f8;
  border-color: #d8dee8;
  color: #687080;
  opacity: 1;
}

.stage-strip button.closed {
  background: #f1f4f8;
  border-color: #d8dee8;
  color: #687080;
  opacity: 1;
}

.empty-state {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(27, 100, 255, 0.1), rgba(18, 184, 134, 0.1)),
    #ffffff;
}

.stage-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(27, 100, 255, 0.18);
  border-radius: 8px;
  background: #eef3ff;
  color: #26446f;
  font-weight: 800;
}

.prediction-toolbar,
.action-bar,
.section-head,
.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.prediction-toolbar {
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.prediction-toolbar strong {
  display: block;
  margin-top: 3px;
}

.toolbar-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.device-note {
  display: grid;
  gap: 10px;
  margin: -4px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8e5;
  color: #7a5a0a;
}

.prediction-shell {
  position: relative;
  display: grid;
  gap: 16px;
}

.prediction-shell.readonly {
  min-height: 220px;
}

.prediction-shell.readonly .groups-grid,
.prediction-shell.readonly .match-grid,
.prediction-shell.readonly .action-bar {
  filter: grayscale(0.18);
}

.stage-lock-label {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(226, 232, 240, 0.6);
  color: #475569;
  font-size: 0.92rem;
  font-weight: 700;
}

.save-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f4f6fb;
  font-size: 0.9rem;
  font-weight: 800;
}

.save-chip.saved,
.stage-panel .save-chip.saved {
  color: #0f5c45;
}

.save-chip.dirty,
.stage-panel .save-chip.dirty {
  color: #7a5a0a;
}

.save-chip.readonly,
.stage-panel .save-chip.readonly {
  color: #475569;
}

.readonly-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(226, 232, 240, 0.5);
}

.request-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #f4f6fb;
}

.request-actions,
.leader-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-only {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.icon-only.success {
  color: #166534;
  background: rgba(220, 252, 231, 0.95);
  border-color: rgba(34, 197, 94, 0.35);
}

.icon-only.danger {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.95);
  border-color: rgba(239, 68, 68, 0.35);
}

.groups-grid, .match-grid, .admin-grid {
  display: grid;
  gap: 12px;
}

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

.date-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.date-tab {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  touch-action: manipulation;
}

.date-tab.active {
  background: var(--electric);
  color: #ffffff;
  border-color: var(--electric);
}

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

.match-grid.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.group-card, .match-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.compact-match-card {
  gap: 10px;
  padding: 12px;
  background: #fbfcff;
}

.match-datetime {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.match-card.filled {
  border-color: var(--mint);
  background: #f0fdf7;
}

.match-card.locked-match {
  border-color: var(--muted);
  background: #f3f4f6;
  opacity: 0.75;
}

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

.card-head-actions {
  align-items: center;
}

.card-head h3 {
  margin: 0;
  font-size: 1rem;
}

.card-head span, .section-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.pick-list, .teams-edit {
  display: grid;
  gap: 10px;
}

.toggle-bonus {
  min-height: 36px;
  padding: 0 12px;
  border-style: dashed;
  background: #f8fafc;
  font-size: 0.85rem;
}

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

.teams-line span {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(27, 100, 255, 0.18);
  border-radius: 8px;
  background: #f4f8ff;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
}

.teams-line span small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.teams-line .winner,
.teams-line span.winner {
  border-color: rgba(18, 184, 134, 0.6);
  background: #dff8ee;
  color: #0f5c45;
  box-shadow: inset 0 0 0 1px rgba(18, 184, 134, 0.18);
}

.teams-line strong {
  color: var(--muted);
  font-size: 0.8rem;
}

.bonus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(18, 184, 134, 0.24);
  border-radius: 8px;
  background: #f4fdf9;
}

.bonus-grid label {
  gap: 5px;
  font-size: 0.74rem;
  color: #0f5c45;
  font-weight: 800;
}

.bonus-grid input {
  min-height: 38px;
  padding: 0 8px;
  text-align: center;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.score-stepper {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: stretch;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.score-stepper.empty {
  background: #fbfcfe;
}

.step-button,
.step-value {
  min-height: 46px;
  border: 0;
  border-radius: 0;
  padding: 0;
  touch-action: manipulation;
}

.step-button {
  background: #eef3ff;
  color: var(--electric);
  font-size: 1.25rem;
  font-weight: 800;
}

.step-button:disabled {
  background: #f3f5f9;
  color: #9aa4b5;
  opacity: 1;
}

.step-value {
  background: #ffffff;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.score-stepper.empty .step-value {
  color: var(--muted);
  font-weight: 700;
}

.result-label {
  margin: 8px 0 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.score-row span {
  color: var(--muted);
  font-weight: 800;
}

.penalties-row {
  margin-top: -4px;
}

.group-standings-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e3e8f2;
  border-radius: 8px;
  background: #f8fafc;
}

.group-standings-list {
  display: grid;
  gap: 8px;
}

.standing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e3e8f2;
}

.standing-row strong {
  font-size: 0.92rem;
}

.standing-row span {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.standing-row-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.third-order-field {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.third-order-field small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.third-order-field select {
  min-width: 150px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.action-bar {
  position: sticky;
  bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  z-index: 5;
}

.action-bar p {
  margin: 0;
  color: var(--muted);
}

.leaderboard {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.ranking-filter {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f6fb;
}

.ranking-filter button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 700;
}

.ranking-filter button.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.leader-row, .admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f4f6fb;
}

.leaderboard .section-head {
  gap: 12px;
}

.leaderboard .section-head h2,
.leaderboard .section-head span,
.leader-row strong,
.leader-row > span,
.leader-log-head strong,
.leader-log-head span,
.leader-log-item-head span,
.leader-log-item-head strong,
.leader-log-items li small {
  min-width: 0;
}

.leaderboard .section-head span {
  flex: 1 1 auto;
  text-align: right;
  overflow-wrap: anywhere;
}

.leader-row strong {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-row > span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.leader-detail {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
}

.leader-detail summary {
  list-style: none;
  cursor: pointer;
}

.leader-detail summary::-webkit-details-marker {
  display: none;
}

.leader-detail[open] .leader-row {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.leader-log {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fbfcff;
}

.leader-actions {
  justify-content: flex-end;
}

.leader-log-list {
  display: grid;
  gap: 10px;
}

.leader-log-stage {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e3e8f2;
  border-radius: 8px;
  background: #ffffff;
}

.leader-log-head,
.leader-log-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.leader-log-item-head span {
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.leader-log-item-head strong,
.leader-log-head span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.leader-log-items {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.leader-log-items li small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .leaderboard .section-head {
    align-items: flex-start;
  }

  .leaderboard .section-head span {
    text-align: left;
  }

  .leader-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .leader-row > span {
    width: 100%;
  }

  .leader-actions button {
    width: 100%;
  }

  .leader-log-head,
  .leader-log-item-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

.admin-pool-detail + .admin-pool-detail {
  margin-top: 10px;
}

.nested-leader-detail {
  background: #fbfcff;
}

.stage-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.stage-title {
  font-weight: 800;
}

.stage-badge {
  min-width: 86px;
  padding: 7px 10px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
}

.stage-active {
  background: #e9fbf4;
}

.stage-active .stage-badge {
  background: #12b886;
  color: #ffffff;
}

.stage-inactive {
  background: #eef3ff;
}

.stage-inactive .stage-badge {
  background: #dbe6ff;
  color: #26446f;
}

.stage-closed {
  background: #fff3cf;
}

.stage-closed .stage-badge {
  background: #ffbf3f;
  color: #172033;
}

.admin-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.leader-row:first-of-type {
  background: #fff3cf;
}

.admin-layout {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(23, 32, 51, 0.08);
}

.admin-login {
  display: grid;
  gap: 16px;
  max-width: 430px;
  margin: 0 auto;
  padding: 24px;
}

.admin-header {
  align-items: center;
}

.admin-header label {
  min-width: 230px;
}

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

.admin-summary-card {
  grid-column: 1 / -1;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.summary-pill {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.summary-pill span {
  color: var(--muted);
  font-size: 0.82rem;
}

.summary-pill strong {
  font-size: 1.2rem;
}

.admin-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  box-shadow: none;
}

.admin-card.wide {
  grid-column: 1 / -1;
}

.admin-row.stacked {
  align-items: start;
  flex-direction: column;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: min(92vw, 520px);
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--night);
  color: #ffffff;
  box-shadow: 0 12px 40px rgba(18, 21, 31, 0.24);
  z-index: 10;
}

.rename-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 28, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 105;
  padding: 18px;
}

.rename-card {
  width: min(94vw, 420px);
  background: #ffffff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(18, 21, 31, 0.28);
  display: grid;
  gap: 14px;
}

.rename-card h3 {
  margin: 0;
  font-size: 1.28rem;
}

.rename-card label {
  gap: 8px;
}

.rename-card input {
  font-size: 16px;
}

.copy-predictions-card select {
  width: 100%;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.modal-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7e6;
  border: 1px solid #facc15;
  color: #7c5c00;
  font-size: 0.95rem;
  font-weight: 600;
}

.rename-error {
  margin: 0;
  color: #b42318;
  font-size: 0.92rem;
  font-weight: 600;
}

.rename-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.penalty-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 13, 23, 0.72), rgba(7, 13, 23, 0.82)),
    url("https://images.unsplash.com/photo-1517927033932-b3d18e61fb3a?auto=format&fit=crop&w=1800&q=80") center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 108;
}

.penalty-card {
  position: relative;
  width: min(96vw, 1280px);
  min-height: min(82vh, 760px);
  max-height: 92vh;
  overflow: auto;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.34);
  padding: 26px;
}

.penalty-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
}

.penalty-side,
.penalty-main {
  display: grid;
  gap: 14px;
}

.penalty-main {
  align-content: start;
}

.penalty-challenges {
  display: grid;
  gap: 10px;
}

.penalty-side-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.penalty-side-button {
  flex: 1 1 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-weight: 800;
}

.penalty-side-button strong {
  color: var(--electric);
}

.penalty-challenge-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.penalty-challenge-item.active {
  border-color: rgba(27, 100, 255, 0.45);
  background: rgba(27, 100, 255, 0.06);
}

.penalty-challenge-item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.penalty-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

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

.penalty-progress-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.penalty-progress-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e5e7eb;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.penalty-progress-dot.done {
  background: rgba(18, 184, 134, 0.16);
  color: #0f766e;
}

.penalty-progress-dot.active {
  background: var(--electric);
  color: #fff;
}

.penalty-single-stage {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.penalty-stage-head {
  align-items: center;
}

.penalty-selected-zone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(27, 100, 255, 0.12);
  color: var(--electric);
  font-size: 14px;
  font-weight: 800;
}

.penalty-single-goal-wrap {
  display: flex;
  justify-content: center;
}

.penalty-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.penalty-round-editor {
  display: grid;
  gap: 8px;
}

.penalty-goal {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.22) 0 18%, transparent 18% 100%),
    linear-gradient(to right, rgba(255,255,255,0.22) 0 20%, transparent 20% 80%, rgba(255,255,255,0.22) 80% 100%),
    linear-gradient(180deg, #1c3f1d 0%, #2f6d30 100%);
  border: 6px solid #f8fafc;
  box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.penalty-goal-photo {
  max-width: 900px;
  background:
    var(--penalty-keeper-image, none) center bottom / contain no-repeat,
    linear-gradient(180deg, rgba(7, 13, 23, 0.18), rgba(7, 13, 23, 0.06)),
    var(--penalty-base-image, url("/arco.png?v=20260506o")) center/cover;
  overflow: hidden;
}

.penalty-zone {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  min-height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: none;
  color: #fff;
  padding: 0;
}

.penalty-zone.active {
  background: rgba(255, 191, 63, 0.42);
  color: #111827;
}

.penalty-zone-box {
  transform: none;
  border-radius: 12px;
  width: auto;
  height: auto;
  min-height: 0;
  background: rgba(255,255,255,0.12);
  border: none;
  backdrop-filter: blur(2px);
}

.penalty-zone-box span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

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

.penalty-summary-col {
  display: grid;
  gap: 10px;
}

.penalty-list-modal {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 5;
}

.penalty-list-card {
  width: min(92vw, 520px);
  max-height: min(78vh, 640px);
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  display: grid;
  gap: 12px;
}

.penalty-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.penalty-summary-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eef2f7;
  color: #6b7280;
  font-size: 13px;
  font-weight: 800;
}

.penalty-summary-chip.filled {
  background: rgba(27, 100, 255, 0.12);
  color: var(--electric);
}

.penalty-result-board {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.penalty-score {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 900;
}

.penalty-round-grid {
  display: grid;
  gap: 8px;
}

.penalty-round-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
}

.penalty-step-enter-active,
.penalty-step-leave-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.penalty-step-enter-from,
.penalty-step-leave-to {
  opacity: 0;
  transform: translateY(8px);
}

.trivia-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 28, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 18px;
}
.trivia-card {
  position: relative;
  width: min(94vw, 540px);
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 24px 80px rgba(8, 12, 20, 0.45);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.trivia-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}
.trivia-close:hover { color: #111; }
.trivia-pane { display: flex; flex-direction: column; gap: 14px; }
.trivia-lead { color: #4b5563; font-size: 14px; line-height: 1.45; }
.trivia-stats { text-align: center; }

.wheel-wrap {
  position: relative;
  width: min(86vw, 380px);
  height: min(86vw, 380px);
  margin: 12px auto;
}
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 28px solid #111827;
  z-index: 3;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.22));
}
.wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 0 8px #111827, 0 18px 44px rgba(17,24,39,0.28);
}
.wheel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.12), transparent 56%);
}
.wheel-core {
  position: absolute;
  inset: 50%;
  width: 112px;
  height: 112px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #ffffff;
  border: 8px solid #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 15px;
  color: #111827;
  box-shadow: 0 14px 30px rgba(17,24,39,0.18);
  z-index: 2;
}
.wheel-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.wheel-slice {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88px;
  text-align: center;
  transform-origin: center center;
  z-index: 2;
}
.wheel-slice-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  width: 88px;
  min-height: 44px;
  padding: 0;
  color: #ffffff;
  text-shadow: 0 3px 10px rgba(15, 23, 42, 0.38);
  transform: rotate(-90deg);
}
.wheel-slice-label strong {
  font-size: 18px;
  line-height: 1;
}
.wheel-slice-label small {
  font-size: 12px;
  line-height: 1.05;
  font-weight: 900;
  color: #ffffff;
  white-space: normal;
  text-wrap: balance;
  letter-spacing: 0;
}

.trivia-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.trivia-actions button { min-width: 120px; }

.trivia-cat-head {
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.trivia-cat-icon { font-size: 22px; }
.trivia-countdown {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trivia-countdown strong {
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  min-width: 56px;
  text-align: right;
}
.trivia-countdown-bar {
  flex: 1;
  height: 8px;
  border-radius: 8px;
  background: #e5e7eb;
  overflow: hidden;
}
.trivia-countdown-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #84cc16);
  transition: width 0.1s linear;
}
.trivia-countdown-warn .trivia-countdown-fill {
  background: linear-gradient(90deg, #f97316, #ef4444);
}
.trivia-countdown-warn strong { color: #ef4444; }

.trivia-question {
  margin: 4px 0 6px;
  font-size: 18px;
  line-height: 1.4;
}
.trivia-options {
  display: grid;
  gap: 10px;
}
.trivia-option {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.35;
  transition: transform 0.05s, border-color 0.1s, background 0.1s;
}
.trivia-option:hover:not(:disabled) {
  border-color: #1f2937;
  background: #ffffff;
}
.trivia-option:active:not(:disabled) { transform: scale(0.98); }
.trivia-option:disabled { opacity: 0.6; cursor: default; }
.trivia-option-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex: 0 0 auto;
}

.trivia-result {
  text-align: center;
  padding: 12px 6px;
  border-radius: 12px;
}
.trivia-result-ok { background: rgba(34,197,94,0.12); color: #166534; }
.trivia-result-bad { background: rgba(239,68,68,0.12); color: #991b1b; }
.trivia-result-icon { font-size: 44px; display: block; margin-bottom: 6px; }
.trivia-result h2 { margin: 0 0 4px; }
.trivia-result p { margin: 0; }

.trivia-banner-shell {
  margin-top: 14px;
  min-height: 90px;
}

.trivia-banner-slot {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.admin-pool-settings {
  margin: 10px 0 14px;
}

.admin-pool-summary-side {
  display: flex;
  align-items: center;
  gap: 14px;
}

.compact-check-row {
  font-size: 13px;
  max-width: 260px;
  justify-content: flex-end;
}

.compact-check-row span {
  text-align: right;
}

.trivia-fade-enter-active, .trivia-fade-leave-active { transition: opacity 0.2s ease; }
.trivia-fade-enter-from, .trivia-fade-leave-to { opacity: 0; }

@media (max-width: 520px) {
  .trivia-card {
    width: min(94vw, 540px);
    padding: 24px 16px;
  }

  .wheel-wrap {
    width: min(calc(100vw - 72px), 332px);
    height: min(calc(100vw - 72px), 332px);
    margin-inline: auto;
  }

  .wheel-core {
    width: 96px;
    height: 96px;
    font-size: 13px;
  }

  .wheel-slice {
    width: 74px;
  }

  .wheel-slice-label {
    width: 74px;
    min-height: 38px;
  }

  .wheel-slice-label small {
    font-size: 10px;
  }
}

@media (max-width: 860px) {
  .hero {
    min-height: 520px;
  }

  .hero.compact {
    min-height: auto;
  }

  .hero-content, .action-bar, .admin-header, .gateway-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
  }

  .topbar-tools {
    display: contents;
  }

  .nav-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    grid-column: 1 / -1;
  }

  .lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    grid-column: 2;
    grid-row: 1;
    width: auto;
  }

  .nav-actions .user-chip {
    flex: 1 1 auto;
    min-width: 0;
  }

  .nav-actions .google-link-btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .nav-actions button {
    flex: 0 0 auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 34px;
  }

  .pool-sticky-name {
    top: 63px;
    padding-inline: 12px;
  }

  .hero.compact .hero-content {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .penalty-card {
    padding: 12px;
    min-height: 0;
    max-height: 96svh;
  }

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

  .rule-card-wide {
    grid-column: auto;
  }

  .minigame-tile {
    min-height: 72px;
    padding: 12px;
  }

  .ordergame-card {
    padding: 18px 16px;
    gap: 14px;
  }

  .ordergame-stats {
    grid-template-columns: 1fr;
    display: grid;
  }

  .ordergame-item {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 10px 12px;
  }

  .ordergame-rank {
    width: 36px;
    height: 36px;
  }

  .ordergame-arrow {
    width: 32px;
    height: 26px;
  }

  .penalty-layout,
  .penalty-columns {
    grid-template-columns: 1fr;
  }

  .penalty-layout {
    gap: 10px;
  }

  .penalty-side,
  .penalty-main {
    gap: 10px;
  }

  .penalty-side .eyebrow {
    margin-bottom: 2px;
  }

  .penalty-side h2 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.05;
  }

  .penalty-side .identity-note {
    font-size: 0.92rem;
  }

  .penalty-challenges {
    gap: 8px;
  }

  .penalty-challenge-item {
    padding: 10px;
    gap: 10px;
  }

  .penalty-head {
    gap: 8px;
  }

  .penalty-head label,
  .penalty-head .identity-note {
    font-size: 0.92rem;
  }

  .penalty-single-stage {
    gap: 12px;
    padding: 12px;
  }

  .penalty-stage-head h3 {
    margin: 0;
    font-size: 1.15rem;
  }

  .penalty-stage-head span {
    font-size: 0.86rem;
  }

  .penalty-selected-zone {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .penalty-summary-grid {
    gap: 10px;
  }

  .penalty-summary-col strong {
    font-size: 0.92rem;
  }

  .rename-actions {
    gap: 8px;
  }

  .rename-actions button {
    min-height: 40px;
  }

  .penalty-zone-box span {
    font-size: 11px;
    padding: 5px;
  }

  main {
    margin-top: -76px;
    padding: 0 12px 42px;
  }

  .layout, .app-shell, .admin-grid, .groups-grid, .match-grid, .gateway-grid, .prode-list, .home-actions {
    grid-template-columns: 1fr;
  }

  .pool-banner,
  .pool-banner-actions,
  .prediction-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .standing-row {
    align-items: start;
    flex-direction: column;
  }

  .standing-row span {
    text-align: left;
  }

  .standing-row-meta,
  .third-order-field {
    justify-items: start;
  }

  .stage-strip {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .stage-strip button {
    width: 100%;
    min-width: 0;
  }

  .stage-admin-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .stage-badge {
    width: 100%;
  }

  .admin-header label {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .penalty-overlay {
    padding: 8px;
    align-items: stretch;
  }

  .penalty-card {
    width: 100%;
    max-height: 100svh;
    border-radius: 16px;
    padding: 10px;
  }

  .penalty-side h2 {
    font-size: 1.25rem;
  }

  .penalty-goal {
    aspect-ratio: 16 / 8.2;
  }

  .penalty-zone-box span {
    font-size: 10px;
    padding: 4px;
  }
}
