:root {
  --bg: #f5f5f7; --karte: #ffffff; --text: #1d1d1f; --leise: #6e6e73; --linie: #d2d2d7;
  --akzent: #0071e3; --gut: #1a9c47; --gut-bg: #e3f5e9; --schlecht: #d70015; --schlecht-bg: #fde8ea;
  --warn: #b25000; --warn-bg: #fff1e0; --grau-bg: #ececf0;
  --radius: 14px; --schatten: 0 1px 2px rgba(0,0,0,.04), 0 2px 12px rgba(0,0,0,.05);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --karte: #1c1c1e; --text: #f5f5f7; --leise: #98989d; --linie: #38383a;
    --akzent: #2997ff; --gut: #30d158; --gut-bg: #0f2e19; --schlecht: #ff453a; --schlecht-bg: #3a1414;
    --warn: #ff9f0a; --warn-bg: #3a2708; --grau-bg: #2c2c2e; --schatten: none; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif; }
a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 28px; letter-spacing: -.02em; margin: 6px 0 4px; }
h2 { font-size: 19px; letter-spacing: -.01em; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.leise { color: var(--leise); }
.klein { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }

header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px;
  padding: 10px max(18px, env(safe-area-inset-left)); padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--linie); }
.marke { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.marke img { width: 26px; height: 26px; }
.marke:hover { text-decoration: none; }
nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
nav a { padding: 6px 12px; border-radius: 999px; color: var(--text); white-space: nowrap; }
nav a:hover { background: var(--grau-bg); text-decoration: none; }
nav a.an { background: var(--text); color: var(--bg); }
.pille { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; background: var(--grau-bg); color: var(--leise); white-space: nowrap; }
.pille.gut { background: var(--gut-bg); color: var(--gut); }
.pille.schlecht { background: var(--schlecht-bg); color: var(--schlecht); }
.pille.warn { background: var(--warn-bg); color: var(--warn); }
.pille::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pille.ohne::before { display: none; }

main { max-width: 1180px; margin: 0 auto; padding: 18px max(18px, env(safe-area-inset-left)) 60px; }
.laden { padding: 60px; text-align: center; color: var(--leise); }
.raster { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.raster.zwei { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.karte { background: var(--karte); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--schatten);
  border: 1px solid color-mix(in srgb, var(--linie) 50%, transparent); min-width: 0; }
.abschnitt { margin-top: 26px; }
.zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zeile.weit { justify-content: space-between; }

.kacheln { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kachel { background: var(--karte); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--schatten);
  border: 1px solid color-mix(in srgb, var(--linie) 50%, transparent); }
.kachel .wert { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kachel .name { font-size: 13px; color: var(--leise); }

.fav { padding: 20px 22px; }
.fav .titel { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.fav .liefer { margin: 10px 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--grau-bg); }
.storeliste { display: grid; gap: 6px; }
.store { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--grau-bg); }
.store.ja { background: var(--gut-bg); }
.store .punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--leise); flex: none; }
.store.ja .punkt { background: var(--gut); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gut) 25%, transparent); }
.store .wo { flex: 1; min-width: 0; }
.store .txt { font-size: 13px; color: var(--leise); text-align: right; }
.store.ja .txt { color: var(--gut); font-weight: 600; }

table { border-collapse: collapse; table-layout: fixed; width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--linie); vertical-align: top;
  overflow: hidden; text-overflow: ellipsis; }
th { font-size: 12px; font-weight: 600; color: var(--leise); text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
tbody tr.klick { cursor: pointer; }
tbody tr.klick:hover { background: var(--grau-bg); }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle-wrap { overflow-x: auto; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linie); align-items: baseline; }
.liste li:last-child { border-bottom: 0; }
.liste .zeit { flex: none; width: 92px; font-size: 13px; color: var(--leise); font-variant-numeric: tabular-nums; }
.liste .was { flex: 1; min-width: 0; }
.besser { color: var(--gut); } .schlechter { color: var(--schlecht); }

input, select, button { font: inherit; color: inherit; }
input[type=text], input[type=password], input[type=number], input[type=search], select {
  background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; padding: 9px 12px; min-height: 40px; }
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--akzent) 60%, transparent); outline-offset: 0; border-color: var(--akzent); }
button { border: 0; border-radius: 999px; padding: 9px 18px; min-height: 40px; cursor: pointer;
  background: var(--akzent); color: #fff; font-weight: 500; }
button.zweit { background: var(--grau-bg); color: var(--text); }
button.gefahr { background: var(--schlecht-bg); color: var(--schlecht); }
button:disabled { opacity: .5; cursor: default; }
button.stern { background: none; color: var(--leise); padding: 4px 8px; min-height: 0; font-size: 18px; }
button.stern.an { color: #f5a623; }
label.feld { display: grid; gap: 4px; font-size: 13px; color: var(--leise); }
label.feld input, label.feld select { color: var(--text); font-size: 15px; }
.formular { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.haken { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.haken input { width: 18px; height: 18px; }
.storewahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; margin: 8px 0; }
.hinweis { padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); margin: 10px 0; }
.hinweis.gut { background: var(--gut-bg); color: var(--gut); }
.chip { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--grau-bg); font-size: 12px; color: var(--leise); }

.anmelden { max-width: 380px; margin: 12vh auto; text-align: center; }
.anmelden img { width: 64px; height: 64px; }
.anmelden form { display: grid; gap: 10px; margin-top: 18px; }

.karte-hitze { display: grid; grid-template-columns: 24px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 10px; color: var(--leise); }
.karte-hitze div { aspect-ratio: 1; border-radius: 3px; background: var(--grau-bg); }
.karte-hitze .k { background: none; aspect-ratio: auto; display: flex; align-items: center; }
.diagramm svg { width: 100%; height: auto; display: block; }
.diagramm .achse { stroke: var(--linie); }
.diagramm text { fill: var(--leise); font-size: 11px; }
.leer { padding: 22px 0; text-align: center; color: var(--leise); }

@media (max-width: 720px) {
  header { gap: 10px; flex-wrap: wrap; }
  .marke span { display: none; }
  nav { order: 3; flex-basis: 100%; }
  h1 { font-size: 24px; }
  .raster.zwei { grid-template-columns: 1fr; }
  .nur-breit { display: none; }
  main { padding-left: 12px; padding-right: 12px; }
}
