:root{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#eaf6f4;background:#1f383b}*{box-sizing:border-box}html,body{height:100%;margin:0}body{overflow:hidden}button,input,textarea,select{font:inherit}button{cursor:pointer;border:none;touch-action:manipulation}#map{position:fixed;inset:0;background:#eae3cf}.map-empty{position:fixed;inset:0;background:repeating-linear-gradient(45deg,#dbe2d1,#dbe2d1 26px,#e3e6d7 27px,#e3e6d7 55px);display:grid;place-items:center;padding:24px;color:#1a3838;text-align:center}.map-empty-inner{max-width:420px;background:#f8fbf5e6;border:1px solid #c1cdbd;border-radius:20px;padding:24px;box-shadow:0 10px 30px #0002}.map-empty-inner strong{font-size:25px}.map-empty-inner span{font-size:14px}header.head{position:fixed;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:calc(env(safe-area-inset-top) + 10px) 16px 12px;background:#142b2fea;box-shadow:0 1px 8px #0003;z-index:3;letter-spacing:.3px}.head b{font-size:18px}.mode{font-size:11px;display:inline-block;margin-left:5px;padding:5px 8px;border-radius:8px;background:#3a5a4d}.head #gpsStatus{font-size:12px;color:#bcd7ce}.info{position:fixed;top:calc(env(safe-area-inset-top) + 68px);left:10px;right:10px;border-radius:14px;background:#152e34ed;display:flex;gap:7px;justify-content:space-between;padding:11px 9px;box-shadow:0 5px 16px #0004;z-index:3}.info>div{flex:1;min-width:0;text-align:center}.hint{font-size:10px;display:block;color:#bcd1ca;margin-bottom:6px}.info b{font-size:13px;overflow-wrap:anywhere}.notice{position:fixed;top:calc(env(safe-area-inset-top) + 142px);left:12px;right:12px;border-radius:10px;background:#ffffe9;color:#5b3517;padding:10px 14px;z-index:4;font-weight:600;font-size:13px;box-shadow:0 4px 12px #0003}.zoom-controls{position:fixed;right:12px;bottom:calc(env(safe-area-inset-bottom) + 95px);z-index:3;display:grid;gap:6px}.zoom-controls button{font-size:30px;background:#132f35e8;color:#fff;width:52px;height:48px;border-radius:10px;box-shadow:0 3px 8px #0004}.toolbar{position:fixed;bottom:0;left:0;right:0;display:flex;background:#142b2ff5;padding:10px 6px calc(env(safe-area-inset-bottom) + 8px);gap:5px;z-index:3;box-shadow:0 -2px 12px #0004}.toolbar button{color:#fff;background:#294b52;border:1px solid #56767b;flex:1;min-width:0;height:63px;border-radius:12px;font-size:25px;display:flex;align-items:center;justify-content:center;flex-direction:column;line-height:1.1}.toolbar button.active{background:#075d7b}.toolbar button small{font-size:11px;margin-top:3px}.shade{position:fixed;inset:0;background:#0008;z-index:5}.panel{position:fixed;bottom:0;left:0;right:0;max-height:91dvh;overflow-y:auto;padding:15px 16px calc(env(safe-area-inset-bottom) + 24px);border-radius:22px 22px 0 0;background:#203c42;color:#f2f8f6;z-index:6;box-shadow:0 -10px 30px #0007}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.panel-head h2{font-size:21px;margin:0}.close{background:#567078;color:#fff;border-radius:50%;height:35px;width:35px}.panel label{display:block;font-size:13px;margin:12px 0 8px}.panel input:not([type=file]),.panel textarea,.panel select{width:100%;display:block;border:1px solid #8ca8ac;border-radius:10px;padding:12px;margin-top:5px;background:#f9fefc;color:#132c30;font-size:16px}.panel input[type=file]{width:100%;display:block;margin-top:8px;color:#fff;font-size:13px}.panel button:not(.close){background:#3c6169;color:#fff;border-radius:10px;padding:12px 14px;margin:7px 0;width:100%;min-height:46px;font-weight:600}.panel button.primary{background:#087aa0}.panel button.danger{background:#723a3a}.panel button:disabled{opacity:.5}.quiet{font-size:12px;color:#c1d7d4;line-height:1.6}.split{display:flex;align-items:end;gap:9px}.split label{flex:1;min-width:0}.split button{width:auto!important;flex:0 0 105px}.storage-info{font-size:13px;background:#152e34;padding:10px;border-radius:8px}progress{width:100%;height:14px;accent-color:#1fa4cc}#alert{position:fixed;z-index:10;top:40%;left:8%;width:84%;background:#fff9de;color:#35230d;border:2px solid #a47a31;padding:18px;border-radius:15px;text-align:center;box-shadow:0 0 0 100vmax #0007}.maplibregl-control-container{display:none}[hidden]{display:none!important}

.gps-help{position:fixed;top:calc(env(safe-area-inset-top) + 144px);left:12px;right:12px;z-index:7;background:#fff6db;color:#302312;border:2px solid #e8bb60;border-radius:12px;padding:12px 40px 12px 12px;box-shadow:0 6px 22px #0004;font-size:13px;line-height:1.45;max-height:45vh;overflow:auto}.gps-help b{display:block;margin-bottom:6px}.gps-help #gpsHelpText{white-space:pre-line;overflow-wrap:anywhere}.gps-help button{position:absolute;right:8px;top:8px;background:#916e41;color:#fff;border-radius:7px;padding:5px 9px}

.file-actions{display:flex;gap:7px;flex-wrap:wrap}.file-actions button{flex:1 1 180px!important}.file-actions button[disabled]{opacity:.45}#selectedMapInfo{padding:8px;background:#142e33;border-radius:8px;word-break:break-word}

/* Geocaching-Annäherung; außerhalb von Karten- und GPS-Bedienfeldern. */
.proximity-hud{position:fixed;left:10px;bottom:calc(env(safe-area-inset-bottom) + 91px);z-index:3;display:flex;align-items:center;gap:7px;max-width:min(75vw,330px);padding:6px 8px;background:#142b2fee;border:1px solid #42657d;border-radius:12px;box-shadow:0 3px 10px #0005}
.proximity-hud span{font-size:11px;line-height:1.25;color:#e9f4ff;min-width:0}
.proximity-hud button{color:#fff;background:#24617a;padding:9px 10px;border-radius:9px;font-size:12px;white-space:nowrap;font-weight:600}
.proximity-hud button.active{background:#127e4e}

/* Ziel und GPS als gut sichtbare Fadenkreuze, keine gefüllten Kreise. */
.map-crosshair{--cross:#f14645;width:16px;height:16px;position:relative;pointer-events:none;filter:none}
.map-crosshair-gps{--cross:#000000}
.map-crosshair-red{--cross:#eb1727}
.map-crosshair span{position:absolute;display:block;background:var(--cross);box-shadow:none;pointer-events:none}
.map-crosshair .crosshair-horizontal{width:16px;height:1.5px;left:0;top:7.25px}
.map-crosshair .crosshair-vertical{width:1.5px;height:16px;left:7.25px;top:0}
.radius-actions{margin-top:12px;padding-top:10px;border-top:1px solid #67838a}
.radius-actions label{margin-top:0}

/* Lange Kartenberührung ohne Safari-Kontextmenü; normale MapLibre-Gesten behalten. */
#map canvas{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}

/* iOS Safari: Karte fuer Long-Press gegen native Textauswahl schuetzen. */
#map, #map .maplibregl-canvas, #map .maplibregl-canvas-container {-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}

/* Wanderrouting mit Zwischenzielen */
.via-list{background:#152f35;border:1px solid #456a70;padding:8px;border-radius:10px;max-height:25vh;overflow-y:auto}
.via-entry{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;padding:5px 0;border-bottom:1px solid #3e5960}
.via-entry:last-child{border-bottom:none}
.via-entry button{width:auto!important;min-height:32px!important;padding:4px 9px!important;margin:0!important;background:#735150!important}
.via-mode{background:#ad8024!important;color:#fff!important}
.map-via-marker{width:21px;height:21px;display:grid;place-items:center;border:2px solid #49380a;border-radius:50%;background:#ffca36;color:#211600;font-size:12px;font-weight:800;pointer-events:none}
#routeButton.navigating{background:#148073}

.house-toggle{display:flex!important;align-items:center;gap:8px;font-size:14px!important}.house-toggle input{width:20px;height:20px;accent-color:#2ac2ac;flex:0 0 20px;margin:0!important}

/* 1.8: nur die obere Zielinfo verstecken, die untere Leiste bleibt unverändert. */
.map-tools{position:fixed;top:calc(env(safe-area-inset-top) + 69px);left:10px;right:10px;display:flex;justify-content:space-between;gap:10px;z-index:4;pointer-events:none}
.map-tools button{pointer-events:auto;min-height:35px;padding:7px 13px;background:#142b2fe9;color:#fff;border:1px solid #597b80;border-radius:11px;box-shadow:0 2px 7px #0004;font-size:12px;font-weight:700}
.map-tools #orientationToggle[aria-pressed="true"]{background:#126581;border-color:#55b3c8}
.info{top:calc(env(safe-area-inset-top) + 111px)}
.notice{top:calc(env(safe-area-inset-top) + 151px)}
.gps-help{top:calc(env(safe-area-inset-top) + 151px)}

/* LOCUS 1.9: Untere Info ausschließlich durch den linken INFO-Button einblendbar. */
.toolbar #bottomInfoButton[aria-expanded="true"]{background:#126581;border-color:#55b3c8}
.proximity-hud[hidden]{display:none!important}
/* Long-Press: gezielte Auswahl ohne versehentliches Überschreiben des Endziels. */
.map-action-shade{position:fixed;inset:0;background:#0008;z-index:8}
.map-action-panel{position:fixed;bottom:calc(env(safe-area-inset-bottom) + 87px);left:12px;right:12px;max-width:460px;margin:auto;background:#18383e;color:#f3f8f7;border:1px solid #668b91;border-radius:16px;padding:14px;z-index:9;box-shadow:0 8px 26px #0008}
.map-action-panel h2{font-size:18px;margin:2px 0 5px}
.map-action-coords{font-size:12px;color:#c9dbd7;margin:0 0 10px}
.map-action-panel button{display:block;width:100%;min-height:46px;border-radius:10px;background:#255968;color:#fff;margin:7px 0;padding:9px 12px;font-weight:650}
.map-action-panel #mapActionNewTarget{background:#8a3c3c}
.map-action-panel #mapActionAddVia{background:#186f80}
.map-action-panel #mapActionDeleteVia{background:#a04d31}
.map-action-panel #mapActionCancel{background:#48646b}

/* LOCUS 2.0: kompaktes Zahnradmenü und direkter Linienschalter. */
.settings-panel .settings-choice{display:flex;align-items:center;justify-content:space-between;font-size:19px;text-align:left;padding:17px!important;min-height:60px!important}
.settings-panel .settings-choice span{font-size:25px;color:#bfd7d4}
.panel-actions{display:flex;align-items:center;gap:7px}
.panel .panel-actions .back{display:grid;place-items:center;background:#476973;color:white;width:35px!important;height:35px!important;flex:0 0 35px;border-radius:50%;font-size:27px;padding:0!important;min-height:35px!important;margin:0!important}
.toolbar #mapsButton.line-hidden{background:#574a43;border-color:#978477}
.toolbar #mapsButton.line-hidden small{color:#f1c6a2}
.gps-direction-arrow{width:24px;height:30px;display:grid;place-items:center;pointer-events:none;filter:none}
.gps-direction-arrow svg{display:block;transform-origin:50% 50%;will-change:transform}
.map-advanced{margin:10px 0;border-top:1px solid #68838b;padding-top:8px}
.map-advanced summary{font-size:13px;font-weight:650;cursor:pointer}

/* LOCUS 2.1: reduziertes Kartenmenü und GPS-Reparatur auf iOS. */
#mapsPanel .settings-choice{display:flex;align-items:center;justify-content:space-between;font-size:18px;text-align:left;padding:17px!important;min-height:60px!important}
#mapsPanel .settings-choice span{font-size:24px;color:#c5d7da}
.gps-help .gps-retry{position:static;width:100%;background:#236d85;color:#fff;padding:11px 12px;border-radius:9px;font-weight:650;margin-top:10px}

/* LOCUS 2.2: Speicherübersicht nur auf ausdrücklichen Aufruf */
.storage-report{background:#132c32;border:1px solid #4b6970;border-radius:10px;padding:12px;margin-top:12px;font-size:13px}
.storage-report>p{margin:9px 0;line-height:1.5}
.storage-map-row{border-top:1px solid #486269;display:flex;flex-direction:column;gap:5px;padding:10px 0}
.storage-map-name{overflow-wrap:anywhere;display:flex;flex-direction:column;gap:5px}
.storage-map-name small{font-size:12px;color:#bfdbd5}
.panel .storage-report button.danger{font-size:13px;margin:1px 0;padding:7px 10px;min-height:36px}

/* 2.3: REC auch auf dem schmalen iPhone XR gut erreichbar. */
.toolbar{gap:4px;padding-left:4px;padding-right:4px}.toolbar button{height:61px;font-size:23px;border-radius:9px}
.toolbar #recButton{font-size:23px}.toolbar #recButton.recording{background:#a62653;border-color:#ff7b9a}.toolbar #recButton.paused{background:#99721f;border-color:#ffce60}
.rec-mode{font-size:15px;font-weight:800;background:#142e34;border-radius:10px;padding:12px;margin:6px 0 10px}
.rec-controls{display:flex;gap:7px}.panel .rec-controls button:not(.close){flex:1;width:auto;min-width:0;padding:12px 5px;font-size:13px}
.rec-session-total,.rec-track-total{display:flex;flex-direction:column;gap:6px;margin:12px 0;padding:12px;background:#152e33;border-radius:11px}
.rec-session-total span,.rec-track-total span{color:#c6d6d5;font-size:12px}.rec-session-total strong,.rec-track-total strong{font-variant-numeric:tabular-nums;font-size:19px}
.rec-segment-list{margin-top:13px;font-size:12px;line-height:1.6}.rec-segment{padding:8px;border-bottom:1px solid #536e73;display:flex;gap:9px;align-items:center}.rec-color{width:18px;height:7px;border-radius:3px;flex-shrink:0}.rec-color.pause{background:repeating-linear-gradient(90deg,#f00 0 3px,transparent 3px 7px)}
.rec-saved-entry{padding:12px 0;border-bottom:1px solid #597177}.rec-saved-entry strong{display:block;overflow-wrap:anywhere}.rec-saved-entry small{display:block;color:#c8d8d4;margin:4px 0}.rec-saved-actions{display:flex;gap:6px;flex-wrap:wrap}.panel .rec-saved-actions button:not(.close){width:auto;flex:1;min-width:72px;padding:9px 5px;font-size:12px;margin:3px 0}

/* GeoJez 2.6 – zwei gut lesbare Abbiegefelder UNTEN direkt ueber der Hauptleiste.
   Links = naechstes, rechts = danach folgendes Manöver. Karte voraus bleibt frei. */
.nav-turns{
 position:fixed;z-index:4;
 left:8px;right:8px;bottom:calc(env(safe-area-inset-bottom) + 88px);
 width:auto;padding:0;margin:0;background:transparent;border:0;box-shadow:none;
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
 pointer-events:none;text-align:left;color:#fff;
}
.nav-turn{
 min-width:0;min-height:74px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;
 gap:7px;padding:10px 8px;
 background:#123b3feF;border:1.5px solid #79c7ce;border-radius:14px;
 box-shadow:0 4px 12px #0007;pointer-events:auto;
}
.nav-turn+.nav-turn{border-top:1.5px solid #79c7ce}
.nav-turn-arrow{
 display:flex;align-items:center;justify-content:center;flex:0 0 44%;
 min-width:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI Symbol',sans-serif;
 font-size:clamp(35px,11vw,48px);font-weight:850;line-height:1;color:#fff;
 border-right:1px solid #7a9a9e;padding-right:3px;
}
.nav-turn-distance{
 flex:1;min-width:0;text-align:center;font-size:clamp(18px,5.5vw,27px);
 line-height:1.15;font-weight:850;letter-spacing:-.04em;white-space:nowrap;font-variant-numeric:tabular-nums;
}
.nav-turns-hide{
 position:absolute;top:-34px;left:4px;right:auto;z-index:1;
 display:flex;align-items:center;justify-content:center;
 width:30px;height:30px;padding:0;background:#284f57;color:#fff;
 border:1.4px solid #90c3ca;border-radius:50%;box-shadow:0 3px 9px #0008;
 font-size:22px;font-weight:700;line-height:1;pointer-events:auto;
}
.nav-turns-show{
 position:fixed;z-index:4;left:8px;bottom:calc(env(safe-area-inset-bottom) + 88px);
 border-radius:11px;padding:10px 12px;background:#173d42f0;border:1px solid #84b9c3;
 color:#fff;font-size:14px;font-weight:750;box-shadow:0 3px 8px #0006;
}
/* Bei sichtbaren Navigationsfeldern die Zoomtasten oberhalb halten. */
body.nav-hints-active .zoom-controls{bottom:calc(env(safe-area-inset-bottom) + 184px)}
@media(max-width:350px){
 .nav-turns{left:5px;right:5px;gap:5px}
 .nav-turn{gap:5px;padding:8px 5px;min-height:68px}
 .nav-turn-arrow{flex-basis:43%;font-size:34px}
 .nav-turn-distance{font-size:18px}
}

/* GeoJez 2.5 - verifizierte Adressen und erkennbare ORS-Routenberechnung */
.address-search{margin:12px 0;padding:11px;background:#132f35;border:1px solid #5c848b;border-radius:12px}
.address-search label{margin:0 0 7px}
.panel #addressInput{margin-top:7px}
.panel #addressInput.address-verified{border:3px solid #2cc978;background:#e1ffe9;color:#074321;font-weight:650}
.address-status{font-size:13px;min-height:24px;line-height:1.45;margin:6px 0 8px;color:#c3d8db;overflow-wrap:anywhere}
.address-status.address-verified{color:#8af2b2;font-weight:750}
.address-status.address-error{color:#ffd1ab}
.address-suggestions{display:grid;gap:5px;max-height:190px;overflow-y:auto;padding:2px 0}
.panel .address-suggestions button{width:100%;min-height:40px;margin:0;text-align:left;padding:8px!important;color:#f4faf7;background:#31585e!important;border:1px solid #628e95;font-size:13px;font-weight:500;overflow-wrap:anywhere}
.panel #applyAddress:disabled{opacity:.47}
.route-busy{display:flex;align-items:center;gap:11px;padding:12px;background:#173b43;border:1px solid #62acbd;border-radius:11px;color:#fff;font-weight:700;margin:10px 0}
.busy-spinner{display:inline-block;flex:0 0 24px;width:24px;height:24px;border:3px solid #8dc8d6;border-right-color:#156d84;border-radius:50%;animation:route-spin .9s linear infinite}
@keyframes route-spin{to{transform:rotate(360deg)}}
.route-busy-mini{position:fixed;top:calc(env(safe-area-inset-top) + 119px);right:9px;z-index:4;background:#19383eee;color:#fff;padding:9px 11px;border-radius:9px;border:1px solid #80adba;font-size:12px;font-weight:700;box-shadow:0 3px 8px #0006}
@media (prefers-reduced-motion: reduce){.busy-spinner{animation-duration:2.4s}}


/* GeoJez 2.7: Das INFO-/Tonfeld liegt immer OBERHALB der Nav-Hinweise.
   Große Abbiegungen: Navigation unten + X darüber + mindestens 10px Abstand.
   Eingeklappte Hinweise: über „Hinweise anzeigen“; ohne Navigation Standardposition.
   So bleibt die gewohnte Position bei Navigation AUS unverändert. */
body.nav-hints-active .proximity-hud{
 bottom:calc(env(safe-area-inset-bottom) + 206px);
 z-index:4;
}
body.nav-hints-collapsed .proximity-hud{
 bottom:calc(env(safe-area-inset-bottom) + 146px);
 z-index:4;
}
