/* Karriere: ruhig, eine Spalte, große Tippflächen.
   Tokens: Abstände 4/8/12/16/24/32, Radien 10/14/20, Schrift 13/15/17/22/28, Tippflächen mind. 44 px. */
:root {
  color-scheme: light;
  --bg: #f4f3ef; --surface: #ffffff; --surface-2: #f8f7f3; --line: #e6e3dc; --line-2: #d6d2c8;
  --ink: #1a1e24; --ink-2: #454d57; --ink-3: #737b86;
  --accent: #1f4f82; --accent-ink: #ffffff; --accent-soft: #e8eef7; --accent-2: #4a78aa;
  --amber: #9a5a06; --amber-soft: #fbf0dc; --red: #a33d27; --red-soft: #f8e5df;
  --sand: #8a6f3c; --sand-soft: #f3ecdd; --gray-soft: #eeede9;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r1: 10px; --r2: 14px; --r3: 20px;
  --f1: 13px; --f2: 15px; --f3: 17px; --f4: 22px; --f5: 28px;
  --tap: 44px;
  --shadow: 0 1px 2px rgba(20, 24, 30, .04), 0 6px 20px rgba(20, 24, 30, .05);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 var(--f2)/1.5 Inter, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: var(--f5); line-height: 1.2; }
h2 { font-size: var(--f3); margin-bottom: var(--s3); display: flex; align-items: center; gap: var(--s2); }
h3 { font-size: var(--f2); margin: var(--s4) 0 var(--s2); }
h4 { font-size: var(--f1); color: var(--ink-3); margin: 0 0 var(--s2); }
p { margin: 0 0 var(--s3); }
small { font-size: var(--f1); color: var(--ink-3); }
code { font-size: var(--f1); background: var(--gray-soft); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--ink-3); }
.mt { margin-top: var(--s5); }
.nowrap { white-space: nowrap; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* App-Leiste: oben am Rechner, unten am Handy */
.appbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.appbar-in { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: var(--s4); padding: var(--s2) var(--s4); height: 60px; }
.brand { display: flex; align-items: center; gap: var(--s2); color: var(--ink); font-size: var(--f3); }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: var(--f2); }
.tabs { display: flex; gap: var(--s1); margin-left: auto; }
.tabs a { position: relative; display: flex; align-items: center; gap: var(--s2); height: 40px; padding: 0 var(--s3); border-radius: 999px; color: var(--ink-2); font-weight: 550; }
.tabs a.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.badge { font-style: normal; font-size: 12px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; }
.badge.soft { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: var(--red); color: #fff; }
.live { display: flex; align-items: center; gap: 6px; font-size: var(--f1); color: var(--ink-3); white-space: nowrap; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.main { max-width: 760px; margin: 0 auto; padding: var(--s5) var(--s4) 120px; }
.page-head { margin: var(--s2) 0 var(--s5); }
.page-head p { color: var(--ink-3); margin: var(--s1) 0 0; }
.back { display: inline-flex; align-items: center; gap: var(--s2); height: var(--tap); font-weight: 550; margin-bottom: var(--s1); }

/* Karten im Feed */
.feed { display: flex; flex-direction: column; gap: var(--s3); }
.jc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--shadow); overflow: hidden; transition: opacity .25s, transform .25s; }
.jc.gone { opacity: 0; transform: translateX(40px); }
.jc.unseen { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.jc-main { display: block; padding: var(--s4) var(--s4) var(--s3); color: var(--ink); }
.jc-head { display: flex; gap: var(--s3); align-items: flex-start; }
.jc-title { flex: 1; min-width: 0; }
.jc-title h3 { margin: 0; font-size: var(--f3); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jc-title p { margin: 2px 0 0; color: var(--ink-3); font-size: var(--f1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: var(--s3); padding: 10px 14px; border-radius: var(--r2); background: var(--gray-soft); }
.pay b { font-size: var(--f3); font-weight: 700; }
.pay span { font-size: var(--f1); color: var(--ink-3); }
.pay.up { background: var(--accent-soft); } .pay.up b { color: var(--accent); }
.pay.down { background: var(--red-soft); } .pay.down b { color: var(--red); }
.pay.mixed b { color: var(--ink-2); font-size: var(--f2); }
.pay.none b { color: var(--ink-3); font-size: var(--f2); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--f1); color: var(--ink-2); white-space: nowrap; }
.chip .ic { width: 15px; height: 15px; color: var(--ink-3); }
.chip.up { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 650; }
.chip.down { background: var(--red-soft); border-color: transparent; color: var(--red); font-weight: 650; }
.chip.warn { background: var(--amber-soft); border-color: transparent; color: var(--amber); font-weight: 650; }
.why { margin: var(--s3) 0 0; color: var(--ink-2); font-size: var(--f1); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jc-act { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.act, .state { display: flex; align-items: center; justify-content: center; gap: var(--s2); height: 48px; border: 0; background: none; font: 550 var(--f1) Inter, sans-serif; color: var(--ink-2); cursor: pointer; }
.act + .act, .state + .act { border-left: 1px solid var(--line); }
.act.save.on { color: var(--accent); }
.act.out:hover { color: var(--red); }
.state { color: var(--accent); }

/* Score-Ring */
.ring { --p: 0; --c: var(--ink-3); flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--gray-soft) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font-size: var(--f2); font-weight: 700; color: var(--c); }
.ring.big { width: 76px; height: 76px; }
.ring.big::before { inset: 7px; }
.ring.big b { font-size: var(--f4); }
.l-sehr-hoch { --c: var(--accent); } .l-hoch { --c: var(--accent-2); } .l-mittel { --c: var(--sand); }
.l-niedrig, .l-offen { --c: var(--ink-3); } .l-formal { --c: var(--red); }
.l-pre { --c: color-mix(in srgb, var(--accent-2) 70%, var(--ink-3)); }
.ring.l-pre b { font-weight: 600; }
.ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
.ring-cap { font-size: 11px; color: var(--ink-3); }

/* Segment-Filter, Suche, leere Zustände */
.seg { display: flex; gap: var(--s1); background: var(--gray-soft); padding: 4px; border-radius: 999px; margin-bottom: var(--s4); }
.seg a { flex: 1; display: flex; justify-content: center; align-items: center; gap: 6px; height: 40px; border-radius: 999px; color: var(--ink-2); font-weight: 550; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg i { font-style: normal; font-size: 12px; color: var(--ink-3); }
.search { position: relative; margin-bottom: var(--s4); }
.search .ic { position: absolute; left: 14px; top: 14px; color: var(--ink-3); }
.search input { width: 100%; height: 48px; padding-left: 44px; border-radius: 999px; font-size: var(--f2); }
.empty { padding: var(--s6) var(--s5); text-align: center; color: var(--ink-3); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r3); }
.more-link { display: flex; align-items: center; justify-content: center; gap: var(--s1); margin-top: var(--s4); min-height: var(--tap); color: var(--ink-3); font-weight: 550; text-align: center; }

/* Detailseite */
.d-head { display: flex; gap: var(--s4); align-items: flex-start; margin-bottom: var(--s4); }
.d-title { flex: 1; min-width: 0; }
.d-title h1 { font-size: 24px; line-height: 1.3; }
.d-title p { color: var(--ink-3); margin: var(--s1) 0 var(--s3); }
.d-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: var(--f1); font-weight: 600; background: var(--gray-soft); color: var(--ink-2); }
.tag .ic { width: 15px; height: 15px; }
.tag.l-sehr-hoch, .tag.l-hoch { background: var(--accent-soft); color: var(--accent); }
.tag.l-mittel { background: var(--sand-soft); color: var(--sand); }
.tag.l-formal, .tag.bad { background: var(--red-soft); color: var(--red); }
.tag.ok { background: var(--accent-soft); color: var(--accent); }
.tag.mid { background: var(--amber-soft); color: var(--amber); }
.facts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; margin-bottom: var(--s3); }
.facts2 div { background: var(--surface); padding: var(--s3) var(--s4); display: flex; flex-direction: column; min-width: 0; }
.facts2 b { font-size: var(--f2); font-weight: 650; }
.facts2 em { font-style: normal; font-size: var(--f1); color: var(--ink-3); }
.facts2 em.up { color: var(--accent); font-weight: 650; }
.facts2 em.down { color: var(--red); font-weight: 650; }
.warn-t { color: var(--amber); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); padding: var(--s4) var(--s5); margin-bottom: var(--s3); }
.panel .lead { font-size: var(--f2); line-height: 1.6; margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.h-plus { color: var(--accent); } .h-minus { color: var(--amber); }
ul.plus, ul.minus, ul.dots { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s2); }
ul.plus li, ul.minus li, ul.dots li { position: relative; padding-left: 18px; font-size: var(--f1); line-height: 1.5; color: var(--ink-2); }
ul.plus li::before, ul.minus li::before, ul.dots li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 7px; height: 7px; border-radius: 50%; }
ul.plus li::before { background: var(--accent); } ul.minus li::before { background: var(--amber); } ul.dots li::before { background: var(--line-2); }
.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); margin-bottom: var(--s2); }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 var(--s5); font-weight: 600; margin: 0; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; margin-top: -4px; }
.fold[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.fold > :not(summary) { margin-left: var(--s5); margin-right: var(--s5); }
.fold > :last-child { margin-bottom: var(--s5); }
.reqs { display: flex; flex-direction: column; }
.req { display: flex; gap: var(--s3); padding: var(--s2) 0; }
.req b { display: block; font-weight: 550; font-size: var(--f1); }
.req p { margin: 2px 0 0; font-size: var(--f1); }
.mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.mark .ic { width: 15px; height: 15px; stroke-width: 2.25; }
.m-ja { background: var(--accent-soft); color: var(--accent); }
.m-nein { background: var(--red-soft); color: var(--red); }
.m-unklar { background: var(--amber-soft); color: var(--amber); }
.orig { white-space: pre-wrap; font-size: var(--f1); line-height: 1.65; color: var(--ink-2); max-height: 60vh; overflow-y: auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s4); margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 550; }
.kv dd small { display: block; font-weight: 400; }
.app-draft { margin-top: var(--s4); }
.daily-goal { margin-bottom: var(--s4); border: 1px solid var(--line); }
.app-draft > h3 { margin-top: var(--s5); font-size: var(--f3); }
.app-draft > h3:first-child { margin-top: var(--s4); }
.app-draft .email-body { min-height: 130px; }
.app-draft .letter { height: 240px; resize: vertical; }
.app-draft .note.bad { margin-top: var(--s4); }
.subfold { margin-top: var(--s4); border: 1px solid var(--line); border-radius: var(--r1); padding: var(--s3); }
.subfold summary { cursor: pointer; font-weight: 600; }
.subfold h4 { margin-top: var(--s4); }
.btn.disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 600px) { .app-draft .letter { height: 210px; } }
.save-state { align-self: center; color: var(--ink-3); }
.reason-dialog { border: 0; border-radius: 18px; max-width: min(90vw, 420px); width: 100%; padding: 24px; background: #fff; color: inherit; box-shadow: 0 16px 50px #0004; }
.reason-dialog::backdrop { background: #101d1aaa; }
.reason-dialog select { display: block; width: 100%; padding: 12px; margin: 10px 0 20px; border: 1px solid #ccc; border-radius: 10px; font: inherit; }
.app-draft textarea { margin-top: var(--s2); }
.spacer { height: 24px; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100vw, 760px); min-width: 0; overflow: hidden; margin: 0 auto;
  background: var(--surface); border-top: 1px solid var(--line); padding: 6px var(--s2) calc(6px + var(--safe-b)); box-shadow: 0 -6px 20px rgba(0, 0, 0, .05); }
.dock-b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; height: 56px; border: 0; background: none; color: var(--ink-2); font: 550 11px Inter, sans-serif; border-radius: var(--r1); cursor: pointer; text-align: center; overflow-wrap: anywhere; }
.dock-b .ic { width: 22px; height: 22px; }
.dock-b span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-b.on { color: var(--accent); }
.dock-b.on.neg { color: var(--red); }

/* Mehr-Seite */
.scan-box { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.scan-box b { display: block; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); margin-bottom: var(--s3); overflow: hidden; }
.list a { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: 0 var(--s4); color: var(--ink); font-weight: 550; }
.list a + a { border-top: 1px solid var(--line); }
.list a span { flex: 1; }
.list a small { margin-right: var(--s1); }
.list .ic { color: var(--ink-3); }
.list .go { width: 18px; height: 18px; }
.foot-note { display: flex; gap: var(--s2); align-items: center; justify-content: center; color: var(--ink-3); font-size: var(--f1); margin-top: var(--s5); text-align: center; }
.foot-note .ic { width: 16px; height: 16px; }

/* Knöpfe, Formulare, Hinweise */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: var(--tap); padding: 0 var(--s4); border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 550 var(--f2) Inter, sans-serif; cursor: pointer; white-space: nowrap; }
.btn:disabled { opacity: .6; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; }
.row-btns { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s3); }
.row-btns.sticky { position: sticky; bottom: 0; background: var(--bg); padding: var(--s3) 0; }
input, select, textarea { font: 400 var(--f2) Inter, sans-serif; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r1); }
input, select { height: var(--tap); padding: 0 var(--s3); }
textarea { width: 100%; padding: var(--s3); line-height: 1.55; resize: vertical; }
textarea.code { font: 400 var(--f1)/1.5 ui-monospace, "SF Mono", Menlo, monospace; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.note { display: flex; gap: var(--s2); align-items: flex-start; color: var(--ink-2); background: var(--surface-2); padding: var(--s3); border-radius: var(--r1); font-size: var(--f1); }
.note[hidden] { display: none; }
.note.bad { background: var(--red-soft); color: var(--red); }
.ok-t { color: var(--accent); font-weight: 550; } .bad-t { color: var(--red); font-weight: 550; }
.up { color: var(--accent) !important; font-weight: 650; } .down { color: var(--red) !important; font-weight: 650; }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 50; display: flex; align-items: center; gap: var(--s3);
  background: var(--ink); color: var(--bg); padding: 0 var(--s4); min-height: 48px; border-radius: 999px; font-weight: 550; opacity: 0; pointer-events: none; transition: all .2s; max-width: 92vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.has-undo { padding-right: var(--s2); }
.toast button { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 var(--s3); border: 0; border-radius: 999px; background: rgba(255, 255, 255, .16); color: var(--bg); font: 600 var(--f1) Inter, sans-serif; cursor: pointer; }
.toast button .ic { width: 16px; height: 16px; }

/* Unterseiten (Statistik, Quellen, Profil, Einstellungen) */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); }
.card.pad { padding: var(--s5); margin-bottom: var(--s3); }
.card.hl { border-color: var(--accent); }
.grid2, .detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.bars { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s3); }
.bar-row { display: grid; grid-template-columns: 1fr 90px 36px; align-items: center; gap: var(--s2); font-size: var(--f1); }
.bar { height: 8px; background: var(--gray-soft); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar-row b { text-align: right; }
.tbl { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: var(--f1); margin-bottom: var(--s3); }
.tbl th { text-align: left; color: var(--ink-3); font-weight: 600; padding: var(--s2); border-bottom: 1px solid var(--line); }
.tbl td { padding: var(--s2); border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.col i { display: block; width: 100%; max-width: 24px; background: var(--accent); border-radius: 6px 6px 0 0; min-height: 3px; }
.col small { font-size: 11px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--line-2); flex: none; margin-right: 6px; }
.d-ok { background: var(--accent-2); } .d-teilweise { background: var(--amber); } .d-fehler { background: var(--red); } .d-laeuft { background: var(--sand); }
.src-head { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.src-head h2 { margin-bottom: var(--s1); }
.src-nums { display: flex; gap: var(--s5); }
.src-nums div { display: flex; flex-direction: column; }
.src-nums b { font-size: var(--f4); }
.kv.inline { grid-template-columns: 1fr; gap: 2px; }
.kv.inline dd { margin-bottom: var(--s2); }
details summary { cursor: pointer; font-weight: 550; margin: var(--s3) 0; }
.errs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.errs li { background: var(--surface-2); padding: var(--s3); border-radius: var(--r1); font-size: var(--f1); }
.errs small { display: block; }
.field { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.field span { color: var(--ink-2); }
.field input, .field select { width: 170px; }
.field.chk { justify-content: flex-start; }
.field.chk input { width: 22px; height: 22px; flex: none; }
.field.chk small { display: block; }
.cv-entry { margin: var(--s3) 0; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface-2); }
.cv-entry .field:last-of-type { margin-bottom: var(--s2); }
.cv-entry [data-remove-entry] { color: var(--red); }
.profile-photo { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); }
.profile-photo-preview { display: block; width: 96px; height: 120px; object-fit: cover; border-radius: var(--r1); margin: var(--s3) 0; }
.profile-photo input[type=file] { max-width: 100%; height: auto; padding: var(--s2); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Login */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: var(--s4); }
.login { width: 100%; max-width: 380px; padding: var(--s6); display: flex; flex-direction: column; gap: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--shadow); }
.login h1 { font-size: var(--f4); }
.login label { display: flex; flex-direction: column; gap: var(--s1); font-size: var(--f1); color: var(--ink-3); font-weight: 550; }
.login input { height: 48px; font-size: var(--f3); }
.login .btn { height: 52px; font-size: var(--f3); margin-top: var(--s2); }

/* Handy: Leiste nach unten */
@media (max-width: 700px) {
  /* backdrop-filter würde die feste Leiste an der Kopfzeile verankern */
  .appbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .appbar-in { height: 52px; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 25; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
    background: var(--surface); border-top: 1px solid var(--line); padding: 4px var(--s2) calc(4px + var(--safe-b)); }
  .tabs a { flex-direction: column; justify-content: center; gap: 2px; height: 56px; padding: 0; border-radius: var(--r1); font-size: 10.5px; }
  .tabs a { min-width: 0; }
  .tabs a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabs a.on { background: none; box-shadow: none; }
  .tabs a .ic { width: 23px; height: 23px; }
  .tabs .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }
  .live { margin-left: auto; }
  .main { padding: var(--s4) var(--s4) calc(96px + var(--safe-b)); }
  h1 { font-size: 26px; }
  .d-title h1 { font-size: 21px; }
  .two-col { grid-template-columns: 1fr; gap: var(--s4); }
  .panel { padding: var(--s4); }
  .fold > summary { padding: 0 var(--s4); }
  .fold > :not(summary) { margin-left: var(--s4); margin-right: var(--s4); }
  .fold > .btn.wide { width: calc(100% - 2 * var(--s4)); }
  body:has(.dock) .tabs { display: none; }
  .field { flex-direction: column; align-items: stretch; }
  .field input, .field select { width: 100%; }
  .btn { max-width: 100%; min-width: 0; min-height: var(--tap); height: auto; padding: 9px var(--s3); white-space: normal; text-align: center; line-height: 1.3; }
  .row-btns > .btn { flex: 1 1 calc(50% - var(--s2)); }
  .scan-box { flex-wrap: wrap; }
  .scan-box > div { min-width: 0; flex: 1 1 160px; }
  .fold > summary { min-width: 0; overflow-wrap: anywhere; gap: var(--s2); }
  .fold > summary::after { flex: none; }
  .facts2 b, .facts2 em, .note, .list a span { overflow-wrap: anywhere; }
  .app-file-form input[type=file] { max-width: 100%; }
  .live { display: none; }
}
@media (max-width: 360px) {
  .tabs a { font-size: 9.5px; }
  .main { padding-left: var(--s3); padding-right: var(--s3); }
  .fold > :not(summary) { margin-left: var(--s3); margin-right: var(--s3); }
  .fold > .btn.wide { width: calc(100% - 2 * var(--s3)); }
  .row-btns > .btn { flex-basis: 100%; }
}
