/* DecoTrack Welt – Karte zum Hineinsetzen und begehbare 3D-Welt */
:root {
  --grund: #f4f1ea; --flaeche: #ffffff; --text: #23211d; --leise: #6b665c; --akzent: #d7263d; --rand: #d8d2c6;
  --hud: rgba(255, 255, 255, 0.86); --schatten: 0 2px 10px rgba(0, 0, 0, 0.18);
  color-scheme: light;
  font: 15px/1.4 Inter, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --grund: #1b1a17; --flaeche: #26241f; --text: #eeeae1; --leise: #a7a093; --rand: #3d3a33; --hud: rgba(30, 29, 26, 0.86); color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--grund); color: var(--text); overflow: hidden; }
[hidden] { display: none !important; }

.knopf { display: inline-flex; align-items: center; gap: 0.3em; padding: 0.45em 0.9em; border: 1px solid var(--rand); border-radius: 8px;
  background: var(--flaeche); color: var(--text); font: inherit; cursor: pointer; white-space: nowrap; }
.knopf:hover { border-color: var(--leise); }
.knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; font-weight: 600; box-shadow: var(--schatten); }
.knopf:disabled { opacity: 0.5; cursor: default; }

/* Karte */
.karten-ansicht { position: fixed; inset: 0; display: flex; flex-direction: column; }
.leiste { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; padding: calc(0.5rem + env(safe-area-inset-top, 0px)) 1rem 0.5rem; background: var(--flaeche); border-bottom: 1px solid var(--rand); z-index: 1000; }
.marke { color: var(--text); text-decoration: none; font-size: 1.1rem; }
.marke b { color: var(--akzent); }
.suche { position: relative; flex: 1 1 16rem; }
.suche input { width: 100%; padding: 0.5em 0.7em; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); font: inherit; }
.treffer { position: absolute; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 0.3rem 0; list-style: none; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px; box-shadow: var(--schatten); max-height: 50vh; overflow: auto; }
.treffer li { padding: 0.4rem 0.8rem; cursor: pointer; }
.treffer li.an, .treffer li:hover { background: var(--grund); }
.treffer .leise { color: var(--leise); font-size: 0.9em; }
.karte { flex: 1; }
.karten-hinweis { position: absolute; left: 50%; transform: translateX(-50%); top: calc(4.2rem + env(safe-area-inset-top, 0px)); z-index: 900; background: var(--hud); padding: 0.4rem 0.8rem; border-radius: 8px; box-shadow: var(--schatten); max-width: calc(100% - 2rem); text-align: center; }
.karten-knoepfe { position: absolute; left: 0; right: 0; bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); display: flex; gap: 0.6rem; justify-content: center; z-index: 900; flex-wrap: wrap; padding: 0 1rem; }
.karten-knoepfe .knopf { font-size: 1.05rem; padding: 0.65em 1.3em; }

/* Welt */
.welt-ansicht { position: fixed; inset: 0; background: #b9d3e6; }
.buehne { position: absolute; inset: 0; outline: none; touch-action: none; }
.buehne canvas { display: block; width: 100%; height: 100%; }
.hud { position: absolute; z-index: 5; }
.hud.oben { top: calc(0.6rem + env(safe-area-inset-top, 0px)); left: 0.8rem; right: 0.8rem; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; pointer-events: none; }
.hud.oben > * { pointer-events: auto; }
.modi { display: flex; background: var(--hud); border-radius: 8px; box-shadow: var(--schatten); overflow: hidden; }
.modi button { border: 0; background: none; color: var(--text); font: inherit; padding: 0.45em 0.8em; cursor: pointer; }
.modi button.an { background: var(--akzent); color: #fff; }
#steuerungKnopf { margin-left: auto; }
.werte { top: calc(var(--kopf-u, calc(3.6rem + env(safe-area-inset-top, 0px))) + 0rem); left: 0.8rem; background: var(--hud); border-radius: 8px; padding: 0.4rem 0.7rem; box-shadow: var(--schatten); font-variant-numeric: tabular-nums; pointer-events: none; }
.werte b { font-size: 1.3rem; }
.rad { top: calc(var(--kopf-u, calc(3.6rem + env(safe-area-inset-top, 0px))) + 0rem); right: 0.8rem; background: var(--hud); border-radius: 8px; padding: 0.5rem 0.7rem; box-shadow: var(--schatten); display: flex; flex-direction: column; gap: 0.4rem; }
.rad label { display: flex; flex-direction: column; font-size: 0.9rem; }
.rad output { font-weight: 600; }
.profil { left: 0.8rem; right: 0.8rem; bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px) + 1.4rem); height: 70px; width: calc(100% - 1.6rem); background: var(--hud); border-radius: 8px; box-shadow: var(--schatten); }
.laden { position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; /* Daumen/Joystick gehen durch */ background: var(--hud); padding: 0.7rem 1.2rem; border-radius: 10px; box-shadow: var(--schatten); }
.joystick { position: absolute; z-index: 6; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.7); background: rgba(0, 0, 0, 0.15); pointer-events: none; }
.joystick span { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(255, 255, 255, 0.8); }
.hilfe { position: absolute; z-index: 10; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(34rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto; background: var(--flaeche); border-radius: 12px; padding: 1rem 1.3rem; box-shadow: var(--schatten); }
.hilfe h2 { margin: 0 0 0.5rem; font-size: 1.2rem; }
/* Hilfe-Fenster (web/hilfe-fenster.js): Reiter, Karten je Gruppe, Tasten-Kappen */
.hilfe-neu { display: flex; flex-direction: column; position: fixed; box-sizing: border-box; width: min(56rem, 95vw); max-height: min(90vh, 90dvh); overflow-x: hidden;
  padding: 0; overflow: hidden; border: 1px solid var(--rand); border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28); --karte: var(--grund); }
.hilfe-kopf { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1rem 0.4rem 1.3rem; }
.hilfe-neu .hilfe-kopf h2 { margin: 0; font-size: 1.25rem; flex: 1; }
.hilfe-x { border: 0; background: none; color: var(--leise); font: 1.6rem/1 Inter, system-ui, sans-serif; width: 2.2rem; height: 2.2rem; border-radius: 50%; cursor: pointer; }
.hilfe-x:hover, .hilfe-x:focus-visible { background: var(--grund); color: var(--text); }
.hilfe-reiter { display: flex; gap: 0.25rem; padding: 0 1rem; border-bottom: 1px solid var(--rand); overflow-x: auto; scrollbar-width: none; flex: none; }
.hilfe-reiter button { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.6rem 0.85rem 0.55rem; border: 0; border-bottom: 3px solid transparent; background: none;
  color: var(--leise); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; margin-bottom: -1px; border-radius: 8px 8px 0 0; }
.hilfe-reiter button:hover { color: var(--text); background: var(--grund); }
.hilfe-reiter button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--akzent); font-weight: 650; }
.hilfe-reiter button:focus-visible { outline: none; background: color-mix(in srgb, var(--akzent) 10%, transparent); }
.hilfe-reiter .sym { width: 1.25em; height: 1.25em; }
.hilfe-inhalt { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 1rem 1.2rem 1.2rem; outline: none; overscroll-behavior: contain; }
.hilfe-intro { display: flex; align-items: center; gap: 1rem; margin: 0 0 0.9rem; color: var(--leise); flex-wrap: wrap; }
.hilfe-intro p { margin: 0; flex: 1 1 16rem; line-height: 1.5; }
.hilfe-gruppen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 0.8rem; align-items: start; }
.hilfe-karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 12px; padding: 0.75rem 0.9rem 0.6rem; margin: 0; min-width: 0; display: flow-root; }
.hilfe-karte.breit { grid-column: 1 / -1; }
.hilfe-karte h3 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.35rem; font-size: 1rem; }
.hilfe-karte h3 .sym { width: 1.7rem; height: 1.7rem; padding: 0.3rem; border-radius: 8px; background: color-mix(in srgb, var(--akzent) 14%, transparent); color: var(--akzent); flex: none; }
.hilfe-text { margin: 0 0 0.45rem; color: var(--leise); font-size: 0.9rem; line-height: 1.45; }
.hilfe-zeilen { list-style: none; margin: 0; padding: 0; }
.hilfe-zeilen li { display: grid; grid-template-columns: minmax(40%, 1fr) minmax(0, auto); align-items: center; column-gap: 0.7rem; row-gap: 0.15rem; min-height: 2.2rem; padding: 0.25rem 0; border-top: 1px solid var(--rand); }
.hilfe-zeilen li:first-child { border-top: 0; }
.hilfe-zeilen .aktion { display: block; min-width: 0; font-size: 0.93rem; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.hilfe-zeilen .aktion > .sym { margin-right: 0.45em; }
.hilfe-zeilen .aktion .sym { width: 1.15em; height: 1.15em; color: var(--leise); flex: none; }
.hilfe-zeilen .aktion small { display: block; margin-top: 0.1rem; color: var(--leise); font-size: 0.78rem; line-height: 1.35; }
.hilfe-zeilen .tasten { display: flex; align-items: center; gap: 0.4rem 0.45rem; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.hilfe-zeilen .tasten > * { flex: none; }
.hilfe-zeilen .oder { font-size: 0.72rem; color: var(--leise); margin: 0 0.05rem; }
.hilfe .sym { display: inline-block; vertical-align: middle; }
/* Tasten-Kappen */
.kappe { display: inline-flex; align-items: center; justify-content: center; min-width: 1.85rem; height: 1.85rem; padding: 0 0.45em; border: 1px solid var(--rand);
  border-bottom-width: 3px; border-radius: 6px; background: var(--flaeche); color: var(--text); font: 600 0.8rem/1 ui-monospace, Consolas, monospace; white-space: nowrap; }
.kappe.breit { font: 600 0.78rem/1 Inter, system-ui, sans-serif; padding: 0 0.6em; }
.kreuz { display: inline-grid; grid-template-columns: repeat(3, 1.55rem); grid-template-rows: repeat(2, 1.55rem); gap: 2px; }
.kreuz .kappe { min-width: 0; width: 1.55rem; height: 1.55rem; padding: 0; font-size: 0.72rem; border-bottom-width: 2px; }
.kreuz .k-o { grid-area: 1 / 2; } .kreuz .k-l { grid-area: 2 / 1; } .kreuz .k-u { grid-area: 2 / 2; } .kreuz .k-r { grid-area: 2 / 3; }
.paar { display: inline-flex; align-items: center; gap: 3px; }
.plus { font-size: 0.75rem; color: var(--leise); margin: 0 1px; }
.pad { display: inline-flex; align-items: center; justify-content: center; height: 1.85rem; font: 700 0.78rem/1 Inter, system-ui, sans-serif; color: #fff; white-space: nowrap; }
.pad.rund { width: 1.85rem; border-radius: 50%; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25); }
.p-a { background: #3f9b3a; } .p-b { background: #d23a3a; } .p-x { background: #2f6fd1; } .p-y { background: #d9a400; }
.pad.pille { padding: 0 0.6em; border-radius: 0.5rem 0.5rem 0.35rem 0.35rem; background: #55524b; min-width: 2.3rem; }
.pad.pille.trigger { border-radius: 0.9rem 0.9rem 0.35rem 0.35rem; background: #3a3833; }
.pad.stick { width: 1.85rem; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #6b675e 0 45%, #3a3833 47%); font-size: 0.72rem; }
.pad.dpad { position: relative; width: 1.85rem; }
.pad.dpad i { position: absolute; background: #8a857a; border-radius: 2px; }
.pad.dpad i:first-child { left: 35%; width: 30%; top: 4%; height: 92%; } .pad.dpad i:last-child { top: 35%; height: 30%; left: 4%; width: 92%; }
.pad.dpad::after { content: ""; position: absolute; z-index: 1; width: 30%; height: 30%; background: var(--akzent); border-radius: 2px; }
.pad.d-o::after { left: 35%; top: 4%; } .pad.d-u::after { left: 35%; bottom: 4%; } .pad.d-l::after { top: 35%; left: 4%; } .pad.d-r::after { top: 35%; right: 4%; }
.maus { display: inline-flex; flex: none; }
.maus svg { width: 1.85rem; height: 1.85rem; display: block; }
.maus path, .maus rect { fill: var(--flaeche); stroke: var(--text); stroke-width: 1.3; }
.maus .an { fill: var(--akzent); stroke: var(--akzent); }
.maus .duenn { fill: none; stroke: var(--leise); }
.geste { display: inline-flex; align-items: center; height: 1.85rem; padding: 0 0.7em; border-radius: 1rem; background: color-mix(in srgb, var(--akzent) 12%, transparent); color: var(--text); font-size: 0.82rem; white-space: nowrap; }
.frei { font-size: 0.8rem; color: var(--leise); font-style: italic; }
/* Handy-Skizze */
.handy-skizze { width: min(17rem, 100%); height: auto; flex: none; }
.hs-geraet { fill: var(--text); } .hs-schirm { fill: #b9d3e6; }
.hs-knopf { fill: rgba(255, 255, 255, 0.85); }
.hs-teiler { stroke: rgba(0, 0, 0, 0.25); stroke-dasharray: 4 4; stroke-width: 1.5; }
.hs-kreis { fill: rgba(0, 0, 0, 0.12); stroke: #fff; stroke-width: 2.5; } .hs-daumen { fill: rgba(255, 255, 255, 0.9); }
.hs-wisch { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.hs-text { fill: #23211d; font: 600 11px Inter, system-ui, sans-serif; text-anchor: middle; }
.hs-klein { fill: #23211d; font: 600 9px Inter, system-ui, sans-serif; text-anchor: middle; }
.hilfe-fuss { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; justify-content: space-between; padding: 0.75rem 1.2rem calc(0.75rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rand); flex: none; }
.hilfe-fuss .knopf.haupt { padding: 0.55em 1.4em; margin-left: auto; }
.hilfe-steuerung { white-space: normal; text-align: left; }
@media (prefers-color-scheme: dark) {
  .hilfe-neu { --karte: #2d2b26; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); }
  .kappe { background: #34312b; border-color: #4a463e; }
  .hs-geraet { fill: #0f0e0c; }
}
@media (max-width: 600px) {
  .hilfe-neu { width: 95vw; border-radius: 14px; }
  .hilfe-kopf { padding: 0.7rem 0.6rem 0.2rem 1rem; }
  .hilfe-reiter { padding: 0 0.5rem; }
  .hilfe-reiter button { padding: 0.55rem 0.6rem 0.5rem; font-size: 0.9rem; }
  .hilfe-reiter button span { display: none; }
  .hilfe-reiter button[aria-selected="true"] span { display: inline; }
  .hilfe-inhalt { padding: 0.8rem 0.75rem 1rem; }
  .hilfe-steuerung .lang { display: none; }
  .hilfe-fuss { padding-inline: 0.75rem; }
  .hilfe-steuerung { font-size: 0.85rem; }
}
kbd { border: 1px solid var(--rand); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.3em; font: 0.85em ui-monospace, monospace; }
.quellen { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; padding: 0.15rem 0.8rem calc(0.15rem + env(safe-area-inset-bottom, 0px)); font-size: 0.68rem; color: #222; background: rgba(255, 255, 255, 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .rad { top: auto; bottom: calc(6.8rem + env(safe-area-inset-bottom, 0px)); }
}
/* Straße folgen (web/welt-folgen.js): Pfeile der nächsten Abzweigung, gewählte hervorgehoben */
.abzweig { left: 50%; transform: translateX(-50%); bottom: calc(10rem + env(safe-area-inset-bottom, 0px)); background: var(--hud); border-radius: 10px; box-shadow: var(--schatten); padding: 0.35rem 0.8rem; display: flex; align-items: center; gap: 0.55rem; pointer-events: none; max-width: calc(100% - 1.6rem); flex-wrap: wrap; justify-content: center; font-size: 0.9rem; }
.abzweig .pfeil { display: inline-block; font-size: 1.6rem; line-height: 1; color: var(--leise); opacity: 0.75; }
.abzweig .pfeil.an { color: var(--akzent); opacity: 1; font-weight: 700; text-shadow: 0 0 6px rgba(0, 0, 0, 0.25); }
.abzweig-weit { font-weight: 600; font-variant-numeric: tabular-nums; }
#lenkKnopf[aria-pressed="false"] { opacity: 0.85; }
/* Route mit Belag (#belag= aus dem Ultra-Planer): Legende und Ein/Aus, rechts über dem Höhenprofil */
.route-legende { right: 0.8rem; bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px) + 1.4rem + 70px + 2.6rem); display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 1.6rem); }
.route-legende .legende { display: flex; gap: 0.6rem; flex-wrap: wrap; background: var(--hud); border-radius: 8px; padding: 0.25rem 0.6rem; font-size: 0.82rem; box-shadow: var(--schatten); }
.route-legende .legende:empty { display: none; }
.legende-eintrag { display: inline-flex; align-items: center; gap: 0.3rem; }
.legende-eintrag i { display: inline-block; width: 1.1rem; height: 0.45rem; border-radius: 3px; }
.route-legende .knopf { padding: 0.25em 0.6em; font-size: 0.85rem; background: var(--hud); }
/* Track vorspulen (web/welt-track.js): Leiste über dem Höhenprofil, Profil anklick- und ziehbar */
.profil { cursor: pointer; touch-action: none; }
.sprung-leiste { left: 0.8rem; bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px) + 1.4rem + 70px + 0.4rem); display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; max-width: calc(100% - 1.6rem); }
.sprung-leiste .knopf { padding: 0.25em 0.6em; font-size: 0.85rem; background: var(--hud); }
.sprung-leiste .knopf[aria-pressed="true"] { background: var(--akzent); color: #fff; }
.sprung-km { display: flex; align-items: center; gap: 0.3rem; background: var(--hud); border-radius: 8px; padding: 0.15rem 0.4rem; font-size: 0.85rem; }
.sprung-km input { width: 4.5rem; padding: 0.2em 0.4em; border: 1px solid var(--rand); border-radius: 6px; background: var(--grund); color: var(--text); font: inherit; }
@media (max-width: 600px) {
  .rad { bottom: calc(11.2rem + env(safe-area-inset-bottom, 0px)); }
}

/* Umschalter Karte/Satellit (web/welt-karte.js) */
.karte { position: relative; }
.kartenart { position: absolute; z-index: 5; right: 0.8rem; top: 0.8rem; display: flex; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px; box-shadow: var(--schatten); overflow: hidden; }
.kartenart button { border: 0; background: none; color: var(--text); font: inherit; font-size: 0.9rem; padding: 0.4em 0.75em; cursor: pointer; }
.kartenart button[aria-pressed="true"] { background: var(--akzent); color: #fff; }
@media (max-width: 600px) { .kartenart { top: auto; bottom: 5.2rem; right: 50%; transform: translateX(50%); } }

/* Steuerung einstellen (web/welt-steuerung.js) */
.steuerung { position: absolute; z-index: 11; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(44rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto; background: var(--flaeche); border-radius: 12px; padding: 1rem 1.3rem; box-shadow: var(--schatten); }
.steuerung-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.steuerung h2 { margin: 0; font-size: 1.2rem; }
.steuerung .leise { color: var(--leise); font-size: 0.9rem; }
.steuerung-tabelle { overflow-x: auto; }
.steuerung table { width: 100%; border-collapse: collapse; margin: 0.4rem 0 0.8rem; }
.steuerung caption { text-align: left; font-weight: 600; padding: 0.2rem 0; }
.steuerung thead th { font-weight: 400; font-size: 0.8rem; color: var(--leise); text-align: left; padding: 0 0.3rem; }
.steuerung tbody th { text-align: left; font-weight: 400; padding: 0.2rem 0.5rem 0.2rem 0; width: 40%; }
.steuerung td { padding: 0.15rem 0.3rem; }
.steuerung .taste { width: 100%; min-width: 6.5rem; padding: 0.3em 0.5em; border: 1px solid var(--rand); border-radius: 6px; background: var(--grund); color: var(--text); font: 0.88rem ui-monospace, monospace; cursor: pointer; }
.steuerung .taste:hover, .steuerung .taste:focus-visible { border-color: var(--leise); }
.steuerung .taste.wartet { border-color: var(--akzent); color: var(--akzent); animation: blinken 1s infinite; }
@keyframes blinken { 50% { opacity: 0.5; } }
.steuerung tr.hat-konflikt .taste { border-color: var(--akzent); }
.steuerung .konflikt { display: block; color: var(--akzent); font-size: 0.78rem; }
.steuerung .konflikt-zeile { color: var(--akzent); font-weight: 600; }
.steuerung fieldset { border: 1px solid var(--rand); border-radius: 8px; padding: 0.5rem 0.8rem; display: flex; flex-direction: column; gap: 0.4rem; }
.steuerung fieldset label { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.steuerung fieldset input[type="range"] { flex: 1 1 10rem; }
.steuerung output { min-width: 3.5em; font-variant-numeric: tabular-nums; font-weight: 600; }
.steuerung-fuss { display: flex; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.8rem; }

/* Heimtrainer (web/welt-trainer-fenster.js) */
.trainer-fenster { width: min(34rem, calc(100% - 2rem)); }
.trainer-fenster fieldset { border: 1px solid var(--rand); border-radius: 8px; margin: 0.6rem 0; display: flex; flex-direction: column; gap: 0.4rem; }
.trainer-fenster label { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.trainer-knoepfe { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.4rem 0; }
.trainer-live { font-variant-numeric: tabular-nums; min-height: 1.4em; }
.trainer-live b { font-size: 1.2rem; }
.werte .aufnahme { color: #d7263d; font-weight: 600; }
.werte { max-width: calc(100% - 13.5rem); } /* mit Trainerwerten lang – umbrechen statt unter den Leistungskasten laufen */
.werte .quelle { color: var(--leise); }

/* Geräte verbinden (Ansicht im Heimtrainer-Fenster) */
:root { --gut: #2e8b4f; --warten: #c98a00; --hinweis: #fff4d6; }
@media (prefers-color-scheme: dark) { :root { --gut: #5cc483; --warten: #e6b84a; --hinweis: #3a321c; } }
.trainer-fenster .steuerung-kopf h2 { flex: 1; }
.trainer-quelle { font-weight: 600; margin: 0.2rem 0; }
.geraete-hinweis { background: var(--hinweis); border: 1px solid var(--warten); border-radius: 8px; padding: 0.5rem 0.8rem; margin: 0.6rem 0; }
.geraete-hinweis p { margin: 0.2rem 0 0; font-size: 0.9rem; }
.geraete-suche { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0.7rem 0 0.4rem; }
.geraete-suche label { font-weight: 600; }
.geraete-suche select, .trainer-fenster select { padding: 0.4em 0.5em; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); font: inherit; max-width: 100%; }
.geraete-suche select { flex: 1 1 12rem; }
.geraete-liste { list-style: none; margin: 0.4rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.geraet { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.7rem; border: 1px solid var(--rand); border-radius: 10px; background: var(--grund); }
.geraet.antrieb { border-color: var(--gut); box-shadow: inset 3px 0 0 var(--gut); }
.geraet-punkt { flex: none; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--rand); border: 1px solid var(--leise); }
.geraet[data-status="verbunden"] .geraet-punkt { background: var(--gut); border-color: var(--gut); }
.geraet[data-status="verbinde"] .geraet-punkt, .geraet[data-status="wieder"] .geraet-punkt, .geraet[data-status="wartet"] .geraet-punkt,
.geraet[data-status="still"] .geraet-punkt { background: var(--warten); border-color: var(--warten); animation: blinken 1s infinite; }
.geraet-text { flex: 1 1 auto; min-width: 0; }
.geraet-titel .leise { font-size: 0.8rem; }
.geraet-aktiv { color: var(--gut); font-weight: 600; }
.geraet-status { font-size: 0.9rem; overflow-wrap: anywhere; }
.geraet[data-status="wieder"] .geraet-status, .geraet[data-status="still"] .geraet-status { color: var(--warten); }
.geraet-daten { font-size: 0.9rem; font-variant-numeric: tabular-nums; color: var(--leise); }
.geraet-daten:empty, .geraet-meldung:empty { display: none; }
.geraet-meldung { font-size: 0.82rem; color: var(--akzent); }
.geraet-meldung.gut { color: var(--gut); }
.geraet-fehler { font-size: 0.82rem; margin-top: 0.3rem; }
.geraet-fehler ul { margin: 0.2rem 0 0.4rem; padding-left: 1.1rem; }
.geraet-fehler li { margin: 0.1rem 0; }
.abbrueche { margin: 0.5rem 0; font-size: 0.85rem; }
.abbrueche summary { cursor: pointer; font-weight: 600; }
.abbrueche ol { margin: 0.3rem 0; padding-left: 1.3rem; max-height: 10rem; overflow-y: auto; font-variant-numeric: tabular-nums; }
.werte .verloren { color: var(--warten); font-weight: 600; }
.geraet-knoepfe { flex: none; display: flex; gap: 0.4rem; }
.geraet-knoepfe .knopf { min-width: 6.5rem; justify-content: center; }
.trainer-fenster label.haken { justify-content: flex-start; }
.trainer-fenster label.haken input { width: 1.2rem; height: 1.2rem; accent-color: var(--akzent); }
@media (max-width: 480px) {
  .geraet { flex-wrap: wrap; }
  .geraet-knoepfe { flex: 1 1 100%; }
  .geraet-knoepfe .knopf { flex: 1; }
}
@media (pointer: coarse) { .trainer-fenster .knopf, .trainer-fenster select { min-height: 2.75rem; } }

/* „Wohin?“ – beliebte Orte (web/welt-orte-ansicht.js, /welt und /bloecke) */
.orte { position: absolute; left: 0; right: 0; bottom: 0; top: 0; z-index: 950; overflow: auto; background: color-mix(in srgb, var(--grund) 94%, transparent);
  padding: 1rem max(1rem, env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px)); }
.orte-innen { max-width: 64rem; margin: 0 auto; }
.orte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.orte h2 { margin: 0; font-size: 1.5rem; }
.orte h3 { margin: 1rem 0 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--leise); text-transform: uppercase; letter-spacing: 0.05em; }
.orte-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.6rem; }
.ort { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem; border: 1px solid var(--rand); border-radius: 10px; background: var(--flaeche); color: var(--text);
  font: inherit; text-align: left; cursor: pointer; min-height: 4.5rem; }
.ort:hover { border-color: var(--leise); }
.ort:focus-visible { outline: 3px solid var(--akzent); outline-offset: 1px; }
.ort img, .ort-bild { flex: none; width: 3.6rem; height: 3.6rem; border-radius: 7px; object-fit: cover; background: var(--grund); }
.ort-bild { display: grid; place-items: center; font-size: 1.6rem; color: var(--leise); }
.ort-text { display: flex; flex-direction: column; min-width: 0; }
.ort-text small { color: var(--leise); font-size: 0.82rem; line-height: 1.25; }
.ort.eigen { border-style: dashed; }
.orte-tipp { font-size: 0.85rem; margin-top: 1rem; color: var(--leise); }
@media (pointer: coarse) { .orte-tipp { display: none; } }
@media (max-width: 480px) { .orte-liste { grid-template-columns: 1fr; gap: 0.45rem; } .ort { min-height: 3.8rem; } .ort img, .ort-bild { width: 3rem; height: 3rem; } .orte h2 { font-size: 1.25rem; } }

/* POIs (web/welt-poi.js): Knopf mit Legende/Filter, Beschriftungen, Infokarte, nächste POIs, Hinweis am Heimtrainer */
.poi-leiste { top: calc(var(--kopf-u, calc(3.6rem + env(safe-area-inset-top, 0px))) + 3.4rem); left: 0.8rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; max-width: min(22rem, calc(100% - 1.6rem)); }
.poi-leiste > .knopf, .poi-zeile > .knopf { padding: 0.25em 0.7em; font-size: 0.85rem; background: var(--hud); }
/* eine Spalte, sauber untereinander: Zeile „POI“ + „Was ist hier?“, „Du bist in“, Tafel (eingeklappt), „Nächste POIs“ */
.poi-zeile { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.poi-leiste > .poi-voraus { position: static; top: auto; left: auto; max-width: 100%; }
.poi-leiste > .poi-tafel { max-width: 100%; }
.poi-tafel { background: var(--flaeche); border-radius: 10px; box-shadow: var(--schatten); padding: 0.5rem 0.7rem; display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.88rem; max-height: 50vh; overflow: auto; }
.poi-tafel label { display: flex; align-items: center; gap: 0.35rem; }
.poi-sym { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; font-style: normal; font-size: 0.8rem; color: #fff; flex: none; }
.poi-umgebung { border-top: 1px solid var(--rand); padding-top: 0.3rem; margin-top: 0.2rem; }
.poi-schilder { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.poi-schild { position: absolute; left: 0; top: 0; background: var(--hud); color: var(--text); border-radius: 6px; padding: 0.1rem 0.45rem; font-size: 0.8rem; white-space: nowrap; box-shadow: var(--schatten); }
.poi-schild.warnung { background: #f57c00; color: #fff; font-weight: 600; }
.poi-karte { left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 9; background: var(--flaeche); border-radius: 12px; box-shadow: var(--schatten); padding: 0.7rem 1rem; min-width: min(18rem, calc(100% - 2rem)); max-width: calc(100% - 2rem); display: flex; flex-direction: column; gap: 0.25rem; }
.poi-karte.warnung { border: 2px solid #e53935; }
.poi-karte-kopf { display: flex; align-items: center; gap: 0.5rem; }
.poi-karte-kopf b { flex: 1; font-size: 1.05rem; }
.poi-karte-zeile { font-size: 0.9rem; color: var(--leise); font-variant-numeric: tabular-nums; }
.poi-voraus { top: calc(var(--kopf-u, calc(3.6rem + env(safe-area-inset-top, 0px))) + 5.8rem); left: 0.8rem; background: var(--hud); border-radius: 8px; padding: 0.3rem 0.6rem; box-shadow: var(--schatten); font-size: 0.85rem; pointer-events: none; max-width: min(22rem, calc(100% - 1.6rem)); }
.poi-voraus-zeile { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.poi-voraus-zeile.warnung { color: #e53935; font-weight: 600; }
.poi-voraus-zeile.kopf { font-weight: 600; }
/* Karte über der 3D-Ansicht (web/sprung-karte.js) und Minikarte */
.sprung-karte { position: absolute; inset: 0; z-index: 20; background: var(--flaeche); display: flex; flex-direction: column; }
.sprung-flaeche { flex: 1; min-height: 0; cursor: crosshair; }
.sprung-leiste { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: flex-end; padding: 0.5rem 0.8rem calc(0.5rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rand); }
.sprung-leiste span { margin-right: auto; font-size: 0.9rem; }
.minikarte { position: absolute; z-index: 6; right: 0.8rem; bottom: calc(7.2rem + env(safe-area-inset-bottom, 0px)); width: 150px; height: 150px; padding: 0; border: 2px solid #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--schatten); background: #ddd; cursor: pointer; }
.minikarte .mini-flaeche { position: absolute; inset: 0; pointer-events: none; }
.minikarte:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.mini-zoom { position: absolute; z-index: 2; left: 4px; top: 4px; display: flex; flex-direction: column; gap: 3px; }
.mini-zoom button { width: 1.6rem; height: 1.6rem; padding: 0; border: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.88); color: #222; font: 700 1rem/1 system-ui, sans-serif; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); cursor: pointer; }
.mini-zoom button:hover { background: #fff; }
@media (max-width: 700px), (max-height: 520px) { .mini-zoom { left: 2px; top: 2px; gap: 2px; } .mini-zoom button { width: 1.3rem; height: 1.3rem; font-size: 0.85rem; } }
/* Handy (auch quer): klein oben rechts unter der Kopfleiste – nie über den Daumenknöpfen */
@media (max-width: 700px), (max-height: 520px) { .minikarte { width: 84px; height: 84px; bottom: auto; top: calc(var(--kopf-u, calc(3.6rem + env(safe-area-inset-top, 0px))) + 1.6rem); right: calc(0.5rem + env(safe-area-inset-right, 0px)); } }
.handy .minikarte { width: 84px; height: 84px; bottom: auto; top: calc(var(--kopf-u, calc(3.6rem + env(safe-area-inset-top, 0px))) + 1.6rem); right: calc(0.5rem + env(safe-area-inset-right, 0px)); }
/* Fahrzeugauswahl am Knopf „Auto“ */
.fahrzeug-menue { position: absolute; z-index: 12; background: var(--flaeche); border-radius: 10px; box-shadow: var(--schatten); padding: 0.35rem; display: flex; flex-direction: column; gap: 0.15rem; min-width: 11rem; }
.fahrzeug-menue button { text-align: left; border: 0; background: none; padding: 0.4rem 0.6rem; border-radius: 7px; font: inherit; color: var(--text); cursor: pointer; }
.fahrzeug-menue button:hover, .fahrzeug-menue button:focus-visible { background: var(--rand); }
.fahrzeug-menue button[aria-checked="true"] { font-weight: 600; background: var(--rand); }
.fahrzeug-menue label { padding: 0.4rem 0.6rem 0.2rem; border-top: 1px solid var(--rand); margin-top: 0.15rem; display: flex; gap: 0.4rem; align-items: center; }
/* Ampel: geöffnet / schließt bald / geschlossen / unbekannt – zur (geschätzten) Ankunftszeit */
.poi-ampel { display: inline-block; width: 0.65em; height: 0.65em; border-radius: 50%; margin-right: 0.35em; vertical-align: 0.05em; box-shadow: 0 0 0 1px rgba(255,255,255,0.7); }
.poi-karte-zeile.warnung { color: #c62828; font-weight: 600; }
.poi-karte-zeile.rund { color: #2e7d32; font-weight: 600; }
.poi-hinweis { left: 50%; transform: translateX(-50%); top: calc(var(--kopf-u, calc(3.6rem + env(safe-area-inset-top, 0px))) + 3.4rem); background: var(--flaeche); border-radius: 10px; box-shadow: var(--schatten); padding: 0.45rem 1rem; font-weight: 600; pointer-events: none; max-width: calc(100% - 1.6rem); }
.poi-hinweis.warnung { background: #f57c00; color: #fff; }
/* Handy: Daumenknöpfe ▲ ▼ beim Fliegen und im Hubschrauber (web/welt.js flugKnoepfeZeigen). Rechts unten über der Quellenzeile, im
   Hubschrauber über dem Tacho; Minikarte sitzt am Handy oben rechts, der Joystick erscheint in der linken Bildhälfte. */
.flug-knoepfe { position: absolute; z-index: 7; right: calc(0.9rem + env(safe-area-inset-right, 0px)); bottom: calc(2.2rem + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 0.6rem; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.flug-knoepfe button { width: 4.2rem; height: 4.2rem; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.85); background: rgba(0, 0, 0, 0.32); color: #fff;
  font: 700 1.6rem/1 system-ui, sans-serif; display: grid; place-items: center; padding: 0; cursor: pointer; touch-action: none; box-shadow: var(--schatten); }
.flug-knoepfe button.an { background: rgba(255, 255, 255, 0.85); color: #111; }
/* quer mit wenig Höhe: nebeneinander, damit sie nicht in die Minikarte (oben rechts) reichen */
@media (orientation: landscape) and (max-height: 520px) {
  .flug-knoepfe { flex-direction: row; gap: 0.5rem; }
  .flug-knoepfe button { width: 3.8rem; height: 3.8rem; }
}

/* Züge, Fähren, Gleise: Infokarte und Uhr (web/zuege-lauf.js, web/welt-verkehr.js – auch /bloecke) */
.uhr-anzeige { top: calc(0.7rem + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); background: var(--hud, rgba(255,255,255,0.85)); border-radius: 8px; padding: 0.2rem 0.6rem; box-shadow: var(--schatten); font-variant-numeric: tabular-nums; pointer-events: none; font-weight: 600; }
.uhr-anzeige:empty { display: none; }
.zug-karte { position: absolute; right: 0.8rem; bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); z-index: 9; background: var(--flaeche, #fff); color: inherit; border-radius: 12px; box-shadow: var(--schatten, 0 2px 12px rgba(0,0,0,0.25)); padding: 0.7rem 1rem; width: min(21rem, calc(100% - 1.6rem)); font-size: 0.95rem; }
.zug-karte h3 { margin: 0 1.6rem 0.3rem 0; font-size: 1.15rem; }
.zug-karte .art { font-size: 0.8rem; font-weight: 500; color: var(--leise, #666); margin-left: 0.3rem; }
.zug-karte p { margin: 0.25rem 0; }
.zug-karte .klein, .zug-karte .quelle { font-size: 0.8rem; color: var(--leise, #666); }
.zug-karte .zu { position: absolute; top: 0.4rem; right: 0.5rem; border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: inherit; }
.zug-karte .knoepfe { display: flex; gap: 0.5rem; margin-top: 0.4rem; }
.zug-karte .linienschild { display: inline-block; min-width: 1.6em; padding: 0 0.35em; border-radius: 4px; text-align: center; font-weight: 700; }
/* Abfahrtstafel am Bahnhof (web/zuege-lauf.js): links, damit sie neben der Zug-Infokarte Platz hat */
.zug-karte.abfahrtstafel { right: auto; left: 0.8rem; width: min(26rem, calc(100% - 1.6rem)); }
.abfahrtstafel table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 0.3rem 0; }
.abfahrtstafel th { text-align: left; font-weight: 600; font-size: 0.78rem; color: var(--leise, #666); border-bottom: 1px solid var(--rand, #ccc); padding: 0.15rem 0.3rem; }
.abfahrtstafel td { padding: 0.18rem 0.3rem; border-bottom: 1px solid color-mix(in srgb, var(--rand, #ccc) 50%, transparent); }
.abfahrtstafel td.gleis { font-weight: 700; text-align: center; }
.abfahrtstafel tr[data-i] { cursor: pointer; }
.abfahrtstafel tr.an td { background: color-mix(in srgb, var(--akzent, #2a6df4) 18%, transparent); }
/* Live-Flugverkehr (web/flug-lauf.js): Hinweis bei erschöpftem Tageskontingent */
.flug-hinweis { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--kopf-u, calc(3.6rem + env(safe-area-inset-top, 0px))) + 0rem); z-index: 8; background: var(--flaeche, #fff); color: inherit; border-radius: 10px; padding: 0.3rem 0.8rem; font-size: 0.85rem; box-shadow: var(--schatten, 0 2px 12px rgba(0,0,0,0.25)); }
.zug-karte .knoepfe button { flex: 1; padding: 0.4rem 0.6rem; border-radius: 8px; border: 1px solid var(--rand, #ccc); background: var(--knopf, #f3f3f3); color: inherit; cursor: pointer; font: inherit; }
/* Mitfliegen: Anzeige oben rechts (web/flug-lauf.js); Liste „Flugzeuge in der Nähe“ */
.flug-hud { position: absolute; right: 0.8rem; top: calc(var(--kopf-u, calc(3.6rem + env(safe-area-inset-top, 0px))) + 0rem); z-index: 8; background: color-mix(in srgb, var(--flaeche, #fff) 88%, transparent); color: inherit; border-radius: 12px; padding: 0.5rem 0.8rem; font-size: 0.88rem; line-height: 1.45; box-shadow: var(--schatten, 0 2px 12px rgba(0,0,0,0.25)); min-width: 13rem; font-variant-numeric: tabular-nums; }
.flug-hud-kopf { font-size: 1.05rem; margin-bottom: 0.15rem; }
.flug-hud-kopf span { font-size: 0.85rem; color: var(--leise, #666); }
.flug-hud .klein { font-size: 0.75rem; color: var(--leise, #666); margin-top: 0.2rem; }
.flug-hud .knopf { margin-top: 0.35rem; width: 100%; }
.flug-hud .flug-hud-knoepfe { display: flex; gap: 0.4rem; } .flug-hud .flug-hud-knoepfe .knopf { width: auto; flex: 1; min-height: 2.3rem; } .flug-hud .knopf.raus { background: #d7263d; color: #fff; border-color: #d7263d; }
.flug-liste .flug-pfeil { display: inline-block; font-weight: 700; }
.flug-liste .knoepfe button { flex: 1; padding: 0.4rem 0.6rem; border-radius: 8px; border: 1px solid var(--rand, #ccc); background: var(--knopf, #f3f3f3); color: inherit; cursor: pointer; font: inherit; }
/* Bewegungstempo-Knopf (web/bewegungstempo.js): unten links, über der Daumenzone am Handy */
.tempo-knopf { position: absolute; z-index: 5; left: 0.8rem; bottom: calc(2.2rem + env(safe-area-inset-bottom, 0px)); padding: 0.3em 0.7em; font-variant-numeric: tabular-nums; }
.tempo-knopf[hidden] { display: none; }
.tempo-knopf.an { background: var(--akzent); color: #fff; }
/* Handy: kein Tempo-Regler beim Fliegen (verdeckt das Bild) – der Knopf ⏩ verdoppelt je Tipp ×1 → ×2 → ×4 → ×8 */
.handy #flugRegler { display: none !important; }
/* /welt setzt .handy nicht (nur /bloecke): dieselbe Bedingung (web/welt-handy.js HANDY) hier direkt – am Handy kein Regler-Kasten, nur ⏩ (Rückmeldung #23) */
@media (pointer: coarse), (max-width: 640px), (max-height: 520px) { #flugRegler { display: none !important; } }
.handy .tempo-knopf { font-size: 1.1rem; min-width: 3.6rem; min-height: 2.8rem; }
.handy .tempo-knopf { left: auto; right: calc(0.7rem + env(safe-area-inset-right, 0px)); bottom: calc(14.5rem + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 700px) { .tempo-knopf { bottom: calc(3.8rem + env(safe-area-inset-bottom, 0px)); } .handy .tempo-knopf { bottom: calc(14.5rem + env(safe-area-inset-bottom, 0px)); } }

/* ---------- Einbettung im Ultra-Planer (?einbettung=planer, docs/welt-einbettung.md) ----------
   Der Planer zeigt Leiste, Anzeigen, Minikarte und Höhenprofil selbst – hier bleiben nur das Bild, Hinweise, POI-Infokarten,
   die Hilfe und das Heimtrainer-Fenster (Bluetooth braucht den Klick im eigenen Rahmen). Schrift wie der Planer. */
.einbettung body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.einbettung #kartenAnsicht, .einbettung .hud.oben, .einbettung #werte, .einbettung #uhrAnzeige, .einbettung #radRegler,
.einbettung #flugRegler, .einbettung #profil, .einbettung #sprungLeiste, .einbettung #routeLegende, .einbettung #flugKnoepfe,
.einbettung .feedback-knopf, .einbettung .tempo-knopf, .einbettung .tv-knopf, .einbettung .standort-knopf, .einbettung #poiKnopf,
.einbettung .grafik-werte, .einbettung .tv-hinweis { display: none !important; }
.einbettung .quellen { font-size: 10px; opacity: 0.75; }
.einbettung .laden { top: auto; bottom: 34px; }
/* Farben des Planers (hell/dunkel; ?thema=… bzw. Nachricht „thema“ folgt dem Planer, sonst das System) */
:root.einbettung { --grund: #eeeeea; --flaeche: #fcfcfb; --text: #111110; --leise: #8a8882; --akzent: #2a78d6; --rand: #dddcd4; --hud: rgba(252, 252, 251, 0.9); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
@media (prefers-color-scheme: dark) { :root.einbettung:not([data-thema="hell"]) { --grund: #0c0c0c; --flaeche: #181817; --text: #f0efec; --leise: #8f8e86; --akzent: #3987e5; --rand: #2e2e2b; --hud: rgba(24, 24, 23, 0.9); color-scheme: dark; } }
:root.einbettung[data-thema="dunkel"] { --grund: #0c0c0c; --flaeche: #181817; --text: #f0efec; --leise: #8f8e86; --akzent: #3987e5; --rand: #2e2e2b; --hud: rgba(24, 24, 23, 0.9); color-scheme: dark; }
:root.einbettung[data-thema="hell"] { color-scheme: light; }

/* Suche, Zoom und Schließen der Sprung-Karte (web/sprung-karte.js) */
.sprung-suche { position: absolute; left: 12px; top: 12px; right: 190px; max-width: 28rem; z-index: 3; }
.sprung-suche input { width: 100%; box-sizing: border-box; padding: 0.5em 0.7em; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); font: inherit; }
.sprung-suche ul { list-style: none; margin: 0.2rem 0 0; padding: 0; background: var(--grund); border: 1px solid var(--rand); border-radius: 8px; max-height: 40vh; overflow: auto; }
.sprung-suche li { padding: 0.4em 0.7em; cursor: pointer; }
.sprung-suche li.an, .sprung-suche li:hover { background: var(--akzent); color: #fff; }
.sprung-suche .leise { opacity: 0.7; font-size: 0.85em; }
.sprung-zoom { position: absolute; right: 12px; top: 12px; z-index: 3; display: flex; gap: 0.3rem; }
.sprung-zoom .knopf { font-size: 1.1rem; padding: 0.3em 0.6em; background: var(--hud); }

/* ---------- Ansicht Gelände im Ultra-Planer (?einbettung=planer&modus=gelaende, web/welt-gelaende.js) ----------
   Nur das Bild, der Ladehinweis und der Lawinen-Kasten (Legende Hangneigung, EAWS-Stufe, Kompass, Pflichthinweis). Die Leiste zeichnet
   der Planer. Fadenkreuz in der Bildmitte mit laufender Hang-Info (web/hang-lauf.js zielLaufend), POI-Infokarten und Hilfe bleiben aus. */
.gelaende #buehne canvas { cursor: grab; }
.gelaende #buehne canvas:active { cursor: grabbing; }
.gelaende .modi, .gelaende #pause, .gelaende #hilfe, .gelaende .hilfe-fenster { display: none !important; }
.einbettung .lawinen-kasten { bottom: 34px; left: 10px; } /* über dem Pflichthinweis des Planers */
.gelaende .lawinen-kasten { max-height: calc(100vh - 24px); overflow: auto; }
.gelaende #wasIstHier, .gelaende #poiKnopf, .gelaende .poi-spalte { display: none !important; }
.einbettung .lawinen-kasten { top: auto; max-height: calc(100% - 24px); overflow: auto; }
/* eingebettet: „Was ist hier?“ und „Radwege hervorheben“ aus – sie lagen über den Anzeigen des Planers */
.einbettung #wasIstHier, .einbettung .rad-schalter { display: none !important; }

/* ---------- Infofenster als Seitenleiste (Feedback 17.11.2026: „das Fenster ist mitten im Bild und man kann fast nichts erkennen“) ----------
   Hilfe, Steuerung, POI-Karte der Route, Infokarten: schmal rechts unter der Kopfleiste, halbtransparent; am Handy unten, höchstens
   halbe Höhe. Die Szene bleibt frei und steuerbar; Esc, Knopf ✕ oder Klick neben das Fenster schließt (web/seitenfenster.js). */
.hilfe.hilfe-neu, .steuerung, .poi-karte {
  position: fixed; z-index: 10; left: auto; right: calc(0.8rem + env(safe-area-inset-right, 0px)); bottom: auto; transform: none;
  top: calc(var(--kopf-u, calc(3.6rem + env(safe-area-inset-top, 0px))) + 0rem);
  width: min(26rem, calc(100% - 1.6rem)); min-width: 0; max-width: calc(100% - 1.6rem); max-height: calc(100% - var(--kopf-u, 3.6rem) - 3rem);
  background: color-mix(in srgb, var(--flaeche) 86%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hilfe.hilfe-neu { overflow: hidden; --karte: color-mix(in srgb, var(--grund) 70%, transparent); }
.hilfe-neu .hilfe-gruppen { grid-template-columns: 1fr; }
.hilfe-neu .hilfe-fuss { padding: 0.5rem 0.8rem calc(0.5rem + env(safe-area-inset-bottom, 0px)); }
.steuerung { overflow: auto; }
.laden { top: auto; bottom: calc(6.4rem + env(safe-area-inset-bottom, 0px)); } /* kleiner Ladehinweis unten statt mitten im Bild */
@media (max-width: 700px), (pointer: coarse) and (max-height: 520px) {
  .hilfe.hilfe-neu, .steuerung, .poi-karte {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: 100%; max-height: 50vh; max-height: 50dvh; border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}
/* #76 (Handy, Wien Hbf): Abfahrtstafel, Zug-, Gleis- und Signalkarte lagen breit und hoch mitten im Bild – am Handy als niedriges
   Blatt am unteren Rand (höchstens gut ein Drittel der Höhe, scrollbar, halbtransparent); die Mitte bleibt frei */
@media (max-width: 700px), (pointer: coarse) and (max-height: 520px) {
  .zug-karte, .zug-karte.abfahrtstafel {
    left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; max-height: 34vh; max-height: 34dvh; overflow: auto; border-radius: 16px 16px 0 0;
    padding-bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--flaeche, #fff) 88%, transparent);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  }
}
@media (prefers-color-scheme: dark) { .hilfe.hilfe-neu { --karte: color-mix(in srgb, #2d2b26 70%, transparent); } }
/* POI-Infokarte und Orte-Karte (schon rechts): ebenfalls halbtransparent, am Handy höchstens halbe Höhe */
.hud.poi-info, .hud.orte-karte, .hud.orte-liste { background: color-mix(in srgb, var(--flaeche) 88%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hud.poi-info .poi-info-kopf, .hud.orte-karte .orte-karte-kopf { background: color-mix(in srgb, var(--flaeche) 94%, transparent); }
@media (max-width: 700px), (pointer: coarse) and (max-height: 520px) { .hud.poi-info, .hud.orte-karte, .hud.orte-liste { max-height: 50vh; max-height: 50dvh; } }

/* Kompass-Rose der 3D-Welt (web/welt-kompass.js): am rechten Rand unter der Kopfleiste, gleiche Größe und Optik wie die Rose der 3D-Karte im Planer */
.kompass-welt { position: absolute; z-index: 5; right: 0.8rem; top: calc(3.6rem + env(safe-area-inset-top, 0px)); width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--linie, #8886); background: var(--hud, rgba(20, 24, 30, 0.72)); color: var(--text, #eee); padding: 2px; cursor: pointer; box-shadow: 0 1px 5px #0005; }
.kompass-welt svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.kompass-welt:hover, .kompass-welt:focus-visible { border-color: var(--akzent, #4aa3ff); outline: none; }
html.handy .kompass-welt, .kompass-welt:is(:root.handy *) { width: 34px; height: 34px; }
@media (max-width: 600px) { .kompass-welt { width: 34px; height: 34px; right: calc(0.5rem + env(safe-area-inset-right, 0px)); top: calc(3.9rem + env(safe-area-inset-top, 0px)); } }
