/* Sapori-App – Papierweiss, Weinrot, Jura duenn ueber Montserrat fett (Sapori-CI der Aushaenge).
   Handy zuerst. Abschnitte ueber Ueberschrift und Linie, keine Kartenstapel. */

@font-face { font-family: "Jura"; src: url("/static/fonts/jura-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/static/app/fonts/montserrat-latin.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }

:root {
  --papier: #fafaf8;
  --weiss: #ffffff;
  --tinte: #1a1815;
  --grau: #6b645c;
  --hell: #9a938a;
  --linie: #e4dfd7;
  --linie-stark: #cfc8bd;
  --rot: #9e1a14;
  --rot-dunkel: #7f140f;
  --rot-hauch: #f6ecea;
  --gruen: #3d6b2a;
  --jura: "Jura", "Trebuchet MS", Arial, sans-serif;
  --mont: "Montserrat", "Arial Black", Arial, sans-serif;
  --leiste: 64px;
  --unten: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font-family: var(--jura); font-size: 17px; line-height: 1.5; font-weight: 500;
  padding-bottom: calc(var(--leiste) + var(--unten) + 24px);
  -webkit-tap-highlight-color: transparent;
}
body.ohne-leiste { padding-bottom: calc(var(--unten) + 24px); }
img, svg { display: block; max-width: 100%; }
a { color: var(--rot); text-decoration-thickness: 1px; text-underline-offset: 3px; }
p { margin: 0 0 .75em; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.seite { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.test-band { background: var(--tinte); color: #fff; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; text-align: center; padding: 4px 8px calc(4px); padding-top: calc(4px + env(safe-area-inset-top, 0px)); }

/* ---------- Kopf und Titel ---------- */
.kopf { display: flex; justify-content: center; padding: calc(18px + env(safe-area-inset-top, 0px)) 0 4px; }
.kopf img { width: 76px; height: 76px; }
.kopf--klein { justify-content: space-between; align-items: center; padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
.kopf--klein img { width: 40px; height: 40px; }
.kopf__zurueck { font-size: 15px; text-decoration: none; color: var(--grau); }

.titel { margin: 18px 0 6px; line-height: 1.02; }
.titel__klein { display: block; font-family: var(--jura); font-weight: 300; font-size: 19px; letter-spacing: .32em; text-transform: uppercase; color: var(--grau); margin-bottom: 4px; }
.titel__gross { display: block; font-family: var(--mont); font-weight: 800; font-size: clamp(30px, 9vw, 42px); letter-spacing: .02em; text-transform: uppercase; color: var(--tinte); }
.unterzeile { font-family: var(--jura); text-transform: uppercase; letter-spacing: .16em; font-size: 13px; color: var(--rot); margin: 0 0 6px; font-weight: 600; }

/* ---------- Abschnitte ---------- */
.abschnitt { margin-top: 34px; }
.abschnitt__kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--tinte); padding-bottom: 6px; margin-bottom: 4px; }
.abschnitt__titel { margin: 0; font-family: var(--mont); font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.abschnitt__mehr { font-size: 14px; text-decoration: none; white-space: nowrap; }
.abschnitt__mehr::after { content: " →"; }
.leise { color: var(--grau); }
.klein { font-size: 14px; }

/* Zeilen mit Haarlinie statt Karten */
.zeilen { list-style: none; margin: 0; padding: 0; }
.zeilen > li { border-bottom: 1px solid var(--linie); padding: 12px 0; }
.zeilen > li:last-child { border-bottom: 0; }
.zeile { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.zeile__haupt { min-width: 0; }
.zeile__wert { white-space: nowrap; font-variant-numeric: tabular-nums; }
.zeile--heute { font-weight: 700; }
.zeile--abweichend .zeile__wert { color: var(--rot); font-weight: 700; }
a.zeilen__link { display: block; color: inherit; text-decoration: none; }

/* ---------- Knoepfe ---------- */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border: 1.5px solid var(--tinte); border-radius: 2px; background: transparent; color: var(--tinte); font-family: var(--mont); font-weight: 700; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.knopf svg { width: 20px; height: 20px; flex: none; }
.knopf--rot { background: var(--rot); border-color: var(--rot); color: #fff; }
.knopf--rot:active { background: var(--rot-dunkel); }
.knopf--breit { width: 100%; }
.knopf--leise { border-color: var(--linie-stark); color: var(--grau); }
.knopf[disabled] { opacity: .45; cursor: default; }
.textknopf { background: none; border: 0; padding: 8px 0; color: var(--rot); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 15px; }

/* ---------- Heute: Status ---------- */
.status { margin-top: 6px; }
.status__gruss { margin: 0; color: var(--grau); font-size: 15px; }
.status__detail { margin: 2px 0 0; font-size: 17px; }
.status--offen .titel__gross { color: var(--gruen); }
.status--zu .titel__gross { color: var(--rot); }
.zeitstrahl { margin: 16px 0 0; }
.zeitstrahl svg { width: 100%; height: auto; overflow: visible; }
.zeitstrahl__achse { display: flex; justify-content: space-between; font-size: 11px; color: var(--hell); margin-top: 4px; font-variant-numeric: tabular-nums; }
.zs-grund { fill: var(--linie); }
.zs-offen { fill: var(--tinte); }
.zs-jetzt { fill: var(--rot); }

/* Schnellwahl: vier Felder in einer Reihe, getrennt durch Linien */
.schnell { display: grid; grid-template-columns: repeat(4, 1fr); margin: 24px 0 0; border-top: 1px solid var(--tinte); border-bottom: 1px solid var(--tinte); }
.schnell a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px 12px; color: var(--tinte); text-decoration: none; font-size: 13px; letter-spacing: .04em; border-left: 1px solid var(--linie); }
.schnell a:first-child { border-left: 0; background: var(--rot); color: #fff; }
.schnell svg { width: 26px; height: 26px; }
.schnell a:active { background: var(--rot-hauch); }
.schnell a:first-child:active { background: var(--rot-dunkel); }

.hinweis { border-left: 3px solid var(--rot); padding: 4px 0 4px 14px; margin: 22px 0 0; }
.hinweis__titel { font-family: var(--mont); font-weight: 700; font-size: 15px; margin: 0 0 2px; }
.hinweis p:last-child { margin-bottom: 0; }

/* Termin mit Datumsblock */
.termin { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: start; color: inherit; text-decoration: none; }
.termin__datum { text-align: center; border: 1.5px solid var(--tinte); padding: 6px 0 4px; line-height: 1; }
.termin__tag { display: block; font-family: var(--mont); font-weight: 800; font-size: 24px; }
.termin__monat { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
.termin__titel { font-family: var(--mont); font-weight: 700; font-size: 17px; line-height: 1.25; margin: 0 0 2px; }
.termin__info { font-size: 14px; color: var(--grau); margin: 0; }
.termin__lage { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin: 4px 0 0; color: var(--rot); font-weight: 700; }
.termin__lage--frei { color: var(--gruen); }
.termin__bild { margin-top: 10px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* Stempel-Fortschritt (klein auf Heute, gross auf der Karte) */
.punkte { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 6px; }
.punkte span { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--linie-stark); }
.punkte span.voll { background: var(--rot); border-color: var(--rot); }

/* ---------- Karte ---------- */
.reiter { position: sticky; top: 0; z-index: 5; background: var(--papier); margin: 18px -20px 0; padding: 0 20px; border-bottom: 1px solid var(--tinte); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.reiter::-webkit-scrollbar { display: none; }
.reiter a { display: inline-block; padding: 12px 0 10px; margin-right: 22px; color: var(--grau); text-decoration: none; font-size: 15px; border-bottom: 3px solid transparent; }
.reiter a.aktiv { color: var(--tinte); border-bottom-color: var(--rot); font-weight: 700; }
.filter { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 14px 0 0; }
.filter__wahl { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 6px 0; font-size: 15px; color: var(--grau); cursor: pointer; }
.filter__wahl::before { content: ""; width: 16px; height: 16px; border: 1.5px solid var(--linie-stark); border-radius: 2px; }
.filter__wahl[aria-pressed="true"] { color: var(--tinte); font-weight: 700; }
.filter__wahl[aria-pressed="true"]::before { background: var(--rot); border-color: var(--rot); box-shadow: inset 0 0 0 3px var(--papier); }
.filter__leer { margin: 18px 0; color: var(--grau); }
.gang { scroll-margin-top: 56px; }
.gericht__kopf { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.gericht__name { font-family: var(--mont); font-weight: 700; font-size: 16px; line-height: 1.3; }
.gericht__preis { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.gericht__preis small { font-weight: 500; font-size: 13px; color: var(--grau); margin-right: 6px; }
.gericht__text { margin: 2px 0 0; font-size: 15px; color: var(--grau); }
.gericht__zeichen { font-size: 12px; letter-spacing: .08em; color: var(--rot); margin-left: 6px; font-family: var(--jura); font-weight: 700; }
.karte-fuss { margin-top: 26px; font-size: 14px; color: var(--grau); }
.wochenzeile { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 12px; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.wochenzeile div { text-align: center; padding: 8px 2px; font-size: 13px; border-left: 1px solid var(--linie); }
.wochenzeile div:first-child { border-left: 0; }
.wochenzeile b { display: block; font-family: var(--mont); font-size: 13px; }
.wochenzeile .zu { color: var(--rot); }

/* ---------- Stempelkarte ---------- */
.stempelfeld { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 22px 0 10px; }
.stempel { aspect-ratio: 1; border: 1.5px dashed var(--linie-stark); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--hell); font-size: 13px; font-weight: 700; }
.stempel svg { width: 58%; height: 58%; }
.stempel--voll { border: 0; background: var(--rot); color: #fff; }
.stempel--ziel { border-style: solid; border-color: var(--tinte); color: var(--tinte); font-family: var(--mont); font-size: 12px; text-align: center; line-height: 1.1; }
.stempel--ziel.stempel--voll { color: #fff; }
.stand { font-size: 17px; margin: 0; }
.stand b { font-family: var(--mont); }
.praemie-bereit { background: var(--rot); color: #fff; padding: 16px 18px; margin: 18px 0 0; }
.praemie-bereit p { margin: 0; }
.praemie-bereit b { font-family: var(--mont); font-size: 18px; display: block; margin-bottom: 2px; }
.qr { margin: 26px auto 0; max-width: 280px; text-align: center; }
.qr__bild { background: #fff; border: 1px solid var(--linie); padding: 10px; }
.qr__bild svg { width: 100%; height: auto; }
.qr__nummer { font-family: var(--mont); font-weight: 700; letter-spacing: .2em; font-size: 20px; margin: 10px 0 0; }
.verlauf { font-size: 14px; }

/* ---------- Formulare ---------- */
.feld { margin: 14px 0 0; }
.feld label { display: block; font-size: 14px; color: var(--grau); margin-bottom: 4px; }
.eingabe { width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--linie-stark); border-radius: 2px; background: #fff; font: inherit; color: var(--tinte); }
.eingabe:focus { outline: 2px solid var(--rot); outline-offset: 1px; border-color: var(--rot); }
.eingabe--pin { font-family: var(--mont); font-size: 28px; letter-spacing: .4em; text-align: center; }
.eingabe--code { font-family: var(--mont); letter-spacing: .2em; text-transform: uppercase; }
fieldset.zeilen { border: 0; padding: 0; margin: 0 0 6px; min-width: 0; }
.wahl { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linie); cursor: pointer; }
.wahl:last-child { border-bottom: 0; }
.wahl input { width: 22px; height: 22px; accent-color: var(--rot); flex: none; margin: 0; }
.meldung { padding: 12px 14px; margin: 16px 0 0; border-left: 3px solid var(--gruen); background: #eef3ea; }
.meldung--fehler { border-left-color: var(--rot); background: var(--rot-hauch); }
.code-gross { font-family: var(--mont); font-weight: 800; font-size: 40px; letter-spacing: .18em; margin: 8px 0; }

/* Anleitung Startbildschirm */
.schritte { margin: 8px 0 0; padding-left: 22px; }
.schritte li { margin: 4px 0; }

.recht h1 { font-family: var(--mont); font-weight: 800; text-transform: uppercase; font-size: 28px; margin: 22px 0 10px; }
.recht h2 { font-family: var(--mont); font-weight: 700; font-size: 16px; margin: 26px 0 6px; }
.recht p, .recht li { font-size: 15px; }

/* ---------- Leiste unten ---------- */
.leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--weiss); border-top: 1px solid var(--linie-stark); padding-bottom: var(--unten); }
.leiste ul { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 640px; margin: 0 auto; padding: 0; list-style: none; }
.leiste a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--leiste); color: var(--grau); text-decoration: none; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.leiste svg { width: 24px; height: 24px; }
.leiste a[aria-current="page"] { color: var(--rot); font-weight: 700; }
.leiste a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; background: var(--rot); }

/* ---------- Fuss ---------- */
.fuss { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--linie); font-size: 13px; color: var(--grau); }
.fuss a { color: var(--grau); }

/* ---------- Personal ---------- */
.personal { background: var(--tinte); color: #fff; }
.personal .titel__gross, .personal .titel__klein { color: #fff; }
.personal a { color: #ffb4ad; }
.personal .eingabe { border-color: #4a443d; }
.personal .knopf { border-color: #fff; color: #fff; }
.personal .knopf--rot { border-color: var(--rot); }
.personal .leise, .personal .feld label { color: #b8b0a6; }
.scanner { position: relative; margin: 18px 0 0; background: #000; aspect-ratio: 1; overflow: hidden; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner__rahmen { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.85); }
.personal-stand { font-family: var(--mont); font-weight: 800; font-size: 64px; line-height: 1; margin: 18px 0 4px; }
.personal-stand small { font-size: 22px; font-weight: 600; color: #b8b0a6; }
.personal .meldung { background: #233a1a; border-left-color: #7fbf5a; color: #fff; }
.personal .meldung--fehler { background: #4a1a16; border-left-color: #ff6b5e; }
.personal .knopf-reihe { display: grid; gap: 12px; margin-top: 20px; }
.personal .knopf { min-height: 60px; font-size: 16px; }

@media (min-width: 700px) {
  body { font-size: 18px; }
  .seite { padding: 0 28px; }
  .reiter { margin: 18px -28px 0; padding: 0 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
