/* Dungeon Stadt 2.0 · Grundgestaltung
   Farben: Fels und Ruß, Gold der Dukaten, Rot der Runenwacht. */
:root {
  --bg: #120e0b;
  --bg-2: #1a1410;
  --surface: #211a14;
  --surface-2: #2a2119;
  --line: #3b2f24;
  --text: #ece2cc;
  --muted: #a8977c;
  --gold: #d1a94f;
  --gold-2: #f0d48a;
  --rune: #c0392b;
  --rune-glow: rgba(192, 57, 43, .35);
  --ok: #6fae6a;
  --radius: 14px;
  --font-head: "Cinzel", "Times New Roman", serif;
  --font-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(209, 169, 79, .08), transparent 70%),
    radial-gradient(800px 500px at 100% 100%, rgba(192, 57, 43, .06), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: .02em; margin: 0; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.loading { display: grid; place-items: center; height: 100vh; font-size: 40px; color: var(--gold); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: min(420px, 100%); padding: 36px 28px 28px; text-align: center;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .04);
  display: flex; flex-direction: column; gap: 14px;
}
.login-seal { font-size: 42px; color: var(--rune); text-shadow: 0 0 24px var(--rune-glow); line-height: 1; }
.login-title { font-size: 30px; }
.login-title span, .brand-v { color: var(--gold); }
.login-motto { margin: -4px 0 8px; color: var(--muted); font-style: italic; }
.login-hint { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Formulare & Knöpfe ---------- */
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field span { font-size: 14px; color: var(--muted); }
input, select {
  font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.btn {
  font: 600 15px var(--font-body); letter-spacing: .03em; cursor: pointer;
  padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #24190c; border-color: #8a6a26; }
.btn-danger { background: #3a1513; border-color: #6d2620; color: #f4c7c1; }
.btn-wide { width: 100%; padding: 13px; font-size: 16px; }
.btn-small { padding: 7px 12px; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { font: inherit; font-size: 14px; cursor: pointer; padding: 5px 12px; border-radius: 999px; border: 1px dashed var(--gold); background: transparent; color: var(--gold-2); }
.notice { padding: 10px 12px; border-radius: 10px; font-size: 15px; text-align: left; }
.notice-error { background: #3a1513; border: 1px solid #6d2620; color: #f6cfc9; }
.notice-ok { background: #18301a; border: 1px solid #2f5a31; color: #cfeccc; }
.notice-info { background: var(--surface-2); border: 1px solid var(--line); }

/* ---------- Rahmen ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px;
  padding: 10px 22px; background: rgba(18, 14, 11, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--font-head); font-size: 19px; white-space: nowrap; }
.brand-mark { color: var(--rune); }
.topnav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.navlink { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; color: var(--muted); white-space: nowrap; }
.navlink:hover { color: var(--text); background: var(--surface); }
.navlink.active { color: var(--gold-2); background: var(--surface-2); }
.navlink.locked { opacity: .45; }
.navlink.gm { color: #e4a39b; }
.me { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 999px; }
.me:hover, .me.active { background: var(--surface-2); }
.me-name { font-size: 15px; }
.avatar {
  width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; background: var(--surface-2); border: 1px solid var(--gold); color: var(--gold-2);
}
.avatar-gm { border-color: var(--rune); color: #f2b4ac; box-shadow: 0 0 12px var(--rune-glow); }
.content { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 22px 60px; }
.bottomnav { display: none; }

/* ---------- Seiten ---------- */
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(26px, 4vw, 36px); }
.page-head .muted { margin: 8px 0 0; max-width: 70ch; }
.eyebrow { margin: 0 0 4px; color: var(--gold); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.grid-wide { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}
.card-title { font-size: 17px; margin-bottom: 14px; color: var(--gold-2); }
.card-gm { border-color: #5a2a24; }
.card-clock { text-align: center; }
.clock-face {
  width: 92px; height: 92px; margin: 4px auto 12px; border-radius: 50%; display: grid; place-items: center;
  color: var(--gold); border: 2px solid var(--gold); box-shadow: inset 0 0 20px rgba(209, 169, 79, .2), 0 0 30px rgba(209, 169, 79, .08);
}
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li { padding-left: 26px; position: relative; color: var(--muted); }
.checklist li::before { content: "◇"; position: absolute; left: 4px; color: var(--line); }
.checklist li.done { color: var(--text); }
.checklist li.done::before { content: "◆"; color: var(--gold); }
.sealed { text-align: center; padding: 50px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.sealed-rune { font-size: 54px; color: var(--rune); text-shadow: 0 0 26px var(--rune-glow); }

/* ---------- Konten ---------- */
.acc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.acc { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg-2); display: flex; flex-direction: column; gap: 10px; }
.acc-main { display: flex; align-items: center; gap: 12px; }
.acc-name { font-weight: 600; }
.acc-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.acc-extra { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acc-extra input { flex: 1; min-width: 160px; }


/* ---------- Allgemein (Stufe 1a) ---------- */
textarea { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%; resize: vertical; }
textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.sub { font-size: 15px; color: var(--gold); margin: 18px 0 8px; }
.tag { display: inline-block; margin-left: 8px; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); vertical-align: middle; }
.chip-on { background: var(--gold); color: #24190c; border-style: solid; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar .search { max-width: 280px; }
.toolbar select { width: auto; }
.toolbar .chips { margin: 0; }
.grid-start { grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.6fr) minmax(260px, 1fr); }
.filebtn { display: inline-block; margin: 6px 0 4px; }
.steps { padding-left: 20px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.counts { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.counts li { display: flex; justify-content: space-between; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.counts b { color: var(--gold-2); }
.progress { margin-top: 14px; }
.bar { height: 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--rune), var(--gold)); transition: width .2s; }
.progress .small { margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: -8px 0 20px; border-bottom: 1px solid var(--line); }
.tab { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--gold-2); border-bottom-color: var(--gold); }

/* Uhr & Mond */
.clock { text-align: center; margin-bottom: 10px; }
.clock-time { font-family: var(--font-head); font-size: 46px; line-height: 1.05; color: var(--gold-2); text-shadow: 0 0 24px rgba(209,169,79,.25); }
.clock-date { font-size: 17px; margin-top: 4px; }
.moon { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 6px; }
.moon svg { filter: drop-shadow(0 0 14px rgba(240,212,138,.18)); }
.moon-label { display: flex; flex-direction: column; text-align: left; }
.btn-clock { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; }
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; }
.modal { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.setdate { display: grid; grid-template-columns: 64px 1fr 84px 60px 60px auto; gap: 6px; }
.setdate input, .setdate select { padding: 8px; }

/* Dungeontafel */
.board { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.board-next { margin: -6px 0 10px; }
.portal { display: grid; grid-template-columns: 30px 26px 1fr; gap: 8px; align-items: start; padding: 9px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.portal.empty { opacity: .5; }
.portal-no { font-family: var(--font-head); color: var(--muted); font-size: 14px; padding-top: 2px; }
.portal-rank { font-family: var(--font-head); font-weight: 700; text-align: center; border-radius: 6px; padding: 1px 0; font-size: 14px; background: #2d241b; }
.rank-F .portal-rank { color: #b9b0a0; } .rank-D .portal-rank { color: #8fc28a; } .rank-C .portal-rank { color: #7fb3d9; }
.rank-B .portal-rank { color: #c79be0; } .rank-A .portal-rank { color: #f0a35b; background: #3a2414; } .rank-S .portal-rank { color: #ff7a6b; background: #3d1612; box-shadow: 0 0 10px var(--rune-glow); }
.portal-title { font-weight: 700; }
a.portal-title { color: var(--gold-2); }
.portal-info { font-size: 14px; color: var(--muted); margin-top: 2px; }
.portal-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.portal-note { color: #f0a35b; }
.tafel-edit { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.tafel-row { display: grid; grid-template-columns: 34px 1.3fr 1.1fr 54px 1fr 2fr 64px 1.1fr auto; gap: 6px; align-items: center; }
.tafel-row input, .tafel-row select { padding: 7px 9px; font-size: 14px; }
.tafel-no { font-family: var(--font-head); color: var(--gold); text-align: center; }

/* Neu für dich */
.newlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.newlist li { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.newlist a:hover b { color: var(--gold-2); }

/* Personen */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pcard { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--gold); transform: translateY(-1px); }
.pcard-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pcard-title { font-weight: 700; line-height: 1.25; }
.pcard-sub { font-size: 14px; color: var(--text); opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-grp { font-size: 12px; color: var(--muted); }
.portrait { object-fit: cover; object-position: center 20%; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); flex: none; }
.portrait-md { width: 72px; height: 88px; }
.portrait-lg { width: 160px; height: 200px; border-radius: 16px; border-color: var(--gold); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.portrait-empty { display: grid; place-items: center; font-family: var(--font-head); color: var(--gold); background: radial-gradient(circle at 50% 35%, #2e241b, #18120d); }
.portrait-md.portrait-empty { font-size: 24px; }
.portrait-lg.portrait-empty { font-size: 54px; }

/* Sichtbarkeit */
.vis { display: inline-block; font-size: 12px; padding: 1px 9px; border-radius: 999px; border: 1px solid; width: fit-content; }
.vis-none { color: #a8977c; border-color: #4a3c2e; }
.vis-all { color: #a9dca4; border-color: #2f5a31; background: #15261a; }
.vis-some { color: #f0d48a; border-color: #6b5524; background: #2a2112; }
.uchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.uchip { font: inherit; font-size: 13px; cursor: pointer; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); }
.uchip.on { background: #1f3a22; border-color: #3f7a43; color: #d4f1d0; }
.uchip.implied { border-style: dashed; color: #a9dca4; }

/* Eintrag */
.entry-head { display: flex; gap: 22px; align-items: flex-end; margin-bottom: 22px; }
.entry-head h1 { font-size: clamp(26px, 4vw, 38px); }
.entry-sub { margin: 8px 0 0; color: var(--muted); font-size: 17px; }
.bigimg { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 18px; }
.gmbar { margin-bottom: 18px; border-color: #5a2a24; background: linear-gradient(180deg, #2a1a16, var(--surface)); }
.gmbar-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: flex-start; }
.gmbar-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.preview { display: flex; align-items: center; gap: 6px; }
.preview select { width: auto; padding: 6px 8px; }
.sections { display: flex; flex-direction: column; gap: 14px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sec-head h2 { font-size: 19px; color: var(--gold-2); }
.sec-secret { border-left: 3px solid var(--rune); }
.sec-hidden { opacity: .78; }
.note-card { margin-top: 18px; }

/* Markdown */
.md { margin-top: 8px; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md h3 { font-size: 16px; margin: 16px 0 6px; color: var(--gold); }
.md h4 { font-size: 15px; margin: 12px 0 4px; }
.md strong { color: #f5ead2; }
.md em { color: #d8caa9; }
.md blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--gold); background: var(--bg-2); border-radius: 0 10px 10px 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.md table { border-collapse: collapse; width: 100%; margin: 6px 0 12px; font-size: 15px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
.md th { background: var(--bg-2); color: var(--gold); }
.md code { font-size: 14px; }
.md a, a.mdlink { color: var(--gold-2); text-decoration: underline; text-decoration-color: rgba(240,212,138,.4); }

/* Tabellen (Admin) */
.bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; margin-bottom: 12px; }
.bulk select { width: auto; padding: 6px 8px; }
.tablewrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; color: var(--gold); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface-2); }
.tbl td { padding: 7px 8px; border-bottom: 1px solid #2c231b; }
.tbl tr.sel td { background: #2a2112; }
.tbl a:hover { color: var(--gold-2); }
.wgroup { margin-top: 6px; }
.wlist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.wlist li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }

/* Notizen */
.notelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.notelist li { padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.note-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.note-body { white-space: pre-wrap; margin: 6px 0 0; color: var(--text); }

@media (max-width: 1100px) {
  .grid-start { grid-template-columns: 1fr 1fr; }
  .grid-start .card-board { grid-column: 1 / -1; grid-row: 2; }
  .tafel-row { grid-template-columns: 34px 1fr 1fr 54px; }
  .tafel-row .w-l { grid-column: 2 / -1; }
}


/* ---------- Korrekturen 1a: Einzelinfos, Kategorien, Splitscreen ---------- */
.secctl { margin: 6px 0 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.partlist { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.partlist > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 10px; background: var(--bg-2); border-radius: 8px; border-left: 3px solid transparent; }
.partlist > li.part-on { border-left-color: #3f7a43; }
.partmd .md { margin: 0; font-size: 15px; }
.partmd .md p, .partmd .md ul, .partmd .md ol { margin: 0; }
.partmd .md ul, .partmd .md ol { padding-left: 18px; }
.partlabel { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uchips-small { margin: 0; justify-content: flex-end; }
.uchips-small .uchip { font-size: 12px; padding: 2px 9px; }
.catrows { display: flex; flex-direction: column; gap: 8px; margin: -6px 0 20px; }
.catrow { margin: 0; }
.catrow + .catrow { padding-left: 14px; border-left: 2px solid var(--line); }
.pgroup { margin-bottom: 26px; }
.pgroup-title { font-size: 17px; color: var(--gold); margin-bottom: 10px; }
.pcard { position: relative; padding: 0; }
.pcard-link { display: flex; gap: 12px; align-items: center; padding: 12px 40px 12px 12px; width: 100%; }
.pcard.pinned { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.pinchip { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
.pinchip:hover { color: var(--gold-2); border-color: var(--gold); }
.pinchip.on { color: var(--gold-2); border-color: var(--gold); background: #2a2112; }
.pinbtn { margin-top: 10px; }
.pinbar { position: fixed; right: 18px; bottom: 18px; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #24190c; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 15px; }
.pinbar-mark { color: var(--rune); }
.content-wide { max-width: none; padding-left: 14px; padding-right: 14px; }
.split-tabs { display: none; }
.split { display: grid; gap: 12px; height: calc(100vh - 96px); }
.split.cols-1 { grid-template-columns: minmax(0, 900px); justify-content: center; }
.split.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split.cols-4 { grid-template-columns: repeat(4, minmax(300px, 1fr)); overflow-x: auto; }
.split-col { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(26,20,16,.6); }
.split-bar { display: flex; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }
.split-bar .btn-danger { margin-left: auto; }
.split-scroll { overflow-y: auto; padding: 12px; min-height: 0; flex: 1; }
.entry-compact .entry-head { gap: 12px; margin-bottom: 12px; align-items: center; }
.entry-compact .entry-head h1 { font-size: 21px; }
.entry-compact .entry-sub { font-size: 14px; }
.entry-compact .sections { gap: 10px; }
.entry-compact .card { padding: 14px; }
.entry-compact .sec-head h2 { font-size: 16px; }
.entry-compact .md { font-size: 15px; }


/* ---------- Stufe 1b ---------- */
.tabs-top { max-width: 1180px; margin: 0 auto 14px; }
.embedbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.tag-gold { color: #24190c; background: var(--gold); border-color: var(--gold); }
.kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.kcard { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); font-weight: 600; }
.kcard:hover { border-color: var(--gold); color: var(--gold-2); }

/* Stadtkarte */
.stadt { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; margin-bottom: 26px; }
.mapwrap { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0,0,0,.5); background: #0d0a08; }
.mapimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mapload { display: grid; place-items: center; color: var(--muted); }
.mapsvg { position: absolute; inset: 0; width: 100%; height: 100%; }
.maplabel { font-family: var(--font-head); font-size: 22px; font-weight: 700; fill: #f3e2b5; letter-spacing: .06em; paint-order: stroke; stroke: rgba(0,0,0,.75); stroke-width: 5px; pointer-events: none; }
.maplabel.small { font-size: 16px; font-weight: 600; letter-spacing: 0; fill: #e8d8b4; }
.placemark { cursor: pointer; }
.placemark circle { stroke: #fff4d6; stroke-width: 2.5; filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); }
.placemark text { font: 700 14px var(--font-body); fill: #fff; pointer-events: none; }
.placemark.unknown circle { opacity: .45; stroke-dasharray: 4 3; }
.placemark.unknown text { opacity: .6; }
.placemark:hover circle, .placemark.sel circle { stroke: var(--gold-2); stroke-width: 4; }
.placemark.sel circle { r: 19; }
.portalmark circle { fill: rgba(20, 12, 30, .75); stroke: #d9c8ff; stroke-width: 1.5; }
.portalmark text { font: 700 10px var(--font-head); fill: #e9dcff; pointer-events: none; }
.portalmark.link { cursor: pointer; }
.portalmark.link:hover circle { stroke: var(--gold-2); stroke-width: 3; }
.mappanel { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 76px; }
.placelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 62vh; overflow-y: auto; }
.placelist button { all: unset; cursor: pointer; display: flex; gap: 10px; align-items: center; width: 100%; padding: 5px 6px; border-radius: 8px; box-sizing: border-box; }
.placelist button:hover { background: var(--bg-2); }
.placelist li.unknown { opacity: .5; }
.dot { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; flex: none; border: 1.5px solid #fff4d6; }
.placepeople { margin: 10px 0 0; }

/* Gilden */
.gildengrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.gildecard { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 18px; border-radius: 16px; border: 1px solid var(--line); border-top: 4px solid var(--gc); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.gildecard:hover { border-color: var(--gc); }
.gildecrest { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-head); font-size: 24px; font-weight: 700; color: #fff; background: var(--gc); box-shadow: 0 0 18px color-mix(in srgb, var(--gc) 50%, transparent); }

/* Dungeons */
.rangbadge { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-family: var(--font-head); font-weight: 700; background: #2d241b; margin-right: 6px; }
.rangbadge.rank-F { color: #b9b0a0; } .rangbadge.rank-D { color: #8fc28a; } .rangbadge.rank-C { color: #7fb3d9; }
.rangbadge.rank-B { color: #c79be0; } .rangbadge.rank-A { color: #f0a35b; background: #3a2414; } .rangbadge.rank-S { color: #ff7a6b; background: #3d1612; box-shadow: 0 0 10px var(--rune-glow); }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.dcard { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.dcard:hover { border-color: var(--gold); }
.dcard-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.dcard-rumor .md { font-size: 15px; font-style: italic; color: #e3d5b6; margin: 0; }

/* Archiv */
.acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.acard { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); display: flex; flex-direction: column; gap: 6px; }
.acard header { display: flex; flex-direction: column; gap: 2px; }
.acard header b { font-family: var(--font-head); color: var(--gold-2); font-size: 17px; }
.acard .md { font-size: 15px; margin-top: 4px; }

/* Beziehungsnetz */
.netz .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.netz .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.netz-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; }
.netz-svg { width: 100%; height: 72vh; border-radius: 16px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 50%, #1d1611, #0e0b08); touch-action: none; cursor: grab; }
.nl { stroke: #5b4a38; stroke-width: 1.2; }
.nl.on { stroke: var(--gold-2); stroke-width: 2.5; }
.nl.dim { opacity: .15; }
.nn { cursor: pointer; }
.nn circle { stroke: #1a130e; stroke-width: 2; }
.nn text { font: 600 11px var(--font-body); fill: var(--text); paint-order: stroke; stroke: #0e0b08; stroke-width: 3px; pointer-events: none; }
.nn.dim { opacity: .2; }
.nn.sel circle, .nn.hit circle { stroke: var(--gold-2); stroke-width: 4; }
.netz-panel { max-height: 72vh; overflow-y: auto; }
.netz-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.linkbtn { all: unset; cursor: pointer; font-weight: 700; color: var(--gold-2); }

/* Mehr-Menü (Handy) */
.moresheet { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; }
.moresheet-inner { width: 100%; background: var(--surface); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 12px 12px calc(84px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.morelink { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: var(--bg-2); }
.morelink.locked { opacity: .45; }

@media (max-width: 1400px) { .navlink.locked span { display: none; } .navlink.locked { padding: 8px 9px; } }
/* Stufe 5: viele Menüpunkte – erst enger, dann nur Symbole (der aktive behält seinen Namen) */
@media (max-width: 1760px) { .navlink { padding: 8px 9px; gap: 6px; } .topbar { gap: 12px; } }
@media (max-width: 1600px) { .navlink:not(.active) span { display: none; } .me-name { display: none; } }

/* ---------- Handy ---------- */
@media (max-width: 820px) {
  .topnav, .me-name { display: none; }
  .topbar { justify-content: space-between; padding: 10px 16px; }
  .content { padding: 20px 16px 96px; }
  .grid-wide { grid-template-columns: 1fr; }
  .bottomnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
    background: rgba(18, 14, 11, .95); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bnav { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; }
  .bnav.active { color: var(--gold-2); }
  .bnav.locked { opacity: .45; }
  .acc-main { flex-wrap: wrap; }
  .grid-start { grid-template-columns: 1fr; }
  .grid-start .card-board { grid-row: auto; }
  .entry-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .portrait-lg { width: 130px; height: 162px; }
  .pgrid { grid-template-columns: 1fr; }
  .setdate { grid-template-columns: 1fr 1fr 1fr; }
  .tafel-row { grid-template-columns: 30px 1fr 1fr; }
  .tafel-row > * { grid-column: auto !important; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab { white-space: nowrap; }
  .clock-time { font-size: 40px; }
  .stadt, .netz-body { grid-template-columns: 1fr; }
  .mappanel { position: static; }
  .netz-svg { height: 60vh; }
  .bottomnav button.bnav { background: none; border: 0; font: inherit; font-size: 11px; color: var(--muted); }
  .bottomnav button.bnav.active { color: var(--gold-2); }
  .split-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
  .split, .split.cols-2, .split.cols-3, .split.cols-4 { grid-template-columns: 1fr; height: auto; }
  .split-col { display: none; }
  .split-col.current { display: flex; }
  .split-scroll { overflow: visible; }
  .pinbar { bottom: 84px; right: 12px; }
  .partlist > li { grid-template-columns: 1fr; }
  .uchips-small { justify-content: flex-start; }
}
.stack { display: flex; flex-direction: column; gap: 18px; }
.md table { display: block; max-width: 100%; overflow-x: auto; }

.netz-note { margin: 4px 0 8px; }
.netz-note .md { font-size: 14px; }
.netz-note .md p { margin: 2px 0; }
.placeinfo { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 8px 0 10px; }
.placeinfo dt { color: var(--muted); font-size: 13px; padding-top: 2px; }
.placeinfo dd { margin: 0; }
.placeinfo .chips { margin: 0; }
.slnote { border-left: 3px solid var(--rune, #b3261e); padding: 6px 10px; background: rgba(179,38,30,.08); border-radius: 6px; margin: 8px 0; font-size: 14px; }
.slnote .md p { margin: 2px 0; }

/* Testmodus & Sicherung */
.testbar { position: sticky; top: 0; z-index: 30; background: repeating-linear-gradient(135deg, #5b1712, #5b1712 14px, #6b1d16 14px, #6b1d16 28px); color: #ffe9d6; text-align: center; padding: 8px 14px; font-size: 14px; border-bottom: 1px solid #a3432a; }
.testbar a { color: #ffd27a; font-weight: 700; margin-left: 6px; }
.tag-test { background: #8d2a1e; color: #fff; border-color: #c0392b; margin-right: 6px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gmrow { margin-bottom: 12px; }
.confirm { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 10px; border: 1px solid #a3432a; border-radius: 10px; background: rgba(163,67,42,.12); }
.formrow { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.formrow label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.formrow select { min-width: 240px; }
.backuplist { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.backuplist li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.sicherung { grid-template-columns: 1fr; }

/* ---------- Stufe 2: Helden ---------- */
.slots { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.slot { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-width: 150px; }
.slot.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.slot-new { justify-content: center; align-items: center; color: var(--gold-2); border-style: dashed; }
.tag-ok { color: #cfe8c9; background: #23401f; border-color: #3f6b39; }
.tag-warn { color: #ffe0b8; background: #4a2a12; border-color: #8a4f20; }
.tag-dark { color: #d9cbb3; background: #2b2b2b; border-color: #555; }
.heropage { display: flex; flex-direction: column; gap: 16px; }
.herohead { display: flex; gap: 18px; align-items: flex-start; }
.herohead h2 { margin: 0; font-family: var(--font-head); color: var(--gold-2); font-size: 28px; }
.herohead-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.herohead-body p { margin: 0; }
.hero-portrait { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.portrait-lg { width: 132px; height: 132px; border-radius: 16px; object-fit: cover; object-position: top; font-size: 40px; }
.gmtools select { max-width: 220px; }
.archform { flex-wrap: wrap; }
.archform input { flex: 1; min-width: 220px; }
.herogrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.hero-main, .hero-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tabs-small { margin-bottom: 12px; }
.tabs-small .tab { all: unset; cursor: pointer; padding: 6px 12px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 15px; }
.tabs-small .tab.active { color: var(--gold-2); border-bottom-color: var(--gold); }
.bogen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bogen-box { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.18); }
.bogen-box h3 { margin: 0 0 8px; font-family: var(--font-head); font-size: 15px; color: var(--gold); letter-spacing: .03em; }
.bogen-wide { grid-column: 1 / -1; }
.ewrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ew { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.ew span { font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.ew b { font-family: var(--font-head); font-size: 22px; color: var(--gold-2); }
.ew-small b { font-size: 18px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
table.mini { width: 100%; border-collapse: collapse; font-size: 15px; }
table.mini td, table.mini th { padding: 3px 4px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: top; }
table.mini th { color: var(--muted); font-weight: 600; font-size: 12px; text-align: right; }
table.mini th:first-child { text-align: left; }
td.num { text-align: right; font-weight: 700; color: var(--gold-2); width: 40px; }
.waffe { margin-bottom: 8px; }
.check { display: inline-flex; gap: 8px; align-items: center; margin: 4px 0 10px; }
.chip-static { cursor: default; }
.chip-warn { border-color: #8a4f20; color: #ffd0a0; }
.bars { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.hbar-head { display: flex; justify-content: space-between; font-size: 14px; }
.hbar-track { height: 10px; border-radius: 6px; background: #2a1f18; overflow: hidden; border: 1px solid var(--line); }
.hbar-fill { height: 100%; background: var(--gold); transition: width .3s; }
.bar-le .hbar-fill { background: linear-gradient(90deg, #8d2a1e, #d4493a); }
.bar-ae .hbar-fill { background: linear-gradient(90deg, #2d4f99, #5f8be0); }
.bar-ke .hbar-fill { background: linear-gradient(90deg, #8a7020, #e0c050); }
.bar-schip .hbar-fill { background: linear-gradient(90deg, #5a3f80, #9a7ad0); }
.geld { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.inventar ul { margin: 6px 0 0; padding-left: 18px; font-size: 15px; }
.liveform h4 { margin: 12px 0 6px; font-size: 14px; color: var(--gold); }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.formgrid label, .field { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.field { margin: 8px 0; }
.formgrid input, .formgrid select, .field input, .field textarea, .invrow input, .btnrow input, .btnrow select, .gmtools select {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 15px; }
.invedit { display: flex; flex-direction: column; gap: 6px; }
.invrow { display: grid; grid-template-columns: 56px 1fr 90px auto; gap: 6px; }
.secret-card { border-color: #6b2620; background: linear-gradient(180deg, #2a1614, var(--surface)); }
table.log { width: 100%; border-collapse: collapse; font-size: 14px; }
table.log th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 4px; }
table.log td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.uploadbox { display: flex; flex-direction: column; gap: 8px; }
.filebtn { display: inline-flex; align-self: flex-start; cursor: pointer; }
.uploadpreview { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; }
.difflist { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.diffgroup h4 { margin: 0 0 4px; font-size: 14px; color: var(--gold); }
.diffgroup ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.diffgroup li { display: flex; gap: 8px; align-items: baseline; font-size: 15px; flex-wrap: wrap; }
.diff-label { font-weight: 600; min-width: 160px; }
.diff-new { color: #9fd49a; }
.diff-gone { color: #e59a8f; text-decoration: line-through; }
.diff-detail { opacity: .7; }
.review { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.review:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.review-card { border-color: var(--gold); }
.quote { font-style: italic; color: #e3d5b6; }
.uplist { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.uplist li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pendlist { margin: 0; padding-left: 18px; }
.herocards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.herocard { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); align-items: flex-start; }
.herocard:hover { border-color: var(--gold); }
.pcard-fallen { filter: grayscale(.6); border-color: #444; }
@media (max-width: 900px) {
  .herogrid { grid-template-columns: 1fr; }
  .herohead { flex-direction: column; align-items: center; text-align: center; }
  .herohead-body .btnrow { justify-content: center; }
  .ewrow { grid-template-columns: repeat(4, 1fr); }
  .diff-label { min-width: 0; }
  .invrow { grid-template-columns: 48px 1fr 70px auto; }
}

.hbar { display: flex; flex-direction: column; gap: 3px; }
.difflist input[type=checkbox], .check input, .live-card input[type=checkbox] { width: auto; flex: none; margin: 0; }
.formgrid input, .formgrid select { width: 100%; }
.tabs-small { display: flex; flex-wrap: wrap; }
@media (max-width: 900px) { .hero-side { order: -1; } }

/* ---------- Stufe 2b: Steigern ---------- */
.steigern { display: flex; flex-direction: column; gap: 10px; }
.st-ap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: end; }
.st-ap > div { display: flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.st-ap > div b { font-size: 22px; color: var(--gold-2); }
.st-ap > div.st-neg b { color: #e59a8f; }
.st-ap p { grid-column: 1 / -1; margin: 0; }
.st-table { width: 100%; }
.st-table td { vertical-align: middle; padding: 3px 4px; }
.st-table tr.st-changed td { background: rgba(209, 169, 79, .08); }
.st-val { white-space: nowrap; min-width: 64px; }
.st-btns { white-space: nowrap; }
.st-btns .btn { min-width: 34px; padding: 4px 0; margin-left: 4px; }
.st-btns .btn:disabled { opacity: .35; cursor: default; }
.st-table select { width: auto; padding: 4px 6px; }
.st-info { white-space: nowrap; }
.st-cost { color: var(--gold-2); margin-left: auto; white-space: nowrap; }
.st-group summary { cursor: pointer; font-weight: 600; color: var(--gold); padding: 4px 0; }
.st-extra { display: grid; grid-template-columns: 170px 1fr auto auto auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.st-extra input, .st-extra select { width: 100%; padding: 8px 10px; }
.st-short { max-width: 90px; }
.st-summary { border: 1px dashed var(--gold); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.st-summary h4 { margin: 0; color: var(--gold); }
.st-steps { list-style: none; margin: 0; padding: 0; max-height: none; }
.st-steps li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 15px; padding: 2px 0; }
.st-steps input[type=checkbox] { width: auto; flex: none; margin: 0; }
.st-leit { margin-top: 8px; }
@media (max-width: 700px) {
  .st-extra { grid-template-columns: 1fr 1fr; }
  .st-info { display: none; }
  .st-table td.muted { display: none; }
}

/* ---------- Stufe 3a: Sitzung ---------- */
.sessionbar { display: block; position: sticky; top: 0; z-index: 29; text-align: center; padding: 8px 14px; font-size: 14px;
  background: linear-gradient(90deg, #1f2a1a, #2c3a22, #1f2a1a); color: #d9ecc9; border-bottom: 1px solid #4c6b38; }
.sessionbar b { color: #f0ffd9; }
.sessionbar-roll { background: linear-gradient(90deg, #4a3410, #6b4a12, #4a3410); color: #ffe9b8; border-bottom-color: var(--gold); animation: pulsebar 2s ease-in-out infinite; }
@keyframes pulsebar { 50% { filter: brightness(1.25); } }
.sgrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.smain { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sside { position: sticky; top: 60px; min-width: 0; }
.sbar-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.sbar-row label { display: flex; flex-direction: column; gap: 3px; }
.sbar-row select { width: auto; padding: 6px 8px; }
.sbar-end { margin-left: auto; }
.reqrow { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 8px 0; }
.reqrow select { width: auto; padding: 7px 9px; }
.reqcard > input { margin: 4px 0 8px; }
.reqprev { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.freeroll { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.freeres { color: var(--gold-2); }
.prow { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); }
.prow-open { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(209,169,79,.25) inset; }
.prow-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prow-label { font-size: 17px; color: var(--gold-2); }
.prow-act, .prow-dice, .decide { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-big { font-size: 18px; padding: 12px 22px; }
.btn-link { margin-left: auto; background: transparent; border: 0; color: var(--muted); text-decoration: underline; padding: 2px 4px; }
.btn-schip { background: linear-gradient(180deg, #3b2a5c, #2a1d44); border-color: #7a5fb0; color: #e6dbff; }
.dice { display: inline-flex; gap: 5px; align-items: center; vertical-align: middle; }
.die { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 4px; border-radius: 7px; font-weight: 700; font-size: 15px;
  background: #efe3c4; color: #2a1d10; border: 1px solid #b89a5a; font-family: inherit; }
.die-bad { background: #e9b9a8; border-color: #a05a44; }
.die-1 { background: #bfe6b0; border-color: #4f8f3c; }
.die-20 { background: #e58f80; border-color: #8f2d1f; color: #2a0b06; }
.die-confirm { background: transparent; color: var(--muted); border-style: dashed; }
.die-pick { cursor: pointer; }
.die-pick.on { outline: 3px solid #a98be6; outline-offset: 1px; }
.modline b { color: var(--gold-2); }
.schipline { font-size: 14px; color: #d8c9ff; background: rgba(122, 95, 176, .15); border: 1px solid #5a4590; border-radius: 8px; padding: 4px 8px; }
.schipask, .schippick { border: 1px dashed #7a5fb0; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.diceinput { display: inline-flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.diceinput input { width: 62px; padding: 7px 6px; text-align: center; }
.rolldone { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; display: flex; flex-direction: column; gap: 5px; }
.tag-gm { color: #f2d0ff; background: #3b1f4a; border-color: #7b4b96; }
.grp-row { border-bottom: 1px solid var(--line); padding: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.grp-row:last-child { border-bottom: 0; }
.grp-head { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.grp-vals { display: flex; gap: 10px; flex-wrap: wrap; }
.grp-num { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.grp-num input { width: 62px; padding: 5px 6px; }
.chip-lock { border-style: solid; }
.chip-src { opacity: .7; font-size: 12px; }
.zform { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.zform select { width: auto; padding: 6px 8px; }
.zform p { flex-basis: 100%; margin: 0; }
.zmodus { margin-top: 3px; font-size: 12px; padding: 3px 5px; }
.evbar-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.evbar-head select { width: auto; padding: 5px 8px; }
.evlist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 70vh; overflow-y: auto; }
.ev { display: grid; grid-template-columns: 44px 1fr; gap: 6px; font-size: 14px; padding: 5px 2px; border-bottom: 1px solid rgba(255,255,255,.04); }
.evtime { color: var(--muted); font-size: 12px; padding-top: 2px; }
.ev-schip .evtext { color: #d8c9ff; }
.ev-sitzung .evtext { color: var(--gold-2); font-weight: 600; }
.ev-private { background: rgba(255,255,255,.025); }
.evroll { white-space: normal; }
.evroll .die { min-width: 22px; height: 22px; font-size: 12px; border-radius: 5px; }
.evmark { text-align: center; font-size: 12px; color: var(--gold); border-top: 1px dashed var(--gold); margin: 6px 0; padding-top: 2px; }
@media (max-width: 1000px) {
  .sgrid { grid-template-columns: 1fr; }
  .sside { position: static; }
  .evlist { max-height: 50vh; }
}
@media (max-width: 1500px) { .navlink { padding: 8px 8px; gap: 5px; } .me-name { display: none; } }

/* ---------- Würfel-Animation (3D) ---------- */
.diceov { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(8, 5, 3, .86); }
.diceov-box { width: min(560px, 100%); border: 1px solid var(--gold); border-radius: 18px; padding: 22px 20px 16px; background: #1f1810;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.diceov-label { margin: 0; font-family: var(--font-head); font-size: 22px; color: var(--gold-2); text-align: center; }
.diceov-dice { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; align-items: flex-start; }
.die3d-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.die3d { width: 104px; height: 104px; position: relative; perspective: 520px; }
.die3d-body { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.die3d.kept { opacity: .45; }
.d20face { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; box-sizing: content-box;
  border-style: solid; border-color: transparent; border-top-width: 0; backface-visibility: hidden; }
.d20face span { position: absolute; text-align: center; font-weight: 800; font-size: 13px; line-height: 1; color: #2a1806; transform: translateY(-50%); }
.d20face span.hi { color: #7a1408; } .d20face span.lo { color: #2c5a12; }
.d6face { position: absolute; left: 0; top: 0; display: grid; place-items: center; border-radius: 10px; border: 1px solid rgba(60,35,8,.5);
  backface-visibility: hidden; box-shadow: inset 0 0 10px rgba(60,35,8,.35); }
.d6face span { font-size: 26px; font-weight: 800; color: #2a1806; }
.die3d-flat { display: grid; place-items: center; border-radius: 14px; background: #e3c27a; } .die3d-flat span { font-size: 30px; font-weight: 800; color: #2a1806; }
.die3d-num { font-size: 22px; color: var(--gold-2); min-height: 28px; opacity: 0; transition: opacity .3s; }
.die3d-num.show { opacity: 1; }
.diceov-info { margin: 0; min-height: 24px; font-size: 17px; color: var(--muted); text-align: center; opacity: 0; transition: opacity .3s; }
.diceov-info.show { opacity: 1; color: var(--text); }
.diceov-foot { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 10px; flex-wrap: wrap; }
.animtoggle { display: inline-flex; gap: 6px; align-items: center; }
.animtoggle input { width: auto; margin: 0; }
.rollcard .animtoggle { margin-bottom: 4px; }
@media (max-width: 500px) { .die3d { width: 86px; height: 86px; } .diceov-dice { gap: 10px; } }
.evdel { margin: 2px 0 0; padding: 2px 0; }
.evdel-ask { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }

/* ---------- Spielleiterhilfe ---------- */
.plancard .tabs { margin-bottom: 8px; }
.planblock { border: 1px solid var(--line); border-radius: 10px; margin: 6px 0; padding: 4px 10px; background: var(--surface-2); }
.planblock > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; font-weight: 700; color: var(--gold-2); }
.planblock:not(.planscene) > summary { color: var(--text); }
.planblock .md, .planblock p { font-size: 15px; }
.planitem { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; margin: 4px 0; border-radius: 8px; border: 1px solid rgba(209,169,79,.25); background: rgba(209,169,79,.05); }
.planitem input[type=checkbox] { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: #b8933f; }
.planitem.done { opacity: .6; } .planitem.done .planitem-body > div:first-child { text-decoration: line-through; }
.planitem-body { flex: 1; min-width: 0; } .planitem-body p { margin: 0; }
.planitem-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 4px; }
.chip-unlock { font-size: 12px; padding: 1px 8px; border-color: #4c6b38; color: #cfe6bd; }
.chip-app { border-style: dashed; }
.taglist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.carry { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }
.pmodal { position: fixed; inset: 0; z-index: 90; background: rgba(8,5,3,.8); display: grid; place-items: center; padding: 16px; }
.modal-box { width: min(560px, 100%); max-height: 88vh; overflow-y: auto; background: #1f1810; border: 1px solid var(--gold); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.modal-wide { width: min(720px, 100%); }
.modal-box h3 { margin: 0; color: var(--gold-2); }
.unlocklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.unlock-bad { color: #f0b3a6; font-size: 14px; }
.hitlist { list-style: none; padding: 0; margin: 0; }
.pickbox { display: flex; flex-direction: column; gap: 4px; border: 1px dashed var(--line); border-radius: 10px; padding: 10px; }
.picksec { display: flex; flex-direction: column; gap: 2px; }
.pickpart { margin-left: 22px; }
.endbox { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.openend { display: flex; flex-direction: column; gap: 3px; }
.sbegin label.small { display: flex; flex-direction: column; gap: 3px; max-width: 420px; margin-bottom: 10px; }

/* ---------- Stufe 3b: Chat, Live-Anzeige, Countdowns, Dungeonzeit ---------- */
.chatfab { position: fixed; right: 18px; bottom: 18px; z-index: 80; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #24190c; border: 1px solid #8a6a26; box-shadow: 0 8px 24px rgba(0,0,0,.5); cursor: pointer; }
.chatfab-new { animation: pulsebar 1.6s ease-in-out infinite; }
.chatbadge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #b3261e; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid #1a130c; }
.chatbadge-in { position: static; display: inline-grid; margin-left: 6px; border: 0; }
.chatpanel { position: fixed; right: 18px; bottom: 86px; z-index: 81; width: min(380px, calc(100vw - 24px)); height: min(520px, calc(100vh - 160px)); display: flex; flex-direction: column;
  background: #1f1810; border: 1px solid var(--gold); border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.6); overflow: hidden; }
.chathead { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.chathead b { flex: 1; color: var(--gold-2); }
.chatlist { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.chatlist button { width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: inherit; padding: 10px 6px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; font: inherit; }
.chatlist button:hover { background: var(--surface-2); }
.chatmsgs { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.chatmsg { align-self: flex-start; max-width: 85%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 6px 10px; }
.chatmsg.mine { align-self: flex-end; background: #3a2c14; border-color: #6b5222; border-radius: 12px 12px 4px 12px; }
.chattext { white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.chattime { font-size: 11px; color: var(--muted); margin-top: 2px; text-align: right; }
.chatinput { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); align-items: flex-end; }
.chatinput textarea { flex: 1; resize: none; padding: 8px 10px; font: inherit; }
@media (max-width: 900px) { .chatfab { bottom: 78px; right: 12px; width: 50px; height: 50px; } .chatpanel { bottom: 136px; right: 8px; height: min(480px, calc(100vh - 200px)); } }
.showbtn { display: inline-flex; align-items: center; gap: 6px; }
.showbox { border: 1px dashed var(--gold); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; flex-basis: 100%; }
.showov .showcontent { max-height: 70vh; overflow-y: auto; }
.showov .eyebrow { margin: 0; }
.cdlist { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cdlist li { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.cd-title { flex: 1; min-width: 0; }
.cd-rest { color: var(--gold-2); white-space: nowrap; }
.cd-warn .cd-title, .cd-warn .cd-rest { color: #ffb8a0; }
.cd-over .cd-rest { color: #ff6b5a; }
.cdform { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.cdform select { width: auto; padding: 6px 8px; }
.clock-dz { margin-top: 6px; color: #cfe6bd; }
.clock-dungeon .clock-time { font-size: 28px; }
.dgset input { max-width: 220px; } .dgset input[type=number] { width: 70px; }
.sclock .clock { margin-bottom: 6px; } .sclock .clock-time { font-size: 30px; }
.sclock > .btn { margin-bottom: 8px; }
.sside { display: flex; flex-direction: column; gap: 16px; }
.showimg { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.showimg img { max-width: 100%; max-height: 72vh; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; }
.showimg figcaption { font-style: italic; color: #e3d5b6; text-align: center; }
.showbtn .btn + .btn { margin-left: 4px; }
.dsym { display: inline-grid; place-items: center; color: var(--gold-2); flex: none; line-height: 0; }
.portal-sym { margin: 0 2px; }
.dcard-head .dsym { margin-right: 6px; }
.entry-sym { padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }

/* ---------- Stufe 3c: Kampf ---------- */
.kampfcard { border-color: #6b2a20; }
.kampf { display: flex; flex-direction: column; gap: 10px; }
.khead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 18px; }
.khead .sbar-end { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.kende { display: inline-flex; gap: 6px; }
.kini { display: flex; flex-direction: column; gap: 6px; }
.kfrage { border: 1px solid #8a4f20; background: #2d1d10; border-radius: 10px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kaktion { border: 1px solid var(--line); border-left: 3px solid var(--rune); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.kaktion .prow { margin: 0; }
.kaktion-head { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.kdu { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(209, 169, 79, .25); }
.kpatzer { color: #ffb4a8; }
.ktabwrap { overflow-x: auto; }
.ktab { width: 100%; border-collapse: collapse; font-size: 15px; }
.ktab th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.ktab td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ktab tr.kturn td { background: rgba(209, 169, 79, .12); }
.ktab tr.kdone td { opacity: .65; }
.ktab tr.kbesiegt td { opacity: .45; text-decoration: line-through; }
.ktab tr.kbesiegt td.kact { text-decoration: none; opacity: 1; }
.ktab tr.kheld td:nth-child(3) b { color: var(--gold-2); }
.kact { white-space: nowrap; }
.kact .btn { margin: 0 4px 4px 0; }
.kwert { background: none; border: 1px dashed var(--line); color: var(--text); border-radius: 6px; padding: 0 6px; cursor: pointer; font: inherit; min-width: 32px; }
.kwert:hover { border-color: var(--gold); }
.klep { white-space: nowrap; }
.kbar { display: block; height: 4px; background: #3a2a22; border-radius: 3px; margin-top: 3px; min-width: 60px; }
.kbar span { display: block; height: 100%; background: var(--rune); border-radius: 3px; }
.ktagbtn { cursor: pointer; background: none; font: inherit; font-size: 12px; }
.kform, .keigen { border: 1px dashed var(--gold); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.kschaden { display: flex; flex-direction: column; gap: 6px; }
.kschip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kschip .schipask { flex-basis: 100%; }
.kverteidigen { display: flex; flex-direction: column; gap: 6px; }
.gwahl { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ktreffer, .kvorgemerkt { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.kvorgemerkt li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.kvorgemerkt li.kfehlt { border-color: #8a4f20; }
.kvorgemerkt .keigen { flex-basis: 100%; }
.kanz { display: inline-flex; align-items: center; gap: 4px; }
.kname { flex: 1 1 200px; }
.st-mid { max-width: 160px; }
.klog ul { list-style: none; margin: 0; padding: 0; }
.klog li { padding: 2px 0; border-bottom: 1px dotted var(--line); }
.kroll .prow { margin-top: 2px; }
.kindenkampf { margin-left: 8px; }
.kdazu { border-top: 1px solid var(--line); padding-top: 8px; }
@media (max-width: 640px) {
  .ktab { font-size: 14px; }
  .ktab td, .ktab th { padding: 4px; }
  .khead .sbar-end { margin-left: 0; }
}
.kheld-dazu { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dlab { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; backface-visibility: hidden; }
.dlab span { position: absolute; transform: translate(-50%, -50%); font-weight: 800; font-size: 14px; line-height: 1; color: #2a1806; white-space: nowrap; }
.dlab span.hi { color: #7a1408; } .dlab span.lo { color: #2c5a12; }
.die3d-10t .dlab span, .die3d-10e .dlab span { font-size: 12px; }
.die3d-4 .dlab span, .die3d-8 .dlab span { font-size: 16px; }
.diceov-w100 { margin: 0; text-align: center; font-size: 18px; color: var(--gold-2); }
.formelwahl { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.formelwahl select { width: auto; }
.stabs { margin: 0 0 12px; }
.stabs .tab { background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.stabs .tab.active { color: var(--gold-2); border-bottom-color: var(--gold); }
.stabs .tab-kampf { color: #ffb4a8; }
.tabbadge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--rune); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.newlist li.neu { border-left: 3px solid var(--gold); padding-left: 8px; }
.gnotes { display: flex; flex-direction: column; gap: 10px; }
.gnote-edit { display: flex; flex-direction: column; gap: 8px; }
.gnote-log { list-style: none; margin: 6px 0 0; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 4px; }
.gnote-old { border-left: 2px solid var(--line); padding-left: 8px; margin-top: 4px; }
.gnote-trash { border-top: 1px solid var(--line); padding-top: 6px; }
@media (max-width: 640px) { .stabs { overflow-x: auto; flex-wrap: nowrap; } .stabs .tab { white-space: nowrap; padding: 8px 10px; } }
.grid-start .neu-slot { order: 10; display: contents; }
.grid-start .neu-slot > .card { order: 10; }
.grid-start .neu-slot.neu-oben > .card { order: -1; }

/* ---------- Stufe 4: Protokoll, Beute, Chronik, Friedhof ---------- */
.anwesend { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.chip-small { font-size: .75rem; padding: .1rem .45rem; }
.merken { display: flex; gap: .4rem; margin: .4rem 0 .6rem; }
.merken input { flex: 1; min-width: 0; }
.evstar { background: none; border: 0; color: var(--muted, #8a8170); cursor: pointer; padding: 0 .3rem 0 0; font-size: 1rem; line-height: 1; }
.evstar.on, .ev-star .evtext { color: var(--gold, #c9a227); }
.ev-merken .evtext { font-style: italic; }
.ev-kampfbericht .evtext, .ev-ap .evtext, .ev-beute .evtext { font-weight: 600; }
.beuteform { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.beuteform .grow { flex: 1 1 12rem; }
.beuteform .check { display: flex; gap: .35rem; align-items: center; }
.beuteliste { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.beuteliste li { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.beute-sl input { min-width: 0; }
.apbox { border-top: 1px solid var(--line, #3a3328); margin-top: .6rem; padding-top: .6rem; }
.apbox h4 { margin: 0 0 .4rem; }
.apbox .grow { flex: 1 1 14rem; }
.apliste { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .3rem; }
.apliste li { display: grid; grid-template-columns: minmax(6rem, 10rem) 5.5em 1fr; gap: .4rem; align-items: center; }
.letzte { margin-top: .8rem; border-top: 1px solid var(--line, #3a3328); padding-top: .6rem; }
.chronik { display: grid; gap: 1rem; }
.chronik-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.chronik-titel { font-weight: 400; }
.chronik-meta { color: var(--muted, #8a8170); margin: .2rem 0 .6rem; }
.chronik-zu { opacity: .75; }
.chronik-text { position: relative; max-height: 16rem; overflow: hidden; }
.chronik-text.offen { max-height: none; }
.chronik-text:not(.offen)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4rem; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.chronik-mehr { position: absolute; bottom: .3rem; left: 50%; transform: translateX(-50%); z-index: 1; }
.chronik-privat { margin-top: .8rem; padding: .6rem .8rem; border-left: 3px solid var(--gold, #c9a227); background: rgba(201, 162, 39, .07); }
.chronik-privat h4 { margin: 0 0 .3rem; }
.chronik-neu ul { margin: .3rem 0 .6rem; }
.chronik-sl { margin-top: .8rem; padding-top: .6rem; border-top: 1px dashed var(--line, #3a3328); display: grid; gap: .4rem; }
.chronik-wer { display: inline-flex; gap: .2rem; align-items: center; }
.friedhof { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.grab { display: grid; gap: .5rem; }
.grab-stein { text-align: center; padding: 1.2rem 1rem 1rem; border-radius: 48% 48% .4rem .4rem / 22% 22% .4rem .4rem;
  background: linear-gradient(#4a463f, #34312c); border: 1px solid #5c574e; color: #e7e1d3; box-shadow: inset 0 0 18px rgba(0, 0, 0, .45); }
.grab-stein h2 { margin: .5rem 0 .2rem; font-size: 1.3rem; letter-spacing: .04em; }
.grab-stein .portrait { margin: 0 auto; filter: grayscale(.7); }
.grab-kreuz { display: block; font-size: 1.4rem; opacity: .8; }
.grab-daten { margin: 0; font-size: .9rem; opacity: .9; }
.grab-inschrift { margin-top: .6rem; font-style: italic; font-size: .95rem; }
.grab-inschrift p { margin: .2rem 0; }
.grab-info p { margin: .2rem 0; }
.grabform .formgrid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.grabform .span2 { grid-column: 1 / -1; }
.grabform textarea { width: 100%; }
@media (max-width: 600px) { .apliste li { grid-template-columns: 1fr 5em; } .apliste li input:last-child { grid-column: 1 / -1; } }
.ev.ev-gm { grid-template-columns: 20px 40px 1fr; }

/* ---------- Stufe 5: Regelkompendium ---------- */
.regel-link { font: inherit; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-align: left; border-bottom: 1px dotted var(--muted); }
.regel-link:hover, .regel-link:focus-visible { color: var(--gold); border-bottom-color: var(--gold); }
.chip.regel-link { border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 14px; color: var(--text); }
.chip.regel-link:hover { border-color: var(--gold); }
.regel-grid { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.regel-liste { display: grid; gap: .6rem; position: sticky; top: .5rem; max-height: calc(100vh - 6rem); overflow: auto; padding-right: .3rem; }
.regel-suche { width: 100%; font-size: 1rem; padding: .55rem .8rem; }
.regel-kats { gap: .3rem; }
.regel-kats .chip { font-size: 12px; padding: 3px 9px; }
.regel-treffer { list-style: none; margin: 0; padding: 0; display: grid; }
.regel-treffer li a { display: block; padding: .35rem .5rem; border-radius: 8px; text-decoration: none; color: var(--text); }
.regel-treffer li a:hover, .regel-treffer li.aktiv a { background: rgba(209, 169, 79, .12); }
.regel-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.regel-head h2 { margin: 0; font-family: var(--font-head); }
.regel-felder { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .9rem; margin: .7rem 0; font-size: .95rem; }
.regel-felder dt { color: var(--muted); }
.regel-felder dd { margin: 0; }
.regel-fuss { display: flex; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: .5rem; margin-top: .8rem; }
.regel-ov { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; z-index: 60; padding: 16px; }
.regel-box { position: relative; width: min(40rem, 100%); max-height: 85vh; overflow: auto; }
.regel-zu { position: absolute; right: .8rem; top: .8rem; }
.regel-kompakt .regel-head { padding-right: 2.5rem; }
.hausregeln { display: grid; gap: 1rem; margin-top: .8rem; }
@media (max-width: 800px) {
  .regel-grid { grid-template-columns: 1fr; }
  .regel-liste { position: static; max-height: none; }
}

/* ---------- Stufe 6a: Magie, Wirkungen, Gegenstände ---------- */
.wirk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip.wirk { border-radius: 10px; text-align: left; line-height: 1.35; padding: 4px 10px; border-color: #7d6bd6; color: #d6ccff; background: rgba(125, 107, 214, .12); }
.chip.wirk-aufrecht { border-style: dashed; }
.wirk .chip-src { color: var(--muted); font-size: 12px; }
.wirk-x { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 0 0 6px; font-size: 12px; opacity: .7; }
.wirk-x:hover { opacity: 1; }
.zauberpanel { display: grid; gap: 8px; margin-top: 6px; }
.zgruppe .chips { margin-top: 4px; }
.zauberform { border-left: 3px solid #7d6bd6; padding-left: 10px; display: grid; gap: 6px; }
.zkosten { margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: rgba(125, 107, 214, .1); }
.ev-magie .evtext::before, .ev-wirkung .evtext::before { content: "✧ "; color: #b9a8ff; }
.ev-gegenstand .evtext::before { content: "⚗ "; }
.inventar li .btn-link { margin-left: 6px; }
.kextra td { background: rgba(125, 107, 214, .06); }

/* ---------- Stufe 6b: Beitritt, Anträge, Rast, Friedhof ---------- */
.beitritt { border-color: var(--gold); display: grid; gap: 8px; justify-items: start; }
.beitritt-kompakt { margin-bottom: 14px; }
.beitritt-frage { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 10px;
  border: 1px solid var(--gold); background: rgba(209, 169, 79, .1); font-size: 14px; }
.antrag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 8px; }
.antrag-offen { border-color: #7d6bd6; background: rgba(125, 107, 214, .1); }
.antrag-sl { display: grid; justify-content: stretch; border-left: 3px solid #7d6bd6; }
.antrag-sl p { margin: 0; }
.antragcard { border-color: #7d6bd6; }
.rastbanner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 10px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); }
.rastbanner.rast-alle { border-color: var(--ok); background: rgba(111, 174, 106, .1); }
.rast-stimmen, .rast-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rast-knoepfe { margin-left: auto; }
.rastvorschlag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.regenform { display: grid; gap: 8px; }
.regentab { width: 100%; border-collapse: collapse; }
.regentab th, .regentab td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.regentab th { color: var(--muted); font-weight: 600; }
.regenerg ul { margin: 4px 0 0; padding-left: 18px; }
.regencard .btnrow { margin-top: 0; }
.ev-rast .evtext::before { content: "⛺ "; }
.gefallen-kopf { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.gefallen-kopf h2 { margin: 0 0 4px; }
@media (max-width: 700px) {
  .regentab thead { display: none; }
  .regentab tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .regentab td { border: 0; padding: 2px 0; }
  .regentab td:first-child, .regentab td:nth-child(2) { grid-column: 1 / -1; }
  .rast-knoepfe { margin-left: 0; }
}
@media (max-width: 700px) { .regentab td[data-l]::before { content: attr(data-l) " "; color: var(--muted); font-size: 12px; } }
/* Hausregeln auf dem Handy: breite Tabellen scrollen in sich, die Seite bleibt schmal (Stufe 6b) */
.hausregeln { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.hausregeln .card, .hausregeln .regel, .hausregeln .md, .regel-grid > * { min-width: 0; }
.regel h2 { overflow-wrap: anywhere; }
.regenform label { display: inline-flex; align-items: center; gap: 6px; }
.regenform input[type=checkbox] { width: auto; display: inline-block; margin: 0; flex: none; }
.regentab td label { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Stufe 6c: Verletzungen, Sterben, Heilkunde ---------- */
.verl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; align-items: center; }
.chip.verl { border-radius: 10px; padding: 4px 10px; line-height: 1.35; border-color: #b4483c; color: #f2c2b8; background: rgba(192, 57, 43, .12); }
.chip.verl-3 { border-color: var(--rune); background: rgba(192, 57, 43, .22); }
.chip.verl-4 { border-color: var(--rune); background: rgba(192, 57, 43, .35); border-style: double; border-width: 3px; }
.verl .chip-src { color: var(--muted); font-size: 12px; }
.verl-menue { width: 100%; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); }
.verl-vorschau { margin-top: 2px; }
label.chk { display: inline-flex; align-items: center; gap: 6px; }
label.chk input[type=checkbox] { width: auto; display: inline-block; margin: 0; }
.sterben { margin: 8px 0; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--rune); background: rgba(192, 57, 43, .14); }
.sterben-tot { background: rgba(192, 57, 43, .25); }
.sterben p { margin: 0 0 6px; }
.heilkunde { border-left: 3px solid var(--ok); padding-left: 10px; }
.ev-verletzung .evtext::before { content: "🩸 "; }
.ev-sterben .evtext::before { content: "✝ "; }
.ktab td.kact { white-space: normal; min-width: 11rem; }

/* ---------- Stufe 6d: Kampfregeln ---------- */
.kmanoever select { max-width: 100%; }
.ktaktik { margin-top: 6px; }
.kturnbox { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 10px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.kturnbox .ktaktik { margin: 0; }
.kpatzer-box { border-color: var(--rune); background: rgba(192, 57, 43, .1); }
.ausruestung { margin: 8px 0; }
.ausruestung summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.ausruestung ul { margin: 6px 0; padding-left: 18px; }
.ausruestung li { margin: 3px 0; }
.ausruestung select, .ausruestung input { margin-left: 8px; width: auto; display: inline-block; }
.ev-status .evtext::before { content: "◆ "; }
.ev-ausruestung .evtext::before { content: "⚒ "; }

/* Nachtrag 6d: Reiter „Werte“ */
.heldwerte { display: grid; gap: 12px; }
.heldwerte .card { margin: 0; }
.hw-name { margin: 12px 0 4px; }
.hw-tab { width: 100%; border-collapse: collapse; }
.hw-tab th { text-align: left; font-weight: 600; opacity: .7; padding: 2px 6px 4px 0; }
.hw-tab td { padding: 3px 6px 3px 0; border-top: 1px solid var(--line); vertical-align: top; }
.hw-tab .tag { margin-left: 6px; }
.hw-grid { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.hw-ew { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.hw-eig { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.hw-eig b { font-size: 1.15em; }
.hw-liste { margin: 0; padding-left: 18px; }
.hw-liste li { margin: 3px 0; }
.heldwerte .chips { margin-bottom: 0; }
.chip-nt { opacity: .85; font-style: italic; }
@media (max-width: 560px) { .hw-ew { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hw-tab { font-size: .92em; } }
.hw-eff { white-space: nowrap; }

/* Stufe 6e: Fernkampf, Licht, Sicht */
.kfern { border-left: 3px solid var(--line); padding-left: 8px; margin: 6px 0; }
.ksicht, .klicht { font-size: 13px; padding: 4px 8px; width: auto; }
.lichtpanel { margin: 6px 0; }
.chip-licht { border-color: #c98a2b; color: #e7b45b; }
.chip-x { font: inherit; font-size: 12px; margin-left: 6px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; }
.kmunition table { margin: 6px 0; }
.hw-fern { margin: 6px 0 0; }
.kfern .reqrow { flex-wrap: wrap; }
.kfern select { max-width: 100%; min-width: 0; }
.kform { max-width: 100%; overflow-wrap: anywhere; }

/* Erfahrungsgrad bei der Heldenerschaffung (25.10.2026) */
.grad-wahl select { max-width: 320px; }
.grad-wahl .small { display: block; margin-top: 4px; }
.filebtn.disabled { opacity: .5; cursor: not-allowed; }
.ok-text { color: var(--ok, #4f8a4b); }

/* Stufe 6f: Wesen, Festhalten, Regeneration */
.kkreatur { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 3px 0; }
.kkreatur .tag { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.kkreatur select { font-size: 0.85em; padding: 1px 4px; min-height: 0; height: auto; width: auto; border-radius: 6px; }
.kkreatur .btn-link { padding: 0 2px; min-height: 0; }
.kwesen { margin: 6px 0; padding: 6px 8px; border-left: 3px solid var(--gold, #c9a227); background: rgba(201, 162, 39, 0.06); border-radius: 4px; }
.kwesen .reqrow { margin-top: 4px; }
.merkmal { margin-top: 4px; }
.merkmal input:not([type=checkbox]) { min-width: 14em; }

/* Stufe 6g: Rückgängig und Speicher */
.undolist { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.undolist li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); }
.undolist li.undo-top { border-color: var(--gold, #c9a227); }
.undolist .undo-label { flex: 1 1 260px; }
.undo-kurz { display: inline-flex; gap: 6px; align-items: center; margin-right: 6px; }
.speicherbar { display: block; width: 100%; max-width: 420px; height: 8px; margin: 4px 0 8px; }
.speichertab td, .speichertab th { padding: 2px 10px 2px 0; text-align: left; }

/* ---------- Stufe 7a: Logo ---------- */
.logo { display: inline-block; vertical-align: middle; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand .logo { filter: drop-shadow(0 0 6px rgba(192, 57, 43, .35)); }
.login-seal .logo { filter: drop-shadow(0 0 22px var(--rune-glow)); }
.loading .logo { filter: drop-shadow(0 0 18px var(--rune-glow)); }
.avatar-buehne { border-color: #3f6a8a; color: #bfe0f7; }

/* ---------- Stufe 7a: Bühne ---------- */
.bu-seite { position: fixed; inset: 0; background: #000; display: grid; place-items: center; overflow: hidden; }
.bu-seite.bu-ruhig { cursor: none; }
.bu-rahmen { width: min(100vw, calc(100vh * 16 / 9)); aspect-ratio: 16 / 9; container-type: size; position: relative; }
.bu-buehne {
  --bu-gut: #6fae6a; --bu-mittel: #d9a03f; --bu-schlecht: #d0503f;
  position: absolute; inset: 0; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) 25cqw;
  background:
    radial-gradient(70cqw 60cqh at 40% 0%, rgba(209, 169, 79, .07), transparent 70%),
    radial-gradient(60cqw 60cqh at 100% 100%, rgba(192, 57, 43, .08), transparent 70%),
    var(--bg);
  color: var(--text); font-size: 2.5cqh; line-height: 1.3;
}
.bu-buehne.bu-ohne-leiste { grid-template-columns: minmax(0, 1fr); }
.bu-vorschau { width: 100%; }
.bu-vorschau .bu-buehne { border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.bu-haupt { position: relative; overflow: hidden; min-width: 0; }
.bu-dim { color: var(--muted); }
.bu-klein { font-size: .8em; color: var(--muted); }
.bu-warn { color: #f2b4ac; font-weight: 600; }
.bu-titel { font-family: var(--font-head); color: var(--gold-2); letter-spacing: .03em; }

/* Pause, leer */
.bu-pause, .bu-leer { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqh; text-align: center; padding: 4cqh; }
.bu-pause .bu-logo { width: 34cqh; height: 34cqh; filter: drop-shadow(0 0 4cqh rgba(192, 57, 43, .45)); animation: bu-atem 6s ease-in-out infinite; }
@keyframes bu-atem { 50% { filter: drop-shadow(0 0 7cqh rgba(192, 57, 43, .7)); } }
.bu-pause-text { font-family: var(--font-head); font-size: 6.5cqh; color: var(--gold-2); letter-spacing: .04em; text-shadow: 0 .4cqh 2cqh #000; }
.bu-leer .logo { width: 12cqh; height: 12cqh; opacity: .25; }
@media (prefers-reduced-motion: reduce) { .bu-pause .bu-logo { animation: none; } }

/* Bild */
.bu-bild { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2cqh; padding: 3cqh 3cqw; }
.bu-bild img { max-width: 100%; max-height: 74cqh; object-fit: contain; border-radius: .8cqh; box-shadow: 0 2cqh 6cqh rgba(0, 0, 0, .7); border: .25cqh solid rgba(209, 169, 79, .45); }
.bu-bild figcaption { text-align: center; }
.bu-bild .bu-titel { font-size: 5.2cqh; }
.bu-bild .bu-text { font-size: 3cqh; font-style: italic; color: var(--text); opacity: .9; }
.bu-bild-leer { width: 40cqh; height: 30cqh; display: grid; place-items: center; border: .25cqh dashed var(--line); border-radius: 1cqh; }
.bu-bild-leer .logo { width: 14cqh; height: 14cqh; opacity: .5; }
.bu-pip { height: auto; padding: 0; gap: 1cqh; align-self: start; }
.bu-pip img { max-height: 52cqh; }
.bu-pip .bu-titel { font-size: 3.4cqh; }
.bu-pip .bu-text { font-size: 2.4cqh; }

/* Szene */
.bu-szene { position: absolute; inset: 0; }
.bu-szene img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bu-szene::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55)), linear-gradient(transparent 70%, rgba(0, 0, 0, .75)); pointer-events: none; }
.bu-szene-titel { position: absolute; left: 4cqw; bottom: 4cqh; z-index: 1; display: flex; flex-direction: column; gap: .6cqh; }
.bu-szene-titel span { font-family: var(--font-head); font-size: 5cqh; color: var(--gold-2); text-shadow: 0 .3cqh 1.5cqh #000; }
.bu-szene-titel small { font-size: 2.8cqh; font-style: italic; text-shadow: 0 .3cqh 1.2cqh #000; }

/* Kampf */
.bu-kampf { height: 100%; display: flex; flex-direction: column; padding: 3cqh 3cqw; gap: 2.5cqh; }
.bu-kampf-kopf { display: flex; align-items: baseline; gap: 3cqw; }
.bu-kampf-kopf .bu-titel { font-size: 5cqh; }
.bu-kampf-inhalt { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3cqw; }
.bu-ini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8cqh; }
.bu-ini li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) 30%; align-items: center; gap: 1cqw; padding: .6cqh 1cqw; border-radius: .8cqh; border: .2cqh solid transparent; }
.bu-ini-gross { gap: 1.1cqh; }
.bu-ini-gross li { font-size: 3.1cqh; padding: 1cqh 1.4cqw; background: rgba(42, 33, 25, .7); }
.bu-ini-zahl { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.bu-ini .bu-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bu-seite-gegner .bu-name { color: #f2c2b9; }
.bu-dran { border-color: var(--gold) !important; background: rgba(209, 169, 79, .16) !important; box-shadow: 0 0 2cqh rgba(209, 169, 79, .25); }
.bu-amzug { margin-left: .8em; font-size: .62em; text-transform: uppercase; letter-spacing: .12em; color: #24190c; background: var(--gold); padding: .1em .6em; border-radius: 99px; vertical-align: middle; }
.bu-fertig { opacity: .6; }
.bu-besiegt .bu-name { text-decoration: line-through; opacity: .6; }

/* Balken und Zustand */
.bu-balken { display: block; height: 1.1cqh; min-height: 6px; border-radius: 99px; background: #0b0806; border: 1px solid var(--line); overflow: hidden; }
.bu-balken > span { display: block; height: 100%; border-radius: 99px; transition: width .6s ease; }
.bu-gut { background: var(--bu-gut); } .bu-mittel { background: var(--bu-mittel); } .bu-schlecht { background: var(--bu-schlecht); }
.bu-zustand { justify-self: start; font-size: .78em; padding: .15em .7em; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.bu-z-gut { color: #cfe9cb; border-color: #3f7a43; }
.bu-z-mittel { color: #f3d9a4; border-color: #8a6a26; }
.bu-z-schlecht { color: #f6c0b6; border-color: #a33a2c; background: rgba(192, 57, 43, .15); }
.bu-z-boden { color: #fff; background: #6d2620; border-color: #c0392b; }

/* Leiste */
.bu-leiste { border-left: 1px solid var(--line); background: linear-gradient(180deg, rgba(33, 26, 20, .92), rgba(18, 14, 11, .96)); padding: 2.4cqh 1.6cqw; display: flex; flex-direction: column; gap: 2.4cqh; overflow: hidden; min-width: 0; }
.bu-leiste section { min-width: 0; }
.bu-leiste h2 { font-size: 1.9cqh; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 .9cqh; font-family: var(--font-body); font-weight: 700; }
.bu-uhr .bu-zeit { font-family: var(--font-head); font-size: 5.6cqh; color: var(--gold-2); line-height: 1.05; }
.bu-uhr .bu-zeit span { font-size: .4em; color: var(--muted); font-family: var(--font-body); }
.bu-ort { margin-top: .6cqh; }
.bu-helden { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.3cqh; }
.bu-helden li { display: grid; grid-template-columns: 5.4cqh minmax(0, 1fr); gap: .8cqw; align-items: center; }
.bu-held-text { display: flex; flex-direction: column; gap: .5cqh; min-width: 0; }
.bu-held-text .bu-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bu-held-weg .bu-portraet { filter: grayscale(1); opacity: .6; }
.bu-portraet { width: 5.4cqh; height: 5.4cqh; border-radius: 50%; object-fit: cover; border: .2cqh solid var(--gold); background: var(--surface-2); }
.bu-initiale { display: grid; place-items: center; font-family: var(--font-head); color: var(--gold-2); font-size: 2.6cqh; }
.bu-gegner, .bu-cds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7cqh; }
.bu-gegner li, .bu-cds li { display: flex; justify-content: space-between; gap: .8cqw; align-items: center; }
.bu-gegner .bu-name { color: #f2c2b9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bu-cds b { color: var(--gold-2); white-space: nowrap; }
.bu-sicht { margin: 0; }
.bu-leiste .bu-ini li { grid-template-columns: 2.2em minmax(0, 1fr); row-gap: .4cqh; padding: .5cqh .5cqw; font-size: 2.2cqh; }
.bu-leiste .bu-ini li > :nth-child(3) { grid-column: 2; }
.bu-leiste .bu-ini .bu-name { white-space: normal; }
.bu-gegner li { flex-wrap: wrap; }
.bu-gegner .bu-name { white-space: normal; }
.bu-pip-name { padding: 2cqh 2cqw; border: .2cqh solid rgba(209, 169, 79, .45); border-radius: 1cqh; background: rgba(42, 33, 25, .7); text-align: center; align-self: start; }
.bu-pip-name .bu-titel { font-size: 4cqh; }

/* Bedienelemente der Seite (verschwinden nach 3 Sekunden ohne Maus) */
.bu-regler { position: fixed; top: 12px; right: 12px; display: flex; gap: 8px; transition: opacity .4s; z-index: 5; }
.bu-ruhig .bu-regler { opacity: 0; pointer-events: none; }
.bu-ton-an { position: fixed; left: 16px; bottom: 16px; z-index: 5; font: 600 18px var(--font-body); padding: 12px 18px; border-radius: 12px; border: 1px solid #8a6a26; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #24190c; cursor: pointer; box-shadow: 0 6px 24px rgba(0, 0, 0, .6); }
.bu-hinweis { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); max-width: min(560px, 90vw); padding: 16px 20px; border-radius: 12px; background: #3a1513; border: 1px solid #6d2620; color: #f4c7c1; text-align: center; }
.bu-verbindung { position: fixed; left: 16px; top: 12px; z-index: 5; font-size: 14px; padding: 6px 12px; border-radius: 99px; background: rgba(58, 21, 19, .9); color: #f4c7c1; }

/* Steuerung (SL) */
.bu-steuer { display: flex; flex-direction: column; gap: 18px; }
.bu-reiter { margin: 0 0 14px; }
.bu-unbenutzt { opacity: .75; }
.bu-steuer-raster { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .bu-steuer-raster { grid-template-columns: minmax(0, 1fr); } }
.bu-vorschau-rahmen { background: #000; border-radius: 10px; padding: 6px; }
.bu-suche { margin: 8px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.bu-treffer { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.bu-treffer li { display: flex; gap: 8px; align-items: center; }
.bu-treffer li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bu-mehr { margin-top: 12px; }
.bu-mehr summary { cursor: pointer; color: var(--gold); }
.bu-mehr-inhalt { padding: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.bu-wahl { width: auto; }
.bu-schichten { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 10px; }
.bu-schicht-wahl { display: flex; gap: 6px; align-items: center; }
.bu-schicht-wahl select { flex: 1; min-width: 0; }
.bu-regler-zeile { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) 3.4em; gap: 8px; align-items: center; margin: 6px 0; }
.bu-regler-zeile input[type=range] { width: 100%; accent-color: var(--gold); padding: 0; }
.bu-prozent { text-align: right; font-variant-numeric: tabular-nums; }
.bu-sfx { display: flex; flex-wrap: wrap; gap: 8px; }
.bu-sfx-knopf { display: inline-flex; gap: 2px; }
.bu-klaenge, .bu-szenen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bu-klang { display: grid; grid-template-columns: minmax(120px, 1.2fr) auto minmax(160px, 1.4fr) auto auto auto; gap: 8px; align-items: center; }
.bu-klang .bu-regler-zeile { grid-template-columns: 3.5em minmax(0, 1fr) 3.4em; margin: 0; }
.bu-klang-name { min-width: 0; }
@media (max-width: 900px) { .bu-klang { grid-template-columns: minmax(0, 1fr) auto; } .bu-klang .bu-regler-zeile { grid-column: 1 / -1; } }
.bu-szenen li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.bu-szenen li > * { min-width: 0; }
.bu-szenen li .btn-link { grid-column: 2; justify-self: end; margin: 0; }

/* ---------- Stufe 7a-2a: Karten ---------- */
.kansicht { position: relative; }
.kansicht-flaeche { width: 100%; height: 100%; overflow: hidden; border-radius: 10px; background: #0b0807; border: 1px solid var(--line); user-select: none; -webkit-user-select: none; }
.kansicht-knoepfe { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; }
.kansicht-knoepfe .btn { background: rgba(33, 26, 20, .9); }
.kfigur-besiegt image, .kfigur-besiegt text { opacity: .55; }
.kfigur-besiegt image { filter: grayscale(1); }
.kfigur-geist { opacity: .55; pointer-events: none; }
.kfigur-dran { animation: kdran 1.6s ease-in-out infinite; }
@keyframes kdran { 50% { stroke-opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .kfigur-dran { animation: none; } }
.kkarte { margin: 12px 0 16px; }
.kkarte-kopf { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.kkarte-kopf select { width: auto; max-width: 100%; }
.kkarte-setzen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.kkarte-hinweis { color: #9fdcff; }
.kkarte-ansicht .kansicht-flaeche { max-height: min(72vh, 680px); margin: 0 auto; }
.kliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.kliste li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kliste-name { margin: 0 auto 0 0 !important; font-size: 17px; color: var(--text) !important; text-decoration: none !important; }
.ked-kopf { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ked-name { flex: 1 1 200px; font-family: var(--font-head); }
.ked-gruppe { flex: 0 1 180px; }
.ked-groesse { display: inline-flex; gap: 4px; align-items: center; }
.ked-groesse input { width: 4.2em; }
.ked-raster { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .ked-raster { grid-template-columns: minmax(0, 1fr); } }
.ked-werkzeuge { display: flex; flex-direction: column; gap: 10px; }
.ked-palette { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ked-feld { display: flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; text-align: left; padding: 5px 7px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); cursor: pointer; }
.ked-feld.on { border-color: var(--gold); background: rgba(209, 169, 79, .15); }
.ked-swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid #000; flex: none; }
.ked-obj { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); display: flex; flex-direction: column; gap: 6px; }
.ked-obj-reihe { display: flex; gap: 10px; }
.ked-obj-reihe input { width: 4em; }
.ked-karte .kansicht-flaeche { max-height: min(78vh, 760px); margin: 0 auto; }
.bu-karte { position: absolute; inset: 0; }
.bu-karte-ansicht, .bu-karte-ansicht .kansicht-flaeche { width: 100%; height: 100%; border: 0; border-radius: 0; }
.bu-karte-pip { position: absolute; right: 2cqw; top: 2cqh; width: 26cqw; padding: 1.4cqh; background: rgba(18, 14, 11, .88); border: .2cqh solid rgba(209, 169, 79, .45); border-radius: 1cqh; }
.bu-karte-pip .bu-pip img { max-height: 32cqh; }
.bu-dicht .bu-leiste { gap: 1.6cqh; }
.bu-dicht .bu-helden { gap: .7cqh; }
.bu-dicht .bu-helden li { grid-template-columns: 4cqh minmax(0, 1fr); }
.bu-dicht .bu-portraet { width: 4cqh; height: 4cqh; }
.bu-dicht .bu-initiale { font-size: 2cqh; }
.bu-dicht .bu-leiste .bu-ini li { font-size: 1.9cqh; padding: .3cqh .5cqw; }
.bu-dicht .bu-ini-gross li { font-size: 2.6cqh; padding: .7cqh 1.2cqw; }
.bu-dicht .bu-uhr .bu-zeit { font-size: 4.6cqh; }
.bu-dicht .bu-leiste { font-size: 2.1cqh; }
.bu-dicht .bu-leiste h2 { font-size: 1.6cqh; margin-bottom: .5cqh; }
.bu-dicht .bu-gegner { gap: .3cqh; }
.bu-dicht .bu-gegner li { flex-wrap: nowrap; }
.bu-dicht .bu-gegner .bu-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bu-dicht .bu-zustand { font-size: .72em; padding: 0 .5em; }
.bu-dicht .bu-helden li { grid-template-columns: 3.4cqh minmax(0, 1fr); }
.bu-dicht .bu-portraet { width: 3.4cqh; height: 3.4cqh; }
.bu-dicht .bu-held-text { flex-direction: row; align-items: center; gap: .6cqw; }
.bu-dicht .bu-held-text .bu-name { flex: 0 0 42%; }
.bu-dicht .bu-held-text .bu-balken { flex: 1; }
.bu-dicht .bu-held-text .bu-klein { display: none; }

/* ---------- Stufe 7a-2b: Bewegung, Vollbild ---------- */
.kfigur-verdeckt { opacity: .45; }
.kkarte-zug { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: rgba(111, 174, 106, .12); border: 1px solid #3f7a43; }
.kkarte-wahl { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; color: #9fdcff; }
.kampf-voll { position: fixed; z-index: 59; top: 0; right: 0; bottom: 0; width: min(460px, 40vw); overflow: auto; padding: 12px; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(0, 0, 0, .5); }
.kampf-voll .kkarte-voll { position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; right: min(460px, 40vw); margin: 0; padding: 10px 12px; background: var(--bg); display: flex; flex-direction: column; }
.kampf-voll .kkarte-voll .kkarte-ansicht { flex: 1; min-height: 0; }
.kampf-voll .kkarte-voll .kansicht-flaeche { height: 100%; max-height: none; aspect-ratio: auto !important; }
@media (max-width: 800px) {
  .kampf-voll { width: 100%; top: 56vh; border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(0, 0, 0, .5); }
  .kampf-voll .kkarte-voll { right: 0; bottom: 44vh; padding: 6px 8px; }
  .kampf-voll .kkarte-voll .kkarte-kopf { margin-bottom: 4px; }
}
.uchip:disabled { opacity: .5; cursor: not-allowed; }

/* Stufe 7a-2c: Kampf-Automatik */
.kauto-an { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.kauto-an input { width: 18px; height: 18px; margin: 0; }
.kauto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px solid #3c4a5a; background: #18212b; border-radius: 10px; padding: 6px 10px; font-size: 14px; }
.kauto-selbst { border-color: #8a4f20; background: #2d1d10; }
.kki { display: block; font-size: 12px; padding: 3px 6px; width: auto; max-width: 100%; margin-top: 4px; }
.kfrist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kstart-karte { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.kstart-karte select { width: auto; max-width: 100%; }
.kkarte-tore { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.kfilter { margin: 6px 0 12px; }

/* Erkundungsmodus */
.erk-gruppen { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.erk-gruppen .tabbadge { margin-left: 6px; }
.erk-start { padding: 10px 12px; margin-bottom: 10px; border: 1px dashed var(--line); border-radius: 12px; }
.erk-antraege { display: flex; flex-direction: column; gap: 6px; }
.erk-antraege > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.erk-wesen { padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.erk-ansicht .kansicht-flaeche { max-height: min(74vh, 720px); }
.erk-fuss { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; justify-content: space-between; margin-top: 12px; }
.erk-kampfwahl { flex: 1; min-width: 260px; padding: 10px 12px; border: 1px solid #7a3f3f; border-radius: 12px; background: rgba(192, 57, 43, .08); }
.erk-markerliste { margin-top: 8px; }
.erk-markerliste ul { margin: 6px 0 0; padding-left: 4px; list-style: none; }
.erk-farbe { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; border: 1px solid #000; }
.erk-modus { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.erk-text { width: auto; min-width: 0; max-width: 220px; flex: 1 1 140px; }
.erk-meine { margin-top: 6px; }
.erk-voll { position: fixed; z-index: 60; inset: 0; margin: 0; padding: 10px 12px; background: var(--bg); overflow: auto; display: flex; flex-direction: column; }
.erk-voll .erk-ansicht { flex: 1; min-height: 0; }
.erk-voll .erk-ansicht .kansicht-flaeche { height: 100%; max-height: none; aspect-ratio: auto !important; }
.kansicht-knoepfe .btn.on { border-color: #3f7a43; color: #d4f1d0; }
.gruppen-marken { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }
.gm-gruppe { display: inline-flex; align-items: center; gap: 2px; }
.mapsvg.marke-setzen { cursor: crosshair; }
.mapsvg.marke-setzen * { pointer-events: none; }
.mapsvg.marke-setzen { pointer-events: all; }
