
    :root {
      --bg: #262626;
      --panel: #2f2f2f;
      --panel-light: #3a3a3a;
      --gold: #d4b95f;
      --gold-bright: #e8cf7a;
      --text: #d6d4cd;
      --text-dim: #9a9890;
      --border: #4a4a48;
      --green: #4a7c3a;
      --green-bright: #5a9c48;
      /* Flächen und Kacheln je Design (GUI-03, 3.1.38): vorher fest eingetragen, im Design „Pergament“ unlesbar */
      --surface-alt: #221f1a;
      --tile-bg: #262626;
      --tile-border: #4a4a4a;
      --tile-idle: #8a8a8a;
      --tile-glyph: #e8e2d0;
      --danger-bg: #8a3a3a;
      --danger-border: #6a2a2a;
      --danger-bg-hover: #a04646;
      /* Bedeutungsfarben je Design (Paket B, 3.1.43): Schrift in diesen Farben hat auf Seitengrund, Karten und --panel-light
         mindestens 4,5 : 1 Kontrast (gemessen mit scripts/uiAudit.mts). Im HTML nur noch var(--…), keine festen Farbwerte. */
      --danger: #ef8f84;
      --success: #8fd08f;
      --warning: #f0a35e;
      --caution: #d4c05a;
      --info: #6fb0ec;
      --enemy: #e8964a;
      --skill: #e0c060;
      --event-color: #e6c84f;
      --text-strong: #f2ede0;
      /* Nebentext auf --panel-light (K.5): --text-dim bleibt unverändert, auf hellen Flächen gilt stattdessen dieser Wert */
      --text-soft: #b4b2aa;
      --badge-bg: #3f7f2e;
      --badge-alert-bg: #b33a2e;
      --badge-text: #fff;
      --tile-ink: #1a1a1a;
      --card-idle-border: #6b6b6b;
      --beta-bg: #e0a526;
      --beta-border: #b8841a;
      --medal-gold: #d4af37;
      --medal-silver: #b8bcc4;
      --medal-bronze: #b0773e;
      /* Edelsteine der Porträtrahmen (0.4.4.45): aus den Farben des Designs gemischt – passen so in jedes Design, ohne feste Farbwerte */
      --gem-emerald: color-mix(in srgb, var(--success) 50%, var(--green));
      --gem-ruby: color-mix(in srgb, var(--badge-alert-bg) 80%, var(--q-episch));
      --gem-sapphire: color-mix(in srgb, var(--info) 70%, var(--tile-ink));
      /* Elminthirs Rot (0.4.4.34, gemessen an Hut und Gewand seines Bilds): Rahmen, Kopfleiste und Schein des ersten Fensters eines
         Rundgangs; --elminthir-ink ist Schrift in diesem Rot (Pergament: dunkel, in themes.ts) */
      --elminthir: #a24335;
      --elminthir-ink: #f0a08c;
      /* Qualitätsstufen der Gegenstände */
      --q-minderwertig: #a3a3a3;
      --q-ungewoehnlich: #7fcc6a;
      --q-selten: #6fa9e0;
      --q-episch: #bf94e8;
      --q-artefakt: #ec8a50;
      /* Skalen (GUI-26, Paket C, 3.1.45, Richtlinie I.2–I.4): neue Werte nur noch aus diesen Stufen */
      --fs-xs: 0.75rem;
      --fs-sm: 0.85rem;
      --fs-md: 1rem;
      --fs-lg: 1.15rem;
      --fs-xl: 1.3rem;
      --fs-h1: 1.5rem;
      --sp-1: 0.25rem;
      --sp-2: 0.5rem;
      --sp-3: 0.75rem;
      --sp-4: 1rem;
      --sp-5: 1.5rem;
      --sp-6: 2rem;
      --r-sm: 4px;
      --r-md: 6px;
      --r-pill: 999px;
      --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.35);
      --shadow-overlay: 0 8px 28px rgba(0, 0, 0, 0.6);
    }
    * { box-sizing: border-box; }
    /* Tastatur (GUI-06, 3.1.44): sichtbarer Fokusrahmen überall, „Zum Inhalt springen“ als erster Tab-Stopp */
    :focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
    main:focus { outline: none; }
    .skip-link { position: absolute; left: 0.5rem; top: -4rem; z-index: 2000; padding: 0.5rem 0.9rem; background: var(--panel); color: var(--gold-bright); border: 2px solid var(--gold-bright); border-radius: 4px; text-decoration: none; }
    .skip-link:focus { top: 0.5rem; }
    /* Bausteine (Paket C, 3.1.45, src/data/uiBlocks.ts): Meldung, Leerzustand, Reiter, nur für Bildschirmleser */
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
    .notice { --notice-c: var(--gold-bright); color: var(--notice-c); border-left: 4px solid var(--notice-c); background: color-mix(in srgb, var(--notice-c) 7%, transparent); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: var(--sp-2) var(--sp-3); margin: var(--sp-3) 0; display: flex; width: fit-content; max-width: 100%; box-sizing: border-box; gap: var(--sp-2); align-items: baseline; }
    /* Proportionen (0.4.4.127, Wunsch Wolfgang: „Fenster weder zu breit noch zu schmal“): Hinweise und Leerzustände nur so breit wie ihr
       Text – ein Satz stand vorher als Balken über die ganze Seite; lange Texte brechen weiter an der Seitenbreite um. */
    .notice.compact { margin-top: 0; }
    .notice-error { --notice-c: var(--danger); }
    .notice-success { --notice-c: var(--success); }
    .notice-warning { --notice-c: var(--warning); }
    .notice-info { --notice-c: var(--gold-bright); }
    .notice-sym { flex: none; font-weight: bold; }
    .notice-body { min-width: 0; }
    .notice-body > :first-child { margin-top: 0; }
    .notice-body > :last-child { margin-bottom: 0; }
    .empty-state { border: 1px dashed var(--border); border-radius: var(--r-md); padding: var(--sp-4); margin: var(--sp-3) 0; color: var(--text-dim); text-align: center; width: fit-content; min-width: min(100%, 24rem); max-width: 100%; box-sizing: border-box; }
    /* Kästen mit einer Zeile (gewählter Beruf, zugeklappte Platz-Übersicht) so breit wie ihr Inhalt (0.4.4.127) */
    .sheet.sheet-fit, details.sheet.group-craft-slots:not([open]) { width: fit-content; max-width: 100%; box-sizing: border-box; }
    .empty-state > p { margin: 0 0 var(--sp-2); }
    .empty-state > p:last-child { margin-bottom: 0; }
    .tab-bar { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-4); }
    .tab-bar > .button { display: inline-flex; align-items: center; line-height: 1.3; } /* Reiter mit Zeichen wie ★ gleich hoch (0.4.1.18) */
    .tab-bar .tab-mark { line-height: 1; font-size: 0.9em; margin-left: 0.25em; }
    /* Reiter größer und auffälliger (0.4.4.126, Wunsch Wolfgang zu Marktplatz „Kaufen/Verkaufen“: „zu klein, soll größer werden und mehr
       Aufmerksamkeit bekommen“): eine Linie unter der Leiste, Reiter in normaler Schrift und fett, der aktive mit goldenem Balken unten. */
    .tab-bar { padding-bottom: var(--sp-2); border-bottom: 1px solid var(--border); }
    .tab-bar > a.button.small { font-size: var(--fs-md); font-weight: bold; padding: 0.5rem 1.2rem; min-height: 40px; }
    .tab-bar > a.button.small[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); }
    /* Tippflächen (GUI-07, 3.1.44): Bedienelemente mindestens 24 × 24 px, Kästchen etwas größer (die Beschriftung zählt mit) */
    main summary:not([class]) { padding-block: 0.25rem; }
    input[type="checkbox"]:not(.readonly-check), input[type="radio"] { width: 1.15rem; height: 1.15rem; vertical-align: middle; }
    input[type="file"], input[type="range"], input[type="date"] { min-height: 24px; }
    a.th-sort, a.sort-link { display: inline-block; padding-block: 0.2rem; }
    button.link-button { padding-block: 0.25rem; }
    .hero-card-links > a { padding-block: 0.25rem; }
    .hero-class-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 0.2em; display: inline-block; padding-block: 0.15rem; }
    .hero-class-link:hover { color: var(--gold-bright); }
    :is(td, th) input[type="checkbox"]:not(.readonly-check) { width: 1.5rem; height: 1.5rem; }
    main summary:not([class]) { min-height: 24px; }
    th > a, :is(h2, h3, h4) > a, .tap-line > a { display: inline-block; padding-block: 0.2rem; }
    a.num-link { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; }
    a.sort-link { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; }
    /* Beschriftete Kästchen/Optionsfelder: die Beschriftung ist das Ziel, mindestens 24 px hoch (Spezifität 0 – eigene Regeln gehen vor) */
    :where(main label:has(> input[type="radio"], > input[type="checkbox"])) { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 24px; }
    /* 3.1.69 (Meldung Wolfgang): bei langem, umbrechendem Text schrumpfte das Kästchen – es bleibt immer gleich groß */
    :where(main label:has(> input[type="radio"], > input[type="checkbox"])) > input { flex-shrink: 0; }
    .cr-conds .cond.show-tip { position: relative; }
    .cr-conds .cond.show-tip::after { content: attr(title); position: absolute; left: 0; top: 28px; z-index: 30; width: 230px; font-size: var(--fs-xs); line-height: 1.35; font-weight: normal; text-align: left; white-space: normal; background: var(--panel); color: var(--text); border: 1px solid var(--gold); border-radius: 4px; padding: 0.35rem 0.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
    a { color: var(--text); text-decoration: underline; }
    a:visited { color: var(--text); }
    a:hover { color: var(--gold-bright); }
    body {
      font-family: Georgia, 'Times New Roman', serif;
      background: var(--bg);
      background-image: radial-gradient(circle at 20% 10%, #2f2f2f 0%, #1c1c1c 70%);
      color: var(--text);
      margin: 0;
      display: flex;
      min-height: 100vh;
    }
    nav.sidebar {
      width: 200px;
      flex-shrink: 0;
      background: var(--panel);
      border-right: 2px solid var(--border);
      padding: 1.2rem 1rem;
      --nav-pb: 1.2rem;
      padding-bottom: var(--nav-pb);
    }
    .hero-topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
    /* Heldenauswahl am Namen (0.4.1.18): ohne Kasten, die Liste klappt nach unten auf */
    details.hero-pick { position: relative; display: inline-block; }
    details.hero-pick > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.25rem; }
    details.hero-pick > summary::-webkit-details-marker { display: none; }
    .hero-pick-caret { font-size: var(--fs-xs); color: var(--text-dim); }
    .hero-pick-list { position: absolute; top: 100%; left: 0; z-index: 950; margin: 0.3rem 0 0; padding: 0.3rem 0; list-style: none; min-width: 12rem; background: var(--panel); box-shadow: var(--shadow-overlay, 0 6px 18px rgba(0,0,0,0.45)); border-radius: var(--r-sm, 4px); }
    .hero-pick-list li { margin: 0; }
    .hero-pick-list form { margin: 0; }
    .hero-pick-list button, .hero-pick-list a { display: flex; justify-content: space-between; gap: 0.6rem; width: 100%; padding: 0.45rem 0.8rem; background: none; border: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 2rem; }
    .hero-pick-list button:hover, .hero-pick-list a:hover, .hero-pick-list button:focus-visible { background: var(--hover); color: var(--gold-bright); }
    .hero-pick-level { color: var(--text-dim); font-size: var(--fs-xs); }
    .group-hero-table td { vertical-align: top; }
    /* Porträt senkrecht mittig (0.4.4.22, Wunsch Wolfgang): hohe Zeilen (viele Rechte) lassen es nicht mehr oben kleben */
    .group-hero-table td.gh-portrait-cell { vertical-align: middle; }
    /* Direkthandel als Verhandlung (0.4.4.15): beide Seiten nebeneinander, am Handy untereinander */
    .trade-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-4); }
    .trade-columns h3, .trade-columns h4 { margin: 0 0 var(--sp-2); }
    .trade-side-list { margin: 0; padding-left: 1.2rem; }
    .trade-stacks { max-height: 320px; overflow: auto; }
    .trade-notes { list-style: none; margin: var(--sp-3) 0 0; padding: var(--sp-2) var(--sp-3); border-left: 3px solid var(--border); background: var(--field); font-size: var(--fs-sm); }
    .trade-notes li + li { margin-top: var(--sp-1); }
    .trade-deal + .trade-deal { margin-top: var(--sp-4); }
    /* Nachricht im Direkthandel als eigener Block (0.4.4.21) */
    .trade-note-field { margin-top: var(--sp-3); }
    /* Charakter-DB: feste Breite der Spalte Gegenstand (0.4.4.21) */
    table.cdb-items { table-layout: fixed; width: 100%; }
    table.cdb-items col.cdb-col-item { width: 22rem; }
    table.cdb-items td.cdb-item { overflow-wrap: anywhere; }
    .trade-note-field label.field-label { display: block; margin: 0 0 var(--sp-1); }
    .trade-note-field textarea { display: block; width: 100%; max-width: 100%; box-sizing: border-box; min-height: 5rem; resize: vertical; font: inherit; }
    /* Porträt statt Nummer (0.4.4.10, Wunsch Wolfgang): Ausschnitt „amerikanisch“ mit 128 × 128, ohne Bild der Anfangsbuchstabe */
    .gh-portrait-link { display: block; width: 128px; text-decoration: none; }
    .gh-portrait { display: block; width: 128px; height: 128px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--field); }
    .gh-portrait-empty { display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 3rem; }
    /* Gruppenbörse (0.4.4.43): Einstellungen untereinander, Knöpfe einer Zeile untereinander, Passwort neben seinem Knopf */
    .finder-intro { color: var(--text-dim); }
    .finder-settings { display: grid; gap: 0.4rem; margin-top: var(--sp-2); max-width: 40rem; }
    .finder-settings input[type="text"] { width: 100%; }
    /* Gruppenbörse als Karten (Seitenschema B, 0.4.5.13): Beitreten, Anfragen und Passwort untereinander rechts */
    .finder-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
    .finder-pass { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0; }
    .finder-pass input[type="password"] { width: 7rem; }
    .group-hero-sub { font-size: var(--fs-xs); color: var(--text-dim); font-weight: normal; }
    .group-rights { font-size: var(--fs-sm); }
    /* Rechte untereinander statt nebeneinander (v0.3.78, Wunsch Wolfgang) */
    .group-rights .rights-ok { display: block; }
    .rights-ok { color: var(--success); white-space: nowrap; margin-right: 0.5rem; }
    .channel-badge { font-size: var(--fs-xs); color: var(--text-dim); border: 1px solid var(--border); border-radius: 4px; padding: 0.1rem 0.45rem; white-space: nowrap; }
    .channel-badge.beta { color: var(--on-accent); background: var(--beta-bg); border-color: var(--beta-border); font-weight: bold; }
    .feat-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    @media (min-width: 769px) {
      .storage-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
      .feat-table.storage-table { display: table; width: 100%; }
      /* Gleich breite Spalten (0.4.4.22, Wunsch Wolfgang): Ausrüstung und Handwerkswaren stehen in denselben Spalten an derselben
         Stelle. Lange Namen und Überschriften brechen um, Auswahl und Mengenfeld bleiben in ihrer Zelle; unter 56rem scrollt der Rahmen. */
      .feat-table.storage-table { table-layout: fixed; min-width: 56rem; }
      .storage-table th, .storage-table td { overflow-wrap: anywhere; hyphens: auto; }
      .storage-table a.th-sort { white-space: normal; }
      .storage-table td select { width: 100%; max-width: 100%; min-width: 0; }
      .storage-table td input[type="number"] { max-width: 100%; }
      /* Breiten (0.4.4.36, Wunsch Wolfgang: „Stück und Anzahl ruhig weniger breit, genau so die Abstände zwischen den Spalten, damit
         Gegenstand wieder mehr Platz bekommt“; „Verschieben nach“ als leere Auswahl): Anzahl, Stück und Verschieben nach fest und schmal,
         Gegenstand gut ein Drittel, Art und Preis teilen sich den Rest. Prozent nur hier, weil die Tabelle feste Spalten
         hat (table-layout: fixed) – an automatisch breiten Tabellen bleiben Prozentbreiten tabu. Seit 0.4.4.126 ohne „Ausrüstungsplatz“
         (Wunsch Wolfgang: „sieht man eh im Item“), Gegenstand dafür breiter. */
      .storage-table col.sc-name { width: 44%; }
      .storage-table col.sc-stufe { width: 3.75rem; } /* Stufe (0.4.5.9, Seitenschema) */
      .storage-table col.sc-akt { width: 6.5rem; } /* „Anbieten“ im Keller (0.4.4.129); Gegenstand dort etwas schmaler */
      .storage-table.has-act col.sc-name { width: 37%; }
      .storage-table col.sc-anzahl, .storage-table col.sc-stueck { width: 4.75rem; }
      .storage-table col.sc-ziel { width: 7rem; }
      .feat-table.storage-table th, .feat-table.storage-table td { padding-left: 0.3rem; padding-right: 0.3rem; }
    }
    .storage-move-form { margin: 0; }
    /* Tross (0.4.5.10, Seitenschema L2): Menge und Knopf in der Aktionsspalte nebeneinander */
    .tross-move { margin: 0; display: flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; }
    /* Stufe, Anzahl und Menge mittig unter ihrer Überschrift (0.4.4.129, Wunsch Wolfgang; Stufe seit 0.4.5.9) */
    .storage-table :is(th, td):is(:nth-child(3), :nth-child(4), :nth-child(6)) { text-align: center; }
    .storage-table td.storage-act .button { white-space: nowrap; hyphens: manual; overflow-wrap: normal; }
    /* Sockel im Lager (0.4.4.126, Wunsch Wolfgang: „zu unübersichtlich“): „Sockel 2/2“, darunter je Rune eine Zeile, Knöpfe bündig */
    .socket-list { display: grid; grid-template-columns: 0.9rem 13rem auto; justify-content: start; align-items: center; gap: 0.25rem 0.5rem; margin-top: 0.3rem; font-size: var(--fs-xs); color: var(--text-dim); }
    /* Runen eingerückt unter „Sockel x/y“, das Schätz-Ergebnis rechts daneben (0.4.4.129, Beispielbild Wolfgang) */
    .socket-list > .socket-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 1.5rem; }
    .socket-list > span { grid-column: 2; }
    /* Knöpfe in einer unsichtbaren Spalte untereinander (0.4.4.129, Wunsch Wolfgang): Rune entfernen, Einsetzen, Entzaubern */
    .socket-list > .socket-add { display: contents; }
    .socket-list > .socket-add > select { grid-column: 2; }
    .socket-list > .socket-add > button, .socket-list > form:not(.socket-add) { grid-column: 3; justify-self: start; }
    .socket-list > form { margin: 0; }
        .socket-add select { min-width: 0; max-width: 16rem; font-size: var(--fs-xs); }
    /* Runen-Spalte fest 13rem (0.4.4.133, Wunsch Wolfgang): die Knöpfe stehen bei allen Gegenständen in derselben Spalte untereinander.
       Beschichtung klein wie „Verschieben nach“, ohne feste Breite; „🔍 nicht verflucht“ steht bei jedem Gegenstand unter dem Vergleich. */
    .storage-table td select.coating-select, select.coating-select { width: auto; max-width: 100%; font-size: var(--fs-xs); }
    .appraise-line { font-size: var(--fs-xs); color: var(--text-dim); margin-top: 0.2rem; }
    .socket-list .button { white-space: nowrap; hyphens: manual; overflow-wrap: normal; }
    /* Mengenfeld ohne Pfeile (0.4.4.126, Wunsch Wolfgang: „man schreibt sowieso rein, wie viele Stück“) */
    input.plain-number { text-align: center; -moz-appearance: textfield; appearance: textfield; }
    input.plain-number::-webkit-outer-spin-button, input.plain-number::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .storage-move-form .button { margin-top: var(--sp-1); }
    /* Item-Filter (Marktplatz, Lager, Keller, Gruppenlager) */
    .item-filter { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 0.7rem 0.8rem; margin: 0 0 0.9rem; display: flex; flex-direction: column; gap: 0.55rem; }
    .item-filter .if-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
    .item-filter .if-search { flex: 1 1 240px; min-width: 0; }
    /* Suche als Lupe (3.2.5, Wunsch Wolfgang): eine kurze Zeile mit Lupe; beim Anklicken (oder mit Suchtext) geht sie über die ganze
       Leiste auf. Den ausführlichen Platzhalter setzt das Seitenskript beim Fokus (data-placeholder). */
    input[type="search"].lupe { flex: 0 0 8.5rem !important; width: 8.5rem; max-width: 100%; cursor: pointer; transition: flex-basis 0.2s ease, width 0.2s ease; }
    input[type="search"].lupe:focus, input[type="search"].lupe:not(:placeholder-shown) { flex: 1 1 100% !important; width: 100%; cursor: text; }
    /* In der Filterleiste geht die Suche nur über den freien Platz auf; die Auswahlfelder bleiben in derselben Zeile (Feedback Nr. 3, 0.4.4.120). */
    .item-filter .if-row input[type="search"].lupe:focus, .item-filter .if-row input[type="search"].lupe:not(:placeholder-shown) { flex: 1 1 12rem !important; width: auto; }
    .item-filter.js-active .if-submit { display: none; }
    /* Neuigkeiten › Überblick (0.4.4.122, Feedback Nr. 16) */
    .overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-3); margin-bottom: 1rem; }
    .overview-grid > .sheet { margin: 0; }
    .overview-list { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
    .overview-stats { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 0.8rem; align-items: center; margin: 0; }
    .overview-stats dt { color: var(--text-dim); }
    .overview-stats dd { margin: 0; display: flex; align-items: center; gap: 0.5rem; }
    .overview-bar { display: inline-block; flex: 0 1 140px; height: 8px; border-radius: var(--r-sm); background: var(--panel-light); overflow: hidden; }
    .overview-bar > span { display: block; height: 100%; background: var(--green-bright); }
    .overview-bar.xp > span { background: var(--gold); }
    .overview-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
    .overview-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; min-height: 84px; padding: 0.6rem; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--panel); color: var(--text); text-decoration: none; text-align: center; }
    .overview-tile:hover, .overview-tile:focus-visible { border-color: var(--gold); color: var(--gold-bright); }
    .overview-tile-icon { font-size: var(--fs-xl); line-height: 1; }
    .overview-tile-choice { margin-top: 0.6rem; }
    .overview-tile-form { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; margin-top: 0.5rem; }
    .overview-tile-form label { display: flex; align-items: center; gap: 0.35rem; }
    /* Filterleiste zum Einklappen (0.4.4.120, Feedback Nr. 10) */
    details.if-wrap { margin: 0 0 0.9rem; }
    details.if-wrap > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; min-height: 28px; padding: 0.15rem 0.6rem; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--panel); color: var(--gold); font-size: var(--fs-sm); }
    details.if-wrap[open] > summary { margin-bottom: 0.4rem; }
    details.if-wrap > summary::before { content: "▸"; font-size: var(--fs-xs); }
    details.if-wrap[open] > summary::before { content: "▾"; }
    details.if-wrap .if-wrap-count { color: var(--text-dim); }
    .item-filter .if-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
    .if-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.65rem; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: var(--fs-sm); color: var(--text); background: rgba(255, 255, 255, 0.03); user-select: none; white-space: nowrap; }
    .if-chip:hover { border-color: var(--gold); }
    .if-chip input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
    .if-chip.active { background: var(--gold); color: var(--on-accent); border-color: var(--gold); font-weight: bold; }
    .if-chip.empty { color: var(--text-dim); border-style: dashed; }
    .if-chip:focus-within { outline: 2px solid var(--gold); outline-offset: 1px; }
    /* Filterebenen (v0.3.69, Wunsch Wolfgang): Hauptkategorien auf zwei Zeilen, jede Unterebene darunter, eingerückt und
       anders gezeichnet – Hauptkategorie gefüllte Pille, „Unterteilen nach“ Reiter, Unterkategorie umrandete kleine Chips. */
    .item-filter .if-main { display: flex; flex-direction: column; gap: 0.35rem; }
    .if-level { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; padding: 0.35rem 0.6rem; border-left: 2px solid var(--gold); border-radius: 0 6px 6px 0; }
    .if-level-1 { margin-left: 1.2rem; background: color-mix(in srgb, var(--gold) 6%, transparent); }
    .if-level-2 { margin-left: 2.4rem; border-left-style: dashed; border-left-color: color-mix(in srgb, var(--gold) 60%, transparent); background: rgba(255, 255, 255, 0.025); }
    .if-level-label { font-size: var(--fs-xs); color: var(--text-dim); white-space: nowrap; }
    .if-level .if-chips { flex: 1 1 auto; min-width: 0; }
    .if-chip.if-sub { font-size: var(--fs-sm); padding: 0.15rem 0.55rem; border-radius: 6px; background: transparent; }
    .if-chip.if-sub.active { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); border-color: var(--gold); }
    .if-modes { display: inline-flex; flex-shrink: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
    .if-mode { padding: 0.2rem 0.6rem; font-size: var(--fs-sm); cursor: pointer; user-select: none; white-space: nowrap; }
    .if-mode + .if-mode { border-left: 1px solid var(--border); }
    .if-mode input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
    .if-mode.active { background: var(--hover, rgba(255, 255, 255, 0.08)); color: var(--gold); font-weight: bold; }
    .if-mode:focus-within { outline: 2px solid var(--gold); outline-offset: -2px; }
    .if-count { font-size: var(--fs-xs); }
    .if-more summary { cursor: pointer; color: var(--gold); font-size: var(--fs-sm); }
    .if-more .if-row { margin-top: 0.45rem; }
    .if-more .if-traits { gap: 0.3rem 0.9rem; }
    .if-more .if-field select { max-width: 15rem; }
    .if-more .if-apply-row { margin-top: 0.55rem; }
    .if-field { display: inline-flex; align-items: center; gap: 0.35rem; font-size: var(--fs-sm); color: var(--text-dim); }
    .if-field input[type=number] { width: 90px; }
    .if-check { display: inline-flex; align-items: center; gap: 0.35rem; font-size: var(--fs-sm); cursor: pointer; }
    /* Häkchen mit längerem Text samt Links (3.2.6, Meldung Wolfgang mit Bild): der Text steht in einem span und bricht als
       Fließtext um, das Häkchen sitzt oben bündig – sonst zerlegte die Flex-Regel für Kästchen jeden Link in eine eigene Spalte. */
    label.check-text { display: flex; align-items: flex-start; gap: 0.5rem; font-size: var(--fs-sm); cursor: pointer; line-height: 1.45; }
    label.check-text > input { flex-shrink: 0; margin-top: 0.15rem; }
    label.check-text > span { flex: 1 1 auto; min-width: 0; }
    .if-status { font-size: var(--fs-sm); color: var(--text-dim); }
    .if-status a { color: var(--gold); }
    /* Sortierbare Spaltenköpfe der Item-Listen und Vergleich je Platz (v0.3.69) */
    a.th-sort { color: inherit; text-decoration: none; white-space: nowrap; }
    a.th-sort:hover, a.th-sort.active { color: var(--gold); }
    .th-sort-arrow { font-size: 0.7em; margin-left: 0.25rem; }
    .item-compare { font-size: var(--fs-xs); margin-top: 0.2rem; line-height: 1.35; }
    .item-compare.detailed { font-size: var(--fs-sm); margin-top: 0.35rem; line-height: 1.5; }
    .item-compare .cmp-slot { display: inline-block; min-width: 1.4em; }
    .cmp-up { color: var(--success); }
    .cmp-down { color: var(--danger); }
    .cmp-same, .cmp-note { color: var(--text-dim); }
    .feedback-card { max-width: 900px; margin-bottom: 1rem; }
    .feedback-card.feedback-done { opacity: 0.6; }
    .feedback-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; color: var(--text-dim); font-size: var(--fs-sm); margin-bottom: 0.5rem; }
    .feedback-meta strong { color: var(--gold); }
    .feedback-badge { border: 1px solid var(--border); border-radius: 4px; padding: 0 0.4rem; font-size: var(--fs-xs); }
    .feedback-badge.open { color: var(--gold-bright); border-color: var(--gold); }
    .feedback-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; margin-bottom: 0.7rem; }
    .feedback-notes { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: flex-start; margin: 0 0 0.5rem; }
    .feedback-notes textarea { flex: 1 1 260px; min-width: 0; resize: vertical; }
    .feedback-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
    .feedback-actions form { margin: 0; }
    .feedback-badge.answer { color: var(--bg); background: var(--gold); border-color: var(--gold); }
    /* Hilfe an Admin (0.4.0.28) */
    .feedback-badge.help { color: var(--danger); border-color: var(--danger); font-weight: bold; }
    .feedback-card.feedback-help { border-left: 4px solid var(--danger); }
    .fb-kind { border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-2); display: flex; flex-direction: column; gap: 0.3rem; max-width: 900px; }
    .fb-kind.fb-kind-row { flex-direction: row; flex-wrap: wrap; column-gap: var(--sp-4); } /* 0.4.4.2 (Wunsch Wolfgang): Mobile/Desktop nebeneinander */
    .fb-kind legend { color: var(--gold); padding: 0 0.3rem; }
    .feedback-thread { margin: 0 0 0.7rem; display: flex; flex-direction: column; gap: 0.4rem; }
    .fb-reply { border-left: 3px solid var(--border); padding: 0.3rem 0 0.3rem 0.7rem; }
    .fb-reply.fb-admin { border-left-color: var(--gold); }
    .fb-reply-head { font-size: var(--fs-sm); color: var(--text-dim); }
    .fb-reply-head strong { color: var(--gold); }
    .fb-reply-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
    .fb-reply-form { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: flex-start; margin: 0.3rem 0 0.5rem; }
    .fb-reply-form textarea { flex: 1 1 260px; min-width: 0; resize: vertical; }
    .fb-add { margin: 0.3rem 0 0.5rem; } /* „Ergänzen“ zum eigenen Feedback (0.4.5.3) */
    .fb-add[open] > summary { margin-bottom: 0.3rem; }
    /* Belohnung für Feedback (0.4.0.17) */
    .fb-reward { border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-2); display: flex; flex-direction: column; gap: 0.3rem; }
    .fb-reward legend { color: var(--gold); padding: 0 0.3rem; }
    .fb-reward-tier { align-items: flex-start; }
    .fb-reward-tier input { margin-top: 0.2rem; }
    .fb-reward-amount { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.2rem; }
    .fb-reward-amount input { width: 7rem; }
    .fb-reward-hint { font-size: var(--fs-sm); color: var(--text-dim); margin: 0.2rem 0 0; }
    .fb-reward-line { font-size: var(--fs-sm); color: var(--success); margin: 0 0 0.5rem; }
    .feedback-card:target { outline: 2px solid var(--gold); outline-offset: 2px; }
    /* Sprungziele im Unterschlupf (0.4.5.3): Werkstatt-Zeile und Ausbau-Karte heben sich ab, die feste Kopfleiste verdeckt sie nicht */
    tr.sh-row:target > td { background: color-mix(in srgb, var(--gold) 14%, transparent); }
    .workshop-component:target { outline: 2px solid var(--gold); outline-offset: 2px; }
    tr.sh-row, .workshop-component { scroll-margin-top: calc(var(--sticky-top, 0px) + 4rem); }
    summary.button { display: inline-block; list-style: none; }
    summary.button::-webkit-details-marker { display: none; }
    /* Reiner CSS-Umschalt-Mechanismus (kein JS) - die Checkbox selbst darf NIE sichtbar sein,
       weder mobil noch am Desktop (frueherer Bug: war nur in der Mobile-Media-Query versteckt). */
    .sidebar-toggle-checkbox { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
    .sidebar-toggle-btn { display: none; }

    /* --- Mobile: Sidebar wandert nach oben statt daneben, main-Padding schrumpft --- */
    @media (max-width: 768px) {
      body { flex-direction: column; }
      .sidebar-toggle-btn {
        position: fixed;
        /* mittig zur Kopfleiste, die am Handy drei Zeilen hoch ist (Wunsch Wolfgang, 3.1.39); --topbar-h setzt das Skript */
        top: calc(var(--topbar-h, 3.2rem) / 2);
        transform: translateY(-50%);
        left: 0.6rem;
        z-index: 1000;
        background: var(--panel);
        border: 1px solid var(--border);
        color: var(--gold-bright);
        font-size: var(--fs-xl);
        line-height: 1;
        /* Tippfläche 44 × 44 px (GUI-24, 3.1.44) */
        display: flex; align-items: center; justify-content: center;
        min-width: 44px; min-height: 44px;
        padding: 0.4rem 0.7rem;
        border-radius: 4px;
        cursor: pointer;
      }
      nav.sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        overflow-y: auto;
        width: 80%;
        max-width: 280px;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 999;
        border-right: 2px solid var(--border);
      }
      .sidebar-toggle-checkbox:checked ~ nav.sidebar { transform: translateX(0); }
      main { padding: 1rem 1rem 1rem 1rem !important; padding-top: 3.6rem !important; }
      /* Abstand zwischen Menüknopf (0,6 rem + 44 px) und dem Textblock der Kopfleiste (3.1.50, Wunsch Wolfgang) */
      .hero-topbar { padding-left: 4.4rem; }
      form.character-form { max-width: 100%; }
    }
    /* Schriftzug: keine Überschrift (GUI-16, 3.1.38) – jede Seite hat genau ein h1, den Seitentitel. */
    nav.sidebar .brand {
      font-size: var(--fs-lg); font-weight: bold;
      color: var(--gold-bright);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      border-bottom: 1px solid var(--border);
      padding-bottom: 0.6rem;
      margin: 0 0 1rem;
    }
    /* Schriftzug (v0.2.152, Wunsch Wolfgang): Schwerter links mittig zwischen beiden Zeilen, „Dawn“ mittig unter „Wardens of“. */
    nav.sidebar .brand { display: grid; grid-template-columns: auto auto; align-items: center; justify-content: center; column-gap: 0.5rem; }
    nav.sidebar .brand::after { grid-column: 1 / -1; }
    nav.sidebar .brand .brand-icon { font-size: 1.6em; line-height: 1; }
    nav.sidebar .brand .brand-text { display: flex; flex-direction: column; align-items: center; text-align: center; white-space: nowrap; }
    nav.sidebar .navgroup { margin-bottom: 1.2rem; }
    /* Zierlinie über Nachrichten/Feedback/Konto (v0.2.158, Wunsch Wolfgang) – wie unter dem Schriftzug. */
    nav.sidebar .nav-ornament { color: var(--gold); font-size: 0.5rem; line-height: 0.7rem; text-align: center; margin: 1rem 0 0.8rem;
      background: linear-gradient(var(--gold), var(--gold)) left center / 42% 1px no-repeat, linear-gradient(var(--gold), var(--gold)) right center / 42% 1px no-repeat; }
    nav.sidebar .navgroup h2 {
      font-size: var(--fs-sm);
      color: var(--gold);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin: 0 0 0.4rem;
      border-bottom: 1px solid var(--border);
      padding-bottom: 0.2rem;
    }
    nav.sidebar details.navgroup { margin-bottom: 0.6rem; }
    nav.sidebar details.navgroup summary {
      list-style: none;
      cursor: pointer;
      font-size: var(--fs-sm);
      color: var(--gold);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      padding: 0.3rem 0 0.3rem 1rem;
      border-bottom: 1px solid var(--border);
      position: relative;
      user-select: none;
    }
    nav.sidebar details.navgroup summary::-webkit-details-marker { display: none; }
    nav.sidebar details.navgroup summary::before {
      content: "▸";
      position: absolute;
      left: 0;
      color: var(--text-dim);
      transition: transform 0.15s ease;
    }
    nav.sidebar details.navgroup[open] > summary::before { transform: rotate(90deg); } /* nur die eigene Kopfzeile (3.1.42: Untergruppen) */
    nav.sidebar details.navgroup summary:hover { color: var(--gold-bright); }
    nav.sidebar details.navgroup .navgroup-links { padding-top: 0.3rem; }
    /* Menügruppen klappen weich auf und zu (0.4.1.16, Wunsch Wolfgang: „animiert aufklappen und nicht so ein Hardcut“):
       das Skript (navAnimate) schiebt Höhe und Deckkraft; während der Bewegung schneidet die Gruppe ab. */
    nav.sidebar details.navgroup.nav-moving > .navgroup-links { overflow: hidden; }
    nav.sidebar details.navgroup summary::before { transition: transform 0.22s ease; }
    @media (prefers-reduced-motion: reduce) { nav.sidebar details.navgroup summary::before { transition: none; } }
    /* Zweite Menüebene (v0.2.146): z. B. Admin → Upload */
    nav.sidebar details.navgroup.navsub { margin: 0 0 0.3rem 0.6rem; }
    nav.sidebar details.navgroup.navsub summary { font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; border-bottom: 1px dashed var(--border); }
    nav.sidebar details.navgroup.navsub .navgroup-links { padding-left: 0.4rem; }
    nav.sidebar a.navgroup-direct {
      display: block;
      font-size: var(--fs-sm);
      color: var(--gold);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      padding: 0.3rem 0;
      border-bottom: 1px solid var(--border);
      margin-bottom: 0.6rem;
      text-decoration: none;
    }
    nav.sidebar a.navgroup-direct:hover, nav.sidebar a.navgroup-direct.active { color: var(--gold-bright); }
    /* Mein Konto (3.1.63): ganz unten im Menü, bleibt beim Scrollen des Menüs sichtbar */
    /* Mein Konto/Abmelden bleiben unten stehen und decken alles ab, was darunter durchscrollt (3.2.4, Wunsch Wolfgang): eigener
       Hintergrund in der Farbe des Menüs über die ganze Breite, und ::after füllt den Innenabstand bis zur Unterkante. */
    /* Gesperrte Heldenerstellung für Neulinge (0.4.0.21): Menü nur mit dem Weg zum Schritt, Kopfleiste ohne Ziele */
    nav.sidebar .nav-lock-note { margin: var(--sp-2) 0 0; font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.4; }
    body[data-creation-lock] .hero-topbar a { pointer-events: none; cursor: default; }
    nav.sidebar .nav-account { margin-top: auto; position: sticky; bottom: 0; z-index: 3; background-color: var(--panel); background-color: inherit; margin-inline: -1rem; padding: var(--sp-2) 1rem 0; }
    nav.sidebar .nav-account::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: var(--nav-pb); background-color: inherit; }
    nav.sidebar .nav-account a.navgroup-direct { margin-bottom: 0; border-bottom: none; border-top: 1px solid var(--border); padding-top: 0.5rem; }
    .legal-footer { margin: var(--sp-6) 0 var(--sp-2); text-align: center; font-size: var(--fs-xs); color: var(--text-dim); }
    .legal-footer a { color: var(--text-dim); }

    .rename-toggle { display: none; }
    .username-edit-form { display: none; align-items: center; gap: 0.4rem; margin-top: 0.3rem; }
    .rename-toggle:checked ~ .username-display { display: none; }
    .rename-toggle:checked ~ .username-edit-form { display: flex; }
    .pencil-btn { cursor: pointer; margin-left: 0.3rem; font-size: var(--fs-sm); }
    .username-edit-form input[type="text"] {
      background: var(--panel-light);
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 0.2rem 0.5rem;
      color: var(--text);
    }
    nav.sidebar a {
      display: block;
      color: var(--text);
      text-decoration: none;
      padding: 0.25rem 0;
      font-size: var(--fs-md);
    }
    nav.sidebar a:hover { color: var(--gold-bright); }
    nav.sidebar a.nav-dim:not(.active) { color: var(--text-dim); font-style: italic; }
    nav.sidebar .nav-disabled { display: block; color: var(--text-dim); padding: 0.25rem 0; font-size: var(--fs-md); cursor: not-allowed; font-style: italic; }
    /* Menü, das mitwächst (0.4.4.81, Plan 7.1): gesperrte Punkte – in der einfachen Ansicht ausgeblendet (außer „Alle Menüpunkte zeigen“),
       sonst ausgegraut mit dem Grund als Titel; neu erschienene Punkte tragen einmal „Neu“. */
    body[data-ansicht="einfach"]:not(.nav-alle) nav.sidebar .nav-locked,
    body[data-ansicht="einfach"]:not(.nav-alle) nav.sidebar .navgroup-locked { display: none; }
    nav.sidebar a.nav-locked:not(.active) { color: var(--text-dim); font-style: italic; }
    nav.sidebar .nav-new { display: inline-block; margin-left: 0.35em; padding: 0 0.35em; font-size: var(--fs-xs); font-style: normal; line-height: 1.4; color: var(--gold); border: 1px solid var(--gold); border-radius: var(--r-sm); vertical-align: 0.1em; }
    nav.sidebar .nav-all-toggle { display: none; margin: 0.4rem 0 0; padding: 0.25rem 0; background: none; border: 0; color: var(--text-dim); font: inherit; font-size: var(--fs-sm); text-decoration: underline; cursor: pointer; text-align: left; min-height: 24px; }
    body[data-ansicht="einfach"] nav.sidebar .nav-all-toggle { display: block; }
    nav.sidebar .nav-all-less, body.nav-alle nav.sidebar .nav-all-more { display: none; }
    body.nav-alle nav.sidebar .nav-all-less { display: inline; }
    nav.sidebar a.active {
      color: var(--gold-bright);
      font-weight: bold;
      padding-left: 0.5rem;
      border-left: 3px solid var(--gold-bright);
      margin-left: -0.5rem;
    }
    .tutorial-box { margin-bottom: 1.2rem; }
    .tutorial-toggle-link {
      background: none;
      border: none;
      color: var(--gold);
      font-size: var(--fs-sm);
      cursor: pointer;
      padding: 0.3rem 0;
      text-decoration: none;
    }
    .tutorial-toggle-link:hover { color: var(--gold-bright); text-decoration: underline; }
    .tutorial-bar { display: flex; align-items: flex-start; gap: 0.8rem; flex-wrap: wrap; }
    .tutorial-bar form { margin: 0; }
    .tutorial-edit { flex: 0 1 auto; }
    .tutorial-edit[open] { flex: 1 1 100%; }
    .tutorial-edit summary { display: inline-block; cursor: pointer; color: var(--gold); font-size: var(--fs-sm); list-style: none; }
    .tutorial-edit summary::-webkit-details-marker { display: none; }
    .tutorial-edit summary span { font-size: var(--fs-xs); color: var(--text-dim); }
    .tutorial-edit[open] summary { color: var(--gold-bright); }
    .tutorial-edit textarea { width: 100%; box-sizing: border-box; margin-top: 0.4rem; font-family: inherit; font-size: var(--fs-sm); background: var(--field); color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 0.5rem; }
    .tutorial-edit-help { font-size: var(--fs-xs); color: var(--text-dim); margin: 0.3rem 0; }
    /* Elminster spricht (v0.2.81, Fahrplan Block 7) */
    .tutorial-box-text { display: flex; gap: 0.9rem; align-items: flex-start; }
    .room-tactics { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.8rem; }
    .tactic-page[data-view="einfach"] .expert-only { display: none !important; }
    .tactic-view-switch { display: flex; gap: 0.4rem; margin-bottom: 1rem; }
    .room-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
    .room-chip { width: 2.2rem; height: 2.2rem; border: 1px solid var(--border); border-radius: 4px; background: var(--panel-light); color: var(--text); font-weight: bold; cursor: pointer; }
    .room-chip.set { border-color: var(--gold); color: var(--gold); }
    /* Kampfraster: Aufstellung (v0.2.198) */
    a.room-chip.formation-room { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; width: auto; min-width: 2.2rem; padding: 0 0.4rem; box-sizing: border-box; }
    .room-chip.active { background: var(--gold); color: var(--on-accent); }
    .formation-off { color: var(--text-dim); font-size: var(--fs-sm); border-left: 3px solid var(--gold); padding-left: 0.5rem; }
    .ttt-boards { display: flex; flex-wrap: wrap; gap: 1rem; }
    .ttt-board { margin: 0; }
    .ttt-head { font-weight: bold; color: var(--gold); margin-bottom: 0.3rem; font-size: var(--fs-sm); }
    .ttt-grid { display: grid; grid-template-columns: repeat(3, 4.6rem); grid-template-rows: repeat(3, 3.4rem); gap: 3px; }
    .ttt-cell { border: 1px solid var(--border); border-radius: 4px; background: var(--panel-light); color: var(--text); cursor: pointer; font-size: var(--fs-xs); line-height: 1.1; padding: 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
    .ttt-cell:hover:not([disabled]) { border-color: var(--gold); }
    .ttt-cell.own { border: 2px solid var(--gold); }
    .ttt-cell.taken { opacity: 1; cursor: not-allowed; color: var(--text-soft); border-style: dashed; }
    .ttt-cell span.own { color: var(--gold); font-weight: bold; }
    .ttt-cell.zone-cell { font-size: var(--fs-lg); font-weight: bold; }
    .ttt-cell.zone-cell.own { background: color-mix(in srgb, var(--gold) 25%, transparent); color: var(--gold); }
    .ttt-cell.zone-cell.other { background: rgba(110, 150, 200, 0.2); }
    .ttt-cell[disabled] { cursor: default; }
    .fm-wrap { display: inline-block; margin-top: 0.6rem; }
    .fm-front { color: var(--text-dim); font-size: var(--fs-xs); text-align: center; }
    .fm-map { display: grid; grid-template-columns: repeat(9, 1.9rem); grid-template-rows: repeat(9, 1.9rem); border: 1px solid var(--border); }
    .fm-cell { border-right: 1px dotted rgba(128, 128, 128, 0.3); border-bottom: 1px dotted rgba(128, 128, 128, 0.3); display: flex; align-items: center; justify-content: center; }
    .fm-cell.fm-edge-r { border-right: 1px solid var(--border); }
    .fm-cell.fm-edge-b { border-bottom: 1px solid var(--border); }
    .fm-trupp-a { background: color-mix(in srgb, var(--gold) 12%, transparent); }
    .fm-trupp-b { background: rgba(110, 150, 200, 0.15); }
    .fm-hero { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--panel-light); border: 1px solid var(--text-dim); font-size: var(--fs-xs); display: flex; align-items: center; justify-content: center; }
    .fm-hero.own { border-color: var(--gold); color: var(--gold); font-weight: bold; }
    .fm-hero.foe { border-color: var(--danger); color: var(--danger); }
    /* Verkaufen: angelegt und verflucht (0.4.4.18) */
    .sell-cursed td:first-child { border-left: 3px solid var(--danger); }
    .sell-curse { color: var(--danger); }
    .sell-curse-text { color: var(--danger); font-size: var(--fs-xs); }
    /* Verkaufen: gesperrt (Markthalle, Auktion …) grau mit Grund, Mehrfachauswahl (0.4.4.19) */
    .sell-locked td { color: var(--text-dim); }
    .sell-lock-tip { display: inline-block; cursor: help; }
    .sell-lock-tip .button[disabled] { pointer-events: none; opacity: 0.5; }
    .sell-lock-note { color: var(--text-dim); font-size: var(--fs-xs); }
    .sell-table input[type="checkbox"].sell-pick { margin: 0; width: 0.85rem; height: 0.85rem; cursor: pointer; }
    .sell-pick-wrap { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; margin-right: 0.25rem; cursor: pointer; }
    /* „Alle auswählen“ (0.4.4.22): am PC im Spaltenkopf, am Handy als Zeile unter der Abschnittsleiste; ohne JavaScript unsichtbar */
    .sell-pick-wrap[hidden], .sell-pick-all-row { display: none; }
    @media (max-width: 768px) {
      .sell-pick-all-row:not([hidden]) { display: flex; align-items: center; gap: var(--sp-2); min-height: 24px; margin: 0 0 var(--sp-2); font-size: var(--fs-sm); cursor: pointer; }
    }
    /* Häkchen und Knopf links in der Zelle (0.4.4.22): das Häkchen „Alle auswählen“ im Spaltenkopf steht genau darüber */
    .sell-table form { display: flex; align-items: center; gap: 0; justify-content: flex-start; }
    .sell-table td:last-child { white-space: nowrap; }
    /* Gefährten als Dreieck statt Kreis (0.4.4.17, Wunsch Wolfgang) */
    .fm-hero.companion { border: none; border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: var(--text-dim); color: var(--bg); align-items: flex-end; padding-bottom: 0.1rem; box-sizing: border-box; }
    .fm-hero.companion.own { background: var(--gold); color: var(--bg); }
    .fm-hero.companion.foe { background: var(--danger); }
    .fm-hero.companion.down { background: transparent; outline: 1px dashed var(--text-dim); color: var(--text-dim); }
    .fm-key.fm-key-companion { border: none; background: var(--text-dim); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
    .fm-cell.fm-terrain { background: var(--bft); color: var(--bfg); font-size: var(--fs-sm); }
    ul.terrain-known { list-style: none; padding: 0; margin: 0.3rem 0; display: grid; gap: 0.35rem; }
    ul.terrain-known li { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
    /* Gefallene Figuren durchgestrichen und gestrichelt statt blass (GUI-04, 3.1.43) */
    .fm-hero.down { color: var(--text-dim); border-color: var(--text-dim); border-style: dashed; text-decoration: line-through; font-weight: normal; }
    .fm-legend { font-size: var(--fs-xs); color: var(--text-dim); margin-top: 0.2rem; }
    .fm-key { display: inline-block; width: 0.8rem; height: 0.8rem; border: 1px solid var(--border); vertical-align: middle; }
    /* Schlachtfeld mit Bewegungspfeilen im Kampfbericht (0.4.0.12, engine/battlefieldMap.ts): ganzes Raster, Figuren am Ende des
       Abschnitts, ein Pfeil je bewegter Figur. Farbe je Seite über --bf-c, eigener Held grün (data-self, beim Anzeigen gesetzt). */
    .bf-wrap { display: inline-block; margin-top: 0.6rem; max-width: 100%; vertical-align: top; }
    svg.bf { display: block; width: min(21rem, 100%); height: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
    .bf .bf-cells { fill: none; stroke: color-mix(in srgb, var(--text-dim) 35%, transparent); stroke-width: 1; stroke-dasharray: 2 3; }
    .bf .bf-zones { fill: none; stroke: color-mix(in srgb, var(--text-dim) 75%, transparent); stroke-width: 1.4; }
    .bf .bf-frame { fill: none; stroke: var(--border); stroke-width: 2; }
    /* Gelände im Kampfraster (0.4.0.36): Farben nur aus dem Design */
    .bf-t-hindernis { --bft: color-mix(in srgb, var(--text-dim) 70%, var(--panel)); --bfg: var(--text); }
    .bf-t-schwer { --bft: color-mix(in srgb, var(--warning) 22%, transparent); --bfg: var(--warning); }
    .bf-t-deckung { --bft: color-mix(in srgb, var(--gold) 20%, transparent); --bfg: var(--gold); }
    .bf-t-wasser { --bft: color-mix(in srgb, var(--info) 32%, transparent); --bfg: var(--info); }
    .bf-t-abgrund { --bft: color-mix(in srgb, var(--bg) 85%, var(--danger)); --bfg: var(--danger); }
    .bf-t-erhoeht { --bft: color-mix(in srgb, var(--success) 18%, transparent); --bfg: var(--success); }
    .bf .bf-t rect { fill: var(--bft); }
    .bf .bf-t-deckung rect, .bf .bf-t-abgrund rect { stroke: var(--bfg); stroke-width: 1.2; stroke-opacity: 0.7; }
    .bf .bf-t text { fill: var(--bfg); font-size: 15px; opacity: 0.85; pointer-events: none; }
    .bf-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; font-size: var(--fs-sm); margin-top: 0.35rem; align-items: center; }
    .bf-key { display: inline-flex; align-items: center; gap: 0.3rem; }
    .bf-swatch { display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 3px; background: var(--bft); color: var(--bfg); font-size: var(--fs-xs); border: 1px solid color-mix(in srgb, var(--bfg) 50%, transparent); }
    .bf .bf-party { --bf-c: var(--gold); }
    .bf .bf-foe { --bf-c: var(--danger); }
    .bf [data-self] { --bf-c: var(--success); }
    .bf .bf-down, .bf .bf-gone { --bf-c: var(--text-dim); }
    .bf .bf-move { opacity: 0.85; transition: opacity 0.15s; }
    .bf .bf-arrow { fill: none; stroke: var(--bf-c); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: stroke-width 0.15s; }
    .bf .bf-arrow.bf-pushed { stroke-dasharray: 6 5; stroke-linecap: butt; }
    .bf .bf-arrow.bf-teleport { stroke-dasharray: 1 6; }
    .bf .bf-head { fill: var(--bf-c); }
    .bf .bf-start { fill: var(--panel); stroke: var(--bf-c); stroke-width: 2; }
    .bf .bf-hit { fill: none; stroke: transparent; stroke-width: 14; cursor: pointer; }
    .bf .bf-fig { cursor: pointer; outline: none; transition: opacity 0.15s; }
    .bf .bf-disc { fill: var(--panel-light); stroke: var(--bf-c); stroke-width: 2; }
    .bf .bf-fig[data-self] .bf-disc { fill: color-mix(in srgb, var(--success) 18%, var(--panel-light)); }
    .bf .bf-fig text { fill: var(--bf-c); font-size: 11px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
    .bf .bf-fig[data-self] text { font-weight: bold; }
    .bf .bf-down .bf-disc, .bf .bf-gone .bf-disc { fill: var(--panel); stroke-dasharray: 3 2; }
    .bf .bf-gone { opacity: 0.4; }
    .bf .bf-x { stroke: var(--text-dim); stroke-width: 1.2; opacity: 0.55; }
    /* Verdeckte Gefallene (0.4.0.13): kleine Marke in der Ecke ihres Feldes über der stehenden Figur */
    .bf .bf-under .bf-disc { stroke-dasharray: none; stroke-width: 1.5; }
    .bf .bf-under text { font-size: 7px; }
    .bf .bf-under .bf-x { stroke-width: 1; }
    .bf .bf-bearer .bf-disc { stroke-dasharray: 4 3; }
    .bf .bf-saddle { fill: none; stroke: var(--bf-c); stroke-width: 1.6; stroke-linecap: round; pointer-events: none; }
    .bf .bf-new-mark { fill: var(--bf-c); }
    .bf .bf-fig:focus-visible .bf-disc { stroke-width: 3.5; }
    /* Hervorheben (Maus, Antippen, Tab): die Figur samt Pfeil und Zeile der Statustabelle bleibt, alles andere tritt zurück */
    [data-bf][data-focus] .bf-fig:not(.on), [data-bf][data-focus] .bf-move:not(.on) { opacity: 0.18; }
    .bf .bf-move.on { opacity: 1; }
    .bf .bf-move.on .bf-arrow { stroke-width: 4.5; }
    .bf .bf-fig.on .bf-disc { stroke-width: 3.2; }
    [data-bf] tr[data-f] { cursor: pointer; }
    [data-bf] tr[data-f].on > td { background: color-mix(in srgb, var(--gold) 16%, transparent); }
    .bf-tip { min-height: 1.4em; font-size: var(--fs-xs); color: var(--text); margin-top: 0.25rem; max-width: 21rem; }
    .room-chip.active { background: var(--gold); color: var(--on-accent); }
    .room-tactic { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.15rem 0.3rem; border: 1px solid var(--border); border-radius: 4px; }
    .room-tactic.set { border-color: var(--gold); }
    .room-tactic .room-no { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 3px; background: var(--gold); color: var(--on-accent); font-weight: bold; }
    /* Werkstatt (0.4.5.1, Wunsch Wolfgang): Material, Stückzahl, Herstellen und Bestellen in festen, unsichtbaren Spalten untereinander;
       die Rezeptspalte ist breiter, damit Name und „✨ neu“ in eine Zeile passen */
    .craft-table th.craft-recipe { width: 16rem; }
    .craft-table td.craft-act { padding-left: 0.15rem; padding-right: 0.15rem; white-space: nowrap; }
    /* Material (0.4.6.6): schmale Auswahl, die Standardwahl bleibt leer; lange Namen kürzt das Feld, damit die Tabelle nicht seitwärts scrollt.
       Zutaten stehen untereinander in kleinerer Schrift */
    .craft-table th.craft-mat-head { width: 7.5rem; padding-left: 0.15rem; }
    .craft-table td.craft-act-mat select { width: 7.5rem; max-width: 100%; text-overflow: ellipsis; }
    .craft-table .cp-ing { display: block; font-size: var(--fs-sm); line-height: 1.35; white-space: nowrap; }
    /* Herstellen und Bestellen (0.4.6.15, Wunsch Wolfgang): untereinander in einer Zelle, gleich breit */
    .craft-table td.craft-act-btns { display: table-cell; width: 6.5rem; }
    .craft-table td.craft-act-btns form, .craft-table td.craft-act-btns > .button { display: block; width: 100%; box-sizing: border-box; text-align: center; }
    .craft-table td.craft-act-btns form .button { width: 100%; box-sizing: border-box; }
    .craft-table td.craft-act-btns > .button { margin-top: 0.3rem; }
    .craft-table th.craft-xp, .craft-table td.craft-xp { text-align: center; white-space: nowrap; } /* Berufs-XP je Rezept (0.4.5.24, Feedback hansenkiller) */
    /* Seitenschema S-4 (0.4.5.12): Rezeptkategorie und Stufe als eigene, sortierbare Spalten */
    .craft-table th.craft-stufe { width: 3.75rem; }
    .craft-table th.craft-stufe, .craft-table td:nth-child(3) { text-align: center; }
    .recipe-cat { font-size: var(--fs-xs); color: var(--text-dim); }
    .recipe-prof { display: inline-block; margin-top: 0.15rem; padding: 0 0.4rem; border-radius: 3px; background: color-mix(in srgb, var(--gold) 15%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); color: var(--gold); font-size: var(--fs-xs); }
    .item-info-btn { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-style: italic; font-weight: bold; font-family: Georgia, serif; font-size: var(--fs-sm); text-decoration: none; }
    .item-info-btn:hover { background: var(--gold); color: var(--on-accent); }
    .board-send { display: flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; margin: 0; }
    .board-form { display: flex; gap: 0.6rem 1rem; align-items: center; flex-wrap: wrap; }
    .board-form label { display: inline-flex; align-items: center; gap: 0.3rem; }
    /* Auftragsbrett: Auswahlfenster (v0.3.12) */
    .board-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
    .board-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
    .board-modal-box { position: relative; width: 100%; max-width: 30rem; max-height: calc(100vh - 32px); overflow-y: auto; margin: 0; }
    .board-modal-close { position: absolute; top: 0.3rem; right: 0.6rem; font-size: var(--fs-h1); line-height: 1; text-decoration: none; color: var(--text-dim); }
    .board-modal-close:hover { color: var(--gold-bright); }
    .board-modal-box h3 { padding-right: 1.5rem; }
    .board-form-stack { flex-direction: column; align-items: flex-start; }
    .board-modal-actions { display: flex; gap: 0.5rem; margin-top: 0.3rem; }
    /* Fenster in der Seite für Zauber/Erklärungen (v0.3.71, data-peek) */
    /* Speichern ohne Neuladen (v0.3.84): kurze Meldung unten in der Mitte, Wartecursor solange der Server rechnet */
    /* Fertigkeiten (v0.3.84, Wunsch Wolfgang): die Punktezeile scrollt mit, damit man beim Verteilen sieht, was übrig ist */
    .skill-points-bar { position: sticky; top: var(--sticky-top, 0px); z-index: 800; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 0.4rem 0.8rem; margin: 0 0 0.6rem; box-shadow: 0 2px 8px rgba(0,0,0,0.35); }
    .skill-points-bar p { margin: 0; }
    .skill-points-left { color: var(--gold-bright); font-weight: bold; }
    .skill-points-left.over { color: var(--danger); }
    .stay-toast { position: fixed; left: 50%; bottom: 3.6rem; transform: translateX(-50%); z-index: 1200; background: var(--panel); color: var(--text); border: 1px solid var(--gold); border-radius: 6px; padding: 0.35rem 0.9rem; font-size: var(--fs-sm); box-shadow: 0 2px 10px rgba(0,0,0,0.4); opacity: 0; pointer-events: none; transition: opacity 0.2s; max-width: calc(100vw - 32px); }
    .stay-toast.show { opacity: 1; }
    .stay-toast.bad { border-color: var(--danger); color: var(--danger); }
    /* Vorrat der App (0.4.0.44): Fortschritt beim ersten Start bzw. nach einem Update; Hinweis auf gespeicherte Seiten ohne Netz.
       Seit 0.4.3.11 ein Logo-Bildschirm über die ganze Fläche (Wunsch Wolfgang), für Admins mit der Liste der Dateien darunter. */
    .vorrat-box { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; overflow-y: auto;
      padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
      background: radial-gradient(ellipse at 50% 35%, var(--panel) 0%, var(--bg) 70%); }
    .vorrat-card { color: var(--text); width: 100%; max-width: 26rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); margin: auto; }
    .vorrat-admin .vorrat-card { max-width: 46rem; }
    .vorrat-logo { width: 8rem; height: 8rem; border-radius: var(--r-md); box-shadow: var(--shadow-overlay); }
    .vorrat-card .vorrat-brand { margin: var(--sp-2) 0 0; font-family: Georgia, 'Times New Roman', serif; font-size: var(--fs-h1); color: var(--gold); letter-spacing: 0.04em; }
    .vorrat-card h2 { margin: 0; color: var(--text); font-size: var(--fs-lg); font-weight: normal; }
    .vorrat-card p { margin: 0; font-size: var(--fs-sm); color: var(--text-soft); }
    .vorrat-bar { align-self: stretch; height: 0.8rem; border-radius: var(--r-pill); background: var(--surface-alt); border: 1px solid var(--card-border); overflow: hidden; margin: var(--sp-3) 0 var(--sp-1); }
    .vorrat-bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.2s; }
    .vorrat-card .vorrat-count { color: var(--text); font-variant-numeric: tabular-nums; }
    .vorrat-card .vorrat-now { min-height: 1.3em; color: var(--text-dim); }
    .vorrat-card .vorrat-log-head { align-self: stretch; text-align: left; margin-top: var(--sp-3); color: var(--text-dim); }
    .vorrat-log { align-self: stretch; text-align: left; list-style: none; margin: 0; padding: var(--sp-1) var(--sp-2); max-height: 40vh; overflow-y: auto;
      background: var(--surface-alt); border: 1px solid var(--card-border); border-radius: var(--r-sm); font-family: 'Courier New', monospace; font-size: var(--fs-xs); }
    .vorrat-log li { display: flex; gap: var(--sp-2); padding: 0.1rem 0; border-bottom: 1px solid var(--border); }
    .vorrat-log .vorrat-st { flex: 0 0 1rem; text-align: center; }
    .vorrat-log .vorrat-kind { flex: 0 0 10rem; color: var(--text-dim); }
    .vorrat-log .vorrat-path { flex: 1; min-width: 0; overflow-wrap: anywhere; }
    .vorrat-log .vorrat-size { color: var(--text-dim); white-space: nowrap; }
    .vorrat-log .vorrat-run .vorrat-st { color: var(--gold); }
    .vorrat-log .vorrat-ok .vorrat-st { color: var(--success); }
    .vorrat-log .vorrat-fail, .vorrat-log .vorrat-fail .vorrat-size { color: var(--danger); }
    @media (max-width: 768px) { .vorrat-log .vorrat-kind { display: none; } .vorrat-logo { width: 6rem; height: 6rem; } }
    .offline-stand { margin: 0 0 var(--sp-3); padding: var(--sp-2) var(--sp-3); border-left: 4px solid var(--warning); background: var(--surface-alt); color: var(--text); font-size: var(--fs-sm); }
    html.stay-busy, html.stay-busy * { cursor: progress !important; }
    /* Rückfragen und Hinweise als Fenster in der Seite (3.1.17) statt Browser-Dialog */
    .wod-dialog { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center; padding: 16px; }
    .wod-dialog-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
    .wod-dialog .wod-dialog-box { position: relative; width: 100%; max-width: 26rem; margin: 0; padding: 1rem 1.1rem; border-color: var(--gold); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55); }
    .wod-dialog-text { margin: 0 0 1rem; white-space: pre-line; line-height: 1.45; color: var(--text); }
    .wod-dialog-buttons { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }
    .wod-dialog-buttons .button { min-width: 6.5rem; }
    /* Gefahrenzone (GUI-09, 3.1.38): endgültige Massen-Aktionen am Seitenende, rot umrandet, mit eingetipptem Bestätigungswort */
    .danger-zone { margin-top: 2.5rem; border: 2px solid var(--danger-bg); border-radius: 6px; padding: 0.4rem 1.2rem 1.2rem; background: var(--panel); }
    .danger-zone h2 { margin-top: 0.8rem; }
    .peek { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 16px; }
    .peek-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
    .peek.peek-wide .peek-box { max-width: 64rem; }
    /* Klassenübersicht (3.1.19): Tabelle wie in der Klassen-Referenz, erreichte Stufen weiß, die aktuelle gold (0.4.0.9), offene grau
       (die nächste Stufe ist seit 0.4.0.10 nicht mehr hervorgehoben) */
    .cref-meta { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 0; }
    .cref-legend { font-size: var(--fs-sm); color: var(--text-dim); }
    .cref-key { display: inline-block; padding: 0 0.4rem; border-radius: 3px; border: 1px solid var(--border); }
    .cref-scroll { overflow-x: auto; margin: 0.4rem 0 0.8rem; }
    .cref-table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
    .cref-table th { text-align: left; color: var(--gold); border-bottom: 1px solid var(--border); padding: 0.25rem 0.45rem; white-space: nowrap; }
    .cref-table td { padding: 0.2rem 0.45rem; border-bottom: 1px solid rgba(255,255,255,0.05); white-space: nowrap; vertical-align: top; }
    .cref-table td.cref-special { white-space: normal; min-width: 14rem; }
    .cref-spells th, .cref-spells td { text-align: center; }
    .cref-table tr.cref-open td, .cref-key.cref-open, .cref-game-features li.cref-open { color: var(--text-dim); }
    .cref-table tr.cref-reached td, .cref-key.cref-reached, .cref-game-features li.cref-reached { color: var(--text-strong); }
    .cref-table tr.cref-current td, .cref-key.cref-current, .cref-game-features li.cref-current { color: var(--gold-bright); }
    .cref-table tr.cref-current td { background: color-mix(in srgb, var(--gold) 12%, transparent); border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); }
    .cref-key.cref-current { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
    .cref-table tr.cref-beyond td { font-style: italic; }
    .cref-text { column-width: 26rem; column-gap: 2rem; font-size: var(--fs-sm); line-height: 1.45; }
    .cref-text p { margin: 0 0 0.55rem; }
    .cref-text h3, .cref-text h4 { column-span: all; margin: 0.8rem 0 0.4rem; color: var(--gold); }
    .cref-feature { break-inside: avoid-column; }
    .cref-feature + .cref-feature { margin-top: 0.2rem; }
    .cref-intro { font-style: italic; color: var(--text-dim); }
    /* Flavortext und Rolle vor der Tabelle (3.1.22) */
    .cref-lead { font-size: var(--fs-sm); line-height: 1.45; margin: 0.2rem 0 0.6rem; }
    .cref-lead p { margin: 0 0 0.5rem; }
    .cref-text abbr { text-decoration: none; color: var(--text-dim); font-size: 0.85em; cursor: help; }
    .cref-game { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 0.6rem; font-size: var(--fs-sm); }
    .cref-game h3 { color: var(--gold); margin: 0 0 0.4rem; }
    .cref-game-features { margin: 0.2rem 0 0.6rem; padding-left: 1.1rem; }
    .cref-lvl { display: inline-block; min-width: 4.2rem; color: var(--gold); }
    .nav-sub-links a { padding-left: 1.6rem !important; font-size: var(--fs-sm); }
    .wiki-search { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; }
    .wiki-search label { flex: 1 1 14rem; }
    .wiki-search label > input, .wiki-search label > select { display: block; width: 100%; box-sizing: border-box; } /* Suchfeld füllt seine Spalte (0.4.4.127) */
    .wiki-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.3rem 1rem; }
    .wiki-list li { padding: 0.2rem 0; }
    .wiki-results { list-style: none; margin: 0.4rem 0 0; padding: 0; }
    .wiki-results li { padding: 0.45rem 0; border-bottom: 1px solid var(--card-border); }
    .wiki-results .hint { display: block; }
    .wiki-cat > summary { font-weight: bold; }
    .wiki-refs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
    .class-lore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.7rem; }
    .class-lore-card { border: 1px solid var(--card-border, var(--border)); border-radius: 8px; padding: 0.6rem 0.75rem; background: rgba(0,0,0,0.18); display: flex; flex-direction: column; gap: 0.35rem; }
    .class-lore-card .hint { margin: 0; }
    .class-lore-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: auto; }
    .peek .peek-box { position: relative; width: 100%; max-width: 34rem; max-height: calc(100vh - 32px); display: flex; flex-direction: column; margin: 0; padding: 0; }
    .peek .peek-own { white-space: nowrap; flex-shrink: 0; }
    /* Android-App (0.4.0.29): kein eigenes Fenster – ein Popup würde in der App die Seite ersetzen */
    html[data-app] .peek .peek-own { display: none; }
    .peek-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); }
    .peek-title { flex: 1 1 auto; min-width: 0; color: var(--gold); font-size: var(--fs-lg); }
    .peek-close { background: none; border: none; color: var(--text-dim); font-size: var(--fs-h1); line-height: 1; cursor: pointer; padding: 0 0.2rem; }
    .peek-close:hover { color: var(--gold-bright); }
    .peek-body { overflow-y: auto; padding: 0.8rem 0.9rem 1rem; }
    .board-disabled { opacity: 0.5; }
    /* Auswahl der Taktik (0.4.0.21, Meldung Wolfgang „Leisten viel zu breit“): am PC höchstens so breit wie nötig, mindestens 24rem,
       damit Vorrunde, Runde und Heilen gleich aussehen; am Handy füllt sie die Zeile (Mobile-Block). */
    .tactic-pick { display: flex; align-items: center; gap: 0.4rem; max-width: 34rem; }
    .tactic-when-info { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2, 0.5rem) var(--sp-3, 0.8rem); margin: 0 0 var(--sp-2, 0.5rem); }
    select[data-when] { min-width: 12rem; }
    .tactic-pick select { flex: 1; min-width: 12rem; } /* gleich breit wie alle Auswahllisten (3.1.28) */
    @media (min-width: 769px) { .tactic-pick select { min-width: 18rem; } }
    /* Schmalere Spalten (0.4.1.18, Feedback „Spalten nicht so breit, lieber Zeilenumbruch“): Ziel, Häufigkeit und Bedingung bleiben
       schmal, Überschriften brechen um; die Beschriftung ist klein wie die Lupe der Filter und wird beim Hineintippen breiter. */
    .tactic-table th { white-space: normal; }
    .tactic-table td.expert-only select { min-width: 8rem; max-width: 13rem; }
    .tactic-table select[data-when] { min-width: 8rem; }
    input.tactic-note { width: 5rem; min-width: 0; transition: width 0.2s ease; }
    input.tactic-note:focus, input.tactic-note:not(:placeholder-shown) { width: 12rem; max-width: 100%; }
    button.tactic-info-btn { background: none; cursor: pointer; padding: 0; }
    /* Taktik: Zeilen am Griff verschieben (0.4.0.18) – der Griff nimmt Finger und Maus, die Seite scrollt dort nicht mit. */
    /* Ohne Prozentbreite: „width: 1%“ zog die Tabelle auf volle Seitenbreite (0.4.0.21); am Handy füllt sie die Zeile weiter. */
    td.tactic-num { white-space: nowrap; }
    @media (max-width: 768px) { td.tactic-num { width: 1%; } }
    button.tactic-drag { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 2.75rem; min-height: 2.25rem; padding: 0 0.45rem; border: 1px dashed var(--border); border-radius: var(--r-sm); background: none; color: var(--text-dim); font: inherit; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
    button.tactic-drag:hover { border-color: var(--gold); color: var(--gold-bright); }
    .tactic-grip { display: inline-block; width: 0.6rem; height: 1rem; background-image: radial-gradient(circle, currentColor 1.4px, transparent 1.6px); background-size: 0.3rem 0.333rem; }
    tr.tactic-shift { transition: transform 0.15s ease; }
    tr.tactic-dragging { position: relative; z-index: 5; }
    tr.tactic-dragging > td { background: var(--panel-light); box-shadow: inset 0 2px 0 var(--gold), inset 0 -2px 0 var(--gold); }
    tr.tactic-dragging button.tactic-drag { border-style: solid; border-color: var(--gold); color: var(--gold-bright); cursor: grabbing; }
    tr.tactic-moved > td { animation: tactic-moved 0.9s ease-out; }
    @keyframes tactic-moved { from { background: var(--panel-light); box-shadow: inset 3px 0 0 var(--gold); } to { background: transparent; box-shadow: none; } }
    html.tactic-drag-on, html.tactic-drag-on * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
    .quest-story { line-height: 1.6; }
    .quest-story-step { margin: 0 0 1.2rem; }
    .quest-story-step h4 { margin: 0.6rem 0 0.3rem; color: var(--gold); }
    .quest-story-intro { color: var(--text-dim); font-style: italic; }
    .quest-story-choice { border-left: 3px solid var(--gold); padding-left: 0.5rem; }
    .quest-story-private { color: var(--gold); }
    .quest-decision { padding: 0.35rem 0.6rem; border-radius: 4px; font-size: var(--fs-sm); margin: 0.6rem 0; }
    .quest-decision-group { background: color-mix(in srgb, var(--danger) 12%, transparent); border-left: 3px solid var(--danger); }
    .quest-decision-free { background: color-mix(in srgb, var(--success) 10%, transparent); border-left: 3px solid var(--success); }
    .quest-chapter-title { margin: 1.2rem 0 0.4rem; padding: 0.3rem 0.6rem; border-left: 4px solid var(--gold); background: color-mix(in srgb, var(--gold) 8%, transparent); color: var(--gold); font-size: var(--fs-md); }
    .quest-votes { font-size: var(--fs-sm); color: var(--text-dim); margin: 0.3rem 0; }
    .tutorial-portrait { width: 84px; height: 84px; flex-shrink: 0; object-fit: cover; object-position: 50% 30%; border-radius: 50%; border: 2px solid var(--gold); box-shadow: 0 0 8px color-mix(in srgb, var(--gold) 35%, transparent); }
    .tutorial-box-body { flex: 1; min-width: 0; }
    /* Talente nach Kategorie einklappbar (3.1.42, GUI-21) */
    details.feat-cat > summary { cursor: pointer; }
    /* Talent-Tabellen (0.4.1.19, Feedback): ab Tablet volle Breite mit festen Spalten – jede Kategorie sieht gleich aus */
    @media (min-width: 769px) {
      table.talent-table { display: table; width: 100%; table-layout: fixed; }
      table.talent-table col.tt-name { width: 14rem; }
      table.talent-table col.tt-cost { width: 6.5rem; }
      table.talent-table col.tt-act { width: 14rem; }
      table.talent-table .feat-buy select { max-width: 100%; min-width: 0; }
      table.talent-table td { overflow-wrap: anywhere; }
    }
    @media (min-width: 769px) and (max-width: 1100px) { table.talent-table col.tt-name, table.talent-table col.tt-act { width: 10rem; } }
    details.feat-cat > summary h2 { display: inline-block; margin: 1.4rem 0 0.5rem; }
    .feat-cat-count { font-size: var(--fs-sm); color: var(--text-dim); font-weight: normal; }
    .jump-bar { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.6rem; }
    /* Elminthir-Kasten (0.4.0.4 wieder wie vorher): ausgeblendet nur der Knopf „[Tutorial einblenden]“ */
    .tutorial-box-hidden { margin-bottom: 0.6rem; }
    @media (max-width: 768px) {
      .tutorial-box-text { display: block; }
      .tutorial-box-text::after { content: ""; display: block; clear: both; }
      .tutorial-portrait { width: 56px; height: 56px; float: left; margin: 0 0.7rem 0.3rem 0; }
      .tutorial-box-body ul { padding-left: 1.1rem; overflow: hidden; }
    }
    .tutorial-box-text p:first-child { margin-top: 0; }
    .tutorial-box-text p:last-child, .tutorial-box-text ul:last-child { margin-bottom: 0; }
    .tutorial-box-text ul { margin: 0.3rem 0; padding-left: 1.3rem; }
    .tutorial-flavor { color: var(--gold); }
    .tutorial-box-text {
      margin-top: 0.4rem;
      padding: 0.8rem 1rem;
      background: var(--panel-light);
      border: 1px solid var(--border);
      border-radius: 4px;
    }
    /* Dungeon-Karten (v0.2.134): Trophäen untereinander, Abstimmknöpfe mit Totenkopf je Schwierigkeit */
    .dungeon-section { margin: 1rem 0 0.5rem; }
    .sheets.dungeon-sheets { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .dungeon-trophies { font-size: var(--fs-sm); margin: 0.2rem 0 0.3rem; line-height: 1.4; }
    .dungeon-vote { margin-top: 0.5rem; }
    .dungeon-vote-label { font-size: var(--fs-sm); color: var(--text-dim); margin-bottom: 0.2rem; }
    /* Abstimm-Kreise (3.1.62): Anfangsbuchstaben neben dem Knopf, ganzer Name beim Darüberfahren/Antippen. Seit 3.1.69 (Wunsch
       Wolfgang): die erste Reihe Kreise auf Höhe des Knopfs, höchstens drei nebeneinander, mehr Stimmen machen die Zeile höher und
       schieben den nächsten Knopf nach unten – am PC und am Handy gleich. */
    .diff-btns { --diff-btn-h: 2.5rem; --vote-dot: 1.6rem; }
    .diff-item { display: flex; align-items: flex-start; gap: 0.5rem; }
    .diff-item .button, .diff-item .diff-btn-wrap { margin: 0; }
    .vote-dots { display: grid; grid-template-columns: repeat(3, var(--vote-dot)); gap: 0.25rem; margin-top: calc((var(--diff-btn-h) - var(--vote-dot)) / 2); }
    .vote-dot { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--vote-dot, 1.6rem); height: var(--vote-dot, 1.6rem); border-radius: 50%; box-sizing: border-box;
      border: 1px solid var(--gold); background: var(--surface-alt); color: var(--gold-bright); font-size: var(--fs-xs); font-weight: 600; line-height: 1; cursor: default; }
    .vote-dot.own { border-color: var(--gold-bright); box-shadow: 0 0 0 1px var(--gold-bright); }
    .vote-dot:hover::after, .vote-dot:focus::after { content: attr(data-name); position: absolute; bottom: calc(100% + 0.3rem); left: 50%; transform: translateX(-50%);
      white-space: nowrap; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0.15rem 0.45rem;
      font-size: var(--fs-xs); font-weight: normal; z-index: 20; pointer-events: none; box-shadow: var(--shadow-overlay); }
    .diff-btns { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .diff-btn-wrap { display: inline-block; cursor: not-allowed; }
    .diff-btn-wrap button:disabled { pointer-events: none; }
    .button.diff-btn { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 11rem; height: var(--diff-btn-h, 2.5rem); box-sizing: border-box; padding: 0.3rem 0.8rem; line-height: 1.2; }
    .button.diff-btn img { height: 26px; width: 22px; object-fit: contain; flex-shrink: 0; margin: 0; filter: drop-shadow(0 0 1px rgba(0,0,0,0.9)); }
    /* Dungeon-Karte am Handy: Knöpfe untereinander wie am PC (3.1.69, Wunsch Wolfgang – vorher zwei Spalten, GUI-21), 44 px hoch;
       der Name eines Kreises klappt nach links auf, damit er am rechten Kartenrand nicht abgeschnitten wird. */
    @media (max-width: 768px) {
      .diff-btns { --diff-btn-h: 2.75rem; }
      .button.diff-btn { min-width: 10rem; }
      .vote-dot:hover::after, .vote-dot:focus::after { left: auto; right: 0; transform: none; }
    }
    .cooldown-bar-track {
      background: var(--field);
      border: 1px solid var(--border);
      border-radius: 4px;
      height: 18px;
      overflow: hidden;
      margin: 0.5rem 0;
    }
    .cooldown-bar-fill {
      background: linear-gradient(90deg, var(--green), var(--green-bright));
      height: 100%;
      width: 0%;
      transition: width 1s linear;
    }
    main {
      flex: 1;
      padding: 2rem;
      max-width: 1400px;
      /* Feste Seitenbreite (v0.2.185, Wunsch Wolfgang): main darf schmaler werden als sein breitester Inhalt –
         sonst schiebt eine lange Zeile (Seitenzahlen, Tabelle) die ganze Seite seitlich auf. */
      min-width: 0;
    }
    html, body { overflow-x: clip; }
    /* Spalte neben dem Menü (GUI-01, 3.1.38): ohne min-width:0 wurde sie so breit wie die breiteste Tabelle und zwischen 769 und
       rund 1.180 px schnitt das Fenster rechts Filter, „Verschieben nach“ und Tabellenspalten ab. Breite Inhalte scrollen jetzt in sich. */
    .page-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
    /* Seitenkopf mit Stand-Anzeige (0.4.5.9, Seitenschema S-1): Titel links, Stand rechts oben; am Handy darunter */
    .page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
    .page-head-main { min-width: 0; flex: 1 1 20rem; }
    .page-status { margin: 0 0 0.9rem; padding: 0.45rem 0.8rem; font-size: var(--fs-sm); text-align: right; flex: 0 1 auto; max-width: 24rem; }
    .page-status p { margin: 0; }
    @media (max-width: 768px) { .page-status { text-align: left; max-width: none; width: 100%; } }
    h1.page-title { color: var(--gold-bright); font-size: var(--fs-h1); margin-top: 0; }
    /* Untertitel unter der Überschrift: Held bzw. Gruppe der Seite (Block B, 3.1.39) */
    p.page-subtitle { color: var(--text-dim); font-size: var(--fs-md); margin: -0.5rem 0 0.9rem; }
    /* „Worum geht es hier?“ unter dem Titel (Plan 4.7, 0.4.4.68), nur in der einfachen Ansicht */
    p.page-purpose { color: var(--text-dim); margin: -0.4rem 0 0.9rem; }
    /* „?“ am Seitentitel (Plan 5.1, 0.4.4.69): startet die Kontexthilfe der Seite neu – auf der Grundlinie des Titels, rund wie „i“ */
    .page-title-row { display: flex; align-items: baseline; gap: var(--sp-2); }
    /* Die Zierlinie unter dem Titel (themes.ts, 260 px) machte die Überschrift so breit wie sie – das „?“ stand am Ende der Linie. In der
       Zeile liegt sie deshalb frei unter dem Text, an derselben Stelle wie sonst. */
    .page-title-row > h1.page-title { min-width: 0; position: relative; padding-bottom: 1.1rem; }
    .page-title-row > h1.page-title::after { position: absolute; left: 0; top: calc(100% - 1.1rem); max-width: calc(100vw - 2rem); }
    form.tour-restart { margin: 0; flex: none; }
    .tour-restart-btn { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; padding: 0; border-radius: 50%;
      border: 1px solid var(--gold); background: transparent; color: var(--gold); font-weight: bold; font-family: Georgia, serif; font-size: var(--fs-md); cursor: pointer; }
    .tour-restart-btn:hover, .tour-restart-btn:focus-visible { background: var(--hover); color: var(--gold-bright); }
    h2 { color: var(--gold); }
    p { line-height: 1.5; }
    pre { background: var(--field); padding: 1rem; border-radius: 4px; border: 1px solid var(--border); white-space: pre-wrap; line-height: 1.4; font-family: 'Courier New', monospace; }
    a.button, button.button, label.button, summary.button, span.button {
      display: inline-block; margin: 0 0.5rem 1rem 0; padding: 0.55rem 1.2rem;
      background: var(--green); color: var(--btn-text); text-decoration: none; border-radius: var(--r-sm);
      border: 1px solid var(--btn-border); font-size: var(--fs-md); cursor: pointer; font-family: inherit;
      /* gleiche Zeilenhöhe für Link- und echte Knöpfe (0.4.4.126, Wunsch Wolfgang: „Buttons unterschiedlich groß“ – ein <a> erbte 1,5,
         ein <button> „normal“, nebeneinander 32 gegen 28 px) */
      line-height: 1.3;
    }
    a.button:hover, button.button:hover, label.button:hover, summary.button:hover { background: var(--green-bright); }
    /* Kästchen, Optionsfelder und Schieberegler in der Akzentfarbe des Designs statt Browser-Blau (GUI-19, 3.1.38) */
    input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--gold); }
    /* Schalter für Ein/Aus-Einstellungen (3.1.50, Wunsch Wolfgang): links aus, rechts an – Baustein toggleSwitch in uiBlocks.ts */
    input[type="checkbox"].switch:not(.readonly-check) {
      -webkit-appearance: none; appearance: none; position: relative; flex: none; box-sizing: border-box;
      width: 2.75rem; height: 1.5rem; margin: 0; border-radius: var(--r-pill); vertical-align: middle; cursor: pointer;
      background: var(--panel-light); border: 1px solid var(--border); transition: background-color 0.15s, border-color 0.15s;
    }
    input[type="checkbox"].switch:not(.readonly-check)::before {
      content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.5rem - 6px); height: calc(1.5rem - 6px);
      border-radius: 50%; background: var(--text-dim); transition: transform 0.15s, background-color 0.15s;
    }
    input[type="checkbox"].switch:not(.readonly-check):checked { background: var(--gold); border-color: var(--gold-bright); }
    input[type="checkbox"].switch:not(.readonly-check):checked::before { transform: translateX(1.25rem); background: var(--bg); }
    input[type="checkbox"].switch:not(.readonly-check):disabled { opacity: 0.5; cursor: not-allowed; }
    @media (prefers-reduced-motion: reduce) { input.switch, input.switch::before { transition: none !important; } }
    label.switch-row { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; min-height: 24px; }
    label.switch-row.is-disabled { cursor: not-allowed; color: var(--text-dim); }
    .switch-only { display: inline-flex; align-items: center; min-height: 24px; }
    .switch-list { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
    /* Erklärung klein unter einem Schalter, eingerückt auf den Text (0.4.4.123, Hausierer) */
    .switch-hint { margin: 0.15rem 0 0 calc(2.75rem + 0.6rem); color: var(--text-dim); font-size: var(--fs-sm); line-height: 1.35; }
    .hausierer-extras { gap: 0.7rem; }
    /* Abkürzungen mit Tooltip (Glossar, 3.1.39): gepunktet unterstrichen */
    abbr[title] { text-decoration: none; border-bottom: 1px dotted currentColor; cursor: help; }
    a.button.alt { background: var(--panel-light); border-color: var(--border); color: var(--gold-bright); }
    a.button.alt:hover { background: var(--hover); }
    a.button.small, button.button.small, label.button.small, summary.button.small, span.button.small { padding: 0.3rem 0.7rem; font-size: var(--fs-sm); margin: 0; }
    /* Knöpfe in einer Zeile mit anderem (0.4.3.24, Wunsch Wolfgang: „auf allen Seiten Buttons, Zeilen, Leisten nicht versetzt, außer dort, wo es
       ausdrücklich gewünscht ist“): der Abstand unten aus dem Grundstil schob sie in mittig ausgerichteten Zeilen und Tabellenzellen 8 px nach
       oben (Stufenaufstieg, Assistent, Freundesanfrage, Admin-Tabellen …). Dort sorgt der Zwischenraum der Zeile für Abstand, nicht der Knopf. */
    :is([style*="display:flex"], [style*="display: flex"], [style*="display:inline-flex"], .levelup-banner, .wizard-nav, .reset-actions, .crystal-action, .friend-request-row, .wiki-search, .design-actions, .rec-box, .solo-ways, .tour-choices, .ui-card-foot, .finder-actions, .finder-pass, td, th) > :is(a, button, label, summary, span).button,
    :is([style*="display:flex"], [style*="display: flex"], [style*="display:inline-flex"], .levelup-banner, .wizard-nav, .reset-actions, .crystal-action, .friend-request-row, .wiki-search, .design-actions, .rec-box, .solo-ways, .tour-choices, .ui-card-foot, .finder-actions, .finder-pass, td, th) > form > :is(a, button, label, summary, span).button { margin-bottom: 0; }
    a.button:disabled, button.button:disabled { opacity: 0.4; cursor: not-allowed; }
    /* Weiter in einen anderen Bereich (3.2.6, Wunsch Wolfgang): Ende der Erstellung, Abschnittswechsel der Einführung */
    .button.next-section { background: var(--gold); border-color: var(--gold-bright); color: var(--on-accent); font-weight: bold; box-shadow: 0 0 0 2px var(--gold-bright), 0 0 10px var(--gold); }
    .button.next-section:hover:not(:disabled) { background: var(--gold-bright); color: var(--on-accent); }
    .initiative-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: flex; flex-wrap: wrap; gap: 0.3rem; }
    .initiative-list li { padding: 0.15rem 0.5rem; border: 1px solid var(--border); border-radius: 3px; cursor: help; font-size: var(--fs-sm); }
    .initiative-list li:hover { background: var(--panel-light); }
    .sheets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
    .sheet { background: var(--panel); border: 1px solid var(--border); padding: 1rem; border-radius: 4px; }
    /* Dungeon-Karten (3.1.8): grau, der automatisch wiederholte dick in Gold (!important wie der Kartenrahmen der Designs) */
    .sheet.dungeon-card { border: 1px solid var(--card-idle-border); border-color: var(--card-idle-border) !important; }
    .sheet.dungeon-card.dungeon-next { border-width: 4px; border-color: var(--gold-bright) !important; box-shadow: 0 0 12px color-mix(in srgb, var(--gold) 40%, transparent) !important; }
    /* Heldenkarten (3.1.20, Wunsch Wolfgang): aktive Helden mit demselben dicken Goldrahmen wie der nächste Dungeon, inaktive grau */
    .sheet.hero-card { border: 1px solid var(--card-idle-border); border-color: var(--card-idle-border) !important; }
    /* Knöpfe unten bündig (3.2.20): in einer Reihe stehen sie auf gleicher Höhe, auch wenn eine Karte mehr Zeilen hat. */
    .sheet.hero-card { display: flex; flex-direction: column; }
    .sheet.hero-card > .hero-card-buttons { margin-top: auto; padding-top: 0.5rem; }
    /* Dungeon-Karten (0.4.0.5, Wunsch Wolfgang: „die Buttons weiterhin alle immer in selber Höhe“): jede Karte nimmt fünf Zeilen des
       gemeinsamen Rasters (Kopf, Trophäen, Beschreibung, Abstimmen, Fuß) – Rahmen und Innenabstand rechnet das Raster in die erste und
       letzte Zeile ein, die Knöpfe stehen in einer Reihe also auch neben dem dicken Goldrahmen gleich hoch. */
    .sheets.dungeon-sheets { grid-auto-rows: auto; }
    .sheet.dungeon-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; align-content: start; min-width: 0; }
    .sheet.dungeon-card > .dungeon-vote { margin: 0; padding-top: 0.5rem; }
    .dungeon-card .dc-head h3 { margin-bottom: 0.2rem; }
    .dungeon-card .dc-level { margin: 0 0 0.3rem; font-size: var(--fs-sm); }
    /* Name nach XP (0.4.0.5): grau keine, weiß bis 25 %, grün bis 50 %, gelb bis 75 %, orange volle XP */
    .dungeon-name.xp-grau { color: var(--text-dim); }
    .dungeon-name.xp-weiss { color: var(--text-strong); }
    .dungeon-name.xp-gruen { color: var(--success); }
    .dungeon-name.xp-gelb { color: var(--caution); }
    .dungeon-name.xp-orange { color: var(--warning); }
    .sheet.hero-card > .hero-card-body { display: flow-root; }
    .sheet.hero-card.hero-active { border-width: 4px; border-color: var(--gold-bright) !important; box-shadow: 0 0 12px color-mix(in srgb, var(--gold) 40%, transparent) !important; }
    /* Ein-/Aus-Einstellungen als Schalter (3.1.25, seit 3.1.50 Schalter statt Kästchen) */
    .character-form .setting-toggle { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.7rem; }
    /* Trennlinie zwischen aktiven und inaktiven Helden (3.1.23); alle Heldenkarten gleich breit, auch eine einzelne */
    .sheets.hero-sheets { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
    .hero-divider { display: flex; align-items: center; gap: 0.8rem; margin: 1.8rem 0 1rem; color: var(--text-dim); font-size: var(--fs-sm);
      text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
    .hero-divider::before, .hero-divider::after { content: ""; flex: 1; height: 1px; background: var(--gold); opacity: 0.6; }
    .sheet h3 { margin: 0 0 0.2rem; color: var(--gold-bright); }
    .sheet .subtitle { color: var(--text-dim); margin: 0 0 0.8rem; font-style: italic; }
    .sheet table { border-collapse: collapse; margin-bottom: 0.8rem; }
    .sheet td { padding: 0.1rem 0.5rem; }
    .sheet td:nth-child(odd) { color: var(--text-dim); }

    /* Charaktererstellung im WoD-Stil */
    .creation-layout { display: flex; gap: 1.5rem; flex-wrap: wrap; }
    .picker-columns { display: flex; gap: 2rem; }
    .picker-column h3 { color: var(--gold); font-size: var(--fs-md); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.5rem; }
    .picker-column label {
      display: block; padding: 0.3rem 0.5rem; cursor: pointer; border-radius: var(--r-sm); font-size: var(--fs-md);
    }
    .picker-column label:hover { background: var(--panel-light); }
    .picker-column input[type="radio"] { margin-right: 0.4rem; }
    .detail-panel {
      flex: 1; min-width: 280px; background: var(--panel); border: 1px solid var(--border);
      border-radius: 4px; padding: 1rem 1.2rem;
    }
    .detail-panel h3 { color: var(--gold-bright); margin: 0 0 0.3rem; }
    .detail-panel .flavor { font-style: italic; color: var(--text-dim); margin-bottom: 0.8rem; }
    .detail-panel table { border-collapse: collapse; width: 100%; margin-top: 0.5rem; font-size: var(--fs-sm); }
    .detail-panel td { padding: 0.15rem 0.4rem; border-bottom: 1px solid var(--border); }
    .detail-panel .empty { color: var(--text-dim); }
    form.character-form { margin-top: 1.5rem; background: var(--panel); border: 1px solid var(--border); padding: 1.2rem; border-radius: 4px; max-width: 480px; }
    form.character-form label.field-label { display: block; margin: 0.6rem 0 0.2rem; color: var(--gold); font-size: var(--fs-sm); }
    /* Textfelder so breit wie die übrigen Felder (0.4.4.21); zieht man sie breiter, wächst das Formular mit (Skript growPanelWithTextarea) */
    form.character-form textarea { display: block; width: 100%; min-width: 100%; box-sizing: border-box; padding: 0.4rem; font-family: inherit; }
    form.character-form input[type="text"], form.character-form input[type="number"], form.character-form input[type="password"], form.character-form select {
      width: 100%; padding: 0.4rem; border-radius: var(--r-sm); border: 1px solid var(--border);
      background: var(--field); color: var(--text); box-sizing: border-box; font-family: inherit;
    }
    .ability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }

    /* Heldenerstellung als Assistent (v0.2.129) */
    .wizard-steps { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: wz; }
    .wizard-steps li { counter-increment: wz; padding: 0.35rem 0.7rem; border: 1px solid var(--border); border-radius: 3px; font-size: var(--fs-sm); color: var(--text-dim); background: var(--panel); }
    .wizard-steps li::before { content: counter(wz) ". "; }
    .wizard-steps li.done { color: var(--text); }
    .wizard-steps li.done a { color: inherit; }
    .wizard-steps li.current { border-color: var(--gold); color: var(--gold-bright); font-weight: bold; }
    /* Was dauerhaft ist (0.4.4.62, Plan 3.5): eine leise Zeile direkt unter der Schrittleiste */
    .creation-permanent { margin: -0.5rem 0 1rem; font-size: var(--fs-sm); color: var(--text-dim); }
    /* Schnellstart (0.4.4.63, Plan 3.6): drei Vorlagen als Karten auf Schritt 1, Übersicht der Wahl auf der Seite der Vorlage */
    .quick-start-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--sp-2); }
    .quick-start-card { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.6rem; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--panel-light); color: var(--text); text-align: center; text-decoration: none; font-size: var(--fs-sm); }
    .quick-start-card:hover, .quick-start-card:focus-visible { border-color: var(--gold); }
    .quick-start-title { font-weight: bold; color: var(--gold-bright); font-size: var(--fs-md); }
    .quick-start-summary th { text-align: left; white-space: nowrap; vertical-align: top; }
    /* Schnellstart (0.4.4.125, Wunsch Wolfgang): Karte wählt nur aus, darunter die Beschreibung mit „Weiter mit …“ */
    .quick-start-card { cursor: pointer; }
    .quick-start-details { margin-top: var(--sp-3); }
    .quick-start-detail { display: none; border: 1px solid var(--gold); border-radius: var(--r-sm); background: var(--panel-light); padding: var(--sp-3); }
    .quick-start-detail h3 { margin-top: 0; }
    .quick-start-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.8rem; margin: 0 0 var(--sp-2); }
    .quick-start-facts dt { color: var(--text-dim); }
    .quick-start-facts dd { margin: 0; }
    #qs-kaempfer:checked ~ .quick-start-grid label[for="qs-kaempfer"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
    #qs-kaempfer:checked ~ .quick-start-details [data-qs="kaempfer"] { display: block; }
    #qs-kaempfer:checked ~ .quick-start-details .quick-start-pick { display: none; }
    #qs-kaempfer:focus-visible ~ .quick-start-grid label[for="qs-kaempfer"] { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
    #qs-kleriker:checked ~ .quick-start-grid label[for="qs-kleriker"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
    #qs-kleriker:checked ~ .quick-start-details [data-qs="kleriker"] { display: block; }
    #qs-kleriker:checked ~ .quick-start-details .quick-start-pick { display: none; }
    #qs-kleriker:focus-visible ~ .quick-start-grid label[for="qs-kleriker"] { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
    #qs-waldlaeufer:checked ~ .quick-start-grid label[for="qs-waldlaeufer"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
    #qs-waldlaeufer:checked ~ .quick-start-details [data-qs="waldlaeufer"] { display: block; }
    #qs-waldlaeufer:checked ~ .quick-start-details .quick-start-pick { display: none; }
    #qs-waldlaeufer:focus-visible ~ .quick-start-grid label[for="qs-waldlaeufer"] { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
    /* Nur die Leiste mit den Knöpfen klebt oben (0.4.1.18 am Handy, seit 0.4.1.19 überall, Feedback), die Schrittleiste scrollt weg; die
       Punkteleiste der Fertigkeiten klebt darunter. Seit 0.4.3.24 (Wunsch Wolfgang: „die graue Leiste ist zu dick, ‚Assistent beenden‘ und ‚Wie
       vorherige Stufe‘ möchte ich auch darin haben“) eine schmale Zeile: Weiter, Assistent beenden, Wie vorherige Stufe und der Hinweis. */
    .wizard-bar { display: contents; }
    .wizard-bar > .wizard-nav { position: sticky; top: var(--sticky-top, 0px); z-index: 802; background: var(--bg); margin: 0 0 var(--sp-3); padding: var(--sp-1) 0; border-bottom: 1px solid var(--border); }
    .wizard-bar > .wizard-nav .button { padding: 0.35rem 0.9rem; }
    .wizard-bar > .wizard-nav .hint { font-size: var(--fs-sm); }
    /* Handy: kleine Knöpfe; der reine Hinweis fällt weg (die Schrittleiste darüber nennt den Schritt), Pflicht-Hinweise bleiben */
    @media (max-width: 768px) {
      .wizard-bar > .wizard-nav { gap: var(--sp-1) var(--sp-2); }
      .wizard-bar > .wizard-nav .button { min-height: 36px; padding: 0.3rem 0.6rem; font-size: var(--fs-sm); margin-right: 0; }
      .wizard-bar > .wizard-nav .wizard-hint:not(.wizard-block) { display: none; }
    }
    main:has(.wizard-bar) .skill-points-bar { top: calc(var(--sticky-top, 0px) + var(--wizard-h, 0px)); }
    .wizard-nav { display: flex; gap: var(--sp-2) 0.6rem; align-items: center; flex-wrap: wrap; margin: 0.4rem 0 1rem; }
    .wizard-nav form { margin: 0; }
    /* Erste Schritte der Erstellung (Volk & Klasse, Name & Herkunft, Schnellstart; 0.4.4.125, Wunsch Wolfgang: „Weiter und Zurück sollen
       wie der Einführungsknopf mitscrollen“): die Knopfleiste am Ende des Formulars klebt unten am Bildschirm. */
    form > .wizard-nav { position: sticky; bottom: 0; z-index: 801; background: var(--bg); margin: 1rem 0 0; padding: var(--sp-2) 0; border-top: 1px solid var(--border); }
    /* Handy: die Reiter der Chat-Leiste liegen unten über der ganzen Breite – die Knopfleiste steht darüber */
    @media (max-width: 768px) { body:has(.chat-dock) form > .wizard-nav { bottom: 3rem; } }
    /* Fraktionen in der Seitenspalte der Herkunft (0.4.4.125) */
    .creation-factions { text-align: left; margin-top: var(--sp-3); border-top: 1px solid var(--border); padding-top: var(--sp-2); }
    .creation-factions h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-md); }
    .creation-faction { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); }
    .creation-faction summary { cursor: pointer; color: var(--text); }
    .creation-faction p { margin: var(--sp-1) 0 0; color: var(--text-dim); }
    .creation-two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
    @media (max-width: 1100px) { .creation-two { grid-template-columns: 1fr; } }
    .creation-sheet { background: var(--panel); border: 1px solid var(--border); border-radius: 4px; padding: 1rem 1.2rem; margin-bottom: 1rem; min-width: 0; }
    .creation-sheet h2 { margin-top: 0; font-size: var(--fs-lg); }
    .creation-aside { position: sticky; top: 0.5rem; }
    .creation-aside .hero-portrait { display: block; max-width: 180px; margin: 0 auto 0.8rem; }
    .creation-detail table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
    .creation-detail td { padding: 0.15rem 0.4rem; border-bottom: 1px solid var(--border); }
    .creation-detail .flavor { font-style: italic; color: var(--text-dim); }
    /* Überschrift rechts auf derselben Höhe wie links („Volk“/„Mensch“, 0.4.3.24) */
    .creation-detail > :first-child { margin-top: 0; }
    .creation-form input[type="text"], .creation-form select { width: 100%; padding: 0.4rem; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--field); color: var(--text); box-sizing: border-box; font-family: inherit; }
    .creation-form .field-label { display: block; margin: 0.6rem 0 0.2rem; color: var(--gold); font-size: var(--fs-sm); }
    /* Namensfeld mit Knopf „Zufall“ daneben (0.4.0.23) */
    .name-row { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
    .name-row > input[type="text"] { flex: 1 1 12rem; width: auto; min-width: 0; }
    .name-row > .name-dice { flex: 0 0 auto; }
    .name-row-compact { max-width: 36rem; }
    .name-dice[hidden] { display: none; } /* ohne JavaScript bleibt er weg – .button setzt sonst display */
    :is(a, button, label, summary, span).button[hidden] { display: none; } /* gilt für jeden Knopf mit hidden (0.4.3.24) */
    .premium-continue[hidden] { display: none; } /* „Weiter mit Premium“ (0.4.0.31): erst, wenn etwas Premium braucht */
    /* Höchstens 3 Karten nebeneinander (0.4.1.2, Wunsch Wolfgang: „sieht besser aus“; vorher 4), auch am Handy */
    .pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
    .pick-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.6rem 0.4rem; border: 1px solid var(--border); border-radius: 4px; background: var(--panel-light); cursor: pointer; text-align: center; font-size: var(--fs-sm); }
    .pick-card input { position: absolute; opacity: 0; pointer-events: none; }
    .pick-card:hover { border-color: var(--gold); }
    .pick-card:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; color: var(--gold-bright); }
    .pick-card:has(input:focus-visible) { outline: 2px solid var(--gold-bright); }
    /* Premium-Völker (0.4.0.8): Abzeichen, ohne Premium gedämpft (ansehen geht, wählen nicht) */
    .premium-badge { display: inline-block; padding: 0 0.4rem; border-radius: var(--r-pill); background: var(--badge-bg); color: var(--badge-text); border: 1px solid var(--gold); font-size: var(--fs-xs); line-height: 1.5; vertical-align: middle; }
    .pick-card.pick-locked { color: var(--text-soft); border-style: dashed; }
    .pick-card.pick-locked:has(input:checked) { color: var(--text-strong); }
    .race-premium-note { margin: 0 0 0.4rem; font-size: var(--fs-sm); color: var(--warning); }
    .pick-card.locked { color: var(--text-dim); border-style: dashed; }
    .pick-card.locked .pick-img { filter: grayscale(0.85); opacity: 0.7; }
    .pick-card.locked:has(input:checked) { color: var(--text); }
    .levelup-locked { color: var(--danger); font-weight: bold; margin: 0.3rem 0; }
    .levelup-missing { color: var(--danger); }
    .pick-card .pick-note { font-size: var(--fs-xs); color: var(--text-dim); }
    /* Spielstil- und Volkskarten der Erstellung (0.4.4.59, Plan Phase 3.1–3.2) */
    .playstyle { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.6rem; margin: 0 0 0.5rem; font-size: var(--fs-sm); }
    .playstyle dt { font-weight: 600; color: var(--gold); }
    .playstyle dd { margin: 0; }
    .playstyle-lead { margin: 0 0 0.5rem; font-weight: 600; }
    .playstyle-line { margin: 0 0 0.5rem; font-size: var(--fs-sm); }
    .pick-subhead { margin: 1rem 0 0.3rem; font-size: var(--fs-md); }
    /* Spezialisierung (13.11.2026): Kartenzeile unter der Klasse, kurzer Text auf der Karte */
    .spec-card .spec-text { font-size: var(--fs-xs); color: var(--text-dim); }
    .spec-row[hidden] { display: none; }
    .spec-lead, .spec-line { margin: 0 0 0.3rem; }
    .spec-label { color: var(--text-dim); }
    /* Empfehlung zum Übernehmen (0.4.4.61, Plan 3.3): Kasten mit dem Vorschlag und einem Knopf, der nur die Felder füllt */
    .rec-box { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin: 0.4rem 0 0.8rem; padding: 0.5rem 0.7rem; border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: var(--r-sm); background: var(--field); }
    .rec-box[hidden] { display: none; }
    .rec-line { margin: 0; flex: 1 1 18rem; font-size: var(--fs-sm); }
    .rec-item { white-space: nowrap; }
    .rec-feats { border: 2px solid var(--gold); }
    .pick-img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--panel); display: inline-flex; align-items: center; justify-content: center; font-size: 1.9rem; flex-shrink: 0; }
    .hb-form textarea { width: 100%; box-sizing: border-box; background: var(--field); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0.4rem; font-family: inherit; }
    .hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.6rem 1rem; margin-bottom: 0.6rem; }
    .hb-grid label { display: flex; flex-direction: column; gap: 0.2rem; font-size: var(--fs-sm); color: var(--text-dim); }
    .hb-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.2rem 0.8rem; margin: 0.4rem 0; }
    .hb-check { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: 1rem; font-size: var(--fs-sm); }
    .creation-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; }
    .creation-admin-cell { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.6rem; border: 1px solid var(--border); border-radius: 4px; background: var(--panel-light); text-align: center; }
    .creation-admin-cell form { margin: 0; }
    /* Knöpfe der Kacheln einer Reihe auf einer Höhe, auch wenn ein Name zweizeilig ist (0.4.3.24) */
    .creation-admin-cell > form:last-child, .portrait-cell > form:last-child { margin-top: auto; }
    .creation-admin-cell .pick-img { width: 96px; height: 96px; font-size: 2.6rem; }
    .creation-summary { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
    .creation-summary .pick-img { width: 40px; height: 40px; font-size: var(--fs-lg); }
    .table-scroll { overflow-x: auto; }
    .pb-table tr.pb-key td:first-child { color: var(--gold-bright); }
    .pb-short { display: none; }
    .pb-premium { border: 1px solid var(--card-border, var(--border)); border-radius: var(--r-sm); padding: var(--sp-2) var(--sp-3); margin: var(--sp-2) 0; }
    .pb-premium legend { color: var(--gold); font-size: var(--fs-sm); padding: 0 0.3rem; }
    .pb-premium label { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: var(--sp-3); min-height: 24px; }
    .pb-premium .hint { margin: 0.3rem 0 0; font-size: var(--fs-sm); }
    @media (max-width: 768px) {
      .pb-table th, .pb-table td { padding: 0.25rem 0.2rem; }
      .pb-table .pb-cost, .pb-table .pb-mod, .pb-long { display: none; }
      .pb-short { display: inline; }
    }
    .creation-stats { border-collapse: collapse; width: 100%; }
    .creation-stats td { padding: 0.2rem 0.4rem; border-bottom: 1px solid var(--border); }
    .creation-stats td:first-child { color: var(--text-dim); }

    /* Punktekauf */
    .pb-table { border-collapse: collapse; margin: 0.6rem 0; }
    .pb-table th { text-align: left; color: var(--gold); font-size: var(--fs-sm); padding: 0.2rem 0.6rem; }
    .pb-table td { padding: 0.25rem 0.6rem; text-align: center; border-bottom: 1px solid var(--border); }
    .pb-table td:first-child { text-align: left; }
    .pb-btn {
      width: 1.8rem; height: 1.8rem; border-radius: var(--r-sm); border: 1px solid var(--border);
      background: var(--panel-light); color: var(--gold-bright); cursor: pointer; font-size: var(--fs-md);
    }
    .pb-btn:hover { background: var(--hover); }

    /* Talent-Shop */
    .feat-table { border-collapse: collapse; width: 100%; max-width: 100%; }
    /* Tabellen wachsen mit ihrem Inhalt bis zur vollen Breite (frueher fest 700px -> breite Tabellen
       wurden abgeschnitten bzw. scrollten intern); schmale Tabellen bleiben so schmal wie ihr Inhalt. */
    .feat-table > thead, .feat-table > tbody { width: auto; }
    .feat-table th { text-align: left; color: var(--gold); padding: 0.3rem 0.6rem; border-bottom: 1px solid var(--border); }
    .feat-table td { padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border); }
    .feat-table.econ-table { font-size: var(--fs-sm); }
    .feat-table.econ-table th, .feat-table.econ-table td { padding: 0.3rem 0.4rem; }
    .feat-table td select {
      padding: 0.3rem; border-radius: var(--r-sm); border: 1px solid var(--border);
      background: var(--field); color: var(--text); font-family: inherit;
    }

    /* Aktueller-Held-Kopfleiste */
    .hero-topbar {
      background: var(--panel); border-bottom: 1px solid var(--border);
      padding: 0.4rem 1rem; font-size: var(--fs-sm); color: var(--text-dim);
    }
    .hero-topbar strong { color: var(--gold-bright); }
    /* Heldenleiste beim Scrollen (0.4.3.40, Wunsch Wolfgang, Wahl unter Mein Konto › Anzeige) */
    /* Seit 0.4.4.7 je Gerät: data-topbar am PC, data-topbar-m am Handy */
    @media (min-width: 769px) {
      body[data-topbar="fest"] .hero-topbar { position: sticky; top: 0; z-index: 900; }
      body[data-topbar="mit"] .hero-topbar { position: static !important; }
    }
    @media (max-width: 768px) {
      body[data-topbar-m="fest"] .hero-topbar { position: sticky; top: 0; z-index: 900; }
      body[data-topbar-m="mit"] .hero-topbar { position: static !important; }
    }

    /* Schmale XP-Leiste unter der Heldenleiste (fuellt sich bis zum naechsten Stufenaufstieg). */
    /* Lesbarer seit GUI-08 (3.1.38): 1,1 rem hoch, Schrift 0,75 rem, „Stufenaufstieg verfügbar“ dunkel auf Gold. */
    .xp-bar {
      position: relative; display: block; height: 1.1rem; background: var(--field);
      border-bottom: 1px solid var(--border); overflow: hidden; text-decoration: none;
    }
    .xp-bar-fill {
      position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 60%, var(--bg)), var(--gold));
      transition: width 0.4s ease;
    }
    .xp-bar-fill.ready { background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
    .xp-bar-text {
      position: relative; display: block; text-align: center; font-size: var(--fs-xs); line-height: 1.1rem;
      color: var(--text); text-shadow: var(--xp-text-shadow); letter-spacing: 0.03em;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 0.5rem;
    }
    .result-news-head { margin: 0.8rem 0 0.2rem; font-size: var(--fs-md); color: var(--gold); }
    /* Händler von Lethe als Personen (0.4.4.97, Plan 9.3): Name, Persönlichkeit, Gruß je Treuestufe; Anführungszeichen je Sprache */
    .merchant-keeper { font-size: var(--fs-sm); color: var(--gold); }
    .merchant-persona { margin-top: 0.2rem; font-size: var(--fs-sm); color: var(--text-dim); }
    .merchant-voice { margin-top: 0.3rem; font-size: var(--fs-sm); font-style: italic; }
    :lang(de) .merchant-voice q { quotes: "„" "“" "‚" "‘"; }
    :lang(en) .merchant-voice q { quotes: "“" "”" "‘" "’"; }
    /* Lage in Nargard (0.4.4.98, Plan 9.4): die Affixe der Woche als Geschichte */
    .affix-lore { margin: 0.4rem 0; font-size: var(--fs-sm); }
    .affix-lore p { margin: 0.2rem 0 0; color: var(--text-dim); font-style: italic; }
    /* Karte von Nargard (0.4.4.99, Plan 9.4; seit 12.11.2026 mit gemaltem Bild): SVG, Farben nur aus dem Design */
    .nargard-map-link { margin: 0.4rem 0 0.8rem; }
    .nargard-map { margin: 0.5rem 0 1rem; }
    .nargard-map svg { display: block; width: 100%; max-width: 640px; height: auto; border: 1px solid var(--border); border-radius: var(--r-sm); }
    /* Karte von Nargard (12.11.2026): Namen als Text über dem Bild, mit dunklem Rand, damit sie auf dem gemalten Untergrund lesbar bleiben */
    .nm-label { fill: var(--text-strong); font-size: var(--fs-md); text-anchor: middle; font-weight: bold; paint-order: stroke; stroke: rgba(12, 8, 4, 0.85); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
    .nm-small { font-size: var(--fs-sm); font-weight: normal; }
    .nm-region { font-size: var(--fs-lg, var(--fs-md)); letter-spacing: 0.04em; }
    .nm-water { font-style: italic; }
    .nm-city-label { fill: var(--gold-bright); font-size: var(--fs-lg, var(--fs-md)); }
    .region-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--sp-2); }
    .region-card h3 { margin: 0 0 0.3rem; }
    .region-card p { margin: 0 0 0.4rem; color: var(--text-dim); font-size: var(--fs-sm); }
    .region-card ul { margin: 0; padding-left: 1.1rem; }
    .region-level { color: var(--text-dim); font-size: var(--fs-sm); }
    /* Auftraggeber der Taten & Werke (0.4.4.100, Plan 9.6): Name in Gold, Anlass wie die Stimme der Händler */
    .tw-sender { margin: 0.1rem 0 0.2rem; }
    .tw-sender .merchant-voice { margin-top: 0.1rem; }
    /* Mein Fortschritt (0.4.4.101, Plan 9.9): Stand rechtsbündig, Listen (Ruf, Treue) ohne Einzug */
    .progress-amount { white-space: nowrap; }
    .progress-list { margin: 0; padding: 0; list-style: none; white-space: normal; }
    .xp-bar:has(> .xp-bar-fill.ready) { background: var(--gold-bright); }
    .xp-bar:has(> .xp-bar-fill.ready) .xp-bar-text { color: var(--on-accent); text-shadow: none; font-weight: bold; }

    /* Sortierbare Admin-Tabellen */
    th.sortable-th { cursor: pointer; user-select: none; }
    .cond[data-cond]::before { content: ""; display: none; width: 1.15em; height: 1.15em; margin-right: 0.2em; vertical-align: -0.22em; background: center / contain no-repeat; border-radius: 3px; }
    .cond[data-cond][title] { cursor: help; text-decoration: underline dotted rgba(255,255,255,0.25); }
    /* Handelsansicht im Auktionshaus-Stil (v0.2.84) */
    /* Postfach mit Ordnerleiste links (3.1.73, WoD-Vorbild): Posteingang oben, darunter eingerückt die übrigen Ordner. */
    .mail-toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.7rem; }
    .mail-layout { display: flex; gap: 1rem; align-items: flex-start; }
    .mail-folders { flex: 0 0 13rem; background: var(--panel-light); border: 1px solid var(--border); border-radius: var(--r-md, 6px); padding: 0.5rem 0.6rem; }
    .mail-folders-head { font-weight: bold; color: var(--gold); text-align: center; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; margin-bottom: 0.4rem; }
    .mail-tree, .mail-tree ul { list-style: none; margin: 0; padding: 0; }
    .mail-tree-sub > ul { margin-left: 0.55rem; padding-left: 0.6rem; border-left: 1px solid var(--border); }
    .mail-tree-sub > ul > li { position: relative; }
    .mail-tree-sub > ul > li::before { content: ""; position: absolute; left: -0.6rem; top: 0.95em; width: 0.45rem; border-top: 1px solid var(--border); }
    .mail-tree a { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; padding: 0.25rem 0.4rem; border-radius: 4px; color: var(--gold); text-decoration: none; }
    .mail-tree a:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); }
    .mail-tree a.active { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-bright); outline: 1px solid var(--gold); }
    .mail-tree a.folder-own { color: var(--text); }
    .mail-new-folder > summary, .mail-folder-edit > summary { cursor: pointer; padding: 0.25rem 0.4rem; color: var(--text-soft); font-size: var(--fs-sm); }
    .mail-new-folder > summary { list-style: none; }
    .mail-new-folder > summary::-webkit-details-marker { display: none; }
    .mail-new-folder > summary::before { content: "+ "; }
    .mail-folder-full { padding: 0.25rem 0.4rem; color: var(--text-dim); font-size: var(--fs-sm); }
    .mail-folder-form { display: flex; gap: 0.3rem; flex-wrap: wrap; margin: 0.2rem 0 0.3rem; }
    .mail-folder-form input[type="text"] { flex: 1 1 7rem; min-width: 0; }
    .mail-folder-edit { margin-top: 0.5rem; border-top: 1px solid var(--border); padding-top: 0.3rem; }
    .mail-folder-edit-row { display: flex; gap: 0.3rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.4rem; }
    .mail-main { flex: 1; min-width: 0; }
    .mail-head { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
    .mail-title { margin: 0; font-size: var(--fs-lg); }
    .mail-filter { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
    /* Freunde (3.2.5) */
    .friend-request { max-width: 36rem; margin-bottom: var(--sp-4); }
    .friend-request-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
    .friend-request-row input { flex: 1 1 14rem; }
    .friend-request-row .name-suggest { flex: 1 1 14rem; }
    .friend-request-row .name-suggest input { width: 100%; }
    /* Vorschläge beim Tippen von Heldennamen (0.4.0.32) */
    .name-suggest { position: relative; display: inline-block; max-width: 100%; vertical-align: middle; }
    .name-suggest-list { position: absolute; left: 0; top: calc(100% + 2px); z-index: 60; min-width: max(100%, 14rem); max-width: min(26rem, calc(100vw - 32px));
      max-height: 16rem; overflow-y: auto; margin: 0; padding: var(--sp-1) 0; list-style: none; background: var(--panel); color: var(--text);
      border: 1px solid var(--gold); border-radius: var(--r-sm); box-shadow: var(--shadow-overlay); }
    .name-suggest-list[hidden] { display: none; }
    form.character-form .name-suggest { display: block; }
    /* Empfänger: Freitext mit Häkchen bzw. Kreuz daneben (0.4.4.21) */
    .recipient-field { display: flex; align-items: center; gap: var(--sp-2); }
    .recipient-field input { flex: 1 1 auto; min-width: 0; }
    .recipient-mark { flex: 0 0 1.4rem; height: 1.4rem; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: bold; }
    .recipient-mark.is-ok { color: var(--green); border: 1px solid var(--green); }
    .recipient-mark.is-nein { color: var(--danger); border: 1px solid var(--danger); }
    .mail-blocked-link { display: block; margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--text-dim); }
    .mail-block { display: inline-block; }
    .mail-block > summary { list-style: none; cursor: pointer; }
    .mail-block > summary::-webkit-details-marker { display: none; }
    .name-suggest-list li { padding: var(--sp-1) var(--sp-2); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 24px; }
    .name-suggest-list li:hover, .name-suggest-list li[aria-selected="true"] { background: var(--hover); color: var(--text-strong); }
    .friend-table td.friend-actions { text-align: right; white-space: nowrap; }
    .friend-table td.friend-actions > * { margin-left: var(--sp-1); }
    .online-dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--success); vertical-align: middle; }
    .online-dot.away { background: var(--caution); }
    @media (max-width: 768px) { .friend-table td.friend-actions { white-space: normal; text-align: left; } }
    .mail-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; margin-top: 0.6rem; }
    .mail-move { display: inline-flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; margin-left: auto; }
    .mail-move .mail-move-name { width: 13rem; max-width: 100%; }
    /* Namensfeld nur bei „+ Neuer Ordner …“ (0.4.0.22); ohne :has bleibt es sichtbar */
    @supports selector(:has(*)) { .mail-move:not(:has(select option[value="neu"]:checked)) .mail-move-name { display: none; } }
    .mail-foot { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 0.4rem; }
    .mail-pagesize { display: flex; gap: 0.5rem; align-items: center; margin: 0; }
    /* Geöffnete Nachricht (0.4.0.35, Wunsch Wolfgang): „Verschieben nach“ oben neben „Zurück“, Blättern unten rechts */
    .message-back { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; justify-content: space-between; margin: 0 0 0.6rem; }
    .message-back .mail-view-move { margin: 0; }
    .mail-view-pager { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-left: auto; }
    @media (max-width: 768px) {
      .mail-layout { flex-direction: column; }
      .mail-folders { flex: none; width: 100%; box-sizing: border-box; }
      .mail-move { margin-left: 0; }
      .mail-view-move { margin-left: 0 !important; }
      .mail-view-pager { width: 100%; justify-content: flex-end; }
    }
    /* Blätterleiste der Nachrichten (früher auch der Markt-Ansicht) */
    .ah-pager { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.6rem; }
    .ah-table tr.ah-own td { background: color-mix(in srgb, var(--gold) 6%, transparent); }
    /* Markthalle (0.4.4.104, Plan 9.10 A): Angebote und Kaufgesuche in einer Liste – Reiter oben (seit 0.4.5.11), Art in jeder Zeile */
    .ah-kind { display: inline-block; margin-left: 0.35rem; padding: 0 0.4rem; border: 1px solid var(--border); border-radius: 999px; font-size: var(--fs-xs); color: var(--text-dim); vertical-align: middle; white-space: nowrap; }
    .ah-kind-gesuch { border-color: var(--gold); color: var(--gold); }
    .supply-üppig { color: var(--success); } .supply-reichlich { color: color-mix(in srgb, var(--success) 50%, var(--caution)); } .supply-mäßig { color: var(--caution); }
    .supply-spärlich { color: var(--warning); } .supply-erschöpft { color: var(--danger); }
    .levelup-arrow { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; }
    .hero-pick-arrow { width: 16px; height: 16px; vertical-align: -3px; }
    .levelup-arrow img { width: 22px; height: 22px; vertical-align: -5px; filter: drop-shadow(0 0 3px rgba(255,220,90,0.8)); animation: levelup-pulse 1.6s ease-in-out infinite; }
    @keyframes levelup-pulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
    tr.message-event td a, tr.message-event td { color: var(--event-color); }
    .folder-count { display: inline-block; min-width: 1.2em; padding: 0 0.3em; margin-left: 0.2em; border-radius: 8px; background: var(--badge-bg); color: var(--badge-text); font-size: var(--fs-xs); text-align: center; }
    .folder-events .folder-count { background: var(--event-color); color: var(--on-accent); }
    .event-body a { color: var(--event-color); }
    .cr-conds { display: flex; flex-wrap: wrap; gap: 0.15rem 0.45rem; margin-top: 0.15rem; font-size: var(--fs-xs); color: var(--text-dim); font-weight: normal; }
    /* Zustände in der Statustabelle nur als Icon, Name und Wirkung im Tooltip; ohne Bild ein „?“ (v0.2.119, Wunsch Wolfgang). */
    /* Heldenporträts (v0.2.120) */
    .hero-portrait { display: block; width: 180px; max-width: 45vw; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; border: 2px solid var(--card-border, var(--gold)); box-shadow: 0 2px 10px rgba(0,0,0,0.4); margin: 0.4rem 0 0.8rem; }
    .hero-portrait.small { width: 96px; float: right; margin: 0 0 0.4rem 0.6rem; }
    .gender-form { font-size: var(--fs-sm); color: var(--text-dim); margin: 0.2rem 0; }
    /* Gesinnung einmal festlegen bzw. Gottheit wählen im Heldenbogen (0.4.4.239) */
    .alignment-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.3rem 0 0; }
    .alignment-form select { max-width: 100%; }
    .gender-note { font-size: var(--fs-sm); color: var(--text-dim); margin: 0.2rem 0; }
    /* Geschlecht als große Knöpfe mit Symbol (3.2.5, Wunsch Wolfgang) */
    .gender-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 9rem)); gap: 0.6rem; margin: 0.2rem 0 0.4rem; }
    .gender-card { padding: 0.8rem 0.4rem; font-size: var(--fs-md); }
    .gender-sym { font-size: 2.4rem; line-height: 1; color: var(--gold); }
    /* Gesinnung in der Erstellung (0.4.4.239): neun Karten im Raster der zwei Achsen, darunter die Gottheit */
    .alignment-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin: 0.2rem 0 0.6rem; }
    .alignment-card { justify-content: flex-start; }
    .alignment-deity { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.4rem 0; }
    .alignment-deity select { max-width: 100%; }
    @media (max-width: 768px) { .alignment-pick { grid-template-columns: 1fr; } }
    /* Erklärung beim Darüberfahren bzw. Antippen (Attribute in der Erstellung, 3.2.5) */
    .tip[data-tip] { position: relative; cursor: help; border-bottom: 1px dotted currentColor; }
    .tip[data-tip]:hover::after, .tip[data-tip]:focus::after {
      content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; width: max-content; max-width: min(22rem, 80vw);
      white-space: normal; text-align: left; font-size: var(--fs-xs); line-height: 1.4; color: var(--text); background: var(--panel);
      border: 1px solid var(--gold); border-radius: var(--r-sm); padding: var(--sp-1) var(--sp-2); box-shadow: var(--shadow-overlay); font-weight: normal; }
    .portrait-drop { border: 2px dashed var(--border); border-radius: 8px; padding: 0.8rem 1rem; margin-bottom: 1rem; }
    .portrait-drop.drag { border-color: var(--gold-bright); background: color-mix(in srgb, var(--gold) 8%, transparent); }
    .portrait-hint { font-size: var(--fs-sm); color: var(--text-dim); }
    .portrait-log { max-height: 180px; overflow-y: auto; font-size: var(--fs-sm); }
    .portrait-log .ok { color: var(--success); } .portrait-log .err { color: var(--danger); }
    .portrait-race summary { cursor: pointer; color: var(--gold); font-size: var(--fs-md); margin: 0.6rem 0; }
    .portrait-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 0.5rem; }
    .portrait-cell { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.35rem; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); font-size: var(--fs-xs); text-align: center; }
    .portrait-cell img, .portrait-missing { width: 96px; height: 96px; object-fit: cover; border-radius: 5px; }
    .portrait-missing { display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--text-dim); background: var(--panel-light); }
    .portrait-cell.missing .portrait-missing { opacity: 0.6; }
    .portrait-cell form { margin: 0; }
    .ac-details summary { cursor: pointer; }
    .ac-details-hint { color: var(--gold); text-decoration: underline dotted; }
    /* Spielbegriffe zum Anklicken (0.4.0.3): gepunktet unterstrichen, Farbe des Textes */
    /* Veredelung eines Exemplars im Gegenstandsfenster (0.4.0.3): Rand und Farbe zeigen, woher die Eigenschaft kommt */
    .feat-table tr.item-refined-head td { color: var(--info); font-weight: bold; border-left: 3px solid var(--info); padding-top: 0.6rem; }
    .feat-table tr.item-refined td { color: var(--info); }
    .feat-table tr.item-refined td:first-child { border-left: 3px solid var(--info); }
    .feat-table tr.item-refined .refined-left { color: var(--text-dim); font-size: var(--fs-sm); }
    .inv-upgrade-form { display: flex; gap: 0.3rem; flex-wrap: wrap; align-items: center; margin: 0; }
    a.term-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 0.18em; cursor: help; }
    a.term-link:hover, a.term-link:focus-visible { color: var(--gold-bright); }
    .ac-breakdown { border-collapse: collapse; margin: 0.4rem 0 0.2rem; font-size: var(--fs-sm); }
    .ac-breakdown td { padding: 0.1rem 0.6rem 0.1rem 0; border-bottom: 1px solid var(--border); }
    .ac-breakdown td:last-child { text-align: right; white-space: nowrap; color: var(--text); }
    .ac-breakdown th { text-align: left; font-weight: normal; color: var(--text-dim); padding: 0.1rem 0.6rem 0.1rem 0; border-bottom: 1px solid var(--border); }
    .ac-breakdown th:last-child { text-align: right; }
    .ac-breakdown td:first-child { white-space: nowrap; color: var(--text-dim); }
    .ac-breakdown .ac-row-note { display: block; font-size: var(--fs-xs); color: var(--text-dim); text-decoration: none; }
    .ac-breakdown .ac-uncounted td { color: var(--text-dim); }
    .ac-breakdown .ac-uncounted td:not(:first-child) { text-decoration: line-through; }
    .ac-breakdown .ac-sum td { font-weight: bold; color: var(--gold-bright); border-bottom: none; }
    .ac-note { font-size: var(--fs-xs); color: var(--text-dim); margin: 0.2rem 0 0; }
    .cr-conds { gap: 0.25rem; }
    .cr-conds .cond[data-cond] { font-size: 0; text-decoration: none; cursor: help; display: inline-block; line-height: 0; }
    .cr-conds .cond[data-cond]::before { content: "?"; display: inline-block; width: 24px; height: 24px; margin: 0; vertical-align: middle; font-size: 15px; line-height: 22px; text-align: center; font-weight: bold; color: var(--gold); background-color: var(--panel-light); border: 1px solid var(--border); box-sizing: border-box; }
    .stage-end { border: 2px solid; border-radius: 6px; padding: 0.7rem 1rem; margin: 1rem 0; }
    .stage-end.stage-won { border-color: var(--success); background: color-mix(in srgb, var(--success) 8%, transparent); }
    .stage-end.stage-lost { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
    .stage-end.stage-hireling { border-color: var(--border); background: color-mix(in srgb, var(--gold) 5%, transparent); }
    .stage-end .stage-end-title { font-weight: bold; margin-bottom: 0.4rem; }
    .stage-end.stage-won .stage-end-title, .stage-end.stage-won .stage-flavor-text { color: var(--success); }
    .stage-end.stage-lost .stage-end-title, .stage-end.stage-lost .stage-flavor-text { color: var(--danger); }
    .stage-end .stage-flavor-text { border-left-color: currentColor; margin: 0.4rem 0; }
    .stage-end ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
    .stage-end .loot-line { color: var(--text-dim); }
    .stage-end .stage-end-final { color: var(--gold-bright); font-weight: bold; margin-top: 0.5rem; }
    .stage-end .loot-hero, .stage-end .loot-item, .stage-end .loot-item a { color: var(--text-strong); }
    body.image-drop-active main { outline: 3px dashed var(--gold); outline-offset: -6px; }
    th.sortable-th:hover { color: var(--gold-bright); }
    th.sortable-th[data-sort-dir="asc"]::after { content: " ▲"; }
    th.sortable-th[data-sort-dir="desc"]::after { content: " ▼"; }
    a.sort-link { color: inherit; text-decoration: none; }
    a.sort-link:hover, a.sort-link.active { color: var(--gold-bright); }

    /* Talente */
    .feat-req { font-size: var(--fs-sm); color: var(--text-dim); margin-top: 0.35rem; padding-top: 0.3rem; border-top: 1px dashed var(--border); }
    .feat-req-label { color: var(--gold); }
    .feat-team { font-size: var(--fs-xs); color: var(--text-dim); margin-top: 0.2rem; }
    .feat-req .req-met { color: var(--success); }
    .feat-req .req-missing { color: var(--danger); }
    .feat-owned { font-size: var(--fs-xs); color: var(--gold-bright); margin-top: 0.2rem; }
    .feat-locked { font-size: var(--fs-sm); color: var(--text-dim); }
    .feat-buy { display: flex; gap: 0.3rem; align-items: center; margin: 0; flex-wrap: wrap; }
    .feat-buy select { max-width: 14rem; }

    /* Wochenauftraege */
    .quest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; align-items: start; }
    .quest-card { margin: 0; border-left: 3px solid var(--border); }
    .quest-card.quest-leicht { border-left-color: var(--success); }
    .quest-card.quest-mittel { border-left-color: var(--gold); }
    .quest-card.quest-schwer { border-left-color: var(--danger); }
    .quest-card.quest-done { box-shadow: 0 0 0 1px var(--gold) inset; }
    .quest-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
    .quest-head h3 { margin: 0; }
    .quest-badge { font-size: var(--fs-xs); color: var(--text-dim); white-space: nowrap; }
    .quest-progress { height: 1.1rem; border: 1px solid var(--border); border-radius: 3px; }
    .quest-progress .xp-bar-text { line-height: 1.1rem; font-size: var(--fs-xs); }
    .profession-progress { max-width: 420px; margin: 0 0 0.8rem; }
    .quest-rewards { display: flex; flex-direction: column; gap: 0.35rem; }
    .quest-reward-row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
    .quest-reward-line { margin: 0.15rem 0 0 0.3rem; color: var(--text); }
    .quest-reward-preview { font-size: var(--fs-sm); color: var(--text-dim); margin: 0.5rem 0 0; }
    .quest-claimed { color: var(--gold-bright); margin: 0.5rem 0 0; }
    /* Taten & Werke (3.2.12, Wunsch Wolfgang): Karten wie die Dungeons, höchstens 3 nebeneinander, schmal 2, am Handy 1 */
    .tw-status { margin: 0 0 0.6rem; }
    .tw-waiting { color: var(--gold-bright); font-weight: bold; }
    .tw-head { margin: 1.3rem 0 0.5rem; }
    .tw-head-note { font-size: var(--fs-sm); font-weight: normal; color: var(--text-dim); }
    .tw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(15rem, calc((100% - 2rem) / 3)), 1fr)); gap: 1rem; align-items: stretch; }
    .sheet.tw-card { display: flex; flex-direction: column; gap: 0.35rem; margin: 0; min-width: 0; border: 1px solid var(--card-idle-border); border-color: var(--card-idle-border) !important; border-left: 4px solid var(--card-idle-border) !important; }
    .sheet.tw-card.quest-leicht { border-left-color: var(--success) !important; }
    .sheet.tw-card.quest-mittel { border-left-color: var(--gold) !important; }
    .sheet.tw-card.quest-schwer, .sheet.tw-card.quest-fluch { border-left-color: var(--danger) !important; }
    .sheet.tw-card.quest-taeglich { border-left-color: var(--info) !important; }
    .sheet.tw-card.quest-wettstreit { border-left-color: var(--gold-bright) !important; }
    .sheet.tw-card.tw-bonus { border-left-color: var(--gold-bright) !important; border-style: dashed; }
    .sheet.tw-card.tw-bonus.tw-card-done { border-style: solid; }
    .sheet.tw-card.tw-card-ready { border-color: var(--gold-bright) !important; border-width: 2px 2px 2px 4px; box-shadow: 0 0 12px color-mix(in srgb, var(--gold) 40%, transparent) !important; }
    .tw-card-head { display: flex; align-items: flex-start; gap: 0.5rem; }
    .tw-card-head h3 { margin: 0; font-size: var(--fs-lg); line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
    .tw-icon { font-size: var(--fs-lg); width: 1.4rem; line-height: 1.25; text-align: center; color: var(--gold); flex-shrink: 0; }
    .tw-badge { font-size: var(--fs-xs); color: var(--text-dim); }
    .tw-desc { font-size: var(--fs-sm); color: var(--text); margin: 0; }
    .tw-progress .quest-ranking { font-size: var(--fs-sm); }
    .tw-card-foot { margin-top: auto; padding-top: 0.2rem; }
    .tw-note { color: var(--text-dim); font-size: var(--fs-sm); margin: 0.3rem 0 0; }
    .tw-rewards { margin: 0.3rem 0 0; font-size: var(--fs-sm); }
    .tw-rewards summary { cursor: pointer; color: var(--text-dim); }
    .tw-choose { margin: 0.2rem 0 0; font-size: var(--fs-sm); }
    .tw-previous { margin-top: 1.5rem; }
    /* Sammeln (0.4.5.3): Zeit bis der Vorrat voll ist, Hinweis zum Regler */
    .supply-full { color: var(--text-dim); font-size: var(--fs-xs); white-space: nowrap; }
    .gather-cap-note { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 0.4rem; }
    /* erledigte Taten & Werke eines Abschnitts eingeklappt (0.4.5.3) */
    .tw-finished { margin-top: 0.6rem; }
    /* Karte als Baustein (Seitenschema S-1, 0.4.5.13): Abzeichen unten links, Lohn, Aktion bzw. Sperrgrund unten rechts */
    .ui-card-badges { margin-right: auto; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0.25rem; }
    .ui-card-badge { font-size: var(--fs-xs); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0 0.35rem; color: var(--text-dim); white-space: nowrap; }
    .ui-card-badge a { color: inherit; }
    .ui-card-reward { font-size: var(--fs-sm); color: var(--text-dim); }
    .ui-card-foot { margin-top: auto; padding-top: 0.2rem; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0.4rem; }
    .ui-card-foot form { margin: 0; }
    .ui-card-lock { font-size: var(--fs-sm); color: var(--text-dim); }
    .sheet.tw-card.ui-card-done { border-style: dashed !important; opacity: 0.85; }
    .sheet.tw-card.ui-card-locked { opacity: 0.75; }
    .tw-finished > summary { cursor: pointer; color: var(--text-soft); font-size: var(--fs-sm); margin-bottom: 0.4rem; }
    .tw-previous summary { cursor: pointer; font-size: var(--fs-lg); color: var(--gold); margin-bottom: 0.5rem; }
    .tw-wall summary { cursor: pointer; color: var(--gold); }
    .tw-trophies { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
    .tw-trophy { border: 1px solid var(--border); border-radius: 4px; padding: 0.15rem 0.45rem; font-size: var(--fs-sm); }
    .tw-trophy-gold { border-color: var(--medal-gold); }
    .tw-trophy-silber { border-color: var(--medal-silver); }
    .tw-trophy-bronze { border-color: var(--medal-bronze); }
    .tw-group-hint { margin: 1rem 0 0; }
    /* Ruhm-Shop 2.0 (v0.3.61): Kopf mit Rang und Fortschritt */
    .fame-progress { height: 0.55rem; border-radius: 999px; background: var(--field); border: 1px solid var(--card-border); overflow: hidden; max-width: 32rem; }
    .fame-progress > div { height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 60%, var(--bg)), var(--gold-bright)); }
    .fame-ladder { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; font-size: var(--fs-sm); }
    .fame-rank { padding: 0.1rem 0.45rem; border-radius: 999px; border: 1px solid var(--card-border); color: var(--text-dim); }
    .fame-rank.reached { color: var(--gold-bright); border-color: var(--gold-bright); }
    .fame-rank-sep { color: var(--text-dim); }
    /* Marktplatz › Verkaufen (0.4.4.3, Wunsch Wolfgang): Abschnitte als abgesetzte Leiste, Angelegtes mit Stern, ab 15 Zeilen eingeklappt */
    .sell-section { margin: var(--sp-5) 0 var(--sp-3); }
    .sell-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0 0 var(--sp-2); padding: 0.45rem 0.7rem; background: var(--panel-light); border: 1px solid var(--card-border); border-left: 4px solid var(--gold); border-radius: var(--r-sm); max-width: 63rem; box-sizing: border-box; }
    .sell-head-title { color: var(--gold-bright); }
    .sell-head-count { font-size: var(--fs-xs); color: var(--text-soft); border: 1px solid var(--card-border); border-radius: var(--r-pill); padding: 0 0.5rem; }
    .sell-head form { margin-left: auto; }
    .sell-star { color: var(--gold-bright); }
    .sell-more > summary { cursor: pointer; color: var(--gold); margin: var(--sp-1) 0; font-size: var(--fs-sm); }
    /* Marktplatz › Verkaufen (0.4.3.40): alle Abschnitte gleich breit, Spalten an derselben Stelle */
    @media (min-width: 769px) {
      .feat-table.sell-table { display: table; width: 63rem; max-width: 100%; table-layout: fixed; }
      /* 0.4.4.2 (Wunsch Wolfgang): Spalte „Gegenstand“ etwa halb so breit wie vorher; 0.4.4.22: 1,5rem an „Ausrüstungsplatz“ abgegeben,
         dessen Überschrift lief sonst in „Preis/Stück“ hinein. Die Breiten stehen an den Spalten (colgroup): die eingeklappte Tabelle
         („weitere Einträge“) hat den Kopf nur für Vorleser, ihre Spalten standen sonst gleich breit und damit versetzt. */
      .sell-table col:nth-child(1) { width: 26.5rem; }
      .sell-table col:nth-child(2) { width: 10.5rem; } .sell-table col:nth-child(3) { width: 7.5rem; } .sell-table col:nth-child(4) { width: 4.5rem; }
      .sell-table th { overflow-wrap: anywhere; hyphens: auto; }
      .sell-table col:nth-child(5) { width: 5rem; } .sell-table col:nth-child(6) { width: 9rem; } /* Häkchen + Knopf (0.4.4.21) */
    }
    @media (min-width: 769px) {
      .fame-table { display: table; table-layout: fixed; width: 100%; }
      .fame-table th:nth-child(1) { width: 16%; } .fame-table th:nth-child(3) { width: 8%; } .fame-table th:nth-child(4) { width: 8%; }
      .fame-table th:nth-child(5) { width: 8%; } .fame-table th:nth-child(6) { width: 8rem; } .fame-table th:nth-child(7) { width: 9.5rem; }
      .fame-table td:nth-child(4), .fame-table td:nth-child(5), .fame-table td:nth-child(7) { white-space: nowrap; }
      .fame-table td.fc .button { white-space: nowrap; }
    }
    /* Ruhm-Shop 3.0 (0.4.0.5): „gilt für“, Gekauftes, Porträtrahmen, Banner der Gruppe */
    .fame-scope { color: var(--text-dim); font-size: var(--fs-sm); }
    .fame-bought ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
    .fame-bought li { margin: 0.2rem 0; }
    .hero-portrait.frame-bronze { border: 4px solid var(--medal-bronze); }
    .hero-portrait.frame-silber { border: 4px solid var(--medal-silver); }
    .hero-portrait.frame-gold { border: 4px double var(--medal-gold); box-shadow: 0 0 10px color-mix(in srgb, var(--medal-gold) 55%, transparent); }
    .hero-portrait.frame-sterne { border: 5px double var(--gold-bright); box-shadow: 0 0 0 2px var(--info), 0 0 16px color-mix(in srgb, var(--gold-bright) 60%, transparent); }
    .frame-swatch { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 3px; vertical-align: middle; background: var(--field); }
    .frame-swatch.frame-bronze { border: 3px solid var(--medal-bronze); }
    .frame-swatch.frame-silber { border: 3px solid var(--medal-silver); }
    .frame-swatch.frame-gold { border: 3px double var(--medal-gold); }
    .frame-swatch.frame-sterne { border: 3px double var(--gold-bright); box-shadow: 0 0 0 1px var(--info); }
    .hero-portrait.frame-kristall { border: 4px solid var(--info); box-shadow: 0 0 12px color-mix(in srgb, var(--info) 60%, transparent); }
    .frame-swatch.frame-kristall { border: 3px solid var(--info); }
    /* Edelstein-Rahmen (0.4.4.45, nur Kristalle) */
    .hero-portrait.frame-smaragd { border: 4px solid var(--gem-emerald); box-shadow: 0 0 12px color-mix(in srgb, var(--gem-emerald) 60%, transparent); }
    .hero-portrait.frame-rubin { border: 4px solid var(--gem-ruby); box-shadow: 0 0 12px color-mix(in srgb, var(--gem-ruby) 60%, transparent); }
    .hero-portrait.frame-saphir { border: 4px solid var(--gem-sapphire); box-shadow: 0 0 12px color-mix(in srgb, var(--gem-sapphire) 60%, transparent); }
    .frame-swatch.frame-smaragd { border: 3px solid var(--gem-emerald); }
    .frame-swatch.frame-rubin { border: 3px solid var(--gem-ruby); }
    .frame-swatch.frame-saphir { border: 3px solid var(--gem-sapphire); }
    .group-hero-table tr.frame-smaragd { --gh-c: var(--gem-emerald); --gh-b: 4px solid var(--gem-emerald); }
    .group-hero-table tr.frame-rubin { --gh-c: var(--gem-ruby); --gh-b: 4px solid var(--gem-ruby); }
    .group-hero-table tr.frame-saphir { --gh-c: var(--gem-sapphire); --gh-b: 4px solid var(--gem-sapphire); }
    /* Großmeisterrahmen (Tranche 7, Teil 4a): nur verdient – doppelter Goldrand mit Edelstein-Schimmer */
    .hero-portrait.frame-grossmeister { border: 5px double var(--gold-bright); box-shadow: 0 0 0 2px var(--gem-ruby), 0 0 0 4px var(--gem-sapphire), 0 0 18px color-mix(in srgb, var(--gold-bright) 70%, transparent); }
    .frame-swatch.frame-grossmeister { border: 3px double var(--gold-bright); box-shadow: 0 0 0 1px var(--gem-ruby); }
    .group-hero-table tr.frame-grossmeister { --gh-c: var(--gold-bright); --gh-b: 5px double var(--gold-bright); }
    /* Porträt-Hintergründe (0.4.4.45): Kulisse im Innenrand zwischen Rahmen und Bild, nur aus Design-Farben */
    .bg-morgenrot { --backdrop: linear-gradient(160deg, color-mix(in srgb, var(--warning) 80%, var(--bg)), color-mix(in srgb, var(--elminthir) 75%, var(--bg))); }
    .bg-waelder { --backdrop: linear-gradient(160deg, color-mix(in srgb, var(--success) 45%, var(--bg)), color-mix(in srgb, var(--green) 80%, var(--bg))); }
    .bg-nebel { --backdrop: linear-gradient(180deg, color-mix(in srgb, var(--text-dim) 60%, var(--bg)), color-mix(in srgb, var(--info) 35%, var(--bg))); }
    .bg-sternennacht { --backdrop: radial-gradient(circle at 18% 22%, var(--text-strong) 0 1.5px, transparent 2.5px), radial-gradient(circle at 78% 30%, var(--gold-bright) 0 1.5px, transparent 2.5px), radial-gradient(circle at 60% 82%, var(--text-strong) 0 1px, transparent 2px), linear-gradient(180deg, color-mix(in srgb, var(--info) 30%, var(--tile-ink)), color-mix(in srgb, var(--q-episch) 35%, var(--tile-ink))); }
    .bg-polarlicht { --backdrop: linear-gradient(135deg, color-mix(in srgb, var(--success) 70%, var(--bg)), color-mix(in srgb, var(--info) 70%, var(--bg)) 50%, color-mix(in srgb, var(--q-episch) 70%, var(--bg))); }
    .hero-portrait.has-backdrop { padding: 10px; background: var(--backdrop); }
    .hero-portrait.small.has-backdrop { padding: 5px; }
    .gh-portrait.has-backdrop { padding: 5px; background: var(--backdrop); }
    .backdrop-swatch { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: var(--r-sm); vertical-align: middle; border: 1px solid var(--border); background: var(--backdrop); }
    .sheet.spell-always { border: 2px solid var(--gold); }
    .spell-tile.spell-tile-always { outline: 2px dashed var(--gold-bright); outline-offset: 1px; }
    .group-hero-table tr.frame-kristall { --gh-c: var(--info); --gh-b: 4px solid var(--info); }
    /* Gekaufter Porträtrahmen hebt die Zeile auf „Meine Gruppe“ hervor (0.4.0.21): Rand und leichter Schimmer im Ton des Rahmens */
    .group-hero-table tr.frame-bronze { --gh-c: var(--medal-bronze); --gh-b: 2px solid var(--medal-bronze); }
    .group-hero-table tr.frame-silber { --gh-c: var(--medal-silver); --gh-b: 2px solid var(--medal-silver); }
    .group-hero-table tr.frame-gold { --gh-c: var(--medal-gold); --gh-b: 4px double var(--medal-gold); }
    .group-hero-table tr.frame-sterne { --gh-c: var(--gold-bright); --gh-b: 4px double var(--gold-bright); }
    /* Rand rundherum als Schatten in den Zellen (0.4.1.18, Wunsch Wolfgang): Tabellenränder der Nachbarzeilen überdecken ihn nicht mehr */
    .group-hero-table tr.gh-frame { --gh-w: 2px; }
    .group-hero-table tr.frame-gold, .group-hero-table tr.frame-sterne, .group-hero-table tr.frame-kristall, .group-hero-table tr.frame-smaragd, .group-hero-table tr.frame-rubin, .group-hero-table tr.frame-saphir, .group-hero-table tr.frame-grossmeister { --gh-w: 3px; }
    .group-hero-table tr.gh-frame > td { background: color-mix(in srgb, var(--gh-c) 10%, transparent); box-shadow: inset 0 var(--gh-w) 0 var(--gh-c), inset 0 calc(-1 * var(--gh-w)) 0 var(--gh-c); }
    .group-hero-table tr.gh-frame > td:first-child { box-shadow: inset 0 var(--gh-w) 0 var(--gh-c), inset 0 calc(-1 * var(--gh-w)) 0 var(--gh-c), inset var(--gh-w) 0 0 var(--gh-c); }
    .group-hero-table tr.gh-frame > td:last-child { box-shadow: inset 0 var(--gh-w) 0 var(--gh-c), inset 0 calc(-1 * var(--gh-w)) 0 var(--gh-c), inset calc(-1 * var(--gh-w)) 0 0 var(--gh-c); }
    /* Plakette der Gruppe mit zwei Bannern (0.4.0.20, data/groupPlaque.ts): ersetzt ab Bannerstufe 1 den Seitentitel */
    .group-plaque { --banner-cloth: var(--danger-bg); --banner-trim: var(--gold); --plate-c: var(--gold); display: grid; grid-template-columns: 4.4rem minmax(0, 34rem) 4.4rem; justify-content: center; align-items: start; gap: 0.9rem; margin: 0 auto 1.1rem; }
    .gp-banner svg { display: block; width: 100%; height: auto; transform-origin: 50% 10%; animation: gp-sway 7s ease-in-out infinite; filter: drop-shadow(0 3px 4px color-mix(in srgb, var(--bg) 70%, transparent)); }
    .gp-banner-right svg { animation-delay: -3.5s; }
    @keyframes gp-sway { 0%, 100% { transform: rotate(-1.3deg); } 50% { transform: rotate(1.3deg); } }
    @media (prefers-reduced-motion: reduce) { .gp-banner svg { animation: none; } }
    .gp-plate { position: relative; margin-top: 1.8rem; text-align: center; padding: 0.9rem 1.4rem 0.8rem; border: 2px solid var(--plate-c); border-radius: var(--r-md);
      background: linear-gradient(180deg, color-mix(in srgb, var(--plate-c) 12%, var(--panel)), var(--panel));
      box-shadow: inset 0 0 0 4px var(--panel), inset 0 0 0 5px color-mix(in srgb, var(--plate-c) 55%, transparent), var(--shadow-card); }
    .gp-plate::before, .gp-plate::after { content: "◆"; position: absolute; top: 50%; transform: translateY(-50%); color: var(--plate-c); font-size: var(--fs-xs); line-height: 1; }
    .gp-plate::before { left: -0.42rem; }
    .gp-plate::after { right: -0.42rem; }
    .group-plaque h1.page-title { margin: 0; color: var(--gold); font-size: var(--fs-sm); letter-spacing: 0.24em; text-transform: uppercase; }
    .group-plaque h1.page-title::after { margin: 0.35rem auto 0; width: 12rem; }
    .group-plaque p.gp-name { margin: 0.3rem 0 0.35rem; color: var(--gold-bright); font-size: calc(var(--fs-h1) * 1.3); font-weight: bold; font-variant: small-caps; letter-spacing: 0.04em; line-height: 1.15; overflow-wrap: anywhere; }
    .gp-note { margin: 0.15rem 0 0; color: var(--text-dim); font-size: var(--fs-xs); }
    .group-plaque[data-banner-tier="koenig"] .gp-plate { box-shadow: inset 0 0 0 4px var(--panel), inset 0 0 0 5px color-mix(in srgb, var(--plate-c) 55%, transparent), var(--shadow-card), 0 0 18px color-mix(in srgb, var(--gold-bright) 35%, transparent); }
    /* Rahmen der Plakette (0.4.4.46): Farbe der Fassung; ohne Rahmen bleibt sie golden */
    [data-plate-frame="eisen"] { --plate-c: var(--medal-silver); }
    [data-plate-frame="bronze"] { --plate-c: var(--medal-bronze); }
    [data-plate-frame="smaragd"] { --plate-c: var(--gem-emerald); }
    [data-plate-frame="rubin"] { --plate-c: var(--gem-ruby); }
    [data-plate-frame="saphir"] { --plate-c: var(--gem-sapphire); }
    [data-plate-frame="sternenglanz"] { --plate-c: var(--gold-bright); }
    .group-plaque[data-plate-frame="sternenglanz"] .gp-plate { border: 4px double var(--plate-c); box-shadow: inset 0 0 0 4px var(--panel), inset 0 0 0 5px color-mix(in srgb, var(--info) 60%, transparent), var(--shadow-card), 0 0 0 2px color-mix(in srgb, var(--info) 45%, transparent), 0 0 22px color-mix(in srgb, var(--gold-bright) 45%, transparent); }
    .plate-swatch { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: var(--r-sm); vertical-align: middle; border: 2px solid var(--plate-c, var(--gold)); background: color-mix(in srgb, var(--plate-c, var(--gold)) 18%, var(--panel)); }
    /* Abzeichen im Chat (0.4.4.46) vor dem Namen */
    .chat-badge { margin-right: 0.25rem; cursor: default; }
    @media (max-width: 768px) {
      .group-plaque { grid-template-columns: 2.6rem minmax(0, 1fr) 2.6rem; gap: 0.4rem; }
      .gp-plate { margin-top: 1rem; padding: 0.7rem 0.6rem 0.6rem; }
      .group-plaque p.gp-name { font-size: var(--fs-h1); }
      .group-plaque h1.page-title::after { width: 8rem; }
    }
    .group-banner { display: inline-block; padding: 0.05rem 0.5rem; border-radius: var(--r-pill, 999px); border: 1px solid var(--gold); color: var(--gold-bright); font-size: var(--fs-sm); white-space: nowrap; }
    /* Kassenbuch der Gruppenkasse (v0.3.64) */
    .treasury-form { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.8rem; }
    .treasury-form input[type=text] { flex: 1; min-width: 12rem; max-width: 28rem; }
    .treasury-log td:last-child { overflow-wrap: anywhere; }
    /* Verfluchte Gegenstände (v0.3.63) */
    .inventory-cursed { color: var(--danger); }
    .inventory-cursed small { color: var(--text-dim); }
    .curse-box { border-color: var(--danger-bg); margin-bottom: 1rem; }
    .curse-box h3 { color: var(--danger); }
    /* Mietlinge als Karten (3.1.18) */
    .hireling-hire { margin-bottom: 0.8rem; }
    .hireling-hire > summary { cursor: pointer; font-weight: bold; color: var(--gold); padding: 0.3rem 0; }
    .hireling-progress { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
    .hireling-progress > span { display: block; height: 100%; background: var(--gold); }
    .hireling-progress-text { color: var(--text-dim); font-size: var(--fs-sm); }
    .hireling-bonus-title { color: var(--gold); font-size: var(--fs-sm); margin-top: 0.2rem; }
    .hireling-bonus { margin: 0; padding-left: 1.1rem; font-size: var(--fs-sm); }
    .hireling-next { color: var(--text-dim); font-size: var(--fs-sm); }
    .hireling-meta { color: var(--text-dim); font-size: var(--fs-sm); }
    /* Mietlinge als Karten des Bausteins (Seitenschema B, 0.4.5.13): ruhende gestrichelt, der Hinweis im Abzeichen in Warnfarbe */
    .sheet.tw-card.hireling-resting { border-style: dashed !important; }
    .hireling-rest-note { color: var(--warning); }
    .ui-card-badge > .premium-tag { border: 0; padding: 0; }
    .hireling-hire-form { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0.4rem; margin: 0; }
    .premium-tag { border: 1px solid var(--gold); color: var(--gold-bright); border-radius: 999px; padding: 0 0.45rem; font-size: var(--fs-xs); vertical-align: middle; }
    .hireling-list { margin: 0.3rem 0; padding-left: 1.2rem; }
    .curse-row { border-top: 1px solid var(--border); padding: 0.5rem 0; }
    /* Forschungsbaum (3.1.74, Civ-Baum): Zeitalter als Spaltenbänder, ein Thema je Zeile, Linien hinter den Karten */
    .rt-scroll { overflow: auto; max-width: 100%; padding: var(--sp-2) 0 var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-alt); }
    /* Forschung (0.4.4.21): höchstens so hoch wie das Fenster, damit die Leiste zum Verschieben immer zu sehen ist */
    .rt-scroll { max-height: calc(100vh - 8rem); }
    [data-drag-scroll] { cursor: grab; }
    [data-drag-scroll].is-dragging { cursor: grabbing; user-select: none; }
    .rt-head { display: grid; margin: 0 var(--sp-3) var(--sp-2); }
    .rt-era { text-align: center; color: var(--gold); font-weight: bold; border-bottom: 2px solid var(--gold); padding-bottom: 0.15rem; }
    .rt-era span { color: var(--text-dim); font-weight: normal; font-size: var(--fs-xs); }
    .rt-tree { position: relative; margin: 0 var(--sp-3); }
    .rt-lines { position: absolute; left: 0; top: 0; pointer-events: none; }
    .rt-lines path { fill: none; stroke: var(--border); stroke-width: 2; }
    .rt-lines path.rt-line-done { stroke: var(--gold); }
    .rt-grid { display: grid; position: relative; }
    /* Rahmen dicker (3.2.2, Wunsch Wolfgang): gesperrt 2 px, erforscht/erforschbar/läuft 3 px */
    .rt-node { display: flex; flex-direction: column; gap: 0.15rem; overflow: hidden; border: 2px solid var(--card-idle-border); border-radius: var(--r-md); background: var(--panel); padding: 0.35rem 0.5rem; font-size: var(--fs-sm); box-shadow: var(--shadow-card); }
    .rt-node.rt-done { border: 3px solid var(--gold); }
    .rt-node.rt-open { border: 3px solid var(--success); }
    /* freigeschaltet, aber Zutaten oder Gold fehlen (0.4.5.3) */
    .rt-node.rt-ready { border: 3px dashed var(--success); }
    .rt-node.rt-run { border: 3px dashed var(--gold-bright); }
    .rt-node.rt-locked { color: var(--text-dim); }
    .rt-name { font-size: var(--fs-md); margin: 0; line-height: 1.2; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
    .rt-node.rt-locked .rt-name { color: var(--text-soft); }
    .rt-meta { color: var(--text-dim); font-size: var(--fs-xs); flex-shrink: 0; }
    .rt-recipes { list-style: none; margin: 0.1rem 0; padding: 0; flex: 1; min-height: 0; overflow: hidden; }
    .rt-recipes li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
    .rt-recipes li.rt-unknown { color: var(--text-dim); font-style: italic; }
    .rt-recipes .icon-name img { width: 16px !important; height: 16px !important; }
    /* Zutaten ganz, nie abgeschnitten (0.4.4.13, Feedback: „2× Spinnensei…“ – Spinnenseide oder Spinnenseidenstoff?): jede Zutat in einer
       Zeile; die Rezeptliste darüber gibt dafür Platz ab */
    .rt-cost { font-size: var(--fs-xs); color: var(--text-dim); flex-shrink: 0; line-height: 1.3; }
    .rt-cost > span { display: block; }
    .rt-miss { color: var(--danger); }
    .rt-foot { display: flex; align-items: center; gap: 0.3rem; min-height: 1.7rem; font-size: var(--fs-xs); flex-shrink: 0; }
    .rt-foot .rt-tag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
    .rt-foot form { margin: 0; flex-shrink: 0; }
    .rt-foot .rt-debug { margin-left: auto; }
    .rt-price { color: var(--text-dim); font-size: var(--fs-xs); white-space: nowrap; flex-shrink: 0; }
    .rt-tag { white-space: nowrap; color: var(--gold); }
    .rt-why { color: var(--text-soft); cursor: help; }
    .rt-summary { margin: var(--sp-2) 0; }
    .rt-legend { font-size: var(--fs-sm); color: var(--text-dim); }
    /* Zeilen in den Zuständen der Bäume (Seitenschema C, 0.4.5.14): Talente, Pfad der Meisterschaft – Randstrich links wie die Legende */
    tr.rt-row > td:first-child { border-left: 3px solid var(--card-idle-border); }
    tr.rt-row-done > td:first-child { border-left-color: var(--gold); }
    tr.rt-row-open > td:first-child { border-left-color: var(--success); }
    tr.rt-row-ready > td:first-child { border-left: 3px dashed var(--success); }
    tr.rt-row-locked > td:first-child strong { color: var(--text-soft); }
    .rt-key { display: inline-block; padding: 0 0.4rem; border-radius: var(--r-sm); border: 2px solid var(--card-idle-border); }
    .rt-key.rt-done { border: 3px solid var(--gold); color: var(--gold); }
    .rt-key.rt-open { border: 3px solid var(--success); color: var(--success); }
    .rt-key.rt-ready { border: 3px dashed var(--success); color: var(--text-soft); }
    .rt-tabs-toggle { font-size: var(--fs-sm); margin: -0.4rem 0 0.6rem; }
    .research-hint { font-size: var(--fs-sm); color: var(--text-soft); }
    @media (max-width: 768px) {
      .rt-scroll { overflow: visible; border: none; background: none; padding: 0; max-height: none; cursor: auto; }
      .rt-head, .rt-lines { display: none; }
      .rt-tree { width: auto !important; height: auto !important; margin: 0; }
      .rt-grid { display: flex; flex-direction: column; gap: var(--sp-2); }
      .rt-node { min-height: 0; }
    }
    /* Bestiarium-Sammlung: Steckbrief je besiegter Art (3.1.74) */
    .bc-kind summary { cursor: pointer; }
    /* Blöcke (3.2.6, Wunsch Wolfgang): höchstens 6 Arten sichtbar, der Rest hinter „Weitere“; Liste, Fuß und Belohnungen mit fester
       Mindesthöhe und einzeiligen Zeilen – eingeklappt sind alle Blöcke gleich groß. Weiß = jetzt erforschbar, grau = gerade nicht. */
    .bc-sheets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    @media (max-width: 1100px) { .bc-sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
    @media (max-width: 768px) { .bc-sheets { grid-template-columns: minmax(0, 1fr); } }
    .bc-card { display: flex; flex-direction: column; --bc-line: 1.75em; }
    .bc-list { list-style: none; margin: 0; padding: 0; }
    .bc-card > .bc-list { min-height: calc(6 * var(--bc-line)); }
    .bc-card > .bc-list:empty { min-height: 0; } /* noch keine Art besiegt: keine leere Fläche mitten in der Karte (0.4.4.127) */
    .bc-list > li { min-height: var(--bc-line); }
    .bc-list > li > .bc-kind > summary { line-height: var(--bc-line); padding-block: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .bc-list > li.bc-can > .bc-kind > summary { color: var(--text-strong); }
    .bc-list > li.bc-cannot > .bc-kind > summary, .bc-list > li.bc-cannot > .bc-kind > summary .bc-count { color: var(--text-dim); }
    .bc-foot { min-height: 2.4em; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; margin: 0.2rem 0 0; }
    .bc-foot > .bc-more { flex: 0 0 auto; }
    .bc-foot > .bc-more[open] { flex: 1 1 100%; }
    .bc-more > summary { list-style: none; display: inline-block; margin: 0; padding: 0.3rem 0.7rem; font-size: var(--fs-sm); }
    .bc-more > summary::-webkit-details-marker { display: none; }
    /* aufgeklappt: Knopf weg, Liste läuft weiter, „Weniger“ und „???“ ganz unten (das äußere „???“ nur zugeklappt) */
    .bc-more[open] > summary, .bc-more[open] + .bc-unknown { display: none; }
    .bc-foot-open { margin: 0.2rem 0 0; min-height: 0; }
    .bc-foot-open > .button { margin: 0; }
    /* Abschied und Datenschutz-Versprechen auf „Konto löschen“ (3.2.6) */
    .farewell { display: flex; gap: var(--sp-4); align-items: flex-start; margin: 0 0 var(--sp-4); }
    .farewell .tutorial-portrait { flex: none; }
    .farewell-lead { font-size: var(--fs-xl); color: var(--gold-bright); font-weight: bold; margin: 0 0 var(--sp-2); }
    .farewell-quote { font-style: italic; color: var(--text-soft); border-left: 3px solid var(--gold); padding-left: var(--sp-3); }
    .farewell-quote span { font-style: normal; color: var(--text-dim); }
    .farewell-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
    .farewell-actions .button { margin: 0; }
    .privacy-promise { border: 1px solid var(--card-border); border-radius: var(--r-md); background: var(--panel); padding: var(--sp-3) var(--sp-4); margin: 0 0 var(--sp-4); }
    .privacy-promise h2 { margin-top: var(--sp-2); }
    .privacy-promise ul { margin: 0; padding-left: 1.2rem; }
    .privacy-promise li { margin: 0.3rem 0; }
    .eu-badge { display: inline-flex; align-items: center; gap: var(--sp-2); border: 1px solid var(--gold); border-radius: var(--r-pill); padding: 0.3rem 0.9rem 0.3rem 0.35rem; }
    .eu-badge strong { display: block; color: var(--gold-bright); letter-spacing: 0.04em; }
    .eu-badge small { display: block; color: var(--text-soft); font-size: var(--fs-xs); }
    .eu-stars { width: 2.6rem; height: 2.6rem; flex: none; }
    .eu-stars .eu-bg { fill: var(--info); }
    .eu-stars .eu-star { fill: var(--gold-bright); }
    @media (max-width: 768px) { .farewell { flex-direction: column; align-items: center; text-align: center; } .farewell-actions { justify-content: center; } .farewell-quote { text-align: left; } }
    .bc-unknown { color: var(--text-dim); font-size: var(--fs-sm); }
    .bc-card > .bc-bottom { margin-top: auto; min-height: calc(4 * 1.45em + 0.9rem); }
    .bc-rewards li { line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .bc-profile { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.6rem; margin: 0.25rem 0 0.4rem; font-size: var(--fs-sm); }
    .bc-profile dt { color: var(--text-dim); }
    .bc-profile dd { margin: 0; }
    /* Bestiarium-Sammlung (v0.3.81): Belohnungen je Karte */
    .bc-rewards { list-style: none; margin: 0.5rem 0 0; padding: 0.4rem 0 0; border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-dim); }
    .bc-rewards li.bc-done { color: var(--gold); }
    /* Bestiarium-Forschung (3.2.4): Erkenntnisse je Art */
    .bc-insights { margin: 0.3rem 0 0.6rem; padding: 0.4rem 0.6rem; border-left: 3px solid var(--border); background: var(--surface-alt); border-radius: var(--r-sm); }
    .bc-insights h4 { margin: 0 0 0.3rem; font-size: var(--fs-sm); }
    /* Erkenntnisse (0.4.3.40, Wunsch Wolfgang mit Bild): Abschnitte Schwäche/Vorteil, Punkte mit Wirkung in Grün, Bedarf und Kosten darunter */
    .bc-sides { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
    .bc-side { margin: 0 0 0.3rem; }
    .bc-side-head { font-weight: bold; color: var(--text-strong); }
    .bc-ins-list { list-style: disc; margin: 0.1rem 0 0; padding-left: 1.6rem; }
    .bc-ins { margin: 0.1rem 0 0.35rem; }
    .bc-ins-effect, .bc-ok { color: var(--success); }
    .bc-bad { color: var(--danger); }
    .bc-member { color: var(--info); }
    .bc-hero { color: var(--gold-bright); }
    .bc-ins-note, .bc-ins-text, .bc-lore, .bc-cost, .bc-count { color: var(--text-dim); font-size: var(--fs-sm); }
    .bc-ins-hidden { font-style: italic; margin-top: 0.2rem; }
    .bc-need { margin: 0.6rem 0 0.2rem; font-size: var(--fs-sm); }
    .bc-need-line { margin: 0.15rem 0 0 1.2rem; }
    .bc-lore { margin: 0.3rem 0; }
    .bc-research { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin: 0.3rem 0 0; }
    .bc-time { font-size: var(--fs-sm); color: var(--text-soft); white-space: nowrap; }
    .bc-running { margin: 0 0 0.8rem; }
    .curse-row form { margin: 0.2rem 0.3rem 0.2rem 0; }
    /* Chat-Leiste (v0.3.61 Gruppenchat, v0.3.62 Direktchats; Wunsch Wolfgang: wie der alte Facebook-Chat als Leiste unten rechts) */
    /* Platz unter dem Seiteninhalt, damit die Leiste nichts verdeckt (v0.3.77, Meldung Wolfgang: Chat lag am Handy über „Weiter →“).
       !important, weil die Handy-Regeln das Polster von main mit !important setzen. */
    body.has-chat main { padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px)) !important; }
    .chat-dock { position: fixed; right: 1rem; bottom: 0; z-index: 900; display: flex; flex-direction: row-reverse; align-items: flex-end; gap: 0.5rem; font-size: var(--fs-sm); pointer-events: none; }
    .chat-dock[hidden] { display: none; }
    .chat-hide, .chat-mini { pointer-events: auto; font: inherit; cursor: pointer; background: var(--panel-light); color: var(--text); border: 1px solid var(--border); border-bottom: none; border-radius: 6px 6px 0 0; box-shadow: 0 -2px 8px rgba(0,0,0,0.35); }
    .chat-hide { min-width: 1.8rem; min-height: 2.2rem; padding: 0 0.4rem; color: var(--text-soft); }
    .chat-hide:hover, .chat-mini:hover { border-color: var(--gold); color: var(--gold-bright); }
    .chat-mini { display: none; align-items: center; gap: 0.4rem; padding: 0.45rem 0.7rem; }
    .chat-mini.has-unread { border-color: var(--gold); color: var(--gold-bright); }
    .chat-dock.chat-dock-mini > :not(.chat-mini) { display: none; }
    .chat-dock.chat-dock-mini .chat-mini { display: inline-flex; }
    .chat-win { pointer-events: auto; width: 12rem; display: flex; flex-direction: column; }
    .chat-win.open { width: 19rem; box-shadow: 0 -2px 12px rgba(0,0,0,0.45); }
    .chat-list-win { width: 9rem; }
    .chat-list-win.open { width: 15rem; }
    .chat-tab { display: flex; align-items: center; gap: 0.45rem; width: 100%; padding: 0.5rem 0.7rem; background: var(--panel-light); color: var(--text); border: 1px solid var(--border); border-bottom: none; border-radius: 6px 6px 0 0; cursor: pointer; font: inherit; text-align: left; box-shadow: 0 -2px 8px rgba(0,0,0,0.35); }
    .chat-tab:hover { color: var(--gold-bright); }
    .chat-tab-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: bold; }
    .chat-tab-sub { font-weight: normal; color: var(--text-dim); }
    .chat-badge { display: none; min-width: 1.35rem; padding: 0 0.35rem; border-radius: 0.7rem; background: var(--badge-alert-bg); color: var(--badge-text); font-size: var(--fs-xs); line-height: 1.35rem; text-align: center; font-weight: bold; }
    .chat-win.has-unread .chat-badge, .chat-badge.chat-badge-on { display: inline-block; }
    .chat-win.has-unread .chat-tab { border-color: var(--gold); color: var(--gold-bright); }
    .chat-x { color: var(--text-dim); padding: 0 0.15rem; font-size: var(--fs-md); line-height: 1; }
    .chat-x:hover { color: var(--gold-bright); }
    .chat-dot { flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--text-dim); }
    .chat-dot.on { background: var(--success); box-shadow: 0 0 4px var(--success); }
    .chat-dot.on.away { background: var(--caution); box-shadow: 0 0 4px var(--caution); }
    .chat-icon { flex: none; }
    .chat-panel { display: none; flex-direction: column; height: 22rem; max-height: calc(100vh - 6rem); background: var(--panel); border: 1px solid var(--border); border-bottom: none; border-radius: 6px 6px 0 0; }
    .chat-win.open .chat-panel { display: flex; }
    .chat-win.open .chat-tab { display: none; }
    .chat-head { cursor: pointer; display: flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.6rem 0.45rem 0.7rem; background: var(--panel-light); border-bottom: 1px solid var(--border); border-radius: 6px 6px 0 0; color: var(--gold); font-weight: bold; }
    .chat-head-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .chat-head button { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: var(--fs-md); line-height: 1; padding: 0 0.2rem; }
    .chat-head button:hover { color: var(--gold-bright); }
    .chat-head .chat-bell { font-size: var(--fs-sm); }
    .chat-log { flex: 1; overflow-y: auto; padding: 0.5rem 0.6rem; display: flex; flex-direction: column; gap: 0.25rem; }
    .chat-empty, .chat-people-empty { color: var(--text-dim); font-style: italic; text-align: center; margin: auto 0; }
    .chat-people-empty { margin: 0.4rem 0.7rem; text-align: left; font-size: var(--fs-sm); }
    .chat-msg { max-width: 85%; align-self: flex-start; }
    .chat-msg.own { align-self: flex-end; text-align: right; }
    .chat-meta { font-size: var(--fs-xs); color: var(--text-dim); margin-top: 0.3rem; }
    .chat-meta b { color: var(--gold); font-weight: normal; }
    .chat-meta .chat-name-link { color: inherit; text-decoration: none; }
    .chat-meta .chat-name-link:hover, .chat-meta .chat-name-link:focus-visible { text-decoration: underline; }
    .chat-text { display: inline-block; text-align: left; padding: 0.3rem 0.55rem; border-radius: 10px; background: var(--panel-light); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35; }
    .chat-msg.own .chat-text { background: color-mix(in srgb, var(--gold) 16%, var(--panel-light)); }
    /* Gegenstände zeigen (3.1.35): Teilen-Symbol als Maske in der Schriftfarbe, Knöpfe nur mit sichtbarer Chat-Leiste */
    .share-icon { display: inline-block; width: 0.95em; height: 0.95em; flex: none; vertical-align: -0.1em; background: currentColor; -webkit-mask: url(/assets/share.png?v=51c506b169) center / contain no-repeat; mask: url(/assets/share.png?v=51c506b169) center / contain no-repeat; }
    .share-btn { display: none; font: inherit; background: none; border: none; min-width: 24px; min-height: 24px; padding: 0.1rem 0.25rem; margin-left: 0.25rem; color: var(--text-dim); cursor: pointer; vertical-align: middle; line-height: 1; }
    .share-btn:hover, .share-btn:focus-visible { color: var(--gold-bright); }
    body.has-chat .share-btn { display: inline-block; }
    .chat-item { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--gold-bright); font-weight: bold; text-decoration: none; }
    .chat-item:hover { text-decoration: underline; }
    .chat-item-comment { margin-top: 0.15rem; }
    .share-pick-back { position: fixed; inset: 0; z-index: 1300; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
    .share-pick { background: var(--panel); border: 1px solid var(--gold); border-radius: 8px; padding: 0.9rem; width: min(24rem, 100%); max-height: 85vh; overflow-y: auto; display: flex; flex-direction: column; gap: 0.4rem; box-shadow: 0 6px 24px rgba(0,0,0,0.6); }
    .share-pick-head { color: var(--gold-bright); font-weight: bold; }
    .share-pick-text { font: inherit; font-size: var(--fs-sm); padding: 0.35rem 0.45rem; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 4px; resize: vertical; }
    .share-pick .button { text-align: left; }
    .shared-head { color: var(--gold-bright); margin-bottom: 0.3rem; }
    .shared-comment { font-style: italic; margin-bottom: 0.5rem; white-space: pre-wrap; }
    /* Reaktionen (v0.3.80, Wunsch Wolfgang): nur 👍♥️😂😮😢🥲, sichtbar ist nur die Zahl */
    .chat-line { display: flex; align-items: center; gap: 0.2rem; }
    .chat-msg.own .chat-line { justify-content: flex-end; }
    .chat-react-btn { flex: none; background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: var(--fs-md); line-height: 1; padding: 0 0.15rem; opacity: 0; transition: opacity 0.15s; }
    .chat-msg:hover .chat-react-btn, .chat-react-btn:focus-visible { opacity: 0.85; }
    .chat-react-btn:hover { color: var(--gold-bright); }
    .chat-react-btn, .chat-react-chip, .chat-react-choice { -webkit-tap-highlight-color: transparent; }
    .chat-react-btn:focus:not(:focus-visible), .chat-react-chip:focus:not(:focus-visible), .chat-react-choice:focus:not(:focus-visible) { outline: none; }
    @media (hover: none) { .chat-react-btn { opacity: 0.45; } }
    .chat-readonly-win .chat-react-btn { display: none; }
    .chat-reacts { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-top: 0.15rem; }
    .chat-reacts:empty { display: none; }
    .chat-msg.own .chat-reacts { justify-content: flex-end; }
    .chat-react-chip { font: inherit; font-size: var(--fs-xs); line-height: 1.3; padding: 0 0.4rem; border-radius: 0.7rem; border: 1px solid var(--border); background: var(--panel-light); color: var(--text); cursor: pointer; }
    .chat-react-chip.mine { border-color: var(--gold); color: var(--gold-bright); }
    .chat-readonly-win .chat-react-chip { cursor: default; }
    .chat-react-pick { display: flex; gap: 0.1rem; width: max-content; margin-top: 0.2rem; padding: 0.15rem 0.35rem; background: var(--panel-light); border: 1px solid var(--border); border-radius: 1rem; box-shadow: 0 2px 6px rgba(0,0,0,0.35); }
    .chat-msg.own .chat-react-pick { margin-left: auto; }
    .chat-react-choice { background: none; border: none; cursor: pointer; font-size: var(--fs-lg); line-height: 1.2; padding: 0.05rem 0.15rem; border-radius: 0.5rem; transition: transform 0.1s; }
    .chat-react-choice:hover { transform: scale(1.25); }
    .chat-react-choice.mine { background: color-mix(in srgb, var(--gold) 25%, transparent); }
    .chat-day { align-self: center; font-size: var(--fs-xs); color: var(--text-dim); margin: 0.4rem 0 0.1rem; }
    .chat-form { display: flex; gap: 0.35rem; padding: 0.45rem; border-top: 1px solid var(--border); margin: 0; }
    .chat-form[hidden], .chat-readonly[hidden] { display: none; }
    .chat-form textarea { flex: 1; min-width: 0; resize: none; height: 2.3rem; max-height: 6rem; font: inherit; font-size: var(--fs-sm); padding: 0.35rem 0.45rem; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 4px; }
    .chat-form button { padding: 0.3rem 0.6rem; }
    .chat-readonly { color: var(--text-dim); font-size: var(--fs-sm); font-style: italic; padding: 0.5rem 0.6rem; border-top: 1px solid var(--border); }
    .chat-error { color: var(--danger); font-size: var(--fs-xs); padding: 0 0.6rem 0.3rem; display: none; }
    .chat-error.show { display: block; }
    .chat-people { flex: 1; overflow-y: auto; padding: 0.2rem 0 0.4rem; }
    .chat-people-head { font-size: var(--fs-xs); color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; padding: 0.5rem 0.7rem 0.15rem; }
    .chat-person { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.35rem 0.7rem; background: none; border: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
    .chat-person:hover { background: var(--hover, rgba(255,255,255,0.06)); color: var(--gold-bright); }
    .chat-person-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .chat-person-group .chat-person-name { color: var(--gold); font-weight: bold; }
    .chat-person-muted { font-size: var(--fs-xs); opacity: 0.7; }
    @media (max-width: 768px) {
      .chat-dock { left: 0.5rem; right: 0.5rem; gap: 0.3rem; }
      .chat-dock.chat-dock-mini { left: auto; }
      .chat-win, .chat-list-win { width: auto; min-width: 0; flex: 0 1 auto; }
      .chat-tab { padding: 0.45rem 0.55rem; max-width: 9rem; gap: 0.35rem; }
      .chat-win.open, .chat-list-win.open { position: fixed; left: 0.5rem; right: 0.5rem; bottom: 0; width: auto; z-index: 901; }
      .chat-panel { height: 65vh; }
      body.has-chat main { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)) !important; }
    }
    /* Zweispaltig (v0.3.58, Wunsch Wolfgang): links Taten & Werke, rechts Tiefen und Artefakte; schmal untereinander */
    /* Rechte Spalte 26rem (0.4.0.13, Wunsch Wolfgang: „Karte etwas breiter, bei 1920 × 1080 kein Problem“) – die Tabellen der
       Tiefen passen ganz hinein und scrollen nicht mehr in sich, lange Gruppennamen brechen um. */
    .tw-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 26rem); gap: 1.5rem; align-items: start; }
    .tw-layout > .tw-col > .tw-head:first-child { margin-top: 0; }
    .tw-side { display: flex; flex-direction: column; gap: 1rem; }
    .tw-panel .tw-head { margin: 0 0 0.4rem; }
    .tw-fold { border-top: 1px solid var(--border); padding: 0.35rem 0; }
    .tw-fold > summary { cursor: pointer; }
    .tw-fold-body { padding: 0.3rem 0 0.2rem 0.9rem; }
    .tw-steps { list-style: none; padding-left: 0.2rem; font-size: var(--fs-sm); margin: 0.3rem 0; }
    .tw-depth-table { margin: 0.3rem 0 0.2rem; font-size: var(--fs-sm); }
    .feat-table.tw-depth-table { display: table; width: 100%; overflow: visible; }
    .feat-table.tw-depth-table th, .feat-table.tw-depth-table td { padding: 0.3rem 0.4rem; }
    .feat-table.tw-depth-table th { white-space: nowrap; }
    .feat-table.tw-depth-table td { overflow-wrap: anywhere; }
    .tw-panel tr.tw-own td { color: var(--gold-bright); font-weight: bold; }
    .tw-panel .tw-subhead { margin: 0.6rem 0 0.2rem; font-size: var(--fs-md); }
    /* Verwaltung (3.2.16): Kennzahlen-Karten, Suchformular */
    .admin-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--sp-3); margin: var(--sp-3) 0; }
    .admin-stat-card { margin: 0; }
    .admin-stat-card th { text-align: left; font-weight: normal; color: var(--text-dim); }
    .admin-level-chip { display: inline-block; margin: 0 0.4rem 0.3rem 0; padding: 0.1rem 0.5rem; border: 1px solid var(--border); border-radius: var(--r-pill); font-size: var(--fs-sm); }
    .admin-search-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: end; margin-bottom: 0.6rem; }
    .admin-search-form label { display: flex; flex-direction: column; font-size: var(--fs-sm); color: var(--text-dim); gap: 0.15rem; }
    .admin-search-form input, .admin-search-form select { min-width: 9rem; }
    /* Solo – Klassenaktivitäten (0.4.1.20): Etappe mit Wegen als Karten, Verlauf mit Farbe nach Ergebnis, Angebot als Raster */
    .solo-run, .solo-reward { margin-bottom: var(--sp-4); }
    .solo-intro { color: var(--text-soft); font-style: italic; }
    .solo-stage-title { margin: var(--sp-3) 0 var(--sp-1); }
    .solo-paths, .solo-offers, .solo-origins { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--sp-3); margin: var(--sp-3) 0; }
    .solo-path, .solo-offer, .solo-origin { margin: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
    .solo-origin { flex-direction: row; align-items: flex-start; cursor: pointer; }
    .solo-path-foot, .solo-offer > .solo-form:last-child { margin-top: auto; }
    .solo-path-foot .solo-form { display: block; } /* Wege-Knöpfe gleich breit, egal wie lang der Fertigkeitsname ist (0.4.5.22) */
    .solo-path-foot .solo-form .button { display: block; width: 100%; text-align: center; box-sizing: border-box; }
    .solo-path.locked { color: var(--text-dim); }
    .solo-offer.solo-done { border-style: dashed; }
    .solo-form { display: inline-block; margin: 0; }
    .solo-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
    .solo-badge { display: inline-block; padding: 0.05rem 0.45rem; border: 1px solid var(--border); border-radius: var(--r-pill); font-size: var(--fs-xs); color: var(--text-soft); }
    .solo-badge.solo-class, .solo-badge.solo-r-meister { border-color: var(--gold); color: var(--gold-bright); }
    .solo-badge.solo-r-erfolg { border-color: var(--success); color: var(--success); }
    .solo-badge.solo-r-fehlschlag { border-color: var(--warning); color: var(--warning); }
    .solo-badge.solo-r-patzer { border-color: var(--danger); color: var(--danger); }
    .solo-warn { color: var(--warning); font-size: var(--fs-sm); margin: 0; }
    .solo-roll { font-size: var(--fs-sm); color: var(--text-dim); }
    .solo-log { list-style: none; padding: 0; margin: var(--sp-3) 0; }
    .solo-log > li { border-left: 3px solid var(--border); padding: 0.2rem 0 0.3rem 0.7rem; margin-bottom: 0.5rem; }
    .solo-log > li.solo-r-erfolg { border-left-color: var(--success); }
    .solo-log > li.solo-r-meister { border-left-color: var(--gold); }
    .solo-log > li.solo-r-fehlschlag { border-left-color: var(--warning); }
    .solo-log > li.solo-r-patzer { border-left-color: var(--danger); }
    .solo-log p { margin: 0.25rem 0; }
    /* Natürliche 1 bzw. 20 im Verlauf (0.4.3.35): Würfel und Erklärung, dass die 1 immer misslingt und die 20 immer gelingt */
    .solo-nat { display: flex; align-items: flex-start; gap: var(--sp-2); margin: 0.35rem 0; padding: 0.4rem 0.6rem; background: var(--surface-alt); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: var(--r-sm); font-size: var(--fs-sm); }
    .solo-nat .d20 { flex-shrink: 0; width: 3rem; height: 3rem; }
    .solo-nat-1 { border-left-color: var(--danger); }
    .solo-nat-1 .d20, .solo-nat-1 strong { color: var(--danger); }
    .solo-nat-20 { border-left-color: var(--gold); }
    .solo-nat-20 .d20, .solo-nat-20 strong { color: var(--gold-bright); }
    .solo-notes { font-size: var(--fs-sm); color: var(--info); margin: 0.2rem 0 0; padding-left: 1.1rem; }
    .solo-list { margin: 0.2rem 0; padding-left: 1.1rem; font-size: var(--fs-sm); }
    /* Fraktionsränge (0.4.4.106, Plan 9.7): was der Ruf bringt – erreichte Ränge hell, die übrigen gedämpft */
    .solo-rank-rewards { list-style: none; padding-left: 0; }
    .solo-rank-rewards li { color: var(--text-dim); margin: 0.2rem 0; }
    .solo-rank-rewards li.reached { color: var(--text); }
    .solo-cap-bar { height: 0.5rem; background: var(--surface-alt); border-radius: var(--r-pill); overflow: hidden; }
    .solo-cap-bar > span { display: block; height: 100%; background: var(--gold); }
    /* Ruf je Fraktion als Balken (0.4.3.12): grün positiv, gelb neutral, rot negativ */
    .solo-rep-bar { display: block; height: 0.45rem; margin-top: 0.2rem; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-pill); overflow: hidden; }
    .solo-rep-bar > span { display: block; height: 100%; }
    .solo-rep-positiv > span { background: var(--success); }
    .solo-rep-neutral > span { background: var(--caution); }
    .solo-rep-negativ > span { background: var(--danger); }
    @media (max-width: 1100px) {
      .tw-layout { grid-template-columns: minmax(0, 1fr); }
    }
    @media (max-width: 768px) {
      .tw-cards { grid-template-columns: minmax(0, 1fr); }
    }

    /* Eigenschaften (WoD-Stil): Porträt groß links, Attribute mit −/+ rechts daneben, Heldenwerte darunter in voller Breite
       (3.1.28, Wunsch Wolfgang: vorher stand alles nebeneinander und rutschte beim Aufklappen der RK-Zusammensetzung unter die
       Attribute). Die Heldenwerte haben feste Spalten, die Zusammensetzung klappt nur nach unten auf. */
    /* Charakterbogen auf „Eigenschaften“ (0.4.3.12, engine/characterSheet.ts): Aufbau wie Seite 1 des Papierbogens, Farben aus dem Design */
    .eig-view-switch { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
    .eig-views[data-view="bogen"] .eig-view-liste, .eig-views[data-view="liste"] .eig-view-bogen { display: none; }
    .cs-sheet { --cs-tag-w: 8.4rem; --cs-total-w: 3.6rem; font-family: Georgia, 'Times New Roman', serif; background: var(--panel); border: 1px solid var(--card-border); border-radius: var(--r-md); padding: var(--sp-4); }
    .cs-sheet [data-tip] { cursor: help; }
    .cs-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-4); align-items: center; border-bottom: 2px solid var(--gold); padding-bottom: var(--sp-3); margin-bottom: var(--sp-4); }
    .cs-brand { display: flex; align-items: center; gap: var(--sp-3); }
    .cs-portrait { width: 5.5rem; height: 5.5rem; object-fit: cover; border: 2px solid var(--gold); border-radius: var(--r-md); }
    .cs-brand-text { display: flex; flex-direction: column; color: var(--gold); font-size: var(--fs-xl); font-variant: small-caps; letter-spacing: 0.04em; line-height: 1.1; }
    .cs-brand-text small { color: var(--text-dim); font-size: var(--fs-sm); letter-spacing: 0.1em; }
    /* Kopf (0.4.3.14, Wunsch Wolfgang): „Klasse und Stufe“ doppelt breit, Größenkategorie rückt dafür in die nächste Zeile */
    /* 0.4.3.15: fünf Spalten – oben Name, Spieler, Klasse und Stufe (doppelt), Gruppe; darunter Volk, Größenkategorie, Geschlecht, Titel, Erfahrung */
    .cs-fields { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-4); }
    .cs-field-wide { grid-column: span 2; }
    .cs-field { display: flex; flex-direction: column; min-width: 0; }
    .cs-fval { min-height: 1.4em; padding: 0 0.15rem 0.1rem; border-bottom: 1px solid var(--text-dim); color: var(--text-strong); overflow-wrap: anywhere; }
    .cs-lbl { color: var(--text-dim); font-size: var(--fs-xs); font-variant: small-caps; letter-spacing: 0.03em; line-height: 1.2; text-align: center; }
    .cs-field .cs-lbl { text-align: left; }
    .cs-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
    .cs-col { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
    .cs-section { min-width: 0; }
    /* Kürzel im goldenen Schild, der volle Name als Hinweis (0.4.3.14) */
    .cs-tag { display: inline-flex; align-items: center; justify-content: center; min-height: 1.9rem; padding: 0.15rem 0.5rem; background: var(--gold); color: var(--on-accent); font-size: var(--fs-md); font-weight: bold; letter-spacing: 0.05em; line-height: 1.1; text-transform: uppercase; text-align: center; border-radius: var(--r-sm); }
    .cs-bar { display: flex; flex-direction: column; margin: 0 0 var(--sp-2); padding: 0.2rem 0.6rem; background: var(--gold); color: var(--on-accent); font-size: var(--fs-md); letter-spacing: 0.06em; text-transform: uppercase; border-radius: var(--r-sm); }
    .cs-bar small { font-size: var(--fs-xs); letter-spacing: 0; text-transform: none; }
    .cs-bar-big { align-items: center; font-size: var(--fs-lg); letter-spacing: 0.12em; }
    .cs-line { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-1) var(--sp-2); margin: 0 0 var(--sp-2); }
    .cs-line-small .cs-tag { min-height: 0; font-size: var(--fs-sm); }
    /* Rechenzeilen (0.4.3.15, Wunsch Wolfgang: „Die oberen 2 Zeilen sollen in einer Höhe sein und RK genau mittig vertikal“): ein Raster
       Schild · Gesamt · „=“ · viermal Rechenzeichen + Wert; die Beschriftungen haben eigene Zeilen, so stehen alle Wertkästchen einer Reihe
       auf derselben Höhe. Bei zwei Reihen (RK, KMV) stehen Schild, „Gesamt“ und „=“ über beiden Wertzeilen, also genau mittig. */
    .cs-calc { display: grid; grid-template-columns: calc(var(--cs-tag-w) + var(--sp-2)) calc(var(--cs-total-w) + var(--sp-1)) 0.9rem repeat(4, 0.9rem minmax(0, 1fr)); align-items: center; margin: 0 0 var(--sp-3); }
    .cs-calc > .cs-calc-head { grid-column: 1; grid-row: 1; width: var(--cs-tag-w); }
    .cs-calc > .cs-total { position: relative; grid-column: 2; grid-row: 1; width: var(--cs-total-w); }
    .cs-calc > .cs-total .cs-val { width: 100%; min-width: 0; }
    .cs-calc > .cs-total .cs-lbl { position: absolute; top: 100%; left: 0; right: 0; }
    .cs-calc > .cs-eq { grid-column: 3; grid-row: 1; padding: 0; text-align: center; }
    .cs-rows2 > .cs-calc-head, .cs-rows2 > .cs-total, .cs-rows2 > .cs-eq { grid-row: 1 / 4; }
    .cs-calc > .cs-op.cs-c0 { grid-column: 4; } .cs-calc > .cs-op.cs-c1 { grid-column: 6; } .cs-calc > .cs-op.cs-c2 { grid-column: 8; } .cs-calc > .cs-op.cs-c3 { grid-column: 10; }
    .cs-calc > .cs-c0:not(.cs-op) { grid-column: 5; } .cs-calc > .cs-c1:not(.cs-op) { grid-column: 7; } .cs-calc > .cs-c2:not(.cs-op) { grid-column: 9; } .cs-calc > .cs-c3:not(.cs-op) { grid-column: 11; }
    .cs-calc > .cs-r0:not(.cs-cell-lbl) { grid-row: 1; } .cs-calc > .cs-cell-lbl.cs-r0 { grid-row: 2; }
    .cs-calc > .cs-r1:not(.cs-cell-lbl) { grid-row: 3; } .cs-calc > .cs-cell-lbl.cs-r1 { grid-row: 4; }
    .cs-calc > .cs-op { padding: 0; text-align: center; }
    .cs-cell { display: flex; min-width: 0; }
    .cs-cell > .cs-val { width: 100%; min-width: 0; }
    .cs-cell-lbl { align-self: start; padding-top: 0.1rem; }
    .cs-rows2 > .cs-cell-lbl.cs-r0 { padding-bottom: var(--sp-1); }
    .cs-tag-cell { width: 100%; min-height: 1.6em; padding: 0.1rem 0.3rem; font-size: var(--fs-sm); }
    .cs-box { display: inline-flex; flex-direction: column; align-items: center; min-width: 2.8rem; }
    .cs-val { display: block; min-width: 2.6rem; min-height: 1.6em; padding: 0.1rem 0.4rem; background: var(--field); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text-strong); text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .cs-total .cs-val { min-width: 3.2rem; border-color: var(--gold); font-weight: bold; }
    .cs-empty .cs-val { background: transparent; border-style: dashed; }
    /* Munition ausgegraut, wenn die Waffe keine braucht (0.4.3.15) */
    .cs-dim .cs-val { background: transparent; border-style: dashed; color: var(--text-dim); }
    .cs-feat-list { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); margin: 0; padding: 0; list-style: none; }
    .cs-feat-list li { padding: 0.15rem 0.55rem; background: var(--field); border: 1px solid var(--border); border-radius: var(--r-pill); color: var(--text-strong); font-size: var(--fs-sm); }
    .cs-feats { margin-top: var(--sp-4); }
    .ammo-warning h2:focus { outline: none; }
    .cs-op { padding-top: 0.2rem; color: var(--text-dim); }
    .cs-table { width: 100%; border-collapse: collapse; }
    .cs-table th, .cs-table td { padding: 0.12rem 0.25rem; background: none; border: 0; text-align: center; vertical-align: middle; }
    .cs-table thead th { color: var(--text-dim); font-size: var(--fs-xs); font-variant: small-caps; font-weight: normal; }
    .cs-abilities th.cs-attr { text-align: center; }
    .cs-abilities .cs-tag { min-width: 3.2rem; }
    /* Modifikator mit Ausrüstung: höher grün, niedriger rot (0.4.3.14) */
    .cs-up .cs-val { color: var(--success); border-color: var(--success); }
    .cs-down .cs-val { color: var(--danger); border-color: var(--danger); }
    /* Steigern im Heldenbogen (0.4.3.13): − Wert + wie in der Übersicht, Kosten in eigener Spalte */
    .cs-pm { display: inline-flex; align-items: center; gap: var(--sp-1); }
    .cs-pm .pm-form { display: inline-flex; }
    .cs-cost { color: var(--text-strong); font-size: var(--fs-sm); white-space: nowrap; text-align: right; }
    .cs-cost.too-expensive { color: var(--text-dim); }
    .cs-cost-m { display: none; }
    /* Ränge im Bogen (0.4.3.14): letzte Spalte, − Rang + */
    .cs-skill-rank { width: 1%; }
    .cs-rank-pm .pm-btn { width: 1.5rem; height: 1.5rem; min-height: 1.5rem; padding: 0; font-family: inherit; cursor: pointer; }
    .cs-rank-pm .pm-btn[disabled] { cursor: default; }
    .cs-rank .cs-val { min-width: 2rem; }
    .cs-rank .cs-lbl { display: none; }
    .cs-points { margin: 0 0 var(--sp-2); color: var(--text-dim); font-size: var(--fs-sm); }
    .cs-points strong { color: var(--text-strong); }
    .cs-points-left.over { color: var(--danger); }
    .cs-skill-table th[scope="row"] { text-align: left; font-weight: normal; white-space: nowrap; }
    .cs-skill-table tbody th, .cs-skill-table tbody td { border-bottom: 1px solid var(--border); }
    .cs-has-ranks th[scope="row"] { color: var(--text-strong); }
    .cs-check { display: inline-block; width: 1.3em; color: var(--gold); }
    .cs-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
    .cs-strong { color: var(--text-strong); font-weight: bold; }
    .cs-legend, .cs-foot { margin: var(--sp-2) 0 0; color: var(--text-dim); font-size: var(--fs-xs); }
    .cs-weapon { margin-bottom: var(--sp-2); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
    .cs-weapon-head { display: flex; align-items: stretch; gap: var(--sp-2); }
    .cs-weapon-head .cs-bar { margin: 0; border-radius: 0; }
    .cs-wname { align-self: center; padding: 0.2rem var(--sp-2); color: var(--text-strong); }
    .cs-weapon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-1) var(--sp-2); padding: var(--sp-2); }
    .cs-weapon-grid .cs-box, .cs-weapon-grid .cs-val { width: 100%; }
    .cs-situational ul { margin: 0; padding-left: 1.2rem; font-size: var(--fs-sm); }
    @media (max-width: 1100px) { .cs-cols, .cs-head { grid-template-columns: minmax(0, 1fr); } }
    @media (max-width: 768px) {
      .cs-sheet { padding: var(--sp-2); }
      .cs-head { grid-template-columns: minmax(0, 1fr); }
      .cs-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .cs-abilities .cs-tag { min-width: 2.6rem; padding: 0.15rem 0.3rem; }
      /* Steigern am Handy: − und + links und rechts vom Wert wie am PC (0.4.3.14), Kosten seit 0.4.3.15 wieder in der letzten Spalte */
      .cs-pm { gap: 0.15rem; }
      .cs-pm .pm-btn { width: 1.75rem; height: 1.75rem; min-height: 1.75rem; }
      /* 0.4.3.15 (Wunsch Wolfgang: „die Felder bei Attribute … gehören in eine Zeile“): Kosten wieder in der letzten Spalte, klein */
      .cs-abilities .cs-cost { font-size: var(--fs-xs); padding-left: 0.1rem; padding-right: 0; }
      /* Rechenzeilen am Handy: das Schild als Zeile darüber, darunter „Gesamt“ und die Teilwerte im Raster mit vier Spalten */
      .cs-sheet { --cs-total-w: 2.8rem; }
      .cs-calc { grid-template-columns: 0 calc(var(--cs-total-w) + 0.2rem) 0.7rem repeat(4, 0.7rem minmax(0, 1fr)); }
      .cs-calc > .cs-calc-head, .cs-rows2 > .cs-calc-head { grid-column: 1 / -1; grid-row: 1; width: auto; min-height: 0; justify-self: start; margin-bottom: var(--sp-1); }
      .cs-calc > .cs-total, .cs-calc > .cs-eq { grid-row: 2; }
      .cs-rows2 > .cs-total, .cs-rows2 > .cs-eq { grid-row: 2 / 5; }
      .cs-calc > .cs-r0:not(.cs-cell-lbl) { grid-row: 2; } .cs-calc > .cs-cell-lbl.cs-r0 { grid-row: 3; }
      .cs-calc > .cs-r1:not(.cs-cell-lbl) { grid-row: 4; } .cs-calc > .cs-cell-lbl.cs-r1 { grid-row: 5; }
      .cs-line { gap: var(--sp-1); }
      .cs-box { min-width: 2.3rem; }
      .cs-val { min-width: 2.2rem; padding: 0.1rem 0.25rem; }
      .cs-weapon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .cs-skill-table th[scope="row"] { white-space: normal; }
      .cs-skill-table thead th:nth-child(n+4), .cs-skill-table tbody td:nth-child(n+4) { font-size: var(--fs-xs); }
      /* Fertigkeiten am Handy (0.4.3.14): ohne Spalte „Attribut“ (der Modifikator steht daneben), Ränge mit kleineren Knöpfen – passt in die Breite */
      .cs-skill-table th, .cs-skill-table td { padding: 0.12rem 0.15rem; }
      .cs-skill-table thead th:nth-child(3), .cs-skill-table tbody td:nth-child(3) { display: none; }
      .cs-rank-pm .pm-btn { width: 1.5rem; height: 1.5rem; min-height: 1.5rem; }
      .cs-rank .cs-val { min-width: 1.7rem; }
    }
    .eig-top { display: grid; grid-template-columns: max-content; gap: 1.2rem; align-items: start; margin-bottom: 1.2rem; }
    .eig-top.has-portrait { grid-template-columns: minmax(10rem, 21rem) max-content; }
    /* Held umbauen (3.1.62): kleine Karte neben den Attributen, nur der Knopf – Erklärung und Preis beim Aufklappen */
    .eig-top.has-rebuild { grid-template-columns: max-content minmax(12rem, 19rem); }
    .eig-top.has-portrait.has-rebuild { grid-template-columns: minmax(10rem, 21rem) max-content minmax(12rem, 19rem); }
    .rebuild-card { margin: 0; padding: var(--sp-3); align-self: start; }
    .rebuild-card:not([open]) { justify-self: start; }
    .rebuild-card > summary.button { list-style: none; display: inline-block; cursor: pointer; }
    .rebuild-card > summary::-webkit-details-marker { display: none; }
    .rebuild-card .rebuild-body { font-size: var(--fs-sm); margin-top: var(--sp-2); }
    .rebuild-card .rebuild-body p { margin: 0 0 var(--sp-2); }
    @media (min-width: 769px) and (max-width: 1100px) {
      .eig-top.has-portrait.has-rebuild { grid-template-columns: minmax(10rem, 21rem) max-content; }
      .eig-top.has-portrait.has-rebuild .rebuild-card { grid-column: 2; }
    }
    .eig-top .eig-portrait { width: 100%; max-width: none; height: auto; aspect-ratio: 1 / 1; margin: 0; }
    .eig-attr .subtitle { margin: 0 0 0.2rem; }
    .eig-attr .attr-table { margin-top: 0.5rem; }
    .info-table.eig-info { width: 100%; max-width: 64rem; table-layout: fixed; }
    .eig-info col.c-name { width: 11rem; }
    .eig-info col.c-value { width: 11rem; }
    .eig-info .stat-value { white-space: normal; overflow-wrap: anywhere; }
    .attr-table, .info-table { width: auto; margin: 0; }
    .attr-table td, .info-table td { padding: 0.35rem 0.6rem; vertical-align: middle; }
    .attr-value { display: flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
    .attr-num { display: inline-block; min-width: 3.4rem; text-align: center; font-weight: bold; color: var(--gold-bright); }
    .attr-mod { display: inline-block; min-width: 2.4rem; color: var(--text-dim); font-size: var(--fs-sm); }
    .attr-cost { text-align: right; white-space: nowrap; }
    .attr-short { display: none; }
    .attr-cost.too-expensive { color: var(--text-dim); }
    .stat-eff { color: var(--gold); font-weight: normal; }
    /* schwebende Erklärung (3.2.6): mit JavaScript statt ::after, damit scrollende Tabellen keinen Scrollbalken bekommen */
    .tip-float { position: fixed; z-index: 2000; max-width: min(24rem, calc(100vw - 16px)); white-space: pre-line; text-align: left;
      font-size: var(--fs-xs); line-height: 1.4; color: var(--text); background: var(--panel); border: 1px solid var(--gold);
      border-radius: var(--r-sm); padding: var(--sp-1) var(--sp-2); box-shadow: var(--shadow-overlay); pointer-events: none; }
    .tip-float[hidden] { display: none; }
    html.tip-js :is(.tip, .stat-eff)[data-tip]:is(:hover, :focus)::after { content: none; display: none; }
    /* Herleitung der Klammerwerte (3.1.66, Wunsch Wolfgang): Rechnung beim Darüberfahren, am Handy beim Antippen */
    .stat-eff[data-tip] { position: relative; cursor: help; border-bottom: 1px dotted currentColor; }
    .stat-eff[data-tip]:hover::after, .stat-eff[data-tip]:focus::after {
      content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; width: max-content; max-width: min(24rem, 80vw);
      white-space: pre-line; text-align: left; font-size: var(--fs-xs); line-height: 1.4; color: var(--text); background: var(--panel);
      border: 1px solid var(--gold); border-radius: var(--r-sm); padding: var(--sp-1) var(--sp-2); box-shadow: var(--shadow-overlay); font-weight: normal; }
    .pm-form { display: inline; margin: 0; }
    .pm-btn {
      display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem;
      border: 1px solid var(--border); border-radius: var(--r-sm); font-weight: bold; font-size: var(--fs-md); line-height: 1;
      background: var(--panel-light); color: var(--text); cursor: pointer; vertical-align: middle; padding: 0;
    }
    .pm-btn.plus { background: color-mix(in srgb, var(--gold) 22%, var(--panel)); border-color: var(--gold); color: var(--gold-bright); }
    .pm-btn.minus { background: color-mix(in srgb, var(--warning) 22%, var(--panel)); border-color: var(--warning); color: var(--warning); }
    .pm-btn.plus:hover, .pm-btn.minus:hover { filter: brightness(1.25); }
    .pm-btn.disabled { opacity: 0.35; cursor: default; }
    .info-table .stat-name { color: var(--text-dim); white-space: nowrap; }
    .info-table .stat-value { font-weight: bold; color: var(--gold-bright); white-space: nowrap; }
    .info-table .stat-note { font-size: var(--fs-sm); color: var(--text-dim); }
    .feat-chip { display: inline-block; padding: 0.15rem 0.5rem; margin: 0 0.2rem 0.3rem 0; border: 1px solid var(--border); border-radius: 3px; background: var(--panel-light); font-size: var(--fs-sm); }
    .hint-box { margin-top: 1.2rem; font-size: var(--fs-sm); }
    .levelup-banner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); }
    .levelup-banner > .notice { margin: 0; flex: 1 1 14rem; }
    .levelup-banner-btn { font-size: var(--fs-md); padding: 0.6rem 1.1rem; }
    @media (max-width: 768px) { .levelup-banner-btn { width: 100%; text-align: center; } }
    .hint-box ul { margin: 0.4rem 0 0; padding-left: 1.2rem; color: var(--text-dim); }
    @media (max-width: 768px) {
      .attr-table, .info-table { width: 100%; }
      .eig-top, .eig-top.has-portrait, .eig-top.has-rebuild, .eig-top.has-portrait.has-rebuild { grid-template-columns: minmax(0, 1fr); }
      .eig-top .eig-portrait { width: min(100%, 20rem); justify-self: center; }
      /* 3.2.5 (Wunsch Wolfgang): am Handy kein Seitwärts-Scrollen mehr – Name und Wert in einer Zeile, der Hinweis darunter */
      .info-table.eig-info, .info-table.eig-info tbody { display: block; width: 100%; }
      .info-table.eig-info colgroup { display: none; }
      .info-table.eig-info tr { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); column-gap: var(--sp-2); border-bottom: 1px solid var(--border); padding: var(--sp-1) 0; }
      .info-table.eig-info td { border: 0; padding: 0.1rem 0.35rem; }
      .info-table.eig-info td.stat-note { grid-column: 1 / -1; }
      .info-table.eig-info td.stat-note:empty { display: none; }
      .eig-info .stat-value { white-space: normal; text-align: right; }
      .pm-btn { width: 2.2rem; height: 2.2rem; min-height: 2.2rem; }
      .attr-table td { padding: 0.3rem 0.35rem; }
      .attr-num { min-width: 2.6rem; }
      .attr-mod { min-width: 2rem; }
      .attr-long { display: none; }
      .attr-short { display: inline; font-weight: bold; }
      .info-table .stat-note { font-size: var(--fs-xs); }
    }


    /* Kampfbericht: Runden-Bloecke */
    .round-block { margin-bottom: 1.2rem; border: 1px solid var(--border); border-radius: 4px; padding: 0.8rem; }
    .stage-flavor-text {
      margin-bottom: 1rem;
      padding: 0.9rem 1.1rem;
      background: var(--panel-light);
      border-left: 3px solid var(--gold);
      border-radius: 0 4px 4px 0;
      font-style: italic;
      color: var(--text);
      line-height: 1.5;
    }
    .stage-flavor-text p:first-child { margin-top: 0; }
    .stage-flavor-text p:last-child { margin-bottom: 0; }

    /* --- Zauberbuch: Kachel-Drag&Drop --- */
    .spell-grade-block { margin-bottom: 1.8rem; }
    .spell-slots, .spell-pool { display: flex; flex-wrap: wrap; gap: 0.6rem; min-height: 76px; padding: 0.6rem; background: var(--panel-light); border: 1px solid var(--border); border-radius: 6px; }
    .spell-slots { margin-top: 0.5rem; background: rgba(0,0,0,0.25); }
    /* Kachel = Bild und darunter klein der Name als Link zum Zauber-Fenster (0.4.0.41); in den Plätzen (vorbereitete Zauber) nur das Bild. */
    .spell-slot { width: 76px; height: 76px; border: 2px dashed var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .spell-slot .spell-tile { width: 68px; }
    .spell-slot .spell-tile-name { display: none; }
    .spell-tile { width: 80px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: grab; position: relative; flex-shrink: 0; }
    .spell-tile-icon {
      width: 68px; height: 68px; border-radius: 6px; border: 2px solid var(--border); background: var(--field);
      display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
    }
    .spell-tile:active { cursor: grabbing; }
    .spell-tile-icon img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
    .spell-tile-fallback { font-size: 1.6rem; color: var(--gold); font-weight: bold; }
    .spell-tile-prepared .spell-tile-icon { border-color: var(--gold-bright); box-shadow: 0 0 6px color-mix(in srgb, var(--gold) 60%, transparent); }
    .spell-tile-readonly { cursor: default; }
    .spell-tile-readonly .spell-tile-icon { opacity: 0.85; }
    /* Gegen die Gesinnung (0.4.4.243, GS-18): ausgegraut, nicht wählbar, Grund darunter */
    .spell-tile-blocked .spell-tile-icon { opacity: 0.35; filter: grayscale(1); }
    .spell-tile-note { font-size: var(--fs-xs); line-height: 1.1; color: var(--text-dim); text-align: center; max-width: 80px; }
    a.spell-tile-name {
      display: flex; align-items: flex-start; justify-content: center; min-height: 1.5rem; max-width: 80px; padding: 0 1px;
      font-size: var(--fs-xs); line-height: 1.15; text-align: center; overflow-wrap: anywhere; hyphens: auto;
      color: var(--text-soft); text-decoration: underline dotted; text-underline-offset: 2px; cursor: pointer;
    }
    a.spell-tile-name:hover, a.spell-tile-name:focus-visible { color: var(--gold-bright); }
    a.learn-name { color: inherit; text-decoration: underline dotted; text-underline-offset: 2px; }
    /* --- Zauber lernen (v0.2.76, Auswahlfenster mit Karten) --- */
    .learn-panel { border: 2px solid var(--gold); border-radius: 8px; padding: 1rem; margin-bottom: 1.8rem; background: var(--surface-alt); }
    .learn-panel h2 { margin-top: 0; }
    .learn-counter { font-weight: bold; color: var(--gold-bright); }
    .learn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.7rem; margin: 0.5rem 0 1rem; }
    .learn-card { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.55rem; border: 2px solid var(--border); border-radius: 6px; background: var(--panel-light); cursor: pointer; position: relative; }
    .learn-card input { position: absolute; opacity: 0; pointer-events: none; }
    .learn-card:has(input:checked) { border-color: var(--gold-bright); box-shadow: 0 0 8px color-mix(in srgb, var(--gold) 55%, transparent); }
    .learn-card.learn-known { cursor: default; opacity: 0.5; filter: grayscale(0.8); }
    .learn-card.learn-blocked { opacity: 0.4; filter: grayscale(1); cursor: not-allowed; }
    .spell-pool-full .spell-tile { opacity: 0.4; filter: grayscale(1); }
    .spell-tile-chosen::after { content: "✓"; position: absolute; top: 1px; right: 10px; color: var(--gold-bright); font-weight: bold; text-shadow: 0 0 3px #000; }
    .learn-card img, .learn-card .spell-tile-fallback { width: 48px; height: 48px; border-radius: 5px; object-fit: cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--field); }
    .learn-card .learn-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
    .learn-card .learn-meta { font-size: var(--fs-xs); color: var(--text-dim); }
    .learn-card .learn-effect { font-size: var(--fs-sm); }
    .learn-card .learn-desc { font-size: var(--fs-xs); color: var(--text-dim); font-style: italic; }
    .learn-card .learn-check { position: absolute; top: 4px; right: 6px; color: var(--gold-bright); font-weight: bold; display: none; }
    .learn-card:has(input:checked) .learn-check { display: block; }
    .round-block.round-odd { background: var(--field); }
    .round-block.round-even { background: var(--surface-alt); }
    .round-block h3 { margin: 0 0 0.5rem; color: var(--gold); }
    .status-tables { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
    .status-table { border-collapse: collapse; font-size: var(--fs-sm); }
    .status-table th { text-align: left; color: var(--text-dim); padding: 0.15rem 0.5rem; border-bottom: 1px solid var(--border); }
    .status-table td { padding: 0.15rem 0.5rem; }
    .status-table tr.party-row td:first-child { color: var(--gold-bright); }
    .status-table tr.enemy-row td:first-child { color: var(--enemy); }
    .status-table .status-green { color: var(--success); font-weight: bold; }
    .status-table .status-yellow { color: var(--caution); font-weight: bold; }
    .status-table .status-red { color: var(--danger); font-weight: bold; }
    .status-table .status-grey { color: var(--text-dim); font-weight: bold; }
    .status-table .status-conditions { color: var(--text-dim); font-weight: normal; font-size: var(--fs-xs); }
    .action-log p { margin: 0.2rem 0; font-size: var(--fs-sm); }
    .action-log p.party-action { color: var(--text); }
    .action-log p.enemy-action { color: color-mix(in srgb, var(--enemy) 60%, var(--text)); }
    p.combat-end { color: var(--gold-bright); font-weight: bold; margin-top: 0.8rem; }
    /* Kampfbericht im WoD-Stil: Statustabellen je Seite, darunter je Zug eine Zeile */
    .status-block { max-width: 100%; overflow-x: auto; }
    .status-block h4 { margin: 0 0 0.2rem; color: var(--gold); font-size: var(--fs-sm); }
    .status-block h4 .cr-when { color: var(--text-dim); font-weight: normal; font-size: var(--fs-xs); }
    /* Helden blau, nur der ausgewählte Held des Betrachters grün (v0.3.83, Wunsch Wolfgang, markOwnHeroName) */
    .cr-party { color: var(--info); }
    .cr-party.cr-self { color: var(--success); }
    .cr-enemy { color: var(--enemy); }
    .cr-skill { color: var(--skill); }
    a.cr-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 2px; cursor: pointer; }
    a.cr-skill.cr-link { color: var(--skill); }
    .cr-ok { color: var(--text); font-weight: bold; }
    .cr-crit { color: var(--gold-bright); font-weight: bold; }
    .cr-fail { color: var(--danger); font-weight: bold; }
    .cr-turn { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.2rem 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: var(--fs-sm); }
    .cr-init { font-weight: bold; color: var(--text); white-space: nowrap; }
    /* Ausbau-Karten (3.2.20, Wunsch Wolfgang: „Knöpfe, Titel usw. immer auf derselben Höhe wie die Blöcke daneben“): jede Karte
       nimmt vier Zeilen des gemeinsamen Rasters (Titel, Rolle, Stufen, Kosten + Knöpfe) – so stehen sie in einer Reihe gleich hoch,
       die Knöpfe ganz unten. */
    .workshop-components { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: auto; column-gap: 0.8rem; row-gap: 0.8rem; }
    .workshop-component { margin: 0; display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0.3rem; min-width: 0; }
    .workshop-component .wc-head { margin: 0; }
    .workshop-component .wc-role { color: var(--text-dim); font-size: var(--fs-sm); }
    .workshop-component .wc-steps { list-style: none; padding: 0; margin: 0.1rem 0; font-size: var(--fs-sm); }
    .workshop-component .wc-foot { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
    .workshop-component .wc-foot > .sh-actions { margin-top: auto; padding-top: 0.2rem; }
    .sh-actions > .sh-contribute { margin-top: 0; }
    .sh-actions > .sh-contribute[open] { flex-basis: 100%; }
    /* Ruhm der Gruppe und verschlossener Unterschlupf (0.4.0.41) */
    .sh-locked, .group-fame { margin: 1rem 0; }
    .group-fame-buy { padding-left: 1.2rem; }
    .group-fame-buy li + li { margin-top: var(--sp-3, 0.6rem); }
    /* Teil-Lieferung im Unterschlupf (3.2.5) */
    .sh-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: 0.3rem; }
    .sh-actions form { margin: 0; }
    .sh-done { color: var(--success); }
    /* Beiträge der Spieler (3.2.20): „Beitragen“ klappt das Formular unter der Kostenzeile auf. */
    .sh-contribute { margin-top: 0.4rem; }
    .sh-contribute > summary { list-style: none; display: inline-block; cursor: pointer; }
    .sh-contribute > summary::-webkit-details-marker { display: none; }
    .sh-contrib-form { display: flex; flex-direction: column; gap: var(--sp-1); margin-top: var(--sp-2); padding: var(--sp-2); border: 1px solid var(--card-border, var(--border)); border-radius: var(--r-sm); font-size: var(--fs-sm); }
    .sh-contrib-hint { color: var(--text-dim); }
    .sh-contrib-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
    .sh-contrib-row input[type="number"] { width: 7rem; }
    .sh-contrib-note { color: var(--text-dim); }
    .sh-contrib-form button { align-self: flex-start; }
    .sh-have { color: var(--text-dim); }
    .sh-short { color: var(--danger); }
    /* Kostenliste je Ausbaustufe (0.4.0.1, Wunsch Wolfgang): eine Zeile je Posten „gegeben / nötig“, Antippen zeigt, wer was gegeben hat. */
    .sh-costs { font-size: var(--fs-sm); }
    .sh-costs > summary { list-style: none; cursor: pointer; display: block; }
    .sh-costs > summary::-webkit-details-marker { display: none; }
    .sh-cost-head { display: block; color: var(--text-dim); }
    .sh-cost-hint { color: var(--text-dim); text-decoration: underline dotted; }
    .sh-cost-arrow { display: inline-block; transition: transform 0.15s; }
    .sh-costs[open] .sh-cost-arrow { transform: rotate(180deg); }
    .sh-cost-line { display: block; padding-left: 0.9rem; text-indent: -0.6rem; }
    .sh-cost-line:not(.sh-done)::before { content: "• "; color: var(--text-dim); }
    .sh-cost-detail { margin-top: var(--sp-1); padding: var(--sp-2); border: 1px solid var(--card-border, var(--border)); border-radius: var(--r-sm); display: flex; flex-direction: column; gap: var(--sp-1); }
    .sh-cost-who { margin: 0; padding-left: 1.1rem; }
    .sh-cost-none, .sh-cost-rest { color: var(--text-dim); }
    .sh-cost-rest.sh-done { color: var(--success); }
    /* Bauzeit (0.4.0.7): laufender Bau mit Countdown, Bauzeit unter den Kosten, belegte Baustelle */
    .sh-build { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-2); border: 1px solid var(--gold); border-radius: var(--r-sm); font-size: var(--fs-sm); }
    .sh-build .cooldown-bar-track { margin: 0; }
    .sh-build-at, .sh-build-note { color: var(--text-dim); }
    .sh-buildtime { font-size: var(--fs-sm); color: var(--text-dim); }
    .sh-busy { font-size: var(--fs-sm); color: var(--warning); }
    .cr-init small { display: block; font-weight: normal; font-size: var(--fs-xs); color: var(--text-dim); }
    .cr-detail { color: var(--text-dim); font-size: var(--fs-sm); }
    /* Würfe in Proben (0.4.4.91, Plan 6.2): in der einfachen Ansicht nur das Wort, die Zahlen beim Antippen (markRollChecks) */
    body[data-ansicht="einfach"] .cr-check[data-simple] { font-size: 0; display: inline-block; min-width: 1.5rem; }
    body[data-ansicht="einfach"] .cr-check[data-simple]::before { content: attr(data-simple); font-size: var(--fs-sm); }
    .lbl-short { display: none; }
    @media (max-width: 768px) {
      .lbl-long { display: none; }
      .lbl-short { display: inline; }
      .status-table { font-size: var(--fs-xs); }
      .status-table th, .status-table td { padding: 0.1rem 0.25rem; }
      .cr-turn { grid-template-columns: 1fr; }
      .cr-init small { display: inline; margin-left: 0.4rem; }
    }

    /* Inventar - Bild mittig, Slots links/rechts (Diagramm-Layout) */
    .inventory-layout { display: flex; gap: 1.5rem; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
    .inventory-portrait {
      flex-shrink: 0; width: 260px; border: 2px solid var(--border); border-radius: 6px; overflow: hidden;
      display: flex; align-items: center; justify-content: center; background: var(--field); align-self: stretch;
    }
    .inventory-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .inventory-slots-column { display: flex; flex-direction: column; gap: 0.5rem; width: 220px; }
    .inventory-slot label { display: block; font-size: var(--fs-sm); color: var(--gold); margin-bottom: 0.2rem; }
    .socket-row { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 0.3rem; }
    .socket-sq { display: inline-block; width: 0.85rem; height: 0.85rem; border: 1px solid var(--text-dim); border-radius: 2px; background: color-mix(in srgb, var(--text-dim) 35%, transparent); box-sizing: border-box; }
    .socket-sq.filled { border-color: rgba(0, 0, 0, 0.55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
    .inventory-slot input, .inventory-slot select { width: 100%; padding: 0.3rem; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--field); color: var(--text); box-sizing: border-box; font-family: inherit; }
    .inventory-empty { display: block; width: 100%; padding: 0.3rem; border-radius: var(--r-sm); border: 1px dashed var(--border); color: var(--text-dim); font-size: var(--fs-sm); box-sizing: border-box; }
    /* Neue Beute anlegen (0.4.4.73, Plan 5.4): was im Lager besser ist, unter dem Platz */
    .inventory-upgrade { margin-top: 0.25rem; font-size: var(--fs-sm); line-height: 1.35; }
    .inventory-section-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.6rem; }

    /* Lager/Keller/Gruppenlager/Debug-Lager - gleiche kompakte Groesse wie Inventar-Slots */
    .storage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.6rem; }
    .storage-slot { background: var(--panel); border: 1px solid var(--border); border-radius: 4px; padding: 0.5rem; }
    .storage-slot label { display: block; font-size: var(--fs-sm); color: var(--gold); margin-bottom: 0.3rem; }
    .storage-slot select { flex: 1; padding: 0.25rem; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--field); color: var(--text); font-size: var(--fs-sm); font-family: inherit; }
    .sidebar-backdrop { display: none; }
    section.tactic-section { margin: 0 0 1.6rem; }
    section.tactic-section > h3.tactic-head { color: var(--gold); font-size: var(--fs-lg); margin: 0 0 0.6rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--border); }
    /* Die Taktik in Sätzen (0.4.4.79, Plan 6.4) */
    .tactic-summary p { margin: 0.5rem 0 0.2rem; }
    .tactic-summary ol, .tactic-summary ul { margin: 0 0 0.4rem; padding-left: 1.6rem; }
    .tactic-summary li { margin: 0.15rem 0; }
    .tactic-summary .ts-detail { color: var(--text-dim); font-size: var(--fs-sm); }
    .hero-topbar-right { display: inline-flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; min-width: 0; max-width: 100%; }
    /* Am PC und Tablet immer eine Zeile (3.2.6, Meldung Wolfgang): bei langem Titel, Volk/Klasse und großen Zahlen sprang der rechte
       Block (Symbole, Konto) in eine zweite Zeile. Jetzt bleiben Werte und rechter Block ganz; wird es eng, kürzt zuerst „Volk Klasse“,
       dann der Titel, zuletzt der Name mit „…“ (der ganze Text steht im Tooltip). Heldenwechsel und Aufstiegs-Pfeil bleiben ganz. */
    @media (min-width: 769px) {
      .hero-topbar { flex-wrap: nowrap; }
      .hero-topbar-left { display: flex; align-items: center; gap: 0.6rem; flex: 1 1 auto; min-width: 0; }
      .hero-topbar-name { display: flex; align-items: center; gap: 0.35rem; min-width: 0; white-space: nowrap; }
      .hero-topbar-name > * { flex: none; }
      .hero-topbar-name > a:not(.levelup-arrow), .hero-topbar-name > .hero-topbar-label:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
      .hero-topbar-name > a:not(.levelup-arrow) { flex-shrink: 1; }
      .hero-topbar-name > a.hero-topbar-title { flex-shrink: 100; margin-left: 0; }
      .hero-topbar-name > .hero-topbar-label:last-child { flex-shrink: 1000; }
      .hero-topbar-values { flex: none; white-space: nowrap; }
      .hero-topbar-right { flex: none; flex-wrap: nowrap; }
    }
    /* Tablet: die Wörter „Gold“, „Ruhm“, „XP“, „Kristalle“ fallen weg (Symbol und Tooltip bleiben), damit Name und Titel Platz haben */
    @media (min-width: 769px) and (max-width: 1100px) {
      .hero-topbar-stats .hero-topbar-label { display: none; }
    }
    .pagination { margin-top: 0.8rem; display: flex; gap: 0.3rem; justify-content: flex-end; flex-wrap: wrap; }
    .pagination .pagination-gap, .ah-pager .pagination-gap { align-self: center; color: var(--text-dim); padding: 0 0.2rem; }
    .mail-icon { position: relative; display: inline-flex; line-height: 0; text-decoration: none; }
    .mail-icon > svg { width: 24px; height: 24px; }
    .mail-icon svg { display: block; color: var(--tile-idle); }
    /* Kacheln der Kopfleiste über Design-Variablen (GUI-03, 3.1.38): grau = nichts Neues, Farbe nur bei Neuem */
    .mail-icon .tile-bg { fill: var(--tile-bg); stroke: var(--tile-border); }
    .mail-icon .tile-glyph { fill: var(--tile-glyph); }
    .hero-switch-btn svg { color: var(--tile-glyph); }
    .mail-icon .mail-count { position: absolute; right: -7px; top: -6px; min-width: 14px; padding: 0 3px; border-radius: 7px; background: var(--badge-bg); color: var(--badge-text); font-size: var(--fs-xs); line-height: 14px; text-align: center; font-weight: bold; }
    .mail-icon.mail-urgent .mail-count { background: var(--badge-alert-bg); }
    /* Heldenwechsel (3.1.8): Kachel wie das Briefsymbol, am PC statt „Aktueller Held:“, am Handy statt der Version */
    form.hero-switch { display: inline-flex; margin: 0; vertical-align: middle; }
    button.hero-switch-btn { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; min-height: 0 !important; line-height: 0; }
    button.hero-switch-btn:hover rect, button.hero-switch-btn:focus-visible rect { stroke: var(--gold); }
    .hero-switch-mobile { display: none; }
    /* Auftragsplätze (3.1.8): höchstens drei Kacheln je Zeile, freie gestrichelt */
    .job-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin: 0.8rem 0; }
    .job-slots > .job-slot { margin: 0; min-width: 0; }
    .job-slot-free { border: 2px dashed var(--border); border-radius: 6px; padding: 0.8rem 1rem; color: var(--text-dim); background: transparent; }
    .job-slot-free.job-slot-locked { opacity: 0.8; }
    .job-slot-free .job-slot-title { margin: 0 0 0.4rem; color: var(--text); }
    .job-slot-free .job-slot-hint { margin: 0; font-size: var(--fs-sm); }
    .job-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
    .job-banner > .job-actions.job-grid { display: grid; grid-template-columns: max-content 1fr; align-items: center; }
    .job-grid > :nth-child(odd) .button { width: 100%; }
    .job-grid > :nth-child(even) { justify-self: end; margin: 0; }
    .job-grid > .job-extra { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
    @media (max-width: 1100px) { .job-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
    @media (max-width: 768px) { .job-slots { grid-template-columns: minmax(0, 1fr); } }
    /* Sammeln (3.1.69, Wunsch Wolfgang): der Sammelknecht steht am PC als Fenster neben der Rohstoff-Tabelle, darunter erst ab Tablet. */
    .gather-layout.has-side { display: grid; grid-template-columns: minmax(0, max-content) minmax(15rem, 22rem); gap: 1rem; align-items: start; }
    .gather-layout .gather-side > .sheet { margin: 0; }
    .gather-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
    .gather-actions > form { margin: 0; }
    input.gather-slider { width: 9rem; vertical-align: middle; } output.gather-duration { display: inline-block; min-width: 6.5rem; font-size: var(--fs-sm); color: var(--text-dim); } /* Sammelzug-Regler (0.4.1.7) */
    .gather-side form select { flex: 1 1 100%; }
    @media (max-width: 1100px) { .gather-layout.has-side { display: block; } .gather-layout .gather-side > .sheet { margin-top: 0.8rem; } }
    .message-unread td { font-weight: bold; }
    .icon-name { display: inline-flex; align-items: center; gap: 0.45rem; vertical-align: middle; max-width: 100%; }
    .cond-std { display: inline-block; flex-shrink: 0; vertical-align: middle; background-color: var(--cond-c, var(--gold)); -webkit-mask: var(--cond-m) center / contain no-repeat; mask: var(--cond-m) center / contain no-repeat; }
    .item-unwearable a, .item-unwearable a span { color: var(--danger); } /* v0.2.164: Held kann es nicht tragen (Vertrautheit) */
    .item-unwearable { color: var(--danger); }
    .item-row-list { margin: 0; padding-left: 1.1rem; }
    .item-row-list li { margin: 0.1rem 0; }
    .hint-q { display: inline-flex; align-items: center; justify-content: center; width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid var(--text-dim); color: var(--text-dim); font-size: var(--fs-xs); cursor: help; margin-left: 0.3rem; vertical-align: middle; }
    .icon-name > img { flex-shrink: 0; }
    .skill-cls { display: inline-block; width: 18px; height: 20px; flex-shrink: 0; }
    .skill-cls > img { display: block; }
    /* Fertigkeiten (3.1.18, Wunsch Wolfgang): Name samt Symbolen in einer Zeile, der Hinweis bricht um; Rang mittig ohne Pfeile. */
    .skill-name-cell { white-space: nowrap; }
    /* Gegenstände, die mitzählen (0.4.3.13): klein unter „Gesamt“ */
    .skill-gear { display: block; color: var(--text-soft); font-size: var(--fs-xs); white-space: normal; }
    @media (min-width: 769px) { .skill-gear { white-space: nowrap; } }
    .skill-note-cell { min-width: 12rem; white-space: normal; }
    input.skill-rank { text-align: center; -moz-appearance: textfield; appearance: textfield; }
    input.skill-rank::-webkit-outer-spin-button, input.skill-rank::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .appraise-tag { font-size: var(--fs-xs); color: var(--text-dim); white-space: nowrap; cursor: help; }
    /* Siegelmeister (3.2.14): gebundene Stücke und die Regale. */
    .seal-tag { font-size: var(--fs-xs); color: var(--gold-bright); border: 1px solid var(--gold); border-radius: var(--r-sm); padding: 0 0.3em; white-space: nowrap; cursor: help; }
    details.seal-shelf { margin: 0.4rem 0; }
    details.seal-shelf > summary { cursor: pointer; font-weight: 600; padding: 0.3rem 0; }
    .appraise-tag.appraise-cursed { color: var(--danger); }
    .readonly-check { accent-color: var(--gold); width: 1rem; height: 1rem; cursor: default; pointer-events: none; }
    /* Einklappbare Liste in einer Tabellenzelle (3.1.30, Wunsch Wolfgang: „Quellen ausklappbar, sonst immer nur eine Zeile“) */
    .src-list { font-size: var(--fs-sm); color: var(--text-dim); max-width: min(18rem, 100%); min-width: 0; }
    .src-list > summary { cursor: pointer; list-style: none; display: flex; gap: 0.35rem; align-items: baseline; white-space: nowrap; }
    .src-list > summary::-webkit-details-marker { display: none; }
    .src-list > summary::before { content: "▸"; color: var(--gold); flex: none; }
    .src-list[open] > summary::before { content: "▾"; }
    .src-list .src-first { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
    .src-list .src-more { flex: none; color: var(--gold); }
    .src-list[open] .src-more { display: none; }
    .src-list > div { margin: 0.2rem 0 0 0.9rem; white-space: normal; }
    .txt-list[open] > summary .src-first { display: none; }
    .same-effect { display: block; max-width: 18rem; font-size: var(--fs-xs); color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .auth-impressum { margin-top: 1.5rem; text-align: center; font-size: var(--fs-sm); }
    .auth-impressum a { color: var(--text-dim); }
    .impressum-text h3 { margin: 1.2rem 0 0.4rem; color: var(--gold); }
    .impressum-text a { color: var(--gold-bright); }
    .rule-head { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.6rem; }
    .rule-icon { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; border: 1px solid var(--border); flex: none; }
    .rule-flavor { font-style: italic; color: var(--text-dim); margin: 0; }
    .ability-icon { width: 1.3em; height: 1.3em; object-fit: contain; vertical-align: -0.3em; margin-right: 0.25em; border-radius: 3px; }
    .src-one { display: block; font-size: var(--fs-sm); color: var(--text-dim); max-width: min(18rem, 100%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .hero-topbar-stats > :is(span, a) { white-space: nowrap; }
    .hero-topbar-stats > :is(span, a):not(:first-child) { margin-left: 0.7rem; }
    .topbar-stat-link { color: inherit; text-decoration: none; border-radius: 3px; }
    /* XP- und Kristall-Symbol (3.1.60): Systembilder, ersetzbar unter Admin › Upload › Bilder & Emojis */
    .topbar-icon, .crystal-icon { width: 1.15em; height: 1.15em; vertical-align: -0.22em; object-fit: contain; }
    .crystal-amount { white-space: nowrap; }
    .crystal-euro { color: var(--text-dim); font-size: var(--fs-xs); white-space: nowrap; } /* Euro neben Kristallpreisen, nur Admins (3.2.0) */
    .crystal-euro-toggle { margin: var(--sp-3) 0; }
    .fame-table .crystal-amount { white-space: nowrap; }
    .fame-table .crystal-euro { display: block; } /* Euro unter dem Kristallpreis (0.4.1.18) */
    .crystal-plus { color: var(--success); white-space: nowrap; }
    .crystal-minus { color: var(--danger); white-space: nowrap; }
    /* Kristall-Listen (3.1.69, Wunsch Wolfgang): Text links, Knopf in einer eigenen Spalte rechts – alle Knöpfe schön untereinander */
    ul.crystal-unlocks { list-style: none; padding-left: 0; margin: var(--sp-2) 0; max-width: 50rem; }
    .crystal-unlocks > li { display: grid; grid-template-columns: minmax(0, 1fr) 14rem; gap: var(--sp-1) var(--sp-4); align-items: center;
      padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
    .crystal-unlocks > li:last-child { border-bottom: 0; }
    .crystal-unlocks .cu-act { justify-self: start; }
    @media (max-width: 768px) { .crystal-unlocks > li { grid-template-columns: minmax(0, 1fr); } }
    /* Admin-Seite „Kristalle“ (3.1.64): Preisfeld und Einheit bzw. Euro-Feld bleiben in einer Zeile */
    .crystal-pair { display: inline-flex; align-items: center; gap: var(--sp-1); white-space: nowrap; }
    .crystal-prices td:not(:first-child) { white-space: nowrap; width: 1%; }
    .crystal-prices .premium-num { width: 5.5rem; }
    .pack-bonus { color: var(--success); }
    .crystal-grant-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
    .crystal-grant-fields label { display: flex; flex-direction: column; gap: var(--sp-1); }
    .crystal-grant-fields input { width: 100%; box-sizing: border-box; }
    .crystal-user-grant { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin: var(--sp-2) 0 var(--sp-1); }
    .crystal-user-grant input[name="betrag"] { width: 7rem; }
    .crystal-user-grant input[name="grund"] { flex: 1 1 10rem; min-width: 0; max-width: 18rem; }
    .quest-crystal-revive { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-left: var(--sp-2); }
    /* Kristalle (3.1.61): Knöpfe der Aktionen, aktive Pässe, Kristall-Titel (leuchtet in den Farben des Designs) */
    /* Abschlussmeldung des Laufs (0.4.4.7): je Held ein Eintrag, alphabetisch, der eigene Held grün hervorgehoben */
    .run-notes { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: grid; gap: var(--sp-1); }
    .run-notes > li { padding: 0.3rem 0.6rem; border-left: 3px solid var(--card-border); border-radius: var(--r-sm); }
    .run-notes > li:has(> .cr-self) { border-left-color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
    .run-notes > li > .cr-party { font-weight: bold; }
    /* Kopfzeile im Kampfbericht (0.4.4.76, Plan 6.1): Abstand zu den Reitern darunter */
    .report-headline { margin-bottom: var(--sp-3); }
    /* „Was hätte geholfen?“ (0.4.4.78, Plan 6.3) */
    .report-insights h3 { margin: 0 0 var(--sp-2); }
    .report-insights ul { margin: 0; padding-left: 1.2rem; display: grid; gap: var(--sp-1); }
    .run-notes ul { margin: 0.15rem 0 0; padding-left: 1.2rem; }
    /* Sofort speichern (0.4.4.6, Fixum): mit JavaScript gibt es keinen Speichern-Knopf, ohne bleibt er als Rückfall */
    html.save-js form[data-save-auto] [data-save-btn] { display: none !important; }
    /* Zurücksetzen (Talente, Fertigkeiten; 0.4.4.4, Wunsch Wolfgang): Gold-, Ruhm- und Kristall-Knopf in einer Reihe, gleich hoch */
    .reset-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--sp-2); }
    /* Wege aus dem Alleingang auf der Dungeon-Seite (Plan 4.3, 0.4.4.65): Gruppenbörse, Freunde einladen, Mietling */
    .solo-ways { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
    .reset-actions > form { display: flex; margin: 0; }
    .reset-actions .crystal-action { margin: 0; align-items: stretch; }
    .reset-actions .button { margin: 0; min-height: 2.1rem; display: inline-flex; align-items: center; justify-content: center; }
    .crystal-action { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0 0 0 var(--sp-1); vertical-align: middle; }
    /* 3.1.64 (Meldung Wolfgang): das Kristall-Symbol machte Knöpfe höher als ihre Nachbarn – im Knopf so hoch wie die Schrift */
    .button .crystal-icon, .button .topbar-icon { width: 1em; height: 1em; vertical-align: -0.125em; }
    .crystal-unlocks .crystal-action { margin-left: 0; }
    .crystal-pass-on { color: var(--success); white-space: nowrap; margin-left: var(--sp-2); }
    .crystal-balance { font-size: var(--fs-lg); }
    :is(.title-crystal, .hero-topbar-title.title-crystal) { font-style: italic; font-weight: 600; background: linear-gradient(90deg, var(--info), var(--gold-bright), var(--info)); -webkit-background-clip: text; background-clip: text; color: transparent; }
    .group-size-line { color: var(--text-dim); margin: var(--sp-2) 0; }
    @media (max-width: 768px) { .crystal-grant-fields { grid-template-columns: 1fr; } }
    .topbar-stat-link:hover { color: var(--gold); text-decoration: underline; }

    /* Einheitliche, dunkle Formularfelder (vorher teils weisse Browser-Standardfelder). */
    select, input[type="text"], input[type="number"], input[type="password"], input[type="search"], textarea {
      background: var(--field); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-sm);
      padding: 0.3rem 0.4rem; font-family: inherit;
    }
    /* Auswahllisten einheitlich breit, breiter nur bei wirklich langem Text (3.1.28, Wunsch Wolfgang: „zwecks der Übersicht“);
       nur die Seitengröße (20/50/100) bleibt schmal. */
    select { min-width: 12rem; max-width: 100%; }
    select.narrow { min-width: 0; }
    /* Nachrichten prüfen (3.1.29) */
    .review-filter { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; margin-bottom: 0.6rem; }
    .review-filter label { display: flex; flex-direction: column; gap: 0.2rem; font-size: var(--fs-sm); color: var(--text-dim); }
    .review-filter label.checkbox-label { flex-direction: row; align-items: center; }
    .review-terms { margin: 0.4rem 0 0.8rem; }
    .review-text { max-width: 34rem; overflow-wrap: anywhere; }
    .review-seen td { color: var(--text-dim); }
    /* Gesperrt / noch nicht verfügbar (GUI-04, 3.1.43): gedämpfte Schrift statt Deckkraft – bleibt lesbar, der Grund steht in der Zeile */
    .locked { color: var(--text-dim); }
    /* Nicht bedienbar (erste/letzte Seite): bewusst blass, für Screenreader als deaktiviert markiert */
    .button.is-disabled { opacity: 0.45; cursor: default; pointer-events: none; }
    .locked a:not(.button), .locked strong { color: inherit; }
    .locked img { filter: grayscale(0.8); }
    span.feat-chip.locked { border-style: dashed; }
    /* K.5 (3.1.43): auf --panel-light gilt für Nebentext --text-soft statt --text-dim (dort sonst unter 4,5 : 1), Gold wird zu Hellgold */
    .pick-card, .theme-option, .learn-card, .feat-chip, .chat-tab, .chat-head, .chat-text, .chat-react-pick, .spell-slots, .spell-pool,
    .room-chip, .ttt-cell, .fm-hero, .if-chip, .creation-admin-cell, .stage-flavor-text, .tutorial-box-text, .review-hit, .portrait-missing, .button.alt { --text-dim: var(--text-soft); }
    .tutorial-box-text .tutorial-flavor { color: var(--gold-bright); }
    .mail-icon .tile-ink { stroke: var(--tile-ink); }
    .review-hit { display: inline-block; padding: 0.05rem 0.4rem; margin: 0 0.2rem 0.2rem 0; border-radius: 3px; font-size: var(--fs-xs); border: 1px solid var(--border); background: var(--panel-light); white-space: nowrap; }
    .review-hit.review-hilferuf, .review-hit.review-drohung { border-color: var(--danger); color: var(--danger); }
    .review-hit.review-beleidigung, .review-hit.review-zugangsdaten { border-color: var(--warning); color: var(--warning); }
    .review-table button { white-space: nowrap; }
    .premium-form { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; margin: 0; }
    .premium-form input[type="date"] { width: 9.5rem; }
    .premium-line { color: var(--text-dim); }
    .loot-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; margin-top: 0.6rem; }
    .loot-form label { display: flex; flex-direction: column; gap: 0.2rem; font-size: var(--fs-sm); color: var(--text-dim); }
    .loot-form input[type="text"] { min-width: 18rem; }
    .premium-line.on { color: var(--gold-bright); }
    /* Passkeys (3.1.62): Anmeldeseite und „Mein Konto“ */
    .passkey-login { margin-top: var(--sp-3); text-align: center; }
    .passkey-login .button { width: 100%; }
    .passkey-or { color: var(--text-dim); margin: 0 0 var(--sp-2); }
    .passkey-app-note { color: var(--text-dim); font-size: var(--fs-sm); margin: 1rem 0 0; }
    .passkey-status { min-height: 1.3em; margin: var(--sp-2) 0 0; color: var(--text-dim); }
    .passkey-status:empty { min-height: 0; margin: 0; }
    .passkey-table td:last-child { white-space: nowrap; }
    .premium-benefits { margin: var(--sp-2) 0; padding-left: 1.3rem; }
    .premium-benefits li { margin: 0.2rem 0; }
    .premium-note { color: var(--text-dim); font-size: var(--fs-sm); }
    .premium-buy { max-width: 40rem; display: flex; flex-direction: column; gap: var(--sp-2); }
    .premium-products { border: 1px solid var(--card-border); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3); display: grid; gap: var(--sp-2); }
    .premium-products legend { color: var(--gold); padding: 0 0.3rem; }
    .premium-product { display: flex; align-items: center; gap: var(--sp-2); cursor: pointer; }
    .premium-price { margin-left: auto; color: var(--gold-bright); font-weight: bold; }
    /* Admin-Seite „Premium“ (3.1.50) */
    .premium-admin { max-width: 52rem; }
    .premium-admin label.field-label { display: block; margin: 0.8rem 0 0.25rem; color: var(--gold); font-size: var(--fs-sm); }
    .premium-admin .premium-num { width: 6.5rem; min-width: 0; }
    .premium-admin select { max-width: 100%; }
    .premium-settings td:first-child { min-width: 14rem; }
    .premium-hint { color: var(--text-dim); font-size: var(--fs-sm); }
    .premium-settings .premium-hint { margin-top: 0.15rem; }
    /* Werbeplatz unten (3.1.49, Test): fest am unteren Rand, die Chat-Leiste sitzt darüber, Inhalt und Menü bekommen Platz. */
    :root { --ad-h: calc(50px + 1.4rem + env(safe-area-inset-bottom, 0px)); }
    @media (min-width: 769px) { :root { --ad-h: calc(90px + 1.4rem); } }
    .ad-slot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 850; display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
      background: var(--panel); border-top: 1px solid var(--border); box-shadow: var(--shadow-overlay); padding: 0.15rem 0.5rem calc(0.25rem + env(safe-area-inset-bottom, 0px)); }
    .ad-slot[hidden] { display: none; }
    .ad-meta { display: flex; gap: 0.8rem; align-items: baseline; font-size: var(--fs-xs); line-height: 1.1rem; color: var(--text-dim); }
    .ad-label { text-transform: uppercase; letter-spacing: 0.05em; }
    .ad-premium { color: var(--gold); }
    .ad-creative, .ad-creative img { display: block; max-width: 100%; height: auto; }
    .ad-creative img { max-height: 90px; } /* ein vom Blocker untergeschobenes 1×1-Bild bläht den Platz nicht auf */
    .ad-close { position: absolute; top: 0.15rem; right: 0.4rem; min-width: 24px; min-height: 24px; padding: 0 0.35rem; font-size: var(--fs-md); line-height: 1;
      background: transparent; color: var(--text-dim); border: 1px solid var(--border); border-radius: var(--r-sm); cursor: pointer; }
    .ad-close:hover { color: var(--text); border-color: var(--gold); }
    /* 3.1.57: kein Werbe-Merkmal am <body> – Werbeblocker blenden Elemente mit Werbe-Namen aus, mit der früheren Werbe-Klasse am body verschwand damit die
       ganze Seite (weiß, nicht einmal Abmelden ging). Der Platz wird über :has() am Werbeplatz selbst erkannt. */
    body:has(> #ad-slot:not([hidden])) main { padding-bottom: calc(var(--ad-h) + 1rem) !important; }
    body.has-chat:has(> #ad-slot:not([hidden])) main { padding-bottom: calc(var(--ad-h) + 4.5rem) !important; }
    body:has(> #ad-slot:not([hidden])) .chat-dock { bottom: var(--ad-h); }
    /* Am Handy liegt das offene Menü über dem Werbeplatz – dort braucht es keinen Platz dafür (0.4.0.34, Meldung Wolfgang: „Abmelden viel zu weit oben“) */
    @media (min-width: 769px) { body:has(> #ad-slot:not([hidden])) nav.sidebar { --nav-pb: calc(var(--ad-h) + 1.2rem); padding-bottom: var(--nav-pb); } }
    /* Geführte Einführung (3.2.5, data/onboarding.ts): Karte unten neben dem Menü, Hervorhebung des Elements, Frage für neue Konten */
    .tour-coach [hidden], .tour-coach[hidden], .tour-pill[hidden] { display: none !important; }
    .tour-coach { position: fixed; left: calc(234px + 1rem); bottom: 1rem; z-index: 1050; width: min(27rem, calc(100vw - 234px - 2rem)); background: var(--panel); color: var(--text);
      border: 2px solid var(--gold); border-radius: var(--r-md); box-shadow: var(--shadow-overlay); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); }
    .tour-head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
    .tour-phase { color: var(--gold); font-weight: bold; }
    .tour-min { background: transparent; border: 1px solid var(--border); color: var(--text-dim); border-radius: var(--r-sm); min-width: 24px; min-height: 24px; cursor: pointer; }
    .tour-step .tour-title { display: block; color: var(--gold-bright); font-size: var(--fs-md); margin-bottom: var(--sp-1); }
    .tour-step p { margin: 0 0 var(--sp-2); line-height: 1.45; }
    .tour-nav { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
    .tour-nav .tour-count { color: var(--text-dim); margin-right: auto; }
    .tour-nav form { margin: 0; }
    .tour-foot { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); margin: var(--sp-2) 0 0; padding-top: var(--sp-2); border-top: 1px solid var(--border); }
    .tour-topics > summary { cursor: pointer; color: var(--text-soft); font-size: var(--fs-sm); min-height: 24px; }
    .tour-topics[open] { flex: 1 1 100%; }
    .tour-topic-list { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; margin-top: var(--sp-1); }
    .tour-topic-list form { margin: 0; }
    .tour-topic { background: none; border: none; color: var(--text); cursor: pointer; font-size: var(--fs-sm); padding: 0.2rem 0; min-height: 24px; text-align: left; font-family: inherit; }
    .tour-topic:hover { color: var(--gold-bright); text-decoration: underline; }
    .tour-topic.current { color: var(--gold); font-weight: bold; }
    .tour-skip { background: none; border: none; color: var(--text-dim); text-decoration: underline; cursor: pointer; font-size: var(--fs-xs); min-height: 24px; }
    .tour-pill { position: fixed; left: calc(234px + 1rem); bottom: 1rem; z-index: 1050; background: var(--panel); color: var(--gold); border: 2px solid var(--gold); border-radius: var(--r-pill); padding: 0.35rem 0.9rem; cursor: pointer; font-size: var(--fs-sm); box-shadow: var(--shadow-card); }
    .tour-focus { outline: 3px solid var(--gold-bright) !important; outline-offset: 3px; border-radius: 4px; animation: tour-pulse 1.6s ease-in-out infinite; }
    /* Reiter- und Knopfleisten sind Flex-Zeilen über die ganze Breite – hervorgehoben nur so breit wie ihr Inhalt (0.4.4.125, Wunsch Wolfgang) */
    .tab-bar.tour-focus, .wizard-nav.tour-focus, .tour-focus:is(.solo-ways, .tour-choices) { width: fit-content; max-width: 100%; }
    @keyframes tour-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 55%, transparent); } 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--gold) 0%, transparent); } }
    @media (prefers-reduced-motion: reduce) { .tour-focus { animation: none; } }
    body main:has(> .tour-coach) { padding-bottom: 15rem !important; }
    body:has(> #ad-slot:not([hidden])) .tour-coach:not(.tour-intro), body:has(> #ad-slot:not([hidden])) .tour-pill { bottom: calc(var(--ad-h) + 1rem); }
    /* Erstes Fenster eines Rundgangs (0.4.4.34, Wunsch Wolfgang: „das erste Fenster immer als Pop in der Mitte, farblich abgesetzt“, Akzent
       in Elminthirs Rot, sein Bild wie im Tutorial): wodTour setzt .tour-intro an die Karte und zeigt den Schleier davor. Beide liegen auf
       der Ebene der Seitenfenster (.board-modal, kommt im Dokument später): ein Ergebnisfenster steht darüber, Menüknopf, Menü und Chat
       darunter; Bestätigungen (.wod-dialog) und Infofenster (.peek) sowieso. */
    .tour-veil { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.6); }
    .tour-veil[hidden] { display: none; }
    .tour-coach.tour-intro { --tour-pad: var(--sp-5); left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%); z-index: 1000;
      width: min(32rem, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
      padding: 0 var(--tour-pad) var(--sp-4); font-size: var(--fs-md); border: 3px solid var(--elminthir);
      background: linear-gradient(color-mix(in srgb, var(--elminthir) 18%, var(--panel)), color-mix(in srgb, var(--elminthir) 6%, var(--panel)));
      box-shadow: 0 0 0 4px color-mix(in srgb, var(--elminthir) 35%, transparent), 0 0 40px color-mix(in srgb, var(--elminthir) 55%, transparent), var(--shadow-overlay); }
    .tour-coach.tour-intro .tour-head { margin: 0 calc(-1 * var(--tour-pad)) var(--sp-3); padding: var(--sp-2) var(--tour-pad); background: var(--elminthir); }
    .tour-coach.tour-intro .tour-phase { color: var(--badge-text); }
    .tour-coach.tour-intro .tour-min { color: var(--badge-text); border-color: currentColor; }
    .tour-coach.tour-intro .tour-step .tour-title { color: var(--elminthir-ink); font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
    .tour-portrait { display: none; }
    .tour-coach.tour-intro .tour-portrait { display: block; float: left; width: 72px; height: 72px; margin: 0 var(--sp-3) var(--sp-2) 0;
      border-color: var(--elminthir); box-shadow: 0 0 10px color-mix(in srgb, var(--elminthir) 50%, transparent); }
    .tour-coach.tour-intro .tour-steps::after { content: ""; display: block; clear: both; }
    /* Aufgabe eines Schritts (0.4.4.70, Plan 5.1/5.2): die Anweisung im Schritt, „Probier es aus“ statt „Weiter“, danach ein grüner Satz */
    .tour-step p.tour-task { margin: 0 0 var(--sp-2); padding: var(--sp-1) var(--sp-2); border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); color: var(--text); }
    .tour-step p.tour-task-done { margin: 0 0 var(--sp-2); color: var(--success); }
    .tour-step p.tour-task-done::before { content: "✓ "; }
    .tour-try { color: var(--gold-bright); font-weight: bold; font-size: var(--fs-sm); padding: 0.2rem 0.6rem; border: 1px dashed var(--gold); border-radius: var(--r-sm); }
    /* Wahl am Ende der Einführung (0.4.4.70, Audit T4): drei Wege nebeneinander, am Handy untereinander */
    .tour-choices { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
    .tour-choices form { margin: 0; }
    /* Kontexthilfen (0.4.4.69, data/areaTours.ts): Text im Format der Tutorials – Einleitung kursiv, höchstens fünf Punkte */
    .area-tour .tour-text ul { margin: 0 0 var(--sp-2); padding-left: 1.2rem; }
    .area-tour .tour-text li { margin-bottom: var(--sp-1); line-height: 1.4; }
    /* Seite „Hilfe“ (0.4.4.69): Stand je Kontexthilfe */
    .help-status.help-offen { color: var(--text-dim); }
    .help-status.help-begonnen { color: var(--gold); }
    .help-status.help-gesehen { color: var(--success); }
    .help-tours .hint { color: var(--text-dim); font-size: var(--fs-sm); }
    .tour-ask { position: fixed; inset: 0; z-index: 1250; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.6); }
    .tour-ask-box { background: var(--panel); color: var(--text); border: 2px solid var(--gold); border-radius: var(--r-md); box-shadow: var(--shadow-overlay); padding: var(--sp-5); max-width: 32rem; width: 100%; text-align: center; }
    .tour-ask-box .tutorial-portrait { float: none; display: block; margin: 0 auto var(--sp-3); }
    .tour-ask-box h2 { margin-top: 0; }
    /* „Dein nächster Schritt“ über den Neuigkeiten (Plan 4.2, 0.4.4.66): bis zu drei Karten, Knopf unten bündig */
    .next-steps { border: 1px solid var(--gold); border-radius: var(--r-md); background: var(--panel); padding: var(--sp-3); margin: 0 0 var(--sp-4); }
    .next-steps h2 { margin-top: 0; }
    .next-step-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--sp-3); }
    .next-step-card { display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-2); border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); padding: var(--sp-2) var(--sp-3); }
    .next-step-card p { margin: 0; }
    .next-step-card > .button { align-self: flex-start; margin-bottom: 0; }
    /* „Worum geht es?“ im Willkommensfenster (Plan 4.1, 0.4.4.65); mit den drei Sätzen wird das Fenster höher – am Handy scrollt es */
    /* Schatzkisten des Tages: 3 × 3 Pixelart-Kisten, auch am Handy; geöffnet zeigt sich Gold, ein Mimic verwandelt sich */
    .chest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 6rem)); justify-content: center; gap: var(--sp-3); margin: var(--sp-3) 0; }
    .chest-cell { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); background: none; border: 0; padding: var(--sp-1); margin: 0; color: var(--text-dim); font: inherit; font-size: var(--fs-sm); min-height: 24px; }
    .chest-btn { cursor: pointer; border-radius: var(--r-sm); transition: transform 0.12s steps(3), filter 0.12s; }
    .chest-btn:hover, .chest-btn:focus-visible { transform: translateY(-3px); filter: brightness(1.15); outline: 2px solid var(--gold); }
    .chest-sprite { width: 100%; height: auto; display: block; image-rendering: pixelated; }
    .chest-wait { opacity: 0.55; }
    .chest-fresh .chest-sprite { animation: chest-pop 0.5s steps(6) 1; }
    .chest-fresh-mimic .chest-sprite { animation: chest-mimic 0.7s steps(8) 1; }
    @keyframes chest-pop { 0% { transform: scale(0.8); } 50% { transform: scale(1.18) translateY(-4px); } 100% { transform: scale(1); } }
    @keyframes chest-mimic { 0% { transform: scale(0.85); } 25% { transform: translateX(-4px) scale(1.1); } 50% { transform: translateX(4px) scale(1.25); } 75% { transform: translateX(-3px) scale(1.15); } 100% { transform: scale(1); } }
    @media (prefers-reduced-motion: reduce) { .chest-fresh .chest-sprite, .chest-fresh-mimic .chest-sprite { animation: none; } .chest-btn { transition: none; } }
    .chest-result { text-align: left; border-left: 3px solid var(--gold); padding: var(--sp-1) 0 var(--sp-1) var(--sp-3); margin: 0 0 var(--sp-3); }
    .chest-result p { margin: 0 0 var(--sp-1); }
    .chest-result ul { margin: 0; padding-left: var(--sp-4); }
    .tour-about { text-align: left; border-left: 3px solid var(--gold); padding: var(--sp-1) 0 var(--sp-1) var(--sp-3); margin: 0 0 var(--sp-3); }
    .tour-about h3 { margin: 0 0 var(--sp-1); font-size: var(--fs-md); }
    .tour-about p { margin: 0; }
    .tour-ask > .tour-ask-box { max-height: calc(100vh - 32px); overflow-y: auto; }
    .tour-ask-actions { display: flex; flex-direction: column; gap: var(--sp-2); margin: var(--sp-3) 0; }
    .tour-ask-actions form { margin: 0; }
    .tour-ask-actions .button { width: 100%; }
    /* Wahl der Ansicht (0.4.4.56, Plan Phase 2): Willkommensfenster und Mein Konto › Interface & Design */
    .tour-ask-form { margin: 0; }
    /* Einfache Ansicht / Expertenansicht (0.4.4.57, Plan Phase 2.5): Fassungen je Ansicht des Kontos (body[data-ansicht], ohne Wert wie
       „experte“). Jeder Block nur für Experten braucht einen Weg aus der einfachen Ansicht (tests/viewMode.test.ts). */
    body:not([data-ansicht="einfach"]) .nur-einfach, body[data-ansicht="einfach"] .nur-experte { display: none !important; }
    details.mehr-werte { margin: var(--sp-2) 0; }
    details.mehr-werte > summary { display: inline-block; list-style: none; cursor: pointer; padding-block: 0.25rem; color: var(--gold); font-size: var(--fs-sm); }
    details.mehr-werte > summary::-webkit-details-marker { display: none; }
    details.mehr-werte > summary::after { content: " ▸"; }
    details.mehr-werte[open] > summary::after { content: " ▾"; }
    .mehr-werte-inhalt { margin-top: var(--sp-1); }
    /* „wie in meinem Konto“ (0.4.4.57, Plan Phase 2.4): Seitenschalter von Taktik und Heldenbogen zurück auf die Ansicht des Kontos */
    button.view-reset { background: none; border: 0; margin: 0; padding: 0.25rem 0; min-height: 24px; cursor: pointer; font: inherit; font-size: var(--fs-sm); color: var(--text-dim); text-decoration: underline; text-underline-offset: 0.2em; align-self: center; }
    button.view-reset:hover, button.view-reset:focus-visible { color: var(--gold-bright); }
    button.view-reset[hidden] { display: none; }
    /* Neuerungen (0.4.4.29, data/featureNotices.ts): längerer Text links ausgerichtet; auf kleinen Bildschirmen scrollt das Fenster selbst. */
    .feature-notice .tour-ask-box { max-height: calc(100vh - 32px); overflow-y: auto; }
    .feature-notice-tag { margin: 0 0 var(--sp-1); color: var(--gold); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; }
    .feature-notice-text { text-align: left; }
    .feature-notice-text ul { margin: var(--sp-1) 0 var(--sp-2); padding-left: 1.2rem; }
    @media (max-width: 768px) {
      .tour-coach { left: 0.5rem; right: 0.5rem; width: auto; bottom: calc(3.2rem + env(safe-area-inset-bottom, 0px)); padding: var(--sp-2) var(--sp-3); max-height: 45vh; overflow-y: auto; }
      .tour-pill { left: 0.5rem; bottom: calc(3.2rem + env(safe-area-inset-bottom, 0px)); }
      body main:has(> .tour-coach) { padding-bottom: 50vh !important; }
      .tour-coach.tour-intro { --tour-pad: var(--sp-3); }
      .tour-coach.tour-intro .tour-portrait { width: 56px; height: 56px; }
    }
    .hero-topbar-title { color: var(--gold-bright); font-style: italic; font-size: var(--fs-sm); text-decoration: none; margin-left: 0.35rem; }
    .hero-topbar-title:hover { text-decoration: underline; }
    .title-form { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; margin: 0; }
    .title-form input[type="text"] { min-width: 12rem; flex: 1 1 12rem; }
    .premium-abilities { margin-top: var(--sp-3); border: 1px solid var(--card-border); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3); }
    .premium-abilities summary { cursor: pointer; color: var(--gold-bright); }
    /* 3 oben, 3 unten (3.1.54, Wunsch Wolfgang): Name über der Auswahl, damit nichts übereinanderliegt – auch am Handy. */
    .premium-ability-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-3); margin: var(--sp-2) 0 0; }
    .premium-ability-form label { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-1); min-width: 0; }
    .premium-ability-form .pa-name { font-size: var(--fs-sm); color: var(--text-dim); white-space: nowrap; }
    .premium-ability-form select { min-width: 0; width: 100%; }
    .premium-ability-note { color: var(--text-dim); font-size: var(--fs-sm); margin: var(--sp-2) 0 0; }
    .message-check-note { font-size: var(--fs-sm); color: var(--text-dim); margin: 0.6rem 0 0; }
    select:focus, input:focus, textarea:focus { outline: 1px solid var(--gold); border-color: var(--gold); }
    option { background: var(--field); color: var(--text); }

    /* --- Desktop: Menue bleibt beim Scrollen langer Seiten stehen (eigener Scrollbereich) --- */
    @media (min-width: 769px) {
      nav.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; align-self: flex-start; display: flex; flex-direction: column; }
      /* Feste Breite (0.4.1.18, Feedback „Zeilensprung im Menü“): der Platz für den Scrollbalken ist immer reserviert – kommt er bei
         aufgeklappten Menügruppen dazu, bricht kein Menüpunkt mehr um und die Seite daneben springt nicht */
      nav.sidebar { scrollbar-gutter: stable; min-width: 200px; max-width: 200px; box-sizing: border-box; }
      html { scrollbar-gutter: stable; }
    }

    /* --- Mobile-Feinschliff (steht bewusst am ENDE, damit nichts davon von spaeteren
       Grundregeln ueberschrieben wird - vorher verdeckte der Menue-Knopf so die Kopfleiste) --- */
    @media (max-width: 768px) {
      /* Menue: echte Bildschirmhoehe (100dvh statt 100vh - sonst liegen die unteren Punkte hinter
         der Browser-Adressleiste), eigenes Scrollen ohne dass die Seite dahinter mitscrollt, und
         Platz oben fuer den Menue-Knopf. */
      nav.sidebar {
        height: 100vh;
        height: 100dvh;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding-top: 3.8rem;
        /* „Mein Konto“ und „Abmelden“ ganz unten an der Bildschirmkante (0.4.0.34): Spalte wie am PC, unten nur der sichere Rand des Geräts */
        display: flex;
        flex-direction: column;
        --nav-pb: calc(1rem + env(safe-area-inset-bottom, 0px));
        padding-bottom: var(--nav-pb);
      }
      nav.sidebar a, nav.sidebar a.navgroup-direct { padding-top: 0.45rem; padding-bottom: 0.45rem; }
      nav.sidebar details.navgroup summary { padding-top: 0.4rem; padding-bottom: 0.4rem; }
      /* Abgedunkelter Hintergrund bei offenem Menue - Tippen daneben schliesst es. */
      .sidebar-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 998; }
      .sidebar-toggle-checkbox:checked ~ .sidebar-backdrop { display: block; }
      /* Bei offenem Menue wandert der Knopf rechts neben das Menue (verdeckt keine Menuepunkte
         mehr und schliesst es wieder). */
      .sidebar-toggle-checkbox:checked ~ .sidebar-toggle-btn { left: calc(min(80vw, 280px) + 0.6rem); }
      body:has(.sidebar-toggle-checkbox:checked) { overflow: hidden; }

      /* Kopfleiste: bleibt oben stehen und macht Platz fuer den Menue-Knopf. */
      .hero-topbar { position: sticky; top: 0; z-index: 900; padding: 0.5rem 0.7rem 0.5rem 4.4rem; min-height: 3.2rem; gap: 0.4rem; font-size: var(--fs-sm); }
      /* Untereinander (3.1.16, 0.4.0.19 Wunsch Wolfgang): Heldenname, Titel in eigener Zeile, Gold/Ruhm/XP/Siegel/Kristalle, Knöpfe */
      .hero-topbar { flex-direction: column; align-items: flex-start; justify-content: flex-start; }
      .hero-topbar-left { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; max-width: 100%; min-width: 0; }
      .hero-topbar-name { display: block; max-width: 100%; overflow-wrap: anywhere; }
      .hero-topbar-name > a.hero-topbar-title { display: block; margin: 0.1rem 0 0; }
      .hero-topbar-values { display: block; white-space: nowrap; }
      .hero-topbar-label { display: none !important; }
      .hero-switch-mobile { display: inline-flex; }
      .hero-topbar-stats > :is(span, a):not(:first-child) { margin-left: 0.45rem; }
      /* breite Tabellen ohne Kartenansicht scrollen in sich, nicht die Seite (v0.2.185) */
      main table:not(.mobile-cards) { display: block; max-width: 100%; overflow-x: auto; }
      .pagination { justify-content: center; }
      .hero-topbar .channel-badge { font-size: var(--fs-xs); padding: 0.05rem 0.35rem; }
      main { padding: 1rem !important; }
      h1.page-title { font-size: var(--fs-xl); }

      /* Tippflaechen: mind. ~40px hoch; 16px Schrift in Eingabefeldern verhindert das
         automatische Hineinzoomen von iOS beim Antippen. */
      .button, button { min-height: 40px; }
      .button.small, button.small { min-height: 36px; padding-top: 0.4rem; padding-bottom: 0.4rem; }
      /* Link-Knöpfe mit der Mindesthöhe: Text mittig wie bei <button> (0.4.1.18, „Bestellen“ in der Werkstatt stand versetzt) */
      a.button, label.button, span.button { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
      select, input[type="text"], input[type="number"], input[type="password"], textarea { min-height: 40px; font-size: 16px; }
      /* Alle Eingabefelder mindestens 16 px, auch Such-, E-Mail-, Telefon-, Adress- und Datumsfelder und solche mit eigener Klassenschrift
         (Lager, Beschichtung, Chat, Texte): darunter zoomt iOS beim Antippen hinein, die Seite verrutscht und die Tastatur geht mehrfach
         auf (Feedback Wolfgang 12.11.2026, „passt nicht, Tastatur geht öfter auf“). */
      :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="hidden"], [type="submit"], [type="button"], [type="image"], [type="color"]), select, textarea) { font-size: 16px !important; }
      :is(input[type="search"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"]) { min-height: 40px; }

      /* Tabellen: kompakter, Kopfzeilen nicht umbrechen; breite Tabellen scrollen seitlich. */
      .feat-table th, .feat-table td { padding: 0.35rem 0.45rem; font-size: var(--fs-sm); }
      .feat-table th { white-space: nowrap; }

      /* Breite Tabellen als Karten: eine Karte je Zeile, Zellen untereinander mit Beschriftung. */
      .feat-table.mobile-cards { display: block; overflow: visible; max-width: 100%; }
      .item-filter .if-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.25rem; }
      /* Die zwei Zeilen der Hauptkategorien scrollen gemeinsam (0.4.3.40, Wunsch Wolfgang) */
      .item-filter .if-main { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.25rem; }
      .item-filter .if-main > .if-chips { overflow: visible; width: max-content; padding-bottom: 0; }
      .item-filter .if-row select { width: auto; min-width: 0; flex: 1 1 40%; }
      .item-filter .if-search { flex-basis: 100%; }
      .overview-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      /* Handy: die Suche hat immer eine eigene Zeile, beide Auswahlfelder stehen gemeinsam darunter (Feedback Nr. 3). */
      .item-filter .if-row input[type="search"].lupe, .item-filter .if-row input[type="search"].lupe:focus, .item-filter .if-row input[type="search"].lupe:not(:placeholder-shown) { flex: 1 1 100% !important; width: 100%; }
      .feat-table.mobile-cards thead { display: none; }
      .feat-table.mobile-cards tbody { display: block; }
      .feat-table.mobile-cards tr { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 0.4rem 0.6rem; margin-bottom: 0.6rem; }
      .feat-table.mobile-cards td { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; border-bottom: 1px dashed rgba(255, 255, 255, 0.07); padding: 0.35rem 0; text-align: right; }
      .feat-table.mobile-cards td:last-child { border-bottom: none; }
      .feat-table.mobile-cards td:first-child { font-size: var(--fs-md); text-align: left; }
      /* Kartenkopf mit fester Reihenfolge (3.1.47, GUI-22): Bild · Name · Zusätze, das Teilen-Symbol immer rechts oben */
      .feat-table.mobile-cards td:first-child { display: block; }
      .feat-table.mobile-cards td:first-child .share-btn { float: right; margin: 0 0 0 0.4rem; }
      .feat-table.mobile-cards td:has(> select) > select { width: 100%; }
      .feat-table.mobile-cards td[data-label]::before { content: attr(data-label); color: var(--gold); font-size: var(--fs-sm); text-align: left; flex-shrink: 0; max-width: 45%; }
      .feat-table.mobile-cards td:first-child[data-label]::before { display: none; }
      .feat-table.mobile-cards td:empty { display: none; }
      .feat-table.mobile-cards td form { margin: 0; }
      .feat-table.mobile-cards td select { max-width: 100%; }
      /* Zellen mit Formular (z.B. "Verschieben nach"): Beschriftung oben, Formular darunter in voller Breite. */
      .feat-table.mobile-cards td:has(form, select) { display: block; text-align: left; }
      .feat-table.mobile-cards td.feat-desc { display: block; text-align: left; }
      .feat-table.mobile-cards td:has(form, select)::before { display: block; max-width: none; margin-bottom: 0.3rem; }
      .feat-table.mobile-cards td:has(form, select) form { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
      .feat-table.mobile-cards td:has(form, select) form select { flex: 1 1 160px; min-width: 0; }
      .feat-table.mobile-cards td[colspan] { display: block; text-align: left; }
      /* Vergleich je Platz (v0.3.69) unter dem Namen statt daneben */
      .feat-table.mobile-cards td:has(.item-compare) { flex-wrap: wrap; justify-content: flex-start; }
      .feat-table.mobile-cards td .item-compare { flex-basis: 100%; text-align: left; }
      /* Gruppe am Handy (v0.3.78, Wunsch Wolfgang): Bezeichnung oben, Inhalt darunter – Name, Titel, Volk/Klasse und die Rechte
         stehen untereinander statt nebeneinander und laufen nicht mehr rechts aus der Karte. */
      .feat-table.mobile-cards.group-hero-table td { display: block; text-align: left; }
      .feat-table.mobile-cards.group-hero-table tr.gh-frame { border: var(--gh-b); background: color-mix(in srgb, var(--gh-c) 10%, var(--panel)); }
      .feat-table.mobile-cards.group-hero-table tr.gh-frame > td { border: none; background: none; box-shadow: none !important; }
      .feat-table.mobile-cards.group-hero-table tr.frame-sterne, .feat-table.mobile-cards.group-hero-table tr.frame-gold { box-shadow: 0 0 10px color-mix(in srgb, var(--gh-c) 45%, transparent); }
      .feat-table.mobile-cards.group-hero-table td[data-label]::before { display: block; max-width: none; margin-bottom: 0.15rem; }
      .feat-table.mobile-cards.group-hero-table td:first-child[data-label]::before { display: none; }
      /* Porträt am Handy (0.4.4.10) links, Name, Position und Bemerkung daneben */
      .feat-table.mobile-cards.group-hero-table tr { display: flow-root; }
      .feat-table.mobile-cards.group-hero-table td.gh-portrait-cell { float: left; margin: 0 var(--sp-3) var(--sp-2) 0; padding: 0; border: none; }
      .feat-table.mobile-cards.group-hero-table td:not(.gh-portrait-cell) { display: flow-root; }

      /* Inventar: kleineres Bild, Slots in voller Breite. */
      .inventory-portrait { width: 160px; max-height: 240px; }
      .inventory-slots-column { width: 100%; }
    }
    /* Tiergefährte (0.4.4.0): Artwahl mit Kurzwerten und Werteblatt nach Vorlage „Animal Companion Card“ */
    .companion-pick { align-items: flex-start; text-align: left; }
    .companion-pick-text { color: var(--text-dim); }
    .companion-pick-stats { color: var(--text); font-size: var(--fs-xs); }
    .companion-pay { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-top: var(--sp-3); }
    .companion-pay .button { margin-bottom: 0; }
    .companion-change > summary { cursor: pointer; font-weight: bold; }
    .companion-gear-form { margin: 0; display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
    .companion-gear-info { margin-top: var(--sp-1); color: var(--text-dim); font-size: var(--fs-sm); }
    .cc-sheet { font-family: Georgia, 'Times New Roman', serif; }
    .cc-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); }
    .cc-field { display: flex; flex-direction: column; border-bottom: 1px solid var(--border); min-width: 0; }
    .cc-field.cc-wide { grid-column: span 2; }
    .cc-val { font-size: var(--fs-md); color: var(--text-strong); overflow-wrap: anywhere; }
    .cc-lbl { font-size: var(--fs-xs); color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
    .cc-small { font-size: var(--fs-xs); color: var(--text-dim); }
    .cc-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-4); }
    .cc-abilities { display: flex; flex-direction: column; gap: var(--sp-2); }
    .cc-ab { display: grid; grid-template-columns: 2.4rem 2.6rem 2.6rem; align-items: center; gap: var(--sp-1); }
    .cc-ab-name { background: var(--gold); color: var(--on-accent); font-weight: bold; text-align: center; border-radius: var(--r-sm); padding: 0.2rem 0; }
    .cc-ab-val, .cc-ab-mod { border: 1px solid var(--border); border-radius: var(--r-sm); text-align: center; padding: 0.2rem 0; background: var(--panel-light); }
    .cc-ab-mod { color: var(--text-strong); }
    .cc-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-2); margin-bottom: var(--sp-2); }
    .cc-stats.cc-saves { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 50%; margin-bottom: var(--sp-3); }
    .cc-stat { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0.25rem 0.5rem; background: var(--panel-light); }
    .cc-stat-lbl { font-size: var(--fs-xs); color: var(--text-soft); text-transform: uppercase; }
    .cc-stat-val { font-weight: bold; color: var(--text-strong); }
    .cc-actions { width: 100%; }
    .cc-lines p { margin: var(--sp-1) 0; }
    .cc-next { margin: var(--sp-3) 0 0; padding-top: var(--sp-2); border-top: 1px dashed var(--border); color: var(--text-dim); }
    @media (max-width: 768px) {
      .cc-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .cc-body { grid-template-columns: 1fr; }
      .cc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .cc-stats.cc-saves { max-width: none; }
      .cc-abilities { display: grid; grid-template-columns: repeat(2, auto); justify-content: start; }
    }
    /* Angel-Minispiel (0.4.5.31, 0.4.6.5): Gewässerbilder und Ausrüstung davor, danach läuft alles im Spielfenster (Anzeige, Hinweis, Knöpfe, Ergebnis als Auflage) */
    .angel { max-width: 460px; margin: 0 auto; }
    /* Fischbuch und Bestenlisten links, Ausrüstung und Gewässerwahl rechts (Plätze getauscht, Wunsch Wolfgang 12.11.2026); auf dem Handy bleibt das Spiel oben */
    @media (min-width: 769px) { .angel:has(.angel-menu:not([hidden])) { max-width: 980px; } .angel-menu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: var(--sp-4); align-items: start; } .angel-menu .angel-side { order: -1; } }
    .angel-menu[hidden] { display: none; }
    .angel-side h3 { margin: var(--sp-3) 0 var(--sp-1); font-size: var(--fs-md); }
    .angel-board { margin: 0; padding-left: 1.5em; }
    .angel-board li { padding: var(--sp-1) 0; }
    .angel-board li.mine { color: var(--text-strong); font-weight: 600; }
    .angel-board li b { float: right; }
    .angel-board li small { display: block; color: var(--text-dim); font-size: var(--fs-xs); }
    .angel-map svg { cursor: default; }
    .angel-spot { cursor: pointer; outline: none; }
    .angel-spot .hit { fill: transparent; }
    .angel-spot .ring { fill: none; stroke: transparent; stroke-width: 3; }
    .angel-spot .dot { fill: var(--info); stroke: var(--bg); stroke-width: 3; }
    .angel-spot.locked .dot { fill: var(--text-dim); }
    .angel-spot.shown .ring { stroke: var(--text-strong); }
    .angel-spot.on .dot { fill: var(--gold); }
    .angel-spot.on .ring { stroke: var(--gold-bright); stroke-width: 4; }
    .angel-spot:focus-visible .ring { stroke: var(--text-strong); stroke-dasharray: 5 3; }
    .angel-spot-label { fill: var(--text-strong); font-weight: bold; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
    .angel-water-info { display: flex; gap: var(--sp-3); align-items: center; margin: 0 0 var(--sp-3); }
    .angel-water-info canvas { width: 96px; aspect-ratio: 8 / 5; image-rendering: pixelated; border: 2px solid var(--border); flex: none; }
    .angel-water-info b { display: block; color: var(--text-strong); }
    .angel-water-info span { color: var(--text-dim); font-size: var(--fs-sm); }
    .angel-book td, .angel-book th { vertical-align: middle; }
    .angel-book .angel-book-fish { white-space: nowrap; }
    .angel-book .angel-book-fish canvas { display: inline-block; vertical-align: middle; width: 48px; height: 24px; margin-right: var(--sp-2); image-rendering: pixelated; }
    .angel-book .angel-book-fish span { display: inline-block; vertical-align: middle; color: var(--text-strong); }
    .angel-book .angel-book-fish small { display: block; margin-left: calc(48px + var(--sp-2)); color: var(--text-dim); font-size: var(--fs-xs); white-space: normal; }
    .angel-book td small { display: block; color: var(--text-dim); font-size: var(--fs-xs); }
    .angel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); margin: var(--sp-2) 0; }
    .angel-grid label { display: flex; flex-direction: column; gap: var(--sp-1); color: var(--text-dim); font-size: var(--fs-sm); }
    .angel-gear, .angel-msg { color: var(--text-dim); font-size: var(--fs-sm); }
    .angel-screen { --angel-panel: var(--panel); --angel-accent: var(--gold); position: relative; border: 3px solid var(--angel-accent); background: var(--bg); line-height: 1.35; overflow: hidden; }
    /* kein blaues Antippen und keine Textauswahl im Spielfenster (Handy, 0.4.6.6, Wunsch Wolfgang) */
    .angel-screen, .angel-screen * { -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
    .angel-screen *::selection { background: transparent; }
    .angel-screen canvas { outline: none; }
    .angel-screen canvas:focus-visible { outline: 2px solid var(--angel-accent); outline-offset: -2px; }
    .angel-screen canvas { display: block; width: 100%; aspect-ratio: 2 / 3; image-rendering: pixelated; touch-action: none; cursor: pointer; user-select: none; -webkit-touch-callout: none; }
    .angel-top { position: absolute; left: var(--sp-2); right: var(--sp-2); top: var(--sp-2); display: flex; flex-direction: column; gap: var(--sp-1); pointer-events: none; }
    .angel-hud, .angel-tension, .angel-hint { background: color-mix(in srgb, var(--angel-panel) 88%, transparent); border: 1px solid color-mix(in srgb, var(--angel-accent) 55%, transparent); color: var(--text); font-size: var(--fs-sm); padding: var(--sp-1) var(--sp-2); }
    .angel-hud { display: flex; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
    .angel-hud b { color: var(--angel-accent); }
    .angel-tension { position: absolute; right: var(--sp-2); top: 3.6rem; height: 42%; width: 3rem; display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); }
    .angel-tension[hidden] { display: none; }
    .angel-tension span { font-size: var(--fs-xs); }
    .angel-bar { flex: 1; width: 14px; display: flex; align-items: flex-end; border: 2px solid var(--border); background: var(--panel); }
    .angel-bar i { display: block; width: 100%; height: 0; background: var(--success); }
    .angel-bar i.warn { background: var(--warning); }
    .angel-bar i.crit { background: var(--danger); }
    .angel-bottom { position: absolute; left: var(--sp-2); right: var(--sp-2); bottom: var(--sp-2); display: flex; flex-direction: column; gap: var(--sp-2); max-height: calc(100% - 4.5rem); overflow-y: auto; }
    .angel-bottom .angel-actions .button { flex: 1 1 auto; margin: 0; }
    .angel-hint { margin: 0; }
    .angel-hint:empty { display: none; }
    .angel-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
    .angel-overlay { background: var(--angel-panel); border: 2px solid var(--angel-accent); padding: var(--sp-3); line-height: 1.45; }
    .angel-screen .button { border-color: var(--angel-accent); }
    .angel-overlay h3 { margin: 0 0 var(--sp-1); font-size: var(--fs-md); }
    .angel-overlay p { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); }
    .angel-overlay ul { margin: 0 0 var(--sp-2); padding-left: 1.1rem; font-size: var(--fs-sm); }
    .angel-close { display: none; position: absolute; left: var(--sp-2); top: var(--sp-2); z-index: 2; width: 2.4rem; height: 2.4rem; align-items: center; justify-content: center; padding: 0; background: color-mix(in srgb, var(--angel-panel) 88%, transparent); color: var(--text-strong); border: 1px solid var(--angel-accent); border-radius: var(--r-sm); font: inherit; font-size: var(--fs-md); cursor: pointer; }
    /* Handy: das Spiel füllt den Bildschirm (0.4.6.6); das ✕ links oben beendet es, die obere Leiste rückt daneben */
    @media (max-width: 768px) {
      .angel-full #angel-stage { position: fixed; inset: 0; z-index: 1000; background: var(--bg); overscroll-behavior: contain; }
      .angel-full .angel-screen { width: 100%; height: 100%; border: 0; display: flex; justify-content: center; align-items: center; background: var(--angel-panel); }
      .angel-full .angel-screen canvas { width: min(100%, calc(100vh * 2 / 3)); width: min(100%, calc(100dvh * 2 / 3)); height: auto; flex: none; }
      .angel-full .angel-close { display: inline-flex; }
      .angel-full .angel-top { left: 3.6rem; }
    }
    .angel-modal { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: var(--sp-3); background: color-mix(in srgb, var(--angel-panel) 72%, transparent); }
    .angel-modal[hidden] { display: none; }
    .angel-modal .angel-overlay { max-width: 22rem; }
    .angel-tag { color: var(--angel-accent); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--sp-2); }
    .angel-grid label { min-width: 0; }
    .angel-grid select { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; text-overflow: ellipsis; }
    @media (max-width: 768px) { .angel-grid { grid-template-columns: 1fr; } body:has(.chat-dock) .angel-loadout { padding-bottom: 3.5rem; } .angel-actions .button { flex: 1 1 12rem; margin: 0; } }
    
    /* --- Designs (v0.2.118): Variablen je body[data-theme] --- */
    body, body[data-theme="stein"] {
      --field: #1a1a1a; --hover: #484846; --card-border: rgba(212,185,95,0.4); --card-glow: rgba(212,185,95,0.06);
      --btn-bg: linear-gradient(#4a4434, #2e2b24); --btn-bg-hover: linear-gradient(#5a5240, #3a362c); --btn-border: #8a7536; --btn-text: #f0dc9a;
      --topbar-bg: linear-gradient(#34322d, #282725); --on-accent: #1a1a1a; --xp-text-shadow: 0 0 2px #000, 0 0 2px #000;
    }
    body[data-theme="stein"] {
      background-color: #1f1f1f;
      background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20600%20160'%20preserveAspectRatio%3D'xMidYMax%20meet'%3E%3Cpath%20fill%3D'%23000'%20fill-opacity%3D'0.35'%20d%3D'M0%20160V120h40v-20h10v8h10v-8h10v8h10v-8h10v20h30V70h8v-10h8v10h8v-10h8v10h8V40l14-22%2014%2022v30h8v-10h8v10h8v-10h8v10h8v50h40V90h10v8h10v-8h10v8h10v-8h10v30h50V60l18-28%2018%2028v60h40v-14h10v6h10v-6h10v6h10v-6h10v14h40v40z'%2F%3E%3Cpath%20fill%3D'%23d4b95f'%20fill-opacity%3D'0.18'%20d%3D'M196%2060h4v8h-4zM366%2080h4v10h-4zM202%2090h4v10h-4z'%2F%3E%3C%2Fsvg%3E"), repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 46px), repeating-linear-gradient(90deg, rgba(0,0,0,0.12) 0 2px, transparent 2px 92px), radial-gradient(circle at 20% 10%, #33322e 0%, #1a1a1a 70%);
      background-repeat: no-repeat, repeat, repeat, no-repeat; background-position: right bottom, 0 0, 0 0, 0 0; background-size: min(700px, 90vw) auto, auto, auto, cover; background-attachment: fixed;
    }
    body[data-theme="pergament"] {
      --bg: #e8d9b5; --panel: #f3e7c8; --panel-light: #e9d7ad; --gold: #7a4a1c; --gold-bright: #8a2b1f;
      --text: #2e2416; --text-dim: #6b5a40; --border: #b89b6a; --green: #8a2b1f; --green-bright: #a33a2a;
      --field: #fbf4e2; --hover: #dcc796; --card-border: #a8834a; --card-glow: rgba(122,74,28,0.08);
      --btn-bg: linear-gradient(#9a3426, #7a2318); --btn-bg-hover: linear-gradient(#ad3e2e, #8a2b1f); --btn-border: #5a160e; --btn-text: #fbf0d6;
      --topbar-bg: linear-gradient(#efe0bb, #e3cf9f); --on-accent: #fbf0d6; --xp-text-shadow: 0 0 2px #fbf4e2, 0 0 2px #fbf4e2;
      --surface-alt: #efe0bb; --tile-bg: #e9d7ad; --tile-border: #b89b6a; --tile-idle: #7d6a4c; --tile-glyph: #2e2416;
      --danger-bg: #5c1a12; --danger-border: #3a0d08; --danger-bg-hover: #74231a;
      /* Bedeutungsfarben (Paket B, 3.1.43): dunkel auf hellem Pergament, je ≥ 4,5 : 1 */
      --danger: #8a2b1f; --success: #2a5f25; --warning: #874400; --caution: #665200; --info: #1d4f86; --enemy: #8f3f00;
      --skill: #6b4f00; --event-color: #6b4f00; --text-strong: #1a1209; --text-soft: #5a4a32; --badge-bg: #2a5f25; --badge-alert-bg: #8a2b1f;
      --tile-ink: #2e2416; --card-idle-border: #a08a62; --beta-bg: #8a2b1f; --beta-border: #5a160e; --elminthir-ink: #7a2a20;
      --q-minderwertig: #5f5a50; --q-ungewoehnlich: #2a5f25; --q-selten: #1d5590; --q-episch: #62308f; --q-artefakt: #8f3f00;
      background-color: #e8d9b5;
      background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20200%20200'%3E%3Cg%20fill%3D'none'%20stroke%3D'%236b3a1a'%20stroke-opacity%3D'0.22'%3E%3Ccircle%20cx%3D'100'%20cy%3D'100'%20r%3D'90'%2F%3E%3Ccircle%20cx%3D'100'%20cy%3D'100'%20r%3D'70'%20stroke-dasharray%3D'3%204'%2F%3E%3Ccircle%20cx%3D'100'%20cy%3D'100'%20r%3D'20'%2F%3E%3C%2Fg%3E%3Cg%20fill%3D'%236b3a1a'%20fill-opacity%3D'0.2'%3E%3Cpath%20d%3D'M100%205l12%2083-12%2012-12-12z'%2F%3E%3Cpath%20d%3D'M100%20195l-12-83%2012-12%2012%2012z'%2F%3E%3Cpath%20d%3D'M5%20100l83-12%2012%2012-12%2012z'%2F%3E%3Cpath%20d%3D'M195%20100l-83%2012-12-12%2012-12z'%2F%3E%3C%2Fg%3E%3Cg%20fill%3D'%236b3a1a'%20fill-opacity%3D'0.12'%3E%3Cpath%20d%3D'M35%2035l60%2055-5%205zM165%20165l-60-55%205-5zM165%2035l-55%2060-5-5zM35%20165l55-60%205%205z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"), radial-gradient(ellipse at 30% 20%, #f4e8c9 0%, #e6d4a8 55%, #d6bf8a 100%);
      background-repeat: no-repeat, no-repeat; background-position: right 2rem bottom 2rem, 0 0; background-size: 260px 260px, cover; background-attachment: fixed;
    }
    body[data-theme="wald"] {
      --bg: #142218; --panel: #1b2d20; --panel-light: #253c2b; --gold: #c9b26a; --gold-bright: #e2cd85;
      --text: #dbe3d0; --text-dim: #93a38a; --border: #36533b; --green: #3f6a2e; --green-bright: #4f823a;
      --field: #0f1a12; --hover: #2f4a35; --card-border: rgba(201,178,106,0.45); --card-glow: rgba(95,143,69,0.08);
      --btn-bg: linear-gradient(#4b7a37, #33562a); --btn-bg-hover: linear-gradient(#5a8c43, #3f6a2e); --btn-border: #c9b26a; --btn-text: #f3ecd0;
      --topbar-bg: linear-gradient(#20352560, #182a1d), #1b2d20; --on-accent: #142218; --xp-text-shadow: 0 0 2px #000, 0 0 2px #000;
      --surface-alt: #17281c; --tile-bg: #1b2d20; --tile-border: #36533b; --tile-idle: #8a9a82; --tile-glyph: #e7ecdf;
      --info: #7fbcf0; --enemy: #eba060; --text-strong: #f0f4ea; --text-soft: #adbda3;
      --q-minderwertig: #a8ada4; --q-ungewoehnlich: #8fd67a; --q-selten: #7fb7ea; --q-episch: #c9a2ee; --q-artefakt: #f09a64;
      background-color: #142218;
      background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20600%20160'%20preserveAspectRatio%3D'xMidYMax%20meet'%3E%3Cpath%20fill%3D'%23000'%20fill-opacity%3D'0.3'%20d%3D'M0%20160V110c30-10%2060-5%2090%200V60h14v-8h10v8h14v100h-8v-50a18%2018%200%200%200-36%200v50zM250%20160V40h16v-10h12v10h16v120h-10v-60a17%2017%200%200%200-34%200v60zM430%20160V80h12v-6h8v6h12v80h-8v-40a12%2012%200%200%200-16%200v40zM470%20160c40-25%2090-30%20130-20v20z'%2F%3E%3Cg%20fill%3D'none'%20stroke%3D'%233f6a35'%20stroke-opacity%3D'0.5'%20stroke-width%3D'3'%3E%3Cpath%20d%3D'M262%2040c-10%2030%2010%2050-2%2080M284%2036c8%2025-6%2045%204%2070M96%2060c-8%2020%206%2035-4%2055'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"), radial-gradient(circle at 75% 0%, rgba(120,170,90,0.14) 0%, transparent 45%), radial-gradient(circle at 20% 10%, #1f3424 0%, #0e1811 75%);
      background-repeat: no-repeat; background-position: right bottom, 0 0, 0 0; background-size: min(700px, 90vw) auto, cover, cover; background-attachment: fixed;
    }
    body[data-theme="wald"] nav.sidebar { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%20120'%3E%3Cpath%20d%3D'M12%200c-8%2020%208%2040%200%2060s8%2040%200%2060'%20fill%3D'none'%20stroke%3D'%235f8f45'%20stroke-opacity%3D'0.55'%20stroke-width%3D'2'%2F%3E%3Cg%20fill%3D'%235f8f45'%20fill-opacity%3D'0.5'%3E%3Cpath%20d%3D'M12%2018c6-6%2011-4%2011-4s-3%207-11%204z'%2F%3E%3Cpath%20d%3D'M12%2048c-6-6-11-4-11-4s3%207%2011%204z'%2F%3E%3Cpath%20d%3D'M12%2080c6-6%2011-4%2011-4s-3%207-11%204z'%2F%3E%3Cpath%20d%3D'M12%20108c-6-6-11-4-11-4s3%207%2011%204z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); background-repeat: repeat-y; background-position: right 2px top; background-size: 18px auto; }
    body[data-theme="arkan"] {
      --bg: #0d1130; --panel: #151a3e; --panel-light: #20275a; --gold: #d9b860; --gold-bright: #f0d685;
      --text: #dcdcf0; --text-dim: #9a9cc4; --border: #343a76; --green: #4b3f8a; --green-bright: #5e4fb0;
      --field: #0a0d26; --hover: #2a3170; --card-border: rgba(217,184,96,0.5); --card-glow: rgba(124,108,220,0.12);
      --btn-bg: linear-gradient(#5a4ba6, #3b3078); --btn-bg-hover: linear-gradient(#6b5bc0, #4b3f8a); --btn-border: #d9b860; --btn-text: #f6ebc8;
      --topbar-bg: linear-gradient(#1c2250, #131838); --on-accent: #0d1130; --xp-text-shadow: 0 0 2px #000, 0 0 2px #000;
      --surface-alt: #10153a; --tile-bg: #151a3e; --tile-border: #343a76; --tile-idle: #8c8fba; --tile-glyph: #ece9fa;
      --info: #7fbcf0; --enemy: #eba060; --text-strong: #f2f2ff; --text-soft: #b2b4d8;
      --q-minderwertig: #a8a9be; --q-ungewoehnlich: #8fd67a; --q-selten: #8cc2f2; --q-episch: #cfaaf2; --q-artefakt: #f09a64;
      background-color: #0d1130;
      background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20120%20120'%3E%3Cdefs%3E%3CradialGradient%20id%3D'g'%20cx%3D'50%25'%20cy%3D'50%25'%20r%3D'50%25'%3E%3Cstop%20offset%3D'60%25'%20stop-color%3D'%23f0d685'%20stop-opacity%3D'0.25'%2F%3E%3Cstop%20offset%3D'100%25'%20stop-color%3D'%23f0d685'%20stop-opacity%3D'0'%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Ccircle%20cx%3D'60'%20cy%3D'60'%20r%3D'58'%20fill%3D'url(%2523g)'%2F%3E%3Cpath%20d%3D'M74%2030a32%2032%200%201%200%2016%2052a26%2026%200%201%201-16-52z'%20fill%3D'%23f0d685'%20fill-opacity%3D'0.55'%2F%3E%3C%2Fsvg%3E"), url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20300%20300'%3E%3Cg%20fill%3D'%23fff'%3E%3Ccircle%20cx%3D'20'%20cy%3D'30'%20r%3D'1'%20fill-opacity%3D'0.7'%2F%3E%3Ccircle%20cx%3D'80'%20cy%3D'120'%20r%3D'0.8'%20fill-opacity%3D'0.5'%2F%3E%3Ccircle%20cx%3D'150'%20cy%3D'40'%20r%3D'1.2'%20fill-opacity%3D'0.8'%2F%3E%3Ccircle%20cx%3D'210'%20cy%3D'160'%20r%3D'0.7'%20fill-opacity%3D'0.5'%2F%3E%3Ccircle%20cx%3D'270'%20cy%3D'70'%20r%3D'1'%20fill-opacity%3D'0.6'%2F%3E%3Ccircle%20cx%3D'40'%20cy%3D'220'%20r%3D'0.9'%20fill-opacity%3D'0.6'%2F%3E%3Ccircle%20cx%3D'120'%20cy%3D'260'%20r%3D'1.1'%20fill-opacity%3D'0.7'%2F%3E%3Ccircle%20cx%3D'250'%20cy%3D'250'%20r%3D'0.8'%20fill-opacity%3D'0.5'%2F%3E%3Ccircle%20cx%3D'180'%20cy%3D'100'%20r%3D'0.6'%20fill-opacity%3D'0.4'%2F%3E%3Ccircle%20cx%3D'100'%20cy%3D'190'%20r%3D'0.6'%20fill-opacity%3D'0.4'%2F%3E%3C%2Fg%3E%3Cg%20fill%3D'%23f0d685'%20fill-opacity%3D'0.7'%3E%3Cpath%20d%3D'M230%2020l1.5%204%204%201.5-4%201.5-1.5%204-1.5-4-4-1.5%204-1.5z'%2F%3E%3Cpath%20d%3D'M60%20160l1%203%203%201-3%201-1%203-1-3-3-1%203-1z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"), radial-gradient(ellipse at 70% 0%, #2b2266 0%, #141a44 45%, #080b22 100%);
      background-repeat: no-repeat, repeat, no-repeat; background-position: right 3rem top 4rem, 0 0, 0 0; background-size: 140px 140px, 300px 300px, cover; background-attachment: fixed;
    }

    /* Gemeinsame Gestaltung der Designs: Zierlinie unter Überschriften, Karten mit Goldrand, Kopfleiste */
    h1.page-title::after, main > h2::after, main > form.premium-admin > h2::after {
      content: "◆"; display: block; width: 260px; max-width: 100%; margin-top: 0.3rem; color: var(--gold); font-size: 0.6rem; line-height: 0.8rem; text-align: center;
      background: linear-gradient(var(--gold), var(--gold)) left center / 44% 1px no-repeat, linear-gradient(var(--gold), var(--gold)) right center / 44% 1px no-repeat;
      opacity: 0.85;
    }
    main > h2::after, main > form.premium-admin > h2::after { width: 180px; font-size: 0.5rem; opacity: 0.6; }
    h1.page-title { letter-spacing: 0.03em; }
    .sheet, .detail-panel, form.character-form, .tutorial-box, .item-filter, .learn-panel {
      border-color: var(--card-border) !important; box-shadow: inset 0 0 18px var(--card-glow), 0 1px 3px rgba(0,0,0,0.25);
    }
    .sheet { border-radius: 6px; }
    .hero-topbar { background: var(--topbar-bg); border-bottom: 1px solid var(--card-border); }
    .xp-bar { background: var(--field); }
    .xp-bar-text { text-shadow: var(--xp-text-shadow); }
    nav.sidebar .brand { font-variant: small-caps; text-transform: none; letter-spacing: 0.06em; font-size: var(--fs-lg); line-height: 1.25; border-bottom-color: var(--card-border); }
    nav.sidebar .brand::after {
      content: "◆"; display: block; margin-top: 0.35rem; color: var(--gold); font-size: 0.5rem; line-height: 0.7rem; text-align: center;
      background: linear-gradient(var(--gold), var(--gold)) left center / 42% 1px no-repeat, linear-gradient(var(--gold), var(--gold)) right center / 42% 1px no-repeat;
    }
    nav.sidebar { border-right-color: var(--card-border); }
    /* Alle Knopf-Elemente folgen dem Design (GUI-18, 3.1.38) – vorher blieb label.button (Hochladen) grün. */
    :is(a, button, label, summary, span).button { background: var(--btn-bg); border-color: var(--btn-border); color: var(--btn-text); }
    :is(a, button, label, summary, span).button:hover { background: var(--btn-bg-hover); color: var(--btn-text); }
    /* Nebenknöpfe in Hellgold: Gold auf --panel-light lag unter 4,5 : 1 (Paket B, 3.1.43) */
    :is(a, button, label, summary, span).button.alt { background: var(--panel-light); border-color: var(--border); color: var(--gold-bright); }
    :is(a, button, label, summary, span).button.alt:hover { background: var(--hover); }
    /* Pergament: Nebenknöpfe dunkelbraun (Hellgold ist dort Tintenrot wie die Hauptknöpfe) */
    body[data-theme="pergament"] :is(a, button, label, summary, span).button.alt { color: #5c3812; }
    /* Gefahr-Knöpfe (Löschen, Entfernen, Zurücksetzen): eine Klasse statt fester Inline-Farben */
    :is(a, button, label, summary, span).button.danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--badge-text); }
    :is(a, button, label, summary, span).button.danger:hover { background: var(--danger-bg-hover); color: var(--badge-text); }
    .if-chip.active, .room-tactic .room-no, .item-info-btn:hover { color: var(--on-accent); }
    body[data-theme="pergament"] pre { color: var(--text); }

    /* Design-Auswahl im Konto: Vorschaukacheln */
    .theme-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.6rem; margin: 0.3rem 0 0.6rem; }
    /* align-items: stretch, sonst zentriert die allgemeine Regel für beschriftete Optionsfelder (3.1.44) den Inhalt und die leere
       Vorschau schrumpft auf null Breite (3.1.55, Meldung Wolfgang „Vorschau wird nicht mehr angezeigt“) */
    .theme-option { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 0.3rem; padding: 0.55rem; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; background: var(--panel-light); }
    .theme-option input { position: absolute; opacity: 0; pointer-events: none; }
    .theme-option:has(input:checked) { border-color: var(--gold-bright); box-shadow: 0 0 8px var(--card-border); }
    .theme-option:focus-within { outline: 2px solid var(--gold); outline-offset: 1px; }
    .theme-swatch { display: block; height: 46px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.3); position: relative; overflow: hidden; }
    .theme-swatch::after { content: "◆"; position: absolute; right: 8px; bottom: 4px; font-size: 0.7rem; }
    .theme-swatch.stein { background: linear-gradient(135deg, #34322d, #1a1a1a); } .theme-swatch.stein::after { color: #d4b95f; }
    .theme-swatch.pergament { background: linear-gradient(135deg, #f4e8c9, #d6bf8a); } .theme-swatch.pergament::after { color: #8a2b1f; }
    .theme-swatch.wald { background: linear-gradient(135deg, #2a4430, #0e1811); } .theme-swatch.wald::after { color: #c9b26a; }
    .theme-swatch.arkan { background: linear-gradient(135deg, #2b2266, #080b22); } .theme-swatch.arkan::after { color: #f0d685; }
    .theme-swatch.custom::after { color: inherit; }
    .theme-option strong { color: var(--gold-bright); font-size: var(--fs-sm); }

    /* Anmeldeseite (v0.3.4, Wunsch Wolfgang): nächtliches Tal als Hintergrund, Formular auf dunkler Karte */
    body.auth-page {
      background: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)), url("/assets/design-bg-tal.webp?v=2bca55f87e") center / cover no-repeat fixed, #141312;
    }
    body.auth-page main { background: rgba(20,19,17,0.82); border: 1px solid var(--card-border); border-radius: 8px; padding: 1.2rem 1.4rem; box-shadow: 0 4px 24px rgba(0,0,0,0.6); }
    @media (max-width: 768px) { body.auth-page { background-attachment: scroll; } body.auth-page main { margin: 1rem; } }

    /* Aktuelles bearbeiten (v0.3.5, nur Admins) */
    .news-admin { margin-bottom: 1rem; }
    .news-admin > summary, .news-admin-actions summary { cursor: pointer; color: var(--gold); }
    .news-admin-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-start; margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px dashed var(--border); }
    .news-admin-actions details { flex: 1 1 100%; }
    .news-admin-actions form { margin: 0; }
    .news-form { max-width: none !important; }
    .news-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: var(--fs-sm); margin-top: 0.5rem; }
    .news-form-row { display: grid; grid-template-columns: 1fr 10rem 8rem; gap: 0.6rem; }
    .news-form textarea { width: 100%; box-sizing: border-box; font-family: inherit; background: var(--field); color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 0.5rem; }
    @media (max-width: 768px) { .news-form-row { grid-template-columns: 1fr; } }
    /* Reaktionen und Kommentare auf Neuigkeiten (0.4.0.4): Kommentare immer eingeklappt */
    .news-reactions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.8rem 0 0.2rem; }
    .news-react { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 2rem; padding: 0.1rem 0.55rem; border-radius: var(--r-pill, 999px); border: 1px solid var(--border); background: var(--panel-light); color: var(--text); font-size: var(--fs-md); line-height: 1; cursor: pointer; }
    span.news-react { cursor: default; }
    .news-react.mine { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
    .news-react-count { font-size: var(--fs-sm); color: var(--text-soft); }
    .news-comments { margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px dashed var(--border); }
    .news-comments > summary { cursor: pointer; color: var(--gold); font-size: var(--fs-sm); }
    .news-comment-list { list-style: none; margin: 0.6rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
    .news-comment { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-sm, 4px); padding: 0.45rem 0.6rem; }
    .news-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: var(--fs-sm); }
    .news-comment-time { color: var(--text-dim); }
    .news-comment-delete { margin: 0 0 0 auto; }
    .news-comment-body { margin-top: 0.25rem; overflow-wrap: anywhere; }
    .news-comment-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: var(--fs-sm); }
    .news-comment-form textarea { width: 100%; box-sizing: border-box; font-family: inherit; background: var(--field); color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 0.5rem; }
    .news-comment-form .button { margin-top: 0.4rem; }
    .news-comment-hint { color: var(--text-dim); font-size: var(--fs-sm); }
    .news-comment-error { color: var(--danger); font-size: var(--fs-sm); }

    /* Design-Editor (v0.3.3) */
    .design-form section.sheet { margin-bottom: 1rem; padding: 0.8rem 1rem; }
    .design-form h3 { margin-top: 0; }
    .design-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 0.8rem; }
    .design-group { border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem 0.7rem 0.7rem; margin: 0; min-width: 0; }
    .design-group legend { color: var(--gold); padding: 0 0.3rem; }
    .design-color { display: grid; grid-template-columns: 1fr 2.2rem 8.5rem 2rem; gap: 0.35rem; align-items: center; padding: 0.15rem 0.25rem; border-left: 3px solid transparent; }
    .design-color.changed { border-left-color: var(--gold-bright); }
    .design-color label { font-size: var(--fs-sm); }
    .design-color input[type="color"], .design-inline input[type="color"] { width: 2.2rem; height: 1.8rem; padding: 0; border: 1px solid var(--border); background: none; cursor: pointer; }
    .design-color input[type="text"], .design-image-grid input[type="text"], .design-image-grid input[type="number"], .design-image-grid select {
      width: 100%; padding: 0.3rem; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--field); color: var(--text); font-family: inherit; box-sizing: border-box;
    }
    .design-image-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.6rem 0.9rem; align-items: end; }
    .design-image-grid > label { display: flex; flex-direction: column; gap: 0.25rem; font-size: var(--fs-sm); }
    .design-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 0.4rem; font-size: var(--fs-sm); }
    .design-inline { display: flex; align-items: center; gap: 0.4rem; }
    .design-inline input[type="range"] { flex: 1; }
    .design-uploads { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.8rem; }
    .design-upload { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.6rem; border: 1px solid var(--card-border); border-radius: 6px; background: var(--panel); }
    .design-upload img { width: 100%; height: 110px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
    .design-upload form { margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
    .design-upload > form:last-child { margin-top: auto; } /* Knöpfe der Kacheln einer Reihe auf einer Höhe (0.4.3.24) */
    .design-upload input[type="file"] { max-width: 100%; font-size: var(--fs-sm); }
    .design-noimg { display: flex; align-items: center; justify-content: center; height: 110px; border: 1px dashed var(--border); border-radius: 4px; color: var(--text-dim); font-size: var(--fs-sm); text-align: center; }
    .design-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
    .design-actions form { margin: 0; }
    @media (max-width: 768px) { .design-groups { grid-template-columns: 1fr; } .design-color { grid-template-columns: 1fr 2.2rem 7rem 2rem; } }
    .theme-option span { color: var(--text-dim); font-size: var(--fs-xs); line-height: 1.3; }

    /* Handy: Menüeinträge als Liste mit Pfeil wie im Entwurf */
    @media (max-width: 768px) {
      nav.sidebar .navgroup-links a, nav.sidebar .navgroup > a, nav.sidebar a.navgroup-direct { position: relative; padding-right: 1.4rem; }
      nav.sidebar .navgroup-links a::after, nav.sidebar .navgroup > a::after, nav.sidebar a.navgroup-direct::after { content: "›"; position: absolute; right: 0.4rem; color: var(--gold); }
      body { background-attachment: scroll; }
      h1.page-title::after { width: 200px; }
      body[data-theme="arkan"] { background-size: 70px 70px, 300px 300px, cover; background-position: right 0.8rem top 4.5rem, 0 0, 0 0; }
      body[data-theme="pergament"] { background-size: 160px 160px, cover; }
    }

