/*! Voidar · © 2026 Jürgen Garske · Alle Rechte vorbehalten. */
/* Leitstand: Gestaltung nach Entwurf A (20.10.2026). Graphit, Signalorange,
   Eisblau. Liegt über main.css; was hier steht, gilt. */

/* Alte Variablen aus main.css auf die Farben des Entwurfs umgelegt, damit
   noch nicht umgebaute Seiten und geteilte Bausteine (Berichte, Fenster)
   nicht im alten Blau stehen. Grün bleibt für Erfolg/Sieg (--ok). */
:root {
    --bg-deep:        var(--bg);
    --bg-base:        var(--bg);
    --bg-elevated:    var(--panel);
    --bg-elevated-2:  var(--panel-2);
    --border:         var(--line-strong);
    --border-soft:    var(--line);
    --text-primary:   var(--text);
    --text-secondary: var(--text-2);
    --text-muted:     var(--muted);
    --text-strong:    var(--text);
    --accent:         var(--amber);
    --accent-hover:   var(--amber-2);
    --accent-dim:     var(--amber-line);
    --tech:           var(--ok);
    --tech-hover:     #8fe8a6;
    --tech-dim:       rgba(111, 220, 140, .45);
    --res-voidanium:  var(--r-void);
    --res-singularit: var(--r-sing);
    --res-aether:     var(--r-aeth);
    --res-energy:     var(--r-energy);
    --success:        var(--ok);
    --info:           var(--ice);
    --radius:         var(--rad-lg);
    --radius-sm:      var(--rad);
}
:root {
    --bg:          #0a0b0e;
    --bg-raise:    #0f1115;
    --panel:       #14171d;
    --panel-2:     #1a1e26;
    --panel-3:     #222733;
    --line:        #272c37;
    --line-strong: #39404f;

    --text:        #ece9e3;
    --text-2:      #b9b8b4;
    --muted:       #9a9ca6;

    --amber:       #ff9a3c;
    --amber-2:     #ffb46b;
    --amber-ink:   #1c1105;
    --amber-soft:  rgba(255, 154, 60, .13);
    --amber-line:  rgba(255, 154, 60, .45);

    --ice:         #6cc4ff;
    --ice-soft:    rgba(108, 196, 255, .12);
    --ice-line:    rgba(108, 196, 255, .40);

    --ok:          #6fdc8c;
    --ok-soft:     rgba(111, 220, 140, .12);
    --warn:        #ffd166;
    --warn-soft:   rgba(255, 209, 102, .12);
    --danger:      #ff5f57;
    --danger-soft: rgba(255, 95, 87, .12);
    --danger-line: rgba(255, 95, 87, .45);

    --r-void:      #c9d1dc;
    --r-sing:      #6cc4ff;
    --r-aeth:      #b892ff;
    --r-energy:    #ffd84a;
    --r-quant:     #4fe0c8;

    --rad:         4px;
    --rad-lg:      8px;
    --rail-w:      252px;
    --gap:         16px;

    --font: 'Chakra Petch', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}
img { max-width: 100%; display: block; }
a { color: var(--amber-2); text-decoration: none; }
a:hover, a:focus-visible { color: var(--amber); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; }
p { margin: 0 0 .6em; }
[hidden] { display: none !important; }
strong, b { font-weight: 600; color: var(--text); }
em { font-style: normal; color: var(--amber-2); }
.muted { color: var(--muted); }
.small { font-size: max(var(--font-min), .86em); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }

/* ---------- Grundbausteine ---------- */

.panel, .card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--rad-lg);
    padding: 18px 20px;
    position: relative;
}
.container > .card + .card, .container > section + .card, .container > .card + section { margin-top: var(--gap); }

/* Eckmarke oben links: Kennzeichen des Leitstands */
.panel::before, .card::before {
    content: "";
    position: absolute;
    top: -1px; left: -1px;
    width: 14px; height: 14px;
    border-top: 2px solid var(--amber);
    border-left: 2px solid var(--amber);
    border-top-left-radius: var(--rad-lg);
    pointer-events: none;
}
.card.plain::before { display: none; }

.h-sec, .card > h2 {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-2);
    border-left: 3px solid var(--amber);
    padding-left: 10px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.h2-img { width: 18px; height: 18px; flex: none; display: block; }
.sym { width: 1.2em; height: 1.2em; display: inline-block; vertical-align: -0.25em; object-fit: contain; flex: none; }
.h-sec .muted, .card > h2 .muted { letter-spacing: .04em; text-transform: none; font-weight: 500; }

.label {
    font-size: max(var(--font-min), .72rem);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}

.btn, .btn-primary, .btn-secondary, .btn-ghost, .btn-danger, .btn-tech {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 6px 14px;
    border-radius: var(--rad);
    border: 1px solid var(--line-strong);
    background: var(--panel-3);
    color: var(--text);
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .02em;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: #2a3040; color: var(--text); }
.btn-primary { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { background: var(--amber-2); border-color: var(--amber-2); color: var(--amber-ink); }
.btn-primary:disabled { background: var(--panel-3); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-secondary { background: transparent; border-color: var(--amber-line); color: var(--amber-2); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); }
.btn-ghost:disabled { opacity: .35; cursor: not-allowed; }
.btn-danger { background: var(--danger-soft); border-color: var(--danger-line); color: #ffb3ae; }
.btn-danger:hover { background: rgba(255,95,87,.22); color: #fff; }
.btn-tech { background: var(--ice-soft); border-color: var(--ice-line); color: var(--ice); }
.btn-tech:hover { background: rgba(108,196,255,.2); color: #d9f0ff; }
.btn-tech:disabled { opacity: .4; cursor: not-allowed; }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: .84rem; }
.btn-xs { min-height: 28px; padding: 2px 8px; font-size: .8rem; }

input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
    background: var(--bg-raise);
    border: 1px solid var(--line-strong);
    border-radius: var(--rad);
    padding: 8px 10px;
    min-height: 40px;
    color: var(--text);
    width: 100%;
}
input:focus, select:focus, textarea:focus,
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--amber); outline: none; box-shadow: 0 0 0 3px var(--amber-soft); }
input[type=number] { font-variant-numeric: tabular-nums; }
select { appearance: none; padding-right: 30px;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

progress {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px; border: 0; border-radius: 3px;
    background: var(--panel-3); overflow: hidden; display: block;
}
progress::-webkit-progress-bar { background: var(--panel-3); border-radius: 3px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--amber), var(--amber-2)); border-radius: 3px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--amber), var(--amber-2)); border-radius: 3px; }
progress.ice::-webkit-progress-value { background: linear-gradient(90deg, #3d9bdc, var(--ice)); }
progress.ice::-moz-progress-bar { background: linear-gradient(90deg, #3d9bdc, var(--ice)); }
progress.danger::-webkit-progress-value { background: var(--danger); }
progress.danger::-moz-progress-bar { background: var(--danger); }

.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 8px; border-radius: 3px;
    background: var(--panel-3); color: var(--text-2);
    font-size: .8rem; font-weight: 500; white-space: nowrap;
}
.chip.amber { background: var(--amber-soft); color: var(--amber-2); }
.chip.ice { background: var(--ice-soft); color: var(--ice); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.danger { background: var(--danger-soft); color: #ffaca6; }

.nav-badge, .badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--amber); color: var(--amber-ink);
    font-size: max(var(--font-min), .7rem); font-weight: 700; line-height: 1;
}

.res-icon { flex: none; }
/* Seitenbild (Phalanx, Sprungtor, Bunker, Berichte): main.css zentriert es per
   text-align, hier sind Bilder aber Blöcke. */
.report-hero-img { margin-left: auto; margin-right: auto; }
/* Rohstoffbilder (public/img/res) sitzen im Fließtext auf der Schriftlinie. */
img.res-icon { vertical-align: -0.25em; object-fit: contain; }
.res-icon-voidanium { color: var(--r-void); }
.res-icon-singularit { color: var(--r-sing); }
.res-icon-aether { color: var(--r-aeth); }
.res-icon-energy { color: var(--r-energy); }

/* ---------- Gerüst ---------- */

.app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh;
    background: linear-gradient(90deg, #0d0f13 0, #0b0c10 calc(var(--rail-w) - 1px), var(--line) calc(var(--rail-w) - 1px), var(--line) var(--rail-w), var(--bg) var(--rail-w)); }

.rail {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: linear-gradient(180deg, #0e1014 0%, #0b0c10 100%);
    border-right: 1px solid var(--line);
    padding: 18px 14px 24px;
    display: flex; flex-direction: column; gap: 16px;
    scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.rail .brand { display: flex; justify-content: center; }
.rail .brand img { height: 30px; width: auto; }

.ps-toggle {
    display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px;
    width: 100%; padding: 9px 10px; text-align: left;
    background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--rad-lg);
    cursor: pointer;
}
.ps-toggle:hover, .ps-toggle[aria-expanded=true] { border-color: var(--amber-line); background: var(--panel-2); }
.ps-thumb { width: 48px; height: 48px; position: relative; }
.ps-thumb img { width: 48px; height: 48px; }
.ps-current { display: flex; flex-direction: column; min-width: 0; }
.ps-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-coords { font-size: .8rem; color: var(--ice); }
.ps-caret { color: var(--muted); }
.ps-kicker { font-size: max(var(--font-min), .66rem); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.railnav { display: flex; flex-direction: column; gap: 10px; }
/* Gruppenkopf als Leiste: Amber-Schrift, dahinter eine auslaufende Linie. */
.nav-grp-label { font-size: max(var(--font-min), .74rem); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--amber);
    display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 8px 10px;
    background: #141922; border: 1px solid #232a37; border-radius: 7px; }
.nav-grp-label::after { content: ""; flex: 1; height: 1px; margin-left: 8px; background: linear-gradient(90deg, rgba(240,160,64,.5), rgba(240,160,64,0)); }
.nav-grp-label .ico { font-size: .8rem; }
.railnav a {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px; border-radius: var(--rad);
    color: var(--text-2); font-weight: 500; font-size: .92rem;
    border-left: 3px solid transparent;
}
.railnav a .ico { width: 20px; text-align: center; font-size: .95rem; }
/* Menüsymbole als Bilder (public/img/nav, 128 px, damit sie auch am Handy scharf sind). */
.nav-img { width: 30px; height: 30px; display: block; }
.h1-img { width: 1.4em; height: 1.4em; flex: none; align-self: center; }
.account-head h1 { display: flex; align-items: center; gap: 12px; }
.railnav a .ico:has(.nav-img) { width: 30px; }
.nav-grp-label .nav-img { width: 22px; height: 22px; }
.dropdown .ico .nav-img { width: 24px; height: 24px; }
.mtb-img { width: 26px; height: 26px; flex: none; display: block; }
.mtb-icon .mtb-img { width: 28px; height: 28px; margin: 0 auto; }
.railnav a:hover { background: var(--panel); color: var(--text); }
.railnav a.cur { background: var(--amber-soft); color: var(--text); border-left-color: var(--amber); font-weight: 600; }
.railnav a .nav-badge { margin-left: auto; }
.dd-moon { font-size: max(var(--font-min), .68rem); letter-spacing: .12em; text-transform: uppercase; color: var(--ice); padding: 8px 10px 2px; }
.rail-foot { margin-top: auto; font-size: .78rem; color: var(--muted); padding: 0 10px; }

.stage { min-width: 0; display: flex; flex-direction: column; }

/* HUD: Rohstoffe + Glocke + Konto */
.hud {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 18px;
    padding: 10px 28px;
    background: rgba(10, 11, 14, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    min-height: 68px;
}
/* Sprungziele (#geb-… nach dem Bauen) nicht unter der festen Leiste:
   ihre Höhe (bis 77 px) plus 12 px Luft. Am Handy siehe .mtop. */
html { scroll-padding-top: 89px; }
.res-strip { display: flex; gap: 6px; flex: 1; min-width: 0; }
.res-strip .item {
    display: grid; grid-template-columns: 6px auto; grid-template-rows: auto auto; column-gap: 9px;
    align-items: center; padding: 6px 12px 6px 8px;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--rad);
    min-width: 0; flex: 1 1 0;
}
.res-strip .gauge {
    grid-row: 1 / 3; width: 6px; height: 38px; border-radius: 3px;
    background: var(--panel-3); position: relative; overflow: hidden;
}
.res-strip .gauge i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 3px; background: currentColor; display: block; height: 0; }
.res-strip .item.voidanium { color: var(--r-void); }
.res-strip .item.singularit { color: var(--r-sing); }
.res-strip .item.aether { color: var(--r-aeth); }
.res-strip .item.quantum { color: var(--r-quant); }
.res-strip .item.energy { color: var(--r-energy); }
.res-strip .head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.res-strip .label { color: var(--text-2); font-size: max(var(--font-min), .68rem); white-space: nowrap; }
.res-strip .value { color: var(--text); font-weight: 600; font-size: 1rem; white-space: nowrap; line-height: 1.2; }
.res-strip .res-sep { color: var(--muted); font-weight: 400; margin: 0 2px; }
.res-strip .res-cap, .res-strip .energy-prod { color: var(--muted); font-weight: 500; font-size: .82rem; }
.res-strip .energy-negative { color: var(--danger); }
.res-strip .item.full .res-current { color: var(--warn); }

.hud-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.ico-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: var(--rad);
    background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 1.1rem;
}
.ico-btn:hover { border-color: var(--line-strong); color: var(--text); }
.ico-btn .bell-count, .ico-btn .ti-count { position: absolute; top: -6px; right: -6px; }

.acct { position: relative; }
.acct-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 10px 0 5px;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--rad); cursor: pointer;
}
.acct-btn:hover, .acct-btn[aria-expanded=true] { border-color: var(--amber-line); }
.av {
    width: 32px; height: 32px; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--amber), #d9622b); color: var(--amber-ink); font-weight: 700; font-size: .82rem;
}
.acct-btn .lbl { font-weight: 600; }
.caret { color: var(--muted); font-size: .8rem; }
.pill-admin { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px; border-radius: var(--rad); background: var(--ice-soft); border: 1px solid var(--ice-line); color: var(--ice); font-weight: 600; }

.dropdown {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
    min-width: 230px; padding: 6px;
    background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--rad-lg);
    box-shadow: 0 18px 40px rgba(0,0,0,.55);
}
.dropdown a, .dropdown button.dd-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 8px 10px; border-radius: var(--rad); color: var(--text-2); background: none; border: 0; text-align: left; cursor: pointer;
}
.dropdown a:hover, .dropdown button.dd-item:hover { background: var(--panel-3); color: var(--text); }
.dropdown a.cur { background: var(--amber-soft); color: var(--text); }
.dropdown .ico { width: 20px; text-align: center; }
.dropdown .nav-badge { margin-left: auto; }
.dd-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.dd-logout { color: #ffaca6 !important; }

.container { padding: 24px 28px 48px; max-width: 1240px; width: 100%; margin: 0 auto; flex: 1; }
.footer { padding: 18px 28px 28px; color: var(--muted); font-size: .82rem; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; border-top: 1px solid var(--line); }
.legal-links a { color: var(--text-2); }
/* Tech-Tree nie an seinem Bindestrich trennen. */
a[href="/?p=techtree"] { white-space: nowrap; }
/* main.css setzt die Links für die alte Fußzeile in eine eigene Zeile darunter (margin-top);
   hier stehen sie neben dem Copyright und sollen auf gleicher Höhe sein. */
.footer .legal-links, .foot .legal-links { display: inline; margin-top: 0; }

/* Mobile Kopfzeile, Leiste unten, Mehr-Panel */
.mtop { display: none; }
.mobile-tabbar, .mtb-more-panel { display: none; }

/* ---------- Banner und Hinweise ---------- */

.banners { display: grid; gap: 10px; margin-bottom: 18px; }
.deletion-notice, .round-notice, .speed-event-banner, .safemode-notice, .flash {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; border-radius: var(--rad-lg);
    border: 1px solid var(--line); border-left-width: 4px; background: var(--panel);
}
.deletion-notice { border-color: var(--danger-line); border-left-color: var(--danger); background: var(--danger-soft); }
.deletion-notice__text { flex: 1; min-width: 200px; }
.deletion-notice__icon { color: var(--danger); margin-right: 6px; }
.deletion-notice__date { font-weight: 600; color: #fff; }
.deletion-notice__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border-radius: var(--rad); border: 1px solid var(--danger-line); background: transparent; color: #ffd0cc; font-weight: 600; cursor: pointer; }
.round-notice { border-left-color: var(--warn); background: var(--warn-soft); }
.round-notice--beendet { border-left-color: var(--danger); background: var(--danger-soft); }
.speed-event-banner { border-left-color: var(--ice); background: var(--ice-soft); }
.speed-event-banner__icon { font-size: 1.4rem; }
.speed-event-banner__body { flex: 1; display: grid; gap: 6px; }
.speed-event-banner__head { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.speed-event-banner__title { font-weight: 700; color: var(--ice); letter-spacing: .04em; }
.speed-event-banner__until { color: var(--text-2); font-size: .9rem; }
.speed-event-banner__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.speed-event-banner__chip { padding: 2px 8px; border-radius: 3px; background: rgba(108,196,255,.18); color: #d6eeff; font-size: .82rem; }
.flash-zone { display: grid; gap: 8px; }
.flash-success { border-left-color: var(--ok); background: var(--ok-soft); }
.flash-error { border-left-color: var(--danger); background: var(--danger-soft); }
.flash-info { border-left-color: var(--ice); background: var(--ice-soft); }
.safemode-notice { border-left-color: var(--ice); background: var(--ice-soft); }

/* ---------- Seitenkopf ---------- */

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.page-header h1 { font-size: 1.7rem; font-weight: 700; letter-spacing: .01em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.page-context { font-size: 1rem; font-weight: 500; color: var(--text-2); }
.coord { color: var(--ice); font-weight: 500; }
.page-header .meta { color: var(--text-2); font-size: .92rem; }
.page-header .meta strong { color: var(--text); }
.kicker { font-size: max(var(--font-min), .72rem); letter-spacing: .18em; text-transform: uppercase; color: var(--amber); font-weight: 600; margin-bottom: 4px; }

/* ---------- Schwebende Fenster ---------- */

#planetPanel {
    position: fixed; left: calc(var(--rail-w) + 12px); top: 72px; z-index: 80; width: 400px; max-height: calc(100vh - 96px);
    display: flex; flex-direction: column;
    background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--rad-lg);
    box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 10px 14px; background: var(--panel-2); border-radius: var(--rad-lg) var(--rad-lg) 0 0; cursor: move; }
.tp-title { font-weight: 700; font-size: .9rem; letter-spacing: .04em; }
.tp-actions { display: flex; gap: 4px; }
.tp-btn { width: 30px; height: 30px; border-radius: var(--rad); border: 1px solid var(--line-strong); background: var(--bg-raise); cursor: pointer; color: var(--text-2); font-weight: 700; }
.tp-btn:hover { color: var(--text); border-color: var(--text-2); }
.tp-body { padding: 12px 14px; overflow-y: auto; }
.tp-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 14px 12px; font-size: .84rem; }
.psw-hinweis { font-size: .82rem; color: var(--muted); }
.psw-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.psw-gruppe { border: 1px solid var(--line); border-radius: var(--rad); background: var(--bg-raise); }
.psw-gruppe.aktiv { border-color: var(--amber-line); }
.psw-gruppe.ziehen { opacity: .5; }
.psw-gruppe.drueber { box-shadow: 0 -2px 0 var(--amber); }
.psw-zeile { display: flex; align-items: stretch; }
.psw-zeile.mond { padding-left: 34px; background: rgba(0,0,0,.18); }
.psw-griff { width: 28px; flex: none; background: none; border: 0; color: var(--muted); cursor: grab; font-size: 1rem; }
.psw-wahl { flex: 1; display: flex; gap: 10px; align-items: center; padding: 8px 10px 8px 4px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--text); min-width: 0; }
.psw-zeile.mond .psw-wahl { padding-left: 4px; }
.psw-wahl:hover { background: var(--panel-2); }
.psw-zeile.aktiv .psw-wahl { background: var(--amber-soft); }
.psw-bild { width: 38px; height: 38px; flex: none; }
.psw-zeile.mond .psw-bild { width: 26px; height: 26px; }
.psw-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.psw-name { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.psw-koord { color: var(--ice); font-size: .82rem; }
.psw-check { color: var(--amber); font-weight: 700; }
.psw-felder { margin-left: auto; font-size: .78rem; color: var(--muted); }
.psw-ruhe { font-size: .8rem; color: var(--muted); }
.psw-tun { display: grid; gap: 1px; font-size: .8rem; color: var(--text-2); }
.psw-auftrag .zeit { color: var(--text); font-weight: 600; }
.psw-gespeichert { color: var(--ok); }

#tutPanel {
    position: fixed; right: 28px; top: 74px; z-index: 70; width: 340px;
    background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--rad-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,.55);
}
#tutPanel.hidden, #planetPanel.hidden { display: none; }
.tp-chapter { font-size: max(var(--font-min), .7rem); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 2px; }
.tp-quest { font-weight: 700; font-size: 1.02rem; margin-bottom: 6px; }
.tp-howto { font-size: .86rem; color: var(--text-2); margin-bottom: 8px; }
.tp-vergleich { font-size: .82rem; color: var(--text-2); margin-bottom: 8px; }
.tp-conds { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .86rem; }
.tp-cond { display: grid; grid-template-columns: 18px 1fr; gap: 4px; }
/* „Dir fehlt noch“ unter den Text, nicht als dritte Zelle in die 18-px-Spalte. */
.tp-cond .qc-missing { grid-column: 2; margin-left: 0; }
.tp-cond.done { color: var(--muted); }
.tp-cond.done .tp-check { color: var(--ok); }
.tp-cond.open .tp-check { color: var(--amber); }
.tp-updated { color: var(--muted); }
/* Tutorial: was die Aufgabe zum ersten Mal verlangt (TutorialView::neu), Seite und Fenster. */
.quest-neu { margin: 0 0 .6rem; padding: .45rem .65rem; border-left: 3px solid var(--ice); border-radius: 6px; background: rgba(108, 196, 255, .06); font-size: .85rem; line-height: 1.4; color: var(--text-2); }
.quest-neu .qn-head { display: block; margin-bottom: .2rem; font-weight: 600; color: var(--ice); }
.quest-neu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.quest-neu strong { color: var(--text); }
.aufgabe-btn { width: auto; padding: 0 12px; gap: 6px; border-color: var(--amber-line); color: var(--amber-2); font-size: 1rem; cursor: pointer; }
.aufgabe-btn .lbl { font-size: .86rem; font-weight: 600; }
.aufgabe-btn[aria-expanded=true] { background: var(--amber-soft); }

/* Chat */
#voidar-chat { position: fixed; right: 20px; bottom: 20px; z-index: 900; }
.vchat-launcher { width: 52px; height: 52px; border-radius: var(--rad-lg); border: 1px solid var(--amber-line); background: var(--panel-2); color: var(--text); font-size: 22px; cursor: pointer; position: relative; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.vchat-launcher:hover { border-color: var(--amber); }
.vchat-dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--amber); color: var(--amber-ink); font-size: 11px; font-weight: 700; line-height: 18px; padding: 0 4px; }
.vchat-panel { display: none; width: 340px; max-width: calc(100vw - 32px); background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--rad-lg); box-shadow: 0 18px 50px rgba(0,0,0,.6); overflow: hidden; }
#voidar-chat.open .vchat-panel { display: block; }
#voidar-chat.open .vchat-launcher { display: none; }
.vchat-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--panel-2); }
.vchat-title { font-weight: 700; }
.vchat-status { font-size: max(var(--font-min), .66rem); text-transform: uppercase; letter-spacing: .1em; padding: 1px 7px; border-radius: 3px; background: var(--ok-soft); color: var(--ok); }
.vchat-close { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.vchat-tabs { display: flex; gap: 4px; padding: 8px 8px 0; }
.vchat-tab { flex: 1; background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--rad); padding: 5px; cursor: pointer; color: var(--text-2); font-size: .84rem; }
.vchat-tab.active { border-color: var(--amber-line); color: var(--text); background: var(--amber-soft); }
.vchat-messages { height: 260px; overflow-y: auto; padding: 8px 12px; font-size: .88rem; display: grid; align-content: start; gap: 6px; }
.vchat-meta { display: block; font-size: max(var(--font-min), .72rem); color: var(--muted); }
.vchat-name { font-weight: 600; color: var(--text-2); }
.vchat-sys { text-align: center; color: var(--muted); font-size: .76rem; }
.vchat-input { display: flex; gap: 6px; padding: 8px; background: var(--panel-2); }
.vchat-input input { min-height: 36px; }
.vchat-input button { width: 42px; flex: none; border-radius: var(--rad); background: var(--amber); border: 0; color: var(--amber-ink); font-weight: 700; cursor: pointer; }

/* Modale */
.info-modal-backdrop, .fleet-map-modal, .vd-schleier, .modal-backdrop {
    position: fixed; inset: 0; z-index: 1000; background: rgba(4,5,8,.78); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
/* Die Flottenkarte bringt ihren Schleier selbst mit (.fleet-map-backdrop);
   doppelt übereinander war der Hintergrund fast schwarz. */
.fleet-map-modal { background: none; backdrop-filter: none; }
.info-modal-host { width: 100%; max-width: 760px; max-height: calc(100vh - 40px); overflow-y: auto; }
.info-modal-card { background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--rad-lg); overflow: hidden; }
/* Bild ganz zeigen, nicht beschneiden und nicht ausblenden (Juergen: Variante B, etwas größer).
   Am Handy wie bisher ohne Bild. */
.info-modal-hero { position: relative; margin: 18px 20px 4px; text-align: center; }
.info-hero-img { display: none; }
@media (min-width: 720px) {
    .info-hero-img { display: block; width: 100%; max-width: 520px; aspect-ratio: 16 / 9; margin: 0 auto; border: 1px solid var(--line-strong); border-radius: var(--rad-lg); background-size: cover; background-position: center; }
}
.info-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px 6px; }
.info-modal-header h3 { font-size: 1.35rem; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.info-current-tag { font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 3px; background: var(--amber-soft); color: var(--amber-2); }
.info-not-built { background: var(--panel-3); color: var(--muted); }
.info-modal-close { width: 34px; height: 34px; min-height: 0; padding: 0; flex: none; border-radius: var(--rad); border: 1px solid var(--line-strong); background: var(--bg-raise); color: var(--text-2); font-size: 1.2rem; cursor: pointer; }
.info-description { padding: 0 20px; color: var(--text-2); }
.info-requirements { margin: 0 20px 12px; padding: 10px 12px; background: var(--bg-raise); border-radius: var(--rad); font-size: .9rem; }
.info-requirements ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.req-ok .req-icon { color: var(--ok); }
.req-missing { color: #ffaca6; }
.ship-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 20px 20px; }
.ship-info-section { background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--rad); padding: 8px 12px; }
.ship-info-section-wide { grid-column: 1 / -1; }
.ship-info-label { font-size: max(var(--font-min), .72rem); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ship-info-value { font-weight: 600; }
.zone-zeile { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; }
.zone-bild { width: 56px; height: 56px; }
.zone-zeile .ship-info-label { text-transform: none; letter-spacing: .02em; font-size: .95rem; color: var(--text); font-weight: 600; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.zone-zeile.hier { border-color: var(--amber-line); background: linear-gradient(90deg, var(--amber-soft), transparent 60%), var(--bg-raise); }
.info-stufen-wahl { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; margin: 4px 20px 12px; padding: 12px; background: var(--bg-raise); border-radius: var(--rad); }
.isw-gruppe { display: grid; gap: 4px; }
.isw-titel { font-size: max(var(--font-min), .7rem); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.isw-felder { display: flex; gap: 6px; flex-wrap: wrap; }
.isw-feld { display: grid; gap: 2px; align-content: end; max-width: 7rem; line-height: 1.2; font-size: .78rem; color: var(--text-2); }
.isw-feld input { width: 84px; min-height: 34px; padding: 4px 8px; }
.isw-knoepfe { display: flex; flex-basis: 100%; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
/* Kosten in der Stufentabelle in den Rohstofffarben (der Entwurf zeigt die Tabelle ohne Kosten). */
.info-stufen-table .cell-cost .cc { display: inline-block; margin-right: 8px; }
.info-stufen-table .cell-cost .m { color: var(--r-void); }
.info-stufen-table .cell-cost .k { color: var(--r-sing); }
.info-stufen-table .cell-cost .d { color: var(--r-aeth); }
.info-stufen-table .cell-time, .info-stufen-table .cell-punkte { color: var(--text-2); }
.info-table-wrap { padding: 0 20px 20px; overflow-x: auto; }
.info-stufen-table { width: 100%; border-collapse: separate; border-spacing: 0 3px; font-size: .88rem; }
.info-stufen-table th { text-align: left; font-size: max(var(--font-min), .68rem); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 4px 8px; white-space: nowrap; }
.info-stufen-table td { padding: 6px 8px; background: var(--bg-raise); white-space: nowrap; }
.info-stufen-table tr.row-current td { background: var(--amber-soft); }
.cell-level { font-weight: 700; }
.energy-cost { color: #ffaca6; display: inline-flex; align-items: center; gap: 3px; }
.energy-prod { color: var(--ok); display: inline-flex; align-items: center; gap: 3px; }

.fleet-map-dialog { width: 100%; max-width: 640px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--rad-lg); position: relative; padding: 20px; }
.fleet-map-backdrop { position: absolute; inset: 0; }
.fleet-map-x { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: var(--rad); border: 1px solid var(--line-strong); background: var(--bg-raise); color: var(--text-2); font-size: 1.2rem; cursor: pointer; z-index: 2; }
.fm-route { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin: 18px 0 10px; }
.fm-end { display: grid; justify-items: center; gap: 4px; text-align: center; font-size: .86rem; }
.fm-end img { width: 48px; height: 48px; }
.fm-track { position: relative; height: 4px; background: var(--panel-3); border-radius: 2px; }
.fm-track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--amber); border-radius: 2px; display: block; }
.fm-track b { position: absolute; top: -9px; width: 22px; height: 22px; margin-left: -11px; display: block; font-weight: 400; text-align: center; }

.vd-dialog { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--rad-lg); padding: 18px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.vd-dialog.gefahr { border-color: var(--danger-line); }
.vd-kopf { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; }
.vd-text { white-space: pre-line; color: var(--text-2); }
.vd-knoepfe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.modal { width: 100%; max-width: 520px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--rad-lg); padding: 22px 24px; }
.modal h2 { font-size: 1.4rem; margin-bottom: 10px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.modal-actions form { display: inline-flex; }

[data-tooltip] { cursor: help; }
button[data-tooltip], a[data-tooltip] { cursor: pointer; }
.tip {
    position: fixed; z-index: 1100; max-width: 280px; padding: 7px 10px; border-radius: var(--rad);
    background: #262b36; border: 1px solid var(--line-strong); color: var(--text); font-size: .82rem; line-height: 1.35;
    pointer-events: none; box-shadow: 0 10px 24px rgba(0,0,0,.5);
}

/* Meldung nach einem Auftrag ohne Neuladen (queue-sync.js): die Flash-Zone schwebt oben. */
.toast { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 1050; max-width: calc(100vw - 24px); display: grid; gap: 8px; cursor: pointer; }
.toast .flash { box-shadow: 0 16px 40px rgba(0,0,0,.55); background: #1b2a20; }
.toast .flash-error { background: #2a1a1a; }

/* ---------- Schmal: Tablet ---------- */

@media (max-width: 1280px) {
    .res-strip .label { display: none; }
    .hud { gap: 12px; padding: 10px 20px; }
    .container { padding: 20px; }
    .acct-btn .lbl { display: none; }
}

/* ---------- Handy ---------- */

@media (max-width: 900px) {
    body { font-size: 14px; }
    .app { display: block; }
    .rail { display: none; }

    .mtop {
        display: flex; align-items: center; gap: 8px;
        position: sticky; top: 0; z-index: 45;
        padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top));
        background: rgba(10,11,14,.95); backdrop-filter: blur(8px);
        border-bottom: 1px solid var(--line);
    }
    .mtop .brand img { height: 18px; width: auto; }
    /* Sprungziele: Höhe der Kopfleiste (oberer Rand + 47 px) plus 12 px Luft. */
    html { scroll-padding-top: calc(max(8px, env(safe-area-inset-top)) + 59px); }
    .mtop .ps-toggle { flex: 1; min-width: 0; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; padding: 4px 8px; }
    .mtop .ps-thumb, .mtop .ps-thumb img { width: 30px; height: 30px; }
    .mtop .ps-kicker { display: none; }
    .mtop .ps-name { font-size: .92rem; }
    .mtop .ps-coords { font-size: max(var(--font-min), .74rem); }
    .mtop .ico-btn { width: 38px; height: 38px; flex: none; }

    .hud { position: static; display: block; padding: 8px 12px 4px; min-height: 0; background: var(--bg); border-bottom: 0; backdrop-filter: none; }
    .hud-tools { display: none; }
    .res-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
    .res-strip .item { grid-column: span 2; padding: 5px 6px 5px 5px; column-gap: 6px; grid-template-columns: 4px minmax(0, 1fr); }
    .res-strip .item.quantum, .res-strip .item.energy { grid-column: span 3; }
    .res-strip .gauge { width: 4px; height: 30px; }
    .res-strip .label { display: inline; font-size: max(var(--font-min), .6rem); letter-spacing: .06em; }
    .res-strip .head .res-icon { width: 18px; height: 18px; }
    .res-strip .value { font-size: .84rem; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 2px; }
    .res-strip .res-cap, .res-strip .energy-prod { font-size: max(var(--font-min), .7rem); }
    .res-strip .item.quantum .value, .res-strip .item.energy .value { flex-wrap: nowrap; }

    .container { padding: 12px 12px 120px; }
    .footer { padding: 16px 12px 96px; }
    .page-header h1 { font-size: 1.35rem; }

    .mobile-tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
        background: rgba(14,16,20,.97); backdrop-filter: blur(8px);
        border-top: 1px solid var(--line);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .mtb-item {
        display: grid; justify-items: center; gap: 1px; padding: 7px 0 8px;
        color: var(--muted); background: none; border: 0; cursor: pointer; position: relative;
        border-top: 3px solid transparent;
    }
    .mtb-item.active { color: var(--amber); border-top-color: var(--amber); background: linear-gradient(180deg, var(--amber-soft), transparent); }
    .mtb-icon { font-size: 1.2rem; line-height: 1.2; }
    .mtb-label { font-size: max(var(--font-min), .7rem); font-weight: 600; letter-spacing: .04em; }
    .mtb-punkt { position: absolute; top: 6px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px #0e1014; }

    .mtb-more-panel { display: block; position: fixed; inset: 0; z-index: 950; }
    .mtb-more-panel[hidden] { display: none !important; }
    .mtb-more-backdrop { position: absolute; inset: 0; background: rgba(4,5,8,.7); }
    .mtb-more-sheet {
        position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto;
        background: var(--panel); border-top: 2px solid var(--amber); border-radius: 12px 12px 0 0;
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
    .mtb-more-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; position: sticky; top: 0; background: var(--panel); z-index: 1; }
    .mtb-more-title { font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; }
    .mtb-close { width: 38px; height: 38px; border-radius: var(--rad); border: 1px solid var(--line-strong); background: var(--bg-raise); color: var(--text-2); font-size: 1.1rem; cursor: pointer; }
    .mtb-more-content { padding: 0 12px 12px; display: grid; gap: 14px; }
    .mtb-section { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
    .mtb-section-label { grid-column: 1 / -1; font-size: max(var(--font-min), .68rem); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 0 4px; border-left: 3px solid var(--amber); padding-left: 8px; margin-bottom: 2px; }
    .mtb-link { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: var(--rad); background: var(--bg-raise); border: 1px solid var(--line); color: var(--text); font-size: .9rem; min-height: 44px; }
    .mtb-link .nav-badge { margin-left: auto; }
    .mtb-link-logout { color: #ffaca6; }

    #planetPanel { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 82vh; border-radius: 12px 12px 0 0; border-top: 2px solid var(--amber); z-index: 950; }
    .tp-head { cursor: default; }
    #tutPanel { left: 12px; right: 12px; top: 60px; width: auto; }
    .mtop .aufgabe-btn { width: 38px; padding: 0; }
    .mtop .aufgabe-btn .lbl { display: none; }
    .res-strip .item .value.res-pair { display: block; }
    .res-strip .res-current { display: block; }
    #voidar-chat { right: 12px; bottom: 70px; }
    .vchat-launcher { width: 46px; height: 46px; font-size: 19px; }
    .vchat-panel { width: min(340px, calc(100vw - 24px)); }

    .card, .panel { padding: 14px; }






    .info-modal-backdrop, .fleet-map-modal, .vd-schleier { padding: 10px; }
    .ship-info-grid { grid-template-columns: 1fr; }
    .info-stufen-wahl { margin: 4px 14px 12px; }
    .isw-knoepfe > button.btn-sm { flex: 1 1 auto; min-width: 0; padding-left: 6px; padding-right: 6px; font-size: .8rem; letter-spacing: 0; }
    .info-table-wrap { padding: 0 14px 16px; }
}
@media (max-width: 380px) {
    .mtop .brand { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .radar-alert__icon, .lz-punkt { animation: none; }
}

.res-strip .item { flex: 1 1 auto; }
.res-strip .value { overflow: visible; }
@media (max-width: 1600px) { .hud .aufgabe-btn { width: 42px; padding: 0; } .hud .aufgabe-btn .lbl { display: none; } }
@media (max-width: 1500px) { .res-strip .value { font-size: .94rem; } .res-strip .res-cap, .res-strip .energy-prod { font-size: .78rem; } .hud { gap: 12px; padding: 10px 20px; } }
@media (max-width: 900px) { .app { background: var(--bg); } }

/* Gäste und Lobby behalten die Kopfleiste ohne Seitenleiste. */
.app.app-guest { display: block; background: var(--bg); }

/* ---------- Altregeln aus main.css für den Rahmen aufheben ---------- */

/* Grundgröße wie im Entwurf (16 px). „Kompakte Darstellung“ verkleinert im
   selben Verhältnis wie bisher (14,5 zu 15). */
html { font-size: 16px; }
html, body { background: var(--bg); color: var(--text); font-family: var(--font); }
body { font-size: 15px; line-height: 1.5; }
html.vd-compact { font-size: 15.47px; }
html.vd-compact body { font-size: 14px; }

.hud .res-strip .value { display: block; font-family: var(--font); font-weight: 600; color: var(--text); }
.hud .res-strip .value.res-full .res-current { color: var(--text) !important; font-weight: 600; }
.hud .res-strip .value.res-full .res-cap { color: var(--muted) !important; font-weight: 500; }
.hud .res-strip .item.full .res-current { color: var(--warn) !important; }
.hud .res-strip .energy-avail { color: var(--text); }
.hud .res-strip .energy-avail.energy-negative { color: var(--danger); }
.hud .res-strip .energy-pair .res-sep { margin: 0 2px; }
.hud .res-strip .label { font-size: max(var(--font-min), .68rem); }

.ico-btn.topbar-bell, .ico-btn.topbar-icon { margin: 0; }
.ico-btn .bell-icon, .ico-btn .ti-icon { font-size: inherit; line-height: inherit; }
.ico-btn .bell-count, .ico-btn .ti-count { margin: 0; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; background: var(--amber); color: var(--amber-ink); font-size: max(var(--font-min), .7rem); border-radius: 9px; }

.acct .av { width: 32px !important; height: 32px; border-radius: 3px; background: linear-gradient(135deg, var(--amber), #d9622b); color: var(--amber-ink); font-size: .82rem; }
.hud .res-strip { font-size: inherit; }
.hud .res-strip .item { gap: 4px 9px; }
.hud .res-strip .value.res-full { color: var(--text) !important; font-weight: 600; }
.stage > main.container { padding: 24px 28px 48px; max-width: 1240px; margin: 0 auto; }

@media (max-width: 900px) {
    body { font-size: 14px; }
    .stage > main.container { padding: 12px 12px 120px !important; }
    .hud .res-strip .label { font-size: max(var(--font-min), .6rem); letter-spacing: .06em; }

    .mtop .ico-btn { min-height: 0; }
    .mtop .topbar-bell, .mtop .topbar-icon { display: inline-flex !important; }

    .hud .res-strip { display: grid !important; flex-wrap: initial !important; gap: 4px !important; font-size: inherit !important; overflow: visible; width: 100%; max-width: none; justify-content: initial; }
    .hud .res-strip .item { padding: 5px 6px 5px 5px !important; gap: 0 6px !important; flex: initial; justify-content: initial; }
    .hud .res-strip .item .label { display: inline; }
    .hud .res-strip .res-sep, .hud .res-strip .res-cap, .hud .res-strip .energy-prod { display: inline !important; }
    .hud .res-strip .res-pair .res-cap { font-size: .78rem; }

    .mobile-tabbar { padding: 0 0 env(safe-area-inset-bottom); box-shadow: none; backdrop-filter: blur(8px); }
    .mobile-tabbar .mtb-item { flex: initial; flex-direction: initial; align-items: initial; justify-content: initial; font-size: inherit; min-height: 0; transition: none; }
    .mobile-tabbar .mtb-item:hover, .mobile-tabbar .mtb-item:focus-visible { color: var(--muted); }
    .mobile-tabbar .mtb-item.active { color: var(--amber); }
    .mobile-tabbar .mtb-item.active .mtb-icon { transform: none; }
    .mobile-tabbar .mtb-punkt { left: auto; margin-left: 0; }
}

/* Kontomenü: öffnet per Klick (leitstand.js), nicht mehr beim Überfahren. */
.hud .acct .dropdown { display: block; flex-direction: initial; gap: normal; opacity: 1; visibility: visible; transform: none; transition: none; backdrop-filter: none; }
.hud .acct .dropdown a { font-size: inherit; transition: none; }
.hud .acct .dropdown a .ico { font-size: inherit; flex-shrink: initial; }

/* Aufgaben- und Planetenfenster */
#tutPanel, #planetPanel { font-size: 15px; }
#tutPanel { display: block; }
#tutPanel.hidden, #planetPanel.hidden { display: none; }
#tutPanel .tp-head, #planetPanel .tp-head { border-bottom: 0; }
#tutPanel .tp-title, #planetPanel .tp-title { display: block; color: var(--text); gap: normal; }
#tutPanel .tp-btn, #planetPanel .tp-btn { display: block; font-size: inherit; }
#tutPanel .tp-chapter { font-weight: 400; }
#tutPanel .tp-quest { color: var(--text); margin: 0 0 6px; }
#tutPanel .tp-howto { background: none; border: 0; border-radius: 0; padding: 0; }
#tutPanel .tp-cond { font-size: inherit; }
#tutPanel .tp-check { flex: initial; font-size: inherit; font-weight: 400; }
#tutPanel .tp-foot, #planetPanel .tp-foot { background: transparent; border-top: 0; }
#tutPanel .tp-foot a, #planetPanel .tp-foot a { font-size: inherit; color: var(--amber-2); }
#tutPanel .tp-updated { font-size: inherit; }
#planetPanel .tp-body { padding: 12px 14px; }
#planetPanel .psw-hinweis { margin: 0 0 .6em; }
#planetPanel .psw-gruppe { background: var(--bg-raise); }
#planetPanel .psw-zeile { border-radius: 0; padding: 0; gap: normal; }
#planetPanel .psw-griff { display: block; border-radius: 0; }
#planetPanel .psw-wahl, #planetPanel .psw-bild { border-radius: 0; }
#planetPanel .psw-name, #planetPanel .psw-check { font-size: inherit; }
#planetPanel .psw-name b { color: var(--text); }
#planetPanel .psw-ruhe { margin: 0; }
@media (max-width: 900px) {
    .mtb-more-panel .mtb-more-header { border-bottom: 0; }
    .mtb-more-panel .mtb-close { padding: 1px 6px; }
    .mtb-more-panel .mtb-section { padding: 0; }
}
@media (max-width: 900px) { #tutPanel, #planetPanel { font-size: 14px; } }
@media (max-width: 900px) {
    /* Am Handy liegen die Fenster fest (Blatt von unten bzw. unter der
       Kopfzeile); die gemerkte Position vom Rechner gilt hier nicht. */
    #planetPanel { left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; width: auto !important; max-height: 82vh !important; }
    #tutPanel { left: 12px; right: 12px; top: 60px; width: auto; }
    .mtb-more-panel .mtb-link:hover, .mtb-more-panel .mtb-link:focus-visible { background: var(--bg-raise); color: var(--amber); }
}
@media (max-width: 900px) { #planetPanel, #tutPanel { max-width: none !important; } }
.ico-btn.topbar-bell:hover { background: var(--panel); }
.ico-btn.topbar-bell.has-unread { border-color: var(--line); box-shadow: none; }
@media (max-width: 900px) {
    .hud .res-strip .value { display: flex; }
    .hud .res-strip .item .value.res-pair { display: block; }
    .hud .res-strip .energy-pair { row-gap: normal; }
}
.hud .res-strip .res-sep { color: var(--muted); }
@media (max-width: 900px) { .hud .res-strip .energy-prod { display: inline-flex !important; } }
.hud .res-strip { align-items: stretch !important; }
.hud .res-strip { flex-wrap: nowrap; }

/* Allgemeine Altregeln aus main.css, die der Entwurf nicht kennt. */
.card { margin-bottom: 0; box-shadow: none; backdrop-filter: none; }
h1, h2, h3 { color: inherit; }
.info-icon { margin-left: 0; opacity: 1; }

/* Knöpfe: main.css gewichtet button.btn-x / a.btn-x höher als der Entwurf;
   dieselben Regeln mit gleicher Gewichtung, später geladen. */
.btn, :is(a, button).btn, .btn-primary, :is(a, button).btn-primary, .btn-secondary, :is(a, button).btn-secondary, .btn-ghost, :is(a, button).btn-ghost, .btn-danger, :is(a, button).btn-danger, .btn-tech, :is(a, button).btn-tech {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 6px 14px;
    border-radius: var(--rad);
    border: 1px solid var(--line-strong);
    background: var(--panel-3);
    color: var(--text);
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .02em;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s, border-color .12s, color .12s;
}
.btn:hover, :is(a, button).btn:hover { background: #2a3040; color: var(--text); }
.btn-primary, :is(a, button).btn-primary { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.btn-primary:hover, :is(a, button).btn-primary:hover { background: var(--amber-2); border-color: var(--amber-2); color: var(--amber-ink); }
.btn-primary:disabled, :is(a, button).btn-primary:disabled { background: var(--panel-3); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-secondary, :is(a, button).btn-secondary { background: transparent; border-color: var(--amber-line); color: var(--amber-2); }
.btn-ghost, :is(a, button).btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
.btn-ghost:hover, :is(a, button).btn-ghost:hover { border-color: var(--text-2); color: var(--text); }
.btn-ghost:disabled, :is(a, button).btn-ghost:disabled { opacity: .35; cursor: not-allowed; }
.btn-danger, :is(a, button).btn-danger { background: var(--danger-soft); border-color: var(--danger-line); color: #ffb3ae; }
.btn-danger:hover, :is(a, button).btn-danger:hover { background: rgba(255,95,87,.22); color: #fff; }
.btn-tech, :is(a, button).btn-tech { background: var(--ice-soft); border-color: var(--ice-line); color: var(--ice); }
.btn-tech:hover, :is(a, button).btn-tech:hover { background: rgba(108,196,255,.2); color: #d9f0ff; }
.btn-tech:disabled, :is(a, button).btn-tech:disabled { opacity: .4; cursor: not-allowed; }
.btn-sm, :is(a, button).btn-sm { min-height: 32px; padding: 4px 10px; font-size: .84rem; }
.btn-xs, :is(a, button).btn-xs { min-height: 28px; padding: 2px 8px; font-size: .8rem; }

h2 { padding-bottom: 0; border-bottom: 0; }

/* Tooltip (tooltip.js) wie im Entwurf: dunkle Fläche, ohne Pfeil. Lage setzt das Skript. */
.voidar-tooltip { text-align: left; padding: 7px 10px; border-radius: var(--rad); background: #262b36; border: 1px solid var(--line-strong); color: var(--text); font-size: .82rem; font-weight: 400; line-height: 1.35; max-width: 280px; white-space: normal; box-shadow: 0 10px 24px rgba(0,0,0,.5); }
.voidar-tooltip::after { display: none; }

/* Voidar-Zeichen vor dem Namen von Admins (RoleService::abzeichen):
   Amber Super-Admin, Blau Game-Admin. Bilder sind sonst Block (oben). */
.admin-abzeichen {
    display: inline-block;
    height: 0.85em;
    width: auto;
    vertical-align: -0.1em;
    margin-right: 0.3em;
}
/* Die Profilüberschrift hält ihre Teile schon mit gap auseinander. */
.pf-name > .admin-abzeichen { margin-right: 0; }

/* Glas-Effekte reduzieren (Einstellungen > Anzeige, settings.js: vd-reduce-glass).
   Bisher griff der Schalter nur noch auf die alten --ov-*-Werte aus main.css;
   die Unschaerfe des Redesigns steht fest im CSS. Jetzt: keine Unschaerfe
   mehr hinter Leisten, Menues und Fenstern, durchscheinende Leisten werden
   fest. Unschaerfe kostet Grafikleistung, auf schwachen Geraeten spuerbar. */
html.vd-reduce-glass *,
html.vd-reduce-glass *::before,
html.vd-reduce-glass *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.vd-reduce-glass .hud,
html.vd-reduce-glass .mtop { background: var(--bg); }

/* Abgenommener Feinschliff: kompakter Rahmen, originale Spielinhalte.
   .app-feinschliff begrenzt den Rahmen auf angemeldete Spielseiten. */
:root {
    --bg: #0d1015;
    --bg-raise: #10151c;
    --panel: #141920;
    --panel-2: #1c242f;
    --line: #252d38;
    --text: #eceef2;
    --text-2: #b9b8b4;
    --muted: #9aa5b5;
    --amber: #ffa147;
    --amber-2: #ffc087;
    --rail-w: 202px;
    --font-min: 11px;
}
.app-feinschliff { min-height: 100dvh; background: var(--bg); }
html:has(.app-feinschliff) { scroll-padding-top: calc(var(--leitstand-kopf, 90px) + 12px); scroll-padding-bottom: calc(var(--leitstand-fuss, 0px) + 12px); }
.app-feinschliff :is(code, pre, kbd) { font-family: var(--font); }
.app-feinschliff .stage { min-height: 100dvh; }
.app-feinschliff .rail {
    height: 100dvh; min-height: 0; padding: 27px 17px 18px;
    display: flex; flex-direction: column; gap: 0; overflow: hidden;
    background: #101319;
}
.app-feinschliff .rail .brand { width: 144px; margin: 0 9px 30px; flex: none; }
.app-feinschliff .rail .brand img { height: auto; width: 100%; }
.app-feinschliff .ps-toggle {
    grid-template-columns: 35px minmax(0, 1fr) auto; gap: 10px;
    padding: 11px 10px; background: #191f28; border-color: #303847;
    font-size: 13px; flex-shrink: 0;
}
.app-feinschliff .ps-only { cursor: default; }
.app-feinschliff .ps-thumb, .app-feinschliff .ps-thumb img { width: 35px; height: 35px; }
.app-feinschliff .ps-kicker { font-size: 11px; letter-spacing: 1px; line-height: 1.5; }
.app-feinschliff .rail .ps-toggle { row-gap: 0; padding: 9px 10px; }
.app-feinschliff .rail .ps-current { display: contents; }
.app-feinschliff .rail .ps-kicker { display: none; }
.app-feinschliff .rail .ps-thumb { grid-column: 1; grid-row: 1 / 3; align-self: center; }
.app-feinschliff .rail .ps-name { grid-column: 2; grid-row: 1; }
.app-feinschliff .rail .ps-coords { grid-column: 2; grid-row: 2; white-space: nowrap; }
.app-feinschliff .rail .ps-caret { grid-column: 3; grid-row: 1 / 3; }
.app-feinschliff .ps-name { font-size: 13px; }
.app-feinschliff .ps-coords { color: #aab9cc; font-size: 11px; }
.app-feinschliff .railnav {
    flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
    margin-top: 23px; gap: 15px;
    overscroll-behavior: contain; scrollbar-width: thin;
    scrollbar-color: #424c5b transparent;
}
.app-feinschliff .nav-grp-label {
    font-size: 11px; font-weight: 500; letter-spacing: 1.5px;
    color: #9aa5b5; border: 0; background: none; padding: 7px 10px;
}
.app-feinschliff .nav-grp-label .ico, .app-feinschliff .nav-grp-label::after { display: none; }
.app-feinschliff .railnav a {
    min-height: 36px; padding: 8px 10px; gap: 10px; margin: 2px 0;
    font-size: 14px; font-weight: 400; color: #c1cad7; border-left-width: 2px;
}
.app-feinschliff .railnav a .ico:has(.nav-img), .app-feinschliff .railnav .nav-img { width: 21px; height: 21px; flex: none; }
.app-feinschliff .railnav a.cur { color: #ffc48c; background: linear-gradient(90deg, #ff9b3524, #ff9b350d); }
.app-feinschliff .railnav a:hover { background: #242832; }
.app-feinschliff .hud-flat {
    min-height: 90px; padding: 16px 29px; gap: 18px;
    background: #11151c; backdrop-filter: none;
}
.app-feinschliff .hud-flat .res-strip {
    display: grid; grid-template-columns: 1.1fr 1.1fr 1.1fr .8fr 1fr;
    min-width: 0; gap: 16px; flex: 1; width: auto;
}
.app-feinschliff .hud-flat .res-strip:has(.item:only-child) { grid-template-columns: minmax(0, 220px); }
.app-feinschliff .hud-flat .res-strip .item {
    display: grid; grid-template-columns: 29px minmax(0, 1fr);
    grid-template-rows: auto auto 3px; grid-column: auto;
    padding: 0 !important; gap: 0 8px !important; align-content: center;
    background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
.app-feinschliff .hud-flat .res-strip .head { display: contents; }
.app-feinschliff .hud-flat .res-strip .head .res-icon { grid-column: 1; grid-row: 1 / 3; width: 29px; height: 29px; }
.app-feinschliff .hud-flat .res-strip .label {
    grid-column: 2; grid-row: 1; display: block; color: #b8c3d2;
    font-size: 11px; letter-spacing: 0; text-transform: none; font-weight: 400;
}
.app-feinschliff .hud-flat .res-strip .item .value {
    grid-column: 2; grid-row: 2; display: flex; align-items: baseline;
    flex-wrap: wrap; gap: 0 3px; line-height: 1.4; font-size: 19px;
    color: var(--text); font-weight: 600; min-width: 0;
}
.app-feinschliff .hud-flat .res-strip .res-current { display: inline; }
.app-feinschliff .hud-flat .res-strip .res-limit { display: inline-flex; align-items: baseline; gap: 2px; white-space: nowrap; }
.app-feinschliff .hud-flat .res-strip .res-sep,
.app-feinschliff .hud-flat .res-strip .res-cap,
.app-feinschliff .hud-flat .res-strip .energy-prod,
.app-feinschliff .hud-flat .res-strip .value.res-full .res-cap {
    display: inline !important; font-size: 13px; font-weight: 500; color: #b9b8b4 !important; margin: 0;
}
.app-feinschliff .hud-flat .res-strip .gauge {
    grid-column: 2; grid-row: 3; position: relative; width: 100%; max-width: 115px;
    height: 2px; margin-top: 5px; overflow: hidden; border-radius: 2px;
    background: #2a303b; align-self: start;
}
.app-feinschliff .hud-flat .res-strip .gauge i { right: auto; top: 0; bottom: 0; height: 100%; width: 0; }
.app-feinschliff .hud-tools { display: flex; gap: 7px; align-items: center; }
.app-feinschliff .hud-tools .ico-btn { width: 35px; height: 35px; min-height: 35px; background: transparent; }
.app-feinschliff .hud-tools .topbar-bell, .app-feinschliff .hud-tools .topbar-icon { display: inline-flex !important; }
.app-feinschliff .hud-tools .ico-btn .sym { width: 22px; height: 22px; }
.app-feinschliff .hud-tools .aufgabe-btn { display: inline-flex; width: auto; gap: 6px; padding: 5px 10px; border-color: #775333; background: #71471d1f; }
.app-feinschliff .hud-tools .aufgabe-btn .lbl { display: inline; font-size: 11px; color: #ffc087; }
.app-feinschliff .acct-btn { height: 35px; max-width: 180px; padding: 0 7px 0 3px; font-size: 13px; }
.app-feinschliff .acct-btn { position: relative; }
.app-feinschliff .acct-btn > .nav-badge { position: absolute; top: -6px; right: -5px; margin: 0; }
.app-feinschliff .acct-btn .lbl { overflow: hidden; text-overflow: ellipsis; }
.app-feinschliff .acct .av { height: 29px; min-width: 29px; width: 29px !important; background: #3e3022; color: #ffc38a; font-size: 11px; }
.app-feinschliff .pill-admin { height: 35px; padding: 0 8px; font-size: 11px; }
.app-feinschliff .stage > main.container { flex: 1; min-width: 0; max-width: 1530px; padding: 29px 32px 30px; }
.app-feinschliff .stage > .footer { margin-top: auto; padding: 22px 28px 22px 32px; flex-shrink: 0; font-size: 11px; }
.app-feinschliff .page-header { margin: 0 0 26px; gap: 18px 25px; }
.app-feinschliff .page-header h1 { font-size: 29px; font-weight: 500; }
.app-feinschliff .page-header h1 { flex-wrap: wrap; }
.app-feinschliff .page-header .page-context { flex-basis: 100%; }
.app-feinschliff .page-header .kicker { font-size: 11px; font-weight: 400; letter-spacing: 1.5px; color: #a3adbd; }
.app-feinschliff .page-context { display: block; margin-top: 8px; font-size: 12px; font-weight: 400; color: #b9c5d4; }
.app-feinschliff .page-header .meta { font-size: 11px; line-height: 1.8; max-width: 520px; }
.app-feinschliff .page-header .meta .muted { font-size: 13px; font-weight: 500; color: #b9b8b4; }
.app-feinschliff .page-header .h1-img { width: 26px; height: 26px; }
.app-feinschliff .card::before, .app-feinschliff .panel::before { display: none; }
.app-feinschliff .card > h2 { border: 0; padding-left: 0; font-size: 13px; font-weight: 500; letter-spacing: 1.2px; }
.app-feinschliff .card, .app-feinschliff .panel { box-shadow: none; }
#tutPanel { display: flex; flex-direction: column; left: auto; right: 24px; width: 370px; border-color: #5a4b39; box-shadow: 0 16px 55px #0007; }
#tutPanel .tp-head { flex-shrink: 0; }
#tutPanel .tp-head { padding: 11px 15px; }
#tutPanel .tp-title { font-size: 12px; }
#tutPanel .tp-body { padding: 18px 16px; font-size: 13px; }
#tutPanel .tp-body h3 { font-size: 17px; font-weight: 500; }
#tutPanel .tp-foot { padding: 13px 15px; gap: 8px; flex-wrap: wrap; font-size: 11px; }
#tutPanel .tp-updated { font-size: 11px; }
#tutPanel .tp-body { flex: 1; min-height: 0; overflow-y: auto; }
#tutPanel .tp-foot { display: flex; flex-direction: column; align-items: stretch; flex-shrink: 0; gap: 12px; }
#tutPanel .tp-foot-links { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
#tutPanel #tpClaim { margin: 0; }
#tutPanel .tp-reward { display: grid; gap: 7px; }
#tutPanel #tpRewardParts { display: flex; flex-wrap: wrap; gap: 6px 15px; }
#tutPanel #tpClaimButton { width: 100%; font-size: 12px; }
#voidar-chat .vchat-status, #voidar-chat .vchat-badge { font-size: 11px; }
@media (max-width: 1600px) {
    .app-feinschliff .acct-btn > .lbl, .app-feinschliff .pill-admin > .lbl { display: none; }
}
@media (min-width: 1600px) {
    html:has(.app-feinschliff):not(.vd-compact) { font-size: 17px; }
    .app-feinschliff { --font-min: 13px; --rail-w: 228px; font-size: 16px; }
    .app-feinschliff .railnav a { font-size: 16px; min-height: 40px; }
    .app-feinschliff .nav-grp-label { font-size: 13px; letter-spacing: 1px; }
    .app-feinschliff .ps-kicker, .app-feinschliff .ps-coords { font-size: 13px; }
    .app-feinschliff .ps-name { font-size: 15px; }
    .app-feinschliff .hud-flat { padding-inline: 38px; min-height: 98px; }
    .app-feinschliff .hud-flat .res-strip .label { font-size: 14px; }
    .app-feinschliff .hud-flat .res-strip .res-sep,
    .app-feinschliff .hud-flat .res-strip .res-cap,
    .app-feinschliff .hud-flat .res-strip .energy-prod,
    .app-feinschliff .hud-flat .res-strip .value.res-full .res-cap { font-size: 15px; }
    .app-feinschliff .hud-tools .aufgabe-btn .lbl, .app-feinschliff .acct-btn { font-size: 14px; }
    .app-feinschliff .acct .av, .app-feinschliff .pill-admin { font-size: 13px; }
    .app-feinschliff .stage > main.container { padding: 38px 42px 30px; }
    .app-feinschliff .hud-flat .res-strip .value { font-size: 22px; }
    .app-feinschliff .stage > .footer { font-size: 13px; }
    .app-feinschliff .page-header .kicker { font-size: 13px; }
    .app-feinschliff .page-context, .app-feinschliff .page-header .meta,
    .app-feinschliff .page-header .meta .muted { font-size: 14px; }
    .app-feinschliff .card > h2 { font-size: 15px; }
    html:has(.app-feinschliff) #tutPanel { width: 420px; }
    html:has(.app-feinschliff) #tutPanel .tp-title { font-size: 14px; }
    html:has(.app-feinschliff) #tutPanel :is(.tp-body, .tp-howto, .tp-conds, .tp-done-banner) { font-size: 15px; line-height: 1.6; }
    html:has(.app-feinschliff) #tutPanel :is(.tp-foot, .tp-updated, .tp-chapter) { font-size: 13px; }
    html:has(.app-feinschliff) #tutPanel #tpClaimButton { font-size: 14px; }
}
@media (min-width: 901px) and (max-width: 1240px) {
    :root { --rail-w: 182px; }
    .app-feinschliff .rail { padding-inline: 13px; }
    .app-feinschliff .rail .brand { width: 132px; }
    .app-feinschliff .hud-flat { padding-inline: 20px; gap: 12px; }
    .app-feinschliff .hud-flat .res-strip { gap: 10px; }
    .app-feinschliff .hud-flat .res-strip .item { grid-template-columns: 21px minmax(0, 1fr); }
    .app-feinschliff .hud-flat .res-strip .head .res-icon { width: 21px; height: 21px; }
    .app-feinschliff .hud-flat .res-strip .value { font-size: 17px; }
    .app-feinschliff .hud-tools .aufgabe-btn .lbl { display: none; }
    .app-feinschliff .hud-tools .aufgabe-btn { width: 35px; padding: 5px; }
}
@media (max-width: 900px) {
    .app-feinschliff .rail { display: none; }
    .app-feinschliff .hud-flat {
        position: sticky; top: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto;
        min-height: 0; padding: 12px 16px 16px; gap: 16px 10px; border-bottom: 1px solid var(--line);
    }
    .app-feinschliff .hud-flat .mtop {
        display: flex; flex-wrap: wrap; position: static; min-width: 0; min-height: 0; height: auto;
        grid-column: 1; grid-row: 1; padding: 0; border: 0; background: none; backdrop-filter: none;
    }
    .app-feinschliff .mtop .brand { display: flex; flex: 0 0 102px; }
    .app-feinschliff .mtop .ps-toggle { flex: 1 1 120px; padding: 3px 0; border: 0; background: none; gap: 7px; grid-template-columns: 28px minmax(0, 1fr) auto; }
    .app-feinschliff .mtop .ps-thumb, .app-feinschliff .mtop .ps-thumb img { width: 28px; height: 28px; }
    .app-feinschliff .mtop .ps-kicker { display: none; }
    .app-feinschliff .mtop .ps-name { font-size: 12px; }
    .app-feinschliff .mtop .ps-coords { font-size: 11px; }
    .app-feinschliff .hud-flat .hud-tools { grid-column: 2; grid-row: 1; align-self: start; gap: 6px; }
    .app-feinschliff .hud-tools .acct { display: none; }
    .app-feinschliff .hud-flat .res-strip {
        grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 12px !important; width: 100%;
    }
    .app-feinschliff .hud-flat .res-strip .item { grid-template-columns: minmax(0, 1fr); grid-column: auto; }
    .app-feinschliff .hud-flat .res-strip .head .res-icon { display: none; }
    .app-feinschliff .hud-flat .res-strip .item .label,
    .app-feinschliff .hud-flat .res-strip .item .value,
    .app-feinschliff .hud-flat .res-strip .item .gauge { grid-column: 1; }
    .app-feinschliff .hud-flat .res-strip .item .value { font-size: 17px; }
    .app-feinschliff .hud-flat .res-strip .res-pair .res-limit { flex-basis: 100%; }
    .app-feinschliff .stage > main.container { padding: 24px 16px 28px !important; }
    .app-feinschliff .stage > .footer { padding: 22px 16px calc(88px + env(safe-area-inset-bottom)); }
    .app-feinschliff .page-header h1 { font-size: 25px; }
    .mobile-tabbar { height: calc(65px + env(safe-area-inset-bottom)); }
    .mobile-tabbar .mtb-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 14px; }
    .mobile-tabbar .mtb-label { font-size: 14px; }
    .mtb-more-sheet { bottom: calc(65px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 85px); display: flex; flex-direction: column; padding: 15px 16px 12px; }
    .mtb-more-header { flex-shrink: 0; padding: 0 0 13px; }
    .mtb-more-title { font-size: 17px; font-weight: 500; }
    .mtb-more-content { min-height: 0; overflow: auto; overscroll-behavior: contain; }
    .mtb-section-label { font-size: 11px; font-weight: 500; letter-spacing: 1px; }
    .mtb-link { min-height: 43px; font-size: 14px; font-weight: 400; gap: 8px; }
    .mtb-link .mtb-img { width: 21px; height: 21px; }
    #tutPanel { width: 370px; right: 12px; left: auto; max-width: calc(100vw - 24px) !important; }
}
@media (max-width: 620px) {
    .app-feinschliff .hud-flat .res-strip { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px 12px !important; }
    .app-feinschliff .hud-flat .res-strip:has(.item:only-child) { grid-template-columns: minmax(0, 1fr) !important; }
    .app-feinschliff .hud-flat .res-strip .item.quantum,
    .app-feinschliff .hud-flat .res-strip .item.energy { grid-column: auto; }
    .app-feinschliff .hud-tools .aufgabe-btn .lbl { display: none; }
    .app-feinschliff .hud-tools .aufgabe-btn { width: 33px; padding: 4px; }
    .app-feinschliff .hud-tools .ico-btn { height: 33px; width: 33px; min-height: 33px; }
    .app-feinschliff .footer .legal-links { line-height: 1.8; }
    #tutPanel .tp-body { padding: 16px 14px; }
}
html.vd-reduce-glass .mobile-tabbar { background: rgb(14, 16, 20); }

/* Ab 1600 px alles auf 90 %, wie Browser-Zoom 90 % (Juergen 08.11.2026): Die
   Vergroesserungen fuer breite Bildschirme wirkten auf WQHD zu wuchtig.
   zoom sitzt auf den Inhalten, nicht auf dem Rahmen: Leiste und Seite bleiben
   bildschirmhoch, verschiebbare Fenster (Aufgabe, Planeten) rechnen weiter in
   Bildschirmpixeln. Skripte, die im Inhalt Positionen setzen, teilen durch
   element.currentCSSZoom (queue-ziehen.js, space/space.js). */
@media (min-width: 1600px) {
    .app-feinschliff { --rail-w: 205px; }
    .app-feinschliff .rail { padding: 24px 15px 16px; }
    .app-feinschliff .rail > *,
    .app-feinschliff .stage > .hud,
    .app-feinschliff .stage > main.container,
    .app-feinschliff .stage > .footer,
    html:has(.app-feinschliff) :is(#tutPanel, #planetPanel) > *,
    html:has(.app-feinschliff) :is(#voidar-chat, .info-modal-host, .vd-dialog) { zoom: .9; }
    html:has(.app-feinschliff) #tutPanel { width: 378px; }
    html:has(.app-feinschliff) #planetPanel { width: 360px; }
}
