/* =========================================================
   Nightshift - Schwarz/Weiß mit Mitternachtslila
   Dunkel ist Standard, Hell über data-theme="light"
   ========================================================= */
:root, [data-theme="dark"] {
  --bg: #09090b;
  --surface: #111113;
  --surface-2: #17171a;
  --surface-3: #212125;
  --border: #26262b;
  --text: #f5f5f6;
  --muted: #8d8d96;
  --accent: #9a82ff;            /* Lila für Text, Zeiten, Links */
  --accent-fill: #3f1f99;       /* Mitternachtslila für Buttons */
  --accent-fill-hover: #4f2bbd;
  --accent-soft: rgba(110, 76, 230, .16);
  --on-accent: #ffffff;
  --ok: #4ade80;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 9px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font);
  --font-num: var(--font);
  --head-weight: 800;
  --hero: radial-gradient(circle at 85% 60%, rgba(70, 34, 170, .55), transparent 58%),
          linear-gradient(135deg, #161126 0%, #0f0d17 55%, #0b0b0f 100%);
  --hero-ring: rgba(154, 130, 255, .07);
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f6f7;
  --surface: #ffffff;
  --surface-2: #f3f3f5;
  --surface-3: #e9e9ed;
  --border: #e3e3e8;
  --text: #111114;
  --muted: #6b6b75;
  --accent: #3f1f99;
  --accent-fill: #2b1470;
  --accent-fill-hover: #3f1f99;
  --accent-soft: rgba(63, 31, 153, .08);
  --on-accent: #ffffff;
  --ok: #15803d;
  --danger: #dc2626;
  --hero: radial-gradient(circle at 86% 55%, rgba(63, 31, 153, .16), transparent 58%),
          linear-gradient(135deg, #ffffff 0%, #f5f3fb 100%);
  --hero-ring: rgba(63, 31, 153, .06);
  --shadow: 0 8px 24px rgba(17, 17, 20, .07);
  color-scheme: light;
}

/* Logos: jeweils das passende anzeigen */
[data-theme="light"] .only-dark, :root:not([data-theme="light"]) .only-light { display: none !important; }

/* =========================================================
   Basis
   ========================================================= */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: -0.02em; margin: 0; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* =========================================================
   Bausteine
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent-fill); color: var(--on-accent); border: 0; border-radius: var(--radius-sm);
  padding: 10px 18px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--accent-fill-hover); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); color: #111; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.big { padding: 14px 24px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: default; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card.pad { padding: 20px; }

.input, .select {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; min-height: 42px; width: 100%;
}
.select { cursor: pointer; width: auto; }
.input:focus, .select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.select option { background: var(--surface); color: var(--text); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 2px 10px;
  font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text); white-space: nowrap;
}
.badge.owner, .badge.admin { background: var(--accent-fill); color: var(--on-accent); }
.badge.cutter { background: var(--accent-soft); color: var(--accent); }
.badge.mod { background: rgba(74, 222, 128, .14); color: var(--ok); }

.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; }
.avatar.lg { width: 44px; height: 44px; }
.avatar.ph { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--accent); background: var(--accent-soft); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); cursor: pointer; font-size: 14px; line-height: 1; flex: none;
}
.icon-btn:hover { background: var(--surface-3); }
.icon-btn.danger:hover { background: var(--danger); color: #111; border-color: transparent; }

.play {
  width: 40px; height: 40px; border-radius: var(--radius-sm); flex: none;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border); font-size: 13px;
}
.play:hover { background: var(--accent-fill); color: var(--on-accent); border-color: transparent; }
.play.off { opacity: .35; pointer-events: none; }

.empty { color: var(--muted); padding: 34px 16px; text-align: center; }
.empty h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }

.progress { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }

.check { width: 18px; height: 18px; accent-color: var(--ok); cursor: pointer; }
.check:disabled { cursor: default; opacity: .6; }

/* =========================================================
   App-Layout
   ========================================================= */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }

.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 22px 14px 14px;
}
.logo { display: inline-flex; text-decoration: none; padding: 0 8px 22px; }
.logo img { height: 44px; width: auto; }
.l-nav .logo img { height: 48px; }
.mobile-bar .logo img { height: 32px; }
.l-foot .mark { height: 18px; width: auto; display: inline-block; vertical-align: middle; margin-right: 8px; }
.nav-group { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 16px 10px 8px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600; color: var(--muted); margin-bottom: 2px;
}
.nav-link .ic { width: 18px; text-align: center; font-size: 14px; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--surface-3); color: var(--text); }
.side-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.plugin-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; font-size: 13px; }
.plugin-card .st { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(74, 222, 128, .18); }
.me-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); background: none; border: 0;
  cursor: pointer; text-align: left; width: 100%;
}
.me-chip:hover { background: var(--surface-2); }
.me-chip .n { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-chip .r { font-size: 12px; color: var(--muted); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; border-radius: 99px; padding: 5px 11px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.side .seg { display: flex; margin: 0 4px; }
.side .seg button { flex: 1; }
/* Chatterino/Chatty-Umschalter auf der Plugin-Seite */
.tabs { margin-bottom: 16px; }

.menu {
  position: fixed; z-index: 40; min-width: 220px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px; box-shadow: var(--shadow);
}
.menu button, .menu a { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 6px; cursor: pointer; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-3); }

.mobile-bar { display: none; }

.main { padding: 26px 34px 70px; min-width: 0; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs b { color: var(--text); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 30px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.with-rail { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 26px; align-items: start; }
.rail { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 26px; }
.rail h4 { margin: 0 0 12px; font-size: 14px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; background: var(--hero); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; min-height: 180px;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; border: 60px solid var(--hero-ring); pointer-events: none;
}
.hero::before { width: 380px; height: 380px; right: -60px; top: -100px; }
.hero::after { width: 240px; height: 240px; right: 10px; top: -30px; border-width: 40px; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 36px; line-height: 1.08; margin: 10px 0 10px; }
.hero p { margin: 0; color: var(--muted); max-width: 440px; }
.hero .big { text-align: right; }
.hero .big .num { font-size: 46px; font-weight: 800; line-height: 1; }
.hero .big span { font-size: 12px; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 14px 0 28px; }
.stat { padding: 16px 18px; }
.stat .num { font-size: 26px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--muted); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 18px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .input { flex: 1; min-width: 200px; }

/* Timestamp-Zeilen (Übersicht) */
.ts-list { display: flex; flex-direction: column; gap: 10px; }
.ts-item { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.ts-item .body { flex: 1; min-width: 0; }
.ts-item .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-item .s { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-item .right { text-align: right; flex: none; }
.ts-item .right .num { color: var(--accent); font-weight: 800; }
.ts-item .right .d { font-size: 12px; color: var(--muted); }
.ts-item.done .t { text-decoration: line-through; color: var(--muted); }

/* Rail: Vorgeschlagener Moment + Aktivität */
.feature { overflow: hidden; }
.feature .media {
  aspect-ratio: 16 / 9; background: var(--hero); position: relative; display: flex; align-items: center; justify-content: center;
}
.feature .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.feature .media .play { position: relative; width: 52px; height: 52px; border-radius: 50%; background: rgba(0, 0, 0, .4); color: #fff; border-color: rgba(255, 255, 255, .35); }
.feature .media .tag { position: absolute; left: 10px; top: 10px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: rgba(0, 0, 0, .55); color: #fff; padding: 3px 8px; border-radius: 4px; }
.feature .txt { padding: 14px 16px 16px; }
.feature .txt .eyebrow { font-size: 11px; }
.feature .txt h3 { font-size: 17px; margin: 4px 0 6px; }
.feature .txt p { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.feature .btn { width: 100%; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 16px 4px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline b { display: block; font-size: 13px; }
.timeline span { color: var(--muted); font-size: 12px; }

.chan-list { display: flex; flex-direction: column; gap: 8px; }
.chan-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; }
.chan-row:hover { background: var(--surface-2); }
.chan-row .n { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Channel-Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px;
  text-decoration: none;
}
.chip.noimg { padding-left: 12px; }
.chip img { width: 24px; height: 24px; border-radius: 50%; }
.chip:hover { background: var(--surface-2); }
.chip.active { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }

/* VOD-Akkordeon */
.vod { margin-bottom: 14px; overflow: hidden; }
.vod.done { opacity: .7; }
.vod-head { display: flex; align-items: center; gap: 20px; padding: 16px 20px; cursor: pointer; user-select: none; }
.vod-head:hover { background: var(--surface-2); }
.thumb { width: 132px; aspect-ratio: 16 / 9; flex: none; border-radius: var(--radius-sm); overflow: hidden; background: var(--hero); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.vod-info { flex: 1; min-width: 0; }
.vod-name { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vod-sub { color: var(--muted); font-size: 13px; margin: 2px 0 8px; }
.vod-info .progress { max-width: 260px; }
.vod-actions { display: flex; align-items: center; gap: 16px; }
.vod-done { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.chev { width: 12px; height: 12px; border-right: 2.5px solid var(--text); border-bottom: 2.5px solid var(--text); transform: rotate(45deg); transition: transform .15s; margin: 0 8px 6px; flex: none; }
.vod.open .chev { transform: rotate(-135deg); margin-bottom: -4px; }
.vod-body { display: none; border-top: 1px solid var(--border); background: var(--surface-2); }
.vod.open .vod-body { display: block; }
.vod-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px 14px; }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.ts { min-width: 820px; }
table.ts td.time { font-family: var(--font-num); font-weight: 800; color: var(--accent); white-space: nowrap; }
table.ts td.desc { max-width: 360px; overflow-wrap: anywhere; font-weight: 600; }
table.ts tr.done td.desc { text-decoration: line-through; color: var(--muted); font-weight: 400; }
table.ts .who { font-size: 13px; }
table.ts .who span { display: block; font-size: 12px; color: var(--muted); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.user-cell { display: flex; align-items: center; gap: 10px; }

/* Verwaltung */
.manage { margin-bottom: 18px; }
.manage-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.manage-head .n { flex: 1; min-width: 160px; }
.manage-head .n b { display: block; font-size: 17px; }
.manage-head .n span { font-size: 13px; color: var(--muted); }
.add-row { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--border); align-items: flex-end; }
.add-row .field { margin: 0; flex: 1; min-width: 160px; }
.add-row .field.narrow { flex: 0 0 160px; min-width: 140px; }
.sub-title { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 18px 4px; }

/* Plugin-Seite */
.steps { counter-reset: s; display: grid; gap: 14px; }
.step { padding: 18px 20px 18px 66px; position: relative; }
.step::before {
  counter-increment: s; content: counter(s); position: absolute; left: 18px; top: 18px;
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-family: var(--font-num);
}
.step h3 { font-size: 17px; margin-bottom: 4px; }
.step p { margin: 0 0 10px; color: var(--muted); }
.step p:last-child { margin-bottom: 0; }
code, .code { font-family: ui-monospace, Consolas, "SF Mono", monospace; font-size: 13px; background: var(--surface-3); padding: 2px 6px; border-radius: 5px; }
.codebox { display: flex; gap: 8px; }
.codebox .input { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

/* Modal + Toast */
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; width: 100%; max-width: 500px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.modal h3 { font-size: 21px; margin-bottom: 16px; }
.modal p { color: var(--muted); margin: 0 0 14px; }
.modal .btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 30px); opacity: 0;
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border); padding: 12px 20px; border-radius: var(--radius-sm);
  z-index: 100; transition: all .2s; pointer-events: none; max-width: 90vw; box-shadow: var(--shadow);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { border-color: var(--danger); }

/* =========================================================
   Startseite (nicht angemeldet)
   ========================================================= */
.landing { max-width: 1120px; margin: 0 auto; padding: 0 24px 60px; }
.l-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.l-nav .logo { padding: 0; }
.l-nav .r { display: flex; align-items: center; gap: 14px; }
.l-nav .r a.lk { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.l-nav .r a.lk:hover { color: var(--text); }
.l-hero { padding: 54px 46px; margin-top: 10px; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.l-hero h1 { font-size: 56px; line-height: 1.02; margin: 14px 0 16px; }
.l-hero p { font-size: 17px; max-width: 480px; }
.l-hero .cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.demo { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.demo .cmd { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; }
.demo .cmd .p { color: var(--accent); }
.demo .sys { font-size: 12px; color: var(--muted); margin: 0 2px 14px; }
.demo .ts-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.l-section { padding: 70px 0 0; }
.l-section > h2 { font-size: 32px; margin: 8px 0 8px; }
.l-section > p.lead { color: var(--muted); font-size: 16px; max-width: 620px; margin: 0 0 26px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.feat { padding: 22px; }
.feat .ic { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 14px; font-family: var(--font-num); }
.feat h3 { font-size: 17px; margin-bottom: 6px; }
.feat p { margin: 0; color: var(--muted); font-size: 14px; }
.role-card { padding: 18px; }
.role-card .badge { margin-bottom: 10px; }
.role-card p { margin: 0; color: var(--muted); font-size: 13px; }
.faq details { border-bottom: 1px solid var(--border); padding: 16px 4px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 16px; }
.faq details p { color: var(--muted); margin: 10px 0 0; max-width: 760px; }
.l-cta { margin-top: 70px; text-align: center; padding: 50px 24px; display: block; }
.l-cta h2 { font-size: 34px; margin-bottom: 10px; }
.l-cta p { margin: 0 auto 24px; color: var(--muted); }
.l-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; padding: 36px 0 0; }
.center-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 16px; }

/* =========================================================
   Responsiv
   ========================================================= */
@media (max-width: 1240px) {
  .with-rail { grid-template-columns: 1fr; }
  .rail { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .grid5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 30; transform: translateX(-105%);
    transition: transform .18s; box-shadow: var(--shadow);
  }
  .nav-open .side { transform: none; }
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
    border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20;
  }
  .mobile-bar .logo { padding: 0; font-size: 19px; }
  .main { padding: 18px 16px 60px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .l-hero { grid-template-columns: 1fr; padding: 34px 24px; }
  .l-hero h1 { font-size: 40px; }
  .grid3 { grid-template-columns: 1fr; }
  .grid5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .hero { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .hero h1 { font-size: 28px; }
  .hero .big { text-align: left; }
  .vod-head { gap: 12px; padding: 12px; flex-wrap: wrap; }
  .thumb { width: 84px; }
  .vod-actions { width: 100%; justify-content: space-between; }
  .ts-item { gap: 12px; padding: 10px 12px; }
  .landing { padding: 0 16px 50px; }
  .l-nav .r a.lk { display: none; }
  .l-hero h1 { font-size: 34px; }
  .grid5 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 24px; }
}

/* =========================================================
   Feinschliff: Icons, Live-Status, Animationen
   ========================================================= */
:root { --live: #e5484d; --ease: cubic-bezier(.2, .7, .2, 1); }

.i { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.i.sm { width: 15px; height: 15px; }
.i.lg { width: 22px; height: 22px; }

.nav-link .ic { width: 20px; display: inline-flex; justify-content: center; }
.nav-link .i { opacity: .85; }
.nav-link.active .i { opacity: 1; color: var(--accent); }
.nav-link { position: relative; }
.nav-link.active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}

.play .i { width: 14px; height: 14px; margin-left: 2px; }
.feature .media .play .i { width: 18px; height: 18px; }
.icon-btn .i { width: 16px; height: 16px; }
.feat .ic .i { width: 20px; height: 20px; }
.btn .i { width: 16px; height: 16px; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; }
.menu .i { width: 16px; height: 16px; color: var(--muted); }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg .i { width: 14px; height: 14px; }

/* Suchfeld mit Icon */
.search-wrap { position: relative; flex: 1; min-width: 200px; display: flex; }
.search-wrap .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; width: 16px; height: 16px; }
.search-wrap .input { padding-left: 38px; }

/* Ruhigere, flachere Karten */
.card { box-shadow: none; }
.ts-item, .vod, .stat, .chan-row, .manage, .feat, .role-card { transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease); }
.ts-item:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.vod:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.vod-head:hover { background: transparent; }
.stat:hover, .feat:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.hero::before, .hero::after { opacity: .7; }

/* Buttons & Links */
.btn, .icon-btn, .play, .chip, .nav-link, .seg button, .me-chip, .chan-row {
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .12s var(--ease), box-shadow .18s var(--ease);
}
.btn:active, .icon-btn:active, .play:active, .chip:active { transform: scale(.96); }
.btn:focus-visible, .icon-btn:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Akkordeon: sanft auf- und zuklappen */
.vod-body { display: grid !important; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--ease); border-top: 0; background: transparent; }
.vod.open .vod-body { grid-template-rows: 1fr; }
.vod-body > .inner { overflow: hidden; min-height: 0; }
.vod-body > .inner > .wrap { border-top: 1px solid var(--border); background: var(--surface-2); }
.vod .chev { width: 20px; height: 20px; border: 0; margin: 0 4px; transform: none; transition: transform .32s var(--ease); color: var(--muted); }
.vod.open .chev { transform: rotate(180deg); margin: 0 4px; }
.vod-head:hover .chev { color: var(--text); }

/* Live-Status */
.live {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; line-height: 1;
  color: #fff; background: var(--live); padding: 4px 7px 4px 6px; border-radius: 99px; vertical-align: middle;
}
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.avatar-wrap { position: relative; display: inline-flex; flex: none; }
.avatar-wrap.is-live .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--live); }
.name-line { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.name-line > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .live { padding: 3px 6px; font-size: 9.5px; }
.chip.active .live { background: #fff; color: var(--live); }
.chip.active .live::before { background: var(--live); }

.live-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 14px; }
.live-card { display: flex; gap: 14px; align-items: center; padding: 12px; text-decoration: none; border-color: color-mix(in srgb, var(--live) 35%, var(--border)); }
.live-card:hover { border-color: var(--live); }
.live-card .shot { width: 120px; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); flex: none; position: relative; }
.live-card .shot img { width: 100%; height: 100%; object-fit: cover; }
.live-card .shot .live { position: absolute; left: 6px; top: 6px; }
.live-card .t { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.live-card .s { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.live-card .body { min-width: 0; flex: 1; }

/* Automatische Aktualisierung */
.crumbs { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sync { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.sync .dot { width: 7px; height: 7px; background: var(--ok); }

/* Seitenwechsel, Modal, Toast */
@media (prefers-reduced-motion: no-preference) {
  .page-enter > * { animation: rise .42s var(--ease) both; }
  .page-enter > *:nth-child(2) { animation-delay: .04s; }
  .page-enter > *:nth-child(3) { animation-delay: .08s; }
  .page-enter > *:nth-child(4) { animation-delay: .12s; }
  .page-enter > *:nth-child(n+5) { animation-delay: .16s; }
  .backdrop { animation: fade .18s ease both; }
  .modal { animation: pop .24s var(--ease) both; }
  .menu { animation: pop .16s var(--ease) both; transform-origin: bottom left; }
  .live::before { animation: pulse 1.8s ease-in-out infinite; }
  .sync .dot { animation: pulse 2.4s ease-in-out infinite; }
  .side { transition: transform .26s var(--ease); }
  .flash { animation: flash 1.6s ease both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes flash { 0% { background: var(--accent-soft); } 100% { background: var(--surface); } }

#toast { display: flex; align-items: center; gap: 10px; }
#toast .i { width: 16px; height: 16px; }

/* Seitenleiste: Hell/Dunkel nur als Icons, Rail: Live-Zeile unter dem Namen */
.side .seg .lbl { display: none; }
.side .seg button { padding: 7px 0; }
.chan-row .n { display: flex; flex-direction: column; line-height: 1.25; }
.chan-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-sub { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--live); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-sub::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); flex: none; }
@media (prefers-reduced-motion: no-preference) { .live-sub::before { animation: pulse 1.8s ease-in-out infinite; } }
.badge.siteadmin { background: var(--accent-fill); color: var(--on-accent); }

/* Echtzeit + Aktualisieren-Button */
.sync .dot { background: var(--muted); }
.sync .dot.on { background: var(--ok); }
.refresh-btn { width: 28px; height: 28px; border-radius: 99px; margin-left: 2px; }
.refresh-btn .i { width: 14px; height: 14px; }
.refresh-btn.spin .i { animation: spin .6s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }
tr.flash td { animation: flashrow 2.4s ease both; }
@keyframes flashrow { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .refresh-btn.spin .i, tr.flash td, .flash { animation: none; } }

/* =========================================================
   Tags
   ========================================================= */
.tags { display: inline-flex; flex-wrap: wrap; gap: 5px; vertical-align: middle; }
td.desc .tags { display: flex; margin-top: 5px; }
.vod-sub .tags { margin-left: 8px; }
.tag {
  --c: #7c5cff;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 11.5px; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: 99px;
  color: color-mix(in srgb, var(--c) 70%, var(--text));
  background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.tag.toggle { cursor: pointer; font-size: 13px; padding: 6px 11px; transition: background-color .15s var(--ease), color .15s var(--ease), transform .12s var(--ease); }
.tag.toggle:hover { background: color-mix(in srgb, var(--c) 26%, transparent); }
.tag.toggle.on { background: var(--c); color: #fff; border-color: var(--c); }
.tag.toggle:active { transform: scale(.96); }
.tag .i { width: 12px; height: 12px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 4px; }
.swatch { --c: #7c5cff; width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 2px var(--surface); transition: transform .12s var(--ease); }
.swatch:hover { transform: scale(1.1); }
.swatch.on { border-color: var(--text); }

/* =========================================================
   Feedback & Tickets
   ========================================================= */
textarea.input { min-height: 0; resize: vertical; line-height: 1.5; font-family: inherit; }
.nav-link .count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--live); color: #fff;
  font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.ticket-list { display: flex; flex-direction: column; gap: 12px; }
.ticket { padding: 16px 18px; }
.ticket.is-open { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.ticket-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ticket-title { font-size: 16px; flex: 1; min-width: 160px; }
.ticket-meta { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.ticket-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.ticket-note { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: 14px; white-space: pre-wrap; }
.ticket-admin { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 14px; }
.ticket-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.badge.kind-bug { background: rgba(239, 68, 68, .15); color: #ef4444; }
.badge.kind-idea { background: rgba(234, 179, 8, .15); color: #ca8a04; }
.badge.kind-question { background: rgba(59, 130, 246, .15); color: #3b82f6; }
.badge.st-open { background: var(--accent-fill); color: var(--on-accent); }
.badge.st-progress { background: rgba(234, 179, 8, .18); color: #ca8a04; }
.badge.st-done { background: rgba(34, 197, 94, .15); color: var(--ok); }
.badge.st-rejected { background: var(--surface-3); color: var(--muted); }
.seg.tabs { flex-wrap: wrap; border-radius: var(--radius-sm); }
.seg.tabs button { border-radius: 7px; }

/* Farbrad */
.colorpick { display: flex; flex-direction: column; gap: 10px; }
.swatch.custom { background: conic-gradient(#ef4444, #eab308, #22c55e, #06b6d4, #3b82f6, #a855f7, #ec4899, #ef4444); position: relative; }
.swatch.custom.on::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface); }
.swatch.custom.open { border-color: var(--accent); }
.wheel-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.wheel-wrap { position: relative; width: 168px; height: 168px; flex: none; touch-action: none; }
.wheel { display: block; width: 168px; height: 168px; border-radius: 50%; cursor: crosshair; }
.wheel-knob { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .3); pointer-events: none; }
.wheel-side { display: flex; flex-direction: column; min-width: 150px; flex: 1; }
.wheel-side .field { margin-bottom: 10px; }
.wheel-light { width: 100%; accent-color: var(--accent); }
.wheel-hexrow { display: flex; gap: 8px; align-items: center; }
.wheel-preview { width: 34px; height: 34px; border-radius: var(--radius-sm); flex: none; border: 1px solid var(--border); }
.wheel-hex { font-family: ui-monospace, Consolas, monospace; text-transform: lowercase; min-height: 36px; padding: 6px 10px; }
.add-row .colorpick { min-width: 0; }
.add-tag { padding: 14px 18px; border-top: 1px solid var(--border); }
.add-tag-row { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.add-tag-row .field { flex: 1; margin: 0; }
.add-tag > .field { margin: 0; }
.wheel-box { max-width: 520px; }

/* Channel-Reihenfolge & Anpinnen */
.chip-tool { color: var(--muted); border-style: dashed; gap: 6px; }
.chip-tool:hover { color: var(--text); }
.chip .pin-mark, .chan-row .pin-mark { width: 13px; height: 13px; color: var(--accent); margin-right: -2px; }
.chip.active .pin-mark { color: var(--on-accent); }
.chan-row .pin-mark { margin-right: 5px; vertical-align: -1px; }
.rail-head { display: flex; align-items: center; justify-content: space-between; }
.link-btn { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.link-btn:hover { color: var(--text); background: var(--surface-2); }
.link-btn .i { width: 14px; height: 14px; }
.order-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.order-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
  transition: border-color .15s var(--ease), background-color .15s var(--ease), opacity .15s; }
.order-row.pinned { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.order-row.dragging { opacity: .45; }
.order-row.drop { border-color: var(--accent); background: var(--accent-soft); }
.order-row .grip { background: none; border: 0; color: var(--muted); cursor: grab; padding: 4px; border-radius: 6px; display: inline-flex; }
.order-row .grip:active { cursor: grabbing; }
.order-row .grip:focus-visible { outline: 2px solid var(--accent); }
.order-name { flex: 1; min-width: 0; font-weight: 600; }
.pin-btn.on { background: var(--accent-fill); color: var(--on-accent); border-color: transparent; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.modal .btns { flex-wrap: wrap; }
.modal .btns .btn.left { margin-right: auto; }
