/* Grundgerüst der Vorschau „Räder bei Alb-Bike“. Farben und Schriften setzt stil-a/b/c.css. */
:root {
  --rand: 16px;
  --tipp: 44px;
  --radius: 14px;
  --kopf-h: 60px;
  --schrift-text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --schrift-din: "DIN Alternate", Bahnschrift, "DIN 2014", "Roboto Condensed", "Arial Narrow", sans-serif;
  --schrift-serif: Charter, "Bitstream Charter", "Sitka Text", "Iowan Old Style", Cambria, Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body { margin: 0; font: 16px/1.5 var(--schrift-text); background: var(--grund); color: var(--tinte); overflow-x: hidden; }
html.blatt-offen, html.blatt-offen body { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
button, input, select { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; border-radius: 6px; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprung { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--tinte); color: var(--grund); padding: 10px 14px; border-radius: 8px; }
.sprung:focus { top: 8px; }

/* Vorschau-Hinweis */
.vorschau { margin: 0; padding: 8px var(--rand); padding-top: calc(8px + env(safe-area-inset-top)); font-size: 13px; line-height: 1.4; background: var(--hinweis-grund); color: var(--hinweis-text); text-align: center; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--kopf-h); padding: 8px max(var(--rand), env(safe-area-inset-right)) 8px max(var(--rand), env(safe-area-inset-left));
  background: var(--kopf-grund); border-bottom: 1px solid var(--linie); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tinte); min-height: var(--tipp); }
.logo img { width: 58px; height: auto; }
.logo span { font: 700 italic 21px/1 var(--schrift-din); letter-spacing: .01em; }
.kopf-knoepfe { display: flex; gap: 8px; }
.knopf-rund { position: relative; display: inline-grid; place-items: center; width: var(--tipp); height: var(--tipp); border-radius: 50%;
  border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--tinte); cursor: pointer; text-decoration: none; }
.zahl { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; font: 700 12px/20px var(--schrift-text);
  background: var(--gruen); color: var(--auf-gruen); text-align: center; }
.filter-knopf .zahl { position: static; margin-left: 6px; }
@media (prefers-reduced-motion: no-preference) { .puls .zahl { animation: puls .35s ease-out; } }
@keyframes puls { 50% { transform: scale(1.35); } }

/* Einstieg */
.held { padding: 28px var(--rand) 20px; max-width: 1240px; margin: 0 auto; }
.held h1 { margin: 0 0 12px; max-width: 18ch; }
.held-text { margin: 0 0 20px; max-width: 58ch; color: var(--leise); }
.suche { display: flex; align-items: center; gap: 10px; max-width: 560px; min-height: 52px; padding: 0 14px; border-radius: var(--radius);
  background: var(--flaeche); border: 1px solid var(--linie-stark); color: var(--leise); }
.suche:focus-within { outline: 3px solid var(--fokus); outline-offset: 2px; }
.suche input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; padding: 12px 0; color: var(--tinte); outline: none; }
.suche input::placeholder { color: var(--leise); opacity: 1; }

/* Bedienleiste */
.bedienung { position: sticky; top: var(--kopf-h); z-index: 15; background: var(--kopf-grund); border-bottom: 1px solid var(--linie);
  padding: 10px 0 0; }
.gruppen { display: flex; gap: 4px; padding: 0 var(--rand); max-width: 1240px; margin: 0 auto; }
.gruppen button { flex: 1; min-height: var(--tipp); border: 0; background: transparent; cursor: pointer; font-weight: 600; color: var(--leise);
  border-bottom: 3px solid transparent; padding: 0 6px; }
.gruppen button span { font-weight: 400; font-size: 14px; }
.gruppen button[aria-selected="true"] { color: var(--tinte); border-bottom-color: var(--gruen); }
.leiste { display: flex; align-items: center; gap: 8px; padding: 10px 0 10px var(--rand); max-width: 1240px; margin: 0 auto; }
.kats { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; flex: 1; padding: 2px 2px 2px 0;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.kats::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--linie-stark);
  background: var(--flaeche); cursor: pointer; white-space: nowrap; font-size: 15px; }
.chip span { color: var(--leise); font-size: 13px; }
.chip[aria-pressed="true"] { background: var(--tinte); color: var(--grund); border-color: var(--tinte); }
.chip[aria-pressed="true"] span { color: inherit; opacity: .8; }
.filter-knopf { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tipp); margin-right: var(--rand); padding: 0 14px;
  border-radius: 22px; border: 1px solid var(--tinte); background: var(--flaeche); cursor: pointer; font-weight: 600; }
.filter-knopf svg { width: 20px; height: 20px; }

/* Inhalt */
.inhalt { max-width: 1240px; margin: 0 auto; padding: 0 var(--rand) 40px; }
.filter-seite { display: none; }
.liste-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 12px; }
.treffer { margin: 0; font-weight: 600; }
.sortierung { display: flex; align-items: center; gap: 8px; color: var(--leise); font-size: 14px; }
.sortierung select { font-size: 16px; min-height: 40px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--tinte); }
@media (max-width: 420px) { .sortierung span { display: none; } }
.raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .raster { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.leer { padding: 40px 0; text-align: center; color: var(--leise); }
.leer button { margin-top: 10px; min-height: var(--tipp); padding: 0 18px; border-radius: 22px; border: 1px solid var(--tinte); background: transparent; cursor: pointer; }

/* Karte */
.karte { position: relative; display: flex; }
.karte-link { display: flex; flex-direction: column; width: 100%; text-decoration: none; color: inherit; border-radius: var(--radius); }
.karte-bild { display: block; aspect-ratio: 640 / 420; overflow: hidden; }
.karte-bild img { width: 100%; height: 100%; object-fit: contain; }
.karte-text { display: flex; flex-direction: column; gap: 3px; padding: 10px 2px 4px; flex: 1; }
.karte-marke { font-size: 13px; color: var(--leise); }
.karte-kat { white-space: nowrap; }
.karte-modell { font-weight: 700; line-height: 1.25; }
.karte-werte { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--leise); min-height: 20px; }
.preis { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: auto; padding-top: 6px; }
.preis b { font-size: 18px; }
.preis.angebot b { color: var(--rot); }
.uvp { font-size: 13px; color: var(--leise); }
.merken { position: absolute; top: 4px; right: 4px; width: var(--tipp); height: var(--tipp); display: grid; place-items: center; border-radius: 50%;
  border: 0; background: color-mix(in srgb, var(--flaeche) 82%, transparent); color: var(--tinte); cursor: pointer; }
.merken[aria-pressed="true"] svg, .d-merken[aria-pressed="true"] svg { fill: var(--rot); stroke: var(--rot); }
@media (prefers-reduced-motion: no-preference) { .merken[aria-pressed="true"] svg { animation: puls .3s ease-out; } }

/* Akku-Anzeige */
.akku { display: inline-flex; align-items: center; gap: 6px; }
.akku-z { display: inline-grid; grid-template-columns: repeat(8, 4px); gap: 1.5px; padding: 2px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; height: 12px; }
.akku-z::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; background: currentColor; border-radius: 0 1px 1px 0; }
.akku-z i { background: transparent; border-radius: 1px; }
.akku-z i.an { background: var(--gruen); }

/* Laden */
.laden { max-width: 1240px; margin: 0 auto; padding: 32px var(--rand) 40px; display: grid; gap: 24px; border-top: 1px solid var(--linie); }
.laden h2 { margin: 0 0 10px; }
.laden-text p { margin: 0 0 16px; max-width: 60ch; color: var(--leise); }
.laden-knoepfe, .f-knoepfe, .d-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 24px;
  border: 1px solid var(--tinte); background: transparent; color: var(--tinte); font-weight: 600; text-decoration: none; cursor: pointer; }
.knopf.haupt { background: var(--gruen); border-color: var(--gruen); color: var(--auf-gruen); }
.knopf svg { width: 20px; height: 20px; }
.zeiten { margin: 0; display: grid; gap: 0; }
.zeiten div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.zeiten dt { font-weight: 600; } .zeiten dd { margin: 0; }
address { font-style: normal; line-height: 1.6; }
.leistungen { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.leistungen b { display: block; }
.leistungen li { color: var(--leise); } .leistungen li b { color: var(--tinte); }
@media (min-width: 768px) { .laden { grid-template-columns: 1.3fr 1fr; } .leistungen { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); } }

.fuss { padding: 24px var(--rand) calc(32px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--leise); background: var(--fuss-grund); }
.fuss p { max-width: 1240px; margin: 0 auto 8px; }

/* Blätter */
dialog.blatt { padding: 0; border: 0; margin: 0; max-width: none; max-height: none; width: 100%; height: 100%; background: transparent; color: var(--tinte); overflow: hidden; }
dialog.blatt::backdrop { background: rgba(10, 16, 8, .5); }
.blatt-innen { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - 24px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--blatt-grund); border-radius: 20px 20px 0 0; padding: 0 var(--rand) calc(24px + env(safe-area-inset-bottom)); }
#filter .blatt-innen, #merkliste .blatt-innen { max-height: 88%; }
@media (prefers-reduced-motion: no-preference) {
  dialog.blatt[open] .blatt-innen { animation: hoch .28s cubic-bezier(.2, .8, .2, 1); }
  dialog.blatt[open]::backdrop { animation: blende .28s ease-out; }
  dialog.blatt.geht .blatt-innen { animation: runter .18s ease-in forwards; }
}
@keyframes hoch { from { transform: translateY(100%); } }
@keyframes runter { to { transform: translateY(100%); } }
@keyframes blende { from { opacity: 0; } }
.blatt-kopf { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px;
  margin: 0 calc(-1 * var(--rand)); padding: 6px var(--rand); background: var(--blatt-grund); }
.blatt-kopf h2 { margin: 0; font-size: 20px; }
.griff { position: absolute; left: 50%; top: 6px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--linie-stark); }
.zu { margin-left: auto; width: var(--tipp); height: var(--tipp); display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--flaeche-2); color: var(--tinte); cursor: pointer; }

/* Filter */
.f-titel { font-size: 18px; margin: 0 0 8px; }
.f-gruppe { border: 0; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--linie); }
.f-gruppe legend { font-weight: 700; padding: 0 0 10px; display: flex; gap: 8px; }
.f-gruppe output { font-weight: 400; color: var(--leise); }
.f-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.f-chips .chip { min-height: var(--tipp); }
input[type="range"] { width: 100%; height: var(--tipp); accent-color: var(--gruen-text); }
.f-schalter { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--linie); cursor: pointer; }
.f-schalter input { width: 24px; height: 24px; accent-color: var(--gruen-text); }
.f-knoepfe { padding-top: 16px; }
.f-knoepfe .knopf { flex: 1; }

/* Detail */
.d-raster { display: grid; gap: 16px; }
.d-bild { margin: 0 calc(-1 * var(--rand)); background: var(--bild-grund); }
.d-bild img { width: 100%; aspect-ratio: 1200 / 720; object-fit: contain; }
.d-info h2 { margin: 2px 0 8px; }
.d-info .preis { padding: 0 0 12px; }
.d-info .preis b { font-size: 26px; }
.d-kurz { margin: 0 0 14px; color: var(--leise); max-width: 60ch; }
.d-werte { margin: 0 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--linie); border: 1px solid var(--linie); border-radius: 12px; overflow: hidden; }
.d-werte div { background: var(--blatt-grund); padding: 10px 12px; }
.d-werte dt { font-size: 13px; color: var(--leise); } .d-werte dd { margin: 0; font-weight: 600; font-size: 15px; }
.d-varianten { border: 0; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.d-varianten legend { font-weight: 700; padding-bottom: 8px; }
.variante { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; border: 1px solid var(--linie-stark); border-radius: 12px; cursor: pointer; }
.variante input { width: 20px; height: 20px; accent-color: var(--gruen-text); flex: none; }
.variante span { flex: 1; }
.variante:has(input:checked) { border-color: var(--tinte); box-shadow: inset 0 0 0 1px var(--tinte); }
.d-knoepfe .knopf { flex: 1 1 160px; }
.probe { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--flaeche-2); display: grid; gap: 12px; }
.probe-hinweis { margin: 0; font-weight: 700; color: var(--rot); }
.probe label { display: grid; gap: 4px; font-weight: 600; font-size: 15px; }
.probe input { font-size: 16px; min-height: 48px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--tinte); }
.probe-antwort { margin: 0; } .probe-antwort.ok { color: var(--gruen-text); font-weight: 600; } .probe-antwort.fehler { color: var(--rot); }
.d-stand { font-size: 13px; color: var(--leise); margin: 16px 0 0; }
.d-ausst { margin-top: 20px; border-top: 1px solid var(--linie); }
.d-ausst summary { min-height: 56px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.d-ausst-raster { display: grid; gap: 16px; padding-bottom: 8px; }
.d-ausst h4 { margin: 0 0 6px; font-size: 15px; }
.d-ausst dl { margin: 0; font-size: 14px; }
.d-ausst dl div { display: grid; grid-template-columns: 40% 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--linie); }
.d-ausst dt { color: var(--leise); } .d-ausst dd { margin: 0; overflow-wrap: anywhere; }

/* Merkliste */
.m-leer, .m-hinweis { color: var(--leise); margin: 0 0 12px; }
.vergleich { overflow-x: auto; margin: 0 calc(-1 * var(--rand)); padding: 0 var(--rand); }
.vergleich table { border-collapse: collapse; font-size: 14px; }
.vergleich th, .vergleich td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--linie); min-width: 150px; }
.vergleich thead th { min-width: 170px; }
.vergleich tbody th { min-width: 96px; color: var(--leise); font-weight: 600; position: sticky; left: calc(-1 * var(--rand)); background: var(--blatt-grund); }
.vergleich thead a { display: grid; gap: 2px; color: inherit; text-decoration: none; font-weight: 700; }
.vergleich thead a span { font-weight: 400; color: var(--leise); font-size: 13px; }
.vergleich img { background: var(--bild-grund); border-radius: 8px; }
.m-weg { margin-top: 6px; min-height: 36px; padding: 0 10px; border-radius: 18px; border: 1px solid var(--linie-stark); background: transparent; cursor: pointer; font-size: 13px; }

/* Tablet und größer */
@media (min-width: 768px) {
  :root { --rand: 28px; }
  .held { padding-top: 40px; }
  .blatt-innen { left: 50%; right: auto; top: 50%; bottom: auto; width: min(960px, calc(100% - 48px)); max-height: calc(100% - 64px); transform: translate(-50%, -50%); border-radius: 20px; padding-bottom: 28px; }
  #filter .blatt-innen { width: min(560px, calc(100% - 48px)); }
  @media (prefers-reduced-motion: no-preference) {
    dialog.blatt[open] .blatt-innen { animation: auf .24s cubic-bezier(.2, .8, .2, 1); }
    dialog.blatt.geht .blatt-innen { animation: weg .16s ease-in forwards; }
  }
  .griff { display: none; }
  .d-raster { grid-template-columns: 1.15fr 1fr; align-items: start; gap: 28px; }
  .d-bild { margin: 0; border-radius: 16px; position: sticky; top: 64px; }
  .d-ausst-raster { grid-template-columns: repeat(2, 1fr); column-gap: 28px; }
}
@keyframes auf { from { opacity: 0; transform: translate(-50%, -46%); } }
@keyframes weg { to { opacity: 0; transform: translate(-50%, -48%); } }

/* iPad quer und Desktop: Filter als Spalte */
@media (min-width: 1000px) {
  .filter-knopf { display: none; }
  .leiste { padding-right: var(--rand); }
  .kats { -webkit-mask-image: none; mask-image: none; flex-wrap: wrap; }
  .inhalt { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; }
  .filter-seite { display: block; position: sticky; top: calc(var(--kopf-h) + 130px); align-self: start; max-height: calc(100vh - var(--kopf-h) - 150px); overflow-y: auto; padding: 16px 4px 16px 0; }
  .filter-seite .f-knoepfe .knopf { flex: none; }
}
@media (min-width: 1240px) { .raster { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Hover nur mit Maus */
@media (hover: hover) and (pointer: fine) {
  .chip:hover, .knopf:hover, .filter-knopf:hover { border-color: var(--gruen-text); }
}

/* Textseite (Impressum) */
.textseite main { max-width: 68ch; margin: 0 auto; padding: 32px var(--rand) 48px; }

/* Korrekturen nach erster Sichtprüfung */
[hidden] { display: none !important; }
.knopf { white-space: nowrap; }
.d-werte div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.logo span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.logo img { width: 76px; }
@media (min-width: 768px) {
  #detail .blatt-kopf { position: sticky; top: 0; height: 0; min-height: 0; padding: 0; margin: 0; overflow: visible; background: none; }
  #detail .zu { position: absolute; right: -12px; top: 14px; z-index: 3; box-shadow: 0 0 0 1px var(--linie); }
  #detail .d-raster { padding-top: 28px; }
  #detail .d-info { padding-top: 34px; }
}
.kopf { height: var(--kopf-h); padding-top: 0; padding-bottom: 0; }
.logo img { width: 70px; }
.gruppen button { white-space: nowrap; }
@media (max-width: 360px) { .gruppen button { font-size: 15px; padding: 0 2px; } .gruppen button span { font-size: 12px; } }
