@font-face { font-family: Rajdhani; font-weight: 500; font-display: swap; src: url(/vendor/rajdhani-500.woff2) format("woff2"); }
@font-face { font-family: Rajdhani; font-weight: 600; font-display: swap; src: url(/vendor/rajdhani-600.woff2) format("woff2"); }
@font-face { font-family: Rajdhani; font-weight: 700; font-display: swap; src: url(/vendor/rajdhani-700.woff2) format("woff2"); }

:root {
  --schwarz: #0a0a0a; --flaeche: #151518; --flaeche2: #1f1f24; --linie: #2b2b32;
  --text: #f7f3f5; --leise: #a3a0a8; --pink: #ff2d6f; --pink2: #ff77aa;
  --verlauf: linear-gradient(135deg, var(--pink), var(--pink2));
  --ok: #4ade80; --nein: #f87171;
  --oben: env(safe-area-inset-top, 0px); --unten: env(safe-area-inset-bottom, 0px);
  --feder: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overscroll-behavior: none; }
body { background: var(--schwarz); color: var(--text); font: 500 18px/1.3 Rajdhani, system-ui, sans-serif; overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
.ic { width: 1.2em; height: 1.2em; flex: none; display: block; }
[hidden] { display: none !important; }

/* ---------- Knoepfe ---------- */
.haupt, .zweit { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 22px; border-radius: 18px;
  font-weight: 700; font-size: 20px; transition: transform .15s var(--feder), opacity .2s; }
.haupt { background: var(--verlauf); color: #16060c; box-shadow: 0 8px 28px -8px #ff2d6f99; }
.zweit { background: var(--flaeche2); border: 1px solid var(--linie); font-size: 18px; min-height: 52px; }
.breit { width: 100%; }
.haupt:active, .zweit:active, .rund:active, .platz:active, .gross:active { transform: scale(.97); }

/* ---------- Login ---------- */
#login { display: none; position: fixed; inset: 0; z-index: 90; background: radial-gradient(90% 60% at 50% 0, #ff2d6f2e, transparent 70%), var(--schwarz);
  padding: calc(var(--oben) + 12vh) 24px 24px; flex-direction: column; gap: 20px; }
body[data-login] #login { display: flex; }
body[data-login] #app { visibility: hidden; }
.marke { text-align: center; display: grid; justify-items: center; gap: 12px; margin-bottom: 18px; }
.marke img, #start-marke img { border-radius: 22px; box-shadow: 0 10px 40px -8px #ff2d6f88; }
.marke h1, #start-marke h1 { font-size: 34px; font-weight: 700; letter-spacing: .5px; }
#l-form { display: grid; gap: 14px; }
.oder { text-align: center; color: var(--leise); margin-top: 8px; }
.wer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wer input { position: absolute; opacity: 0; }
.wer span { display: block; text-align: center; padding: 14px; border-radius: 16px; background: var(--flaeche2); border: 1px solid var(--linie); font-weight: 700; }
.wer input:checked + span { border-color: var(--pink); color: var(--pink2); }
#l-form input[type=password] { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 15px 18px; font-size: 18px; width: 100%; outline: 0; }
#l-form input[type=password]:focus { border-color: var(--pink); }

/* ---------- Geruest ---------- */
#app { height: 100dvh; display: flex; flex-direction: column; }
#kopf { padding: calc(var(--oben) + 10px) 14px 8px; position: relative; z-index: 5; background: var(--schwarz); view-transition-name: kopf; }
#suchzeile { display: flex; align-items: center; gap: 8px; }
#logo { flex: none; display: none; }
#logo img { border-radius: 11px; display: block; }
#suche { flex: 1; position: relative; min-width: 0; }
#ziel { width: 100%; height: 56px; padding: 0 18px; border-radius: 18px; background: var(--flaeche); border: 1px solid var(--linie); font-size: 21px; font-weight: 600;
  outline: 0; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; view-transition-name: wohin; }
#ziel::placeholder { color: var(--leise); }
#ziel:focus { border-color: var(--pink); box-shadow: 0 0 0 3px #ff2d6f33; }
#ziel::-webkit-search-cancel-button { filter: grayscale(1); }
#vorschlaege { position: absolute; top: 62px; left: 0; right: 0; z-index: 30; background: var(--flaeche2); border: 1px solid var(--linie); border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 50px #000a; animation: rein .18s var(--feder); }
#vorschlaege button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 15px; text-align: left; color: var(--text); }
#vorschlaege button + button { border-top: 1px solid var(--linie); }
#vorschlaege .ic { color: var(--pink); }
#vorschlaege span { min-width: 0; overflow: hidden; }
#vorschlaege small { display: block; color: var(--leise); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes rein { from { opacity: 0; transform: translateY(-6px); } }

.rund { position: relative; flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--flaeche); border: 1px solid var(--linie);
  transition: transform .15s var(--feder), color .2s; }
#k-fav.an { color: var(--pink); border-color: var(--pink); }
#f-punkt { position: absolute; top: 9px; right: 9px; width: 11px; height: 11px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px var(--pink); }

#leiste { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.naehe.mini { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--pink); background: var(--flaeche); border: 1px solid var(--linie); }
.naehe.sucht .ic { animation: puls 1s infinite; }
#anzahl { flex: 1; min-width: 0; color: var(--leise); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#umschalter { flex: none; display: flex; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 13px; padding: 3px; }
#umschalter button { width: 48px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--leise); transition: background .2s, color .2s; }
#umschalter button[aria-pressed=true] { background: var(--verlauf); color: #16060c; }

/* Startbild */
#start-marke { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 13vh 0 34px; }
#start-anzahl { color: var(--leise); min-height: 1.3em; }
#start-knoepfe { display: grid; gap: 12px; margin-top: 14px; }
#start-knoepfe .haupt { width: 100%; min-height: 64px; font-size: 22px; }
#start-fav .ic { color: var(--pink); }
body[data-ansicht=start] #k-fav, body[data-ansicht=start] #k-filter, body[data-ansicht=start] #leiste,
body[data-ansicht=start] #liste, body[data-ansicht=start] #karte { display: none; }
body[data-ansicht=ergebnis] #start-marke, body[data-ansicht=ergebnis] #start-knoepfe { display: none; }
body[data-ansicht=ergebnis] #logo { display: block; }
body[data-ansicht=ergebnis] .rund, body[data-ansicht=ergebnis] #ziel { height: 50px; }
body[data-ansicht=ergebnis] .rund { width: 50px; border-radius: 15px; }
body[data-ansicht=ergebnis] #ziel { font-size: 19px; padding: 0 14px; border-radius: 15px; }
body.offline #kopf::after { content: "offline"; position: absolute; top: calc(var(--oben) + 2px); right: 16px; font-size: 12px; color: var(--pink2); }
body[data-ansicht=start] #logo { display: block; position: absolute; top: calc(var(--oben) + 10px); right: 14px; opacity: 0; width: 44px; height: 44px; }

/* ---------- Liste ---------- */
#liste { flex: 1; overflow-y: auto; padding: 6px 14px calc(var(--unten) + 20px); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
body[data-tab=karte] #liste { display: none; }
body[data-tab=liste] #karte { display: none; }
#liste-innen { display: grid; gap: 12px; }
#liste-ende { height: 1px; }
#leer { color: var(--leise); text-align: center; padding: 50px 24px; }
.platz { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 22px; padding: 15px 16px 14px; transition: transform .15s var(--feder), border-color .2s; cursor: pointer;
  animation: auftauchen .32s var(--feder) both; content-visibility: auto; contain-intrinsic-size: auto 124px; }
@keyframes auftauchen { from { opacity: 0; transform: translateY(10px); } }
.pl-kopf { display: flex; gap: 10px; align-items: flex-start; }
.platz h3 { flex: 1; min-width: 0; font-size: 22px; font-weight: 700; line-height: 1.12; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-ort { color: var(--leise); font-size: 16px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-ort .zu { color: var(--nein); font-weight: 600; }
.pl-fuss { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 10px; }
.merkmale { display: flex; gap: 12px; align-items: center; }
.merkmal { display: inline-flex; align-items: center; gap: 2px; font-size: 18px; position: relative; }
.merkmal small { font-size: 14px; font-weight: 700; }
.merkmal.ja { color: var(--pink2); }
.merkmal.weiss { color: #4a4850; }
.merkmal.nein { color: #5a4850; }
.merkmal.nein::after { content: ""; position: absolute; left: -1px; right: -1px; top: 50%; height: 2px; background: var(--nein); transform: rotate(-38deg); border-radius: 2px; }
.pl-zahlen { display: flex; align-items: baseline; gap: 12px; }
.km { color: var(--leise); font-size: 17px; font-weight: 600; }
.preis { font-size: 25px; font-weight: 700; background: var(--verlauf); -webkit-background-clip: text; background-clip: text; color: transparent; }

.herz { flex: none; position: relative; width: 40px; height: 40px; margin: -8px -8px 0 0; display: grid; place-items: center; color: #3c3a42; font-size: 19px; transition: color .15s; }
.herz.an { color: var(--pink); }
.herz.puls .ic { animation: herz .42s var(--feder); }
.herz i { position: absolute; right: 2px; top: 3px; font: 700 10px Rajdhani, sans-serif; color: var(--text); background: var(--schwarz); border-radius: 6px; padding: 0 3px; }
@keyframes herz { 0% { transform: scale(.6); } 55% { transform: scale(1.4); } 100% { transform: scale(1); } }
@keyframes puls { 50% { opacity: .35; } }

.ki { display: inline-block; vertical-align: .14em; margin-left: 3px; padding: 1px 7px; border-radius: 7px; background: var(--verlauf); color: #16060c; font-size: 13px; font-weight: 700; line-height: 1.3; white-space: nowrap; box-shadow: 0 0 10px #ff2d6f66; }
.ki.eigen { background: none; color: var(--pink2); border: 1px solid var(--pink); box-shadow: none; padding: 0 6px; }
.ki-text { color: var(--pink2); font-weight: 700; }

/* ---------- Karte ---------- */
#karte { flex: 1; position: relative; min-height: 0; }
#karte-box { position: absolute; inset: 0; background: #0a0a0c; }
.ich-punkt { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid #3b82f6; box-shadow: 0 0 0 7px #3b82f644; }
.maplibregl-ctrl-attrib { font: 500 11px system-ui, sans-serif; background: #0009 !important; color: #999; }
.maplibregl-ctrl-attrib a { color: #bbb !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }

/* ---------- Sheets ---------- */
#schleier { position: fixed; inset: 0; background: #0009; backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 39; }
#schleier.auf { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 92dvh; display: flex; flex-direction: column; background: #111114; border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--linie); transform: translateY(105%); transition: transform .42s var(--feder), visibility 0s .42s; will-change: transform; box-shadow: 0 -20px 60px #000a; visibility: hidden; }
.sheet.auf { transform: none; visibility: visible; transition: transform .42s var(--feder); }
.griff { flex: none; height: 26px; display: grid; place-items: center; }
.griff::after { content: ""; width: 44px; height: 5px; border-radius: 3px; background: #47454e; }
.inhalt { overflow-y: auto; padding: 0 18px calc(var(--unten) + 22px); overscroll-behavior: contain; }
.sheet h2 { font-size: 27px; font-weight: 700; line-height: 1.1; }
.sheet h4 { font-size: 15px; font-weight: 700; color: var(--leise); text-transform: uppercase; letter-spacing: 1px; margin: 20px 0 9px; }
.lade { color: var(--leise); padding: 14px 0 40px; }
.d-kopf { display: flex; gap: 10px; align-items: flex-start; }
.d-kopf h2 { flex: 1; min-width: 0; }
.gross-herz { width: 48px; height: 48px; margin: -6px -6px 0 0; font-size: 25px; }
.d-ort { color: var(--leise); margin-top: 4px; }
.d-preis { display: flex; align-items: center; gap: 12px; margin-top: 13px; }
.d-preis b { flex: none; white-space: nowrap; font-size: 34px; font-weight: 700; background: var(--verlauf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.d-preis span { color: var(--leise); font-size: 15px; line-height: 1.15; }
.grosse { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.gross { display: grid; justify-items: center; gap: 5px; padding: 15px 4px 12px; border-radius: 18px; background: var(--flaeche2); border: 1px solid var(--linie); color: var(--text); text-decoration: none; font-size: 16px; font-weight: 700;
  transition: transform .15s var(--feder); }
.gross .ic { font-size: 22px; color: var(--pink2); }
.gross:first-child { background: var(--verlauf); color: #16060c; border: 0; }
.gross:first-child .ic { color: #16060c; }
.gross.aus { opacity: .32; }
.d-saison, .d-strom { display: flex; align-items: center; gap: 9px; margin-top: 13px; color: var(--text); }
.d-saison .ic, .d-strom .ic { color: var(--pink2); }
.d-saison.zu { color: var(--nein); }
.d-saison.zu .ic { color: var(--nein); }
.ausstattung { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.a { display: grid; justify-items: center; gap: 3px; padding: 11px 2px 8px; border-radius: 15px; background: var(--flaeche); font-size: 13px; font-weight: 600; text-align: center; position: relative; color: #5c5a63; }
.a .ic { font-size: 20px; }
.a.ja { color: var(--text); }
.a.ja .ic { color: var(--pink2); }
.a.nein .ic { color: #6e4f55; }
.a.nein::after { content: ""; position: absolute; top: 21px; left: calc(50% - 15px); width: 30px; height: 2px; background: var(--nein); transform: rotate(-38deg); }
.d-notiz { margin-top: 13px; padding: 12px 14px; border-radius: 15px; background: #ff2d6f14; border-left: 3px solid var(--pink); overflow-wrap: anywhere; }
.umgebung { list-style: none; margin: 0; padding: 0; }
.umgebung li { display: flex; align-items: center; gap: 11px; padding: 8px 0; }
.umgebung li + li { border-top: 1px solid #222228; }
.umgebung .ic { color: var(--pink2); }
.umgebung span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.umgebung b { color: var(--leise); font-weight: 600; }
.d-aktionen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.d-aktionen .laeuft { color: var(--pink2); animation: puls 1.1s infinite; }
.d-info { display: flex; align-items: center; gap: 8px; color: var(--leise); font-size: 16px; margin-top: 11px; min-height: 1px; }

/* Formular */
#edit-form { display: grid; gap: 13px; margin-top: 16px; }
.feld span, .tri > span { display: block; color: var(--leise); font-size: 15px; margin-bottom: 5px; }
.feld input, .feld textarea { width: 100%; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 12px 14px; font-size: 18px; outline: 0; resize: vertical; }
.feld input:focus, .feld textarea:focus { border-color: var(--pink); }
.feld ::placeholder { color: #66646c; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tri { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tri > span { margin: 0; font-size: 17px; color: var(--text); }
.tri > div { display: flex; background: var(--flaeche); border-radius: 12px; padding: 3px; flex: none; }
.tri button { padding: 7px 11px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--leise); }
.tri button[aria-pressed=true] { background: var(--verlauf); color: #16060c; }
.haken { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.haken input { width: 22px; height: 22px; accent-color: var(--pink); }

/* Filter */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 10px 15px; border-radius: 14px; background: var(--flaeche); border: 1px solid var(--linie); font-weight: 600; color: var(--leise); transition: background .15s, color .15s, transform .15s var(--feder); }
.chip:active { transform: scale(.95); }
.chip[aria-pressed=true] { background: var(--verlauf); color: #16060c; border-color: transparent; }
.regler { display: block; margin-top: 18px; }
.regler span { display: flex; justify-content: space-between; color: var(--leise); }
.regler b { color: var(--pink2); }
.regler input { width: 100%; accent-color: var(--pink); height: 34px; margin: 2px 0 0; }
.f-fuss { position: sticky; bottom: calc(-1 * var(--unten) - 22px); display: grid; grid-template-columns: auto 1fr; gap: 10px; margin: 18px -18px 0; padding: 12px 18px calc(var(--unten) + 14px); background: linear-gradient(transparent, #111114 18%); }
.f-fuss .zweit { min-height: 58px; }
#s-konto .haupt, #s-konto .zweit { width: 100%; margin-top: 16px; }

#toast { position: fixed; left: 50%; bottom: calc(var(--unten) + 22px); transform: translate(-50%, 30px); max-width: calc(100vw - 32px); width: max-content; background: #2a2a31; border: 1px solid #3a3a43; padding: 11px 18px; border-radius: 15px; z-index: 95;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--feder); text-align: center; }
#toast.auf { opacity: 1; transform: translate(-50%, 0); }

#update { position: fixed; top: calc(var(--oben) + 8px); left: 50%; transform: translateX(-50%); z-index: 96; width: max-content; max-width: calc(100vw - 24px);
  padding: 10px 18px; border-radius: 15px; background: var(--verlauf); color: #16060c; font-weight: 700; box-shadow: 0 8px 28px -6px #ff2d6fcc; animation: rein .3s var(--feder); }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
::view-transition-group(wohin), ::view-transition-group(kopf) { animation-duration: .36s; animation-timing-function: var(--feder); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (min-width: 700px) { #app, .sheet { max-width: 560px; margin: 0 auto; } .sheet { left: 0; right: 0; } }
