/* MINIMAL MINE - Seite: schwarz/weiss, Versalien, scharfe Kanten, Rahmen 4 px, Geisterknoepfe 2 px (wie die anderen
   Minimal-Spiele). Signalfarben mit fester Bedeutung: Wasser, Luft, Material, Auswahl/Planung, Stoerung.
   Alles Bedienbare wird einmal angelegt und nur in Zustand und Inhalt geaendert (keine Neubauten im Takt). */
:root { --wasser: #2e8bff; --luft: #bdf4ff; --material: #ff8a1f; --planung: #ffd60a; --stoerung: #ff3d5a; --stein: #e8e2d0;
	--grund: #0b0d12; --feld: rgba(11, 13, 18, 0.82); }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; background: var(--grund); color: #fff;
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	touch-action: none; overscroll-behavior: none; -webkit-user-select: none; user-select: none;
	-webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
#buehne { position: fixed; inset: 0; overflow: hidden; --u: max(10px, min(1.05vw, 1.9vh)); }
#spiel { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; cursor: grab; }
#spiel.zieht { cursor: grabbing; }
#spiel.zeigt { cursor: pointer; }
#schleier { position: absolute; inset: 0; background: var(--grund); opacity: 0; pointer-events: none; transition: opacity 0.6s; }
#schleier.an { opacity: 1; }
.weg { display: none !important; }
.text { font-size: var(--u); letter-spacing: 0.14em; font-weight: 600; text-transform: uppercase; }
.klein { font-size: calc(var(--u) * 0.8); }
.satz { font-size: calc(var(--u) * 1.0); line-height: 1.5; letter-spacing: 0.01em; font-weight: 400; margin: 0; }
.satz.klein { font-size: calc(var(--u) * 0.86); }
.satz.gross { font-size: calc(var(--u) * 1.5); font-weight: 600; }

/* Name und Hinweis "spielbare Vorschau" bleiben sichtbar */
#spielName { position: absolute; left: calc(var(--u) * 1.6); top: calc(var(--u) * 1.2); display: grid; gap: calc(var(--u) * 0.25); pointer-events: none;
	padding-top: env(safe-area-inset-top); }
#spielName b { font-size: calc(var(--u) * 1.35); letter-spacing: 0.2em; }
#spielName span { opacity: 0.6; }
#spielName.aus b { opacity: 0.9; }
body.museum #spielName span::after { content: ''; }
#ton { position: absolute; right: calc(var(--u) * 1.2); bottom: calc(var(--u) * 1.2); opacity: 0.55; border-color: rgba(255, 255, 255, 0.4); z-index: 3; }
#ton.aus { text-decoration: line-through; }


/* Knoepfe */
button, .knopf { font-family: inherit; color: #fff; background: none; border: 2px solid #fff; border-radius: 0; cursor: pointer;
	padding: calc(var(--u) * 0.6) calc(var(--u) * 1.2); min-height: 44px; touch-action: manipulation; text-decoration: none;
	display: inline-flex; align-items: center; justify-content: center; gap: 0.6em; box-sizing: border-box; }
button:hover, button:focus-visible, .knopf:hover { background: #fff; color: var(--grund); outline: none; }
button.gross, .knopf.gross { border-width: 4px; padding: calc(var(--u) * 0.8) calc(var(--u) * 2.2); font-size: calc(var(--u) * 1.15); }
button:disabled { opacity: 0.35; cursor: default; background: none; color: #fff; }
button.mini { min-height: 28px; min-width: 28px; padding: 0 0.4em; border-width: 1px; border-color: rgba(255, 255, 255, 0.4); }
.knoepfe { display: flex; gap: calc(var(--u) * 0.8); flex-wrap: wrap; justify-content: center; align-items: center; }
.knoepfe.senkrecht { flex-direction: column; min-width: calc(var(--u) * 18); }
.knoepfe.senkrecht button { width: 100%; }

/* Felder (Mission, Kontext, Steckbrief) */
.feld { position: absolute; background: var(--feld); border: 2px solid rgba(255, 255, 255, 0.85); padding: calc(var(--u) * 0.9) calc(var(--u) * 1.0);
	box-sizing: border-box; display: grid; gap: calc(var(--u) * 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: 1em; }
#missionFeld { left: calc(var(--u) * 1.6); top: calc(var(--u) * 6.4); width: min(30vw, calc(var(--u) * 24)); max-height: calc(100% - var(--u) * 13); overflow: auto; }
#missionFeld.zu #missionZiel, #missionFeld.zu #schritte li:not(.jetzt) { display: none; }
#schritte { list-style: none; margin: 0; padding: 0; display: grid; gap: calc(var(--u) * 0.32); }
#schritte li { display: grid; grid-template-columns: 1.6em 1fr; gap: 0.5em; align-items: start; font-size: calc(var(--u) * 0.92); line-height: 1.35; opacity: 0.55; }
#schritte li i { width: 0.95em; height: 0.95em; margin-top: 0.15em; box-sizing: border-box; border: 2px solid #fff; }
#schritte li.fertig { opacity: 0.8; }
#schritte li.fertig i { background: #fff; }
#schritte li.jetzt { opacity: 1; font-weight: 600; }
#schritte li.jetzt i { border-color: var(--planung); }
#schritte li small { display: block; opacity: 0.7; font-weight: 400; font-size: 0.86em; }
.balken { height: calc(var(--u) * 1.4); border: 2px solid #fff; position: relative; display: flex; align-items: center; padding: 0 0.5em; }
.balken b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 255, 255, 0.25); transition: width 0.3s; }
.balken span { position: relative; }
#kontextFeld { right: calc(var(--u) * 1.6); top: calc(var(--u) * 6.4); width: min(34vw, calc(var(--u) * 27)); max-height: calc(100% - var(--u) * 13); overflow: auto; }
#kontextFeld.platzfarbe { border-color: var(--pf, #fff); }
#kWerte { display: grid; grid-template-columns: auto 1fr; gap: calc(var(--u) * 0.25) 1em; margin: 0; font-size: calc(var(--u) * 0.92); }
#kWerte dt { opacity: 0.6; }
#kWerte dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
#kWerte dd.schlecht { color: var(--stoerung); }
#kWerte dd.gut { color: #fff; }
#kAktionen { display: grid; gap: calc(var(--u) * 0.5); }
.aktion { display: grid; gap: calc(var(--u) * 0.3); border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: calc(var(--u) * 0.5); }
.aktion .zeile { display: flex; justify-content: space-between; align-items: center; gap: 0.6em; }
.aktion .name { font-size: calc(var(--u) * 0.95); font-weight: 600; }
.aktion .info { font-size: calc(var(--u) * 0.82); opacity: 0.65; line-height: 1.35; }
.aktion .wahl { display: flex; gap: 0; }
.aktion .wahl button { margin-left: -2px; min-width: 2.6em; padding: 0 0.6em; min-height: 40px; opacity: 0.65; }
.aktion .wahl button.an { background: #fff; color: var(--grund); opacity: 1; }
.aktion .grund { color: var(--stoerung); font-size: calc(var(--u) * 0.82); }
.aktion button.bau { border-color: var(--planung); }
.aktion button.bau:hover { background: var(--planung); color: var(--grund); }
.aktion.fertig .name::after { content: ' ✓'; opacity: 0.7; }
.aktion .fort { height: 4px; background: rgba(255, 255, 255, 0.15); position: relative; }
.aktion .fort b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--planung); }
#vorschauBox { border: 2px solid var(--planung); padding: calc(var(--u) * 0.6); display: grid; gap: calc(var(--u) * 0.5); }
#vWirkung { margin: 0; padding-left: 1.1em; font-size: calc(var(--u) * 0.9); line-height: 1.45; }
#vWirkung li.besser { color: #fff; }
#vWirkung li.schlechter { color: var(--stoerung); }

/* Problem und gestufte Hilfe */
#problemFeld { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--u) * 1.0); max-width: min(52vw, calc(var(--u) * 44));
	display: flex; gap: calc(var(--u) * 0.8); align-items: center; background: var(--feld); border: 2px solid var(--stoerung);
	padding: calc(var(--u) * 0.6) calc(var(--u) * 0.9); box-sizing: border-box; }
#problemFeld.info { border-color: rgba(255, 255, 255, 0.7); }
#problemFeld.info .symbol { background: #fff; }
#problemFeld p { margin-top: 0.3em; }
#problemFeld button { min-height: 36px; white-space: nowrap; }
.symbol { display: inline-block; flex: none; width: calc(var(--u) * 1.6); height: calc(var(--u) * 1.4); background: var(--stoerung);
	clip-path: polygon(50% 0, 100% 100%, 0 100%); position: relative; }
.symbol::after { content: '!'; position: absolute; left: 0; right: 0; bottom: 0.05em; text-align: center; color: var(--grund); font-weight: 800; font-size: calc(var(--u) * 1.0); }
#problemFeld.info .symbol { clip-path: none; width: calc(var(--u) * 1.1); height: calc(var(--u) * 1.1); }
#problemFeld.info .symbol::after { content: ''; }

/* untere Leiste: Bereiche, Ansichten */
#leiste { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--u) * 1.1 + env(safe-area-inset-bottom)); display: flex;
	gap: calc(var(--u) * 1.0); flex-wrap: wrap; justify-content: center; max-width: 96vw; }
.gruppe { display: flex; background: var(--feld); }
.gruppe button { margin-left: -2px; }
.gruppe button.an { background: #fff; color: var(--grund); }
.platz i { width: 0.8em; height: 0.8em; background: var(--pf); flex: none; }
.platz[data-platz="0"] { --pf: var(--stein); } .platz[data-platz="1"] { --pf: var(--wasser); } .platz[data-platz="2"] { --pf: var(--luft); } .platz[data-platz="3"] { --pf: var(--material); }
.platz.an { background: var(--pf) !important; color: var(--grund) !important; border-color: var(--pf); }
.platz.an i { background: var(--grund); }
.platz.stoerung::after { content: ''; width: 0.55em; height: 0.55em; background: var(--stoerung); margin-left: -0.2em; }
#status { position: absolute; right: calc(var(--u) * 1.6); bottom: calc(var(--u) * 5.4); display: grid; gap: 0.3em; text-align: right; opacity: 0.75; }
#zecheKopf { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--u) * 1.0); display: grid; gap: 0.3em; text-align: center; background: var(--feld);
	border: 2px solid #fff; padding: calc(var(--u) * 0.6) calc(var(--u) * 1.2); }

/* Beschriftung der Anlagen, Orte und Zechen */
#marken { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.marke { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); white-space: nowrap; font-size: calc(var(--u) * 0.78); letter-spacing: 0.12em;
	text-transform: uppercase; font-weight: 600; padding: 0.15em 0.45em; background: rgba(11, 13, 18, 0.62); border-left: 2px solid #fff; opacity: 0.88; will-change: transform; }
.marke.ort { background: none; border: none; font-size: calc(var(--u) * 0.86); letter-spacing: 0.24em; opacity: 0.85; text-shadow: 0 0 8px rgba(0, 0, 0, 0.9); }
.marke.ort.r0 { font-size: calc(var(--u) * 1.1); }
.marke.ort.r2 { font-size: calc(var(--u) * 0.68); opacity: 0.6; }
.marke.zeche { font-size: calc(var(--u) * 0.66); border-left-color: #c7ccd4; opacity: 0.8; }
.marke.modell { border-left-color: var(--planung); color: var(--planung); font-size: calc(var(--u) * 0.86); }
.marke.problem { background: none; border: none; padding: 0; }
.marke.problem i { display: block; width: calc(var(--u) * 1.9); height: calc(var(--u) * 1.7); background: var(--stoerung); clip-path: polygon(50% 0, 100% 100%, 0 100%);
	animation: pochen 1.2s ease-in-out infinite; }
.marke.problem i::after { content: '!'; display: block; text-align: center; padding-top: 0.25em; color: var(--grund); font-weight: 800; font-size: calc(var(--u) * 1.1); }
.marke.gewaehlt { border-left-color: var(--planung); color: var(--planung); opacity: 1; }
@keyframes pochen { 50% { transform: scale(1.12); } }

/* Revier */
#revierAnzeige { position: absolute; inset: 0; pointer-events: none; }
#revierAnzeige > * { pointer-events: auto; }
#revierKopf { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--u) * 1.0); display: grid; gap: 0.3em; text-align: center; pointer-events: none !important; }
#revierKopf b { font-size: calc(var(--u) * 1.2); letter-spacing: 0.2em; }
#revierKopf span { opacity: 0.7; }
#legende { position: absolute; left: calc(var(--u) * 1.6); bottom: calc(var(--u) * 1.4); display: flex; gap: 1.1em; flex-wrap: wrap; max-width: 60vw; pointer-events: none !important; }
#legende span { display: inline-flex; gap: 0.45em; align-items: center; opacity: 0.85; }
#legende i { width: 0.9em; height: 0.9em; display: inline-block; }
#osmHinweis { position: absolute; left: calc(var(--u) * 1.6); bottom: calc(var(--u) * 0.3); opacity: 0.55; font-size: calc(var(--u) * 0.7); pointer-events: none !important; }
#zechenKarte { right: calc(var(--u) * 1.6); top: calc(var(--u) * 5.0); width: min(34vw, calc(var(--u) * 26)); }
#zechenKarte.modell { border-color: var(--planung); }
.leiste2 { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--u) * 1.1); display: flex; gap: 0.8em; }

/* Meldungen und Hoehepunkte */
#meldung { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); display: grid; gap: 0.6em; text-align: center; opacity: 0; transition: opacity 0.6s;
	pointer-events: none; text-shadow: 0 0 22px rgba(0, 0, 0, 0.95); width: min(90vw, 60ch); }
#meldung b { font-size: calc(var(--u) * 2.2); letter-spacing: 0.24em; }
#meldung span { font-size: calc(var(--u) * 1.05); opacity: 0.85; }
#meldung.an { opacity: 1; }
#toast { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--u) * 6.0); background: var(--feld); border: 2px solid #fff; padding: 0.5em 1em;
	opacity: 0; transition: opacity 0.4s; pointer-events: none; white-space: nowrap; }
#toast.an { opacity: 1; }
#toast.wasser { border-color: var(--wasser); } #toast.luft { border-color: var(--luft); } #toast.material { border-color: var(--material); } #toast.stoerung { border-color: var(--stoerung); }

/* Seiten */
.seite { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--u) * 1.2);
	background: rgba(11, 13, 18, 0.66); padding: 5vh 5vw; box-sizing: border-box; text-align: center; overflow: auto; z-index: 4; }
#titelSeite { background: linear-gradient(rgba(11, 13, 18, 0.05), rgba(11, 13, 18, 0.25) 45%, rgba(11, 13, 18, 0.85)); justify-content: flex-end; padding-bottom: 9vh; }
.seite h1 { margin: 0; font-size: calc(var(--u) * 5.0); font-weight: 800; letter-spacing: 0.04em; line-height: 1; text-transform: uppercase; }
.seite h2 { margin: 0; font-size: calc(var(--u) * 1.9); letter-spacing: 0.18em; }
.vorschauZeile { opacity: 0.85; margin: 0; }
.unter { max-width: 62ch; opacity: 0.8; }
.karte { border: 2px solid rgba(255, 255, 255, 0.8); padding: calc(var(--u) * 1.0); display: grid; gap: 0.6em; text-align: left; background: var(--feld); }
#introKarten, #efKarten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(var(--u) * 1.0); max-width: min(92vw, 110ch); }
#efKarten { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#efKarten .karte b, #introKarten .karte b { font-size: calc(var(--u) * 0.86); overflow-wrap: anywhere; hyphens: auto; }
#efKarten .karte .satz { font-size: calc(var(--u) * 0.9); }
#einsatzSeite { gap: calc(var(--u) * 0.8); justify-content: flex-start; padding-top: 4vh; }
#farbLegende { display: grid; gap: 0.35em; }
#farbLegende span { display: flex; gap: 0.6em; align-items: center; font-size: calc(var(--u) * 0.86); }
#farbLegende i { width: 1.4em; height: 0.7em; display: inline-block; }
#regler, #adminRegler { display: grid; gap: calc(var(--u) * 0.6); min-width: min(90vw, calc(var(--u) * 36)); }
.reihe { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1em; text-align: left; }
.reihe .wahl { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.reihe .wahl button { margin-left: -2px; padding: 0 0.9em; min-height: 40px; opacity: 0.6; }
.reihe .wahl button.an { background: #fff; color: var(--grund); opacity: 1; }
#awListe { display: grid; grid-template-columns: auto 1fr; gap: 0.5em 1.4em; text-align: left; max-width: min(90vw, 80ch); margin: 0; }
#awListe dt { font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: calc(var(--u) * 0.85); opacity: 0.75; }
#awListe dd { margin: 0; font-size: calc(var(--u) * 1.0); }
#awListe dd.ok::before { content: '■ '; color: #fff; } #awListe dd.knapp::before { content: '■ '; color: var(--planung); }
#einsatzBild { width: min(80vw, 640px, 70vh * 2.4); }
#einsatzBild svg { width: 100%; height: auto; display: block; }
.konzept { opacity: 0.6; margin: 0; }
#pinForm { display: flex; gap: 0.6em; }
#pinForm input { font: inherit; background: none; color: #fff; border: 2px solid #fff; padding: 0.4em 0.8em; width: 8em; text-align: center; border-radius: 0; }
#nochDaSeite { background: rgba(11, 13, 18, 0.8); }
#hochkant { position: absolute; left: 50%; bottom: 40%; transform: translateX(-50%); background: var(--feld); border: 2px solid #fff; padding: 0.6em 1em; }

/* Laden */
#lade { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; background: var(--grund); z-index: 10; transition: opacity 0.6s; }
#lade h1 { margin: 0; font-size: 44px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 800; }
#lade p { letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.6; font-size: 12px; }
#lade.weg2 { opacity: 0; pointer-events: none; }

/* Aufnahme / ohne Anzeige */
body.ohneHud #anzeige, body.ohneHud #marken, body.ohneHud #revierAnzeige, body.ohneHud #ton, body.ohneHud #marke { display: none !important; }
body.ohneHud #meldung { display: none; }
body.aufnahme #ton { display: none; }

/* schmale und kleine Bildschirme */
@media (max-width: 900px), (max-height: 520px) {
	#buehne { --u: max(9px, min(1.6vw, 2.4vh)); }
	#missionFeld { width: min(42vw, 260px); }
	#kontextFeld { width: min(52vw, 320px); }
	#introKarten, #efKarten { grid-template-columns: 1fr; }
	.platz span { display: none; }
	.platz { min-width: 52px; }
	#legende { display: none; }
}
@media (max-aspect-ratio: 4/5) {
	#missionFeld { top: auto; bottom: calc(var(--u) * 2 + 178px + env(safe-area-inset-bottom)); max-height: 24vh; width: calc(100% - var(--u) * 3.2); }
	#status { display: none; }
	#problemFeld { flex-wrap: wrap; justify-content: flex-start; }
	#problemFeld > div { flex: 1 1 60%; min-width: 0; }
	#missionFeld.zu { max-height: 12vh; }
	#kontextFeld { top: calc(var(--u) * 4.5); width: calc(100% - var(--u) * 3.2); max-height: 42vh; }
	#problemFeld { max-width: 92vw; top: calc(var(--u) * 4.2); }
	#kontextFeld:not(.weg) ~ #problemFeld { display: none !important; }
}

/* Gefuehrter Modus: EINE Aufgabenkarte (Problem -> Begruendung -> grosse Loesungsknoepfe mit Vorschau). Seitenfelder,
   Bereichsreiter und volle Beschriftung erscheinen nur auf Wunsch (frei) oder beim Antippen einer Anlage. */
#aufgabe { left: calc(var(--u) * 1.6); bottom: calc(var(--u) * 6.6); width: min(40vw, calc(var(--u) * 34)); gap: calc(var(--u) * 0.7);
	border-width: 3px; padding: calc(var(--u) * 1.1) calc(var(--u) * 1.3); }
#aufgabe.stoerung { border-color: var(--stoerung); }
#aufgabe.ok { border-color: #fff; }
#aufgabe .aKopf { display: flex; gap: calc(var(--u) * 0.8); align-items: flex-start; }
#aufgabe .aKopf b { font-size: calc(var(--u) * 1.45); line-height: 1.25; font-weight: 700; }
#aufgabe .symbol { margin-top: 0.15em; }
#aufgabe.ok .symbol, #aufgabe.info .symbol { clip-path: none; width: calc(var(--u) * 1.2); height: calc(var(--u) * 1.2); background: #fff; }
#aufgabe.ok .symbol::after, #aufgabe.info .symbol::after { content: ''; }
#aText { font-size: calc(var(--u) * 1.05); opacity: 0.85; }
#aPunkte { display: flex; gap: 4px; }
#aPunkte i { width: 0.7em; height: 0.7em; border: 2px solid rgba(255, 255, 255, 0.6); box-sizing: border-box; }
#aPunkte i.fertig { background: #fff; border-color: #fff; }
#aPunkte i.jetzt { border-color: var(--planung); }
#aKnoepfe { display: grid; gap: calc(var(--u) * 0.6); }
#aKnoepfe .gross { width: 100%; justify-content: space-between; text-align: left; border-color: var(--planung); padding: calc(var(--u) * 0.8) calc(var(--u) * 1.2); }
#aKnoepfe .gross small { font-weight: 500; letter-spacing: 0.06em; opacity: 0.75; text-transform: none; font-size: calc(var(--u) * 0.85); }
#aKnoepfe .gross:hover small { opacity: 1; }
#aKnoepfe .wahlZeile { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
#aKnoepfe .wahlZeile .wahl { display: flex; }
#aKnoepfe .wahlZeile .wahl button { margin-left: -2px; min-width: 3.2em; min-height: 52px; font-size: calc(var(--u) * 1.0); }
#aKnoepfe .wahlZeile .wahl button.an { background: #fff; color: var(--grund); }
#aVorschau { border-top: 2px solid var(--planung); padding-top: calc(var(--u) * 0.6); display: grid; gap: calc(var(--u) * 0.6); }
#aWirkung { margin: 0; padding-left: 1.1em; font-size: calc(var(--u) * 1.0); line-height: 1.5; }
#aWirkung li.schlechter { color: var(--stoerung); }
body.gefuehrt #plaetze, body.gefuehrt #problemFeld { display: none !important; }
body.museum #buehne { --u: max(12px, min(1.2vw, 2.15vh)); }
@media (max-aspect-ratio: 4/5) {
	#aufgabe { left: calc(var(--u) * 1.0); right: calc(var(--u) * 1.0); width: auto; bottom: calc(var(--u) * 2 + 118px); max-height: 46vh; overflow: auto; }
	body.gefuehrt #missionFeld { display: none !important; }
}
@media (max-width: 900px), (max-height: 520px) {
	#aufgabe { width: min(56vw, 420px); bottom: calc(var(--u) * 6.2); max-height: 62vh; overflow: auto; }
	#aufgabe .aKopf b { font-size: calc(var(--u) * 1.2); }
}
body.gefuehrt #missionFeld { display: none !important; }

/* ------------------------------------------------------------------ 0.3: aufgeraeumte Oberflaeche
   Drei ruhige Zonen: oben links eine dezente Zeile (Name + Vorschau-Hinweis), oben rechts Symbolknoepfe (Uebersicht,
   Ton, Menue), unten links die Aufgabe, unten Mitte ein schmaler Ansichtsschalter. Alles andere nur bei Bedarf. */
:root { --linie: rgba(255, 255, 255, 0.22); --glas: rgba(12, 14, 19, 0.78); }
body.spielt #spielName, body.spielt #spielName.aus { opacity: 0.55 !important; display: flex !important; gap: 0.9em; align-items: baseline; }
body.ohneHud #spielName, body.ohneHud.spielt #spielName, body.ohneHud.spielt #spielName.aus { display: none !important; }   /* Anzeige aus (F8, ?hud=0) */
body.spielt #spielName b { font-size: var(--u); letter-spacing: 0.24em; }
body.spielt #spielName span { opacity: 0.75; font-size: calc(var(--u) * 0.72); }
/* Symbolknoepfe oben rechts */
#symbole { position: absolute; top: calc(var(--u) * 1.0 + env(safe-area-inset-top)); right: calc(var(--u) * 1.2); display: flex; gap: 6px; }
.symbolKnopf, body.spielt #ton { width: 46px; height: 46px; min-height: 46px; padding: 0; border: 1px solid var(--linie); background: var(--glas);
	display: inline-flex; align-items: center; justify-content: center; opacity: 0.85; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.symbolKnopf:hover, body.spielt #ton:hover { background: #fff; color: var(--grund); opacity: 1; }
.ic { width: 20px; height: 20px; background: currentColor; display: block;
	-webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ic-uebersicht { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 7V2h5M13 2h5v5M18 13v5h-5M7 18H2v-5' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); }
.ic-menue { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 4h16M2 10h16M2 16h16' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); }
body.spielt #ton { position: absolute; top: calc(var(--u) * 1.0 + env(safe-area-inset-top)); right: calc(var(--u) * 1.2 + 104px); bottom: auto;
	font-size: 0; color: #fff; letter-spacing: 0; }
body.spielt #ton::before { content: ''; width: 20px; height: 20px; background: currentColor;
	-webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
	--m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 7h4l5-4v14l-5-4H2z' fill='black'/%3E%3Cpath d='M14 6c1.5 1.2 1.5 6.8 0 8M16.5 3.5c3 2.5 3 10.5 0 13' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E"); }
body.spielt #ton.aus { text-decoration: none; opacity: 0.5; }
body.spielt #ton.aus::before { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 7h4l5-4v14l-5-4H2z' fill='black'/%3E%3Cpath d='M14 7l5 6M19 7l-5 6' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E"); }
/* Ansichtsschalter unten Mitte: schmal, eine Zeile */
#leiste { gap: 8px; bottom: calc(var(--u) * 1.2 + env(safe-area-inset-bottom)); }
#leiste .gruppe { background: var(--glas); border: 1px solid var(--linie); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#leiste .gruppe button { border: none; margin: 0; min-height: 40px; padding: 0 calc(var(--u) * 1.3); font-size: calc(var(--u) * 0.8); opacity: 0.7; }
#leiste .gruppe button.an { opacity: 1; background: #fff; color: var(--grund); }
#leiste .gruppe button:hover { opacity: 1; }
/* Aufgabe: ruhige Glasflaeche mit Farbakzent des Bereichs statt Alarmrahmen */
#aufgabe { border: none; border-left: 4px solid var(--akzent, #fff); background: var(--glas); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	bottom: calc(var(--u) * 1.2 + env(safe-area-inset-bottom)); width: min(36vw, calc(var(--u) * 31)); padding: calc(var(--u) * 1.1) calc(var(--u) * 1.3) calc(var(--u) * 1.2);
	gap: calc(var(--u) * 0.75); transition: border-color 0.4s; }
#aufgabe.stoerung, #aufgabe.ok, #aufgabe.info { border-color: var(--akzent, #fff); }
#aufgabe.wechsel { animation: aufgabeEin 0.45s ease-out; }
@keyframes aufgabeEin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#aufgabe .kopfzeile { gap: 0.8em; }
#aSchritt { opacity: 0.6; font-size: calc(var(--u) * 0.72); }
#aPunkte { flex: 1; max-width: 50%; gap: 3px; }
#aPunkte i { flex: 1; height: 3px; width: auto; border: none; background: rgba(255, 255, 255, 0.18); }
#aPunkte i.fertig { background: rgba(255, 255, 255, 0.85); }
#aPunkte i.jetzt { background: var(--akzent, #fff); }
#aufgabe .aKopf { gap: 0; }
#aufgabe .aKopf .symbol { display: none; }
#aufgabe .aKopf b { font-size: calc(var(--u) * 1.4); letter-spacing: -0.005em; }
#aText { font-size: calc(var(--u) * 0.98); opacity: 0.72; }
#aKnoepfe .gross { border: 1px solid var(--akzent, var(--planung)); background: rgba(255, 255, 255, 0.04); font-size: calc(var(--u) * 0.95);
	padding: calc(var(--u) * 0.85) calc(var(--u) * 1.1); }
#aKnoepfe .gross:hover { background: var(--akzent, #fff); color: var(--grund); }
#aKnoepfe .gross small { color: inherit; }
#aKnoepfe .wahlZeile .wahl button { border: 1px solid var(--linie); margin-left: -1px; min-height: 46px; }
#aVorschau { border-top: 1px solid var(--linie); }
#aFort { border: 1px solid var(--linie); height: calc(var(--u) * 1.5); }
#aFort b { background: var(--akzent, rgba(255, 255, 255, 0.3)); opacity: 0.35; }
#aJa { border-color: var(--akzent, #fff); }
/* gefuehrt: kein Status, kein Toast, keine Dreieckmarke - die Karte sagt alles */
body.gefuehrt #status, body.gefuehrt .marke.problem { display: none !important; }
body.gefuehrt #toast { display: none !important; }
/* Beschriftung: feiner */
.marke { font-size: calc(var(--u) * 0.72); background: rgba(12, 14, 19, 0.7); border-left: 2px solid var(--akzent, #fff); padding: 0.2em 0.55em; }
/* Revier: eine Zeile oben, Hinweis blendet aus, Legende klein */
#revierKopf { gap: 0.2em; }
#revierKopf span { transition: opacity 1.2s; }
#revierKopf.ruhig span { opacity: 0; }
#legende { gap: 0.9em; font-size: calc(var(--u) * 0.68); opacity: 0.7; }
#revierAnzeige::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--u) * 5.6); background: linear-gradient(rgba(11, 13, 18, 0), rgba(11, 13, 18, 0.6) 45%, rgba(11, 13, 18, 0.92)); pointer-events: none; }
.leiste2 { bottom: calc(var(--u) * 1.2); }
.leiste2 button { border-width: 1px; border-color: var(--linie); background: var(--glas); min-height: 40px; font-size: calc(var(--u) * 0.8); }
/* Kontext- und Missionsfeld (frei) in derselben Sprache */
.feld { border: 1px solid var(--linie); background: var(--glas); }
#kontextFeld { border-left: 4px solid var(--pf, #fff); }
#meldung b { font-size: calc(var(--u) * 1.9); letter-spacing: 0.3em; font-weight: 600; }
@media (max-aspect-ratio: 4/5) {
	#aufgabe { left: calc(var(--u) * 1.0); right: calc(var(--u) * 1.0); width: auto; bottom: calc(var(--u) * 1.2 + 52px); }
	body.spielt #spielName span { display: none; }
}
@media (max-width: 900px) and (min-aspect-ratio: 4/5) {
	#aufgabe { bottom: calc(var(--u) * 1.2 + 52px); }
}
/* Uebersicht = Wuerfel (das ganze Modell), nicht Vollbild */
.ic-uebersicht { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 2l7 4v8l-7 4-7-4V6z M3 6l7 4 7-4 M10 10v8' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E"); }
/* im Spiel: kurzer Vorschau-Hinweis; Revier-Titel unter der Markenzeile */
body.spielt #spielName span[data-t="vorschau"] { display: none; }
body.spielt #spielName::after { content: attr(data-kurz); opacity: 0.75; font-size: calc(var(--u) * 0.72); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
#revierKopf { top: calc(var(--u) * 4.4); }

/* ---------------------------------------------------------------- 0.4 Fuehrung: eine klare Rangfolge
   1. der Hauptknopf der Karte (gefuellt in der Farbe des Bereichs, dicker Rahmen, ruhiges Leuchten) mit "Dein naechster
   Schritt" darueber, 2. Ansichten, 3. Ton/Uebersicht/Menue - solange eine Aufgabe wartet, treten 2. und 3. zurueck.
   Eine gestrichelte Leitlinie fuehrt von der Karte zur Stelle im Bild. */
#aSchritt { opacity: 0.75; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
#aTun { display: flex; align-items: center; gap: 0.6em; margin-top: calc(var(--u) * 0.3); font-size: calc(var(--u) * 0.72); font-weight: 700;
	letter-spacing: 0.18em; text-transform: uppercase; color: var(--akzent, #fff); }
#aTun::before { content: ''; width: 1.8em; height: 2px; background: currentColor; }
#aKnoepfe .gross.haupt { background: var(--akzent, #fff); color: var(--grund); border: 3px solid var(--akzent, #fff); font-weight: 700;
	font-size: calc(var(--u) * 1.05); padding: calc(var(--u) * 1.0) calc(var(--u) * 1.2); animation: hauptLeuchten 2.8s ease-in-out infinite; }
#aKnoepfe .gross.haupt small { opacity: 0.8; }
#aKnoepfe .gross.haupt:hover { background: var(--akzent, #fff); color: var(--grund); filter: brightness(1.1); }
#aKnoepfe .gross.haupt:disabled { animation: none; opacity: 0.45; }
#aKnoepfe .gross.neben { background: transparent; border: 1px solid var(--linie); font-size: calc(var(--u) * 0.85); padding: calc(var(--u) * 0.7) calc(var(--u) * 1.2); }
#aKnoepfe .oder { text-align: center; font-size: calc(var(--u) * 0.68); letter-spacing: 0.2em; opacity: 0.55; margin: calc(var(--u) * -0.15) 0; }
#aKnoepfe .wahl button.empfohlen { border: 3px solid var(--akzent, #fff); animation: hauptLeuchten 2.8s ease-in-out infinite; position: relative; z-index: 1; }
#ansichten button.empfohlen { border: 3px solid var(--fuehrung, #fff); animation: hauptLeuchten 2.8s ease-in-out infinite; position: relative; z-index: 1; }
@keyframes hauptLeuchten {
	0%, 100% { box-shadow: 0 0 0 0 transparent; }
	50% { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.14), 0 0 26px rgba(255, 255, 255, 0.22); }
}
body.gefuehrt.hatAufgabe #ansichten, body.gefuehrt.hatAufgabe #symbole, body.gefuehrt.hatAufgabe #ton { opacity: 0.45; transition: opacity 0.5s; }
body.gefuehrt.hatAufgabe #ansichten:hover, body.gefuehrt.hatAufgabe #symbole:hover, body.gefuehrt.hatAufgabe #ton:hover,
body.gefuehrt.hatAufgabe #ansichten:has(.empfohlen) { opacity: 1; }
#leitlinie { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; display: none; }
#leitlinie line { stroke: var(--fuehrung, #fff); stroke-width: 2; stroke-dasharray: 2 8; stroke-linecap: round; opacity: 0.8; }
#leitlinie circle { fill: none; stroke: var(--fuehrung, #fff); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: zielAtmen 2.8s ease-in-out infinite; }
@keyframes zielAtmen { 0%, 100% { transform: scale(1); opacity: 0.95; } 50% { transform: scale(1.3); opacity: 0.45; } }
body.ohneHud #leitlinie, body.ohneHud #tipp { display: none !important; }
#tipp { position: absolute; z-index: 6; pointer-events: none; transform: translate(0, -50%); padding: 0.55em 1em; background: var(--fuehrung, #fff);
	color: var(--grund); font-weight: 700; font-size: calc(var(--u) * 0.74); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
	animation: tippSchweben 1.8s ease-in-out infinite; }
#tipp::after { content: ''; position: absolute; left: -8px; top: 50%; margin-top: -8px; border: 8px solid transparent; border-left: 0; border-right-color: var(--fuehrung, #fff); }
#tipp.unten { transform: translate(-50%, -100%); animation: none; text-transform: none; letter-spacing: 0.04em; font-weight: 600; background: rgba(245, 246, 248, 0.94); }
#tipp.unten::after { left: 50%; top: auto; bottom: -8px; margin: 0 0 0 -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: rgba(245, 246, 248, 0.94); }
@keyframes tippSchweben { 0%, 100% { margin-left: 0; } 50% { margin-left: 7px; } }
/* Titel und Einfuehrung: ein Hauptknopf, alles andere sichtbar nachgeordnet */
#titelSeite .knoepfe:first-of-type button.gross, #introSeite .knoepfe button.gross, #endeSeite .knoepfe button.gross {
	background: #fff; color: var(--grund); border-color: #fff; animation: hauptLeuchten 2.8s ease-in-out infinite; }
#titelSeite .knoepfe:first-of-type button:not(.gross) { border-width: 1px; }
#titelSeite .knoepfe + .knoepfe button, #introSeite .knoepfe button:not(.gross) { border-color: transparent; background: transparent; opacity: 0.7;
	text-decoration: underline; text-underline-offset: 0.35em; }
#titelSeite .knoepfe + .knoepfe button:hover, #introSeite .knoepfe button:not(.gross):hover { opacity: 1; color: #fff; background: transparent; }
