:root {
  /* Taktische Einsatzkarte: dunkler Schiefer, Papierweiß für Text, Signal-Amber für Auswahl und Routen.
     Layout: oben Map-Wahl, links Karte in voller Höhe, rechts Seitenleiste mit Suche und Details. */
  --bg: #12171b;
  --panel: #1a2127;
  --line: #2d3740;
  --ink: #e8e4d8;
  --muted: #9ba5a1;
  --accent: #f2a541;
  --danger: #e5584f;
  --ok: #7cc49a;
  /* Keine Webfonts: die App lädt nichts aus dem Netz. Sind Barlow/Plex installiert, werden sie genutzt. */
  --font-display: "Barlow Condensed", "Bahnschrift", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app { display: grid; gap: 12px; padding: 12px; }
.top { display: grid; gap: 10px; }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 5vw, 1.65rem); letter-spacing: .02em; margin: 0; text-transform: uppercase; line-height: 1.1; white-space: nowrap; }
.badge { font-family: var(--font-mono); font-size: .72rem; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 0 5px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.chip { flex: none; display: grid; text-align: left; line-height: 1.15; font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: .03em; text-transform: uppercase; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 5px 11px; border-radius: 8px; cursor: pointer; }
.chip small { font-family: var(--font-mono); font-weight: 400; font-size: .68rem; text-transform: none; letter-spacing: 0; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent); color: #1b1305; border-color: var(--accent); }
.chip[aria-pressed="true"] small { color: #3d2a08; }

.main { display: grid; gap: 12px; }
.mapbox { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #1b221f; }
#map { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1.05; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
#map.dragging { cursor: grabbing; }
.zoomctl { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; }
.zoomctl button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: rgba(18,23,27,.92); color: var(--ink); font-size: 1.2rem; cursor: pointer; font-family: var(--font-mono); }
.ovl { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: calc(100% - 70px); }
.compass { font-family: var(--font-display); font-weight: 700; font-size: .95rem; background: rgba(18,23,27,.92); border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; }
.layers { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 5px 10px; background: rgba(18,23,27,.92); border: 1px solid var(--line); border-radius: 8px; font-size: .82rem; }
.layers label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.layers input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.legend { position: absolute; right: 10px; bottom: 10px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; padding: 5px 10px; background: rgba(18,23,27,.92); border: 1px solid var(--line); border-radius: 8px; font-size: .78rem; color: var(--muted); max-width: calc(100% - 20px); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { display: inline-block; width: 11px; height: 11px; }
.nomap { position: absolute; left: 50%; bottom: 54px; transform: translateX(-50%); background: rgba(18,23,27,.92); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: .85rem; color: var(--muted); }
.nomap[hidden] { display: none; }
.infocard { position: absolute; left: 10px; bottom: 10px; width: min(380px, calc(100% - 20px)); background: rgba(26,33,39,.97); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 34px 10px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.infocard[hidden] { display: none; }
.infocard h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.infocard p { margin: 4px 0 0; font-size: .9rem; }
.infocard .x { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.infocard .go { margin-top: 6px; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; font-size: .88rem; }

.side { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.datastamp { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; cursor: pointer; white-space: nowrap; }
.datastamp:hover { color: var(--ink); border-color: var(--muted); }
.datastamp:disabled { cursor: progress; color: var(--accent); }
.xref { display: flex; flex-wrap: wrap; gap: 6px; }
.xchip { font-size: .82rem; background: #222b32; border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; }
.xchip small { color: var(--muted); }
.popts label.psel { justify-content: space-between; cursor: default; }
.psel select { font: inherit; font-size: .86rem; color: var(--ink); background: #11171b; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; }

/* ---------- Querverweise ---------- */
button.xchip { font: inherit; font-size: .82rem; color: var(--ink); cursor: pointer; }
button.xchip:hover { border-color: var(--accent); }
.xchip.own { border-color: #3d6b50; color: var(--ok); }
.xdlg { width: min(560px, calc(100vw - 24px)); max-height: min(80vh, 720px); overflow: auto; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 10px; padding: 14px 16px; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.xdlg::backdrop { background: rgba(8,11,13,.6); }
.xhead { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin: 0; }
.xdlg h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .03em; margin: 0; line-height: 1.15; }
.xdlg h3 { font-family: var(--font-display); font-weight: 600; font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 4px; }
.xdlg .x { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.xdlg .x:hover { background: #2b3640; color: var(--ink); }
ul.xlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
ul.xlist li { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; font-size: .9rem; }
ul.xlist li.xdone .xq { color: var(--muted); text-decoration: line-through; }
.xq, .xl, .xh { font: inherit; background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: #4a5560; }
.xl { font-size: .86rem; color: var(--accent); }
.xq:hover, .xl:hover { text-decoration-color: var(--accent); }
.pack { display: grid; gap: 6px; margin-top: 4px; }
.pack > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: .86rem; }
.pack .plab { flex: none; width: 5.6em; color: var(--muted); font-size: .8rem; }
.pkey { color: #efe3a5; font-size: .8rem; }

/* ---------- Routen-Panel ---------- */
.ptask.must { border-color: var(--accent); }
.ptop { flex-wrap: wrap; row-gap: 2px; }
.pmust { font: inherit; font-size: .72rem; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; cursor: pointer; }
.pmust[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #1b1305; font-weight: 600; }
.qfull, .qpart { font-family: var(--font-display); font-weight: 700; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; padding: 0 4px; border-radius: 3px; }
.qfull { background: #223a2c; color: var(--ok); }
.qpart { background: #3d3220; color: var(--accent); }
.pskip { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 4px; }
.pback { font: inherit; font-size: .78rem; background: transparent; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: 0 7px; cursor: pointer; }
.pback:hover { color: var(--ink); border-color: var(--muted); }
.pbud { display: inline-flex; align-items: center; gap: 5px; font-size: .86rem; white-space: nowrap; }
.pbud input { width: 4em; font: inherit; font-size: .86rem; color: var(--ink); background: #11171b; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; }
details.pdt { margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; }
details.pdt > summary { cursor: pointer; font-size: .88rem; color: var(--ink); }
details.pdt[open] > summary { margin-bottom: 4px; }
details.pdt .popts { margin-top: 4px; }
.rtabs { display: grid; gap: 4px; margin: 6px 0 4px; }
.rtabs button { display: grid; text-align: left; font: inherit; color: var(--ink); background: #11171b; border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; cursor: pointer; }
.rtabs button b { font-family: var(--font-display); font-weight: 700; font-size: .98rem; letter-spacing: .03em; text-transform: uppercase; }
.rtabs button small { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.rtabs button[aria-selected="true"] { border-color: var(--accent); background: #2a2418; box-shadow: inset 3px 0 0 var(--accent); }
.rq { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.rq .xchip { display: inline-flex; align-items: center; gap: 4px; }
table.ntab { width: 100%; border-collapse: collapse; font-size: .84rem; font-variant-numeric: tabular-nums; }
.ntab th { text-align: left; font-weight: 500; color: var(--muted); padding: 2px 4px; }
.ntab td { padding: 2px 4px; border-top: 1px solid var(--line); }
.ntab tr.cur td { color: var(--accent); font-weight: 600; }
.pn { font: inherit; font-size: .78rem; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* ---------- Etagen ---------- */
/* Nur die Grundebene ist immer sichtbar; die gewählte Etage (.on) liegt darüber, die Grundebene tritt zurück. */
.mapart g[data-layer]:not([data-layer=""]) { display: none; }
.mapart g[data-layer]:not([data-layer=""]).on { display: inline; }
.mapart[data-floor]:not([data-floor=""]) g[data-layer=""] { opacity: .28; }
.mk.offfloor { opacity: .2; }
.mk.lbl.offfloor { opacity: .6; }
.floorctl { position: absolute; right: 10px; top: 142px; display: grid; gap: 3px; padding: 4px; background: rgba(18,23,27,.92); border: 1px solid var(--line); border-radius: 8px; }
.floorctl[hidden] { display: none; }
.floorctl button { font-family: var(--font-display); font-weight: 600; font-size: .9rem; letter-spacing: .03em; text-transform: uppercase; text-align: left; background: transparent; color: var(--muted); border: 0; border-radius: 5px; padding: 2px 9px; cursor: pointer; white-space: nowrap; }
.floorctl button:hover { color: var(--ink); background: #222b32; }
.floorctl button[aria-pressed="true"] { background: var(--accent); color: #1b1305; }
.infocard .flgo { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; font: inherit; }
/* Ortsnamen und Schlüsseltüren */
.lbl { pointer-events: none; }
#ov.far .lbl.minor { display: none; }
.lock circle { fill: #efe3a5; stroke: #0d1215; stroke-width: 1.3; }
.lock path { fill: #0d1215; }
.lock { cursor: pointer; }
@media (max-width: 899px) { .floorctl { position: static; display: flex; flex-wrap: wrap; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--panel); } }

/* ---------- Ausgewählte Aufträge: eigene Ebene, immer sichtbar ---------- */
.tdot.pin circle.ring { fill: rgba(242,165,65,.2); stroke: var(--accent); stroke-width: 2.5; }

/* ---------- Startseite ---------- */
.brand h1 button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.chips[hidden], .home[hidden] { display: none; }
.home { padding: 12px; }
.hwrap { display: grid; gap: 22px; max-width: 1500px; margin: 0 auto; }
.home h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.acard { display: grid; gap: 4px; text-align: left; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.acard b { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .03em; }
.acard span { font-size: .9rem; color: var(--muted); }
.acard small { font-family: var(--font-mono); font-size: .76rem; color: var(--accent); }
.acard:hover:not(:disabled) { border-color: var(--accent); background: #1f272d; }
.acard.soon { border-left-color: var(--line); cursor: default; opacity: .6; }
.acard.soon small { color: var(--muted); }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.mcard { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0 0 8px; overflow: hidden; cursor: pointer; }
.mcard:hover { border-color: var(--accent); }
.mcard.hot { border-color: #7a5a22; box-shadow: inset 0 -3px 0 var(--accent); }
.mthumb { display: block; width: 100%; aspect-ratio: 16 / 10; background: #1b221f; pointer-events: none; }
.mthumb.none { display: grid; place-items: center; font-family: var(--font-mono); font-size: .75rem; color: #56615c; background: repeating-linear-gradient(0deg, #1b221f 0 11px, #232c28 11px 12px), #1b221f; }
.mname { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; padding: 6px 10px 0; }
.mcard small { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); padding: 0 10px; }
.mcard.hot small { color: var(--accent); }
@media (min-width: 900px) { .home { overflow: auto; min-height: 0; padding: 18px; } }

/* ---------- Ansicht „Meine Quests" ---------- */
.main[hidden], .quests[hidden] { display: none; }
.views { margin-left: 6px; align-self: center; }
.seg.views button { font-family: var(--font-display); font-weight: 600; font-size: .95rem; letter-spacing: .03em; text-transform: uppercase; padding: 4px 12px; white-space: nowrap; }
.seg.views button[aria-pressed="true"] { background: var(--accent); color: #1b1305; }
.brand { flex-wrap: wrap; row-gap: 6px; }
.quests { padding: 12px; }
.qbar { display: grid; gap: 8px; padding-bottom: 8px; background: var(--bg); position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); }
.qhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.qhead h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.qsum { font-size: .9rem; color: var(--muted); }
.qsum b { color: var(--accent); font-variant-numeric: tabular-nums; }
.qset { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; margin-left: auto; font-size: .85rem; color: var(--muted); }
.qset input, .qset select { font: inherit; font-size: .85rem; color: var(--ink); background: #11171b; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; }
.qset input { width: 4.2em; }
.qbar .filters > label { color: var(--muted); gap: 6px; cursor: default; }
.qgroup { margin-top: 14px; }
.qgh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px; padding-bottom: 4px; border-bottom: 2px solid var(--accent); }
.qgh small { font-family: var(--font-mono); font-weight: 400; font-size: .74rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
.qgall { margin-left: auto; font: inherit; font-family: var(--font-body); font-size: .8rem; font-weight: 400; letter-spacing: 0; text-transform: none; background: transparent; color: var(--accent); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; cursor: pointer; }
.qgall:hover { border-color: var(--accent); }
.qsh { font-family: var(--font-display); font-weight: 600; font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 4px; }
.qsh small { font-family: var(--font-mono); font-weight: 400; font-size: .72rem; }
ul.qgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 4px 10px; }
.qrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: start; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.qrow:hover { background: #1d252b; border-color: var(--line); }
.qrow.st-active { background: #2a2418; border-color: #5a4520; box-shadow: inset 3px 0 0 var(--accent); }
.qrow.st-done .qn { text-decoration: line-through; color: var(--muted); }
.qrow.st-locked .qn { color: #a9b0ac; }
.qact { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: #11171b; color: var(--muted); font-size: 1.05rem; line-height: 1; cursor: pointer; }
.qact[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #1b1305; }
.qn { font-weight: 600; line-height: 1.3; }
.qde { font-weight: 400; font-size: .82rem; color: var(--muted); margin-left: 4px; }
.qkey { color: #efe3a5; }
.qwhy { color: var(--danger); }
.qdone { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; color: var(--muted); cursor: pointer; margin-top: 4px; }
.qdone input { width: 16px; height: 16px; margin: 0; accent-color: var(--ok); }
.qgo { width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 1rem; cursor: pointer; }
.qgo:hover { background: #2b3640; color: var(--ink); }
.qask { position: sticky; bottom: 10px; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px auto 0; width: fit-content; max-width: 100%; background: #1f272d; border: 1px solid var(--accent); border-radius: 10px; padding: 8px 14px; font-size: .92rem; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.qask[hidden] { display: none; }
.act { font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .05em; padding: 0 4px; border-radius: 3px; background: var(--accent); color: #1b1305; }
.pdet.star.on { background: var(--accent); }
/* Höhere Spezifität als die Grundregeln weiter unten, sonst gewinnen diese. */
#p_detail ol.objs li { grid-template-columns: 28px minmax(0,1fr) auto; }
#p_detail ol.objs li.odone > div { text-decoration: line-through; color: var(--muted); }
.ochk { width: 17px; height: 17px; margin: 5px 0 0; accent-color: var(--ok); cursor: pointer; }
@media (min-width: 900px) {
  .quests { overflow: auto; min-height: 0; padding: 0 18px 18px; }
  .qbar { padding-top: 12px; }
  .top { grid-template-columns: auto minmax(0, 1fr); }
}
/* ---------- Items ---------- */
.igrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 4px 12px; }
.irow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.irow.ok { opacity: .62; }
.fir { font-family: var(--font-display); font-weight: 700; font-size: .7rem; letter-spacing: .05em; padding: 0 4px; border-radius: 3px; background: #3d3220; color: var(--accent); }
.iqs { display: flex; flex-wrap: wrap; gap: 3px 6px; margin-top: 4px; }
.iq { font: inherit; font-size: .78rem; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 5px; padding: 0 4px; cursor: pointer; }
.iq:hover { border-color: var(--line); color: var(--ink); }
.iq.on { color: var(--ink); background: #2a2418; border-color: #5a4520; }
.icnt { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.icnt button { font: inherit; background: #11171b; color: var(--ink); border: 0; min-width: 28px; padding: 3px 6px; cursor: pointer; font-variant-numeric: tabular-nums; }
.icnt button:disabled { color: #4d5753; cursor: default; }
.icnt button:hover:not(:disabled) { background: #2b3640; }
.icnt .inum { min-width: 64px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); color: var(--muted); }
.icnt .inum b { color: var(--accent); }
.irow.ok .inum b { color: var(--ok); }
.iown { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.iown input { width: 16px; height: 16px; margin: 0; accent-color: var(--ok); }
@media (max-width: 520px) { .igrid { grid-template-columns: 1fr; } }
/* ---------- Wiki ---------- */
.imode { padding-top: 12px; align-items: center; }
.wgrid { display: grid; gap: 14px; margin-top: 10px; }
@media (min-width: 900px) { .wgrid { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); align-items: start; } .wdetail { position: sticky; top: 150px; max-height: calc(100vh - 230px); overflow: auto; } }
.wlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wlist li[data-id] { padding: 5px 8px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.wlist li[data-id]:hover { background: #1d252b; border-color: var(--line); }
.wlist li.on { background: #2a2418; border-color: #5a4520; box-shadow: inset 3px 0 0 var(--accent); }
.wneed { font-family: var(--font-display); font-weight: 700; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; padding: 0 4px; border-radius: 3px; background: #3d3220; color: var(--accent); }
.wdetail { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.whead { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.whead h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; margin: 0; }
.whead .donebox { margin-top: 0; white-space: nowrap; }
.wfacts { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 8px 0; font-size: .82rem; }
.wfacts span { padding: 0 6px; border-radius: 4px; background: #26313a; }
.wfacts .wneed { background: #3d3220; }
.wdesc { color: var(--muted); font-size: .9rem; margin: 6px 0 10px; max-width: 75ch; }
.wdetail h3 { font-family: var(--font-display); font-weight: 600; font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 4px; }
.wrows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wrows li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.wrows li.xdone .xq, .wrows li.xdone .xh { color: var(--muted); text-decoration: line-through; }
.wsrc { font-size: .82rem; color: var(--accent); min-width: 150px; }
.wflow { display: inline-flex; flex-wrap: wrap; gap: 3px 5px; align-items: center; }
.warr { color: var(--muted); }
.wl { cursor: pointer; font: inherit; font-size: .82rem; color: var(--ink); }
.wl:hover { border-color: var(--accent); }
.wprops { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 16px; margin: 0; font-size: .86rem; }
.wprops dt { color: var(--muted); float: left; margin-right: 6px; }
.wprops dt::after { content: ":"; }
.wprops dd { margin: 0; font-variant-numeric: tabular-nums; }
.wprops dt, .wprops dd { grid-column: auto; }
.wmaps { display: flex; flex-wrap: wrap; gap: 6px; }
.wmaps small { color: var(--accent); margin-left: 4px; }
.lootbar { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 3; font: inherit; font-size: .85rem; background: #7fd0c0; color: #0d1b18; border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.lootbar[hidden] { display: none; }
.lootm path { fill: #7fd0c0; stroke: #0d1215; stroke-width: 2; }
.lootm { cursor: pointer; }
/* ---------- Seitenleiste einklappen ---------- */
.main.sidehide > .side { display: none; }
#sidetoggle { margin-top: 8px; }
.main.sidehide #sidetoggle { background: var(--accent); color: #1b1305; border-color: var(--accent); }
@media (min-width: 900px) { .app .main.sidehide { grid-template-columns: minmax(0, 1fr); } }
/* ---------- Loot-Stopps ---------- */
.pill.loot rect, .pill.loot circle { fill: #7fd0c0; }
ol.steps .num.loot { background: #7fd0c0; color: #0d1b18; }
.lootchips { display: flex; flex-wrap: wrap; gap: 3px 5px; margin: 2px 0; }
.ploot { max-height: 260px; overflow: auto; }
/* ---------- Versteck ---------- */
.hgrid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; align-items: start; }
.hcard { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--panel); }
.hcard.blocked { border-left-color: var(--line); }
.hcard.full { border-left-color: var(--ok); opacity: .6; }
.hhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hlv { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.hlv b { color: var(--accent); font-size: 1.1rem; }
.hlv button { font: inherit; width: 24px; height: 24px; margin-right: 6px; border: 1px solid var(--line); border-radius: 6px; background: #11171b; color: var(--ink); cursor: pointer; }
.hlv button:disabled { color: #4d5753; cursor: default; }
.hnext { font-family: var(--font-display); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hreqs { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.hreq { font-size: .78rem; padding: 0 6px; border-radius: 4px; background: #26313a; }
.hreq.ok { color: var(--ok); }
.hreq.no { color: var(--danger); }
.hitems { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.hitems li { display: flex; align-items: center; gap: 6px; }
.hitems li.ok .hcnt b { color: var(--ok); }
.hcnt { margin-left: auto; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hcnt b { color: var(--accent); }
.hcard .pbtn.small { justify-self: start; margin-top: 2px; }

/* Anmeldung und Profil */
.app[hidden], .login[hidden] { display: none; }
.account { margin-left: auto; display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--font-mono); font-size: .78rem; color: var(--muted); white-space: nowrap; }
.account #who { color: var(--ink); }
.login { min-height: 100vh; display: grid; place-content: center; padding: 24px; }
.lbox { width: min(340px, calc(100vw - 48px)); display: grid; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.lbox h1 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .02em; margin: 0; font-size: 1.6rem; }
.lbox .lsub { margin: -8px 0 4px; color: var(--accent); font-family: var(--font-mono); font-size: .8rem; }
.lbox label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.lbox input { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.lbox input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lbox .lgo { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; color: #12171b; background: var(--accent); border: 0; border-radius: 6px; padding: 9px; cursor: pointer; }
.lbox .lgo:disabled { opacity: .6; cursor: progress; }
.lbox .lswitch { font: inherit; font-size: .85rem; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; justify-self: start; }
.lbox .lswitch:hover { color: var(--ink); }
.lbox .lerr { margin: 0; color: var(--danger); font-size: .88rem; }
.lbox .lnote { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.pwdlg { padding: 0; border: 0; background: transparent; color: var(--ink); }
.pwdlg::backdrop { background: rgba(0, 0, 0, .6); }
.banner { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 10; max-width: min(640px, calc(100% - 24px)); background: #2a1a18; border: 1px solid var(--danger); border-radius: 8px; padding: 8px 14px; font-size: .9rem; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.banner[hidden] { display: none; }
.fatal { display: grid; place-content: center; gap: 8px; min-height: 100vh; padding: 24px; text-align: center; }
.fatal[hidden] { display: none; }
.fatal h1 { font-family: var(--font-display); text-transform: uppercase; margin: 0; }
.fatal code { font-family: var(--font-mono); font-size: .85rem; color: var(--muted); }
.tabs button { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; background: transparent; color: var(--muted); border: 0; border-bottom: 3px solid transparent; padding: 10px 8px 7px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.panel { padding: 12px 14px; overflow: auto; min-height: 0; }
.panel[hidden] { display: none; }
.panel h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .03em; margin: 0 0 2px; text-wrap: balance; line-height: 1.15; }
.panel h3 { font-family: var(--font-display); font-weight: 600; font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 4px; }
#p_tasks { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 8px; overflow: hidden; }
#p_tasks[hidden] { display: none; }
.search { position: relative; }
.search input { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #11171b; border: 1px solid var(--line); border-radius: 8px; padding: 9px 34px 9px 12px; }
.search input::placeholder { color: #6f7975; }
.search input:focus { border-color: var(--accent); outline: none; }
.search button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.filters { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .85rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: 0; color: var(--muted); padding: 4px 10px; cursor: pointer; font-size: .85rem; }
.seg button[aria-pressed="true"] { background: #2b3640; color: var(--ink); }
.filters select { font: inherit; font-size: .85rem; color: var(--ink); background: #11171b; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; }
.filters label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.filters input { accent-color: var(--accent); margin: 0; }
.count { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); }
ul.tlist { list-style: none; margin: 0 -6px; padding: 0; overflow: auto; min-height: 0; }
.trow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 7px 6px; border-radius: 8px; cursor: pointer; }
.trow:hover, .trow:focus-visible { background: #222b32; outline: none; }
.trow.sel { background: #2a2418; box-shadow: inset 3px 0 0 var(--accent); }
.trow input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--ok); }
.trow .tn { font-weight: 600; line-height: 1.3; }
.trow.done .tn { text-decoration: line-through; color: var(--muted); }
.tsub { display: flex; flex-wrap: wrap; gap: 3px 8px; align-items: center; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.mt { font-family: var(--font-mono); font-size: .7rem; padding: 0 4px; border-radius: 3px; background: #26313a; color: var(--ink); }
.mt.cur { background: #3d3220; color: var(--accent); }
.kb { font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .05em; padding: 0 4px; border-radius: 3px; background: #3b2f4d; color: #d9c2f5; }
.kb.lk { background: #3d3a28; color: #efe3a5; }
.meta { color: var(--muted); font-size: .88rem; }
.mono { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.back { background: none; border: 0; color: var(--accent); padding: 0; cursor: pointer; font-size: .9rem; margin-bottom: 8px; }
.dhead { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 4px; font-size: .88rem; color: var(--muted); }
.donebox { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; cursor: pointer; font-weight: 600; }
.donebox input { width: 18px; height: 18px; accent-color: var(--ok); }
ol.objs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
ol.objs li { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 10px; padding: 7px 6px; border-radius: 8px; }
ol.objs li.has { cursor: pointer; }
ol.objs li.has:hover { background: #222b32; }
.num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #1b1305; font-family: var(--font-display); font-weight: 700; display: grid; place-items: center; font-size: .95rem; }
.num.off { background: transparent; border: 2px solid #4a5560; color: var(--muted); }
.num.ex { background: var(--ok); }
.num.opt { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.osub { color: var(--muted); font-size: .82rem; }
.reqs { display: flex; flex-wrap: wrap; gap: 6px; }
.reqs button { background: #222b32; border: 1px solid var(--line); color: var(--ink); border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: .84rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-family: var(--font-display); font-weight: 600; font-size: .9rem; letter-spacing: .03em; padding: 1px 8px; border-radius: 4px; background: var(--accent); color: #1b1305; }
ol.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
ol.steps li { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
ol.steps li:hover, ol.steps li:focus-visible { background: #222b32; outline: none; }
.steps b { font-weight: 600; }
.steps .sub { color: var(--muted); font-size: .86rem; }
.note { border-left: 3px solid var(--accent); padding: 4px 10px; font-size: .9rem; margin-top: 10px; background: #1f272d; border-radius: 0 6px 6px 0; }
.note.warn { border-left-color: var(--danger); }
.rchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.rchips .chip { font-size: .95rem; padding: 4px 10px; }
.credit { color: var(--muted); font-size: .76rem; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 10px; }
.credit p { margin: 4px 0; }

/* Kartengrundlage, umgefärbt */
.mapart .land { fill: #27322c; } .mapart .trees { fill: #1e2a23; } .mapart .water { fill: #213a4b; } .mapart .rock { fill: #45453b; }
.mapart .cement { fill: #474b4a; } .mapart .wood { fill: #4a3a26; } .mapart .building { fill: #0b0f12; } .mapart .tarmac { fill: #50575b; }
.mapart .gravel { fill: #5f5038; } .mapart .floor { fill: #4f565d; } .mapart .locked { fill: #2a3138; } .mapart .structure { fill: #3b4044; }
.mapart .misc { fill: #555b5e; } .mapart .plane { fill: #2b3530; } .mapart .chopper { fill: #000; } .mapart .stairs { fill: #b89a2a; } .mapart .task { fill: #000; }
.mapart .road_tarmac { fill: none; stroke: #5d6461; } .mapart .road_gravel { fill: none; stroke: #5f5038; }
.mapart .road_small { stroke-width: 5; } .mapart .road_medium { stroke-width: 8; } .mapart .road_large { stroke-width: 12; }
.mapart .fence { fill: none; stroke: #4b5a51; stroke-width: .8; } .mapart .railroad { fill: none; stroke: #7d4d3c; stroke-dasharray: 6; stroke-width: 3; }
.mapart .powerline { fill: none; stroke: #8a7a3a; stroke-width: 2; stroke-dasharray: 6 6; opacity: .35; }
.mapart .map_border { fill: none; stroke: #000; stroke-width: 2; } .mapart .wall { fill: none; stroke: #0b0f12; stroke-width: .3; }
.mapart .danger { fill: #e5584f; fill-opacity: .18; stroke: #e5584f; stroke-opacity: .6; stroke-dasharray: 4 2; stroke-width: 2; }
.mapart .danger_small { fill: #e5584f; fill-opacity: .18; stroke: #e5584f; stroke-opacity: .6; stroke-dasharray: 2 1; stroke-width: 1; }
.mapart .grid { stroke: #2f3a36; stroke-width: .3; }
.mapart[data-map="the-lab"] path:not([style]):not([class]) { fill: #343c43; }
.mapart[data-map="the-lab"] g > path[style*="#404040"] { fill: #4a525a !important; }

/* Overlays */
.lbl text { font-family: var(--font-display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; fill: #d9d4c4; paint-order: stroke; stroke: #0d1215; stroke-width: 3.5px; stroke-linejoin: round; }
.tdot circle { stroke: #0d1215; stroke-width: 1.5; }
.tdot { cursor: pointer; }
.tdot.dim { opacity: .25; }
.pill rect { fill: var(--accent); stroke: #0d1215; stroke-width: 1.5; }
.pill text { font-family: var(--font-display); font-weight: 700; font-size: 13px; fill: #1b1305; letter-spacing: .03em; }
.pill circle { fill: var(--accent); stroke: #0d1215; stroke-width: 1.5; }
.pill.pl rect, .pill.pl circle { fill: #f6d78f; }
.pill.done rect, .pill.done circle { fill: #6b7570; }
.pill { cursor: pointer; }
.szone { fill: rgba(242,165,65,.12); stroke: var(--accent); stroke-width: 2; stroke-dasharray: 8 5; vector-effect: non-scaling-stroke; }
.ex path { fill: var(--ok); stroke: #0d1215; stroke-width: 1.5; }
.ex.cond path:first-child { fill: #c9b45a; }
.ex.shared path:first-child { fill: #6fc0c9; }
.ex.transit path:first-child { fill: #8fb3e0; }
.ex text { font-family: var(--font-display); font-weight: 600; font-size: 11.5px; fill: #e8e4d8; paint-order: stroke; stroke: #0d1215; stroke-width: 3px; letter-spacing: .02em; }
.ex.transit text { display: none; }
.ex, .boss, .hz, .spawn { cursor: pointer; }
.hz path { fill: none; stroke: var(--danger); stroke-width: 2; }
.hz circle { fill: rgba(229,88,79,.25); stroke: var(--danger); stroke-width: 1.2; }
.boss path { fill: #b58ad8; stroke: #0d1215; stroke-width: 1.5; }
.spawn path { fill: #8fa39a; stroke: #0d1215; stroke-width: 1.2; }
.spawn.hot path { fill: var(--accent); }
.zone { fill: rgba(242,165,65,.07); stroke: var(--accent); stroke-opacity: .55; stroke-dasharray: 10 6; stroke-width: 2; vector-effect: non-scaling-stroke; }
.zone.hot { fill: rgba(242,165,65,.16); stroke-opacity: 1; }
.rcase { fill: none; stroke: #0d1215; stroke-width: 7; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rline { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 10 7; vector-effect: non-scaling-stroke; animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -17; } }
@media (prefers-reduced-motion: reduce) { .rline { animation: none; } }
.hidden { display: none; }
.spawn text { display: none; font-family: var(--font-display); font-weight: 700; font-size: 11px; fill: #e8e4d8; paint-order: stroke; stroke: #0d1215; stroke-width: 3px; }
body.planning .spawn text { display: inline; }
body.planning #g_sp.hidden { display: inline; }
.spawn.pick path { fill: var(--accent); transform: scale(1.5); }
.pstart circle { fill: var(--ok); stroke: #0d1215; stroke-width: 2; }
.pstart text { font-family: var(--font-display); font-weight: 700; font-size: 13px; fill: #0d1215; }
.pend circle { fill: none; stroke: var(--ok); stroke-width: 3; }
.ptask { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; margin-bottom: 6px; }
.ptop { display: flex; align-items: center; gap: 4px; }
.ptop b { flex: 1; font-weight: 600; }
.pdel { border: 0; background: transparent; color: var(--muted); font-size: 1.15rem; cursor: pointer; width: 26px; height: 26px; border-radius: 6px; }
.pdel:hover { background: #2b3640; color: var(--ink); }
.pobj { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; align-items: start; font-size: .84rem; color: var(--ink); margin-top: 4px; cursor: pointer; }
.pobj input { margin-top: 3px; accent-color: var(--accent); }
.pbtn { display: block; width: 100%; margin-top: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; background: var(--accent); color: #1b1305; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.pbtn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.pbtn.small { width: auto; margin: 0; padding: 5px 10px; font-size: .85rem; background: #2b3640; color: var(--ink); }
.prow { display: flex; gap: 6px; align-items: center; }
.prow select { flex: 1; min-width: 0; font: inherit; font-size: .88rem; color: var(--ink); background: #11171b; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.popts { display: grid; gap: 4px; margin-top: 10px; font-size: .86rem; }
.popts label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.popts input { accent-color: var(--accent); margin: 0; }
.pstatus { font-family: var(--font-mono); font-size: .78rem; color: var(--accent); margin-top: 8px; min-height: 1em; }
.psum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.psum div { background: #11171b; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; display: grid; }
.psum b { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.psum span { font-size: .74rem; color: var(--muted); }
ol.rank { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
ol.rank li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
ol.rank button { background: none; border: 0; color: var(--ink); padding: 0; cursor: pointer; text-align: left; font-size: .86rem; text-decoration: underline; text-decoration-color: #4a5560; }
ol.rank button.on { color: var(--accent); font-weight: 600; }
ul.side { margin: 4px 0 0; padding-left: 18px; font-size: .86rem; }
ul.side li { margin-bottom: 4px; }
.padd { flex: none; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: #11171b; color: var(--accent); font-size: 1.05rem; line-height: 1; cursor: pointer; margin-top: 1px; }
.padd.on { background: var(--accent); color: #1b1305; border-color: var(--accent); }
.trow { grid-template-columns: auto minmax(0, 1fr) auto; }
.pdet { display: inline-flex; margin: 10px 0 0 10px; font-size: .85rem; background: #2b3640; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.pdet.on { background: var(--accent); color: #1b1305; border-color: var(--accent); }

@media (max-width: 899px) {
  .ovl { position: static; max-width: none; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--panel); }
  .ovl .compass { display: none; }
  .ovl .layers { background: transparent; border: 0; padding: 0; }
  .legend { position: static; justify-content: flex-start; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--panel); max-width: none; }
  .infocard { position: static; width: auto; margin: 8px; }
  .nomap { position: static; transform: none; margin: 8px; }
  .side { max-height: 80vh; }
}
/* Breitbild (16:9): App füllt den Bildschirm, nur die Seitenleiste scrollt */
@media (min-width: 900px) {
  html, body { height: 100%; overflow: hidden; }
  .app { height: 100%; padding: 0; gap: 0; grid-template-rows: auto minmax(0, 1fr); }
  .top { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px; padding: 9px 16px; border-bottom: 1px solid var(--line); }
  .main { grid-template-columns: minmax(0, 1fr) clamp(350px, 27vw, 440px); gap: 0; min-height: 0; }
  .mapbox { border: 0; border-radius: 0; min-height: 0; }
  #map { height: 100%; aspect-ratio: auto; }
  .side { border: 0; border-left: 1px solid var(--line); border-radius: 0; min-height: 0; }
}
