/* Eigene Seiten: Landing, Anmeldung, Statistik */

html:has(body.page),
body.page {
  overflow: auto;
  height: auto;
  min-height: 100%;
}
body.page {
  font-size: 16px;
  line-height: 1.55;
}
.page a {
  color: #ffd2a1;
}
.page a.btn {
  color: inherit;
  text-decoration: none;
}
.page a.btn-primary {
  color: var(--accent-ink);
}

/* ---------------------------------------------------------------- Kopfzeile */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: linear-gradient(180deg, rgba(14, 11, 23, 0.92), rgba(14, 11, 23, 0.7));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header.slim {
  position: absolute;
  left: 0;
  right: 0;
  background: none;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-header .brand {
  font-size: 26px;
  margin: 0;
}
.site-nav {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}
.site-nav a:hover {
  color: var(--text);
  background: var(--surface);
}
.site-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* ---------------------------------------------------------------- Landing: Hero */
.hero {
  position: relative;
  min-height: calc(100vh - 66px);
  min-height: calc(100svh - 66px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-scene,
.page-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.page-scene {
  position: fixed;
}
.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 7, 18, 0.88) 0%, rgba(10, 7, 18, 0.55) 34%, rgba(10, 7, 18, 0) 58%),
    linear-gradient(0deg, rgba(14, 11, 23, 1) 0%, rgba(14, 11, 23, 0) 22%);
}
.hero-content {
  position: relative;
  width: min(700px, 100%);
  padding: 0 clamp(16px, 5vw, 64px) clamp(40px, 9vh, 96px);
  pointer-events: none;
}
.hero-content > * {
  pointer-events: auto;
}
.eyebrow {
  margin: 0 0 10px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  margin: 0;
  font-family: var(--font);
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}
.lead {
  max-width: 540px;
  margin: 18px 0 26px;
  font-size: 18px;
  color: #e4def5;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-cta .btn:not(.btn-primary) {
  background: rgba(20, 16, 32, 0.6);
}
.hero-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- Landing: Abschnitte */
.section {
  padding: clamp(56px, 9vw, 110px) clamp(16px, 4vw, 40px);
  background: var(--bg);
}
.section.alt {
  background: #141021;
}
.section-inner {
  max-width: 1160px;
  margin: 0 auto;
}
.section h2 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.3px;
}
.section-lead {
  max-width: 680px;
  margin: 12px 0 34px;
  color: var(--muted);
  font-size: 17px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}
.feature {
  padding: 20px;
  border-radius: var(--radius);
  background: #17131f;
  border: 1px solid var(--border);
}
.feature h3 {
  margin: 12px 0 6px;
  font-size: 18px;
  font-weight: 800;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 184, 107, 0.12);
  color: var(--accent);
}
.room-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  min-height: 200px;
}
.room-card {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #17131f;
  border: 1px solid var(--border);
}
.room-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  image-rendering: pixelated;
}
.room-card figcaption {
  display: flex;
  flex-direction: column;
  padding: 12px 14px 14px;
  gap: 2px;
}
.room-card figcaption span {
  color: var(--muted);
  font-size: 14px;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.steps li {
  padding: 22px;
  border-radius: var(--radius);
  background: #17131f;
  border: 1px solid var(--border);
}
.steps h3 {
  margin: 12px 0 6px;
  font-weight: 800;
}
.steps p {
  margin: 0;
  color: var(--muted);
}
.step-n {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}
.final-cta {
  margin-top: 34px;
  display: flex;
  gap: 10px;
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 22px clamp(16px, 4vw, 40px);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  background: var(--bg);
}

/* ---------------------------------------------------------------- Anmeldung */
.page-auth {
  min-height: 100vh;
}
.page-scene-shade {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(270deg, rgba(10, 7, 18, 0.8) 0%, rgba(10, 7, 18, 0.35) 45%, rgba(10, 7, 18, 0.1) 70%);
}
.auth-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 80px clamp(16px, 6vw, 90px) 32px;
  pointer-events: none;
}
.auth-card {
  pointer-events: auto;
  width: min(430px, 100%);
  padding: 28px 26px 24px;
  background: rgba(20, 16, 32, 0.9);
}
.auth-title {
  margin: 0 0 14px;
  font-weight: 800;
  font-size: 28px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(8, 6, 14, 0.5);
  border: 1px solid var(--border);
}
.auth-tabs a {
  text-align: center;
  padding: 8px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}
.auth-tabs a.active {
  background: var(--surface-2);
  color: var(--text);
}
.auth-lead {
  margin: 0 0 16px;
  color: #ddd6ef;
}
.auth-card .field {
  margin-bottom: 12px;
}
.auth-card .error {
  color: #ffb3bb;
  min-height: 20px;
  margin: 4px 0 10px;
  font-weight: 700;
  font-size: 14px;
}
.auth-card .error:empty {
  min-height: 0;
  margin: 0 0 8px;
}
.form-aside {
  margin: -4px 0 8px;
  text-align: right;
  font-size: 14px;
}
.auth-switch {
  margin: 16px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 4px;
  color: var(--muted);
  font-size: 13px;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-strong);
}
.btn-discord {
  background: #5865f2;
  border-color: transparent;
  color: #fff;
}
.btn-discord:hover {
  background: #4752c4;
}
.page a.btn-discord {
  color: #fff;
}
.auth-figure {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(8, 6, 14, 0.45);
  border: 1px solid var(--border);
}
.auth-figure .segmented {
  width: 100%;
}
.auth-avatar {
  display: block;
  width: 64px;
  height: 96px;
  image-rendering: pixelated;
}
.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  margin-top: 12px;
  border-radius: 12px;
  background: rgba(143, 184, 255, 0.12);
  border: 1px solid rgba(143, 184, 255, 0.35);
  font-size: 14px;
}
.notice.success {
  background: rgba(123, 216, 143, 0.12);
  border-color: rgba(123, 216, 143, 0.4);
}

/* ---------------------------------------------------------------- Statistik */
.viz-root {
  --surface-1: #17131f;
  --series-1: #3987e5;
  --series-1-hover: #5598e7;
  --grid: #2a2538;
  --axis: #3d3650;
  --ink-2: #cbc4e0;
  --ink-3: #a29bbd;
  --heat-0: #241f33;
  --heat-1: #184f95;
  --heat-2: #256abf;
  --heat-3: #3987e5;
  --heat-4: #6da7ec;
  --heat-5: #b7d3f6;
}
.stats-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 40px) 64px;
}
.loading-inline {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
}
.stats-intro h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 38px);
}
.stats-intro p {
  margin: 4px 0 22px;
}
.stats-h2 {
  margin: 38px 0 12px;
  font-weight: 800;
  font-size: 22px;
}
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}
.kpi-row.compact {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.stat-tile {
  padding: 16px 16px 14px;
  border-radius: 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
}
.stat-tile.lead-tile {
  grid-column: span 2;
}
.stat-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}
.stat-value {
  margin-top: 4px;
  font-weight: 800;
  font-size: 26px;
  line-height: 1.15;
}
.stat-tile.lead-tile .stat-value {
  font-size: 48px;
  letter-spacing: -0.5px;
}
.stat-sub {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.viz-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 14px;
  margin-top: 14px;
}
.viz-grid-2.tables {
  align-items: start;
}
.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.viz-card {
  margin: 0;
  padding: 16px 16px 12px;
  border-radius: 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  min-width: 0;
}
.viz-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.viz-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}
.viz-sub {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--ink-3);
}
.viz-plot {
  width: 100%;
  min-width: 0;
}
.viz-plot svg {
  display: block;
  max-width: 100%;
  overflow: visible;
}
.viz-grid {
  stroke: var(--grid);
  stroke-width: 1;
  shape-rendering: crispEdges;
}
.viz-base {
  stroke: var(--axis);
  stroke-width: 1;
  shape-rendering: crispEdges;
}
.viz-tick {
  fill: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.viz-label {
  fill: var(--text);
  font-size: 12px;
  font-weight: 800;
}
.viz-bar {
  fill: var(--series-1);
  transition: fill 0.12s;
}
.viz-bar.hover {
  fill: var(--series-1-hover);
}
.viz-hit {
  fill: transparent;
  cursor: default;
}
.viz-hit:focus {
  outline: none;
}
.viz-hit:focus-visible {
  stroke: var(--accent);
  stroke-width: 1;
}
.heat-cell {
  stroke: transparent;
  stroke-width: 2;
}
.heat-cell.hover,
.heat-cell:focus-visible {
  stroke: #fff;
  outline: none;
}
.heat-0 {
  fill: var(--heat-0);
  background: var(--heat-0);
}
.heat-1 {
  fill: var(--heat-1);
  background: var(--heat-1);
}
.heat-2 {
  fill: var(--heat-2);
  background: var(--heat-2);
}
.heat-3 {
  fill: var(--heat-3);
  background: var(--heat-3);
}
.heat-4 {
  fill: var(--heat-4);
  background: var(--heat-4);
}
.heat-5 {
  fill: var(--heat-5);
  background: var(--heat-5);
}
.heat-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.heat-legend span:first-child {
  margin-right: 4px;
}
.heat-legend span:last-child {
  margin-left: 4px;
}
.heat-swatch {
  width: 13px;
  height: 13px;
  border-radius: 3px;
}
.viz-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  padding: 8px 11px;
  border-radius: 10px;
  background: #221c30;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  pointer-events: none;
  font-size: 13px;
  min-width: 120px;
}
.tip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.tip-key {
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--series-1, #3987e5);
}
.tip-label {
  color: var(--ink-2, #cbc4e0);
  margin-top: 2px;
}
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.filter-label {
  font-weight: 800;
  color: var(--ink-2);
}
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th,
.data-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td:nth-child(2) {
  white-space: normal;
}
.data-table th {
  font-weight: 800;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.03);
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table td {
  font-variant-numeric: tabular-nums;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}
.status.ok {
  color: #9be4aa;
}
.status.bad {
  color: #ffb3bb;
}
.board-card {
  padding: 10px;
}
.refetch {
  opacity: 0.55;
  transition: opacity 0.2s;
}
.achievements.wide {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }
  .site-header .brand span:last-child {
    display: inline;
  }
  .hero {
    min-height: calc(100svh - 62px);
  }
  .hero-shade {
    background: linear-gradient(0deg, rgba(14, 11, 23, 0.97) 0%, rgba(14, 11, 23, 0.85) 45%, rgba(14, 11, 23, 0) 75%);
  }
  .lead {
    font-size: 16px;
  }
  .auth-wrap {
    justify-content: center;
    align-items: flex-end;
  }
  .page-scene-shade {
    background: linear-gradient(0deg, rgba(10, 7, 18, 0.85) 0%, rgba(10, 7, 18, 0.2) 70%);
  }
  .stat-tile.lead-tile {
    grid-column: 1 / -1;
  }
  .stat-tile.lead-tile .stat-value {
    font-size: 40px;
  }
}
@media (max-width: 480px) {
  .site-actions .btn-ghost + .btn-primary {
    display: none;
  }
  .site-header {
    gap: 10px;
  }
}

/* v3: Fokus-Bewertung in der Tabelle */
.viz-grid-2.tables {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
}
@media (min-width: 1100px) {
  .viz-grid-2.tables {
    grid-template-columns: 1.35fr 1fr;
  }
}
.kpi-row {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}
.dur {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.dur .tag {
  display: inline-flex;
  color: var(--ink-2, #cbc4e0);
  opacity: 0.8;
}
.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffd35c;
  letter-spacing: 1px;
  white-space: nowrap;
}
.rating .off {
  color: rgba(255, 255, 255, 0.18);
  margin-left: -4px;
}

/* ---------------------------------------------------------------- Rechtliches */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.site-footer .footer-links a,
.site-footer .muted a {
  color: var(--muted);
}
.site-footer .footer-links a:hover {
  color: var(--text);
}
.legal-nav a[aria-current='page'] {
  color: var(--text);
  background: var(--surface);
}
.legal-main {
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 40px) 64px;
}
.legal {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}
.legal h1 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.15;
}
.legal h2 {
  margin: 36px 0 10px;
  color: var(--text);
  font-size: 21px;
  line-height: 1.3;
  scroll-margin-top: 90px;
}
.legal h3 {
  margin: 20px 0 6px;
  color: var(--text);
  font-size: 16px;
}
.legal section {
  scroll-margin-top: 90px;
}
.legal p,
.legal ul,
.legal ol {
  margin: 0 0 12px;
}
.legal ul,
.legal ol {
  padding-left: 22px;
}
.legal li {
  margin-bottom: 6px;
}
.legal b {
  color: var(--text);
}
.legal-meta {
  color: var(--dim);
  font-size: 14px;
}
.legal-address {
  color: var(--text);
}
.legal-toc {
  margin: 18px 0 8px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.legal-toc ol {
  margin: 0;
  columns: 2 240px;
  column-gap: 28px;
  font-size: 14.5px;
}
.legal-toc li {
  break-inside: avoid;
}
.legal-warning {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 211, 92, 0.12);
  border: 1px solid rgba(255, 211, 92, 0.45);
  color: #ffe9a8;
  font-size: 15px;
}
.legal-placeholder {
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(255, 211, 92, 0.16);
  color: #ffe9a8;
}

/* Anmeldung: Zustimmung & rechtliche Links */
.consent {
  gap: 8px;
  margin-top: 4px;
}
.check-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.45;
  cursor: pointer;
}
.check-line input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.auth-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 18px;
  font-size: 13px;
}
.auth-legal a {
  color: var(--dim);
}
@media (max-width: 760px) {
  .page-legal .site-nav.legal-nav {
    display: none;
  }
  .legal h2 {
    font-size: 19px;
  }
}

/* Sprachumschalter DE/EN auf den öffentlichen Seiten */
.lang-switch {
  display: inline-flex;
  flex: none;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}
.site-header .lang-switch {
  margin-left: auto;
}
.site-header .site-actions + .lang-switch {
  margin-left: 0;
}
.lang-switch button,
.lang-switch a {
  min-width: 38px;
  min-height: 30px;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 22px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.lang-switch button:hover,
.lang-switch a:hover {
  color: var(--text);
}
.lang-switch button.active,
.lang-switch a.active {
  background: var(--accent);
  color: var(--accent-ink);
}
.lang-switch button:focus-visible,
.lang-switch a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Englische Rechtstexte: Hinweis auf die maßgebliche deutsche Fassung */
.legal-lang-note {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(143, 184, 255, 0.1);
  border: 1px solid rgba(143, 184, 255, 0.3);
  color: var(--muted);
  font-size: 14px;
}
