/* Gemeinsam für index.html (2D), 3d_entwurf.html und pilot.html.
   Designregel: Zwei Materialien. Kartenpapier für alles, was man liest (Kopf, Blatt, Karten, Dialoge, Zeitleiste).
   Instrument (schwarz) nur für Bedienteile, die auf der Karte liegen. Gewählt heisst immer: umgekehrt, nie eine Akzentfarbe.
   Farbe gehört den Daten (Windstufen, Föhn). Gestrichelt heisst immer: Modell oder unbestätigt, nicht gemessen. */
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 400; font-display: swap; src: url('lib/schrift/barlow-semi-condensed-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 500; font-display: swap; src: url('lib/schrift/barlow-semi-condensed-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 600; font-display: swap; src: url('lib/schrift/barlow-semi-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'B612 Mono'; font-weight: 400; font-display: swap; src: url('lib/schrift/b612-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'B612 Mono'; font-weight: 700; font-display: swap; src: url('lib/schrift/b612-mono-latin-700-normal.woff2') format('woff2'); }
:root {
  --grau: #8a8c84; --gruen: #2f8f4e; --rot: #c62828; --orange: #d97a00;
  --tinte: #15191c; --leise: #5b5a50; --flaeche: #f1ede1; --grund: #f1ede1; --vertieft: #e4dfcf; --linie: #15191c; --haar: #c8c2b0;
  --instr: #15191c; --instr-hell: #ece8da; --instr-leise: #a3a59b; --instr-linie: #3f4447;
  --text: 'Barlow Semi Condensed', system-ui, sans-serif; --wert: 'B612 Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flex; flex-direction: column; height: 100dvh; background: var(--grund); color: var(--tinte);
  font: 400 16px/1.38 var(--text); font-variant-numeric: lining-nums tabular-nums;
}
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
b, strong { font-weight: 600; }
h2, h3, h4 { font-weight: 600; }
.ico { display: block; width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: butt; stroke-linejoin: miter; }
header {
  display: flex; align-items: center; gap: 8px; padding: 5px 10px; padding-top: max(5px, env(safe-area-inset-top));
  background: var(--flaeche); color: var(--tinte); flex: none; border-bottom: 1.5px solid var(--linie);
}
header .titel { flex: 1; min-width: 0; line-height: 1.1; }
header .titel b { display: block; font-size: 19px; letter-spacing: -.005em; white-space: nowrap; }
header .titel span { font-size: 12.5px; line-height: 1.2; color: var(--leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.foehn {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-height: 40px; min-width: 40px; flex: none;
  border: 1px solid var(--linie); border-radius: 0; padding: 0 9px; font-weight: 500; font-size: 14px; line-height: 1.1; cursor: pointer;
  background: none; color: var(--tinte); white-space: nowrap; text-decoration: none;
}
.foehn .ico { width: 18px; height: 18px; margin-left: -3px; }
.foehn.f1 { background: var(--orange); color: var(--tinte); }
.foehn.f2 { background: var(--rot); color: #fff; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 40px; min-width: 40px;
  border: 1px solid var(--linie); background: none; border-radius: 0; padding: 0 11px;
  font-size: 14px; line-height: 1.1; cursor: pointer; white-space: nowrap; flex: none;
}
.chip .ico { width: 18px; height: 18px; margin-left: -3px; }
.chip.an { background: var(--tinte); color: var(--flaeche); }
.chip.an + .chip.an { border-left-color: var(--flaeche); }
.rose { display: block; flex: none; }
.rose .rb { font-size: 11px; font-weight: 600; fill: var(--tinte); paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.q { font-size: 12.5px; line-height: 1.32; color: var(--leise); }
.windtab { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.windtab td { padding: 5px 4px; border-top: 1px solid var(--haar); vertical-align: middle; }
.windtab tr:first-child td { border-top: 0; border-bottom: 1px solid var(--linie); }
.windtab .pf { width: 20px; }
.windtab .pf svg { display: block; }
.windtab .r { text-align: right; white-space: nowrap; font-family: var(--wert); font-size: 13px; letter-spacing: -.02em; word-spacing: -.3em; }
.windtab .r.q { font: 400 12px/1.2 var(--text); letter-spacing: 0; }
.windtab small { color: var(--leise); font-size: 12px; }
/* Regler: feine Bahn, rechteckiger Griff wie am Instrument */
input[type="range"] { -webkit-appearance: none; appearance: none; background: none; height: 40px; margin: 0; cursor: pointer; color: var(--tinte); }
input[type="range"]::-webkit-slider-runnable-track { height: 40px; background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat; }
input[type="range"]::-moz-range-track { height: 40px; background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 28px; margin-top: 6px; background: currentColor; border: 0; border-radius: 0; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 28px; background: currentColor; border: 0; border-radius: 0; }
dialog { border: 1.5px solid var(--linie); border-radius: 0; padding: 14px 16px; max-width: min(92vw, 460px); background: var(--flaeche); color: var(--tinte); }
dialog::backdrop { background: #15191c8c; }
.dlg-zu {
  position: sticky; top: 0; float: right; display: grid; place-items: center; width: 40px; height: 40px; margin: -8px -10px 0 4px; padding: 0; border: 0; border-radius: 0;
  background: var(--flaeche); color: var(--tinte); cursor: pointer;
}
dialog h3 { margin: 12px 0 6px; font-size: 21px; line-height: 1.15; }
dialog h3:first-child, dialog .dlg-zu + div h3:first-child { margin-top: 0; }
dialog h3 + h3 { margin-top: 0; font-size: 17px; }
#prognose-inhalt:not(:empty) + #foehn-inhalt { margin-top: 12px; padding-top: 10px; border-top: 1.5px solid var(--linie); }
dialog p { margin: 6px 0; font-size: 15px; }
dialog .q { font-size: 12.5px; }
dialog .zitat { border-left: 2px solid var(--linie); padding-left: 10px; color: var(--leise); }
/* Platzdetails: 2D-Karte und langer Druck in der 3D-Karte */
.marken { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 10px; }
.marke { font-size: 12.5px; padding: 1px 6px; border: 1px solid var(--linie); color: var(--tinte); }
.marke.off { background: var(--tinte); color: var(--flaeche); }
.marke.weit { border-style: dashed; color: #7a4a00; border-color: #7a4a00; }
.kopfteil { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.kopfteil .fakten { flex: 1; }
.fakten { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 15px; margin: 0; }
.fakten dt { color: var(--leise); }
.fakten dd { margin: 0; }
.box { border-top: 1px solid var(--linie); padding: 7px 0 2px; margin: 12px 0; }
.box h4 { margin: 0 0 5px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.box h4 .q { font-weight: 400; letter-spacing: 0; text-transform: none; }
.box ul { margin: 0; padding-left: 15px; font-size: 15px; }
.box li { margin: 2px 0; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 6px; }
.knoepfe a, .knoepfe button {
  display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; border: 1px solid var(--linie); background: none;
  border-radius: 0; padding: 4px 10px; font-size: 14px; line-height: 1.15; color: var(--tinte); cursor: pointer;
}
details summary { display: flex; align-items: center; gap: 7px; min-height: 40px; cursor: pointer; font-weight: 500; font-size: 15px; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: ''; flex: none; width: 7px; height: 7px; margin-left: 1px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
details[open] summary::before { transform: translateY(-2px) rotate(45deg); }
details.box { padding-top: 0; }
details p { margin: 6px 0 0; font-size: 15px; }
.warn { background: #f4d9d2; border-top: 0; border-left: 4px solid var(--rot); padding: 8px 10px; }
.warn h4 { color: #7a1c14; }
