/* ══ REDESIGN 2026/27 — gemeinsame Bausteine ══
   Alle Werte 1:1 aus der abgenommenen Skizze (design/redesign-skizze-2026-11,
   Artifact UzX5…, Version 90). Nichts hier ist nachempfunden: jede Zahl steht
   so in den inline-Styles der .dc.html-Dateien. Abweichungen werden mit
   tools/skizze-render gemessen, nicht nach Augenmass korrigiert.

   Geltungsbereich: alles unter .rd. Solange alte Screens (app.css) noch
   existieren, setzt der erste Block deren globale Vorgaben (* { box-sizing:
   border-box; margin: 0; padding: 0 }) im neuen Bereich auf Browser-Standard
   zurueck — die Skizze rechnet mit Browser-Standard. */

.rd, .rd *, .rd *::before, .rd *::after {
  box-sizing: revert;   /* Browser-Standard: content-box, bei Knoepfen und Feldern border-box */
  margin: revert;
  padding: revert;
}
.rd {
  /* Farben */
  --bg: #0A0A0A;
  --text: #F3F0EA;
  --text-2: #9C988F;        /* Begleittext */
  --text-3: #7D7A72;        /* inaktiv */
  --line: #2A2925;          /* Haarlinie, Rahmen */
  --line-2: #1E1D1A;        /* Zeilentrenner */
  --line-3: #3A3832;        /* Rahmen Knopf/Feld */
  --box: #15140F;           /* Kasten */
  --popup: #121210;         /* Dialog */
  --gold: #FFB300;          /* Marke, Handlung, Wert, Tore, Bremskarten */
  --gold-hover: #FFD16A;
  --green: #4ADE80;         /* du, gute Karten */
  --red: #F0736F;           /* loeschen, gefaehrlich */
  --kat-stuermer: #5FB8AE;
  --kat-kds: #A58FD6;
  --kat-umfrage: #A9CF54;
  --overlay: rgba(0, 0, 0, 0.72);
  /* Schriften */
  --f-display: 'Big Shoulders Display', sans-serif;
  --f-text: Archivo, sans-serif;
  --f-mono: 'JetBrains Mono', monospace;

  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-text);
  line-height: normal;
  letter-spacing: normal;
  -webkit-font-smoothing: auto;
}
@keyframes zuwachsAufblitzen{0%{transform:scale(1)}18%{transform:scale(1.18)}100%{transform:scale(1)}}
.rd a { color: var(--gold); }
.rd a:hover { color: var(--gold-hover); }
.rd input::placeholder, .rd textarea::placeholder { color: var(--text-3); }

/* Im breiten Browserfenster bleibt die App eine Handy-Spalte, mittig auf Schwarz —
   gleiche Grenze wie die heutige App (.app, max. 430 px). Am Handy fuellt sie die Breite. */
#rd-app {
  /* Mittig ohne transform: der wuerde die Kartenkanten um einen halben Pixel verschieben. */
  /* In den Apps bleibt alles zwischen Statusleiste und Home-Balken; im Browser sind beide 0. */
  position: fixed; top: env(safe-area-inset-top, 0px); bottom: env(safe-area-inset-bottom, 0px); left: 0; right: 0; margin: 0 auto;
  width: auto; max-width: 430px; height: auto;
}
#rd-app[hidden] { display: none; }

/* Zum Aktualisieren ziehen: Zeichen oben mittig, dreht beim Laden. */
.rd-ziehen {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 50%; z-index: 60; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: #15140F; border: 1px solid #2A2925; opacity: 0; pointer-events: none;
  transform: translate(-50%, -40px);
}
.rd-ziehen-laeuft svg { animation: rd-dreh .8s linear infinite; }
@keyframes rd-dreh { to { transform: rotate(360deg); } }

/* Popups liegen immer ueber allem, auch ueber dem klebenden Feed-Kopf (z-index in der Vorlage). */
.rd [style*="inset: 0"][style*="background: rgba(0,0,0,0.7"] { z-index: 50; }

/* ── Geruest: Scrollbereich ueber der unteren Leiste ── */
.rd-scroll {
  position: absolute; left: 0; right: 0; top: 0; bottom: 74px;
  overflow-y: auto; display: block; padding-bottom: 20px;
}

/* ── Kopf: Liga-Umschalter + Meta, darunter Titel ── */
.rd-head { padding: 18px 20px 0; display: flex; flex-direction: column; gap: 16px; }
.rd-head-zeile { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--text-2); }
.rd-liga {
  display: flex; align-items: center; gap: 6px; height: 32px; margin: -8px 0; padding: 0;
  background: none; border: 0; color: var(--text); font-family: var(--f-text);
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.rd-meta { font-family: var(--f-mono); color: var(--text); }
.rd-h1 {
  margin: 0; font-family: var(--f-display); font-weight: 900; font-size: 46px;
  line-height: 0.95; text-transform: uppercase;
}

/* ── Untere Leiste ── */
.rd-nav {
  position: absolute; left: 0; right: 0; bottom: 0; height: 74px;
  background: var(--bg); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
}
.rd .rd-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: var(--text-2); text-decoration: none; font-size: 12px; cursor: pointer;
  background: none; border: 0; padding: 0; font-family: var(--f-text);
}
.rd a.rd-nav-item:hover { color: var(--text-2); }
.rd .rd-nav-item[aria-current="page"] {
  color: var(--gold); font-weight: 700; border-top: 2px solid var(--gold); margin-top: -1px;
}
.rd a.rd-nav-item[aria-current="page"]:hover { color: var(--gold); }
.rd-nav-icon { position: relative; display: flex; }
.rd-nav-punkt {
  position: absolute; top: -3px; right: -4px; width: 12px; height: 12px; box-sizing: border-box;
  background: var(--green); border: 2px solid var(--bg); border-radius: 50%;
}

/* ── Knoepfe ── */
.rd-btn {
  height: 46px; background: var(--gold); border: 0; border-radius: 3px; color: var(--bg);
  font-family: var(--f-text); font-size: 15px; font-weight: 800; cursor: pointer;
}
.rd-btn--rand {
  height: 44px; background: none; border: 1px solid var(--line-3); color: var(--text);
  font-size: 14px; font-weight: 700;
}
.rd-btn--klein {
  height: 32px; padding: 0 12px; background: none; border: 1px solid var(--gold); color: var(--gold);
  font-size: 14px; font-weight: 700;
}
.rd-btn--gefahr { color: var(--red); }

/* ── Dialog ── */
.rd-overlay {
  position: absolute; inset: 0; background: var(--overlay);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 150px;
}
.rd-dialog {
  width: 350px; box-sizing: border-box; padding: 18px 18px 16px; background: var(--popup);
  border: 1px solid var(--line); border-radius: 3px; display: flex; flex-direction: column; gap: 12px;
}
.rd-dialog-titel {
  font-family: var(--f-display); font-weight: 900; font-size: 30px; line-height: 0.95; text-transform: uppercase;
}
.rd-dialog-text { font-size: 14px; line-height: 1.45; color: var(--text-2); }

/* ── Schalter ── */
.rd-schalter {
  min-height: 48px; padding: 0 2px; display: flex; align-items: center; gap: 12px;
  background: none; border: 0; border-top: 1px solid var(--line); color: var(--text);
  font-family: var(--f-text); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
}
.rd-schalter-spur {
  position: relative; flex: 0 0 40px; width: 40px; height: 22px; border-radius: 11px; background: var(--line);
}
.rd-schalter-knopf {
  position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2);
}
.rd-schalter[aria-checked="true"] .rd-schalter-spur { background: var(--green); }
.rd-schalter[aria-checked="true"] .rd-schalter-knopf { left: 21px; background: var(--bg); }

/* ── Umschalter (Segmente) ── */
.rd-segmente { display: grid; border: 1px solid var(--line); border-radius: 3px; }
.rd-segment {
  height: 34px; border: 0; background: none; font-family: var(--f-text); font-size: 14px;
  font-weight: 500; color: var(--text-2); cursor: pointer;
}
.rd-segment + .rd-segment { border-left: 1px solid var(--line); }
.rd-segment[aria-selected="true"], .rd-segment[aria-checked="true"] { font-weight: 700; color: var(--bg); background: var(--gold); }

/* ── Eingabefeld ── */
.rd-feld-label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); }
.rd-feld {
  height: 46px; box-sizing: border-box; padding: 0 12px; background: var(--bg); border: 1px solid var(--line-3);
  border-radius: 3px; color: var(--text); font-family: var(--f-text); font-size: 15px;
}

/* ── Mono-Kicker (10 px) ── */
.rd-kicker { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.5px; }
