/* Handy nativ (seit 10.11.2026, Marco: „die restliche Seite soll sich am Handy so nativ anfühlen wie das Military radar“).
   Eine Stelle für das Verhalten auf Touch-Geräten, für alle Seiten (eingebunden in _head.html, nach den Seiten-Stilen).
   Regeln und Etappen: docs/web.md „Handy nativ“. Nur Verhalten und Rückmeldung, keine Farben (die kommen aus chrome_x.css).
   Blätter von unten (Wischen zum Schließen) sind in app.js sheetSwipe (data-sheet), hier nicht doppelt. */

/* Seitenwechsel ohne Aufblitzen: kurzes Überblenden zwischen Seiten derselben Adresse (Safari 18.2+, Chrome 126+;
   andere Browser wechseln wie bisher). Kopfleiste bleibt dabei stehen (eigener Name). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; animation-timing-function: ease-out; }
#topbar { view-transition-name: ps-topbar; }
::view-transition-group(ps-topbar) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Kein Doppeltipp-Zoom auf Bedienelementen (sonst wartet der Browser kurz, ob ein zweiter Tipp kommt) */
a, button, [role="button"], label, summary, input, select, textarea, [data-row], [data-win], .tag { touch-action: manipulation; }

@media (hover: none) and (pointer: coarse) {
  /* Bedienelemente: kein Markieren und kein Vorschau-Menü beim langen Drücken (Inhalte bleiben markierbar) */
  button, [role="button"], summary, label, .tbx, .ps-seg, .chip, .tag, .ax-seg, nav a {
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  }
  /* Rückmeldung beim Tippen wie in einer App: Knöpfe und Kacheln geben kurz nach, Zeilen werden kurz dunkler */
  :is(button, [role="button"], summary, .btn, .chip, .tbx-ib, .tbx-user, .ps-seg > *, .ax-btn, .ax-seg > *):active:not(:disabled) {
    opacity: .72; transition: opacity 0s;
  }
  :is(button, [role="button"], summary, .btn, .chip, .tbx-ib, .tbx-user, .ps-seg > *, .ax-btn, .ax-seg > *) { transition: opacity .18s ease-out; }
  [data-row]:active, a.block:active, .ax-mt tr[data-win]:active td { background-color: color-mix(in oklab, currentColor 6%, transparent); }
  /* Seite federt nicht seitlich (nur senkrecht wie gewohnt) */
  html, body { overscroll-behavior-x: none; }
}

/* Leisten mit data-autohide (native.js, Etappe 3): am Handy/Tablet beim Runterscrollen unter die Kopfzeile, beim Hochscrollen
   zurück; darunter klebende Elemente (Tagestrenner, top: var(--stick-top)) rücken mit. */
@media (max-width: 63.99rem) and (hover: none) and (pointer: coarse) {
  [data-autohide] { transition: transform .22s ease-out; }
  [data-autohide][data-hidden] { transform: translateY(calc(-1 * var(--ah-shift, 100%))); }
  /* stehender Teil ganz oben: fährt um dieselbe Strecke zurück und deckt den wegfallenden Teil ab (Hintergrund der Leiste) */
  [data-autohide] > .ah-top { position: relative; z-index: 2; background: inherit; transition: transform .22s ease-out; }
  [data-autohide][data-hidden] > .ah-top { transform: translateY(var(--ah-shift, 0px)); }
  [data-autohide][data-hidden] > :not([data-autohide-keep]) { pointer-events: none; }
  /* Tagestrenner rücken mit: top setzt native.js (stickTops) einzeln, keine Klasse an <html> (ganze Seite neu berechnet) */
  /* Tagestrenner ohne Übergang: top zu animieren hieß jedes Bild neu anordnen (Ruckler, Messung 10.11.2026) */
}
[data-autohide-mark] { height: 0; }
/* Beschriftung der stehenbleibenden Zeile (Board: „Your filters“ vor den Schildern), nur im weggeschobenen Zustand */
.ps-ah-label { display: none; flex: none; font-size: 12.5px; font-weight: 600; color: var(--ps-muted); white-space: nowrap; }
@media (max-width: 63.99rem) and (hover: none) and (pointer: coarse) { [data-autohide][data-hidden] .ps-ah-label { display: inline; } }

@media (prefers-reduced-motion: reduce) { [data-autohide], [data-autohide] > .ah-top { transition: none; } }

/* Blatt von oben (native.js data-topsheet, Etappe 3): am Handy kommt der Kasten unter der Kopfzeile herunter, Griff unten.
   Auslöser (Statuszeile) nur am Handy und Tablet mit Touch (iPad hoch und quer, Marco 21.11.2026: „sollte auch wie beim
   Handy gehen“); am PC bleibt der Kasten, wie er ist. Gleiche Bedingung in native.js (Blatt), compact.css (Board-Leiste,
   Pistenbild im Blatt) und chrome_x.css (LIVE-Knopf). */
.ps-topsheet-open { display: none; }
@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1400px) {
  .ps-topsheet-open { display: flex; }
  /* Herunterziehen holt das Blatt, nicht Safaris Neuladen (Marco 10.11.2026) */
  html.ps-topsheet-page, html.ps-topsheet-page body { overscroll-behavior-y: none; }
  /* :root davor: schlägt die Regeln des Kastens selbst (z. B. .psx .panel { overflow: hidden } in compact.css, lädt später) */
  :root [data-topsheet]:not([data-open]) { display: none; }
  :root [data-topsheet][data-open] { position: fixed; z-index: 37; left: 0; right: 0; top: var(--ps-head-h, 3.5rem); margin: 0;
    max-height: calc(100dvh - var(--ps-head-h, 3.5rem) - 56px); overflow-y: auto; overscroll-behavior: contain;
    border-radius: 0 0 18px 18px; border-top: 0; box-shadow: 0 18px 40px -20px rgb(0 0 0 / .45); }
  :root [data-topsheet][data-open]::after { content: ""; position: sticky; bottom: 0; display: block; height: 26px; margin-top: -2px;
    background: linear-gradient(var(--ps-line), var(--ps-line)) center 11px / 40px 4px no-repeat, var(--ps-card); border-radius: 0 0 18px 18px; }
}

/* Kurzer Hinweis oben (native.js data-toast): Karte unter der Kopfzeile, Text + Knopf, gleitet herein und wieder hinaus */
.ps-toast { position: fixed; z-index: 46; left: 50%; top: calc(var(--ps-head-h, 3.5rem) + 10px); display: flex; align-items: center; gap: 12px; width: max-content;
  max-width: calc(100vw - 24px); padding: 9px 10px 9px 14px; border-radius: 12px; background: var(--ps-card); color: var(--ps-fg);
  border: 1px solid var(--ps-line); box-shadow: 0 10px 28px -14px rgb(0 0 0 / .45); font-size: 14px; font-weight: 600;
  transform: translate(-50%, -12px); opacity: 0; transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .2s; pointer-events: auto; }
.ps-toast.in { transform: translate(-50%, 0); opacity: 1; }
.ps-toast a { flex: none; padding: 6px 12px; border-radius: 8px; background: var(--ps-btn); box-shadow: inset 0 0 0 1px var(--ps-btn-b); color: var(--ps-fg);
  font-weight: 600; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .ps-toast { transition: none; } }

/* Weiterziehen zum Öffnen (native.js data-pull-more) am Ende eines Blatts von oben: Eintrag mit Kreis, der sich füllt */
.ps-pullmore { display: none; }
@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1400px) {
  [data-topsheet][data-open] .ps-pullmore { display: flex; align-items: center; gap: 12px; margin: 4px 14px 6px; padding: 12px 14px; border-radius: 12px;
    background: var(--ps-soft); color: var(--ps-fg); text-decoration: none; }
}
.ps-pullmore .pm-ring { width: 34px; height: 34px; flex: none; transform: rotate(-90deg); }
.ps-pullmore .pm-ring circle { fill: none; stroke-width: 3.5; }
.ps-pullmore .pm-ring .bg { stroke: var(--ps-line); }
.ps-pullmore .pm-ring .fg { stroke: var(--ps-fg); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100); }
.ps-pullmore .tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ps-pullmore .tx b { font-size: 15px; font-weight: 600; } .ps-pullmore .tx small { font-size: 12.5px; color: var(--ps-muted); }
.ps-pullmore .tx .go { display: none; }
.ps-pullmore.ready .tx .hint { display: none; } .ps-pullmore.ready .tx .go { display: inline; color: var(--ps-fg); }
.ps-pullmore .arr { width: 18px; height: 18px; flex: none; color: var(--ps-muted); }

/* Galerie-Wechsel per Wischen (subnav_x.js .gal): waagerecht gehört dem Wischen, senkrecht scrollt der Browser (Marco 10.11.2026) */
.gal { touch-action: pan-y pinch-zoom; }

/* Zeile seitlich wischen (native.js data-swipe-row): daneben der Hinweis, was passiert; ab einem Drittel kräftiger */
[data-swipe-row].ps-swiping { position: relative; z-index: 1; overflow: visible; }
[data-swipe-row].ps-swiping::after { content: attr(data-swipe-hint); position: absolute; top: 0; bottom: 0; display: flex; align-items: center;
  padding: 0 16px; font-size: 13.5px; font-weight: 600; white-space: nowrap; background: var(--ps-soft); color: var(--ps-muted); pointer-events: none; }
[data-swipe-row][data-swipe-dir="l"].ps-swiping::after { left: 100%; }
[data-swipe-row][data-swipe-dir="r"].ps-swiping::after { right: 100%; }
[data-swipe-row].ps-swipe-go::after { background: var(--ps-fg); color: var(--ps-card); }

/* Eingaben am Handy mindestens 16 px: kleiner zoomt das iPhone beim Antippen ins Feld (Regel 9 „Handy nativ“, Durchgang 10.11.2026:
   Logbuch › Spots, Photos › Prüfen) */
@media (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"], [type="radio"], [type="range"], [type="button"], [type="submit"], [type="hidden"]), select, textarea { font-size: max(16px, 1em) !important; }
}

/* Tippflächen am Handy (Etappe 4: Flughafen, Maschine, Airline; Regel 2 „≥ 44 px“, Durchgang 10.11.2026):
   Knöpfe im Seitenkopf 44 px hoch, Umschalter (Live/Forecast, Tage) 38 px; Textlinks in dichten Listen (Kennzeichen der
   Airline-Flotte, Maschinen-Links) bekommen unsichtbar mehr Höhe (Innenabstand, Außenabstand gleicht aus – Zeilen bleiben gleich) */
@media (max-width: 760px) and (hover: none) and (pointer: coarse) {
  :root .psx .btn-x, :root .acpage .btn-x { height: 44px; }
  :root .psx .aphead .actions .btn-x { min-height: 44px; }   /* Kopf mit umbrechenden Knöpfen (compact.css height: auto) */
  :root .psx .seg > :is(button, a) { min-height: 38px; }
  /* nur reine Textlinks; umrandete Kästchen (a.regc, a.reg, a.flk) nicht – die quollen auf und überlappten (Marco 10.11.2026) */
  .psx :is(a.ulink, a.ulink-q) { padding-block: 11px; margin-block: -11px; }
}

/* Planescope als App installieren (static/install.js, Marco 10.11.2026, Entwurf design/app-installieren/): Blatt von unten mit
   Griff (app.js sheetSwipe), Hintergrund leicht abgedunkelt (data-veil), Zeiger auf den Knopf des Browsers. */
.ps-inst { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; margin: 0 auto; max-width: 560px; background: var(--ps-card); color: var(--ps-fg);
  border: 1px solid var(--ps-line); border-bottom: 0; border-radius: 16px 16px 0 0; padding: 8px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  display: grid; gap: 14px; font: 15px/1.45 "Figtree", system-ui, -apple-system, sans-serif; transform: translateY(105%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -10px 30px -18px rgb(0 0 0 / .35); }
.ps-inst[hidden] { display: none; }
.ps-inst.in { transform: none; }
.ps-inst.ptr { padding-bottom: calc(46px + env(safe-area-inset-bottom, 0px)); }   /* Platz für den Zeiger nach unten */
.ps-inst-grip { width: 38px; height: 5px; border-radius: 3px; background: var(--ps-faint); opacity: .5; margin: 0 auto; }
.ps-inst-head { display: flex; gap: 14px; align-items: center; }
.ps-inst-head img { width: 56px; height: 56px; border-radius: 13px; flex: none; box-shadow: 0 0 0 1px var(--ps-line); }
.ps-inst-head b { font-size: 18px; display: block; font-weight: 700; } .ps-inst-head span { color: var(--ps-muted); font-size: 14px; }
.ps-inst-in { margin: 0; font-weight: 600; }
.ps-inst-why { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ps-inst-why li { font-size: 13px; font-weight: 600; background: var(--ps-soft); border-radius: 6px; padding: 4px 9px; }
.ps-inst-steps { margin: 0; padding: 0; list-style: none; background: var(--ps-bg); border: 1px solid var(--ps-line); border-radius: 12px; overflow: hidden; }
.ps-inst-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; }
.ps-inst-steps li + li { border-top: 1px solid var(--ps-line); }
.ps-inst-steps .n { width: 26px; height: 26px; border-radius: 50%; background: var(--ps-fg); color: var(--ps-card); display: grid; place-items: center; font-weight: 700; font-size: 13.5px; }
.ps-inst-steps .ic { width: 34px; height: 34px; border-radius: 8px; background: var(--ps-card); border: 1px solid var(--ps-line); display: grid; place-items: center; color: #0a84ff; }
.ps-inst-steps .ic svg { width: 20px; height: 20px; }
.ps-inst-tip { margin: -4px 0 0; font-size: 13px; color: var(--ps-muted); }
.ps-inst-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ps-inst-btn { min-height: 46px; border-radius: 10px; border: 0; font: 700 15px "Figtree", system-ui, sans-serif; cursor: pointer; background: var(--ps-soft); color: var(--ps-fg); }
.ps-inst-btn.pri { background: var(--ps-pri); color: var(--ps-on-pri); }
.ps-inst-never { justify-self: center; background: none; border: 0; color: var(--ps-muted); font: 13px "Figtree", system-ui, sans-serif; padding: 6px; cursor: pointer; }
.ps-inst-ptr { position: fixed; z-index: 71; width: 34px; height: 34px; color: #0a84ff; opacity: 0; pointer-events: none; transition: opacity .2s; }
.ps-inst-ptr.in { opacity: 1; animation: ps-inst-bob 1.2s ease-in-out infinite; }
.ps-inst-ptr svg { width: 100%; height: 100%; }
.ps-inst-ptr.bc { left: calc(50% - 17px); bottom: calc(4px + env(safe-area-inset-bottom, 0px)); }
.ps-inst-ptr.br { right: 18px; bottom: calc(4px + env(safe-area-inset-bottom, 0px)); }
@keyframes ps-inst-bob { 50% { translate: 0 6px; } }
@media (prefers-reduced-motion: reduce) { .ps-inst { transition: none; } .ps-inst-ptr.in { animation: none; } }

/* Eigenes Neuladen auf iPhone/iPad statt dem des Browsers (native.js html.ps-ptr-own), sonst liefen beide */
html.ps-ptr-own, html.ps-ptr-own body { overscroll-behavior-y: none; }
/* Herunterziehen zum Aktualisieren auf iPhone/iPad (native.js, Marco 21.11.2026): Kreis unter der Kopfzeile,
   füllt sich mit der Strecke (--p 0…1), voll = loslassen lädt neu; dreht sich während des Ladens */
.ps-ptr { position: fixed; left: 50%; z-index: 60; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ps-card); border: 1px solid var(--ps-line); color: var(--ps-muted); opacity: 0; pointer-events: none;
  transform: translateX(-50%) translateY(-24px); }
.ps-ptr svg { grid-area: 1 / 1; }
.ps-ptr svg:first-child { width: 30px; height: 30px; transform: rotate(-90deg); }
.ps-ptr circle { fill: none; stroke-width: 3; }
.ps-ptr .bg { stroke: var(--ps-line); }
.ps-ptr .fg { stroke: var(--ps-fg); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100); }
.ps-ptr .ar { width: 16px; height: 16px; transition: transform .15s; }
.ps-ptr.ready { color: var(--ps-fg); }
.ps-ptr.ready .ar { transform: rotate(180deg); }
.ps-ptr.spin svg:first-child { animation: ps-ptr-spin .8s linear infinite; }
.ps-ptr.spin .fg { stroke-dashoffset: 70; }
@keyframes ps-ptr-spin { to { transform: rotate(270deg); } }
@media (prefers-reduced-motion: reduce) { .ps-ptr.spin svg:first-child { animation: none; } }
