/* Leaflet 1.9.4 (BSD-2-Clause), nur die Regeln für Kartenflächen, Marken und Zoom: Die App zeigt keine Bedienleisten, Popups oder Tooltips */
.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-layer{position:absolute;left:0;top:0;}.leaflet-container{overflow:hidden;}.leaflet-tile,.leaflet-marker-icon{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none;}.leaflet-tile::selection{background:transparent;}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast;}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0;}.leaflet-marker-icon{display:block;}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important;}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0;}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter;}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom;}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none;}.leaflet-container{-webkit-tap-highlight-color:transparent;}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,0.4);}.leaflet-tile{filter:inherit;visibility:hidden;}.leaflet-tile-loaded{visibility:inherit;}.leaflet-overlay-pane svg{-moz-user-select:none;}.leaflet-pane{z-index:400;}.leaflet-tile-pane{z-index:200;}.leaflet-overlay-pane{z-index:400;}.leaflet-marker-pane{z-index:600;}.leaflet-map-pane canvas{z-index:100;}.leaflet-map-pane svg{z-index:200;}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;}svg.leaflet-zoom-animated{will-change:transform;}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1);}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none;}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden;}.leaflet-interactive{cursor:pointer;}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab;}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing;}.leaflet-marker-icon,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none;}.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive{pointer-events:visiblePainted;pointer-events:auto;}.leaflet-container{background:#ddd;outline-offset:1px;}.leaflet-container a{color:#0078A8;}.leaflet-container{font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5;}
/* Zeitregler: Die Tour gleitet einmal über das letzte Bild, ohne dass die Seite doppelt erscheint */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: none; }
  ::view-transition-new(root) { animation: tourHerein .6s cubic-bezier(.22,.8,.3,1); }
  @keyframes tourHerein { from { transform: translateX(-100%); } }
  @media (prefers-reduced-motion: reduce) { ::view-transition-new(root) { animation: none; } }
  /* Layout: eine helle App, ein Bildschirm nach dem anderen (Start mit Alter → Geschichte → Aufbruch → Karte → Rätsel → Pokal → Ziel).
     Design 2026 (Explore Thalwil neu): Inter für Text, Inter Tight für Titel, Kontur-Knöpfe, Elfenbein mit feinem Papierkorn.
     Seit dem Durchgang vom 8.11.2026 stehen die Regeln des Designs 2026 direkt hier, ohne Schicht über dem alten Design. */
  :root {
    --ivory: #f7f4ee;     /* Grund */
    --ivory-2: #efe9de;   /* Flächen */
    --paper: #ffffff;
    --ink: #16161a;       /* Schrift und Konturen */
    --muted: #6f6b64;
    --line: #e5dfd3;
    --grau-kontur: #b9b2a5;   /* falsche Antwort: ruhiges Grau statt Rot (Nutzer 8.11.2026) */
    --gold: #f2b632;
    --danger: #b8392a;    /* nur noch für «GPS ungenau» */
    --display: "Inter Tight", system-ui, sans-serif;
    --ui: "Inter", system-ui, -apple-system, sans-serif;
    --brief: "Instrument Serif", Georgia, serif;
    --stimme: "Newsreader", Georgia, serif;   /* nur der Gruss unter dem Brief: Ausnahme, sonst seit 8.11. kein Newsreader mehr (Nutzer) */
    --aus: cubic-bezier(.23,1,.32,1);         /* ruhiges Auslaufen für Rückmeldungen */
    --blatt: cubic-bezier(.32,.72,0,1);       /* Blätter von unten */
    /* Papierkorn (D16, Nutzer 8.11.2026 «mit Korn»): SVG-Rauschen, rund 3,5 %, in festen Farben */
    --korn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 -1.4 1.05'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23k)' opacity='.08'/%3E%3C/svg%3E");
    color-scheme: light;
  }
  * { box-sizing: border-box; }
  /* Handy-Technik: Schrift wächst nicht beim Drehen, kein Gummiband-Ziehen an der ganzen Seite */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior: none; }
  html, body { height: 100%; margin: 0; }
  body {
    background: var(--korn) var(--ivory); color: var(--ink); font-family: var(--ui); font-size: 16px; overscroll-behavior: none;
    padding: env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(20px, env(safe-area-inset-left, 0px));
  }
  [hidden] { display: none !important; }
  .app { max-width: 460px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; padding-block: 26px 22px; }
  .app > section:not([hidden]) { flex: 1; display: flex; flex-direction: column; gap: 18px; }
  /* Ansichtswechsel weich (A4): kurz einblenden; die Karte springt nicht, das Rätsel hat seine eigene Ankunft */
  .app > section:not([hidden]):not(.nav):not(#view-riddle) { animation: ansicht .18s var(--aus) backwards; }
  @keyframes ansicht { from { opacity: 0; transform: translateY(6px); } }
  #view-riddle:not([hidden]) { animation: ankunft .22s var(--aus) backwards; }
  @keyframes ankunft { from { opacity: 0; transform: translateY(8px); } }

  /* Titel: Inter Tight 700, 40 px, normale Schreibung; nur das letzte Wort in der Tourfarbe (span.farbwort, gesetzt von titel()) */
  h1, h2 { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1.02; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
  h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.015em; }
  /* «leicht» für Willkommen, Start, Unterwegs und Rätsel: 600, 34 px */
  :is(#view-onboard, #view-start, #view-nav, #view-riddle) :is(h1, h2) { font-weight: 600; font-size: 34px; line-height: 1.05; }
  em, i { font-style: italic; color: var(--accent); }
  :is(h1, h2, h3) em { font-style: normal; font-size: 1em; }
  :is(h1, h2) em { color: inherit; }
  .farbwort { color: var(--accent); }
  :is(#view-story .bildtitel, #view-intro) .farbwort { color: inherit; }
  /* Fliesstext überall 16 px mit Zeilenabstand 1,3 in Tinte (Nutzer 6.11.2026: «Alles in 16 / 1.3 bitte») */
  p { font-size: 16px; line-height: 1.3; margin: 0; }
  .muted { color: var(--ink); }
  /* Kleine Marken («Checkpoint 1 von 8», «Ganz nah · Bahnhof», Fundstück) grau in normaler Schreibung, auf Fotos weiss */
  .caps { font-size: 14px; font-weight: 500; color: var(--muted); }

  button { font: inherit; cursor: pointer; border: 0; color: inherit; }
  /* Knöpfe: keine Textauswahl und kein Kontextmenü beim langen Drücken */
  button, .btn, .fab { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  button:disabled { cursor: default; }
  /* Knöpfe «Kontur» (Nutzer 7.11.2026, Variante A): durchsichtig mit feinem schwarzem Rand und schwarzer Schrift */
  .btn { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 600; font-size: 1rem; padding: 16px 20px; border-radius: 999px; width: 100%; }
  .btn.ghost { background: var(--paper); box-shadow: none; border: 1px solid var(--line); }
  /* Tippflächen mindestens 44 px (D9) */
  .btn.small { width: auto; font-size: .88rem; padding: 10px 16px; min-height: 44px; }
  .btn.link { background: none; box-shadow: none; color: var(--muted); padding: 8px; font-weight: 500; min-height: 44px; }
  a.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
  /* Knöpfe zeigen beim Antippen sofort, dass sie getroffen sind, nicht erst beim Loslassen */
  button, a.btn { -webkit-tap-highlight-color: transparent; transition: transform .2s ease-out, filter .2s ease-out, opacity .2s ease-out; }
  button:not(:disabled):active, a.btn:active { transform: scale(.97); filter: brightness(.9); transition-duration: .1s; }
  .btn.link:not(:disabled):active, .fb-sterne button:active { transform: none; filter: none; opacity: .55; }
  .near-compass:not(:disabled):active { transform: translate(-50%, -50%) scale(.97); }
  .glass { background: rgba(255,255,255,.66); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 22px; }

  /* Start: editoriale Topokarte */
  .topo-card { position: relative; background: var(--ivory-2); border-radius: 30px; overflow: hidden; aspect-ratio: 4 / 4.6; margin-block: 4px; }
  .topo-card svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .topo-card svg text { font-family: var(--ui); font-style: normal; font-weight: 600; }
  .topo-card .legend { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 12px 16px; display: flex; justify-content: space-between; gap: 10px; }
  .topo-card .legend b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1; letter-spacing: -.035em; }
  .topo-card .legend span { font-size: .72rem; color: var(--muted); }
  /* Schmale Handys (unter 370 px, 17.11.2026): Die drei Zahlen bleiben einzeilig. Umgebrochen («4,0» über «km») wurde die Leiste doppelt so
     hoch und deckte unten in der Karte Namen und Punkte zu; die Karte ist für eine Leiste von höchstens 72 px gelegt (tourkarte_legen.js) */
  @media (max-width: 369px) { .topo-card .legend { padding: 10px 12px; gap: 6px; } .topo-card .legend b { font-size: 1.3rem; white-space: nowrap; } }
  .draw { animation: draw 2.6s cubic-bezier(.65,0,.35,1) both .3s; }
  @keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
  .stops { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
  .stops li { display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 1.3; }
  .stops .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--ivory); font-weight: 600; font-size: .8rem; flex: none; }
  .stops li.done .dot { background: var(--accent); }
  /* Offline-Schild oben rechts: die App speichert Karte und Wege von selbst, antippen erklärt es */
  .start-kopf { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 30px; margin-block: -7px; }
  .offline-chip { position: relative; display: flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line);
                  font-size: .76rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .offline-chip::after { content: ""; position: absolute; inset: -8px -4px; }   /* Tippfläche 44 px hoch */
  .offline-chip .ring { width: 18px; height: 18px; flex: none; transform: rotate(-90deg); }
  .offline-chip .ring circle { fill: none; stroke-width: 3; }
  .offline-chip .spur { stroke: var(--accent-soft); }
  .offline-chip .fort { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 0 50.27; transition: stroke-dasharray .3s; }
  .offline-chip .haken { display: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); place-items: center; flex: none; }
  .offline-chip .haken svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
  .offline-chip[data-stand="bereit"] .ring, .offline-chip:not([data-stand="laedt"]) .fort { display: none; }
  .offline-chip[data-stand="bereit"] .haken { display: grid; }
  .offline-chip[data-stand="wartet"], .offline-chip[data-stand="fehler"] { color: var(--muted); }
  .offline-chip[data-stand="wartet"] .spur, .offline-chip[data-stand="fehler"] .spur { stroke: var(--line); }
  .offline-info { position: absolute; top: calc(100% + 8px); right: 0; z-index: 5; width: min(250px, calc(100% - 24px)); background: var(--paper); border-radius: 16px;
                  padding: 12px 14px; font-size: .84rem; line-height: 1.4; color: var(--muted); box-shadow: 0 8px 24px rgba(22,22,26,.16); }
  .offline-info b { display: block; color: var(--ink); font-size: .88rem; margin-bottom: 2px; }

  /* Alter direkt auf der Startseite (P2, Nutzer 8.11.2026): das Alter als grosse Zahl, ohne Stufennamen; die Stufe setzt die App selbst */
  .alter { display: grid; gap: 4px; }
  .alter-kopf { font: 700 19px/1.2 var(--display); letter-spacing: -.01em; color: var(--ink); }
  /* Zeile unter dem Regler sagt, wie die Rätsel werden (Nutzer 11.11.2026, Variante B, alle Touren) */
  .alter-stufe { display: flex; gap: 10px; align-items: center; background: var(--accent-soft); border-radius: 14px; padding: 10px 12px; font-size: 14px; line-height: 1.35; margin: 0; }
  .alter-stufe::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  .alter output { font: 800 3.2rem/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
  .alter output small { font: 500 14px/1 var(--ui); color: var(--muted); letter-spacing: 0; margin-left: 6px; }
  .alter input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
  .alter input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--ink) 0 var(--wert, 0%), var(--line) var(--wert, 0%)); }
  .alter input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
  .alter input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--ink); }
  .alter input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -14px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink), 0 2px 6px rgba(22,22,26,.15); }
  .alter input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
  .alter input[type=range]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }

  /* Aufbruch: Fotokarte mit Pfeilband */
  .photo { position: relative; flex: 1; min-height: 340px; border-radius: 30px; overflow: hidden; background: var(--ivory-2); }
  /* Das Foto zeigt nur den unteren, wichtigen Teil: den Weg bis zum Fluchtpunkt, nicht den Himmel */
  .photo img { position: absolute; left: 50%; bottom: 0; height: 143%; width: auto; min-width: 100%; max-width: none; transform: translateX(-50%); object-fit: cover; }
  .photo svg.band { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
  .photo .flagpin { position: absolute; width: 40px; height: 52px; margin: -50px 0 0 -20px; animation: bob 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
  /* Der Pin hüpft nur noch 3 px (A17) */
  @keyframes bob { 50% { transform: translateY(-3px); } }
  .intro-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-inline: 4px; }
  .intro-foot small { display: block; font-size: .75rem; color: var(--muted); }
  .intro-foot b { display: block; font-family: var(--display); font-weight: 800; font-size: 3.2rem; line-height: .9; letter-spacing: -.035em; }
  .intro-foot span { font-size: .8rem; color: var(--muted); }
  .photo .intro-timer { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: rgba(255,255,255,.85); }
  .photo-credit { color: var(--muted); text-align: right; }
  .photo-credit a { color: inherit; }

  /* Karte unterwegs: hell */
  .nav { position: fixed; inset: 0; z-index: 1; overflow: hidden; }
  /* Die Karte ist so gross wie die Bildschirm-Diagonale, damit beim Drehen keine leeren Ecken entstehen (Grösse per JavaScript).
     Gedreht wird die ganze Karte; die Marker drehen sich um ihren Ankerpunkt zurück und bleiben aufrecht (--gegen) */
  #map { position: absolute; inset: 0; isolation: isolate; background: #ecebe6;   /* eigene Ebene: Kartenzeichen liegen nie über Brief-Kärtchen und Blatt (9.11.) */ --gegen: 0deg; touch-action: none; }
  #map .leaflet-marker-icon > * { rotate: var(--gegen); }
  #map .goal-icon { transform-origin: 50% 98%; }
  .overlay { position: absolute; left: 0; right: 0; z-index: 500; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); pointer-events: none; }
  .overlay > * { pointer-events: auto; max-width: 460px; margin-inline: auto; }
  .overlay.top { top: 0; padding-top: calc(env(safe-area-inset-top, 0px) + 16px); padding-bottom: 40px; background: linear-gradient(var(--ivory) 55%, rgba(247,244,238,0)); display: grid; gap: 8px; }
  .overlay.top > * { width: 100%; }
  .overlay.bottom { bottom: 0; display: grid; gap: 10px; padding-left: 0; padding-right: 0; }
  .overlay.bottom .sheet { max-width: 520px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  /* «Checkpoint 1 von 8» als ruhige Kopfzeile oben rechts statt Stempel (Nutzer 8.11.2026): gleich wie «Checkpoint 4 · Tödistrasse»
     über der Rätselfrage (.caps: gleiche Schrift, 14 px, 500, grau), ohne Rahmen; beim Wechsel blendet sie kurz ein */
  .topbar { display: flex; justify-content: flex-end; margin: -2px 0 -6px; }
  .kopfzeile { font-size: 14px; font-weight: 500; line-height: 1.2; color: var(--muted); white-space: nowrap; }
  .kopfzeile.neu { animation: kopfEin .3s ease-out; }
  @keyframes kopfEin { from { opacity: 0; } to { opacity: 1; } }
  .sheet { width: 100%; background: var(--korn) var(--ivory); border-radius: 28px 28px 0 0; padding: 12px 18px calc(env(safe-area-inset-bottom, 0px) + 16px); display: grid; gap: 8px; box-shadow: 0 -8px 30px rgba(22,22,26,.08); }
  .sheet .grab { justify-self: center; width: 36px; height: 4px; border-radius: 2px; background: var(--line); }
  .sheet .name { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1; letter-spacing: -.015em; }
  .fabrow { width: 100%; display: flex; justify-content: flex-end; gap: 10px; padding-inline: 16px; }
  .fab { min-width: 46px; height: 46px; padding: 0 14px; border-radius: 999px; background: var(--paper); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 500; font-size: .88rem; box-shadow: 0 4px 16px rgba(22,22,26,.12); }
  .dist { display: flex; align-items: baseline; gap: 8px; }
  .dist b { font-weight: 600; font-variant-numeric: tabular-nums; }
  /* Akku sparen (Nutzer 12.11.2026): dunkler Knopf mit Mond links in der Knopfreihe; eingeschaltet bleibt der kleine helle Mond-Knopf.
     .nav.spar: nur der Kartengrund wird 85 % dunkel, Weg, Pin und Standort bleiben hell; Titel und Blatt dunkel mit heller Schrift */
  .fab.akku { margin-right: auto; background: var(--ink); color: var(--ivory); font-weight: 600; padding: 0 16px 0 13px; }
  .fab.akku[aria-pressed="true"] { background: var(--paper); color: var(--ink); padding: 0; width: 46px; }
  .fab.akku[aria-pressed="true"] span { display: none; }
  .nav.spar #map { background: #232322; }
  .nav.spar #map .leaflet-tile-pane { filter: brightness(.15); }
  .nav.spar #map .leaflet-overlay-pane path { stroke: #f7f4ee; }
  .nav.spar .overlay.top { background: linear-gradient(#131315 55%, rgba(19,19,21,0)); }
  .nav.spar .overlay.top h2, .nav.spar .kopfzeile { color: #f7f4ee; }
  /* Nur das Farbwort hell färben: Die übrigen Wörter des Namens bleiben weiss wie «Auf zur» (Handytest 13.11.2026: «Kirche» war hellgrün, «Enge» dunkelgrün auf Dunkel) */
  .nav.spar .overlay.top h2 .farbwort { color: var(--accent-hell); }
  .nav.spar .sheet { background: #1b1b1e; color: #f7f4ee; box-shadow: none; }
  .nav.spar .sheet .muted, .nav.spar .sheet .status, .nav.spar .sheet .start-hint, .nav.spar .sheet .credit, .nav.spar .sheet .credit a { color: rgba(247,244,238,.72); }
  .nav.spar .sheet .status.warn { color: #ffb4a8; }
  .nav.spar .sheet .btn { color: #f7f4ee; box-shadow: inset 0 0 0 1.5px rgba(247,244,238,.7); }
  /* Knöpfe mit hellem Grund («Kompass einschalten», Testmodus) hatten sonst helle Schrift auf Weiss (Handytest 13.11.2026) */
  .nav.spar .sheet .btn.ghost { background: transparent; border-color: transparent; }
  .nav.spar .sheet .btn.link { box-shadow: none; color: rgba(247,244,238,.72); }
  .nav.spar .sheet .grab { background: rgba(247,244,238,.3); }
  .nav.spar .fab:not(.akku) { background: #2a2a2e; color: #f7f4ee; box-shadow: none; }
  .status, .start-hint { color: var(--muted); }
  .start-hint { margin: -4px 0 0; }
  .status:empty { display: none; }
  .status.warn { color: var(--danger); }
  .testbox { border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
  .testbox > span { font-size: .8rem; }
  /* Kartenquelle kurz (D8): «Karte: OpenStreetMap · Quellen», alle Nachweise auf der Seite Quellen */
  .credit { font-size: 12px; line-height: 1.3; color: var(--muted); }
  .credit a, .rechtliches a { color: inherit; text-underline-offset: 3px; display: inline-block; padding-block: 12px; margin-block: -12px; }

  /* Kartenmarker */
  .me-icon svg { overflow: visible; }
  /* Kompass auf dem kurzen Weg und geglättet (A5): der Winkel wird in JavaScript entfaltet, hier nur ein kurzer Übergang */
  .me-icon .cone { transition: transform .12s linear; transform-origin: 40px 40px; }
  .pin { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 10px rgba(var(--accent-rgb),.3)); }
  .goal-icon { position: relative; width: 40px; height: 52px; }
  .goal-icon .ring { position: absolute; left: 50%; bottom: -6px; width: 24px; height: 12px; margin-left: -12px; border-radius: 50%; background: var(--accent); opacity: .3; }
  .goal-icon.is-near .ring { animation: pulse 1.8s ease-out infinite; }
  @keyframes pulse { from { transform: scale(1); opacity: .4; } to { transform: scale(2.6); opacity: 0; } }
  /* Gelöste Checkpoints: das gestickte Abzeichen ihres Pokals, leicht schräg wie aufgenäht. Es sitzt oben rechts neben
     dem Checkpoint, damit der Standortpunkt es nicht verdeckt; gedreht wird es um den Checkpoint (Ankerpunkt -5 39) */
  .done-patch { width: 34px; height: 34px; transform-origin: -5px 39px; filter: drop-shadow(0 3px 4px rgba(22,22,26,.3)); }
  .done-patch > div, .done-patch .patch { width: 100%; height: 100%; }
  /* Nadel im Knopf «Norden oben»: zeigt, wo auf der gedrehten Karte Norden liegt */
  #norden-nadel { transform-origin: 12px 12px; }

  /* «Ganz nah»: Blatt über der unteren Hälfte, oben bleibt die Karte sichtbar. Es fährt von unten ein (A1, Schublade 320 ms) und hebt sich
     bei der Ankunft kurz und blendet aus. --kartenrand: so viel Platz braucht oben der Titel plus ein Streifen Karte (wird beim Öffnen gesetzt) */
  .near { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500; height: clamp(240px, min(56vh, calc(100vh - var(--kartenrand, 0px))), 450px); background: var(--korn) var(--ivory);
    border-radius: 28px 28px 0 0; box-shadow: 0 -10px 30px rgba(22, 22, 26, .08); overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
    padding: 12px max(24px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 24px) max(24px, env(safe-area-inset-left, 0px));
    transform: translateY(100%); transition: transform .32s var(--blatt), opacity .18s ease-out; }
  @supports (height: 100dvh) { .near { height: clamp(240px, min(56dvh, calc(100dvh - var(--kartenrand, 0px))), 450px); } }
  .near.auf { transform: none; }
  .near.weg { transform: translateY(-12px); opacity: 0; }
  .near .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); flex: none; }
  .near-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  /* Bei wenig Höhe wird der Kreis kleiner, damit «Ich bin da» ganz sichtbar bleibt */
  .near .stage { position: relative; width: auto; height: auto; flex: 0 1 min(200px, 24vh); min-height: 72px; aspect-ratio: 1; }
  #near-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
  .near .disc { position: absolute; inset: 32%; border-radius: 50%; background: var(--paper); box-shadow: 0 6px 18px rgba(22, 22, 26, .10); }
  .near .arrow { position: absolute; inset: 38%; width: 24%; height: 24%; fill: var(--accent); stroke: var(--paper); stroke-width: 3; stroke-linejoin: round; transition: transform .12s linear; }
  .near-compass { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; }
  .near-text { max-width: 32ch; }
  .near #btn-here { margin-top: auto; }
  /* «Ich bin da» immer ganz sichtbar (Nutzer 15.11.2026, Livetest Thalwil: halb unter der Home-Leiste): Ist der Inhalt höher als das Blatt,
     lässt sich das Blatt scrollen, und der Knopf klebt unten über dem Rand, mit Papiergrund und weichem Übergang wie die Hauptknöpfe */
  .near { overflow-y: auto; overscroll-behavior: contain; }
  /* Wird es eng (nearEinpassen in hunt.js): Zuerst wird das Kompassfeld kleiner (nie grösser als bisher), dann verschwindet der Kompass,
     dann wird das Blatt höher (bis unter den Titel), erst danach scrollt es. Text und «Ich bin da» haben Vorrang (Nutzer 15.11.2026:
     «Sonst könnte man … auch den Kompass ausblenden, er ist ja nur ein Gimmick») */
  .near .stage { flex: none; height: var(--kompass, min(200px, 24vh)); width: auto; min-height: 0; overflow: hidden; }   /* die Zeichenfläche darf das Blatt nicht höher machen */
  .near.ohne-kompass .stage { display: none; }
  /* Ohne Kompass schrumpft das Blatt auf seinen Inhalt: «Ich bin da» steht direkt unter dem Text, keine leere Fläche (Hauptsitzung 15.11.2026) */
  .near.ohne-kompass { height: auto; }
  .near.ohne-kompass #btn-here { margin-top: 6px; }
  .near.wachsen { height: auto; max-height: calc(100vh - var(--kartenrand, 0px) + 170px); }
  @supports (height: 100dvh) { .near.wachsen { max-height: calc(100dvh - var(--kartenrand, 0px) + 170px); } }
  .near > *:not(.stage) { flex-shrink: 0; }
  .near #btn-here { position: sticky; bottom: 0; z-index: 2; background: var(--ivory); box-shadow: inset 0 0 0 1.5px var(--ink), 0 -8px 8px -4px var(--ivory); }
  /* Der Streifen unter dem Knopf (Rand des Blatts über der Home-Leiste) deckt weggerollten Text ab */
  .near #btn-here::after { content: ""; position: absolute; left: -26px; right: -26px; top: 100%; height: calc(env(safe-area-inset-bottom, 0px) + 26px); background: var(--korn) var(--ivory); pointer-events: none; }
  /* Innenhof-Hilfe als kurzer Link unter dem Satz (P9); Tippen klappt den Satz auf und zeigt «Ich bin da» */
  .near-hof { font-size: .88rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; background: none; padding: 4px 8px; }
  .near-hof-text { max-width: 32ch; font-size: .92rem; }
  /* Schluss (Nutzer 8.11.2026): ohne weisse Karte direkt auf dem Papier, eine kurze Liste mit feiner Linie dazwischen,
     kleine graue Marke («Zurück zum Bahnhof», «Pause gleich hier», «Nächstes Mal») über dem Satz */
  .schluss { width: 100%; max-width: 460px; display: grid; text-align: left; margin-bottom: 10px; }
  .schluss p { margin: 0; padding: 11px 0; display: grid; gap: 2px; font-size: .95rem; line-height: 1.4; }
  .schluss p + p { border-top: 1px solid var(--line); }
  .schluss .marke { font-size: 14px; font-weight: 500; color: var(--muted); }
  /* Postkarten am Ziel (Nutzer 12.11.2026 «Klein»): zwei Karten ganz, die dritte schaut hervor; die Reihe läuft bis an den rechten Rand */
  .postkarten { width: 100%; max-width: 460px; display: grid; gap: 12px; text-align: left; margin: 6px 0 14px; }
  .postkarten h3 { font-size: 28px; line-height: 1.05; letter-spacing: -.02em; margin: 8px 0 0; }
  .postkarten h3 em { font-style: normal; color: var(--accent); }
  .pk-reihe { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin-right: calc(-1 * max(20px, env(safe-area-inset-right, 0px))); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .pk-reihe::-webkit-scrollbar { display: none; }
  .pk { flex: 0 0 38%; display: grid; gap: 4px; align-content: start; color: var(--ink); text-decoration: none; scroll-snap-align: start; -webkit-tap-highlight-color: transparent; }
  .pk .foto { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--accent-soft); }
  .pk .foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .pk .foto .weit { position: absolute; left: 8px; top: 8px; background: rgba(255,255,255,.88); border-radius: 999px; padding: 4px 9px; font: 600 12.5px var(--ui); color: var(--ink); }
  .pk .ort { font: 500 14px var(--ui); color: var(--muted); margin-top: 6px; }
  .pk .titel { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.12; letter-spacing: -.015em; }
  .pk .wer { font-size: 14px; color: var(--muted); }
  .pk:focus-visible .foto { outline: 3px solid var(--accent); outline-offset: 2px; }
  /* Letzte Karte «Alle Orte»: gleiche Form, in der hellen Tourfarbe, Schrift unten links */
  .pk-alle .foto { display: grid; align-content: end; gap: 2px; padding: 12px; background: var(--accent-soft); color: var(--accent-deep); box-sizing: border-box; }
  .pk-alle .gross { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.05; letter-spacing: -.02em; }
  .pk-alle .zahl { font-size: 13px; }
  /* Solange «Ganz nah» offen ist, braucht es das normale Kartenblatt nicht (quer würde es oben hervorschauen) */
  .nav.nah .overlay.bottom { visibility: hidden; }

  /* Briefe unterwegs: gefunden über dem Kartenblatt, geöffnet als Blatt mit Umschlag */
  .brief-marker { width: 30px; height: 23px; animation: bob 2.6s ease-in-out infinite; }
  .brief-marker svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 3px 5px rgba(22,22,26,.25)); }
  .fund-marker { width: 26px; height: 26px; filter: drop-shadow(0 2px 3px rgba(22,22,26,.3)); }
  .fund-marker svg { display: block; width: 100%; height: 100%; }
  /* Das gerade geöffnete Fundstück setzt sich auf die Karte (A3) */
  .fund-marker.neu svg { animation: fundRein .3s var(--aus) backwards; }
  @keyframes fundRein { from { transform: scale(.7); opacity: 0; } }
  .brief-chip { width: calc(100% - 32px); display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center; text-align: left; background: var(--paper); border-radius: 22px; padding: 12px 16px 12px 12px; box-shadow: 0 10px 28px rgba(22,22,26,.16); }
  /* Gefunden (A3): kommt in 260 ms von unten, das Siegel wackelt gleich einmal */
  .brief-chip:not([hidden]) { animation: chipRein .26s var(--aus) backwards; }
  @keyframes chipRein { from { opacity: 0; transform: translateY(16px); } }
  .brief-chip svg { width: 58px; height: 44px; overflow: visible; filter: drop-shadow(0 4px 6px rgba(22,22,26,.12)); }
  .brief-chip b { display: block; font-weight: 600; }
  .brief-chip small { display: block; color: var(--accent); font-size: .85rem; margin-top: 2px; }
  /* Der gefundene Brief wackelt einmal sofort und danach alle paar Sekunden kurz, bis man ihn öffnet */
  .wackelt { transform-origin: 50% 85%; animation: wackelnEinmal .6s ease-in-out .26s, wackeln 3s ease-in-out 3s infinite; }
  @keyframes wackeln { 0%, 70%, 100% { transform: rotate(0) translateY(0); } 75% { transform: rotate(-8deg) translateY(-3px); } 81% { transform: rotate(7deg) translateY(-3px); } 87% { transform: rotate(-4deg) translateY(0); } 93% { transform: rotate(2deg); } }
  @keyframes wackelnEinmal { 0%, 100% { transform: none; } 20% { transform: rotate(-8deg) translateY(-3px); } 40% { transform: rotate(7deg) translateY(-3px); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(2deg); } }
  .brief-blatt { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1600; background: var(--korn) var(--ivory); border-radius: 28px 28px 0 0; box-shadow: 0 -10px 30px rgba(22,22,26,.1); display: grid; gap: 10px; justify-items: center;
    padding: 12px max(20px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 16px) max(20px, env(safe-area-inset-left, 0px)); transform: translateY(105%); transition: transform .45s cubic-bezier(.3,1.1,.4,1); }
  /* Langer Brief auf kleinem Handy: das Blatt endet oben am Bildschirm und lässt sich scrollen (Nutzer 8.11.2026) */
  .brief-blatt { max-height: 100vh; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
  .brief-blatt.offen { transform: none; }
  .brief-blatt .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
  .brief-blatt > .caps { justify-self: stretch; max-width: 460px; width: 100%; margin-inline: auto; }
  .brief-blatt .knoepfe { width: 100%; max-width: 460px; display: grid; }
  /* Umschlag 280 × 300, auf kleinen Bildschirmen per JavaScript verkleinert */
  .umschlag-rahmen { position: relative; width: 280px; height: 300px; }
  .umschlag { position: absolute; left: 0; top: 0; width: 280px; height: 300px; transform-origin: 0 0; }
  .umschlag > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .umschlag .vorne { pointer-events: none; filter: drop-shadow(0 12px 18px rgba(22,22,26,.12)); }
  .umschlag .bogen { position: absolute; left: 22px; top: 6px; width: 236px; height: 226px; padding: 16px 18px; background: #fffdf8; border: 1px solid #d9d1c2; border-radius: 5px; box-shadow: 0 12px 26px -16px rgba(22,22,26,.35);
    transform: translateY(80px); transition: transform .55s cubic-bezier(.3,1.25,.5,1) .3s; }
  .brief-blatt.offen .umschlag .bogen { transform: none; }
  /* Briefbogen: Instrument Serif kursiv wie bisher (Nutzer: «bisherige Schrift, nicht Newsreader»), sonst passen lange Briefe nicht in den Umschlag */
  /* Schwärzer (Nutzer 14.11.2026, Livetest: «in der Sonne nur schwer lesen»): reines Schwarz, und weil Instrument Serif nur einen dünnen
     Schnitt hat, eine feine Kontur in derselben Farbe. Sie macht die Striche kräftiger, ohne dass der Text breiter läuft */
  .umschlag .bogen p { font-family: var(--brief); font-style: italic; font-size: 1.12rem; line-height: 1.22; color: #000; -webkit-text-stroke: .35px #000; }
  /* Der Gruss in Newsreader kursiv: einzige Ausnahme (Nutzer 8.11.). Tourfarbe, für die Sonne mit 30 % Schwarz gemischt und mit feiner Kontur (Newsreader liegt nur im Schnitt 500 bei) */
  .umschlag .bogen .gruss { font-family: var(--stimme); font-weight: 500; color: var(--accent); color: color-mix(in srgb, var(--accent) 70%, #000); -webkit-text-stroke: .3px currentColor; text-align: right; margin-top: 4px; }
  .umschlag .fund { position: absolute; left: 20px; right: 20px; bottom: 14px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; text-align: right; }
  .umschlag .fund-name { opacity: 0; transition: opacity .4s .45s; }
  .umschlag .fund.feiern .fund-name { opacity: 1; }
  .umschlag .fund-name small { display: block; font-size: 14px; color: var(--muted); font-weight: 500; }
  .umschlag .fund-name b { font-size: .86rem; font-weight: 600; }
  /* Mini-Feier ums Fundstück: es springt heraus, ein Goldfaden zieht einen Ring darum, Funken und Sterne sprühen (A12: bleibt) */
  .fund-feier { --r: 42px; --f: 7px; position: relative; display: grid; place-items: center; width: 46px; height: 46px; flex: none; }
  .fund-feier > svg { grid-area: 1 / 1; width: 100%; height: 100%; overflow: visible; }
  .fund-feier .fund-patch { opacity: 0; }
  .fund-feier .naht circle { stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; }
  .fund-feier .funke { position: absolute; left: 50%; top: 50%; width: var(--f); height: var(--f); margin: calc(var(--f) / -2); border-radius: 50%; background: var(--gold); opacity: 0; pointer-events: none; }
  .fund-feier .funke:nth-of-type(3n + 2) { background: var(--accent); }
  .fund-feier .funke:nth-of-type(3n) { background: rgb(var(--sky)); }
  .fund-feier .funke:nth-of-type(even) { width: calc(var(--f) * 1.9); height: calc(var(--f) * 1.9); margin: calc(var(--f) * -.95); border-radius: 0; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
  .fund-feier .glanz { position: absolute; inset: -45%; border-radius: 50%; background: radial-gradient(circle, rgba(242, 182, 50, .5), rgba(242, 182, 50, 0) 62%); opacity: 0; pointer-events: none; }
  .feiern .fund-patch { animation: fundPop .6s cubic-bezier(.3,1.6,.5,1) both; }
  .feiern .naht circle { animation: naht .8s ease-out .25s forwards; }
  .feiern .glanz { animation: glanz 1s ease-out .3s forwards; }
  .feiern .funke { animation: funke 1s cubic-bezier(.2,.7,.3,1) .35s forwards; }
  @keyframes fundPop { 0% { transform: scale(.3) rotate(-25deg); opacity: 0; } 60% { transform: scale(1.18) rotate(6deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
  @keyframes naht { 0% { stroke-dashoffset: 100; opacity: 1; } 65% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
  @keyframes glanz { 0% { opacity: 0; transform: scale(.5); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.25); } }
  @keyframes funke { 0% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--r) * -.4)) scale(.6); } 15% { opacity: 1; transform: rotate(var(--a)) translateY(calc(var(--r) * -.6)) scale(1.15); } 65% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--r) * -1.15)) scale(.5); } }

  /* Briefperson stellt sich vor (Nutzer 8.11.2026, Muster recherche/portraets/briefpersonen.html): Blatt über der Karte nach rund 2 Minuten.
     Bleistift-Banner randlos oben, Figur rechts (object-position), Name unten links, Jahreszahl rechts oben am letzten Buchstaben.
     So am Handy; ab 540 px Breite gilt die Vignette weiter unten */
  .vorstellung { position: fixed; inset: 0; z-index: 1700; background: var(--korn) var(--ivory); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column;
    animation: blattRein .32s var(--blatt) backwards; }
  @keyframes blattRein { from { transform: translateY(24px); opacity: 0; } }
  .vorstellung .banner { position: relative; height: 230px; flex: none; overflow: hidden; background: #f3ecdc; }
  .vorstellung .banner img { width: 100%; height: 100%; object-fit: cover; object-position: 64% 30%; display: block; }
  .vorstellung .banner::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(180deg, rgba(247,244,238,0), rgba(247,244,238,.85)); }
  .vorstellung .bt { position: absolute; left: max(20px, env(safe-area-inset-left, 0px)); bottom: 14px; z-index: 1; margin: 0; }
  .vorstellung .bt b { position: relative; display: inline-block; font: 800 2.6rem/.95 var(--display); letter-spacing: -.03em; color: var(--ink); }
  /* Die Jahreszahl beginnt rechts oben am letzten Buchstaben: Grundlinie auf Höhe der x-Höhe (Inter Tight ≈ 0,546 em) */
  .vorstellung .jahr { vertical-align: calc(2.6rem * .546 + 2px); margin-left: 2px; font: 600 12.5px/0 var(--ui); letter-spacing: .02em; color: var(--muted); white-space: nowrap; }
  .vorstellung .inhalt { flex: 1; width: 100%; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px;
    padding: 20px max(20px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 22px) max(20px, env(safe-area-inset-left, 0px)); }
  .vs-satz { line-height: 1.42; }
  .vs-frage { font: 600 24px/1.2 var(--display); letter-spacing: -.015em; margin-top: auto; text-wrap: balance; }
  .vs-aufloesung { color: var(--muted); min-height: 1.3em; }
  .vs-aufloesung b { color: var(--ink); }
  /* Ab 540 px Breite (Computer, Tablet) steht die Zeichnung als Vignette über der Textspalte (Nutzer 16.11.2026: «Das Problem ist, dass die
     Briefeschreiber mitten im Kopf angeschnitten sind»; gewählt: Muster C aus recherche/briefbild-computer-2026-11-16). Vorher füllte das Bild
     die ganze Fensterbreite, bei 230 px Höhe blieb vom Kopf nur die Mitte. Jetzt: ganze Zeichnung, höchstens 700 × 300 px, mittig; links, rechts
     und unten läuft sie weich ins Papier aus (die Maske ersetzt den hellen Verlauf ::after). Der Name steht an der Kante der Textspalte.
     Unter 540 px bleibt alles wie am Handy. Prüfung: recherche/briefbild-computer-2026-11-16/eingebaut.py (Kopf ganz bei allen Zeichnungen) */
  @media (min-width: 540px) {
    .vorstellung .banner { height: min(300px, calc(100vw * 514 / 1200)); background: none; }
    .vorstellung .banner::after { display: none; }
    .vorstellung .banner img { position: absolute; top: 0; left: 50%; width: min(700px, 100%); transform: translateX(-50%); object-fit: contain; object-position: 50% 0%;
      -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, #000 55%, rgba(0,0,0,.1) 100%);
      -webkit-mask-composite: source-in;
      mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, #000 55%, rgba(0,0,0,.1) 100%);
      mask-composite: intersect; }
    .vorstellung .bt { left: max(20px, env(safe-area-inset-left, 0px), calc(50% - 210px)); }
  }

  /* Rätsel */
  #riddle-card { display: flex; flex-direction: column; gap: 16px; flex: 1; }
  /* «Checkpoint 3 · Ägertli» über der Frage */
  #riddle-step { display: block; margin-bottom: 10px; }
  .riddle-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
  .stufe-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; margin-top: -5px; padding: 6px 11px 6px 10px; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--line); font: 600 13px/1 var(--ui, inherit); color: var(--ink); }
  .stufe-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  .stufe-chip svg { color: var(--muted); }
  .stufe-chip.neu { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); transition: box-shadow .6s; }
  .stufe-blatt { position: fixed; inset: 0; z-index: 60; }
  .sb-dunkel { position: absolute; inset: 0; background: rgba(22,22,26,.42); }
  .sb-blatt { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: var(--ivory, #f7f4ee); border-radius: 28px 28px 0 0; padding: 12px 22px calc(26px + env(safe-area-inset-bottom, 0px)); }
  .sb-griff { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 18px; }
  .sb-blatt h3 { font-family: var(--display, inherit); font-weight: 800; font-size: 26px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 6px; }
  .sb-lead { font-size: 14.5px; line-height: 1.45; color: var(--muted); margin: 0 0 16px; }
  .sb-stufe { width: 100%; text-align: left; display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px; margin-bottom: 10px; color: var(--ink); }
  .sb-stufe .rad { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); margin-top: 2px; }
  .sb-stufe[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .sb-stufe[aria-checked="true"] .rad { border: 6px solid var(--accent); }
  .sb-stufe b { display: block; font-size: 17px; margin-bottom: 3px; }
  .sb-stufe small { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); }
  .sb-stufe .jetzt { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
  .sb-ok { width: 100%; margin-top: 8px; padding: 17px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 1rem; }
  .sb-ok:disabled { opacity: .35; }
  #neu-blatt .btn.link { display: block; width: 100%; margin-top: 6px; }
  .riddle-q { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.2; letter-spacing: -.015em; margin-block: auto; }
  /* Am ersten Halt ohne Aufbruchbild (P1): ein Satz, wo man ist */
  .hinweis-ort { font-weight: 500; }
  .choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
  .choices.long { grid-template-columns: 1fr; }
  /* Antwortknöpfe mit Kontur 1,5 px in Tinte für alle Stufen (D7, grau-kontur.jpg) */
  .choices button { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); border-radius: 999px; padding: 15px 10px; min-height: 52px; font-weight: 600; font-size: 1.05rem; }
  .choices.long button { border-radius: 18px; padding: 14px 16px; text-align: left; }
  /* Falsch (A2): kurz schütteln, dann grau und durchgestrichen; ruhiges Grau statt Rot */
  .choices button.wrong { color: var(--muted); text-decoration: line-through; box-shadow: inset 0 0 0 1.5px var(--grau-kontur); animation: daneben .28s var(--aus); }
  @keyframes daneben { 20% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }
  /* Richtig (A2): der Knopf füllt sich in 160 ms von links in der Tourfarbe, erst danach kommt der Pokal */
  .choices button.richtig { position: relative; overflow: hidden; isolation: isolate; color: #fff; box-shadow: none; transition: color .16s; }
  .choices button.richtig::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); clip-path: inset(0 100% 0 0); animation: fuellen .16s linear forwards; }
  @keyframes fuellen { to { clip-path: inset(0 0 0 0); } }
  /* «Zwei stimmen, einer flunkert»: drei Sätze untereinander, nach dem Treffer alle drei erklärt (P5) */
  .claims { display: grid; gap: 8px; }
  .claim { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); border-radius: 18px; padding: 14px 16px; text-align: left; display: grid; gap: 4px; font-size: 1rem; line-height: 1.4; }
  .claim small { color: var(--muted); font-size: .85rem; }
  .claim.true { color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--grau-kontur); animation: daneben .28s var(--aus); }
  .claim.aufgeloest { color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--grau-kontur); }
  .claim.fake { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
  /* Rückmeldung grau statt rot (Nutzer 8.11.2026): «Nicht ganz.» in Tinte, der Rest ruhig */
  .feedback { min-height: 1.3em; color: var(--muted); }
  .feedback b { color: var(--ink); font-weight: 600; }
  .feedback:not(:empty), .tip.neu { animation: tippRein .22s var(--aus) backwards; }
  @keyframes tippRein { from { opacity: 0; transform: translateY(6px); } }
  .tips { display: grid; gap: 8px; }
  /* Tipps fallen auf (Nutzer 12.11.2026: neben der grossen Frage ging ein neuer Tipp unter): Tourfarbe, Etikett, grössere Schrift.
     Sie bleiben unter dem Antwortfeld */
  .tip { display: block; width: 100%; text-align: left; background: var(--accent-soft); border-left: 5px solid var(--accent); border-radius: 14px; padding: 10px 14px 11px; font-size: 1.02rem; line-height: 1.3; }
  .tip b { display: block; font: 700 .72rem var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }
  .tip .muted { font-size: 1.02rem; color: var(--ink); }
  .help { justify-self: center; background: none; display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: .95rem; padding: 10px 14px; min-height: 44px; }
  /* Aufgedeckte Lösung: gross, mit Weiter statt Eintippen */
  .solution-card { background: var(--accent-soft); border-radius: 22px; padding: 18px 18px 14px; display: grid; gap: 4px; justify-items: center; text-align: center; }
  .solution-card .btn, .btn.auto { position: relative; overflow: hidden; }
  /* Hauptknopf klebt unten (Nutzer 14.11.2026, Abendbericht Vorschlag 3): Auf kleinen Bildschirmen (375 × 650, Safari mit Leisten) lag
     «Tour starten», «Los geht's», «Weiter» nach der Belohnung und nach Lösung oder Flunkern unter dem Rand. Jetzt bleibt er unten im Bild,
     solange seine Ansicht reicht; der Grund hinter ihm ist Papier mit einem weichen Übergang nach oben, damit kein Text durchscheint.
     Passt alles auf den Bildschirm, steht er wie bisher. Der Weiter-Knopf unter der Lösung liegt allein in #tips: ohne eigenen Kasten
     (display: contents) darf er bis zum Rand der Rätselkarte kleben */
  #btn-start, #btn-story, #btn-next, .btn.auto, .solution-card .btn {
    position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); z-index: 5;
    background: var(--ivory); --klebe-grund: #f2efe9;   /* Mittel aus Grund und Körnung (gemessen 15.11.2026), sonst sieht man den Streifen */ --klebe-unten: calc(env(safe-area-inset-bottom, 0px) + 12px);
  }
  /* Streifen hinter dem klebenden Knopf (Abendbericht 15.11.2026: Wortstücke schauten neben den runden Enden und darunter hervor).
     Nur solange er wirklich klebt (Klasse «klebt» aus hunt.js), sonst würde der Streifen den Text danach zudecken. Der Streifen sind
     Schatten ohne Weichzeichnung: die Knopfform je 60 px links und rechts versetzt füllt die Ecken und Ränder bis über den Bildschirm hinaus,
     dieselbe Reihe um den Abstand nach unten versetzt füllt den Streifen bis zum unteren Rand. Darüber ein weicher Übergang. Schatten
     zählen nicht zur Seitenbreite, es entsteht kein seitliches Rollen */
  :is(#btn-start, #btn-story, #btn-next, .btn.auto, .solution-card .btn).klebt {
    box-shadow: inset 0 0 0 1.5px var(--ink),
      -60px 0 0 var(--klebe-grund), 60px 0 0 var(--klebe-grund),
      0 var(--klebe-unten) 0 var(--klebe-grund), -60px var(--klebe-unten) 0 var(--klebe-grund), 60px var(--klebe-unten) 0 var(--klebe-grund),
      0 -18px 16px -2px var(--klebe-grund);
  }
  /* In der Lösungskarte hat der Streifen die Kartenfarbe und bleibt in der Karte */
  .solution-card .btn { --klebe-grund: var(--accent-soft); }
  .solution-card { overflow: clip; }
  .tips:has(> .btn.auto:only-child) { display: contents; }
  .solution-card .btn i, .btn.auto i { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--ink); opacity: .25; }
  .solution-word { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.05; letter-spacing: -.02em; margin: 2px 0 10px; color: var(--ink); overflow-wrap: anywhere; }
  .answer { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 18px; }
  /* Fokus am Textfeld in der Tourfarbe (D19) */
  .answer:focus-within { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .answer input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1.05rem; color: var(--ink); padding: 8px 0; outline: none; }
  .answer button { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; flex: none; }

  /* Wahl «Rätsel oder Action» an einem Checkpoint pro Tour: zwei ruhige Karten mit Kontur wie die Knöpfe */
  .wahl { flex: 1; display: flex; flex-direction: column; gap: 14px; }
  .wahl h2 { margin-block: 4px 2px; }
  .wahl-karte { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; text-align: left; width: 100%; padding: 10px 14px 10px 10px;
                background: var(--paper); border-radius: 22px; box-shadow: inset 0 0 0 1.5px var(--ink); }
  .wahl-bild { width: 84px; height: 104px; border-radius: 14px; background: var(--ivory-2) no-repeat 8% 33% / 260% auto; }
  .wahl-bild.zeichen { display: grid; place-items: center; font: 700 52px/1 var(--display); color: var(--accent); }
  .wahl-karte b { display: block; font: 600 23px/1.1 var(--display); letter-spacing: -.015em; }
  .wahl-karte small { display: block; font-size: 14px; line-height: 1.3; color: var(--muted); margin-top: 5px; }
  .ak-klein { font-size: 14px; color: var(--muted); text-align: center; }
  /* Action: Vorbild, Kamera, Bildpaar. Die Höhe richtet sich nach dem Bildschirm, damit Auslöser und «Passt» ohne Scrollen sichtbar bleiben */
  .ak-schritt:not([hidden]) { flex: 1; display: flex; flex-direction: column; gap: 14px; }
  .ak-foto { position: relative; margin: 0; border-radius: 22px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--ivory-2); width: min(100%, calc((100vh - 430px) * 3 / 4)); width: min(100%, calc((100dvh - 430px) * 3 / 4)); min-width: 200px; align-self: center; }
  .ak-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 80%; }
  .ak-foto figcaption { position: absolute; left: 12px; right: 12px; bottom: 9px; font-size: 11px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
  .ak-zitat { font: 600 22px/1.2 var(--display); letter-spacing: -.015em; }
  .ak-unsichtbar { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  label.btn { display: block; text-align: center; cursor: pointer; }
  .ak-sucher, .ak-rahmen { position: relative; aspect-ratio: 9 / 16; width: min(100%, calc((100vh - 190px) * 9 / 16)); width: min(100%, calc((100dvh - 190px) * 9 / 16)); align-self: center; border-radius: 22px; overflow: hidden; background: #16161a; }
  /* Sucher so gross wie möglich (Nutzer 16.11.2026: Ausschnitt «sehr klein»): nur Auslöserleiste und Ränder gehen von der Höhe ab */
  .ak-sucher { width: min(100%, calc((100vh - 124px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 9 / 16));
               width: min(100%, calc((100dvh - 124px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 9 / 16)); }
  #ak-kamera:not([hidden]) { gap: 10px; }
  .ak-sucher video, .ak-sucher img, .ak-sucher svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .ak-sucher video, .ak-sucher img { object-fit: cover; }
  .ak-sucher video.spiegel { transform: scaleX(-1); }
  .ak-tafel { position: absolute; right: 12px; top: 12px; background: var(--ivory); color: var(--ink); font-size: 13px; font-weight: 600; padding: 7px 11px; border-radius: 999px; }
  .ak-leiste { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: auto; }
  .ak-leiste .btn.link { width: auto; }
  #ak-ausloeser { width: 72px; height: 72px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 3px var(--ink); display: grid; place-items: center; padding: 0; }
  #ak-ausloeser i { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); }
  .ak-rahmen { width: min(100%, calc((100vh - 250px) * 9 / 16)); width: min(100%, calc((100dvh - 250px) * 9 / 16)); touch-action: none; box-shadow: 0 12px 30px rgba(22,22,26,.2); padding: 0; }
  .ak-rahmen canvas { display: block; width: 100%; height: 100%; }
  .ak-rahmen.klein { width: min(62%, 250px); touch-action: auto; }
  .done-film { width: 100%; display: grid; gap: 10px; justify-items: center; margin-bottom: 6px; }
  .film-bereit { font-size: 15px; font-weight: 600; color: var(--ink); text-align: center; }
  .film-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

  /* Pokal */
  .reward { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
  .reward .weiter { max-width: 32ch; margin: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
  .trophy { width: 220px; max-width: 62vw; flex: none; margin-top: 10px; }
  /* Pokal aus Filz (A7): erscheint ab 60 %, schwingt leicht über (1,25) und wippt danach genau einmal */
  .trophy.enter { animation: trophyIn .9s cubic-bezier(.34,1.25,.64,1) both; transform-origin: 50% 80%; }
  @keyframes trophyIn { from { transform: scale(.6) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
  .trophy.enter .starin { animation: starIn .6s cubic-bezier(.34,1.25,.64,1) both; transform-box: fill-box; transform-origin: center; }
  @keyframes starIn { from { transform: translateY(-30px) scale(.6) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
  .bobcup { transform-origin: 120px 200px; }
  .trophy.enter .bobcup { animation: cup 1.6s cubic-bezier(.65,0,.35,1) .9s 1; }
  @keyframes cup { 50% { transform: translateY(-4px) rotate(-1.5deg); } }
  /* Abzeichen mittig: bis 5 in einer Reihe, sonst zwei Reihen (7 → 4 / 3, 8 → 5 / 3, mehr: halb und halb) */
  .collection { display: grid; gap: 6px; justify-items: center; }
  .collection .reihe { display: flex; gap: 6px; justify-content: center; }
  .collection .patch { width: 40px; height: 40px; }
  #trophy-slot .patch { width: 200px; max-width: 56vw; height: auto; margin: 16px auto 4px; }
  /* Abzeichen eingenäht (A7): aus 60 % mit leichter Drehung, ohne Überschwingen, ohne Glanz */
  .patch { display: block; overflow: visible; }
  .patch.in { animation: patchIn .5s var(--aus) both; animation-delay: var(--d, 0s); }
  @keyframes patchIn { from { transform: scale(.6) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
  /* Wimpel: hängt an einer Schnur, fällt ein und pendelt sanft */
  .wimpel { display: block; overflow: visible; }
  .wimpel .wave { transform-origin: 60px 3px; animation: wave 5s ease-in-out infinite; }
  @keyframes wave { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
  .wimpel.in { animation: wimpelIn .9s cubic-bezier(.34,1.56,.64,1) both .2s; }
  @keyframes wimpelIn { from { transform: translateY(-40px) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
  .confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
  /* Onboarding und Geschichte */
  .ob-visual { flex: 1; min-height: 220px; display: grid; place-items: center; background: var(--ivory-2); border-radius: 30px; position: relative; overflow: hidden; }
  .ob-visual svg.topo { position: absolute; inset: 0; width: 100%; height: 100%; }
  .ob-route { animation: obRoute 1.4s linear infinite; }
  @keyframes obRoute { to { stroke-dashoffset: -24; } }
  /* Willkommen 2 «Löse das Rätsel»: der Wimpel so gross wie bei Geschafft (Nutzer 6.11.2026) */
  .ob-visual .wimpel { width: min(50vw, 210px); }
  .ob-nachsatz { margin-top: 10px; font-size: .92rem; }
  #view-onboard, #view-start, #view-story, #view-intro { touch-action: pan-y pinch-zoom; }
  /* Füllende Bilder (Nutzer 5.11.2026): Geschichts- und Aufbruchbild randlos bis an den Rand, der Titel steht weiss im Bild */
  .story-photo, #view-intro .photo { position: relative; width: 100vw; margin: calc(-26px - env(safe-area-inset-top, 0px)) 0 0 calc(50% - 50vw); border-radius: 0; overflow: hidden; background: var(--ivory-2); }
  /* Ab 500 px Fenster ist die App bei ihrer Höchstbreite (460 px plus 2 × 20 px Rand von body), darunter bleibt das Bild randlos wie am Handy */
  @media (min-width: 500px) { .story-photo, #view-intro .photo { width: 100%; margin-left: 0; margin-right: 0; } }
  .story-photo { flex: 0 0 auto; height: 50vh; min-height: 260px; }
  .story-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--ausschnitt, 50% 50%); }   /* Ausschnitt je Tour: HUNT.geschichte.ausschnitt */
  /* Verlauf über den Bildern schwächer, dafür ein Textschatten (D13, Variante A: 35 % statt 58 %) */
  .story-photo::after, #view-intro .photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, rgba(10,14,22,.35), rgba(10,14,22,0)); pointer-events: none; }
  .bildtitel { position: absolute; z-index: 2; left: max(20px, env(safe-area-inset-left, 0px)); right: max(20px, env(safe-area-inset-right, 0px)); bottom: 18px; color: #fff; font-size: 40px; line-height: 1.02; white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,.3), 0 2px 16px rgba(0,0,0,.35); }
  .bildtitel em { color: #fff; }
  .bildkopf { position: absolute; z-index: 3; left: max(20px, env(safe-area-inset-left, 0px)); right: max(20px, env(safe-area-inset-right, 0px)); bottom: 22px; display: grid; gap: 10px; }
  /* Im Aufbruchbild steht der Titel in einem Raster: ohne min-width: 0 wächst er mit dem Text, und einpassen() misst keinen Überlauf */
  .bildkopf .bildtitel { position: static; min-width: 0; }
  .bildkopf .caps { color: #fff; opacity: .95; text-shadow: 0 1px 2px rgba(0,0,0,.3), 0 1px 10px rgba(0,0,0,.35); }
  /* Aufbruch: «Auf zum Bahnhof» leichter («wie bei alter Schrift weniger bold») */
  #view-intro .bildtitel { font-weight: 600; }
  /* Das Pfeilband endet über dem Titel. startBand setzt die Maske je Bild selbst (steht das Ortssymbol tief, reicht sie weiter hinunter); das hier ist der Ersatz */
  #view-intro .photo svg.band { -webkit-mask-image: linear-gradient(to top, transparent 21%, #000 30%); mask-image: linear-gradient(to top, transparent 21%, #000 30%); }
  /* Der Titel steht im Bild; fehlt das Bild, bleibt der Titel unter dem Text */
  .story-photo:not([hidden]) ~ #story-title { display: none; }
  .story-text { display: grid; gap: 12px; }
  .fact { max-width: 34ch; }

  /* Ziel */
  /* Feedback nach dem Wimpel: Sterne im Gold der Tour und ein freiwilliges Textfeld. Der freie Platz liegt über den Sternen,
     damit Sterne, Feld und Senden unten beim Daumen bleiben */
  .fb-sterne { display: flex; justify-content: center; gap: 6px; margin-top: auto; }
  .fb-sterne button { background: none; padding: 4px; border-radius: 12px; }
  .fb-sterne svg { width: 44px; height: 44px; display: block; }
  .fb-sterne path { fill: none; stroke: #d9c49a; stroke-width: 1.5; stroke-linejoin: round; transition: fill .15s, stroke .15s; }
  .fb-sterne button.an path { fill: var(--gold); stroke: var(--gold); }
  .fb-wert { text-align: center; min-height: 1.4em; margin-top: -10px; }
  .fb-feld { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
  .fb-feld span { font-weight: 400; font-size: .82rem; color: var(--muted); }
  .fb-feld textarea { width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: 18px; padding: 12px 14px;
                      font: 1rem/1.45 var(--ui); color: var(--ink); resize: none; }
  .fb-feld textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .fb-feld textarea::placeholder { color: #a39e95; }
  .fb-unten { display: grid; gap: 4px; width: 100%; }
  .fb-umschlag { width: 140px; height: 94px; }
  @media (prefers-reduced-motion: no-preference) { .fb-umschlag.schwebt { animation: fb-schweben 2.4s ease-in-out infinite; } }
  @keyframes fb-schweben { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
  /* Impressum und Datenschutz klein am Ende des Startbildschirms */
  .rechtliches { text-align: center; color: var(--muted); margin: 4px 0 0; }
  .center { text-align: center; align-items: center; }
  /* Pokal 220 px und Abzeichen 200 px, damit man den Filz sieht; Wimpel bei Geschafft 210 px */
  #done-wimpel .wimpel { width: min(50vw, 210px); margin-inline: auto; }
  /* Wimpelsammlung: die Wimpel eines Orts hängen an einer Leine, fehlende sind leere Plätze */
  .sammlung { width: 100%; display: grid; gap: 8px; justify-items: center; }
  .sammlung .kopf { font: 500 14px var(--ui); color: var(--muted); }
  .leine { position: relative; display: flex; justify-content: center; gap: 10px; width: 100%; padding-top: 7px; }
  .leine::before { content: ""; position: absolute; top: 6px; left: 8%; right: 8%; height: 1.5px; background: #16161a; opacity: .55; border-radius: 2px; }
  .fach { width: 58px; display: grid; justify-items: center; }
  .fach .wimpel, .fach .wimpel * { animation: none !important; }
  .fach .wimpel { width: 58px; }
  .leer { width: 46px; height: 72px; margin-top: 4px; border: 1.5px dashed #b9b09f; border-top: 0; clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%); background: #efe9de; }
  .sammlung .weiter { font: 500 15px var(--ui); color: var(--ink); text-align: center; }
  .sammlung a.weiter { text-decoration: underline; text-underline-offset: 3px; }
  #start-sammlung { padding-block: 6px; }

  /* Svg-Schriften in Inter (auch der Ortsname auf dem Wimpel), ausser der Initiale im Siegel (Instrument Serif) */
  svg text:not(#brief-siegel-initiale) { font-family: var(--ui); }

  @media (prefers-reduced-motion: reduce) {
    .goal-icon.is-near .ring, .draw, .trophy.enter, .trophy.enter .starin, .trophy.enter .bobcup, .photo .flagpin, .patch.in, .wimpel.in, .wimpel .wave, .ob-route { animation: none; }
    .me-icon .cone, .offline-chip .fort, .near .arrow { transition: none; }
    .wackelt, .brief-marker, .brief-chip:not([hidden]), .fund-marker.neu svg, .feiern .fund-patch, .feiern .naht circle, .feiern .glanz, .feiern .funke { animation: none; }
    .feiern .fund-patch { opacity: 1; }
    .brief-blatt, .umschlag .bogen, .umschlag .fund-name { transition: none; }
    button, a.btn { transition: none; }
    .kopfzeile.neu, .choices button.wrong, .claim.true, .tip.neu, .vorstellung { animation: none; }
    .choices button.richtig::after { animation: none; clip-path: none; }
    /* Blatt «Ganz nah» und Ansichten: nur weich einblenden, ohne Weg */
    .near { transform: none; transition: opacity .18s ease-out; opacity: 0; }
    .near.auf { opacity: 1; } .near.weg { transform: none; opacity: 0; }
    .app > section:not([hidden]):not(.nav):not(#view-riddle), #view-riddle:not([hidden]), .feedback:not(:empty) { animation: einblenden .18s ease-out backwards; }
  }
  @keyframes einblenden { from { opacity: 0; } }
/* Handy quer: Die Mindestbreite schützt vor dem Fehlalarm, wenn die Tastatur ein Handy im Hochformat niedrig macht */
.nur-hochformat { position: fixed; inset: 0; z-index: 99999; background: #f7f4ee; color: #16161a; display: flex; align-items: center; justify-content: center; gap: 5vmin; padding: 24px max(24px, env(safe-area-inset-right, 0px)) 24px max(24px, env(safe-area-inset-left, 0px)); opacity: 0; visibility: hidden; transition: opacity .8s ease-in-out, visibility 0s linear .8s; }
.nur-hochformat svg { flex: none; width: min(28vmin, 132px); height: auto; }
.nur-hochformat p { font: 700 clamp(1.5rem, 9.5vmin, 2.9rem)/1.08 var(--display); margin: 0; max-width: 560px; }
.nur-hochformat em { color: var(--accent); }
@media (orientation: portrait) { .nur-hochformat { flex-direction: column; text-align: center; } }
@media (orientation: landscape) and (max-height: 500px) and (min-width: 560px) { .nur-hochformat { opacity: 1; visibility: visible; transition: opacity .8s ease-in-out, visibility 0s; } }
@media (prefers-reduced-motion: reduce) { .nur-hochformat { transition: none; } }
  /* Spielstand mitnehmen: Blatt mit QR-Code über der Karte und Abfrage auf dem zweiten Handy */
  .mitnehmen { position: fixed; inset: 0; z-index: 2000; background: rgba(22, 22, 26, .45); display: flex; align-items: flex-end; }
  .mitnehmen-blatt, .uebernehmen { background: var(--korn) var(--ivory); display: grid; gap: 12px; align-content: start;
    padding: 22px max(20px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 20px) max(20px, env(safe-area-inset-left, 0px)); }
  .mitnehmen-blatt { width: 100%; max-width: 520px; margin: 0 auto; border-radius: 28px 28px 0 0; }
  .mitnehmen-qr { width: min(64vw, 260px); margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 10px; }
  .mitnehmen-qr svg { display: block; width: 100%; height: auto; }
  .uebernehmen { position: fixed; inset: 0; z-index: 2000; padding-top: calc(env(safe-area-inset-top, 0px) + 40px); grid-template-rows: auto auto auto 1fr auto auto; }
  /* Anmeldung mit E-Mail-Code (Muster recherche/anmeldung-muster/muster-schlank.html, 11.11.2026): zwei Seiten vor der Tour,
     oben die Wortmarke «explore» mit dem Wappen in der Tourfarbe, unten der Ladebalken für unterwegs */
  #view-anmeldung:not([hidden]) { gap: 0; }
  .anm-seite { flex: 1; display: flex; flex-direction: column; }
  .anm-marke { display: grid; justify-items: start; gap: .05em; font: 800 30px/1 var(--display); letter-spacing: -.01em; margin: 12px 0 34px; }
  .anm-marke .wm { letter-spacing: -.035em; white-space: nowrap; }
  .anm-marke svg { height: .806em; width: auto; vertical-align: -.222em; margin: 0 .044em 0 .079em; }   /* feste Masse der Wortmarke (NEUE-JAGD, 11.11.2026) */
  .anm-marke .ort { font-size: .4em; letter-spacing: .12em; text-transform: uppercase; padding-left: .08em; margin-top: -.1em; color: var(--muted); }
  #view-anmeldung h1 { font: 800 40px/1 var(--display); letter-spacing: -.03em; margin: 0 0 14px; }
  #view-anmeldung h1 em { font-style: normal; color: var(--accent); }
  .anm-lead { font-size: 17px; line-height: 1.45; color: #3d3a35; margin: 0 0 26px; overflow-wrap: anywhere; }
  .anm-feld { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; letter-spacing: .02em; text-transform: uppercase; }
  .anm-input { width: 100%; height: 58px; border-radius: 16px; background: var(--paper); border: 1.5px solid #d9d2c4; padding: 0 18px;
               font: 400 18px var(--ui); color: var(--ink); margin-bottom: 14px; -webkit-appearance: none; appearance: none; }
  .anm-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .anm-knopf { height: 58px; border-radius: 999px; background: var(--ink); color: #fff; border: 0; width: 100%; font: 600 17px var(--ui); margin-bottom: 18px; }
  .anm-knopf.hell { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
  .anm-knopf:disabled { opacity: .45; }
  .anm-haken { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.4; color: #3d3a35; margin-bottom: 10px; cursor: pointer; }
  .anm-haken input { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .anm-haken .box { flex: 0 0 22px; height: 22px; border-radius: 6px; border: 1.5px solid #b9b1a2; background: var(--paper); display: grid; place-items: center; }
  .anm-haken .box svg { width: 15px; height: 15px; opacity: 0; }
  .anm-haken input:checked + .box { background: var(--accent); border-color: var(--accent); }
  .anm-haken input:checked + .box svg { opacity: 1; }
  .anm-haken input:focus-visible + .box { outline: 3px solid var(--accent); outline-offset: 2px; }
  .anm-klein { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 0; }
  /* Hinweis unter 16 (Nutzer 11.11.2026: «16 Jahre setzen wir um»), am Abend gekürzt und mittig («Satz unter 16? bitte mittig zentrieren»);
     «Datenschutz» steht in derselben Zeile, «Kein Passwort nötig» ist weg. Gilt für alle Touren mit Anmeldung */
  .anm-u16 { margin-bottom: 4px; text-align: center; }
  .anm-klein a, .anm-klein button { color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; }
  .anm-fehler { font-size: 14px; line-height: 1.4; color: var(--ink); background: var(--ivory-2); border-radius: 12px; padding: 10px 14px; margin: -6px 0 16px; }
  .anm-ohne { align-self: flex-start; background: none; border: 0; padding: 12px 0; margin-top: 6px; font: 600 15px var(--ui); color: var(--ink);
              text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
  .anm-laden { margin-top: auto; background: var(--ivory-2); border-radius: 18px; padding: 14px 16px; }
  .anm-seite .anm-laden { margin-top: auto; }
  .anm-laden .zeile { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 9px; }
  .anm-laden .zeile span:last-child { color: var(--accent); font-variant-numeric: tabular-nums; }
  .anm-laden .balken { height: 6px; border-radius: 6px; background: #ddd5c6; overflow: hidden; }
  .anm-laden .balken i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 6px; transition: width .3s; }
  .anm-laden .was { font-size: 12px; color: var(--muted); margin-top: 8px; }
  .anm-laden .was:empty { display: none; }
  .anm-abstand { flex: 1; min-height: 24px; }
  /* Sechs Kästchen; darüber liegt ein einziges unsichtbares Feld, damit das Handy den Code aus der Mail vorschlagen kann */
  .anm-code { position: relative; display: flex; gap: 9px; margin: 6px 0 22px; }
  .anm-code div { flex: 1; height: 62px; border-radius: 14px; background: var(--paper); border: 1.5px solid #d9d2c4; font: 700 28px/59px var(--display); text-align: center; }
  .anm-code div.aktiv { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .anm-code input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .01; color: transparent; caret-color: transparent; background: transparent;
                    border: 0; font-size: 16px; letter-spacing: 2em; -webkit-appearance: none; appearance: none; }
  .anm-code input:focus { outline: none; }
