:root {
  --bg: #0c0e13;
  --panel: #12151c;
  --panel-2: #181c25;
  --line: #262b36;
  --text: #e3e6ec;
  --muted: #8b93a3;
  --accent: #ffc24a;
  --blue: #4a90ec;
  --red: #e84e4e;
  --good: #5cc27a;
  --warn: #f0a83a;
  --bad: #e5574b;
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  font-size: 13px;
  color: var(--text);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* hidden gewinnt immer gegen display-Regeln */
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; }
body {
  display: grid;
  grid-template: "top top" 54px "rail map" 1fr / 70px 1fr;
}
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
kbd { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: 11px; }

/* ---------- Kopfleiste ---------- */
#top {
  grid-area: top; display: flex; align-items: center; gap: 14px; padding: 0 12px; white-space: nowrap; min-width: 0;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; letter-spacing: .12em; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.chip { font-size: 11px; letter-spacing: .04em; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.chip.blue { color: var(--blue); border-color: #2b4f80; }
.chip.red { color: var(--red); border-color: #7a2e2e; }
.clock #date { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.clock #weather { font-size: 11px; }
.clock { min-width: 190px; }
.timectl { display: flex; align-items: center; gap: 8px; }
.iconbtn { width: 34px; height: 30px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); font-size: 14px; }
.iconbtn:hover { border-color: #3a4152; }
#play.running { color: var(--good); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: var(--panel-2); padding: 6px 8px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: #2a2414; color: var(--accent); }
.kpis { display: flex; gap: 14px; }
.kpi { display: flex; flex-direction: column; line-height: 1.25; }
.kpi .lbl { font-size: 10.5px; color: var(--muted); }
.kpi .val { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.toggles { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.tog { border: 1px solid var(--line); background: var(--panel-2); border-radius: 6px; padding: 5px 7px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tog.on { color: var(--text); border-color: #4b5466; background: #1f2430; }
.tog.on::before { content: "● "; color: var(--accent); }

/* ---------- Seitenleisten ---------- */
#left, #right { background: var(--panel); overflow: hidden; display: flex; flex-direction: column; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; border: 0; background: transparent; padding: 11px 4px; color: var(--muted); font-weight: 600; font-size: 12px; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.panel { flex: 1; overflow-y: auto; padding: 12px 14px 24px; }
.card { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.card.grow { flex: 1; overflow: hidden; display: flex; flex-direction: column; border-bottom: 0; }

.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.btn, .primary, .modal button {
  border: 1px solid var(--line); background: var(--panel-2); border-radius: 6px; padding: 7px 10px; font-size: 12px;
}
.btn:hover { border-color: #3d4556; background: #1d222c; }
.btn:disabled { opacity: .45; cursor: default; }
.primary { background: #2a2414; border-color: #5c4a1e; color: var(--accent); font-weight: 600; }
.primary:hover { background: #352c16; }
.primary.red { background: #2a1416; border-color: #6a2a2e; color: #ff8a80; }
.btn.small { padding: 4px 8px; font-size: 11.5px; }
.btn.danger { color: #ff8a80; }
.full { width: 100%; }
.note { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 6px 0 12px; }

/* Operationen */
.op { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); margin-bottom: 10px; }
.op-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.op-name { font-weight: 700; }
.status { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.status.aktiv { background: #2a2414; color: var(--accent); }
.status.erreicht { background: #15291c; color: var(--good); }
.status.abgebrochen { background: #2a1416; color: #ff8a80; }
.op-body { padding: 6px 10px 10px; }
.op-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* Einheitenliste */
.group { margin-bottom: 12px; }
.group h4 { margin: 0 0 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; }
.urow { display: grid; grid-template-columns: 30px 1fr 64px; gap: 6px; align-items: center; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.urow:hover { background: #1b1f29; }
.urow.sel { background: #2a2414; outline: 1px solid #5c4a1e; }
.urow .sym { display: flex; justify-content: center; }
.urow .nm { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow .sub { font-size: 10.5px; color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 3px; }
.bar { height: 5px; background: #262a33; border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; }
.kv { display: grid; grid-template-columns: 88px 1fr 42px; gap: 8px; align-items: center; margin: 4px 0; font-size: 12px; }
.kv .bar { height: 7px; }
.kv .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Logistik */
.depot { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin-bottom: 8px; background: var(--panel-2); }
.depot.cut { border-color: #6a2a2e; }
.depot .row { justify-content: space-between; }
.star { border: 0; background: transparent; font-size: 16px; color: #555d6d; padding: 0 2px; }
.star.on { color: var(--accent); }
.warn { color: var(--bad); font-weight: 600; font-size: 11.5px; }

/* Beschaffung */
.buy { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 8px; background: var(--panel-2); display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; }
.buy .t { font-weight: 600; }
.buy .d { font-size: 11px; color: var(--muted); }
select { font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px; width: 100%; }

/* Lage */
.terr { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 10px; font-variant-numeric: tabular-nums; }
.terr .delta.pos { color: var(--good); }
.terr .delta.neg { color: var(--bad); }
.spark { margin-top: 8px; width: 100%; height: 54px; display: block; }
.forces { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin-top: 10px; font-size: 12px; }

/* Meldungen */
.msgs { overflow-y: auto; flex: 1; margin-right: -6px; padding-right: 6px; }
.msg { display: grid; grid-template-columns: 74px 1fr; gap: 6px; padding: 5px 4px; border-radius: 5px; font-size: 12px; line-height: 1.35; }
.msg .tm { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.msg.link { cursor: pointer; }
.msg.link:hover { background: #1b1f29; }
.msg.blue .tx { color: #9cc4ff; }
.msg.red .tx { color: #ff9b94; }
.msg.bad .tx { color: #ffb4a8; }

/* Karte & Overlays */
#map { grid-area: map; position: relative; }
.maplibregl-ctrl-attrib { background: rgba(12, 14, 19, .7) !important; }
.maplibregl-ctrl-attrib a { color: #9aa3b3 !important; }
.maplibregl-popup-content { background: #0f1218; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.maplibregl-popup-tip { border-top-color: #0f1218 !important; border-bottom-color: #0f1218 !important; }
.pop-title { font-weight: 700; margin-bottom: 4px; }
#hint {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 20;
  background: #2a2414; border: 1px solid #5c4a1e; color: var(--accent); padding: 8px 14px; border-radius: 999px; font-weight: 600;
}
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 20;
  background: #0f1218ee; border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; max-width: 560px; text-align: center;
}
#ctx {
  position: fixed; z-index: 30; min-width: 250px; background: #0f1218; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.55); padding: 5px;
}
#ctx .ttl { padding: 6px 10px 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
#ctx button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 5px; }
#ctx button:hover { background: #1e2330; }
#ctx button .c { float: right; color: var(--muted); }
#ctx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
#selbox { position: fixed; z-index: 15; border: 1px solid var(--accent); background: rgba(255, 194, 74, .08); pointer-events: none; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-card { width: min(620px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.modal-card h2 { margin: 0 0 4px; letter-spacing: .1em; }
.modal-card h3 { margin-top: 18px; }
.help { padding-left: 18px; line-height: 1.55; color: #c9ced8; }

/* ---------- Mehrspieler, Verbände, Reserve-Leiste ---------- */
.small { font-size: 11.5px; }
.wrap { flex-wrap: wrap; }
.roles { display: flex; gap: 4px; flex-wrap: nowrap; }
.role { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; background: #1d2230; border: 1px solid var(--line); color: #c9ced8; }
.role.host { border-color: #5c4a1e; color: var(--accent); }
.dock {
  position: absolute; left: 56px; bottom: 34px; z-index: 5; max-width: calc(100% - 120px);
  background: rgba(15, 18, 24, .92); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
.dock-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.dock-title .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.dock-cards { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.dcard {
  flex: 0 0 auto; display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line); cursor: grab; user-select: none; min-width: 150px;
}
.dcard:hover { border-color: #5c4a1e; }
.dcard.pending { border-style: dashed; }
.dcard .t { font-size: 12px; font-weight: 600; }
.dcard .d { font-size: 10.5px; color: var(--muted); }
.drop-ok { outline: 2px dashed var(--accent) !important; outline-offset: -2px; }
.corps { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); margin-bottom: 10px; }
.corps-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.corps-head:hover { background: #1d222c; }
.corps-head b { font-size: 12.5px; }
.corps-body { padding: 4px 4px 6px; }
.sub { font-size: 10.5px; color: var(--muted); padding: 4px 6px 2px; text-transform: uppercase; letter-spacing: .05em; }
.urow[draggable=true] { cursor: grab; }
.enc { color: var(--bad); font-weight: 700; }
.line-row { display: grid; grid-template-columns: 1fr 70px auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: var(--panel-2); }
.chat-form { display: flex; gap: 6px; margin-top: 8px; }
.chat-form input, .modal input:not([type=range]):not([type=checkbox]) {
  flex: 1; font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px;
}
.msg.chat .tx { color: #ffe3a3; }
.msg.chat .tx b { color: var(--accent); }
.join-grid { display: grid; grid-template-columns: 1fr 160px; gap: 10px; margin: 8px 0; }
.join-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.join-roles { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.join-roles label { display: flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); font-size: 12px; }
.join-roles label.taken { opacity: .5; }
.join-players { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pchip { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); }
.pchip.off { opacity: .5; }
.vols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.vols label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.modal-card { max-height: 90vh; overflow-y: auto; }

.tabs button { font-size: 11.5px; padding: 11px 2px; }
@media (max-width: 1750px) { .kpi .lbl { font-size: 10px; } .clock { min-width: 150px; } .clock #weather { max-width: 230px; overflow: hidden; text-overflow: ellipsis; } }

/* ---------- Lage: Ziele, Stabilität, Operationen ---------- */
.will { display: grid; grid-template-columns: 52px 1fr 34px; gap: 6px; align-items: center; font-size: 12px; margin: 3px 0; }
.objs { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 8px; font-size: 12px; margin-top: 6px; max-height: 150px; overflow-y: auto; }
.objs .o { cursor: pointer; }
.objs .o:hover { color: var(--accent); }
.own-b { color: var(--blue); font-weight: 700; } .own-r { color: var(--red); font-weight: 700; } .own-0 { color: var(--muted); }
.stab { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; }
.stab .bar { width: 46px; }
.st-ruhig { color: var(--muted); } .st-stabil { color: var(--good); } .st-unter { color: var(--warn); } .st-kritisch { color: var(--bad); }
.opm { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 11.5px; margin: 6px 0 4px; }
.opm .k { color: var(--muted); }
.phase { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #1d2230; }
.ph-good { color: var(--good); } .ph-warn { color: var(--warn); } .ph-bad { color: var(--bad); } .ph-muted { color: var(--muted); }
.assess { font-size: 11.5px; margin-top: 2px; }
#result h2 { font-size: 26px; }
.result-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 16px; margin: 12px 0 18px; font-variant-numeric: tabular-nums; }

/* ---------- Kopfleiste: Ebenen-Menü, kleine Bildschirme ---------- */
.dropdown { position: relative; }
.dropmenu {
  position: absolute; right: 0; top: 36px; z-index: 35; display: flex; flex-direction: column; gap: 4px; min-width: 190px;
  background: #0f1218; border: 1px solid var(--line); border-radius: 8px; padding: 6px; box-shadow: 0 8px 30px rgba(0,0,0,.55);
}
.dropmenu[hidden] { display: none; }
.dropmenu .tog { text-align: left; padding: 7px 10px; }
@media (max-width: 1500px) {
  .roles { display: none; }
  .kpis { gap: 10px; }
  .clock { min-width: 140px; }
  .clock #weather { max-width: 180px; }
  .seg button { padding: 6px 6px; }
}
@media (max-width: 1320px) {
  #top { gap: 10px; }
  .brand { font-size: 13px; }
  .clock #weather { display: none; }
  .kpi.opt { display: none; }
}
/* ---------- Logistik: Nachschubkette ---------- */
.chain { display: flex; flex-direction: column; gap: 0; margin: 4px 0 12px; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.step .ic { font-size: 18px; text-align: center; }
.step .t { font-weight: 700; font-size: 12.5px; }
.step .v { font-size: 12px; margin-top: 2px; }
.step .x { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.arrow-down { text-align: center; color: var(--muted); font-size: 12px; line-height: 16px; }
.issue { padding: 7px 10px; border-left: 3px solid var(--bad); background: #24161a; border-radius: 4px; margin: 6px 0; font-size: 12px; }
.issue.warn { border-left-color: var(--warn); background: #2a2414; }
.issue.ok { border-left-color: var(--good); background: #15291c; }
/* Tabs: auf schmalen Leisten in zwei Zeilen umbrechen statt abschneiden */
.tabs { flex-wrap: wrap; }
.tabs button { flex: 1 0 auto; padding: 10px 8px; white-space: nowrap; }

/* ---------- rechte Leiste mit Tabs ---------- */
#right { gap: 0; }
.rpane { flex: 1; overflow-y: auto; border-bottom: 0; }
.rpane[hidden] { display: none; }
.msgpane { display: flex; flex-direction: column; overflow: hidden; }
.msgpane .msgs { flex: 1; }
.badge { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--accent);
  color: #1a1408; font-size: 10px; font-weight: 800; line-height: 16px; }
.badge[hidden] { display: none; }
/* ---------- Haltung & Abwehrbilanz ---------- */
.posture { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px 8px 2px; }
.posture button { border: 1px solid var(--line); background: #1a1e27; border-radius: 6px; padding: 4px 7px; font-size: 11px; color: var(--muted); }
.posture button.on { color: var(--accent); border-color: #5c4a1e; background: #2a2414; }
.balance { font-size: 11.5px; padding: 4px 10px 6px; color: #c9ced8; line-height: 1.5; }
.balance b.good { color: var(--good); } .balance b.bad { color: var(--bad); } .balance b.warn { color: var(--warn); }
/* ---------- Zulauf ---------- */
.pipe { display: grid; grid-template-columns: 26px 1fr 70px; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel-2); margin-bottom: 6px; font-size: 12px; }
.pipe .d { font-size: 10.5px; color: var(--muted); }
.seg.dest { flex-wrap: wrap; margin: 4px 0 12px; }
.seg.dest button { flex: 1 0 auto; }

/* ---------- Ebenen-Leiste auf der Karte ---------- */
.layerbar { position: absolute; left: 10px; top: 44px; z-index: 6; display: flex; flex-direction: column; gap: 2px;
  background: rgba(15,18,24,.86); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
/* kompakt: nur Symbole; beim Darüberfahren mit Beschriftung */
.lb { display: flex; align-items: center; gap: 7px; border: 1px solid transparent; background: transparent; border-radius: 6px;
  padding: 3px 4px; font-size: 11.5px; color: var(--muted); text-align: left; }
.lb .i { width: 18px; text-align: center; filter: grayscale(1); opacity: .55; font-size: 13px; }
.lb .l { display: none; white-space: nowrap; padding-right: 4px; }
.layerbar:hover .lb .l { display: inline; }
.lb:hover { background: #1b1f29; }
.lb.on { color: var(--text); background: #1f2430; border-color: #3a4152; }
.lb.on .i { filter: none; opacity: 1; }
.lb.head .i { filter: none; opacity: .8; }
.layerbar.collapsed .lb:not(.head) { display: none; }
/* ---------- Start & Einstellungen ---------- */
.start-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
.start { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2); }
.start b { font-size: 15px; } .start span { font-size: 12px; color: var(--muted); }
.start.blue b { color: var(--blue); } .start.red b { color: var(--red); }
.start:hover { border-color: var(--accent); }
details.mp { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.mp summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.modal-card.wide { width: min(680px, 94vw); }
.mtabs { margin: 6px 0 12px; }
.modal section[hidden] { display: none; }
/* ---------- Korps-Karten ---------- */
.filters { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.chipbtn { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 4px 10px; font-size: 11.5px; color: var(--muted); }
.chipbtn.on { color: var(--accent); border-color: #5c4a1e; background: #2a2414; }
.ccard { border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); margin-bottom: 10px; overflow: hidden; }
.ccard-head { padding: 9px 10px 7px; cursor: pointer; }
.ccard-head:hover { background: #1b1f29; }
.ccard-title { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ccard-title b { font-size: 13px; }
.comp { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 11.5px; color: #c9ced8; }
.comp span { display: inline-flex; align-items: center; gap: 3px; }
.cmeta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.ccard-body { border-top: 1px solid var(--line); padding: 4px; }
.ccard .posture { padding: 4px 10px 6px; }
.urow2 { display: grid; grid-template-columns: 24px 1fr auto 46px; gap: 6px; align-items: center; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.urow2:hover { background: #1b1f29; }
.urow2.sel { background: #2a2414; outline: 1px solid #5c4a1e; }
.urow2 .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-chip { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: #1d2230; color: var(--muted); white-space: nowrap; }
.st-chip.atk { color: #ff8a80; } .st-chip.march { color: #9cc4ff; } .st-chip.bad { color: var(--bad); } .st-chip.res { color: var(--accent); } .st-chip.op { color: var(--good); }
/* ---------- Auswahl ---------- */
.selhead { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.selhead .t { font-weight: 700; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.bars2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-bottom: 8px; }
.bars2 .kv { grid-template-columns: 62px 1fr 34px; margin: 0; }
.actbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.actbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel-2); font-size: 11px; }
.actbar button:hover { border-color: var(--accent); }
.actbar button .i { font-size: 16px; }
.actbar button.on { border-color: var(--accent); color: var(--accent); }
.submenu { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px dashed #5c4a1e; border-radius: 8px; margin-bottom: 8px; }
/* ---------- Beschaffungs-Katalog ---------- */
.catalog { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cat { display: grid; grid-template-columns: 24px 1fr; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel-2); text-align: left; }
.cat:hover:not(:disabled) { border-color: var(--accent); }
.cat:disabled { opacity: .45; }
.cat .t { font-size: 12px; font-weight: 600; } .cat .d { font-size: 10.5px; color: var(--muted); }
.bars2 { grid-template-columns: 1fr; gap: 3px; }
.bars2 .kv { grid-template-columns: 70px 1fr 40px; }
.cat .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat > div:last-child { min-width: 0; }

/* ---------- Planung, Feuer, Wirtschaft, Beurteilung ---------- */
.pstep { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; background: var(--panel-2); }
.ps-t { font-weight: 700; font-size: 12px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.ps-n { width: 18px; height: 18px; border-radius: 50%; background: #2a2414; color: var(--accent); font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center; }
.kinds, .mobs { display: flex; flex-direction: column; gap: 4px; }
.kind { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 6px 9px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--panel); }
.kind span { font-size: 11px; color: var(--muted); }
.kind.on { border-color: var(--accent); background: #221d10; }
.kind.on b { color: var(--accent); }
.kind:disabled { opacity: .55; cursor: default; }
.plist { display: flex; flex-direction: column; gap: 2px; max-height: 210px; overflow: auto; }
.prow { display: grid; grid-template-columns: 22px 1fr auto 20px; align-items: center; gap: 6px; font-size: 12px; }
.prow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .x { border: 0; background: transparent; color: var(--muted); padding: 0; }
.prow .x:hover { color: var(--bad); }
.estbox { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.estbox .big { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.why { font-size: 12px; padding: 5px 8px; border-radius: 6px; margin: 6px 0; background: var(--panel-2); border-left: 3px solid #3a4152; }
.why.ok { border-left-color: var(--good); }
.why.warn { border-left-color: var(--warn); color: #f5d49a; }
.why.bad { border-left-color: var(--bad); color: #ffb3ab; }
.whydot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.whydot.warn { background: var(--warn); } .whydot.bad { background: var(--bad); }
.firectl { margin: 8px 0; }
.firebar { display: flex; align-items: center; gap: 8px; padding: 0 10px 8px; }
.firebar .posture { flex: 1; margin: 0; }
.asmlist { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.asm { font-size: 12px; line-height: 1.4; padding: 5px 8px; border-radius: 6px; background: var(--panel-2); border-left: 3px solid #3a4152; }
.asm.ok { border-left-color: var(--good); } .asm.warn { border-left-color: var(--warn); } .asm.bad { border-left-color: var(--bad); }
.asm.link { cursor: pointer; } .asm.link:hover { background: #1f2430; }
.econ { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; font-size: 12px; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.town { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; margin: 6px 0; background: var(--panel-2); display: flex; flex-direction: column; gap: 5px; }
.bchips { display: flex; flex-wrap: wrap; gap: 4px; }
.bchip { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: #1f2a1f; border: 1px solid #36513a; }
.bchip.wip { background: #2a2414; border-color: #5a4a22; }
.seg.diff button { padding: 5px 10px; }
/* Mischpult */
.mixer { position: fixed; top: 62px; right: 12px; z-index: 40; width: 330px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.mixer .np { margin-top: 8px; font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; }
.iconbtn.small { width: 26px; height: 24px; font-size: 12px; }
.mixrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 8px; }
.mixrow select { flex: 1; }
.mixgrid { display: grid; grid-template-columns: 110px 1fr; gap: 4px 8px; align-items: center; font-size: 12px; }
.mixtoggles { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; font-size: 12px; }
.mixtoggles .tg { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.vbar { position: relative; height: 10px; border-radius: 5px; overflow: hidden; background: #1a1e27; margin: 8px 0 2px; }
.vbar .z { position: absolute; top: 0; bottom: 0; }
.vbar .z.hold { background: rgba(74,144,236,.45); } .vbar .z.draw { background: rgba(255,194,74,.3); } .vbar .z.win { background: rgba(232,78,78,.45); }
.vbar .mark { position: absolute; top: -1px; bottom: -1px; width: 3px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px #000; }
.vlab { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-bottom: 4px; }
.mixlist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.mixlist .posture { padding: 0; }
.pl-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pl-group .muted { width: 62px; }
.pl { border: 1px solid var(--line); background: #1a1e27; border-radius: 6px; padding: 3px 8px; font-size: 11.5px; color: var(--muted); }
.pl.on { color: var(--accent); border-color: #5c4a1e; background: #2a2414; }
.pl.playing { color: var(--text); border-color: #4b5466; }

.ticon { font-size: 22px; width: 30px; text-align: center; }
.ttable { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ttable .tr { display: grid; grid-template-columns: minmax(0, 1fr) 30px 40px 42px; gap: 5px; align-items: center; padding: 5px 6px;
  font-size: 12px; border-top: 1px solid var(--line); cursor: pointer; }
.ttable .tr:first-child { border-top: 0; }
.ttable .th { background: var(--panel-2); color: var(--muted); font-size: 10.5px; cursor: default; }
.ttable .tr:not(.th):hover { background: #1b1f29; } .ttable .tr.sel { background: #2a2414; }
.ttable .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttable .num { text-align: right; font-variant-numeric: tabular-nums; }
.ttable .ic .wip { opacity: .5; }
.picker { border: 1px solid #3a4152; border-radius: 8px; padding: 6px; margin: 6px 0; background: var(--panel); }
.pk-list { max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.pk-h { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 6px 2px 2px; }
.pk { display: grid; grid-template-columns: 16px 20px 1fr auto; gap: 6px; align-items: center; padding: 3px 4px; border-radius: 5px; cursor: pointer; font-size: 12px; }
.pk:hover { background: #1b1f29; } .pk.on { background: #221d10; }
.pk .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk .warn { color: var(--warn); }
.minicat { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 6px 0; }
.ccard .minicat { padding: 0 10px 8px; }
.rbtn { border: 1px solid var(--line); background: #1a1e27; border-radius: 4px; font-size: 10px; padding: 0 5px; color: var(--muted); }
.rbtn.on { color: var(--accent); border-color: #5c4a1e; background: #2a2414; }
.prow { grid-template-columns: 22px 1fr auto 22px 20px; }
.tgline { display: flex; align-items: center; gap: 6px; font-size: 12px; margin: 0 0 8px; cursor: pointer; }
.dbtns { display: flex; gap: 3px; margin-top: 4px; }
.dbtns button, .dock-all button { border: 1px solid var(--line); background: #1a1e27; border-radius: 4px; font-size: 10.5px; padding: 1px 6px; color: var(--text); }
.dbtns button:hover, .dock-all button:hover { border-color: var(--accent); color: var(--accent); }
.dock-all { margin-left: 10px; font-size: 11px; color: var(--muted); display: inline-flex; gap: 3px; align-items: center; }
#rate { color: var(--warn); }
.jopts { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; margin: 6px 0 4px; }
.jopts .seg { flex-wrap: wrap; }
.dcard { min-width: 0; padding: 5px 8px; }
.npchip { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 4px 10px; font-size: 11.5px;
  color: var(--muted); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.npchip.flash { animation: npflash 2.4s ease-out; }
@keyframes npflash { 0% { color: var(--accent); border-color: var(--accent); background: #2a2414; } 100% { } }

/* ---------- Schubladen, kompakte Listen ---------- */
.drawer { border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; background: var(--panel-2); overflow: hidden; }
.dr-h { width: 100%; display: flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 7px 10px;
  font-weight: 700; font-size: 12px; text-align: left; }
.dr-h .muted { font-weight: 400; margin-left: auto; }
.dr-h:hover { background: #1f2430; }
.dr-c { width: 12px; color: var(--muted); }
.dr-b { padding: 4px 10px 10px; }
.drawer .drawer { background: var(--panel); }
.empty { color: var(--muted); font-size: 12px; padding: 10px 2px; }
.op.compact { padding: 0; }
.oprow { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "k n r" "k p b"; gap: 3px 6px;
  align-items: center; padding: 7px 9px; cursor: pointer; font-size: 12px; }
.oprow .opk { grid-area: k; } .oprow .opn { grid-area: n; } .oprow .opr { grid-area: r; }
.oprow .phase { grid-area: p; justify-self: start; } .oprow .opbar { grid-area: b; display: flex; align-items: center; gap: 4px; width: 90px; }
.oprow:hover { background: #1f2430; }
.opk { color: var(--accent); text-align: center; }
.opn { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opr { font-variant-numeric: tabular-nums; text-align: right; font-size: 11px; }
.opbar .bar { width: 100%; }
.sub-h { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 6px 0 2px; }
.segrow { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 8px; }
.segrow button { border: 1px solid var(--line); background: #1a1e27; border-radius: 6px; padding: 4px 8px; font-size: 11.5px; color: var(--muted); }
.segrow button.on { color: var(--accent); border-color: #5c4a1e; background: #2a2414; }
.segrow button:disabled { opacity: .5; }
.lv { font-size: 11.5px; font-weight: 600; margin-top: 4px; }
.lvrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; padding: 4px 0; border-top: 1px solid var(--line); }
.factors { font-size: 11px; color: var(--muted); margin: 2px 0 6px; }
.factors b { color: var(--text); font-weight: 600; }
.econ .neg { color: var(--bad); }
.kinc { font-size: 11px; font-weight: 600; } .kinc.pos { color: var(--good); } .kinc.neg { color: var(--bad); }
.dcard.sel { border-color: var(--accent); background: #2a2414; }
.dock-all button.hl { border-color: var(--accent); color: var(--accent); }
.scen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 10px; }
.scen { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2); font-size: 11.5px; color: var(--muted); }
.scen b { color: var(--text); font-size: 13px; } .scen .reg { color: var(--accent); font-size: 11px; font-weight: 600; }
.scen.on { border-color: var(--accent); background: #221d10; }
.scen:disabled { opacity: .45; cursor: not-allowed; }
.upg { display: flex; flex-wrap: wrap; gap: 4px; margin: -2px 0 8px; }
.ubtn { border: 1px dashed #3a4152; background: transparent; border-radius: 5px; padding: 2px 6px; font-size: 11px; color: var(--text); }
.ubtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.ubtn:disabled { opacity: .45; }
.uchip { font-size: 11px; padding: 2px 6px; border-radius: 5px; background: #1f2a1f; border: 1px solid #36513a; }
.uchip.wip { background: #2a2414; border-color: #5a4a22; }

/* ---------- Kommandoleiste ---------- */
.cmdbar { position: absolute; left: 56px; bottom: 30px; z-index: 6; display: grid; max-width: calc(100% - 120px);
  grid-template-columns: minmax(200px, 340px) auto; gap: 0;
  background: rgba(15, 18, 24, .95); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.5); }
.cb-col { padding: 7px 10px; min-width: 0; }
.cb-col + .cb-col { border-left: 1px solid var(--line); }
.cb-h { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.cb-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 6px; }
.cb-sum span { display: inline-flex; align-items: center; gap: 3px; }
.cb-res { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; align-items: center; }
.rchip { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line);
  background: var(--panel-2); border-radius: 6px; padding: 3px 7px 5px; font-size: 11.5px; overflow: hidden; }
.rchip i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--good); }
.rchip.on { border-color: var(--accent); background: #2a2414; color: var(--accent); }
.lnk { border: 0; background: transparent; color: var(--accent); font-size: 11.5px; padding: 2px 4px; white-space: nowrap; }
.lnk:hover { text-decoration: underline; }
.cb-btns { display: grid; grid-template-columns: repeat(3, auto); gap: 4px; }
.cb-btns button { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 7px;
  padding: 5px 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.cb-btns button .i { color: var(--accent); }
.cb-btns button:hover:not(:disabled) { border-color: var(--accent); }
.cb-btns button:disabled { opacity: .4; cursor: default; }
.cb-buyrow { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.bq { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 44px; border: 1px solid var(--line);
  background: var(--panel-2); border-radius: 7px; padding: 4px 5px; font-size: 10.5px; }
.bq .lb { max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.bq .pr { color: var(--accent); font-weight: 700; }
.bq .em { font-size: 15px; line-height: 18px; }
.bq.mat { background: #1a1e27; }
.bq:hover:not(:disabled) { border-color: var(--accent); }
.bq:disabled { opacity: .4; }
.cb-dest { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.destbtn { border: 1px solid #5c4a1e; background: #2a2414; color: var(--accent); border-radius: 6px; padding: 2px 8px; font-size: 11.5px; font-weight: 600; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }
.cbmenu { position: fixed; z-index: 50; min-width: 240px; max-height: 60vh; overflow: auto; background: var(--panel); border: 1px solid #3a4152;
  border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.55); display: flex; flex-direction: column; }
.cbmenu button { text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 6px 9px; font-size: 12.5px; }
.cbmenu button:hover { background: #1f2430; }
.cbmenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.cbm-h { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 4px 9px; }
.cbm-s { font-size: 10.5px; color: var(--muted); padding: 4px 9px 0; }
.line-row.sel { background: #2a2414; border-radius: 6px; }
@media (max-width: 1380px) { .cb-btns { grid-template-columns: repeat(2, auto); } }

/* ---------- Planer ---------- */
.plan-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; }
.psec { border-top: 1px solid var(--line); padding: 8px 0; }
.pl-l { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.psec .segrow { margin: 4px 0 0; }
.keil { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto 18px; gap: 6px; align-items: center; font-size: 12px; padding: 3px 0; }
.keil span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgrp { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 3px 0; }
.pg-l { width: 100%; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.uchp { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.uchp.res { border-color: #5c4a1e; }
.uchp.buy { border-style: dashed; }
.pc-main { position: relative; display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 3px 6px 5px; font-size: 11.5px; }
.pc-main i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--good); }
.pc-x { border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); padding: 0 5px; font-size: 11px; }
.pc-x:hover { color: var(--bad); }
.whylist { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; }
.psec.est { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.psec.est .big { font-size: 20px; font-weight: 800; }

/* ---------- Übersicht (rechts oben) ---------- */
.ovw { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 8px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ov { display: grid; grid-template-columns: 18px 1fr; grid-template-areas: "i t" "i a" "i b"; column-gap: 6px; text-align: left;
  border: 1px solid var(--line); border-left: 3px solid var(--good); background: var(--panel-2); border-radius: 7px; padding: 5px 7px; min-width: 0; }
.ov.warn { border-left-color: var(--warn); } .ov.bad { border-left-color: var(--bad); }
.ov-i { grid-area: i; font-size: 14px; align-self: center; }
.ov-t { grid-area: t; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ov-a { grid-area: a; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-b { grid-area: b; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov:hover { background: #1f2430; }
/* ruhige Zahlen: gleiche Ziffernbreite, damit Zeilen beim Aktualisieren nicht springen */
#left, #right, .cmdbar, #top { font-variant-numeric: tabular-nums; }
.panel, .rpane { overscroll-behavior: contain; scrollbar-gutter: stable; }
.cb-toggle { position: absolute; top: 4px; right: 6px; z-index: 2; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.cmdbar.min .cb-toggle { transform: rotate(180deg); }
/* eingeklappt: nur Befehle und Kaufknöpfe in einer Zeile */
.cmdbar.min .cb-h, .cmdbar.min .cb-dest, .cmdbar.min .cb-res, .cmdbar.min .bq .lb { display: none; }
.cmdbar.min .cb-btns { grid-template-columns: repeat(6, auto); }
.cmdbar.min .cb-btns button { padding: 4px 7px; }
.cmdbar.min .cb-sum { margin: 0; }
.cmdbar.min .cb-col { padding: 5px 8px; }

/* ---------- Schnellkauf (rechts) ---------- */
.qbuy { padding: 0 8px 8px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.qb-h { width: 100%; display: flex; justify-content: space-between; align-items: center; border: 0; background: transparent;
  padding: 2px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.qb-h .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.qgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.qgrid .bq { min-width: 0; padding: 4px 2px; }
.qgrid .bq .lb { max-width: 100%; }
.qbuy .cb-dest { margin-top: 6px; flex-wrap: wrap; }
.kfc { font-size: 10px; font-weight: 700; white-space: nowrap; }
.kfc.pos { color: var(--good); } .kfc.neg { color: var(--bad); } .kfc.mid { color: var(--warn); }

/* =====================================================================
   Spieloberfläche: Karte vollflächig, Schubladen, Ressourcen, Befehlskarte
   ===================================================================== */
#top { gap: 12px; }
.res { display: flex; gap: 6px; align-items: center; }
.rs { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px;
  padding: 3px 9px 3px 6px; line-height: 1.15; }
.rs .ic { font-size: 16px; }
.rs .v { font-weight: 800; font-size: 13.5px; }
.rs .s { font-size: 10px; color: var(--muted); }
.rs.warn { border-color: #6a5320; } .rs.warn .v { color: var(--warn); }
.rs.bad { border-color: #6a2a2a; } .rs.bad .v { color: var(--bad); }
.rs:hover { border-color: #4b5466; }
.victory { display: flex; flex-direction: column; align-items: flex-end; border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 8px; padding: 3px 10px; line-height: 1.15; }
.victory .lbl { font-size: 10px; color: var(--muted); } .victory .val { font-weight: 800; font-size: 14px; }
.victory .kday { font-size: 10px; color: var(--muted); }
.hbtn { position: relative; width: 34px; height: 30px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); font-size: 14px; }
.hbtn .badge { position: absolute; top: -6px; right: -6px; margin: 0; }
.badge.red { background: var(--bad); color: #fff; }
/* Navigationsschiene */
.rail { grid-area: rail; display: flex; flex-direction: column; gap: 4px; padding: 8px 4px; background: var(--panel); border-right: 1px solid var(--line); }
.rail button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1px solid transparent; background: transparent;
  border-radius: 9px; padding: 7px 0 6px; color: var(--muted); }
.rail .ri { font-size: 19px; line-height: 22px; filter: grayscale(.6); }
.rail .rl { font-size: 9.5px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.rail button:hover { background: #1b1f29; color: var(--text); }
.rail button.on { background: #2a2414; border-color: #5c4a1e; color: var(--accent); }
.rail button.on .ri { filter: none; }
/* Schubladen über der Karte */
.flyout { position: absolute; top: 0; bottom: 0; z-index: 20; width: 370px; max-width: calc(100% - 40px); background: rgba(18,21,28,.98);
  box-shadow: 0 0 30px rgba(0,0,0,.55); display: flex; flex-direction: column; }
.flyout.dl { left: 0; border-right: 1px solid var(--line); }
.flyout.dr { right: 0; width: 340px; border-left: 1px solid var(--line); }
.dr-top { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 6px 14px; border-bottom: 1px solid var(--line);
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); flex-shrink: 0; }
.dr-top b { color: var(--text); }
.flyout .rpane { padding: 10px 12px; }
.layerbar { top: 44px; }
.flyout.dl:not([hidden]) ~ .layerbar { display: none; }
/* Meldungsstrom */
.feed { position: absolute; top: 10px; right: 56px; z-index: 15; width: 300px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.fcard { pointer-events: auto; cursor: pointer; background: rgba(18,21,28,.96); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 8px; padding: 7px 10px; font-size: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.45); animation: fin .25s ease-out; }
.fcard.bad { border-left-color: var(--bad); } .fcard.good { border-left-color: var(--good); } .fcard.blue { border-left-color: var(--blue); }
.fcard.out { opacity: 0; transition: opacity .6s; }
@keyframes fin { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
/* Befehlskarte unten */
.cmdbar { left: 50%; right: auto; bottom: 26px; transform: translateX(-50%); width: min(980px, calc(100% - 40px)); max-width: none;
  display: flex; flex-direction: column; padding: 0; grid-template-columns: none; }
.cc-tabs { display: flex; align-items: center; gap: 2px; padding: 5px 8px 0; border-bottom: 1px solid var(--line); }
.cc-tabs button[data-act=cc-mode] { border: 0; background: transparent; padding: 5px 12px 6px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid transparent; }
.cc-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.cc-info { margin-left: auto; margin-right: 26px; font-size: 11.5px; color: var(--muted); }
.cmdbar .cb-toggle { top: 6px; }
.cc-body { display: grid; grid-template-columns: minmax(180px, 250px) 1fr minmax(150px, 210px); gap: 0; }
.cc-left, .cc-main, .cc-right { padding: 8px 10px; min-width: 0; }
.cc-left { border-right: 1px solid var(--line); }
.cc-right { border-left: 1px solid var(--line); font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.cmdbar.min .cc-body { display: none; }
.portrait { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: center; }
.portrait .nm { font-weight: 800; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portrait .sub { font-size: 11px; color: var(--muted); }
.mbar { height: 5px; border-radius: 3px; background: #262b36; overflow: hidden; margin-top: 3px; }
.mbar i { display: block; height: 100%; }
.pwhy { font-size: 11px; margin-top: 5px; line-height: 1.3; color: var(--muted); }
.pwhy.warn { color: var(--warn); } .pwhy.bad { color: var(--bad); }
.cmds { display: flex; flex-wrap: wrap; gap: 6px; }
.cmd { position: relative; width: 82px; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; font-size: 11px; font-weight: 700; }
.cmd .ic { font-size: 20px; line-height: 22px; }
.cmd .hk { position: absolute; top: 3px; right: 5px; font-size: 9.5px; color: var(--muted); font-weight: 700; }
.cmd:hover:not(:disabled) { border-color: var(--accent); background: #221d10; }
.cmd:disabled { opacity: .35; }
.cmd.primary { border-color: #5c4a1e; }
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 5px; }
.ucard { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 9px; padding: 5px 2px 4px; font-size: 10.5px; }
.ucard .nm { color: var(--text); font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucard .pr { color: var(--accent); font-weight: 800; }
.ucard .em { font-size: 17px; line-height: 20px; }
.ucard:hover:not(:disabled) { border-color: var(--accent); background: #221d10; }
.ucard:disabled { opacity: .35; }
.reschips { display: flex; flex-wrap: wrap; gap: 4px; max-height: 76px; overflow-y: auto; }
.cc-hint { font-size: 11px; color: var(--muted); line-height: 1.35; }
.cc-hint b { color: var(--text); }
@media (max-width: 1350px) { .res .s { display: none; } .cc-body { grid-template-columns: minmax(150px, 200px) 1fr minmax(120px, 170px); }
  .cmd { width: 70px; } }

/* Kopfleiste kompakt halten: Wetter, Untertitel und Musikanzeige weichen zuerst */
#top { min-width: 0; overflow: hidden; }
.res { flex-shrink: 1; min-width: 0; }
.rs { padding: 3px 7px 3px 5px; }
@media (max-width: 1700px) { .clock #weather { display: none; } .clock { min-width: 0; } #date { font-size: 13.5px; } }
@media (max-width: 1600px) { #np-chip { display: none !important; } .rs .s { display: none; } .rs .v { font-size: 13px; } }
@media (max-width: 1400px) { .brand { font-size: 0; gap: 0; } .brand .chip { font-size: 11px; } .seg button { padding: 6px 5px; }
  .rs .ic { font-size: 14px; } .victory .kday { display: none; } }
@media (max-width: 1250px) { .res .rs:nth-child(n+5) { display: none; } }
/* Rekrutierkarten kompakter */
.units { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 4px; }
.ucard { padding: 3px 2px; font-size: 10px; }
.cmdbar { width: min(1060px, calc(100% - 40px)); }
/* Planung: Befehlsknopf immer sichtbar am unteren Rand der Schublade */
#panel [data-act=plan-go] { position: sticky; bottom: 0; z-index: 2; margin-top: 8px; box-shadow: 0 -10px 18px 4px var(--panel); }
/* Kommandoleiste: Unterstützung */
.cc-badge { display: inline-block; min-width: 15px; height: 15px; line-height: 15px; margin-left: 5px; padding: 0 4px; border-radius: 8px;
  background: var(--accent); color: #1a1408; font-size: 10px; font-weight: 800; text-align: center; vertical-align: 1px; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 5px; }
.scard { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; padding: 4px 3px 3px;
  border: 1px solid var(--line); border-top-width: 3px; border-radius: 7px; background: var(--panel-2); color: var(--muted);
  font-size: 10px; line-height: 12px; cursor: pointer; text-align: center; }
.scard .em { font-size: 17px; line-height: 20px; }
.scard .nm { color: var(--text); font-weight: 700; font-size: 11px; line-height: 13px; }
.scard .nm, .scard .sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard .pr { color: var(--accent); font-weight: 800; }
.scard.sg0, .slegend .sg0::before { border-top-color: #e0703c; }
.scard.sg1, .slegend .sg1::before { border-top-color: #5aa0ff; }
.scard.sg2, .slegend .sg2::before { border-top-color: #7fc77a; }
.scard.ok:hover { border-color: var(--accent); background: #221d10; }
.scard.on { background: #2a2414; box-shadow: 0 0 0 2px var(--accent); }
.scard.run { background: repeating-linear-gradient(135deg, var(--panel-2) 0 6px, #1d2230 6px 12px); }
.scard:disabled { cursor: default; opacity: .5; }
.scard:disabled .em { filter: grayscale(1); }
.slegend { display: flex; gap: 12px; margin-top: 5px; font-size: 10px; color: var(--muted); }
.slegend span::before { content: ""; display: inline-block; width: 12px; border-top: 3px solid; margin-right: 4px; vertical-align: 2px; }
.scard .sub { text-transform: none; letter-spacing: 0; }
.stale { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 100; max-width: 640px; padding: 10px 16px;
  background: #4a1d17; border: 1px solid #c4473a; border-radius: 8px; color: #ffd9d3; font-weight: 700; box-shadow: 0 8px 30px rgba(0,0,0,.6); }
@media (max-height: 780px) {
  .cc-left, .cc-main, .cc-right { padding: 5px 8px; }
  .ucard, .scard { padding-top: 2px; padding-bottom: 2px; }
}
/* Operationen: Leiste, Karte, Empfehlung */
.cc-ops { display: flex; gap: 4px; margin-left: 10px; min-width: 0; overflow: hidden; flex: 1 1 auto; }
.opchip { display: inline-flex; align-items: center; gap: 5px; max-width: 190px; padding: 3px 8px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel-2); color: var(--text); font-size: 11px; white-space: nowrap; overflow: hidden; cursor: pointer; flex-shrink: 1; min-width: 0; }
.opchip b { color: var(--muted); font-weight: 700; }
.opchip i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.opchip.good i { background: #6fdc8c; } .opchip.warn i { background: #ffc24a; } .opchip.bad i { background: #ff6b5e; }
.opchip.plan i { background: transparent; border: 1.5px dashed #9cc4ff; }
.opchip:hover { border-color: var(--accent); }
.opchip.on { border-color: var(--accent); background: #2a2414; color: var(--accent); }
.opchip.more { color: var(--muted); }
.opico { width: 34px; height: 34px; display: grid; place-items: center; font-size: 20px; border-radius: 8px; background: #2a2414; color: var(--accent); }
.advice { border-left: 3px solid var(--muted); padding: 4px 0 4px 8px; color: var(--text); font-size: 12px; }
.advice.good { border-left-color: #6fdc8c; } .advice.warn { border-left-color: #ffc24a; } .advice.bad { border-left-color: #ff6b5e; }
.op.sel { border-color: var(--accent) !important; box-shadow: inset 3px 0 0 var(--accent); }
.plan-sum { background: rgba(255,194,74,.05); border-radius: 8px; padding: 8px 10px !important; }
#cc-op-tab { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Befehlsleiste weicht offenen Schubladen aus, statt verdeckt zu werden */
.cmdbar.dodge-l { left: calc(50% + 185px); width: min(1060px, calc(100% - 400px)); }
.cmdbar.dodge-r { left: calc(50% - 170px); width: min(1060px, calc(100% - 370px)); }
.cmdbar.dodge-l.dodge-r { left: calc(50% + 15px); width: min(1060px, calc(100% - 740px)); }
.oprow .opbar { width: 96px; white-space: nowrap; }
.oprow .opbar .bar { flex: 1; width: auto; }
.oprow .opr, .oprow .phase { white-space: nowrap; }
#speeds button { min-width: 30px; letter-spacing: -2px; }
/* Mehrspieler: Plätze & Team */
.join-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin: 8px 0; }
.seatbtn { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel-2); color: var(--text); cursor: pointer; font-size: 11.5px; }
.seatbtn.on { border-color: var(--accent); background: #2a2414; }
.seatbtn:disabled { opacity: .55; cursor: default; }
.teamrow { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; font-size: 12px; margin: 2px 0; }
.fcard.team { border-left-color: #6fb8ff; pointer-events: auto; }
.fcard .fbtns { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
/* Karteneditor */
.mapedit { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 40; width: min(520px, calc(100% - 32px));
  background: rgba(18,21,28,.97); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.55); font-size: 13px; }
.mapedit p { margin: 6px 0; }
.me-h { display: flex; justify-content: space-between; align-items: center; }
.me-steps { display: flex; gap: 4px; margin: 6px 0 2px; }
.me-steps span { flex: 1; text-align: center; font-size: 11px; padding: 3px 0; border-radius: 5px; background: var(--panel-2); color: var(--muted); }
.me-steps span.on { background: #2a2414; color: var(--accent); font-weight: 700; }
.mapedit .mbar { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.mapedit .mbar i { display: block; height: 100%; }
.scen.new { border-style: dashed; }
.scen.new b { color: var(--accent); }
.scen { position: relative; }
.scen-del { position: absolute; top: 6px; right: 8px; color: var(--muted); padding: 0 4px; border-radius: 4px; }
.scen-del:hover { color: #ff8a80; background: #3a1c1a; }
/* Startseite */
.startpage { position: fixed; inset: 0; z-index: 45; overflow-y: auto; padding: 28px 16px 40px;
  background: radial-gradient(ellipse at 50% -10%, rgba(255,194,74,.10), transparent 55%), rgba(9,11,15,.93); backdrop-filter: blur(3px); }
.sp-wrap { max-width: 1180px; margin: 0 auto; }
.sp-hero { text-align: center; margin-bottom: 22px; }
.sp-logo { font-size: 44px; font-weight: 900; letter-spacing: .32em; color: var(--text); text-shadow: 0 0 24px rgba(255,194,74,.25); }
.sp-hero p { margin: 6px 0 0; color: var(--muted); }
.sp-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px;
  grid-template-areas: "maps opts" "maps go" "inv saves"; }
.sp-grid > .sp-maps { grid-area: maps; }
.sp-grid > :nth-child(2) { grid-area: opts; }
.sp-grid > .sp-go { grid-area: go; }
.sp-grid > :nth-child(4) { grid-area: inv; }
.sp-grid > :nth-child(5) { grid-area: saves; }
.sp-card { background: rgba(20,24,32,.96); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.sp-card h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; }
.sp-n { width: 22px; height: 22px; border-radius: 50%; background: #2a2414; color: var(--accent); display: inline-grid; place-items: center; font-size: 12px; }
.sp-maps .scen-grid { grid-template-columns: 1fr 1fr; max-height: 520px; overflow-y: auto; }
.sp-go .start-grid { margin: 10px 0 0; }
.sp-go .start { padding: 16px 18px; }
.sp-go .start b { font-size: 17px; }
.sp-name { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.sp-guest { max-width: 640px; margin: 0 auto; }
.sp-game { padding: 10px 12px; border-radius: 8px; background: var(--panel-2); margin-bottom: 8px; }
.primary.big { padding: 10px 22px; font-size: 14px; }
.inv-row { margin: 6px 0; }
.inv-link { display: flex; gap: 6px; margin-top: 3px; }
.inv-link input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: 12px; }
.savelist { display: flex; flex-wrap: wrap; gap: 6px; }
.invitepop { width: 360px; padding: 10px 12px; position: fixed; z-index: 60; }
.inv-seats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; font-size: 12px; }
.inv-side { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 900px) {
  .sp-grid { grid-template-columns: 1fr; grid-template-areas: "maps" "opts" "go" "inv" "saves"; }
  .sp-logo { font-size: 30px; }
  .sp-maps .scen-grid { grid-template-columns: 1fr; }
}
.sp-name input, .inv-link input, .sp-guest input, .sp-guest select, .mapedit input { background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; font-size: 13px; }
.savelist { display: flex; flex-direction: column; gap: 4px; }
.saverow { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--panel-2); color: var(--text); cursor: pointer; text-align: left; }
.saverow:hover { border-color: var(--accent); }
/* ---------- Handy ---------- */
@media (max-width: 720px) {
  body { grid-template: "top" 48px "map" 1fr "rail" 56px / 1fr; }
  #top { gap: 6px; padding: 0 6px; }
  .brand, #weather, #rate, #roles, #np-chip, #t-sound, .toggles [data-rtab-open="lage"],
  .victory .lbl, .victory .kday, .victory .kfc { display: none !important; }
  .clock { min-width: 0 !important; }
  #date { font-size: 11px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; }
  #speeds button { padding: 5px 6px; }
  .res .rs:not(:first-child) { display: none; }
  .victory { padding: 2px 8px; min-width: 0; }
  .iconbtn, .hbtn { padding: 5px 7px; }
  /* Bereiche als Tab-Leiste unten */
  .rail { flex-direction: row; justify-content: space-around; gap: 0; padding: 3px 2px; border-right: 0; border-top: 1px solid var(--line); }
  .rail button { flex: 1; padding: 4px 0 3px; min-width: 0; }
  .rail .ri { font-size: 18px; line-height: 20px; }
  .rail .rl { font-size: 9px; }
  /* Schubladen über die ganze Breite */
  .flyout, .flyout.dl, .flyout.dr { width: 100% !important; max-width: none !important; left: 0; right: 0; }
  /* Befehlsleiste als Blatt über der Tab-Leiste */
  .cmdbar, .cmdbar.dodge-l, .cmdbar.dodge-r { left: 50% !important; width: calc(100% - 10px) !important; bottom: 6px; }
  .cc-tabs { overflow-x: auto; scrollbar-width: none; }
  .cc-tabs button[data-act=cc-mode] { padding: 6px 9px; white-space: nowrap; }
  .cc-info, .cc-ops { display: none !important; }
  .cc-body { grid-template-columns: 1fr !important; max-height: 42vh; overflow-y: auto; }
  .cc-left, .cc-right { border: 0 !important; }
  .cc-left:empty, .cc-right:empty { display: none; }
  .layerbar, .maplibregl-ctrl-top-right, .maplibregl-ctrl-scale { display: none !important; }
  .feed { left: 6px; right: 6px; width: auto; top: 6px; }
  .mapedit { top: 6px; }
  .invitepop { width: calc(100% - 16px); }
  #ctx { max-width: calc(100% - 16px); }
}
.seatcols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.seatcol { display: flex; flex-direction: column; gap: 6px; }
.seatcol-h { font-weight: 800; font-size: 13px; }
@media (max-width: 520px) { .seatcols { grid-template-columns: 1fr; } }
#join-roles { display: block; }
@media (max-width: 720px) {
  /* Befehlsleiste flach: nur eine wischbare Reihe Knöpfe, die Karte bleibt frei */
  .cc-left, .cc-right { display: none !important; }
  .cc-body { max-height: none; overflow: visible; }
  .cc-main { padding: 6px 6px 7px; }
  .cc-main .cmds, .cc-main .units, .cc-main .sgrid { display: flex !important; flex-wrap: nowrap; overflow-x: auto;
    gap: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cc-main .cmds > *, .cc-main .units > *, .cc-main .sgrid > * { flex: 0 0 auto; width: 76px; }
  .cc-main .slegend { display: none; }
  .cc-main .cc-hint { font-size: 11px; }
}
.maplibregl-popup { pointer-events: none; }   /* Infofenster fängt nie Klicks/Tipps ab */
@media (max-width: 720px) {
  .clock { display: none !important; }
  #res { flex: 0 0 auto; min-width: max-content; }
  .res .rs { padding: 3px 6px; }
  .victory { flex: 0 0 auto; }
  .victory .val { font-size: 14px; }
  .spacer { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 720px) {
  #play { padding: 5px 9px; }
  #speeds button { padding: 5px 4px; min-width: 26px; }
}
@media (max-width: 380px) {
  .victory { display: none !important; }
  #top { gap: 4px; }
}
/* Touch: echte Bildschirmhöhe (iOS-Leisten), kein Markieren/Lupe beim langen Drücken, kein Doppeltipp-Zoom auf Knöpfen */
html, body { height: 100dvh; }
#map, .rail, .cmdbar, #top { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
button, .seatbtn, .scen, .start { touch-action: manipulation; }
