/* ==========================================================================
   YELLLOW Check – Tokens und Typo analog yelllow.at
   Buttons rund (2rem), Karten/Felder eckig (0).
   ========================================================================== */

@font-face {
  font-family: "postsans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/font/PostSansYelllow-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "postsans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/font/PostSansYelllow-Bold.woff2") format("woff2");
}

:root {
  --bg: #fdeca0;
  --gelb: #ffdc00;
  --gelb-soft: #fdeca0;
  --schwarz: #000000;
  --weiss: #ffffff;
  --grau: #616161;
  --grau-soft: #757575;
  --karte: #ffffff;
  --linie: #bdbdbd;
  --grau-btn: #e0e0e0;
  --dim: rgba(0, 0, 0, 0.12);
  --dim-22: rgba(0, 0, 0, 0.22);
  --overlay: rgba(0, 0, 0, 0.5);
  --weiss-75: rgba(255, 255, 255, 0.75);
  --radius-btn: 2rem;
  --radius-card: 0;
  --radius-mark: 0.25rem;
  --maxw: 460px;
  --schatten: none;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;

  --space-stack: var(--space-4);
  --space-screen-x: var(--space-6);
  --space-screen-top: var(--space-4);
  --space-screen-bottom: calc(var(--topbar-h) + var(--space-2));
  --gap-chips: var(--space-3);
  --gap-inline: var(--space-2);

  --touch-min: 2.75rem;
  --focus-ring: 0.15rem;
  --btn-pad-y: var(--space-3);
  --btn-pad-x: var(--space-8);

  --text-xs: 0.875rem;
  --text-body: 1rem;
  --text-md: 1.15rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-display: clamp(2.5rem, 12vw, 3.5rem);
  --text-title: clamp(2rem, 8vw, 2.5rem);
  --text-hero-num: 2.75rem;
  --lh-body: 1.5;
  --lh-tight: 1.15;

  --brand-h: 3.5rem;
  --brand-h-sm: 2.5rem;
  --icon: 1.1em;
  --check-ic: 3rem;
  --gauge-size: 13.75rem;
  /* Touch-Ziel plus vertikales Padding der Leiste (ohne Safe-Area). */
  --topbar-h: calc(var(--touch-min) + var(--space-4));
}

::selection {
  background-color: rgba(255, 220, 0, 0.3);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Globale Schutzregel: das HTML-[hidden]-Attribut MUSS gegen jede display-
   Regel gewinnen (sonst bleiben .ergebnis-spar / .sheet / .geraet-cta trotz
   hidden=true sichtbar). Eine Quelle statt Einzelregeln pro Element. */
[hidden] {
  display: none !important;
}

/* Auto-Fokus beim Screen-Wechsel (nicht-interaktive Headings) ohne Rahmen. */
[tabindex="-1"]:focus {
  outline: none;
}

/* Lucide-Icons (Inline-Sprite). fill:none + stroke wie Lucide-Spezifikation -
   sonst rendern die Strich-Icons als Fuellung auf nulldicken Linien (unsichtbar). */
.ic {
  width: var(--icon);
  height: var(--icon);
  display: inline-block;
  vertical-align: -0.18em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.ic--xl {
  width: 78px;
  height: 78px;
  stroke-width: 1.5;
}

/* Nur fuer Screenreader sichtbar. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button,
input,
a,
.chip,
.consent,
.back {
  font-family: inherit;
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: "postsans", sans-serif;
  font-weight: 400;
  font-size: var(--text-body);
  line-height: var(--lh-body);
  font-variant-ligatures: common-ligatures contextual;
  font-feature-settings: "calt" 1, "liga" 1, "clig" 1;
  background: var(--bg);
  color: var(--schwarz);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-wrap: break-word;
  overflow-y: hidden;
}
/* Body-Scroll sperren, solange das Datenschutz-Sheet offen ist */
body.is-locked {
  overflow: hidden;
}

#app {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  overflow: hidden;
}

/* ---------- Screens ---------- */
.screen {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: var(--space-screen-top) var(--space-screen-x) var(--space-screen-bottom);
  padding-top: var(--space-screen-top);
  padding-top: max(var(--space-screen-top), env(safe-area-inset-top, 0px));
  padding-bottom: var(--space-screen-bottom);
  padding-bottom: calc(
    var(--space-screen-bottom) + env(safe-area-inset-bottom, 0px)
  );
}
.screen.is-active {
  display: flex;
  animation: fade 0.45s ease both;
}
#screen-ergebnis.is-active {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.screen__inner {
  width: 100%;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-stack);
}
.screen__inner--center {
  text-align: center;
  align-items: center;
  justify-content: center;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Logo (Original-Asset, unveraendert) ---------- */
.brand {
  display: block;
  width: auto;
  height: var(--brand-h);
  margin-bottom: var(--space-1);
}
.brand--klein {
  height: var(--brand-h-sm);
  margin: 0 auto var(--space-1);
}

/* ---------- Typo ---------- */
.huge {
  font-size: var(--text-display);
  line-height: var(--lh-tight);
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
}
.title {
  font-size: var(--text-title);
  line-height: var(--lh-tight);
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
}
.lead {
  font-size: var(--text-body);
  line-height: var(--lh-body);
  margin: 0;
  max-width: 38ch;
  color: var(--schwarz);
}
.lead--big {
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.35;
  color: var(--schwarz);
}
.muted {
  color: var(--grau);
  font-size: var(--text-xs);
  margin: 0;
}

/* ---------- Consent-Karte ---------- */
.consent {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  background: var(--karte);
  border-radius: var(--radius-card);
  padding: var(--space-4);
}
.consent__label {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-body);
  line-height: var(--lh-body);
  cursor: pointer;
}
.consent input {
  appearance: none;
  -webkit-appearance: none;
  width: var(--touch-min);
  height: var(--touch-min);
  flex: none;
  margin: 0;
  border: 1px solid var(--schwarz);
  border-radius: 50%;
  background: var(--weiss);
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
}
.consent input:checked {
  background: var(--schwarz);
}
.consent input:checked::after {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 0.7rem;
  width: 6px;
  height: 12px;
  border: solid var(--weiss);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.consent input:focus-visible {
  outline: 3px solid var(--schwarz);
  outline-offset: 2px;
}
.consent a,
.consent__link {
  color: var(--schwarz);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  margin-left: calc(var(--touch-min) + var(--space-3));
  position: relative;
}
/* Datenangst sofort entkräften – sichtbar, nicht nur im Sheet versteckt. */
.consent__beruhigung {
  display: block;
  margin-top: var(--space-2);
  font-weight: 700;
  color: var(--schwarz);
}

/* ---------- Startseite / Intro-Hero ---------- */
#screen-intro {
  position: relative;
  overflow: hidden;
}
.intro {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-height: 0;
  margin: 0;
  justify-content: flex-start;
  gap: var(--space-stack);
}
.intro__hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.eyebrow {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--schwarz);
  color: var(--weiss);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0;
  padding: 0.375rem 1.5rem;
  border-radius: var(--radius-btn);
}
.eyebrow .ic {
  width: 15px;
  height: 15px;
}
/* "zu viel?" mit Highlighter-Strich */
.mark {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.mark::before {
  content: "";
  position: absolute;
  left: -5px;
  right: -5px;
  bottom: 5%;
  height: 32%;
  background: var(--gelb);
  border-radius: var(--radius-mark);
  transform: rotate(-1.6deg);
  z-index: -1;
}
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-chips);
}
.check {
  background: var(--karte);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  animation: rise 0.5s ease both;
}
.check:nth-child(2) {
  animation-delay: 0.08s;
}
.check:nth-child(3) {
  animation-delay: 0.16s;
}
.check__ic {
  display: grid;
  place-items: center;
  width: var(--check-ic);
  height: var(--check-ic);
  border-radius: 50%;
  background: var(--bg);
  color: var(--schwarz);
}
.check__ic .ic {
  width: 24px;
  height: 24px;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.btn--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn--icon .ic {
  width: 20px;
  height: 20px;
}
.intro__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--grau);
}
.intro__trust span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.intro__trust .ic {
  width: 14px;
  height: 14px;
}

/* ---------- Filial-Rabatt (Ergebnis + Ticket) ---------- */
.filial-offer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--gelb);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  font-weight: 400;
}
.filial-offer__ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--schwarz);
  color: var(--gelb);
}
.filial-offer__ic .ic {
  width: 20px;
  height: 20px;
}
.filial-offer strong {
  font-weight: 700;
}
.ticket__offer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--schwarz);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.375rem 1.5rem;
  border-radius: var(--radius-btn);
  margin: 12px 0 0;
}
/* Hoehere Spezifitaet als ".sheet__inner p {color:#333}" -> weiße Schrift gewinnt. */
.sheet__inner--ticket .ticket__offer {
  color: var(--weiss);
}
.ticket__offer .ic {
  width: 15px;
  height: 15px;
}

/* ---------- Netz-Verdict (Wechsel-Zwischenseite) ---------- */
.netz-verdict {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
}
.netz-verdict__ic {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--schwarz);
  color: var(--gelb);
}
.netz-verdict__ic .ic {
  width: 40px;
  height: 40px;
}
.netz-ask {
  width: 100%;
}
.netz-ask .frage__q {
  text-align: center;
}
.netz-verdict .filial-offer {
  width: 100%;
  text-align: left;
}

/* ---------- Buttons ---------- */
.btn {
  display: block;
  width: 100%;
  min-height: var(--touch-min);
  border: 2px solid var(--schwarz);
  border-radius: var(--radius-btn);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-family: "postsans", sans-serif;
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: var(--lh-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease,
    border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active {
  transform: none;
}
.btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 var(--focus-ring) var(--overlay);
}
.btn--primary {
  background: var(--schwarz);
  color: var(--weiss);
  box-shadow: none;
}
.btn--primary:hover {
  color: var(--gelb-soft);
}
.btn--primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}
.btn--ghost {
  background: transparent;
  color: var(--schwarz);
  border: 2px solid var(--schwarz);
}
.btn--ghost:hover {
  background: var(--weiss);
}
.btn--text {
  background: transparent;
  border-color: transparent;
  color: var(--schwarz);
  font-weight: 700;
  font-size: var(--text-body);
  padding: var(--space-2);
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* ---------- Speed-Gauge ---------- */
.gauge {
  position: relative;
  width: var(--gauge-size);
  height: var(--gauge-size);
  display: grid;
  place-items: center;
  margin: var(--space-2) 0;
}
.gauge__value {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}
.gauge__unit {
  position: absolute;
  bottom: 50px;
  font-weight: 700;
  color: var(--grau);
}
.gauge__ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}
.gauge__bg {
  fill: none;
  stroke: var(--dim);
  stroke-width: 9;
}
.gauge__fg {
  fill: none;
  stroke: var(--schwarz);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 0.35s ease;
}
/* Waehrend der Messung: rotierender Teilbogen statt eingefrorenem 0er-Ring. */
.gauge.is-messing .gauge__fg {
  stroke-dasharray: 80 247 !important;
  stroke-dashoffset: 0 !important;
  transform-box: fill-box;
  transform-origin: center;
  animation: gaugeSpin 1.1s linear infinite;
}
@keyframes gaugeSpin {
  to {
    transform: rotate(360deg);
  }
}
.speed-status {
  font-size: var(--text-md);
  font-weight: 700;
  margin: 0;
  min-height: 1.6em;
}

/* Netz-Reveal (erscheint erst im Speed-Schritt, NICHT auf Seite 1) */
.netzchip {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-3);
  text-align: left;
  background: var(--schwarz);
  color: var(--weiss);
  border-radius: var(--radius-btn);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-body);
  font-weight: 700;
  max-width: 100%;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.netzchip.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.netzchip b {
  color: var(--gelb);
}
.netzchip__org {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--weiss-75);
}
.netzchip__ic {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--gelb);
}
.netzchip__txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* Icons im Filial-Ticket (Badge gelb, Hinweis grau) */
.ticket__badge .ic {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}
.ticket__hint .ic {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  color: var(--grau);
}

/* ---------- Geraet ---------- */
.emoji {
  line-height: 1;
  color: var(--schwarz);
}

/* ---------- Quiz ---------- */
.frage {
  margin-top: 4px;
}
.frage__q {
  font-size: var(--text-md);
  font-weight: 700;
  margin: 0 0 var(--space-3);
  line-height: 1.3;
}
.frage__q small {
  display: block;
  font-weight: 400;
  color: var(--grau);
  font-size: var(--text-body);
  margin-top: var(--space-1);
}
.frage__hint {
  font-size: var(--text-xs);
  color: var(--grau);
  margin: var(--space-1) 0 0;
}
.frage--geraet {
  width: 100%;
  text-align: left;
}
.chips {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap-chips);
}
.chips--stack {
  grid-template-columns: 1fr;
}
.chip {
  background: var(--karte);
  border: 2px solid var(--schwarz);
  border-radius: var(--radius-btn);
  padding: var(--space-3) var(--space-6);
  font-family: "postsans", sans-serif;
  font-size: var(--text-body);
  font-weight: 700;
  line-height: 1.3;
  color: var(--schwarz);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: var(--touch-min);
  transition: color 0.15s ease, background-color 0.15s ease,
    border-color 0.15s ease;
}
.chip small {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--grau);
}
.chip:active {
  transform: none;
}
.chip:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 var(--focus-ring) var(--overlay);
}
.chip.is-selected {
  border-color: var(--schwarz);
  background: var(--schwarz);
  color: var(--weiss);
}
.chip.is-selected small {
  color: var(--weiss-75);
}
.chips--stack .chip {
  border-radius: var(--radius-card);
  align-items: flex-start;
  text-align: left;
  min-height: var(--touch-min);
  padding: var(--space-4);
}

/* ---------- Ergebnis ---------- */
.ergebnis-spar {
  background: var(--schwarz);
  color: var(--weiss);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.5, 1) both;
}
.ergebnis-spar__label {
  font-size: var(--text-body);
  font-weight: 400;
  opacity: 0.9;
}
.ergebnis-spar__value {
  font-size: var(--text-hero-num);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: 0;
  color: var(--gelb);
}
@keyframes pop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.tarifkarte {
  background: var(--karte);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  border: 0;
}
.tarifkarte__name {
  font-size: var(--text-xl);
  font-weight: 700;
}
.tarifkarte__daten {
  font-size: var(--text-hero-num);
  font-weight: 700;
  letter-spacing: 0;
  margin: var(--space-1) 0 var(--space-3);
}
.tarifkarte__features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.tarifkarte__features li {
  font-size: var(--text-body);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.tarifkarte__features li .ic {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--schwarz);
  stroke-width: 2.6;
}
.tarifkarte__preis {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  border-top: 1px solid var(--linie);
  padding-top: var(--space-3);
}
.tarifkarte__preisVal {
  font-size: var(--text-hero-num);
  font-weight: 700;
}
.tarifkarte__preisUnit {
  color: var(--grau);
  font-weight: 400;
}
.tarifkarte__jahr {
  margin: var(--space-2) 0 0;
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--grau);
}
.tarif-hinweis {
  margin: 0;
  padding: var(--space-3) var(--space-3);
  background: var(--karte);
  border-radius: var(--radius-card);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  font-weight: 400;
}

.empfehlungen {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.empfehlungen__titel {
  margin: var(--space-1) 0 0;
  font-size: var(--text-lg);
  font-weight: 700;
}
.empfehlungen__hint {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--grau);
}
.paketliste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.paket {
  background: var(--karte);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-4);
}
.paket__kopf {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: baseline;
}
.paket__name {
  font-weight: 700;
  font-size: var(--text-body);
}
.paket__preis {
  font-weight: 700;
  font-size: var(--text-body);
  white-space: nowrap;
}
.paket__text {
  margin: var(--space-1) 0 0;
  font-size: var(--text-xs);
  color: var(--grau);
  line-height: 1.4;
}
.internetkarte {
  background: var(--karte);
  border-radius: var(--radius-card);
  padding: var(--space-4);
}
.internetkarte__name {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
}


.ergebnissatz {
  font-size: var(--text-body);
  line-height: var(--lh-body);
  margin: var(--space-1) 0;
}
.geraet-cta {
  background: var(--karte);
  border: 0;
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-body);
  line-height: var(--lh-body);
}
.kleingedruckt {
  font-size: var(--text-xs);
  color: var(--grau);
  line-height: var(--lh-body);
  margin: var(--space-2) 0 0;
}

/* ---------- Nav: Zurück + Progress, unten, undurchsichtig ---------- */
.topbar {
  position: fixed;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: var(--topbar-h);
  padding: var(--space-2) var(--space-3);
  padding-bottom: var(--space-2);
  padding-bottom: max(var(--space-2), env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  pointer-events: none;
}
.back {
  pointer-events: auto;
  position: absolute;
  left: var(--space-2);
  left: max(var(--space-2), env(safe-area-inset-left, 0px));
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--touch-min);
  border: 2px solid var(--schwarz);
  background: transparent;
  color: var(--schwarz);
  font-family: "postsans", sans-serif;
  font-size: var(--text-body);
  font-weight: 700;
  padding: 0.375rem 1.5rem 0.375rem 0.75rem;
  border-radius: var(--radius-btn);
  cursor: pointer;
}
.back .ic {
  width: 18px;
  height: 18px;
}
.back:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 var(--focus-ring) var(--overlay);
}
.back:hover {
  background: var(--weiss);
}

/* ---------- Progress dots ---------- */
.progress {
  display: flex;
  gap: var(--space-2);
  pointer-events: none;
}
.dot {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: 50%;
  background: var(--dim-22);
  transition: width 0.3s ease, background 0.3s ease;
}
.dot.is-active {
  background: var(--schwarz);
  width: 22px;
  border-radius: 4px;
}
.dot.is-done {
  background: var(--schwarz);
}

/* ---------- Datenschutz-Sheet ---------- */
.sheet {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: flex-end;
  z-index: 100;
  animation: fade 0.25s ease both;
}
/* (Sichtbarkeit ueber die globale [hidden]-Regel ganz oben.) */
.sheet__inner {
  background: var(--weiss);
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  border-radius: var(--radius-card);
  padding: var(--space-6) var(--space-5);
  padding-bottom: max(var(--space-6), env(safe-area-inset-bottom, 0px));
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideup 0.3s ease both;
}
@keyframes slideup {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
.sheet__inner h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg);
  font-weight: 700;
}
.sheet__inner ul {
  padding-left: var(--space-5);
  margin: 0 0 var(--space-3);
}
.sheet__inner li {
  margin-bottom: var(--space-2);
  line-height: 1.45;
}
.sheet__inner p {
  line-height: var(--lh-body);
  color: var(--grau);
}
.sheet__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: var(--grau-btn);
  border: none;
  width: var(--touch-min);
  height: var(--touch-min);
  border-radius: 50%;
  font-size: var(--text-lg);
  cursor: pointer;
  line-height: 1;
}
.sheet__close:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 var(--focus-ring) var(--overlay);
}

/* ---------- Filial-Ticket (Popup mit Mock-Barcode) ---------- */
.sheet__inner--ticket {
  background: var(--bg);
}
.ticket {
  background: var(--weiss);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  text-align: center;
}
.ticket__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}
.ticket__logo {
  height: 1.625rem;
  width: auto;
}
.ticket__badge {
  background: var(--schwarz);
  color: var(--weiss);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-btn);
  letter-spacing: 0;
}
.ticket__title {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: 0;
  margin: var(--space-2) 0 var(--space-3);
}
.ticket__tarif {
  font-size: var(--text-body);
  font-weight: 700;
  margin: 0;
}
.ticket__spar {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--grau);
  margin: var(--space-1) 0 0;
}
.ticket__barcode {
  margin: var(--space-4) 0 var(--space-2);
  padding-top: var(--space-4);
  border-top: 2px dashed var(--dim-22);
  position: relative;
}
.ticket__barcode::before,
.ticket__barcode::after {
  content: "";
  position: absolute;
  top: -11px;
  width: var(--space-5);
  height: var(--space-5);
  border-radius: 50%;
  background: var(--bg);
}
.ticket__barcode::before {
  left: -30px;
}
.ticket__barcode::after {
  right: -30px;
}
.barcode__svg {
  width: 100%;
  height: 88px;
  display: block;
}
.barcode__svg rect {
  fill: var(--schwarz);
}
.ticket__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--text-body);
  font-weight: 700;
  letter-spacing: 0.22em;
  margin: 0;
}
.ticket__hint {
  font-size: var(--text-xs);
  color: var(--grau);
  line-height: 1.45;
  margin: var(--space-3) 0 0;
}

/* Kurze Viewports: nur Semantik-Token, Schrift bleibt lesbar. */
@media (max-height: 740px) {
  :root {
    --space-stack: var(--space-3);
    --space-screen-x: var(--space-4);
    --brand-h: 2.75rem;
    --check-ic: 2.5rem;
    --text-display: clamp(2.25rem, 11vw, 3.125rem);
    --gauge-size: 12.5rem;
  }
}
@media (max-height: 640px) {
  :root {
    --space-stack: var(--space-2);
    --brand-h: 2.5rem;
    --check-ic: 2.25rem;
    --text-display: clamp(2rem, 10vw, 2.625rem);
    --gauge-size: 11.25rem;
  }
  .consent__beruhigung {
    display: none;
  }
  .netz-verdict__ic {
    width: 3.375rem;
    height: 3.375rem;
  }
}
@media (max-width: 360px) {
  :root {
    --space-screen-x: var(--space-4);
  }
  .back__text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .back {
    padding: 0.375rem 0.75rem;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
