/* TideWars — Basis-Styles (retro-minimalistisch; Meta-Seiten sind reines
   SSR-HTML/CSS nach Charter — docs/VALUES-CHARTER.md). */

:root {
  --ink: #14212b;
  --paper: #f4ecd9;
  --sea: #1d5a73;
  --sea-deep: #0e3a4c;
  --gold: #c9a227;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  max-width: 56rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.landing {
  text-align: center;
  padding-top: 1.5rem;
}

/* Hero-Banner ZURÜCK (Owner-Wunsch 2026-07-07) — als gestapelter Block im
   normalen Fluss VOR dem Titel: kein Wrapper/Scrim/Overlay mehr (die 0.4.0-
   Variante überlappte den Titel — Entfernungsgrund 0.9.1). width/height-
   Attribute + aspect-ratio halten das Layout CLS-frei. */
.landing-banner {
  display: block;
  width: min(94%, 640px);
  aspect-ratio: 3 / 1;
  height: auto;
  margin: 0 auto 1.4rem;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(14, 33, 43, 0.28);
}

.landing-title {
  position: relative;
  z-index: 2;
  font-size: clamp(3.5rem, 9vw, 5.5rem);
  line-height: 1.04;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
  color: var(--sea-deep);
  /* Letterpress: heller Papier-Aufschlag oben, weiche Tinten-Tiefe darunter. */
  text-shadow: 0 1px 0 rgba(244, 236, 217, 0.85), 0 3px 5px rgba(14, 33, 43, 0.22);
}
/* Statisches Gold-Tide-Detail unter dem Titel (kein Motion, A-L2). */
.landing-title::after {
  content: '';
  display: block;
  width: 4.5rem;
  height: 3px;
  margin: 0.55rem auto 0;
  background: var(--gold);
  border-radius: 2px;
}

.landing-tagline {
  font-size: 1.25rem;
  color: var(--sea);
  margin: 0 0 0.5rem;
}

.landing-status {
  font-style: italic;
  opacity: 0.7;
}

/* ── Dominanter Play-CTA (Batch 0.8.0, A-L1…A-L3) — Gold-Siegel-Optik. Der
   Ruhezustand ist STILL: kein Puls/Glow-Loop/Wobble/Countdown/Zähler (A-L2).
   Bewegung ausschließlich auf :hover/:focus-visible (Swell). ── */
.landing-cta {
  margin-top: 1.75rem;
}
.play-now {
  display: inline-block;
  padding: 1rem 2.9rem;
  font-family: inherit;
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-decoration: none;
  color: var(--ink);
  /* Geschichtete Goldfläche (radial) + Doppel-Rahmen (Ink-Außenlinie via border,
     helle Innenkante via inset-Highlight) + Emboss-Schatten. */
  background: radial-gradient(125% 145% at 50% 18%, #efd777 0%, #d7b23c 46%, #b28a26 100%);
  border: 2px solid var(--ink);
  border-radius: 0.55rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 249, 224, 0.9),
    inset 0 -2px 5px rgba(120, 90, 20, 0.4),
    0 4px 11px rgba(14, 33, 43, 0.28);
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}
.play-now:hover,
.play-now:focus-visible {
  transform: scale(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 249, 224, 0.95),
    inset 0 -2px 5px rgba(120, 90, 20, 0.45),
    0 9px 20px rgba(14, 33, 43, 0.34);
}
.play-now:focus-visible {
  outline: 3px solid var(--sea-deep);
  outline-offset: 3px;
}
.play-now-sub {
  margin: 0.8rem 0 0;
  font-size: 0.95rem;
  color: var(--sea);
  opacity: 0.85;
}

/* ── Staggered-Reveal (einmalig pro Load; nur opacity/transform, KEIN
   Scroll-Re-Trigger). reduced-motion schaltet Reveal UND CTA-Swell ab (A-L2). ── */
@keyframes tw-fade-rise {
  from {
    opacity: 0;
    transform: translateY(0.8rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.landing-title,
.landing-tagline,
.landing-cta,
.landing-band {
  animation: tw-fade-rise 0.55s ease-out both;
}
.landing-title {
  animation-delay: 0.13s;
}
.landing-tagline {
  animation-delay: 0.2s;
}
.landing-cta {
  animation-delay: 0.3s;
}
.landing-band {
  animation-delay: 0.44s;
}

@media (prefers-reduced-motion: reduce) {
  .landing-title,
  .landing-tagline,
  .landing-cta,
  .landing-band {
    animation: none;
  }
  .play-now {
    transition: none;
  }
  .play-now:hover,
  .play-now:focus-visible {
    transform: none;
  }
}

/* ── Aktivitäts-Band (Batch 0.8.0): Lobby-Liste (join) DANN Live-Matches
   (watch), NACH Hero+CTA (A-L1/A-L6). Ruhige Feed-Updates: KEINE Transitions an
   den Feed-Sektionen (A-L6). ── */
.landing-band {
  margin-top: 2.75rem;
}

/* ── Runden-Ticker (Batch 0.8.0, A-T4…A-T6): ruhige Statzeile am KOPF des
   Aktivitäts-Bands. Bewusst ZURÜCKHALTEND — Small-Caps in See-Ton mit
   reduzierter Deckkraft, damit sie den goldenen Play-CTA nie konkurrenziert.
   KEIN eigenes Motion (nur der einmalige Band-Reveal via .landing-band). ── */
.rounds-ticker {
  max-width: 40rem;
  margin: 0 auto 1.75rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sea);
  opacity: 0.75;
}

.site-footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

.play-card {
  width: 100%;
  max-width: 24rem;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(14, 58, 76, 0.25);
  border-radius: 0.6rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.play-card h2 {
  margin: 0;
  color: var(--sea-deep);
  font-size: 1.4rem;
}

.play-sub {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.8;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.field select,
.field input {
  padding: 0.6rem;
  font: inherit;
  border: 1px solid rgba(14, 58, 76, 0.4);
  border-radius: 0.35rem;
  background: var(--paper);
  color: var(--ink);
}

.field input {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-align: center;
}

.difficulty-legend {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  opacity: 0.75;
  line-height: 1.5;
}

/* Modus-Auswahl im Create-Form (Batch 0.5.0, GAME_DESIGN §15). */
.mode-choice {
  border: 1px solid rgba(14, 58, 76, 0.25);
  border-radius: 0.5rem;
  padding: 0.5rem 0.7rem 0.6rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.mode-choice legend {
  font-size: 0.9rem;
  font-weight: bold;
  padding: 0 0.3rem;
}
.mode-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}
.mode-option-body {
  display: flex;
  flex-direction: column;
}
.mode-option-desc {
  font-size: 0.8rem;
  opacity: 0.75;
}

.play-button {
  display: inline-block;
  margin-top: auto;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  color: var(--paper);
  background: var(--sea-deep);
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
}

.play-button:hover {
  background: var(--sea);
}

/* ── Live match view (Three.js — Charter-Ausnahme) ──────────────────────── */
.match-body {
  overflow: hidden;
  background: #06222e;
}

.match-root {
  position: fixed;
  inset: 0;
  color: #eef6f8;
  font-family: Georgia, 'Times New Roman', serif;
  user-select: none;
}

.battlefield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 0.6rem;
  background: linear-gradient(rgba(4, 20, 28, 0.75), transparent);
}

.hud-stat {
  font-size: 1.1rem;
  font-weight: bold;
  text-shadow: 0 1px 2px #000;
}

.hud-stat .label {
  font-size: 0.7rem;
  opacity: 0.7;
  font-weight: normal;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Spieler-HUD-Zuschauerindikator (Batch 0.7.0, Feature 2): ruhiger, statischer
   Stat-Chip neben den .hud-stats — dezenter (normal weight, gedämpft), KEINE
   Motion/Farb-Hitze (A-S3). Bei count 0 verbirgt der Client das Element via
   [hidden]-Attribut (A-S1) — hier bewusst KEIN eigenes display, damit die
   [hidden]-UA-Regel (display:none) greift. */
.hud-spectators {
  align-self: center;
  font-size: 0.95rem;
  font-weight: normal;
  opacity: 0.8;
  text-shadow: 0 1px 2px #000;
  font-variant-numeric: tabular-nums;
}

/* F3 Mute-Toggle (Batch 0.14.0): dezenter Icon-Button in der HUD-Topbar,
   client-gerendert (auch für Zuschauer). Zustand über aria-pressed + .muted +
   Icon ablesbar. pointer-events aktiv, da die Topbar reine Ausgabe ist. */
.hud-sound-toggle {
  align-self: center;
  background: rgba(4, 20, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.3rem;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.28rem 0.42rem;
  pointer-events: auto;
}
.hud-sound-toggle:hover {
  border-color: rgba(255, 255, 255, 0.32);
}
.hud-sound-toggle.muted {
  opacity: 0.55;
}

.hud-preview {
  position: absolute;
  top: 3.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  background: rgba(4, 20, 28, 0.6);
  padding: 0.3rem 0.7rem;
  border-radius: 0.4rem;
}

.preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.preview-swatch {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 0.2rem;
  display: inline-block;
}

.hud-players {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  text-align: right;
}

.hud-players .player-row {
  background: rgba(4, 20, 28, 0.55);
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
}

.hud-players .player-row.disconnected {
  opacity: 0.45;
  font-style: italic;
}

.hud-shop {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.6rem;
  background: linear-gradient(transparent, rgba(4, 20, 28, 0.8));
  pointer-events: auto;
}

.shop-card {
  min-width: 7rem;
  max-width: 9rem;
  background: rgba(12, 40, 52, 0.9);
  border: 2px solid transparent;
  border-radius: 0.4rem;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: inherit;
  text-align: left;
}

.shop-card:hover {
  border-color: var(--gold);
}

.shop-card.selected {
  border-color: var(--gold);
  background: rgba(30, 70, 84, 0.95);
}

.shop-card.unaffordable {
  opacity: 0.45;
}

.shop-card .name {
  font-weight: bold;
  display: block;
}

.shop-card .cost {
  color: var(--gold);
}

.shop-card .swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 0.15rem;
  margin-right: 0.3rem;
  vertical-align: middle;
}

/* Fleet Intelligence: kompakte Karten-Face-Stat-Zeile (A5 — genau eine). */
.shop-card .stat-line {
  display: block;
  margin: 0.15rem 0;
  font-size: 0.72rem;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

/* ── PvP „Plünderkrieg": Send-Menü + Gegner-Panel (GAME_DESIGN §15) ── */
.send-menu {
  position: absolute;
  left: 0.6rem;
  bottom: 6rem;
  width: min(15rem, 44vw);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(4, 20, 28, 0.82);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 0.5rem;
  padding: 0.5rem 0.6rem;
  pointer-events: auto;
  font-size: 0.8rem;
}
.send-menu[hidden] {
  display: none;
}
.send-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.send-title {
  font-weight: bold;
  color: var(--gold);
}
.send-orders {
  font-size: 0.75rem;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}
.send-myincome {
  font-size: 0.75rem;
  opacity: 0.9;
}
.send-myincome .label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  margin-right: 0.3rem;
}
.send-lanes {
  display: flex;
  gap: 0.3rem;
}
.send-lane {
  flex: 1;
  font: inherit;
  font-size: 0.75rem;
  padding: 0.35rem;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.3rem;
  background: rgba(12, 40, 52, 0.8);
  color: inherit;
  cursor: pointer;
}
.send-lane.selected {
  border-color: var(--gold);
  background: rgba(30, 70, 84, 0.95);
}
.send-cards {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.send-card {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  text-align: left;
  font: inherit;
  font-size: 0.78rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  background: rgba(12, 40, 52, 0.85);
  color: inherit;
  cursor: pointer;
}
.send-card:hover:not(:disabled) {
  border-color: var(--gold);
}
.send-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.send-card.unaffordable {
  opacity: 0.5;
}
/* Aufgeben (PvP): nüchtern-grau; „armed" = Bestätigungsfenster deutlich. */
.surrender-btn {
  margin-top: 0.5rem;
  opacity: 0.65;
  border-color: rgba(148, 163, 178, 0.5);
}
.surrender-btn:hover {
  opacity: 1;
}
.surrender-btn.armed {
  opacity: 1;
  border-color: var(--gold);
  background: rgba(84, 52, 30, 0.9);
}
.send-name {
  font-weight: bold;
}
.send-cost {
  color: var(--gold);
}
.send-income {
  font-size: 0.7rem;
  opacity: 0.8;
}
/* A3: konservative Payback-Zeile (immer „~"), gedämpft — kein „bester Deal". */
.send-payback {
  font-size: 0.68rem;
  opacity: 0.65;
  font-variant-numeric: tabular-nums;
}

.hud-enemy {
  position: absolute;
  top: 8rem;
  right: 0.6rem;
  width: min(12rem, 42vw);
  background: rgba(4, 20, 28, 0.7);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 0.45rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.82rem;
  text-align: right;
  pointer-events: none;
}
.hud-enemy[hidden] {
  display: none;
}
.enemy-head {
  font-weight: bold;
  color: var(--gold);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}
.enemy-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-variant-numeric: tabular-nums;
}
.enemy-row .label {
  opacity: 0.7;
}

.tower-panel {
  position: absolute;
  transform: translate(-50%, -120%);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 9rem;
  background: rgba(4, 20, 28, 0.92);
  padding: 0.4rem;
  border-radius: 0.4rem;
  pointer-events: auto;
  z-index: 5;
}

/* Fleet Intelligence: Turm-Info über den (unveränderten) Upgrade-/Sell-Buttons. */
.tower-panel .tp-head {
  font-weight: bold;
  color: var(--gold);
  font-size: 0.82rem;
}
.tower-panel .tp-level {
  font-weight: normal;
  opacity: 0.8;
}
.tower-panel .tp-stats {
  font-size: 0.72rem;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}
.tower-panel .tp-next {
  font-size: 0.72rem;
  color: var(--gold);
  opacity: 0.9;
  font-variant-numeric: tabular-nums;
}
.tower-panel-actions {
  display: flex;
  gap: 0.4rem;
}

.tower-panel button {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
  border: none;
  border-radius: 0.3rem;
  background: var(--sea-deep);
  color: var(--paper);
  cursor: pointer;
}

.tower-panel button:hover {
  background: var(--sea);
}

/* Fix 0.12.0 (A/B): Sperren sichtbar machen (Gold fehlt / fremder Turm / Max-Level)
   + Erbauer-Zeile fremder Türme. Muster wie .shop-card/.send-card.unaffordable. */
.tower-panel button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.tower-panel button:disabled:hover {
  background: var(--sea-deep);
}
.tower-panel .tp-owner {
  font-size: 0.72rem;
  opacity: 0.75;
  margin: 0.1rem 0 0.2rem;
}

.toast-stack {
  position: absolute;
  bottom: 6.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  pointer-events: none;
  width: min(90%, 32rem);
}

.toast {
  background: rgba(4, 20, 28, 0.9);
  border-left: 3px solid var(--gold);
  padding: 0.5rem 0.8rem;
  border-radius: 0.3rem;
  font-size: 0.9rem;
  animation: toast-fade 5s forwards;
}

.toast.banner {
  border-left-color: #d98b3a;
  font-size: 1.1rem;
  font-weight: bold;
}

@keyframes toast-fade {
  0% { opacity: 0; transform: translateY(0.5rem); }
  8% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

/* F4 First-Match-Hints (Batch 0.14.0): dezente, dismissbare Karte im Toast-Stack
   (bewusst KEIN toast-fade — bleibt bis Dismiss/Ersetzung sichtbar). Der Stack
   ist pointer-events:none, daher hier explizit auto (der „×"-Button klickbar). */
.hint-card {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  max-width: 32rem;
  background: rgba(4, 20, 28, 0.92);
  border-left: 3px solid var(--gold);
  border-radius: 0.3rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  line-height: 1.4;
  pointer-events: auto;
  animation: hint-in 0.3s ease-out;
}
.hint-text {
  flex: 1;
}
.hint-dismiss {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0 0.15rem;
  opacity: 0.65;
}
.hint-dismiss:hover {
  opacity: 1;
}
@keyframes hint-in {
  from { opacity: 0; transform: translateY(0.4rem); }
  to { opacity: 1; transform: translateY(0); }
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(4, 18, 26, 0.85);
  pointer-events: auto;
  text-align: center;
  padding: 1.5rem;
  /* Tall content (Lobby: QR + Slots + Difficulty + Ready + Start) darf nie
     unerreichbar unter dem Fold verschwinden — scrollbar statt beidseitig
     geclippt (justify-content:center clippt sonst oben UND unten). */
  overflow-y: auto;
}

.overlay[hidden] {
  display: none;
}

.overlay h2 {
  font-size: 2rem;
  margin: 0;
  color: var(--gold);
}

.overlay .lobby-players,
.overlay .result-stats {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: min(90%, 26rem);
}

.overlay .lobby-player,
.overlay .result-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(12, 40, 52, 0.8);
  padding: 0.5rem 0.9rem;
  border-radius: 0.35rem;
}

.overlay .crowned {
  border: 1px solid var(--gold);
}

.overlay .badge {
  color: var(--gold);
  font-size: 0.8rem;
}

.overlay button,
.overlay select {
  font: inherit;
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 0.4rem;
  background: var(--sea-deep);
  color: var(--paper);
  cursor: pointer;
}

.overlay button:hover {
  background: var(--sea);
}

.overlay button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.overlay .hint {
  opacity: 0.7;
  font-size: 0.85rem;
}

.ghost-invalid {
  cursor: not-allowed;
}

.badge {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: bold;
}

.ping {
  opacity: 0.6;
  font-size: 0.75rem;
}

.preview-veil {
  font-style: italic;
  opacity: 0.85;
}

button.mini {
  font: inherit;
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border: none;
  border-radius: 0.25rem;
  background: var(--gold);
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
}

/* ── Slice B: HUD-Vollausbau ─────────────────────────────────────────────── */

/* Sichere Ränder (Notches) + Grund-Padding. */
.hud-top {
  padding-top: max(0.6rem, env(safe-area-inset-top));
}
.hud-shop {
  padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
}
.hud-players {
  top: max(0.6rem, env(safe-area-inset-top));
  right: max(0.6rem, env(safe-area-inset-right));
}

/* Spielerliste: Verbindungs-Dot, Name, Ping, Krone. */
.hud-players .player-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
}
.hud-players .pname {
  font-weight: bold;
}
.conn-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.conn-dot.on {
  background: #56c271;
  box-shadow: 0 0 4px #56c271;
}
.conn-dot.off {
  background: #7a4b4b;
}
.ping {
  opacity: 0.75;
  font-size: 0.72rem;
}
.ping-good {
  color: #7fd08a;
}
.ping-mid {
  color: #e6c05a;
}
.ping-bad {
  color: #e0705a;
}

/* Krone (status-only) — CSS-Silhouette, keine Bild-Datei/Emoji. */
.crown-mark {
  display: inline-block;
  width: 0.8rem;
  height: 0.68rem;
  background: var(--gold);
  clip-path: polygon(0 100%, 0 32%, 25% 58%, 50% 4%, 75% 58%, 100% 32%, 100% 100%);
  flex: none;
}

/* Shop-Karten: DamageType-/Ziel-Badges. */
.shop-card .badges {
  display: flex;
  gap: 0.25rem;
  margin: 0.2rem 0;
  flex-wrap: wrap;
}
.badge.dmg,
.badge.tgt {
  font-size: 0.62rem;
  padding: 0.02rem 0.32rem;
  border-radius: 0.6rem;
  font-weight: bold;
  letter-spacing: 0.02em;
}
.badge.tgt {
  background: rgba(255, 255, 255, 0.14);
  color: #dfeef2;
}
.badge.dmg {
  color: #14212b;
}
.dmg-arrow {
  background: #e7c65a;
}
.dmg-bolt {
  background: #b9c4cf;
}
.dmg-stone {
  background: #c8a06a;
}
.dmg-pitch {
  background: #e4802a;
  color: #1a0f06;
}
.chip-lands {
  margin-left: 0.2rem;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

/* Zweizeiliges Wellen-Banner. */
.wave-banner {
  text-align: center;
  border-left: none;
  border-top: 2px solid #d98b3a;
  border-bottom: 2px solid #d98b3a;
  padding: 0.5rem 1rem;
}
.wave-banner.tsunami {
  border-color: #4aa3c4;
  background: rgba(10, 34, 46, 0.94);
}
.wave-banner-title {
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--gold);
}
.wave-banner.tsunami .wave-banner-title {
  color: #8fd3ec;
}
.wave-banner-flavor {
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.85;
  margin-top: 0.15rem;
}

/* Lobby: Room-Code + Copy, leere Slots, Difficulty-Beschreibung. */
.room-code-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
}
.room-code {
  font-size: 1.8rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  padding-left: 0.35em;
}
/* Direktbeitritt-QR: ruhige weiße Karte (Ruhezone), zentriert, keine Animation. */
.lobby-qr-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.lobby-qr {
  width: 160px;
  height: 160px;
  padding: 0.5rem;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
.lobby-qr-hint {
  margin: 0;
}
.lobby-player.empty {
  opacity: 0.4;
  font-style: italic;
}
.diff-desc {
  margin-top: -0.4rem;
}
.lobby-mode-line {
  margin-top: -0.5rem;
  font-style: italic;
}
.crown-note {
  font-style: italic;
}
.result-summary {
  opacity: 0.85;
  font-size: 0.9rem;
}

/* Ergebnis-Outcome-Badge (Batch 0.5.0) — groß über der Poesie-Headline.
   Sieg gold, Niederlage nüchtern sturm-grau (KEIN Alarm-Rot, Loss-Aversion-frei),
   Draw/Abandoned neutral. */
.result-outcome {
  margin: 0 0 -0.4rem;
  font-size: 2.4rem;
  font-weight: bold;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.result-outcome--victory {
  color: var(--gold);
}
.result-outcome--defeat {
  color: #9fb2bd;
}
.result-outcome--draw,
.result-outcome--abandoned {
  color: #cdd7dd;
}

/* Match-Start-Countdown (A-CD1): dedizierte Fläche über dem Lobby-Overlay, die
   AUSSCHLIESSLICH das Label + die große Zahl trägt (nie Notice/CTA/Promo).
   z-index:12 liegt über `.overlay` (auto) und UNTER `.reconnect-overlay` (z-20 —
   Verbindungswahrheit dominiert). pointer-events:none → die Fläche fängt keine
   Klicks (das Lobby-Overlay darunter bleibt bedienbar). Eigene [hidden]-Regel,
   weil das display:flex das UA-Default von [hidden] sonst überschriebe. */
.countdown-display {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  z-index: 12;
  pointer-events: none;
  text-align: center;
}
.countdown-display[hidden] {
  display: none;
}
.countdown-label {
  font-size: clamp(1rem, 4vw, 1.6rem);
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e7edf1;
  text-shadow: 0 2px 12px rgba(4, 12, 18, 0.95);
}
.countdown-number {
  font-size: clamp(4rem, 18vw, 9rem);
  font-weight: bold;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 4px 24px rgba(4, 12, 18, 0.95), 0 0 10px rgba(4, 12, 18, 0.85);
}
.countdown-pulse {
  animation: countdown-pop 0.9s ease-out;
}
@keyframes countdown-pop {
  0% { opacity: 0; transform: scale(1.6); }
  22% { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}

/* Reconnect-Overlay (über allem). */
.reconnect-overlay {
  z-index: 20;
  background: rgba(4, 18, 26, 0.9);
}
.spinner {
  width: 2.4rem;
  height: 2.4rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Touch-Targets + Umbruch auf schmalen Viewports (Match spielbar auf Phone). */
@media (max-width: 640px) {
  /* ── Top-HUD: zwei kollisionsfreie Bänder statt drei überlagerter Layer ──
     Band A (oben): kompakte, umbrechende Statuszeile (Insel/Welle/Gold).
     Band B (darunter): Wellen-Vorschau LINKS + Spielerliste RECHTS.
     Alle B-Offsets tragen env(safe-area-inset-top) mit (Notch-Konsistenz zu den
     Slice-B-Regeln) — die Vorschau rutscht nicht mehr unter die Statuszeile,
     die Spielerliste nicht mehr über die Gold-/Wellen-Anzeige. */
  .hud-top {
    flex-wrap: wrap;
    gap: 0.2rem 0.6rem;
    padding: max(0.4rem, env(safe-area-inset-top)) 0.5rem 0.35rem;
  }
  .hud-stat {
    font-size: 0.85rem;
  }
  .hud-stat .label {
    font-size: 0.6rem;
  }
  .hud-players {
    top: calc(5.6rem + env(safe-area-inset-top));
    right: max(0.4rem, env(safe-area-inset-right));
    max-width: 54vw;
    font-size: 0.76rem;
  }
  .hud-players .player-row {
    min-width: 0;
  }
  /* Lange Nicknames ellipsen statt in die Bildmitte zu wuchern. */
  .hud-players .pname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .hud-preview {
    top: calc(5.6rem + env(safe-area-inset-top));
    left: max(0.4rem, env(safe-area-inset-left));
    right: auto;
    transform: none;
    max-width: 44vw;
    flex-wrap: wrap;
    font-size: 0.72rem;
  }
  .hud-shop {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .shop-card {
    min-width: 6.2rem;
    min-height: 44px;
    flex: 0 0 auto;
  }
  /* Untere Flächen über der Shop-Leiste halten (Shop-Streifen ~102 px hoch):
     Toasts/Wellen-Banner und das PvP-Send-Menü dürfen sie nicht überlappen. */
  .toast-stack {
    bottom: calc(7rem + env(safe-area-inset-bottom));
  }
  .send-menu {
    bottom: calc(7rem + env(safe-area-inset-bottom));
  }
  .room-code {
    font-size: 1.3rem;
    letter-spacing: 0.2em;
  }
  /* Overlays (Lobby/Ergebnis) von oben scrollen statt beidseitig clippen —
     „Sturm starten" bleibt so auf jedem Phone erreichbar. */
  .overlay {
    justify-content: flex-start;
    padding-top: max(1.25rem, env(safe-area-inset-top));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }
  .overlay button,
  .tower-panel button {
    min-height: 44px;
  }
  button.mini {
    min-height: 32px;
  }
}

/* Kurze (Landscape-)Phones: Overlay ebenfalls oben verankern, damit tall
   content scrollbar bleibt statt zentriert oben/unten wegzuclippen. */
@media (max-height: 600px) {
  .overlay {
    justify-content: flex-start;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Meta-Surface (Batch 0.4.0) — Landing-Erweiterungen, Changelog, Feedback,
   Cross-Promo, Lobby-Liste, Admin. Reines CSS (keine inline-Styles, nonce-CSP).
   ════════════════════════════════════════════════════════════════════════ */

/* ── Footer-Navigation (Changelog/Feedback — Navigation, kein CTA) ─────────── */
.site-footer {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
}
.footer-nav {
  display: flex;
  gap: 1.2rem;
}
.footer-nav a {
  color: var(--sea);
  text-decoration: none;
}
.footer-nav a:hover {
  text-decoration: underline;
}

/* ── Landing hero banner (Package 6) — CLS 0 via feste width/height + auto.
   Größe/Radius/Margin liegen jetzt am `.landing-hero-wrap` (Scrim + Titel-
   Überlappung, Batch 0.8.0); das <img> füllt nur den Wrapper. ── */
.landing-hero {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Panel-Deko-Icons (Pixel-Art, klein, dekorativ) ───────────────────────── */
.panel-icon {
  image-rendering: pixelated;
  vertical-align: middle;
  margin-right: 0.45rem;
}
.play-card h2 {
  display: flex;
  align-items: center;
}

/* ── Create: „privat"-Checkbox + Wirkort-Satz ─────────────────────────────── */
.field-check {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
.field-check input {
  width: auto;
}
.wirkort {
  margin-top: -0.4rem;
  font-size: 0.82rem;
}

/* ── Public-Lobby-Liste (FOMO-frei) ───────────────────────────────────────── */
.lobby-list {
  max-width: 40rem;
  margin: 2.5rem auto 0;
}
.lobby-list h2 {
  color: var(--sea-deep);
  font-size: 1.4rem;
  margin: 0 0 0.75rem;
  text-align: center;
}
.lobby-empty {
  text-align: center;
  opacity: 0.75;
  font-style: italic;
}
.lobby-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.lobby-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(14, 58, 76, 0.2);
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
}
/* Room-Code als „Stempel"-Badge (Logbuch-Ästhetik, Batch 0.8.0): Monospace,
   dünner Ink-Rahmen, Papier-Grund. Gilt für Lobby- UND Live-Zeilen. */
.lobby-code {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  letter-spacing: 0.16em;
  color: var(--sea-deep);
  border: 1.5px solid rgba(14, 58, 76, 0.35);
  border-radius: 0.25rem;
  padding: 0.08rem 0.45rem;
  background: rgba(244, 236, 217, 0.55);
}
.lobby-diff {
  opacity: 0.85;
}
.lobby-mode {
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  padding: 0.05rem 0.4rem;
  border-radius: 0.6rem;
  background: rgba(14, 58, 76, 0.14);
  color: var(--sea-deep);
}
.lobby-count {
  margin-left: auto;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}
.lobby-join {
  margin: 0;
}
.play-button.mini-join {
  margin-top: 0;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

/* ── Kampfinsel Cross-Promo-Karte (Gate P1–P12: statisch, reiz-arm) ────────── */
.crosspromo-card {
  max-width: 40rem;
  margin: 2.5rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  background: rgba(14, 58, 76, 0.06);
  border: 1px solid rgba(14, 58, 76, 0.18);
  border-radius: 0.6rem;
  padding: 1.25rem;
}
.crosspromo-banner-link {
  flex: 0 0 auto;
  display: block;
}
.crosspromo-banner {
  image-rendering: pixelated;
  display: block;
  width: 100%;
  max-width: 20rem;
  height: auto;
  border-radius: 0.4rem;
}
.crosspromo-body {
  flex: 1 1 16rem;
}
.crosspromo-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.65;
}
.crosspromo-copy {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  line-height: 1.5;
}
.crosspromo-textlink {
  color: var(--sea);
  font-size: 0.9rem;
}

/* F5 „Logbuch des Käpt'ns" (Batch 0.14.0): ruhige, gerätelokale Statistik-Sektion
   NACH dem Aktivitäts-Band. CTA-frei, vergleichsfrei, verfallsfrei (A7). Per
   Default hidden (SSR, [hidden]-UA-Regel); landing-stats.js unhidet nur bei
   played>0. Zurückhaltender See-Ton wie die Crosspromo-Karte. */
.captain-log {
  max-width: 40rem;
  margin: 2.5rem auto 0;
  text-align: center;
  background: rgba(14, 58, 76, 0.06);
  border: 1px solid rgba(14, 58, 76, 0.18);
  border-radius: 0.6rem;
  padding: 1.1rem 1.25rem;
}
.captain-log-heading {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.captain-log-stats {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  justify-content: center;
  align-items: baseline;
  font-size: 0.95rem;
}
.log-value {
  font-weight: bold;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.log-sep {
  opacity: 0.4;
}

/* ── Gemeinsamer Seiten-Header (Changelog/Feedback) ───────────────────────── */
.page-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.page-header-icon {
  image-rendering: pixelated;
  flex: 0 0 auto;
}
.page-title {
  margin: 0;
  color: var(--sea-deep);
  font-size: 2rem;
}
.page-intro {
  margin: 0.25rem 0 0;
  color: var(--sea);
}
.page-notice {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.75;
}

/* ── Changelog ────────────────────────────────────────────────────────────── */
.changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.changelog-entry {
  border-left: 3px solid var(--gold);
  padding: 0.25rem 0 0.25rem 1rem;
}
.changelog-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}
.changelog-badge {
  padding: 0.05rem 0.5rem;
  border-radius: 0.6rem;
  font-weight: bold;
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.68rem;
}
.cat-added {
  background: #2f7d4f;
}
.cat-changed {
  background: var(--sea);
}
.cat-fixed {
  background: #8a6d1f;
}
.cat-removed {
  background: #8a3a3a;
}
.changelog-version {
  font-weight: bold;
  opacity: 0.8;
}
.changelog-date {
  opacity: 0.6;
}
.changelog-entry-title {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  color: var(--sea-deep);
}
.changelog-body {
  margin: 0;
  line-height: 1.55;
}
.changelog-empty {
  opacity: 0.75;
  font-style: italic;
}

/* ── Feedback ─────────────────────────────────────────────────────────────── */
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 34rem;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(14, 58, 76, 0.2);
  border-radius: 0.6rem;
  padding: 1.25rem;
  margin-bottom: 2rem;
}
.field textarea {
  padding: 0.6rem;
  font: inherit;
  border: 1px solid rgba(14, 58, 76, 0.4);
  border-radius: 0.35rem;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.feedback-list-heading {
  color: var(--sea-deep);
  margin-bottom: 0.25rem;
}
.feedback-expectation {
  margin: 0 0 1.25rem;
  font-style: italic;
  opacity: 0.8;
}
.feedback-notice {
  background: rgba(47, 125, 79, 0.12);
  border-radius: 0.4rem;
  padding: 0.5rem 0.8rem;
}
.feedback-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.feedback-row {
  display: flex;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(14, 58, 76, 0.18);
  border-radius: 0.5rem;
  padding: 0.75rem 0.9rem;
}
.feedback-content {
  flex: 1;
}
.feedback-row-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}
.feedback-type {
  padding: 0.03rem 0.5rem;
  border-radius: 0.6rem;
  font-weight: bold;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(14, 58, 76, 0.14);
  color: var(--sea-deep);
}
.type-bug {
  background: rgba(138, 58, 58, 0.18);
  color: #7a2f2f;
}
.type-balance {
  background: rgba(138, 109, 31, 0.18);
  color: #6d5518;
}
.feedback-date {
  opacity: 0.6;
}
.feedback-title {
  margin: 0;
  font-weight: bold;
}
.feedback-desc {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  opacity: 0.9;
}
.feedback-empty {
  opacity: 0.75;
  font-style: italic;
}

/* Vote-Control (up/down + Score; oder gesperrt mit Erklärsatz) */
.vote-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 3rem;
  flex: 0 0 auto;
}
.vote-form {
  margin: 0;
  line-height: 1;
}
.vote-btn {
  font: inherit;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.15rem 0.4rem;
  border: 1px solid rgba(14, 58, 76, 0.3);
  border-radius: 0.3rem;
  background: var(--paper);
  color: var(--sea-deep);
  cursor: pointer;
}
.vote-btn:hover {
  border-color: var(--gold);
}
.vote-btn.active.vote-up {
  background: #2f7d4f;
  color: var(--paper);
  border-color: #2f7d4f;
}
.vote-btn.active.vote-down {
  background: #8a3a3a;
  color: var(--paper);
  border-color: #8a3a3a;
}
.vote-score {
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}
.vote-locked {
  min-width: 6rem;
}
.vote-lock-note {
  font-size: 0.68rem;
  text-align: center;
  opacity: 0.7;
  line-height: 1.2;
}

/* ── Account / Auth v1 (Batch 0.9.0) — Login/Register-Karten + Profil ─────── */
.account-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  align-items: start;
}
.account-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(14, 58, 76, 0.2);
  border-radius: 0.6rem;
  padding: 1.25rem;
}
.account-form-title {
  margin: 0;
  color: var(--sea-deep);
  font-size: 1.15rem;
}
/* Account-Eingaben tragen NICHT den Room-Code-Look von `.field input`
   (uppercase/gesperrt/zentriert) — normaler, linksbündiger Text. */
.account-field input {
  text-transform: none;
  letter-spacing: normal;
  text-align: left;
}
.account-hint {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.75;
  line-height: 1.4;
}
.account-disclosure {
  font-style: italic;
}
.account-notice {
  border-radius: 0.4rem;
  padding: 0.5rem 0.8rem;
  font-style: normal;
  opacity: 1;
}
.account-error {
  background: rgba(138, 58, 58, 0.12);
  color: #7a2f2f;
}
.account-ok {
  background: rgba(47, 125, 79, 0.12);
  color: #276641;
}
.account-profile {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 28rem;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(14, 58, 76, 0.2);
  border-radius: 0.6rem;
  padding: 1.25rem;
}
.account-signed-in {
  margin: 0;
  font-size: 1.1rem;
}
.account-name {
  color: var(--sea-deep);
}
.account-member-since {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.75;
}
.account-logout {
  margin: 0.5rem 0 0;
}

/* ── Admin-Dashboard ──────────────────────────────────────────────────────── */
.admin-body {
  background: #eef2f0;
}
.admin,
.admin-login {
  max-width: 54rem;
  margin: 0 auto;
}
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.admin-head form {
  margin: 0;
}
.admin-section {
  color: var(--sea-deep);
  border-bottom: 2px solid rgba(14, 58, 76, 0.2);
  padding-bottom: 0.3rem;
  margin-top: 2rem;
}
.admin-subsection {
  color: var(--sea);
  font-size: 1rem;
  margin: 1rem 0 0.4rem;
}
.admin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.admin-stat {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(14, 58, 76, 0.18);
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 1.3rem;
  font-weight: bold;
}
.admin-stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}
.admin-dist {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.admin-dist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 12rem;
}
.admin-dist-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.2rem 0;
  border-bottom: 1px dashed rgba(14, 58, 76, 0.15);
}
.admin-chart {
  display: block;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0.4rem;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(14, 58, 76, 0.15);
}
.admin-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
}
.admin-table .row-hidden {
  opacity: 0.5;
}
.admin-table .mono {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}
.admin-table form {
  margin: 0;
}
.admin-empty {
  opacity: 0.7;
  font-style: italic;
}

/* ── Analytics v2 Event-Panel (Batch 0.7.3) ──────────────────────────────── */
.admin-funnel {
  max-width: 32rem;
}
.admin-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1.5rem;
}
.admin-event-tile {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(14, 58, 76, 0.15);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem 1rem;
}
.admin-event-tile .admin-subsection {
  margin-top: 0;
}
.admin-event-desc {
  font-size: 0.78rem;
  opacity: 0.7;
  margin: 0 0 0.6rem;
}
.admin-event-tile .admin-stats {
  gap: 0.6rem;
}
.admin-event-tile .admin-stat {
  font-size: 1.05rem;
  padding: 0.4rem 0.7rem;
}
.admin-event-tile .admin-dist {
  gap: 1rem;
  margin-top: 0.6rem;
}
.admin-event-tile .admin-dist-list {
  min-width: 8rem;
  font-size: 0.8rem;
}

/* ── Live-Zuschauen (Batch 0.6.0, Gate live-spectating) ───────────────────── */
/* Landing „Jetzt live" (spiegelt .lobby-list; FOMO-frei). Leer → ganz aus, damit
   kein Phantom-Abstand entsteht (kein „nichts live"-Framing nötig). */
.live-matches {
  max-width: 40rem;
  margin: 2rem auto 0;
}
.live-matches:not(:has(.live-rows)) {
  display: none;
}
.live-matches h2 {
  color: var(--sea-deep);
  font-size: 1.4rem;
  margin: 0 0 0.75rem;
  text-align: center;
}
.live-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.live-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(14, 58, 76, 0.2);
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
}
.live-wave {
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

/* ── Mobile-Guard (Hotfix 0.8.1): Aktivitäts-Zeilen dürfen auf schmalen
   Viewports UMBGRECHEN statt den Body zu verbreitern. Latenter Altbestand
   (Zeilen waren flex ohne wrap), sichtbar erst mit ECHTEN Live-Daten —
   lokale QA hatte leere Listen (Prod-Screenshot 2026-07-05, 390px:
   globaler Rechts-Cutoff). Defense-in-Depth: overflow-x-Clip am Body,
   damit EIN überlaufendes Element nie wieder die ganze Seite verschiebt
   (lokaler Schnitt statt globalem Layout-Bruch — Feed injiziert Zeilen
   dynamisch, der Fehlerfall muss gutmütig bleiben). ── */
body {
  overflow-x: clip;
}
@media (max-width: 560px) {
  .lobby-row,
  .live-row {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }
}
.live-spectators {
  margin-left: auto;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}

/* LIVE-Badge: dezent-informativ, KEIN Alarm-Rot-Scarcity (ruhiges Teal + Punkt). */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.05rem 0.45rem;
  border-radius: 0.6rem;
  background: rgba(20, 120, 130, 0.16);
  color: var(--sea-deep);
}
.live-badge::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #1a97a2;
}

/* Match-Zuschauer-Chrome (dunkles Schlachtfeld-Theme). */
.spectator-chrome {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
  background: rgba(4, 20, 28, 0.6);
  padding: 0.35rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  z-index: 6;
}
.spectator-chrome .live-badge {
  background: rgba(20, 160, 175, 0.28);
  color: #e6f6f8;
}
.spectator-count {
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}
.spectate-nudge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.spectate-nudge-link {
  color: var(--gold);
  text-decoration: underline;
  font-size: 0.82rem;
}
.spectate-nudge-dismiss {
  background: transparent;
  border: none;
  color: #bcd7dc;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
}

/* Zuschauer: interaktive Bau-Leiste ausblenden (Shop wird nie gebaut → leer). */
.match-root[data-spectate] .hud-shop {
  display: none;
}

/* ── Landing v2 „Sofort aufs Wasser" (Batch 0.8.0) — Band-Zeilen + Join-Karte
   + /play. ────────────────────────────────────────────────────────────────── */

/* Aktivitäts-Zeilen als Logbuch-Einträge: dezente Gold-Randspalte links
   (Ledger-Anmutung). DOM/Klassen unverändert — nur CSS. */
.lobby-row,
.live-row {
  border-left: 3px solid rgba(201, 162, 39, 0.55);
}

/* Join-per-Code-Karte: die EINZIGE `form[action="/rooms"]` der Landing (A-L3),
   zentriert unter dem Aktivitäts-Band. */
.play-card--join {
  margin: 2.5rem auto 0;
}

/* /play „Kurs wählen": Logbuch-Seiten-Karte, zentriert. Trägt die Create-
   Konfiguration (Mode/Difficulty/Privat + Konsent, A-L4). */
.play {
  max-width: 30rem;
  margin: 0 auto;
  text-align: center;
}
.play-title {
  font-size: clamp(2rem, 6vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--sea-deep);
  margin: 0 0 0.5rem;
  text-shadow: 0 1px 0 rgba(244, 236, 217, 0.8);
}
.play-intro {
  color: var(--sea);
  font-size: 1.05rem;
  margin: 0 0 1.75rem;
}
/* Die Seiten-Karte ist die einzige Form; füllt die zentrierte `.play`-Spalte,
   Felder linksbündig. */
.play-page-card {
  max-width: none;
  text-align: left;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 14px rgba(14, 33, 43, 0.12);
}
/* Großer Submit in Play-Button-Optik — KEIN Gold-Siegel (das bleibt der einzige
   Landing-CTA `a.play-now`, A-L3). */
.play-button--go {
  font-size: 1.15rem;
  padding: 0.9rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.play-back {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--sea);
  text-decoration: none;
  font-size: 0.95rem;
}
.play-back:hover,
.play-back:focus-visible {
  text-decoration: underline;
}
