@font-face{font-family:'Archivo';font-weight:800;font-display:swap;src:url(schrift/archivo-latin-800-normal.woff2) format('woff2')}
@font-face{font-family:'Atkinson Hyperlegible';font-weight:400;font-display:swap;src:url(schrift/atkinson-hyperlegible-latin-400-normal.woff2) format('woff2')}
@font-face{font-family:'Atkinson Hyperlegible';font-weight:700;font-display:swap;src:url(schrift/atkinson-hyperlegible-latin-700-normal.woff2) format('woff2')}
/* Wohnung - Robins Wahl C (2.11.2026): dunkler Rahmen, eine weisse Karte,
   unten Nein / Anschauen. "Anschauen" unterscheidet sich von "Nein" durch
   Fuellung und Helligkeit, nicht nur durch den Farbton (Rot-Gruen-Schwaeche). */
:root {
  --rahmen: #15201C; --rahmen-hell: #A9B6B1; --rahmen-linie: #44524D;
  --karte: #FFFFFF; --tinte: #15201C; --leise: #5E6A66; --kachel: #EAF1EE; --foto: #DCE2DF;
  --ja: #3FB596; --ja-tinte: #0E1714; --neu: #E8590C; --fehler: #FF8A7A;
  --anzeige: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --text: 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  position: fixed; inset: 0; overflow: hidden; background: var(--rahmen); color: #FFFFFF;
  font: 15px/1.4 var(--text); -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none; touch-action: manipulation;
}
input { -webkit-user-select: text; user-select: text; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--anzeige); font-weight: 800; }
.leise { color: var(--rahmen-hell); font-size: 13px; }
.fehler { color: var(--fehler); min-height: 1.2em; margin: 0; }

.rahmen { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); padding-top: env(safe-area-inset-top); }
.kopf { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 12px 14px 10px; }
.kopf h1 { font-size: 24px; }
.reiter { display: flex; background: #22302B; border-radius: 10px; padding: 3px; }
.reiter button { border: 0; background: transparent; color: var(--rahmen-hell); padding: 7px 11px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.reiter button[aria-selected="true"] { background: #FFFFFF; color: var(--tinte); }
#match-zahl:not(:empty) { margin-left: 2px; }
.burger { width: 44px; height: 44px; border: 0; background: none; display: grid; align-content: center; justify-items: center; gap: 5px; }
.burger span { width: 20px; height: 2px; background: #FFFFFF; border-radius: 1px; }

/* Stapel */
.buehne { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; padding: 0 14px calc(env(safe-area-inset-bottom) + 10px); min-height: 0; }
.stapel { position: relative; min-height: 0; }
.karte {
  position: absolute; inset: 0; background: var(--karte); color: var(--tinte); border-radius: 24px; overflow: hidden;
  display: grid; grid-template-rows: minmax(140px, 46%) minmax(0, 1fr); will-change: transform; touch-action: pan-y;
}
.karte.hinten { transform: scale(0.95) translateY(10px); filter: brightness(0.9); }
.karte.fliegt { transition: transform 0.28s ease-in, opacity 0.28s ease-in; }
.karte.zurueck-feder { transition: transform 0.22s ease-out; }
.foto { position: relative; background: var(--foto) center / cover no-repeat; display: grid; place-items: center; color: var(--leise); font-size: 13px; }
.foto .marke { position: absolute; left: 14px; top: 14px; background: var(--neu); color: #FFFFFF; font-weight: 700; font-size: 12px; padding: 4px 9px; border-radius: 999px; }
.foto .marke.beispiel { background: #5E6A66; }
.punkte { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 5px; }
.punkte i { width: 6px; height: 6px; border-radius: 3px; background: rgba(21,32,28,0.35); }
.punkte i.an { width: 18px; background: var(--tinte); }
.stempel { position: absolute; top: 22px; font: 800 28px var(--anzeige); padding: 2px 12px; border: 4px solid; border-radius: 10px; opacity: 0; transform: rotate(-12deg); }
.stempel.ja-st { left: 18px; color: #1E8A6E; }
.stempel.nein-st { right: 18px; color: #5E6A66; transform: rotate(12deg); }
.inhalt { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: hidden; }
.preis { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.preis b { font: 800 30px var(--anzeige); white-space: nowrap; }
.preis span { font-size: 13px; color: var(--leise); text-align: right; }
.titel { font-weight: 700; font-size: 17px; line-height: 1.25; }
.lage { font-size: 14px; color: var(--leise); }
.kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 2px; }
.kacheln div { background: var(--kachel); border-radius: 10px; padding: 7px 8px; display: flex; flex-direction: column; min-width: 0; }
.kacheln b { font: 800 18px var(--anzeige); white-space: nowrap; }
.kacheln span { font-size: 11px; color: var(--leise); }
.quellen { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.quellen a { font-size: 13px; font-weight: 700; color: #1F6F5C; text-decoration: none; background: #EAF1EE; border-radius: 8px; padding: 6px 10px; }

.aktionen { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 14px; }
.knopf { height: 56px; border-radius: 16px; font-weight: 700; font-size: 17px; display: grid; place-items: center; text-decoration: none; border: 0; }
.knopf.nein { border: 1.5px solid var(--rahmen-linie); background: transparent; color: #FFFFFF; }
.knopf.ja { background: var(--ja); color: var(--ja-tinte); }
.knopf.leise-knopf { background: transparent; color: var(--rahmen-hell); height: 44px; font-size: 15px; }
.zurueck { border: 0; background: none; color: var(--rahmen-hell); padding: 10px; font-size: 13px; }
.leer { align-self: center; text-align: center; padding: 0 24px; display: grid; gap: 10px; }
.leer h2 { font-size: 26px; }
.leer p { color: var(--rahmen-hell); margin: 0; }

/* Matches */
.liste { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 14px calc(env(safe-area-inset-bottom) + 20px); }
.match-zeile { background: var(--karte); color: var(--tinte); border-radius: 18px; display: grid; grid-template-columns: 96px minmax(0, 1fr); overflow: hidden; margin-bottom: 12px; }
.match-zeile .bild { background: var(--foto) center / cover no-repeat; min-height: 110px; }
.match-zeile .text { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.match-zeile b { font: 800 20px var(--anzeige); }
.match-zeile .titel { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-zeile .quellen { margin-top: 4px; }

/* Match-Moment */
.match-schicht { position: fixed; inset: 0; z-index: 20; background: rgba(14,23,20,0.94); display: grid; place-items: center; padding: 24px; }
.match-innen { width: 100%; max-width: 340px; text-align: center; display: grid; gap: 14px; animation: rein 0.35s ease-out; }
.match-innen h2 { font-size: 44px; color: var(--ja); }
.match-innen p { margin: 0; color: var(--rahmen-hell); }
.paar { display: flex; justify-content: center; }
.paar span { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font: 800 30px var(--anzeige); color: #FFFFFF; border: 4px solid var(--rahmen); }
.paar span + span { margin-left: -14px; }
@keyframes rein { from { transform: scale(0.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* Anmeldung, Blatt, Hinweis */
.anmeldung { height: 100dvh; display: grid; place-items: center; padding: 24px; }
.anmeldung form { width: 100%; max-width: 340px; display: grid; gap: 12px; }
.anmeldung h1 { font-size: 34px; }
.anmeldung p { color: var(--rahmen-hell); margin: 0; }
label { font-size: 13px; color: var(--rahmen-hell); }
input { font: 16px var(--text); padding: 14px; border-radius: 12px; border: 1px solid var(--rahmen-linie); background: #0F1714; color: #FFFFFF; }
.blatt { position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,0.5); display: flex; align-items: flex-end; }
.blatt-innen { width: 100%; background: #1C2925; border-radius: 22px 22px 0 0; padding: 18px 18px calc(env(safe-area-inset-bottom) + 18px); display: grid; gap: 18px; max-height: 85dvh; overflow-y: auto; }
.blatt-innen header { display: flex; justify-content: space-between; align-items: center; }
.blatt-innen section { display: grid; gap: 8px; }
.blatt-innen h3 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rahmen-hell); font-family: var(--text); font-weight: 700; }
.blatt-innen p { margin: 0; }
.schliessen { border: 0; background: none; color: #FFFFFF; font-size: 28px; width: 44px; height: 44px; }
.hinweis { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 90px); transform: translateX(-50%); background: #FFFFFF; color: var(--tinte); padding: 10px 16px; border-radius: 12px; font-weight: 700; z-index: 30; max-width: calc(100% - 32px); text-align: center; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
