/* ==========================================================================
   Klön-Café – leichtes, modernes Design (ab V1.4.0)
   Lexend SemiBold für Überschriften (lokal, siehe fonts/schrift.css),
   Systemschrift für Text. Von der Sketchnote-Herkunft bleiben: Kasten-Logo,
   gelber Textmarker für das Wichtigste, Pastellfarben als zarte Flächen.
   ========================================================================== */

:root {
  --ground: #F8F7F3;
  --surface: #FFFFFF;
  --line: #E6E3DA;
  --line-soft: #EFECE4;
  --line-strong: #DAD6CB;
  --ink: #23253A;
  --muted: #5F6275;
  --yellow: #FFE27A;
  --t-yellow: #FFF7D6;
  --t-yellow-2: #FFFBEA;
  --b-yellow: #F1E2A6;
  --t-blue: #EAF1FA;
  --t-green: #E8F5EE;
  --t-green-2: #F3FAF6;
  --t-peach: #FCEEE4;
  --t-peach-2: #FDF5EF;
  --pink: #F4A3A8;
  --dot-green: #7CC4A0;
  --dot-peach: #EFA375;
  --ok: #2F7A55;
  --danger: #B3261E;
  --t-danger: #FBE9E7;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Lexend', var(--sans);
  --r-s: 10px; --r-m: 14px; --r-l: 18px; --r-xl: 20px;
  --shadow-s: 0 1px 2px rgba(35,37,58,.04);
  --shadow-m: 0 1px 2px rgba(35,37,58,.04), 0 12px 32px rgba(35,37,58,.06);
  --top: 112px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 16px); }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 .6em; }
a { color: var(--ink); text-underline-offset: 3px; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .88em; background: var(--line-soft); padding: 1px 6px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid #4A6FA5; outline-offset: 2px; }
.display { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.mark { background: linear-gradient(transparent 55%, var(--yellow) 55%, var(--yellow) 92%, transparent 92%); padding: 0 2px; }

/* ---------- Buttons ---------- */
.btn {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface);
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--ground); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #34374F; }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-quiet:hover { background: var(--line-soft); }
.btn-danger { color: var(--danger); border-color: #F0C9C5; background: var(--surface); }
.btn-danger:hover { background: var(--t-danger); }
.btn-done { background: var(--t-green); border-color: #CFE9DB; }
.btn-parking { background: var(--t-peach); border-color: #F4D9C6; }
.btn-small { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn-big { height: 50px; padding: 0 20px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn svg { flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-col { display: flex; flex-direction: column; gap: 8px; }

/* Pill-Knöpfe auf Karten */
.pill {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px;
  border-radius: 999px; border: 1px solid #EDEAE2; background: var(--surface);
}
.pill:hover { border-color: var(--line-strong); }
.pill:disabled { cursor: default; opacity: .7; }
.pill svg { width: 15px; height: 15px; }
.pill.on { background: var(--t-yellow); border-color: var(--b-yellow); }
.pill.like.on svg path { fill: var(--pink); }
.icon-btn {
  font: inherit; cursor: pointer; width: 36px; height: 36px; border-radius: 999px; border: 0; background: transparent;
  display: inline-grid; place-items: center; color: var(--muted);
}
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
input[type=text], input[type=password], input[type=url], input[type=number], select, textarea {
  font: inherit; font-size: 15px; font-weight: 400; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 14px; width: 100%; min-height: 44px;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { border-color: #8A93B8; outline: 3px solid rgba(74,111,165,.18); outline-offset: 0; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; margin: 0; }
.msg { border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 0 0 16px; }
.msg-ok { background: var(--t-green); }
.msg-error { background: var(--t-danger); color: #7A1B15; }
.msg-info { background: var(--t-yellow); }
.badge { display: inline-flex; align-items: center; font-family: var(--sans); font-size: 12.5px; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--line-soft); line-height: 1.6; }
.b-blue { background: var(--t-blue); } .b-green { background: var(--t-green); } .b-peach { background: var(--t-peach); } .b-yellow { background: var(--t-yellow); }
.dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; flex: none; }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; }
.panel-title { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-title { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.empty { color: var(--muted); font-size: 14px; margin: 4px 0; }

/* ==========================================================================
   Einfache Seiten
   ========================================================================== */
.sitebar { background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); }
.sitebar-in { max-width: 1100px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-word { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; }
.sitenav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.sitenav > a { text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 10px; color: var(--muted); }
.sitenav > a:hover { background: var(--line-soft); color: var(--ink); }
.sitenav > a[aria-current="page"] { color: var(--ink); background: var(--line-soft); font-weight: 600; }
.sitenav .logout { margin: 0; }
.who { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; font-size: 14px; font-weight: 500; }
.avatar { width: 30px; height: 30px; border-radius: 999px; background: var(--t-green); display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: none; color: var(--ink); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 32px 24px 24px; }
.wrap-narrow { max-width: 520px; margin: 0 auto; }
.page-title { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 4vw, 34px); letter-spacing: -.02em; line-height: 1.2; margin: 0 0 6px; }
.lead { color: var(--muted); font-size: 16px; margin: 0 0 24px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.hero { text-align: center; padding: 24px 0 8px; }
.hero .logo { margin-bottom: 10px; }
.hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 6vw, 48px); letter-spacing: -.03em; line-height: 1.1; }
.hero p { color: var(--muted); font-size: 17px; margin: 8px 0 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

/* Board-Liste */
.board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.board-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.board-row:hover { border-color: var(--line-strong); }
.board-link { display: flex; flex-direction: column; text-decoration: none; flex: 1 1 280px; min-width: 0; }
.board-link strong { font-size: 16px; font-weight: 600; }
.board-link small { color: var(--muted); font-size: 13px; }
.board-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.board-actions form { margin: 0; }
details.more > summary { list-style: none; cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] .more-body { display: flex; }
.more-body { display: none; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 10px; width: 100%; }

/* Tabellen (Benutzerverwaltung) */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
table.list th { text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FCFBF8; }
table.list td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list .person { display: flex; align-items: center; gap: 10px; }
table.list .person small { display: block; color: var(--muted); font-size: 12.5px; }
.row-inactive td { color: var(--muted); }
.row-inactive .avatar { background: var(--line-soft); }
.actions-cell { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.actions-cell form { margin: 0; }
.secret { font-family: ui-monospace, Menlo, monospace; font-size: 20px; letter-spacing: .04em; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px 14px; display: inline-block; user-select: all; }

/* Textseite (Datenschutz) */
.text-seite { max-width: 780px; }
.text-seite h2 { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -.01em; margin: 36px 0 8px; }
.text-seite h3 { font-size: 16px; font-weight: 700; margin: 22px 0 6px; }
.text-seite p, .text-seite li { font-size: 15.5px; line-height: 1.65; }
.text-seite ul { padding-left: 1.3em; }
.text-seite li { margin-bottom: 6px; }
.text-seite address { font-style: normal; font-size: 15px; line-height: 1.6; margin: 0 0 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.kurz { background: var(--t-yellow-2); border: 1px solid var(--b-yellow); border-radius: var(--r-l); padding: 20px 24px; margin: 24px 0; }
.kurz h2 { margin: 0 0 6px; }

/* Footer */
.fuss { border-top: 1px solid var(--line); margin-top: 48px; }
.fuss-in { max-width: 1360px; margin: 0 auto; padding: 24px 24px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; font-size: 13px; color: var(--muted); }
.fuss-in img { width: 200px; height: auto; display: block; }
.fuss-in p { margin: 0; }
.fuss-in a { color: var(--muted); }
.page-simple .fuss-in { max-width: 1100px; }

/* ==========================================================================
   Board
   ========================================================================== */
.page-board { padding-top: var(--top); }
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); transition: background-color .5s; }
.tb-grid { max-width: 1360px; margin: 0 auto; padding: 12px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; align-items: stretch; }
.tb-left { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.tb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.tb-sep { width: 1px; height: 24px; background: var(--line); }
.tb-title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; }
.tb-board { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-sub { font-size: 12.5px; color: var(--muted); }
/* Timer: großer Block über beide Zeilen der Kopfzeile */
.timer { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 210px; padding: 8px 22px; border-radius: 18px; background: var(--line-soft); border: 1px solid transparent; transition: background-color .4s, border-color .4s; }
.timer-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.timer-label svg { flex: none; }
.timer-clock { font-family: var(--display); font-weight: 600; font-size: 46px; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.01em; }
.topbar.timer-on .timer { background: var(--t-yellow); border-color: var(--b-yellow); }
.topbar.timer-low .timer { background: var(--yellow); border-color: #E9C94F; }
.topbar.timer-low .timer-label, .topbar.timer-done .timer-label { color: var(--ink); }
.topbar.timer-paused .timer-clock { opacity: .5; }
.topbar.timer-done { background-color: rgba(255,247,214,.97); }
.topbar.timer-done .timer { background: var(--t-peach); border-color: #F4D9C6; }
.timer-ctl { display: flex; gap: 6px; margin-top: 6px; }
.timer-ctl:empty { display: none; }
.timer .round-btn { width: 32px; height: 32px; }
.timer .chip-btn { height: 32px; padding: 0 10px; font-size: 13px; }
.round-btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; font: inherit; color: var(--ink); }
.round-btn:hover { background: var(--ground); }
.chip-btn { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--ink); }
.chip-btn:hover { background: var(--ground); }
.btn-invite { height: 40px; border-radius: 999px; padding: 0 16px; }
.me-btn { height: 40px; padding: 0 14px 0 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; max-width: 220px; color: var(--ink); }
.me-btn span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-msg { max-width: 1360px; margin: 0 auto; padding: 0 24px 10px; font-size: 14px; font-weight: 600; text-align: right; }
.timer-msg span { background: var(--yellow); padding: 3px 10px; border-radius: 8px; }
.statusbar { display: flex; flex-wrap: wrap; gap: 8px; }
.st { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; text-decoration: none; font-size: 13.5px; white-space: nowrap; color: var(--ink); }
.st b { font-weight: 600; }
.st-now { flex: 1 1 320px; min-width: 0; background: var(--line-soft); }
.st-now.has { background: var(--t-yellow); }
.st-now span { overflow: hidden; text-overflow: ellipsis; }
.st-collect { background: var(--t-blue); } .st-done { background: var(--t-green); } .st-parking { background: var(--t-peach); }

.closed-banner { max-width: 1312px; margin: 20px auto 0; padding: 12px 18px; border-radius: var(--r-m); background: var(--line-soft); font-size: 14px; }

.layout { max-width: 1360px; margin: 0 auto; padding: 28px 24px 0; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.col-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* Wird besprochen */
.now { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-m); display: flex; flex-wrap: wrap; overflow: hidden; }
.now-main { flex: 999 1 460px; min-width: 0; padding: 28px 32px; display: flex; flex-direction: column; gap: 14px; }
.now-title { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1.25; letter-spacing: -.02em; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.now-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13.5px; color: var(--muted); }
.now-side { flex: 1 1 260px; padding: 28px; background: var(--t-yellow-2); border-left: 1px solid #F1E9CB; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.signal-num { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.signal-num b { font-family: var(--display); font-weight: 600; font-size: 48px; line-height: 1; }
.signal-num span { font-size: 15px; color: var(--muted); }
.signal-bar { margin-top: 10px; height: 8px; border-radius: 999px; background: #F1E9CB; overflow: hidden; }
.signal-bar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; transition: width .3s; }
.btn-signal { height: 50px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; color: var(--ink); }
.btn-signal:hover { border-color: var(--ink); }
.btn-signal.on { background: var(--t-green); border-color: #BFE2CF; }
.anon { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 0; }
.anon svg { flex: none; margin-top: 2px; }
.now-empty { display: flex; align-items: center; gap: 22px; padding: 28px 32px; }
.now-empty svg { flex: none; width: 120px; height: auto; }
.now-empty p { font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.4; letter-spacing: -.01em; margin: 0; max-width: 46ch; }

/* Kommentare */
.comments { border-top: 1px solid var(--line-soft); padding-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.comments-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.comments-head h3 { font-size: 14px; font-weight: 600; }
.comments-head h3 span { font-weight: 400; color: var(--muted); }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment .avatar { width: 30px; height: 30px; font-size: 12px; }
.bubble { background: var(--ground); border-radius: 4px 14px 14px 14px; padding: 8px 12px; min-width: 0; flex: 0 1 auto; }
.comment.is-mine .bubble { background: var(--t-yellow-2); }
.bubble p { margin: 0; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble small { font-size: 12px; color: var(--muted); }
.comment-form { display: flex; gap: 10px; align-items: flex-end; }
.comment-form textarea { flex: 1 1 auto; min-width: 0; resize: none; font-size: 14.5px; border-radius: 14px; min-height: 48px; }
.comment-form .btn { height: 46px; }
.card .comments { padding-top: 12px; gap: 10px; }
.card .comment-form { flex-direction: column; align-items: stretch; }
.card .comment-form .btn { height: 38px; align-self: flex-end; }

/* Diktieren (nur beim aktuellen Thema) */
.diktat-wrap { margin-top: -2px; }
.diktat { display: flex; flex-direction: column; gap: 6px; }
.diktat-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.diktat-knopf.nimmt-auf { background: #B3261E; border-color: #B3261E; color: #fff; animation: rec 1.4s ease-in-out infinite; }
@keyframes rec { 0%, 100% { box-shadow: 0 0 0 0 rgba(179,38,30,.35); } 50% { box-shadow: 0 0 0 6px rgba(179,38,30,0); } }
.diktat-uhr { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.diktat-pegel { width: 90px; height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; display: inline-block; }
.diktat-pegel-balken { display: block; width: 100%; height: 100%; background: var(--ok); transform-origin: left center; transform: scaleX(0); }
.diktat-hinweis { font-size: 12.5px; color: var(--muted); margin: 0; }
.diktat-status { font-size: 13.5px; margin: 0; min-height: 0; }
.diktat-status:empty { display: none; }
.diktat progress { width: 100%; height: 6px; accent-color: var(--ink); }
.diktat-details { font-size: 12.5px; color: var(--muted); }
.diktat-details summary { cursor: pointer; }
.diktat-log { white-space: pre-wrap; font-size: 11.5px; max-height: 180px; overflow: auto; background: var(--ground); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.dlg-list { padding-left: 1.2em; margin: 8px 0 14px; font-size: 14px; }
.dlg-list li { margin-bottom: 4px; }

/* Sammlung */
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; box-shadow: var(--shadow-s); }
.composer textarea { border: 0; padding: 4px 6px; min-height: 52px; font-size: 16px; resize: none; background: transparent; }
.composer textarea:focus { outline: none; }
.composer:focus-within { border-color: #8A93B8; box-shadow: 0 0 0 3px rgba(74,111,165,.15); }
.composer-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.charcount { font-size: 12.5px; color: var(--muted); padding-left: 6px; }
.phase-note { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: #EEECE5; }
.segmented button { font: inherit; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(35,37,58,.1); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-s); transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(35,37,58,.06); }
.card.is-mine { border-color: var(--b-yellow); }
.card.is-new { animation: pop .45s ease-out; }
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.card-text { margin: 0; font-size: 15.5px; line-height: 1.45; font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.card-meta { font-size: 12.5px; color: var(--muted); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.card-actions .push { margin-left: auto; display: flex; gap: 4px; align-items: center; }

/* Seitenspalte */
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.side-list .card { box-shadow: none; border-color: transparent; padding: 12px 12px 8px; gap: 6px; }
.area-done .card { background: var(--t-green-2); }
.area-parking .card { background: var(--t-peach-2); }
.side-list .card-text { font-size: 14px; font-weight: 500; }
.side-num { font-weight: 700; color: var(--ok); margin-right: 6px; }
.area-done .card-text { color: #3B3E52; }
/* Erledigt und Themenspeicher als Aufklappmenü (ab 1.7.0) */
details.fold { padding: 0; }
.fold-head { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-radius: var(--r-l);
  font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -.01em; user-select: none; }
.fold-head::-webkit-details-marker { display: none; }
.fold-head:hover { background: var(--ground); }
.fold-head .badge { margin-left: 2px; }
.fold-chev { margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; flex: none; }
details.fold[open] > .fold-head .fold-chev { transform: rotate(-135deg) translate(-2px, -2px); }
details.fold[open] > .fold-head { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
details.fold > .side-list { padding: 4px 14px 14px; max-height: 60vh; overflow-y: auto; }

/* Thema nachreichen (ab 1.7.0) */
.late-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 14px; }
.late-row .phase-note { margin: 0; flex: 1 1 280px; }
.composer.is-late { border-color: var(--b-yellow); background: var(--t-yellow-2); }
.tag-late { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; background: var(--t-yellow); border: 1px solid var(--b-yellow); font-size: 11.5px; font-weight: 600; color: var(--ink); line-height: 1.6; }

/* Kommentar-Likes und Sortierung (ab 1.7.0) */
.comment .pill-mini { align-self: center; flex: none; }
.pill-mini { height: 30px; padding: 0 9px; font-size: 12.5px; gap: 5px; }
.pill-mini svg { width: 13px; height: 13px; }
.comments-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg-mini { padding: 2px; border-radius: 10px; }
.seg-mini button { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }

.mod-panel { border: 1px dashed #D9D4C6; border-radius: var(--r-l); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.mod-panel .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mod-panel .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.min-input { width: 72px !important; min-height: 36px !important; height: 36px; padding: 4px 8px !important; text-align: center; font-size: 14px !important; border-radius: 10px !important; }
.export-note { margin: 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.export-note b { color: var(--ink); font-weight: 600; }

/* ---------- Dialoge ---------- */
.dlg { width: min(480px, calc(100vw - 24px)); padding: 24px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(35,37,58,.22); }
.dlg-wide { width: min(880px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(35,37,58,.35); backdrop-filter: blur(2px); }
.dlg h2 { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; line-height: 1.3; }
.dlg-card-text { margin: 0; font-size: 15px; background: var(--ground); border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 30vh; overflow: auto; }
.dlg hr { border: 0; border-top: 1px solid var(--line-soft); width: 100%; margin: 4px 0; }
.dlg .btn-row .btn-big { flex: 1 1 140px; }
.invite-grid { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: center; }
.qr-box { margin: 0; flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qr-box canvas { width: 240px; height: 240px; border: 1px solid var(--line); border-radius: 14px; image-rendering: pixelated; background: #fff; }
.invite-info { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.invite-code { font-family: var(--display); font-weight: 600; font-size: clamp(40px, 7vw, 60px); letter-spacing: .04em; line-height: 1.05; margin: 0; font-variant-numeric: tabular-nums; }
.invite-url { font-family: var(--display); font-weight: 600; font-size: 20px; white-space: nowrap; overflow-x: auto; background: var(--ground); border-radius: 12px; padding: 10px 14px; user-select: all; margin: 0 0 6px; width: 100%; }
@media (max-width: 760px) { .invite-url { white-space: normal; overflow-wrap: anywhere; font-size: 17px; } }
.invite-access { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.invite-access b { color: var(--ink); }
.join-panel { max-width: 560px; margin: 28px auto 0; text-align: center; }
.join-panel .panel-title { justify-content: center; }
.join-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.code-input { font-family: var(--display) !important; font-weight: 600; font-size: 30px !important; letter-spacing: .12em; text-align: center; width: 230px !important; height: 60px; border-radius: 14px !important; font-variant-numeric: tabular-nums; }
.join-form .btn-big { height: 60px; }
.login-wrap { max-width: 560px; margin: 20px auto 0; }

/* ---------- Hinweise ---------- */
.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 18px; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(35,37,58,.25); max-width: calc(100vw - 30px); text-align: center; }
.toast.bad { background: var(--danger); }
.conn { position: fixed; right: 14px; bottom: 14px; z-index: 79; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 6px 12px; font-size: 13px; }

/* ---------- Handy ---------- */
@media (max-width: 760px) {
  /* Handy: Titelzeile – Timer über die volle Breite – Statusleiste */
  .tb-grid { padding: 10px 14px; gap: 8px; grid-template-columns: minmax(0, 1fr); }
  .tb-left { display: contents; }
  .tb-row { order: 1; gap: 10px; flex-wrap: nowrap; }
  .timer { order: 2; flex-direction: row; justify-content: flex-start; gap: 12px; min-width: 0; padding: 6px 12px 6px 14px; border-radius: 14px; }
  .statusbar { order: 3; }
  .tb-sep, .brand-word-board { display: none; }
  .tb-title { flex: 1 1 auto; }
  .timer-label { font-size: 11px; white-space: normal; max-width: 7.5em; line-height: 1.25; }
  .timer-label svg { display: none; }
  .timer-clock { font-size: 34px; }
  .timer-ctl { margin: 0 0 0 auto; }
  .timer .round-btn { width: 34px; height: 34px; }
  .timer .chip-btn { height: 34px; }
  .me-btn { padding: 0; width: 40px; justify-content: center; flex: none; }
  .btn-invite { width: 40px; padding: 0; flex: none; }
  .btn-invite span { display: none; }
  .tb-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .timer-msg { text-align: left; padding: 0 14px 10px; }
  .me-btn span:last-child { display: none; }
  .statusbar { gap: 6px; }
  .st-now { flex-basis: 100%; }
  .layout { padding: 20px 14px 0; gap: 20px; }
  .now-main { padding: 20px; }
  .now-side { padding: 20px; border-left: 0; border-top: 1px solid #F1E9CB; }
  .now-title { font-size: 23px; }
  .now-empty { flex-direction: column; text-align: center; padding: 24px 20px; }
  .now-empty p { font-size: 17px; }
  .cards { grid-template-columns: 1fr; }
  .comment-form { flex-direction: column; align-items: stretch; }
  .comment-form .btn { align-self: flex-end; }
  .wrap { padding: 24px 16px 16px; }
  .sitebar-in { padding: 10px 16px; }
  .who-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Druck ---------- */
@media print {
  .topbar, .mod-panel, .composer, .segmented, .card-actions, .toast, .conn, .comment-form, .area-export, .sitebar, .now-side .btn-signal, .now-side .btn-primary, .late-row, .fold-chev { display: none !important; }
  details.fold > .side-list { max-height: none; overflow: visible; }
  .page-board { padding-top: 0; }
  body { background: #fff; }
  .card, .now { box-shadow: none; break-inside: avoid; }
}
