/* ============================================================================
   Glaskugel — WM 2026 KO-Tippspiel
   Design: "Matchday-Almanach bei Nacht" — dark-first, ein Gold-Akzent (Flutlicht/
   Pokal), Mono für alle Zahlen (Broadcast-Stats). Vanilla CSS, kein Build-Step.
   ============================================================================ */

:root {
  color-scheme: dark;

  /* Flächen — warmes Anthrazit, kein reines Schwarz */
  --bg:        #0d0e12;
  --bg-2:      #121319;   /* Karten */
  --bg-3:      #191b23;   /* verschachtelt / Inputs */
  --bg-4:      #21242e;   /* Hover / gehobene Nested */

  /* Text */
  --ink:       #f3f4f6;
  --ink-2:     #a4a9b6;   /* muted */
  --ink-3:     #6b7180;   /* faint */

  /* Linien */
  --line:      rgba(255, 255, 255, 0.075);
  --line-2:    rgba(255, 255, 255, 0.14);

  /* Akzent — kultiviertes Gold (Flutlicht) */
  --gold:      #f2c14e;
  --gold-2:    #e9b03a;
  --gold-ink:  #17130a;   /* dunkle Schrift auf Gold */
  --gold-soft: rgba(242, 193, 78, 0.13);
  --gold-line: rgba(242, 193, 78, 0.32);

  /* Semantik — gedämpft, kein Neon */
  --good:      #5cc79b;
  --good-soft: rgba(92, 199, 155, 0.13);
  --bad:       #ec6a63;
  --bad-soft:  rgba(236, 106, 99, 0.13);
  --warn:      #d59a44;
  --warn-soft: rgba(213, 154, 68, 0.13);

  --radius:    16px;
  --radius-sm: 11px;
  --radius-lg: 22px;

  --shadow:    0 18px 40px -24px rgba(0, 0, 0, 0.8);
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);

  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Code', monospace;

  font-family: var(--sans);
  font-size: clamp(15px, 0.6vw + 13.5px, 16.5px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* schlägt display:flex etc. (sonst zeigt .savebar[hidden]) */

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  letter-spacing: -0.01em;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Sehr dezenter Flutlicht-Schimmer oben — fixed, ohne Repaint-Kosten */
body::before {
  content: '';
  position: fixed;
  inset: -20% -20% auto -20%;
  height: 46vh;
  background: radial-gradient(60% 100% at 50% 0%, rgba(242, 193, 78, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

::selection { background: var(--gold-soft); color: var(--ink); }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }

/* ---- Header ------------------------------------------------------------- */

header.app {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px calc(14px - 1px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
header.app h1 {
  margin: 0; font-size: 1.02rem; font-weight: 600; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 9px;
}
header.app h1::before {
  content: '';
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
  flex: none;
}
header.app .budget {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0;
  color: var(--gold); text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
}
header.app .budget:empty { display: none; }
header.app .budget svg { width: 12px; height: 12px; }

/* ---- Tab-Bar ------------------------------------------------------------ */

nav.tabs {
  position: sticky; top: 57px; z-index: 15;
  display: flex; gap: 6px; overflow-x: auto;
  padding: 10px 14px;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs button {
  flex: none;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink-2);
  font-family: var(--sans); font-size: 0.86rem; font-weight: 500;
  padding: 9px 15px; border-radius: 999px;
  white-space: nowrap; cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
nav.tabs button:hover { color: var(--ink); border-color: var(--line-2); }
nav.tabs button[aria-current="true"] {
  background: var(--gold); color: var(--gold-ink); border-color: transparent; font-weight: 600;
}

/* ---- Layout ------------------------------------------------------------- */

main {
  position: relative; z-index: 1;
  max-width: 560px; margin: 0 auto;
  padding: 16px 14px 40px;
  display: flex; flex-direction: column; gap: 14px;
}

.section-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 12px 4px 0;
}
.section-head h2 { margin: 0; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.section-head .rule { flex: 1; height: 1px; background: var(--line); }

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* Gestaffelte Einblendung (subtil) */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  main > .card, main > .match, main > .section-head {
    animation: rise 0.5s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 45ms);
  }
}

/* ---- Sprung-Navigation (Broadcast-Chips, horizontal) -------------------- */

.jump-wrap { padding: 4px; }
.jump-wrap .lead {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 4px 10px;
}
.jump {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 4px 6px; margin: 0 -4px;
  scrollbar-width: none;
}
.jump::-webkit-scrollbar { display: none; }
.jump a {
  flex: none;
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  min-width: 84px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--ink); font-size: 0.7rem;
  transition: transform 0.25s var(--ease), border-color 0.2s var(--ease);
}
.jump a:active { transform: scale(0.96); }
.jump a .jp-phase { font-family: var(--mono); font-size: 0.6rem; color: var(--ink-3); letter-spacing: 0.04em; }
.jump a .jp-teams { font-family: var(--mono); font-weight: 600; letter-spacing: 0.02em; }
.jump a.done { border-color: color-mix(in oklab, var(--good) 40%, var(--line)); }
.jump a.done .jp-teams { color: var(--good); }
.jump a.live { border-color: var(--gold-line); }
.jump a.live .jp-teams { color: var(--gold); }

/* ---- Match-Karte -------------------------------------------------------- */

.match .top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 14px;
}
.match .phase {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold);
  padding: 4px 9px; border-radius: 999px;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
}
.match .meta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-2);
}
.match .meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.status-live {
  display: inline-flex; align-items: center; gap: 6px; color: var(--gold);
}
.status-live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  animation: livepulse 1.6s ease-in-out infinite;
}
@keyframes livepulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--gold-soft); }
  50% { opacity: 0.5; box-shadow: 0 0 0 5px transparent; }
}

/* Matchup — Team-Codes als Broadcast-Chips + volle Namen */
.matchup {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 4px 0 2px;
}
.team { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.team.away { align-items: flex-end; text-align: right; }
.team .code {
  font-family: var(--mono); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.08em;
  color: var(--ink); padding: 5px 9px; border-radius: 8px;
  background: var(--bg-3); border: 1px solid var(--line-2);
}
.team .name {
  font-size: 1.06rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.matchup .vs { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); }

/* Endergebnis */
.result {
  display: flex; align-items: baseline; justify-content: center; gap: 10px;
  margin: 14px 0 2px; padding: 12px; border-radius: var(--radius-sm);
  background: var(--bg-3); border: 1px solid var(--line);
}
.result .final { font-family: var(--mono); font-size: 1.7rem; font-weight: 600; letter-spacing: 0.02em; }
.result .aet { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; }

/* Feld-Label */
.field-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-3); margin: 16px 2px 8px;
}
.field-label:first-of-type { margin-top: 6px; }

/* ---- Auswahl-Buttons (Picks) ------------------------------------------- */

.row { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.row.two { grid-template-columns: 1fr 1fr; }

button.pick {
  position: relative;
  min-height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px solid var(--line-2);
  background: var(--bg-3);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  font-family: var(--sans); font-size: 0.92rem; font-weight: 500;
  cursor: pointer; touch-action: manipulation;
  transition: transform 0.14s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
button.pick:hover:not([disabled]) { border-color: var(--line-2); background: var(--bg-4); }
button.pick:active:not([disabled]) { transform: scale(0.965); }
button.pick .sub {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-3);
}
button.pick[aria-pressed="true"] {
  background: var(--gold); color: var(--gold-ink); border-color: transparent; font-weight: 600;
}
button.pick[aria-pressed="true"] .sub { color: color-mix(in oklab, var(--gold-ink) 65%, transparent); }
button.pick[disabled] { opacity: 0.45; cursor: default; }

/* ---- Ergebnis-Eingabe --------------------------------------------------- */

.score-input {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 6px 0 2px;
}
.score-input input {
  width: 3.4em; height: 58px; text-align: center;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg-3); color: var(--ink);
  font-family: var(--mono); font-size: 1.5rem; font-weight: 600;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
  -moz-appearance: textfield;
}
.score-input input::-webkit-outer-spin-button,
.score-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-input input:focus { outline: none; border-color: var(--gold-line); background: var(--bg-4); }
.score-input input[disabled] { opacity: 0.5; }
.score-input .sep { font-family: var(--mono); font-size: 1.5rem; color: var(--ink-3); }
.score-input .note { font-family: var(--mono); font-size: 0.66rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- Doppeleinsatz ------------------------------------------------------ */

.dd {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 16px; padding: 14px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.dd .lbl { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dd .lbl .x2 {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 600; color: var(--gold);
  padding: 2px 6px; border-radius: 6px; background: var(--gold-soft); border: 1px solid var(--gold-line);
}
.dd .hint { font-size: 0.78rem; color: var(--ink-2); line-height: 1.4; margin-top: 4px; }
.dd .ddbtn { flex: none; min-width: 122px; }
.dd-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.76rem; font-family: var(--mono); }
.dd-status.funded  { color: var(--good); }
.dd-status.unfunded{ color: var(--bad); }
.dd-status.pending { color: var(--warn); }

/* ---- Bonusfrage --------------------------------------------------------- */

.question {
  margin-top: 16px; padding: 14px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.question .q { font-weight: 600; margin-bottom: 10px; display: flex; align-items: flex-start; gap: 8px; }
.question .q .qmark { color: var(--gold); flex: none; margin-top: 1px; }
.question .opts { display: flex; gap: 8px; flex-wrap: wrap; }
.question .opts button.pick { min-height: 44px; flex: 1; min-width: 80px; }
.question .answered {
  margin-top: 10px; font-family: var(--mono); font-size: 0.76rem; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
}

/* ---- Quoten-Zeile ------------------------------------------------------- */

.oddsline {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.oddsline .odds-src {
  width: 100%; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 2px;
}
.oddsline .odd {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 5px 9px; border-radius: 8px;
  background: var(--bg-3); border: 1px solid var(--line);
  font-size: 0.72rem; color: var(--ink-2);
}
.oddsline .odd b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.oddsline .odd.mine { border-color: var(--gold-line); background: var(--gold-soft); }
.oddsline .odd.mine b { color: var(--gold); }

/* ---- Audit-Hinweis ------------------------------------------------------ */

.audit-hint {
  margin: 12px 0; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--warn-soft); border: 1px solid color-mix(in oklab, var(--warn) 34%, var(--line));
  color: var(--warn); font-size: 0.78rem;
  display: flex; align-items: center; gap: 8px;
}

/* ---- Tipps der anderen -------------------------------------------------- */

.other-tips { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.other-tips h3 {
  margin: 0 0 10px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-3);
}
.other-tips ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.other-tips li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.other-tips li:last-child { border-bottom: none; }
.other-tips li .who { font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.other-tips li .what { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); letter-spacing: 0.02em; }

/* KI-Badge (statt Emoji) */
.ai-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--gold); padding: 2px 5px; border-radius: 5px;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  vertical-align: middle;
}
.ai-badge svg { width: 11px; height: 11px; }

/* ---- Speichern-Leiste --------------------------------------------------- */

.actions {
  position: sticky; bottom: 0; z-index: 12;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin: 0 auto;
  background: linear-gradient(to top, var(--bg) 55%, transparent);
}
.actions button {
  width: 100%; min-height: 52px;
  border: none; border-radius: var(--radius);
  background: var(--gold); color: var(--gold-ink);
  font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.14s var(--ease), opacity 0.2s var(--ease);
  box-shadow: 0 10px 30px -12px rgba(242, 193, 78, 0.4);
}
.actions button:active:not([disabled]) { transform: translateY(1px) scale(0.99); }
.actions button[disabled] { opacity: 0.4; box-shadow: none; cursor: default; }
.savebar {
  margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 0.85rem; display: flex; align-items: center; gap: 8px;
  background: var(--good-soft); color: var(--good);
  border: 1px solid color-mix(in oklab, var(--good) 30%, var(--line));
}
.savebar.err { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in oklab, var(--bad) 30%, var(--line)); }

/* ---- Leaderboard -------------------------------------------------------- */

table.board { width: 100%; border-collapse: collapse; }
table.board thead th {
  font-family: var(--mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3); text-align: left;
  padding: 0 10px 12px; border-bottom: 1px solid var(--line);
}
table.board th.num, table.board td.num { text-align: right; }
table.board tbody td {
  padding: 13px 10px; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.board tbody tr:last-child td { border-bottom: none; }
table.board td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.board td.rank { font-family: var(--mono); font-weight: 600; color: var(--ink-3); width: 42px; }
table.board td.name { font-weight: 500; }
table.board td.name em { color: var(--ink-3); font-style: normal; font-family: var(--mono); font-size: 0.72rem; }
table.board td.pts { font-weight: 600; color: var(--gold); }
table.board tr.you td { background: var(--gold-soft); }
table.board tr.you td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
/* Podium */
table.board tr.p1 td.rank { color: var(--gold); }
table.board tr.p2 td.rank { color: #c7ccd6; }
table.board tr.p3 td.rank { color: #cd9b6a; }
.warnflag { color: var(--warn); font-family: var(--mono); font-size: 0.72rem; margin-left: 5px; }

/* ---- Zustände: Leer / Fehler / Skeleton --------------------------------- */

.empty, .error, .loading { text-align: center; padding: 48px 24px; color: var(--ink-2); }
.empty .glyph, .error .glyph { color: var(--ink-3); margin-bottom: 14px; display: inline-flex; }
.empty h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.empty p { margin: 0; font-size: 0.9rem; }
.error { color: var(--bad); }

@keyframes shimmer { 100% { background-position: -200% 0; } }
.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(100deg, var(--bg-3) 30%, var(--bg-4) 50%, var(--bg-3) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.sk-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sk-line { height: 14px; }
.sk-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sk-row .skeleton { height: 52px; }

/* ============================================================================
   Admin-Panel — teilt das System, kompaktere Formen
   ============================================================================ */

.gate { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate .card { width: 100%; max-width: 380px; }
.gate .card h2 { margin: 0 0 4px; font-size: 1.3rem; letter-spacing: -0.02em; }
.gate .lead { color: var(--ink-2); font-size: 0.86rem; margin: 0 0 16px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.field > label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field select, .field textarea {
  min-height: 46px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg-3); color: var(--ink); padding: 10px 12px;
  font-family: var(--sans); font-size: 0.95rem;
  transition: border-color 0.18s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold-line); }
.field input[type="number"] { font-family: var(--mono); }
.field textarea { min-height: 64px; resize: vertical; line-height: 1.45; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
.field.inline label { flex: 1; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 0.85rem; color: var(--ink-2); }
.field.inline input { flex: none; width: 6em; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.subhead {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); margin: 20px 0 4px;
  display: flex; align-items: center; gap: 8px;
}
.subhead::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.subhead:first-child { margin-top: 2px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.02em;
  padding: 4px 9px; border-radius: 999px;
  background: var(--bg-3); color: var(--ink-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.chip svg { width: 12px; height: 12px; }
.chip.ok   { color: var(--good); border-color: color-mix(in oklab, var(--good) 34%, var(--line)); background: var(--good-soft); }
.chip.warn { color: var(--warn); border-color: color-mix(in oklab, var(--warn) 34%, var(--line)); background: var(--warn-soft); }
.chip.info { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.chip.bad  { color: var(--bad);  border-color: color-mix(in oklab, var(--bad) 34%, var(--line)); background: var(--bad-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 46px; padding: 10px 16px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg-3); color: var(--ink);
  font-family: var(--sans); font-size: 0.92rem; font-weight: 500; cursor: pointer;
  transition: transform 0.14s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn:hover:not([disabled]) { background: var(--bg-4); }
.btn:active:not([disabled]) { transform: scale(0.98); }
.btn.small { min-height: 38px; padding: 7px 12px; font-size: 0.82rem; }
.btn.ghost { background: transparent; }
.btn.primary { background: var(--gold); color: var(--gold-ink); border-color: transparent; font-weight: 600; }
.btn.danger { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 34%, var(--line)); }
.btn.full { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: default; }

details.match-admin { padding: 0; overflow: hidden; }
details.match-admin > summary {
  cursor: pointer; list-style: none; padding: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
details.match-admin > summary::-webkit-details-marker { display: none; }
details.match-admin > summary::after {
  content: ''; width: 8px; height: 8px; flex: none;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg); transition: transform 0.2s var(--ease); margin-left: auto;
}
details.match-admin[open] > summary::after { transform: rotate(225deg); }
details.match-admin > summary .su-title { font-weight: 600; font-size: 1rem; }
details.match-admin > summary .su-sub { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-2); margin-top: 3px; }
details.match-admin .chips { padding: 0 16px; }
details.match-admin .body { margin: 12px 16px 16px; border-top: 1px solid var(--line); padding-top: 14px; }

.token-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.token-row:last-child { border-bottom: none; }
.token-row .name { font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.token-row .link { flex-basis: 100%; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); word-break: break-all; }
.token-row .field.inline { margin: 0; }

.msg { margin-top: 10px; font-size: 0.82rem; display: flex; align-items: center; gap: 7px; }
.msg.ok { color: var(--good); }
.msg.err { color: var(--bad); }

.opt-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.opt-row input { flex: 1; min-width: 0; }

.raw-json {
  margin-top: 10px; padding: 12px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-2);
  max-height: 280px; overflow: auto; white-space: pre-wrap; word-break: break-all;
}

/* ---- Landing (index) ---------------------------------------------------- */

.landing {
  min-height: 100dvh; display: flex; flex-direction: column;
  max-width: 560px; margin: 0 auto; padding: 0 20px;
  position: relative; z-index: 1;
}
.landing .brand {
  padding: 26px 0 0; display: flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -0.02em;
}
.landing .brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.landing .hero { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; }
.landing .kicker {
  font-family: var(--mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 18px;
}
.landing h1 {
  margin: 0; font-size: clamp(2.4rem, 11vw, 3.4rem); font-weight: 700;
  letter-spacing: -0.04em; line-height: 0.98;
}
.landing h1 .muted { color: var(--ink-3); display: block; }
.landing .sub { margin: 20px 0 0; color: var(--ink-2); font-size: 1rem; line-height: 1.55; max-width: 42ch; }
.landing .cards { display: flex; flex-direction: column; gap: 10px; padding-bottom: 34px; }
.landing .lcard {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--ink); transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.landing .lcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.landing .lcard .ico { flex: none; color: var(--gold); display: inline-flex; }
.landing .lcard .lc-title { font-weight: 600; }
.landing .lcard .lc-sub { font-size: 0.8rem; color: var(--ink-2); margin-top: 2px; }
.landing .lcard .arrow { margin-left: auto; color: var(--ink-3); }
.landing .foot { padding: 0 0 26px; color: var(--ink-3); font-size: 0.78rem; font-family: var(--mono); }

/* ---- Icon-Größen (Inline-SVG) ------------------------------------------- */
.dd-status svg { width: 14px; height: 14px; flex: none; }
.audit-hint svg { width: 15px; height: 15px; flex: none; }
.question .answered svg { width: 13px; height: 13px; flex: none; }
.question .q .qmark svg { width: 16px; height: 16px; }
.empty .glyph svg, .error .glyph svg { width: 34px; height: 34px; }
.msg svg { width: 14px; height: 14px; flex: none; }
.landing .lcard .ico svg { width: 22px; height: 22px; }
.landing .lcard .arrow svg { width: 18px; height: 18px; }
.subhead svg { width: 13px; height: 13px; }

/* Utility */
.mono { font-family: var(--mono); }
