:root { --erz: #f0b030; --kristall: #40e0ff; --text: #f4ead8; --dunkel: rgba(20, 14, 10, 0.82); --rand: #5a4632; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1a1512; color: var(--text); font: 14px/1.35 system-ui, -apple-system, 'Segoe UI', sans-serif; user-select: none; }
#buehne { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#zahlen { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.zahl { position: absolute; left: 0; top: 0; font-weight: 900; font-size: 22px; color: var(--erz); text-shadow: 0 2px 0 #000, 0 0 8px rgba(0,0,0,.7); white-space: nowrap; will-change: transform; }
.zahl.kristall { color: var(--kristall); }
.zahl.abbau { font-size: 16px; }
.zahl.gross { font-size: 30px; }
.zahl.verloren { color: #a08870; font-size: 15px; }
.zahl.abgabe { font-size: 28px; color: #fff4c0; }
.zahl.schaden { color: #ff6050; font-size: 16px; }
.zahl.info { color: #b5ecff; font-size: 15px; padding: 2px 7px; background: #101e26eb; border: 1px solid #5a899c; border-radius: 2px; }

#kopf { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; pointer-events: none; }
.feld { background: var(--dunkel); border: 1px solid var(--rand); border-radius: 8px; padding: 6px 12px; display: flex; align-items: center; gap: 8px; }
.titel { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
#uhr, #welle { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.klein { font-size: 12px; opacity: .75; }
.lager { font-size: 18px; font-variant-numeric: tabular-nums; gap: 14px; }
.erz { color: var(--erz); } .kristall { color: var(--kristall); }
.balken { width: 140px; height: 10px; background: #2a201a; border-radius: 5px; overflow: hidden; border: 1px solid #000; }
.balken > div { height: 100%; width: 100%; background: #50d050; transition: width .15s; }
.balken.rucksack > div { background: var(--erz); }
#naechste.warn { color: #ff7050; opacity: 1; font-weight: 700; }

#kumpelInfo { position: fixed; left: 12px; bottom: 12px; background: var(--dunkel); border: 1px solid var(--rand); border-radius: 8px; padding: 8px 12px; min-width: 280px; }
#kumpelInfo .zeile { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
#kumpelInfo .zeile > span:first-child { width: 70px; font-size: 12px; opacity: .8; }
#kumpelInfo .zeile.voll .balken { box-shadow: 0 0 8px var(--erz); }
#stationHinweis { margin-top: 6px; font-size: 13px; color: #ffe2a0; min-height: 1.2em; max-width: 340px; }

#panel { position: fixed; right: 12px; top: 70px; width: 330px; max-height: calc(100% - 440px); min-height: 120px; overflow: auto; background: var(--dunkel); border: 1px solid var(--rand); border-radius: 10px; padding: 10px 12px; }
#panel h2 { margin: 0 0 6px; font-size: 16px; }
#panel h3 { margin: 10px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
#panel p { margin: 4px 0; font-size: 13px; opacity: .9; }
.eintrag { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 8px; margin: 3px 0; border-radius: 6px; border: 1px solid #6a5238; background: #2e241b; color: var(--text); font: inherit; cursor: pointer; }
.eintrag:hover:not(:disabled) { background: #3e3020; border-color: var(--erz); }
.eintrag:disabled { opacity: .45; cursor: default; }
.eintrag.aktiv { border-color: #60e080; background: #24402a; }
.eintrag .name { font-weight: 700; }
.eintrag .wirkung { font-size: 11px; opacity: .75; display: block; font-weight: 400; }
.eintrag .preis { font-size: 12px; white-space: nowrap; text-align: right; }
.fortschritt { height: 8px; background: #2a201a; border-radius: 4px; overflow: hidden; margin: 6px 0; }
.fortschritt > div { height: 100%; background: #60c0ff; }

#karte { position: fixed; right: 12px; bottom: 12px; width: 180px; height: 255px; border: 1px solid var(--rand); border-radius: 6px; background: #000; image-rendering: pixelated; }
#meldung { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); font-weight: 800; font-size: 20px; text-shadow: 0 2px 0 #000; pointer-events: none; text-align: center; }
#meldung div { animation: meldung 2.4s forwards; }
#meldung .warn { color: #ff6a4a; font-size: 26px; }
#meldung .gut { color: #80ff90; }
@keyframes meldung { 0% { opacity: 0; transform: translateY(-8px); } 8% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
#warnpfeil { position: fixed; z-index: 2; left: 50%; top: 50%; line-height: 0; pointer-events: none; animation: puls .5s infinite alternate; }
#warnpfeil svg { fill: #ff643e; stroke: #ffe7bd; stroke-width: 2; filter: drop-shadow(0 2px 3px #101014); }
@keyframes puls { from { opacity: .45; } to { opacity: 1; } }
#bodenAnzeige { position: fixed; top: 40%; left: 50%; transform: translateX(-50%); background: rgba(80, 10, 10, .85); padding: 12px 20px; border-radius: 8px; font-size: 18px; }

.overlay { position: fixed; inset: 0; display: flex; align-items: safe center; justify-content: center; background: rgba(10, 7, 5, 0.78); overflow: auto; padding: 20px; }
.overlay[hidden], #panel[hidden], #warnpfeil[hidden], #bodenAnzeige[hidden] { display: none; }
.karte-inhalt { background: #241a12; border: 1px solid var(--rand); border-radius: 14px; padding: 24px 30px; max-width: 560px; }
.karte-inhalt.breit { max-width: 860px; width: 100%; }
.karte-inhalt h1 { margin: 0; font-size: 40px; letter-spacing: .04em; color: var(--erz); }
.unter { margin-top: 2px; opacity: .75; }
.steuerung { padding-left: 18px; }
.steuerung li { margin: 3px 0; }
button { font: inherit; }
#los, .knoepfe button { padding: 10px 22px; font-size: 16px; font-weight: 800; border-radius: 8px; border: 0; background: var(--erz); color: #241a12; cursor: pointer; }
.knoepfe { display: flex; gap: 10px; margin-top: 14px; }
.knoepfe button:last-child { background: #60c080; }
.zahlenraster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.zahlenraster div { background: #2e241b; border-radius: 6px; padding: 6px 10px; }
.zahlenraster b { display: block; font-size: 20px; }
.zahlenraster span { font-size: 11px; opacity: .7; text-transform: uppercase; }
#endeKurve svg { width: 100%; height: 180px; background: #1a130d; border-radius: 6px; }
#endeTaetigkeit { font-size: 13px; margin-top: 10px; }
.tbalken { display: flex; height: 18px; border-radius: 4px; overflow: hidden; margin: 4px 0; }
.tbalken div { height: 100%; }
.legende span { margin-right: 12px; font-size: 12px; white-space: nowrap; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

/* Zuschauen (?bots=3) */
body.zuschauer #panel { display: none; }
#botListe { position: fixed; left: 12px; top: 92px; width: 330px; background: var(--dunkel); border: 1px solid var(--rand); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
#botListe .kopfzeile { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; margin-bottom: 4px; }
#botListe .bot { display: grid; grid-template-columns: 12px 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; }
#botListe .bot:hover { background: #3e3020; }
#botListe .bot.aktiv { border-color: var(--erz); background: #2e241b; }
#botListe .bot i { width: 12px; height: 12px; border-radius: 50%; grid-column: 1; grid-row: 1 / 3; }
#botListe .bot b { grid-column: 2; grid-row: 1; }
#botListe .bot .klein { grid-column: 3; grid-row: 1; white-space: nowrap; opacity: .75; }
#botListe .bot .was { grid-column: 2 / 4; grid-row: 2; color: #ffe2a0; }
#botListe .log { margin-top: 6px; border-top: 1px solid var(--rand); padding-top: 4px; min-height: 1em; }
#botListe .hilfe { margin-top: 6px; opacity: .6; }

/* Zechenanzeigen und Schichtmenü */
:root {
  --erz: #ffbc60;
  --kristall: #88e9f3;
  --text: #e4ebea;
  --dunkel: rgba(12, 23, 30, .91);
  --rand: #3a515a;
  --stahl: #a0b5b9;
  color-scheme: dark;
}
html, body { background: #101a21; }
#kopf {
  top: 18px; gap: 1px; min-height: 54px; max-width: calc(100% - 28px);
  border: 1px solid var(--rand); border-top: 2px solid #d89447;
  background: #30454e; box-shadow: 0 5px 22px #0007;
}
.feld { border: 0; border-radius: 0; padding: 8px 15px; gap: 9px; white-space: nowrap; }
.titel { color: var(--stahl); opacity: 1; font-weight: 750; letter-spacing: .13em; }
#uhr, #welle, .lager, #zecheZahl, #rucksackZahl { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; }
#naechste { min-width: 3ch; }
.balken {
  background: #0e171d; height: 7px; border: 0; border-radius: 0;
  box-shadow: 0 0 0 1px #3b4c52;
}
.balken > div { background: linear-gradient(90deg, #408986, #9bddae); }
.balken.rucksack > div { background: linear-gradient(90deg, #a76429, #ffbd61); }
#kumpelInfo, #panel, #botListe, #kartenrahmen {
  border: 1px solid var(--rand); border-radius: 0; background: var(--dunkel);
  box-shadow: 0 8px 28px #0005;
}
#kumpelInfo { left: 18px; bottom: 18px; padding: 11px 13px 9px; border-left: 2px solid #e9a651; pointer-events: none; }
#kumpelInfo .zeile > span:first-child { color: var(--stahl); font-size: 10px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
#stationHinweis { color: #ffc875; font-weight: 650; font-size: 12px; }
#panel { right: 18px; top: 86px; max-height: max(120px, calc(100% - 406px)); border-top: 2px solid #67bcca; }
#panel h2 { text-transform: uppercase; letter-spacing: .08em; }
#panel h3 { color: var(--stahl); }
.eintrag { background: #1c2e38; border: 1px solid #3a4f55; border-radius: 2px; }
.eintrag:hover:not(:disabled) { background: #283d46; }
.eintrag.aktiv { background: #21433e; border-color: #70c4a3; }
.kasernenKopf { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
#panel .kasernenKopf h2 { margin: 0; }
.kasernenKopf span { font-size: 12px; color: var(--stahl); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kasernenSlots, .kasernenEinheiten { display: grid; gap: 5px; }
.kasernenSlots { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 7px; }
.kasernenSlots .kasernenSlot { justify-content: center; height: 38px; padding: 0; margin: 0; }
.kasernenSlot:not(:has(.einheitIcon)) { border-style: dashed; background: #101f28; color: #a8c9d0; }
.kasernenSlot[aria-disabled="true"] { cursor: default; }
.kasernenSlots button:focus-visible, .kasernenEinheiten button:focus-visible { outline: 2px solid #8bd7df; outline-offset: -2px; }
.kasernenEinheiten { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 8px 0; }
#panel .kasernenEinheiten .eintrag { justify-content: flex-start; flex-wrap: nowrap; gap: 6px; margin: 0; padding: 4px 6px; font-size: 12px; }
.einheitIcon { display: grid; place-items: center; flex: 0 0 24px; width: 24px; font: 700 21px/1 system-ui, sans-serif; }
.einheitIcon.gardist { color: #9ed1ed; }
.einheitIcon.flammer { color: #ffb276; }
.einheitIcon.schuetze { color: #d3bcf9; }
.einheitIcon.sanitaeter { color: #9de0b9; }
.einheitIcon.panzerflammer { color: #ff9a88; }
.einheitIcon.laeufer { color: #e5d297; }
#kartenrahmen { position: fixed; right: 18px; bottom: 18px; margin: 0; width: 166px; padding: 6px 8px 8px; pointer-events: none; }
#kartenrahmen figcaption { margin-bottom: 5px; font-size: 10px; font-weight: 750; color: var(--stahl); text-transform: uppercase; letter-spacing: .15em; }
#karteKnopf { display: none; }
#karte { position: static; display: block; width: 100%; height: auto; border-radius: 0; border-color: #405860; }
#meldung { top: 83px; letter-spacing: .05em; }
#kopf.finale { border-top-color: #ff825b; }
#kopf.finale #welle { color: #ffd6a8; }
#kopf.finale .feld:nth-child(2) { background: #38252a; }
#botListe { left: 18px; border-top: 2px solid #67bcca; width: min(300px, 36vw); }
#botListe .bot:hover, #botListe .bot.aktiv { background: #243742; }
#bodenAnzeige { border: 1px solid #f17e60; border-radius: 0; }

#start {
  z-index: 20; justify-content: flex-start; align-items: safe center;
  padding: 44px clamp(26px, 7vw, 138px);
  background: linear-gradient(90deg, #061116f7, #061116d9 29%, #06111654 53%, transparent 75%),
    linear-gradient(0deg, #06111678, transparent 38%);
  transition: opacity .3s ease, display .3s allow-discrete;
}
#start[hidden] { opacity: 0; pointer-events: none; }
.schichtmenue :is(#kopf, #fuss, #botListe, #meldung, #zahlen) { visibility: hidden; }
#buehne:focus { outline: none; }
#panel.upgradePanel {
  position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; width: min(520px, calc(100vw - 24px));
  min-height: 0; max-height: min(640px, calc(100dvh - 170px)); padding: 14px;
  overflow: hidden; background: #12212af5; z-index: 3;
}
#panel.upgradePanel[hidden], body.zuschauer #panel.upgradePanel { display: none; }
.upgradeKopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
#panel .upgradeKopf h2 { margin: 0; }
.upgradeListe { overflow: auto; overscroll-behavior: contain; }
.upgradeAusgang, .bauwahl, .bauabbruch {
  color: var(--text); font: inherit; border: 1px solid #53717c; background: #1c303a; cursor: pointer;
}
.upgradeAusgang { padding: 5px 8px; white-space: nowrap; }
.upgradeAusgang:hover, .bauwahl:hover:not(:disabled), .bauabbruch:hover { background: #294654; border-color: var(--erz); }
#baumenue {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 4;
  width: min(340px, calc(100vw - 24px), 68dvh); aspect-ratio: 1; border-radius: 50%;
  background: repeating-conic-gradient(from 45deg, #5c7882 0deg 1deg, #14252ff5 1deg 90deg);
  border: 2px solid #6ba9b4; box-shadow: 0 12px 45px #000a, inset 0 0 0 6px #0d1922;
}
.bauwahl, .bauabbruch { position: absolute; transform: translate(-50%, -50%); }
.bauwahl { width: 32%; min-height: 46px; padding: 5px 2px; border-radius: 5px; font-size: clamp(11px, 3vw, 13px); }
.bauwahl .preis { display: block; margin-top: 2px; font-size: 12px; }
.bauwahl:disabled { opacity: .54; cursor: default; }
.bauabbruch {
  inset: 50% auto auto 50%; width: 29%; aspect-ratio: 1; border-radius: 50%;
  background: #0e1d26; font-size: clamp(10px, 3vw, 13px);
}
.bauabbruch kbd { display: block; color: var(--stahl); margin-top: 3px; }
#bauhinweis {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); pointer-events: none;
  width: max-content; max-width: calc(100vw - 24px); padding: 6px 10px; text-align: center;
  background: var(--dunkel); border: 1px solid var(--rand); color: #ffc875; font-weight: 650;
}
@media (prefers-reduced-motion: reduce) {
  #start { transition: none; }
}

/* Ladebildschirm: Illustration rechts, Titel und Balken links im Dunkel (wie der Startbildschirm) */
#laden {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end;
  padding: 44px clamp(26px, 7vw, 138px) clamp(48px, 13vh, 140px);
  background: #061116; transition: opacity .5s ease;
}
#laden img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 68% 50%; }
#laden::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, #061116f2, #061116b3 30%, transparent 62%), linear-gradient(0deg, #061116d0, transparent 45%);
}
#laden.fertig { opacity: 0; pointer-events: none; }
.laden-inhalt { position: relative; z-index: 1; width: min(100%, 460px); }
#laden h1 { margin-bottom: 30px; }
.ladebalken { height: 5px; background: #ffffff1c; box-shadow: inset 0 0 0 1px #ffffff12; overflow: hidden; }
#ladeFortschritt {
  height: 100%; background: var(--erz); box-shadow: 0 0 14px #f7a54980;
  transform-origin: left; transform: scaleX(0); animation: ladeStart 1.2s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes ladeStart { to { transform: scaleX(.1); } }
#ladeText {
  margin: 12px 0 0; color: #a7b6b7; font: 12px/1.4 ui-monospace, monospace;
  letter-spacing: .04em; text-shadow: 0 1px 4px #000;
}
@media (max-width: 760px) {
  #laden img { object-position: 62% 50%; }
  #laden::after { background: linear-gradient(0deg, #061116f2, #061116a0 45%, transparent 75%); }
}
@media (prefers-reduced-motion: reduce) {
  #laden, #ladeFortschritt { transition: none !important; animation: none; }
}
.start-inhalt { width: min(100%, 580px); }
.start-inhalt h1, #laden h1 {
  margin: 0 0 11px;
  font-family: 'Arial Black', 'Helvetica Neue', sans-serif;
  font-weight: 950; font-size: clamp(57px, 8vw, 140px);
  letter-spacing: -.071em; text-transform: uppercase; line-height: .88;
  color: #eff4ee; text-shadow: 0 5px 30px #0009;
}
.start-inhalt h1 span, #laden h1 span { color: var(--erz); }
.start-inhalt .unter {
  margin: 23px 0 10px; color: #aee2e7; opacity: 1;
  font-weight: 750; font-size: clamp(11px, 1.12vw, 17px); text-transform: uppercase; letter-spacing: .13em;
}
.start-inhalt .einsatz { max-width: 36ch; margin: 0 0 28px; color: #dee7e6; font-size: clamp(15px, 1.32vw, 21px); line-height: 1.55; }
#los {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 34px;
  padding: 13px 20px 13px 22px; border: 1px solid #ffd68e; border-radius: 0;
  text-transform: uppercase; letter-spacing: .085em; font-size: 13px;
  font-weight: 850; color: #23170b; background: var(--erz); box-shadow: 0 4px 28px #f7a5492e;
}
#los span { font-size: 21px; line-height: 1; }
#los:hover { background: #ffda97; }
#los:focus, summary:focus, .knoepfe button:focus { outline: 2px solid var(--kristall); outline-offset: 4px; }
:is(#panel, #baumenue) button:focus { outline: 2px solid var(--kristall); outline-offset: -3px; }
#start details { width: fit-content; max-width: 410px; margin-top: 21px; color: #d4e0de; text-shadow: 0 2px 6px #000; }
#start details[open] { padding: 8px 14px 4px; background: #0a161de8; border-left: 1px solid var(--rand); }
#start summary { cursor: pointer; width: fit-content; font-weight: 700; }
.sprachwahl { display: flex; gap: 4px; margin: 14px 0 0; }
.sprachwahl button { padding: 4px 10px; font: inherit; font-size: 13px; color: #d4e0de; background: #0a161dc0; border: 1px solid var(--rand); border-radius: 6px; cursor: pointer; }
.sprachwahl button[aria-pressed="true"] { color: #241a12; background: var(--erz); border-color: var(--erz); font-weight: 700; }
.sprachwahl button:focus { outline: 2px solid var(--kristall); outline-offset: 2px; }
#start .steuerung { color: #b6c8c9; font-size: 13px; }
#startEinstellungen { color: #a7b6b7; opacity: 1; font: 11px ui-monospace, monospace; margin-top: 15px; }
#ende { z-index: 20; background: #071118c9; }
#ende .karte-inhalt { background: #111f28; border-radius: 0; border-top: 3px solid var(--erz); box-shadow: 0 24px 65px #0008; }
#ende .zahlenraster div, #endeKurve svg { background: #1c2d36; border-radius: 2px; }
#ende .knoepfe button { border-radius: 2px; }
@media (max-width: 760px) {
  #kopf {
    top: 8px; width: calc(100% - 16px); max-width: 480px;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .feld { padding: 4px 7px; gap: 4px 7px; flex-wrap: wrap; min-width: 0; }
  #uhr, #welle, .lager { font-size: 14px; }
  #naechste { font-size: 10px; }
  #kopf .balken { width: 58px; }
  #panel { right: 8px; top: 112px; width: min(310px, 49vw); min-height: 0; max-height: min(36dvh, 390px); }
  #panel .eintrag { flex-wrap: wrap; gap: 3px; }
  #kumpelInfo { left: 8px; bottom: 8px; min-width: 0; width: min(244px, calc(100% - 111px)); }
  #kumpelInfo .zeile { flex-wrap: wrap; gap: 4px; }
  #kumpelInfo .balken { width: min(88px, 32%); }
  #kumpelInfo #rucksackZahl { font-size: 10px; }
  #stationHinweis:empty { display: none; }
  #kartenrahmen { right: 8px; bottom: 8px; width: 94px; }
  #kartenrahmen figcaption { font-size: 8px; letter-spacing: .09em; }
  #meldung { top: 92px; max-width: 84%; font-size: 14px; }
  #meldung .warn { font-size: 16px; }
  #start {
    align-items: safe flex-end;
    padding-block: 22px;
    background: linear-gradient(0deg, #061116fc 8%, #061116d9 32%, #06111635 64%, transparent 80%);
  }
  #start:has(details[open]) {
    background: linear-gradient(0deg, #061116fc 8%, #061116d9 42%, #061116b3 100%);
  }
}
@media (max-width: 420px) {
  #start .start-inhalt h1 { font-size: 15vw; }
}
@media (max-height: 520px) {
  #kartenrahmen { width: 82px; }
  #panel { max-height: min(42dvh, 220px); }
  #ende .zahlenraster { grid-template-columns: repeat(2, 1fr); }
}
@media (width < 600px) {
  #fuss {
    position: fixed; inset: auto 8px 8px; display: grid;
    grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px;
    pointer-events: none;
  }
  #kumpelInfo { position: static; width: fit-content; max-width: 100%; padding: 4px 8px; }
  #kumpelInfo .zeile > span:first-child { width: 59px; }
  #kumpelInfo .balken { width: clamp(32px, 12vw, 64px); }
  body:not(.zuschauer) #fuss:has(#panel:not([hidden])) #stationHinweis:not(.einstieg) { display: none; }
  #panel {
    position: static; grid-column: 1 / -1; width: 100%; max-height: 40dvh;
    pointer-events: auto; overscroll-behavior: contain; padding: 8px 10px;
  }
  #kartenrahmen { position: relative; inset: auto; width: auto; padding: 0; pointer-events: auto; }
  #kartenrahmen figcaption { display: none; }
  #karteKnopf {
    display: block; padding: 7px 8px; border: 0; background: transparent;
    color: var(--stahl); font-size: 11px; font-weight: 750; cursor: pointer;
  }
  #karteKnopf:focus-visible { outline: 2px solid var(--kristall); }
  #karteKnopf span { display: inline-block; }
  #karteKnopf[aria-expanded="true"] span { transform: rotate(180deg); }
  #karte {
    display: none; position: absolute; right: 0; bottom: calc(100% + 5px);
    width: min(128px, 28dvh);
  }
  #karteKnopf[aria-expanded="true"] + #karte { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  #warnpfeil { animation: none; }
  #meldung div { animation-name: meldung-ruhend; }
  @keyframes meldung-ruhend { 90% { opacity: 1; } 100% { opacity: 0; } }
}

/* Mehrspieler: Einstieg auf dem Startbildschirm und Lobby (Regelwerk Abschnitt 35) */
.mehrspieler { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 18px; color: #c8d6d5; font-size: 13px; text-shadow: 0 2px 6px #000; }
.mehrspieler[hidden] { display: none; }
.mehrspieler > span { width: 100%; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: #aee2e7; }
.mehrspieler form { display: flex; gap: 0; }
#raumListe { width: 100%; margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
#raumListe[hidden] { display: none; }
#raumListe button { width: 100%; text-align: left; font-family: ui-monospace, monospace; }
#raumListe .leer { opacity: .7; font-size: 12px; }
.mehrspieler button, #lobby button { padding: 7px 13px; font: inherit; font-size: 13px; font-weight: 700; color: #e4ebea; background: #0a161dd0; border: 1px solid var(--rand); border-radius: 0; cursor: pointer; }
.mehrspieler button:hover, #lobby button:hover:not(:disabled) { border-color: var(--erz); color: #fff; }
.mehrspieler input, #lobby input { font: 700 14px ui-monospace, monospace; color: #fff; background: #061116e0; border: 1px solid var(--rand); padding: 7px 10px; border-radius: 0; }
#raumCode { width: 7ch; text-transform: uppercase; letter-spacing: .2em; border-right: 0; }
:is(.mehrspieler, #lobby) :is(button, input):focus { outline: 2px solid var(--kristall); outline-offset: 2px; }
.lobbymodus .laden-inhalt { visibility: hidden; }
#lobby {
  position: fixed; inset: 0; z-index: 41; display: flex; align-items: safe center; overflow: auto;
  padding: 44px clamp(26px, 7vw, 138px);
}
#lobby[hidden] { display: none; }
.lobby-inhalt { width: min(100%, 460px); color: #dee7e6; }
#lobby h1 {
  margin: 0 0 11px; font-family: 'Arial Black', 'Helvetica Neue', sans-serif; font-weight: 950;
  font-size: clamp(48px, 6.5vw, 110px); letter-spacing: -.071em; text-transform: uppercase; line-height: .88; color: #eff4ee; text-shadow: 0 5px 30px #0009;
}
#lobby h1 span { color: var(--erz); }
#lobby .unter { margin: 20px 0 18px; color: #aee2e7; font-weight: 750; font-size: 13px; text-transform: uppercase; letter-spacing: .13em; }
#lobby h2 { margin: 18px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: #aee2e7; }
.raumcode { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 12px 14px; background: #0a161de8; border-left: 3px solid var(--erz); }
.raumcode > span { width: 100%; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #a7b6b7; }
#lobbyCode { font: 900 38px/1 ui-monospace, monospace; letter-spacing: .18em; color: var(--erz); }
.lobbyName { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; }
.lobbyName input { flex: 1; min-width: 0; }
#lobbySpieler { list-style: none; margin: 0; padding: 0; }
#lobbySpieler li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #0a161dc0; border-bottom: 1px solid #ffffff10; }
#lobbySpieler li i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
#lobbySpieler li.bot b { color: #a7b6b7; font-weight: 600; }
#lobbySpieler .klein { font-size: 11px; color: #a7b6b7; text-transform: uppercase; letter-spacing: .06em; }
#lobbyBots { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
#lobbyBots[hidden] { display: none; }
#lobbyBots button { width: 32px; padding: 4px 0; }
#lobbyBots button:disabled { opacity: .4; cursor: default; }
#lobbyHinweis { min-height: 1.4em; margin: 14px 0; font-size: 13px; color: #c8d6d5; }
#lobbyHinweis.fehler { color: #ff9d80; }
.lobby-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; }
#lobby #lobbyStart { display: inline-flex; gap: 20px; padding: 12px 20px; border: 1px solid #ffd68e; color: #23170b; background: var(--erz); text-transform: uppercase; letter-spacing: .085em; font-weight: 850; }
#lobby #lobbyStart:hover { background: #ffda97; color: #23170b; }
#lobby #lobbyStart[hidden], #lobbyRaum[hidden] { display: none; }
@media (max-width: 760px) { #lobby { align-items: safe flex-end; padding: 22px; background: linear-gradient(0deg, #061116fc 20%, #061116c0 70%, transparent); } }
