:root {
  --bg: #0b0911;
  --bg-2: #100e18;
  --side: #0a0810;
  --elev: #15131e;
  --card: #1c1928;
  --card-2: #221e30;
  --line: rgba(255,255,255,.075);
  --line-2: rgba(255,255,255,.12);
  --text: #f4f1fb;
  --muted: #9b94ad;
  --dim: #6d667c;
  --accent: #e879f9;
  --accent-d: #c026d3;
  --violet: #a78bfa;
  --green: #34d399;
  --green-bg: rgba(52,211,153,.14);
  --yellow: #fbbf24;
  --yellow-bg: rgba(251,191,36,.14);
  --red: #fb7185;
  --red-bg: rgba(251,113,133,.14);
  --blue: #7dd3fc;
  --blue-bg: rgba(125,211,252,.14);
  --ig: #f472b6;
  --fb: #60a5fa;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --r: 12px;
  --font: system-ui, -apple-system, "Segoe UI", "Liberation Sans", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1200px 600px at -10% -10%, rgba(192,38,211,.16), transparent 55%),
    radial-gradient(900px 500px at 110% 0%, rgba(99,102,241,.12), transparent 50%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.app {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: 58px 1fr;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}
.app.has-rail {
  grid-template-columns: 200px 1fr 280px;
}

.sidebar {
  grid-row: 1 / -1;
  background: linear-gradient(180deg, #110e19 0%, var(--side) 40%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
}

.logo { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #f0abfc 0%, #c026d3 45%, #6366f1 100%);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 6px 16px rgba(192,38,211,.35);
  flex-shrink: 0;
}
.logo-word { display: flex; flex-direction: column; line-height: 1.05; }
.logo-word strong { font-size: 16px; font-weight: 650; letter-spacing: -0.03em; }
.logo-word span {
  font-size: 9.5px; color: var(--dim); letter-spacing: .08em;
  text-transform: uppercase; font-weight: 550;
}

nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 10px; border-radius: 9px;
  color: var(--muted); font-weight: 520; font-size: 13px;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(232,121,249,.16), rgba(232,121,249,.05));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(232,121,249,.22);
}
.nav-item.active svg { opacity: 1; color: var(--accent); }
.nav-item:hover { color: var(--text); }
.nav-with-popout { display: flex; align-items: center; gap: 2px; }
.nav-with-popout .nav-item { flex: 1; min-width: 0; }
.nav-popout {
  width: 28px; height: 28px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 8px; color: var(--muted);
}
.nav-popout svg { width: 15px; height: 15px; display: block; }
.nav-popout:hover { color: var(--text); background: rgba(255,255,255,.06); }

.side-foot { margin-top: auto; padding: 10px 8px 0; border-top: 1px solid var(--line); }
.priv-badge {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 8px 9px; border-radius: 9px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  color: var(--muted); font-size: 11px;
}
.priv-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent); flex-shrink: 0;
}

.topbar {
  grid-column: 2 / -1;
  grid-row: 1;
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 0 16px 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(16,14,24,.72);
  min-width: 0;
  min-height: 58px;
  z-index: 5;
}
.topbar-main {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; flex: 1; min-width: 0; flex-wrap: nowrap;
}
.topbar-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.playout-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  max-width: 320px;
  padding: 4px 10px 5px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  text-decoration: none;
  color: inherit;
  line-height: 1.25;
  min-width: 0;
}
.playout-chip:hover { border-color: var(--line-2); background: rgba(255,255,255,.05); }
.playout-chip-row { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.playout-chip-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #94a3b8; flex-shrink: 0;
}
.playout-chip.is-on {
  border-color: rgba(251, 191, 36, .32);
  background: rgba(251, 191, 36, .08);
}
.playout-chip.is-on .playout-chip-dot {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}
.playout-chip-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playout-chip.is-on .playout-chip-label { color: #fde68a; }
.playout-chip-meta {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
  padding-left: 13px;
}
.user-name { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.inline-form { display: inline; }
.btn-text {
  background: none; border: 0; color: var(--muted); font-size: 12px; font-weight: 550;
  padding: 4px 0;
}
.btn-text:hover { color: var(--text); }

.week-switch { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--elev); color: var(--text);
  display: grid; place-items: center;
}
.icon-btn svg { width: 14px; height: 14px; }
.week-label {
  font-weight: 600; letter-spacing: -0.02em; font-size: 13.5px;
  padding: 0 6px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 42vw;
}
.week-label em { font-style: normal; color: var(--accent); font-weight: 650; }

.view-toggle, .media-view-toggle {
  display: flex; background: var(--elev); border: 1px solid var(--line);
  border-radius: 9px; padding: 2px; flex-shrink: 0;
}
.view-toggle .view-btn, .view-toggle span, .media-view-toggle .view-btn {
  padding: 5px 10px; border-radius: 7px; font-size: 12px;
  font-weight: 550; color: var(--muted);
  background: none; border: 0; cursor: pointer;
}
.btn-new {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 9px; border: 0;
  background: linear-gradient(135deg, #e879f9 0%, #c026d3 50%, #7c3aed 100%);
  color: #fff; font-weight: 650; font-size: 12.5px;
  letter-spacing: -0.01em; box-shadow: 0 6px 16px rgba(192,38,211,.35);
  white-space: nowrap; flex-shrink: 0;
}
.view-toggle .view-btn.on, .view-toggle span.on, .media-view-toggle .view-btn.on {
  background: rgba(232,121,249,.16); color: var(--text);
  box-shadow: 0 0 0 1px rgba(232,121,249,.25);
}
.btn-today {
  height: 28px; padding: 0 9px; margin-left: 4px;
  border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--elev); color: var(--text);
  font-size: 12px; font-weight: 600;
}
.btn-today:hover { border-color: rgba(232,121,249,.4); }
.btn-compact {
  height: 28px; padding: 0 9px;
  border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--elev); color: var(--text);
  font-size: 12px; font-weight: 600;
  flex-shrink: 0; white-space: nowrap;
}
.btn-compact:hover { border-color: rgba(232,121,249,.4); }
.btn-compact.on {
  background: rgba(232,121,249,.16); color: var(--text);
  box-shadow: 0 0 0 1px rgba(232,121,249,.25);
  border-color: transparent;
}
body.is-compact-view .zoom-controls { display: none; }
.zoom-controls {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.zoom-label {
  min-width: 48px; text-align: center;
  font-size: 12px; font-weight: 650; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.main {
  grid-column: 2;
  grid-row: 2;
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  padding: 12px 14px 14px 16px;
}

.sendeplan-main { min-height: 0; }

.cal-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.cal-wrap { position: relative; }
.cal-wrap.is-loading .cal { opacity: .72; }
.week-edge {
  position: absolute;
  top: 0; bottom: 0;
  width: 36px;
  z-index: 6;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s ease;
}
.week-edge span {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(232,121,249,.22);
  border: 1px solid rgba(232,121,249,.45);
  color: var(--text);
  font-size: 16px; font-weight: 700; line-height: 1;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.week-edge.show { opacity: 1; }
.week-edge-left {
  left: 0;
  background: linear-gradient(90deg, rgba(232,121,249,.2), transparent);
}
.week-edge-right {
  right: 0;
  background: linear-gradient(270deg, rgba(232,121,249,.2), transparent);
}
.drag-clone {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  opacity: .95;
  margin: 0;
  box-shadow: 0 14px 32px rgba(0,0,0,.45);
  transform: rotate(2deg);
}
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none !important; }

.cal-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(20,18,30,.65);
}
.cal {
  display: grid;
  grid-template-columns: 44px repeat(7, 1fr);
  grid-template-rows: 54px repeat(7, minmax(72px, 1fr));
  min-height: 640px;
}
.cal.cal-hours {
  --hour-h: 86px;
  grid-template-rows: 54px repeat(18, minmax(var(--hour-h), var(--hour-h)));
  min-height: calc(54px + 18 * 86px);
}
.cal-wrap .corner, .cal-wrap .dhead {
  position: sticky;
  top: 0;
  z-index: 3;
}
.corner { background: var(--elev); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.dhead {
  background: var(--elev); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.dhead:nth-child(8) { border-right: 0; }
.dhead .dow {
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--dim);
}
.dhead .num { font-size: 15px; font-weight: 650; letter-spacing: -0.03em; }
.dhead.weekend .num { color: var(--muted); }
.dhead.today .num { color: var(--accent); }
.dhead.today .dow { color: var(--accent); }
.dhead .day-sum {
  font-size: 9px; font-weight: 650; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--muted); margin-top: 1px;
}
.dhead.today .day-sum { color: var(--accent); }

.tlabel {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--dim); font-size: 10px; font-weight: 560;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 6px 6px 0 0;
  background: rgba(16,14,24,.5);
}
.cell {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 0; display: block;
  min-width: 0;
  overflow: visible;
  background-image: linear-gradient(180deg, rgba(255,255,255,.015), transparent 28px);
}
.cell:nth-child(8n) { border-right: 0; }
.cell.weekend { background-color: rgba(255,255,255,.012); }
.cell.today { background-color: rgba(232,121,249,.04); }

.post {
  --min-h: 32px;
  position: absolute;
  left: 3px; right: 3px;
  top: calc(var(--hour-h, 86px) * var(--t0, 0));
  height: max(var(--min-h), calc(var(--hour-h, 86px) * var(--dur, 0)));
  box-sizing: border-box;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--ch, var(--accent));
  border-radius: 8px;
  padding: 5px 6px 5px 5px;
  min-width: 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
  overflow: hidden;
  z-index: 2;
}
.post.is-compact { grid-template-columns: 1fr; padding: 3px 22px 3px 6px; }
.post.is-compact .post-thumb { display: none; }
.post.is-compact .post-row { display: none; }
.post.is-compact .btn-approve { display: none; }
.post.dragging { opacity: .45; }
.post-thumb {
  width: 36px; height: 48px; border-radius: 5px;
  object-fit: cover; background: var(--elev); display: block;
}
.post-thumb.placeholder { background: linear-gradient(135deg, #312e81, #7c3aed); }
.post-body { min-width: 0; }
.post-title {
  font-size: 11px; font-weight: 620; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.post-meta { color: var(--muted); font-size: 10px; margin-top: 1px; }
.post-time { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--text); }
.post-row { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.plats { display: inline-flex; gap: 3px; align-items: center; }
.plats i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.p-ig { background: #e1306c; }
.p-fb { background: #1877f2; }
.p-x  { background: #e7e9ea; }
.p-twitch { background: #9146ff; }
.btn-approve {
  margin-top: 4px; height: 20px; padding: 0 7px; border: 0; border-radius: 6px;
  background: var(--yellow-bg); color: var(--yellow); font-size: 10px; font-weight: 650;
}
.cell { position: relative; cursor: pointer; }
.cell.drop-target { outline: 1px dashed rgba(232,121,249,.55); outline-offset: -2px; background: rgba(232,121,249,.08); }
.cell:hover { z-index: 3; }
.badge {
  display: inline-flex; align-items: center; height: 15px;
  padding: 0 5px; border-radius: 999px;
  font-size: 9px; font-weight: 650; margin-top: 3px;
}
.b-plan { background: var(--blue-bg); color: var(--blue); }
.b-wait { background: var(--yellow-bg); color: var(--yellow); }
.b-done { background: var(--green-bg); color: var(--green); }
.b-fail { background: var(--red-bg); color: var(--red); }

.rail {
  grid-column: 3;
  grid-row: 2;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16,14,24,.9), rgba(10,8,16,.95));
  padding: 14px 12px 12px;
  display: flex; flex-direction: column; gap: 14px; min-height: 0;
  overflow: auto;
}
.rail h2 {
  font-size: 11px; font-weight: 650; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 8px;
}

.onair {
  background: var(--card);
  border: 1px solid rgba(232,121,249,.22);
  border-radius: 12px;
  padding: 10px 11px 12px;
  box-shadow: 0 0 0 1px rgba(232,121,249,.06), 0 10px 24px rgba(0,0,0,.25);
}
.onair-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px;
}
.onair-live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}
.onair .slot-label {
  font-size: 10px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--dim); margin: 8px 0 3px;
}
.onair .slot-title { font-size: 14px; font-weight: 650; letter-spacing: -0.02em; }
.onair .slot-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.onair .empty { color: var(--muted); font-size: 12.5px; }

.onair-live i { background: var(--dim); box-shadow: none; }
.onair-live.is-on.is-test i { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,.7); }
.onair-live.is-on.is-live i { background: #fb7185; box-shadow: 0 0 8px rgba(251,113,133,.8); }
.onair-live.is-on.is-live { color: #fb7185; }
.onair-live.is-on.is-test { color: #fbbf24; }

.onair-frame {
  position: relative;
  display: block;
  width: 100%;
  margin: 6px 0 4px;
  padding: 0;
  border: 1px solid rgba(232,121,249,.22);
  border-radius: 8px;
  overflow: hidden;
  background: #100e18;
  cursor: zoom-in;
  aspect-ratio: 16 / 9;
}
.onair-frame:hover { border-color: rgba(232,121,249,.45); }
.onair-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #100e18;
}
.onair-frame-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px 2px 5px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(20,14,24,.78);
  pointer-events: none;
}
.onair-frame-badge[hidden] { display: none !important; }
.onair-frame-badge.is-live { background: #e11d48; }
.onair-frame-badge.is-test { background: #b45309; }
.onair-frame-badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.onair-frame-hint {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: .04em;
  color: rgba(226,224,234,.85);
  background: linear-gradient(transparent, rgba(8,6,14,.72));
  text-align: left;
  pointer-events: none;
}
.onair-frame-hint:empty { display: none; }

.onair-zoom {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6,4,12,.82);
  cursor: zoom-out;
}
.onair-zoom[hidden] { display: none !important; }
.onair-zoom img {
  max-width: min(960px, 92vw);
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  background: #100e18;
}
.onair-zoom-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.onair-zoom-close:hover { background: rgba(255,255,255,.22); }

.onair-view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 6px;
}
.onair-view-btn {
  flex: 1;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
}
.onair-view-btn.on,
.onair-view-btn[aria-pressed="true"] {
  background: rgba(232,121,249,.16);
  border-color: rgba(232,121,249,.35);
  color: var(--text);
}
.onair-twitch { margin: 4px 0 6px; }
.onair-twitch[hidden], .onair-local[hidden] { display: none !important; }
.onair-twitch-host {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(232,121,249,.22);
  border-radius: 8px;
  overflow: hidden;
  background: #100e18;
}
.onair-twitch-host iframe,
.onair-twitch-host > div {
  width: 100% !important;
  height: 100% !important;
}
.onair-twitch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.onair-twitch-mute {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}
.onair-twitch-link {
  font-size: 12px;
  font-weight: 600;
  color: #91c4ff;
  text-decoration: underline;
}
.onair-twitch-note {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--yellow);
  background: var(--yellow-bg);
  border-radius: 8px;
  padding: 6px 8px;
}
.onair-twitch-note[hidden] { display: none !important; }




.acct-list { display: flex; flex-direction: column; gap: 4px; }
.acct {
  display: grid; grid-template-columns: 8px 1fr; gap: 8px; align-items: start;
  padding: 6px 8px; border-radius: 8px;
  background: rgba(255,255,255,.025); border: 1px solid var(--line);
}
.acct .st { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; background: var(--dim); }
.acct .name { font-size: 11.5px; font-weight: 600; letter-spacing: -0.01em; }
.acct .sub { font-size: 10px; color: var(--muted); margin-top: 1px; }

.blocked {
  padding: 9px 10px; border-radius: 10px;
  background: rgba(251,113,133,.06);
  border: 1px dashed rgba(251,113,133,.28);
}
.blocked-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; border: 0; padding: 0; background: transparent; cursor: pointer;
  font-size: 12px; font-weight: 650; color: #fda4af; letter-spacing: -0.01em; text-align: left;
}
.blocked-toggle::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg); transition: transform .15s ease;
  margin-top: -2px;
}
.blocked:not(.is-collapsed) .blocked-toggle::after { transform: rotate(-135deg); margin-top: 2px; }
.blocked-toggle:hover { color: #fecdd3; }
.blocked-body[hidden] { display: none !important; }
.blocked-body { margin-top: 6px; }
.blocked p, .blocked li { font-size: 10.5px; color: var(--muted); line-height: 1.4; }
.blocked ul { padding-left: 16px; margin: 0; }

/* Mediathek */
.mediathek-main {
  display: flex; flex-direction: row;
  min-width: 0; min-height: 0;
  padding: 0; overflow: hidden;
}
.media-tree {
  width: 236px; flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: rgba(16,14,24,.55);
  padding: 12px 8px 16px;
  overflow: auto;
  min-height: 0;
}
.media-tree-head {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--dim);
  padding: 0 8px 8px;
}
.media-tree-list { list-style: none; margin: 0; padding: 0; }
.media-tree-list .media-tree-list { padding-left: 14px; }
.tree-node { margin: 0; }
.tree-row {
  display: flex; align-items: center; gap: 6px;
  width: 100%; min-height: 28px;
  padding: 2px 8px 2px 4px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  border: 1px dashed transparent;
  font-size: 12.5px;
}
.tree-row:hover { background: rgba(255,255,255,.05); }
.tree-row.is-active {
  background: rgba(232,121,249,.14);
  box-shadow: inset 0 0 0 1px rgba(232,121,249,.28);
}
.tree-row.is-drop-target, .media-stage.is-drop-target, .channel-grid.is-drop-target {
  background: rgba(232,121,249,.16);
  border-color: rgba(232,121,249,.45);
}
.tree-row.tree-all { margin-bottom: 6px; font-weight: 620; }
.tree-name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tree-count { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.tree-twist {
  width: 10px; height: 10px; flex-shrink: 0;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: rotate(-45deg);
  opacity: .7;
  margin: 0 2px;
}
.tree-node.is-open > .tree-row > .tree-twist { transform: rotate(45deg); margin-top: -2px; }
.tree-twist.is-leaf { opacity: 0; border: 0; }
.media-stage {
  flex: 1; min-width: 0; min-height: 0;
  overflow: auto;
  padding: 14px 18px 18px;
}
.media-crumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 12px; color: var(--muted); margin-bottom: 6px;
}
.media-crumb a { color: var(--muted); }
.media-crumb a:hover { color: var(--text); }
.crumb-sep { color: var(--dim); }
.crumb-current { color: var(--text); font-weight: 620; }

.page-head { margin-bottom: 10px; }
.page-head h1 { font-size: 18px; font-weight: 680; letter-spacing: -0.03em; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }

.channel-grid { display: flex; flex-direction: column; gap: 8px; }
.channel-block {
  background: rgba(20,18,30,.65);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px 10px;
}
.channel-block h2 {
  font-size: 13px; font-weight: 650; letter-spacing: -0.01em;
  display: flex; align-items: center; justify-content: space-between;
}
.channel-block h2 .count {
  font-size: 11px; color: var(--dim); font-weight: 550; letter-spacing: 0;
}
.kids-note {
  margin-top: 6px; font-size: 11.5px; color: var(--yellow);
  background: var(--yellow-bg); border-radius: 8px; padding: 6px 8px;
}
.empty-state {
  margin-top: 8px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  padding: 12px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  background: rgba(255,255,255,.015);
}

.suggestion-empty {
  background: rgba(20,18,30,.65);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
}
.suggestion-empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }

/* Login / Install */
body.guest {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
.guest-wrap { width: 100%; max-width: 400px; }
.guest-logo { padding: 0 0 22px; justify-content: center; }
.guest-card {
  background: rgba(20,18,30,.85);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
}
.guest-card h1 { font-size: 18px; font-weight: 680; letter-spacing: -0.03em; margin-bottom: 6px; }
.guest-card .lead { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field input {
  height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--elev);
}
.field input:focus { outline: none; border-color: rgba(232,121,249,.55); box-shadow: 0 0 0 3px rgba(232,121,249,.15); }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 40px; margin-top: 6px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, #e879f9 0%, #c026d3 50%, #7c3aed 100%);
  color: #fff; font-weight: 650; letter-spacing: -0.01em;
  box-shadow: 0 6px 16px rgba(192,38,211,.35);
}
.alert {
  border-radius: 10px; padding: 9px 11px; margin-bottom: 14px; font-size: 13px;
}
.alert-error { background: var(--red-bg); color: #fda4af; border: 1px solid rgba(251,113,133,.25); }
.alert-ok { background: var(--green-bg); color: var(--green); border: 1px solid rgba(52,211,153,.25); }
.alert-info { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(125,211,252,.2); }
.hint { margin-top: 14px; font-size: 11.5px; color: var(--dim); text-align: center; }


.media-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.media-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
}
.media-item.missing { opacity: .72; border-style: dashed; }
.media-thumb {
  width: 88px; height: 50px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--elev);
  display: block;
}
.media-thumb.placeholder {
  display: grid; place-items: center;
  color: var(--dim); font-size: 10px; font-weight: 650;
  letter-spacing: .04em; text-transform: uppercase;
}
.media-name { font-weight: 620; font-size: 13px; letter-spacing: -0.02em; }
.sendungsname-wrap { min-width: 0; }
.media-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.media-name-row .media-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.btn-name-edit {
  flex: 0 0 auto; width: 22px; height: 22px; padding: 0;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); cursor: pointer;
}
.btn-name-edit:hover { background: rgba(255,255,255,.08); color: var(--text); }
.file-name-line {
  margin-top: 2px; font-size: 11px; color: var(--muted);
  word-break: break-all; line-height: 1.3;
}
.sendungsname-input {
  flex: 1; min-width: 0; height: 26px; padding: 0 8px;
  border-radius: 7px; border: 1px solid rgba(167,139,250,.45);
  background: rgba(12,8,22,.85); color: var(--text);
  font-size: 13px; font-weight: 620;
}
.field-hint { margin: 6px 0 0; font-size: 11px; color: var(--muted); line-height: 1.35; }
.plan-sendungsname-slot { margin-top: 8px; }
#plan-file-name { margin-top: 4px; }
.media-meta { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.media-link-badge { margin-top: 3px; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.lnk-badge {
  display: inline-block; font-size: 10px; font-weight: 650; letter-spacing: .02em;
  padding: 1px 6px; border-radius: 999px; background: rgba(125, 211, 252, .16);
  color: #bae6fd; border: 1px solid rgba(125, 211, 252, .28);
}
.lnk-drive { font-weight: 620; color: #e2e0ea; }
.media-link-error { margin-top: 3px; font-size: 11.5px; color: #f9a8d4; }
.media-link-error .lnk-raw { color: var(--muted); word-break: break-all; }
.media-item.shortcut-bad { border-style: dashed; }
.media-item.shortcut-bad .media-name { color: #f5d0fe; }

.media-flags { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

.btn-plan-sm {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 7px; border: 1px solid rgba(232,121,249,.35);
  background: rgba(232,121,249,.12); color: var(--text);
  font-size: 11px; font-weight: 650;
}
.btn-plan-sm:hover { background: rgba(232,121,249,.22); }

.dialog-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(6,4,12,.62);
  display: grid; place-items: center; padding: 24px 16px;
}
.dialog-overlay[hidden] { display: none; }
.dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: linear-gradient(180deg, #161320 0%, #100e18 100%);
  border: 1px solid rgba(232,121,249,.22);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  padding: 16px 18px 16px;
}
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dialog-head h2 { font-size: 16px; font-weight: 680; letter-spacing: -0.03em; }
.dialog-error {
  background: var(--red-bg); color: #fda4af; border: 1px solid rgba(251,113,133,.25);
  border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; font-size: 13px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field textarea, .field select, .field input[type="date"], .field input[type="time"], .field input[type="search"] {
  width: 100%; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--elev); color: var(--text); padding: 8px 10px;
}
.field textarea { resize: vertical; min-height: 64px; line-height: 1.4; }
.field legend { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field fieldset, fieldset.field { border: 0; }
.opt { color: var(--dim); font-weight: 500; }
.media-pick-tools { display: grid; grid-template-columns: 1fr 150px; gap: 8px; margin-bottom: 8px; }
.media-pick {
  max-height: 200px; overflow: auto; display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: rgba(0,0,0,.15);
}
.pick-item {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; align-items: center;
  text-align: left; padding: 5px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--text); width: 100%;
}
.pick-item:hover { background: rgba(255,255,255,.04); }
.pick-item.on { background: rgba(232,121,249,.12); box-shadow: inset 0 0 0 1px rgba(232,121,249,.3); }
.pick-item.is-disabled, .pick-item:disabled { opacity: .55; cursor: not-allowed; }
.pick-item img, .pick-ph {
  width: 40px; height: 28px; border-radius: 5px; object-fit: cover; background: var(--elev); display: block;
}
.pick-text { min-width: 0; display: flex; flex-direction: column; }
.pick-text strong { font-size: 12.5px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-text em { font-style: normal; font-size: 11px; color: var(--muted); }
.pick-count {
  justify-self: end; font-size: 10.5px; font-weight: 650; letter-spacing: .01em;
  white-space: nowrap; padding: 2px 7px; border-radius: 999px;
  background: rgba(232, 121, 249, .14); color: #f5d0fe;
  border: 1px solid rgba(232, 121, 249, .28);
}
.pick-count.is-new {
  background: transparent; color: var(--muted); border-color: rgba(255,255,255,.1); font-weight: 550;
}
.slot-hover-past { color: var(--muted); font-size: 11px; }
.pick-empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 16px 8px; }
.kids-hint { margin-top: 8px; font-size: 12px; color: var(--yellow); background: var(--yellow-bg); border-radius: 8px; padding: 6px 8px; }
.acct-checks { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.dialog-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.dialog-spacer { flex: 1; }
.btn-inline { width: auto; padding: 0 16px; margin-top: 0; }
.btn-danger {
  height: 36px; padding: 0 12px; border: 0; border-radius: 9px;
  background: var(--red-bg); color: #fda4af; font-weight: 650; font-size: 12.5px;
}
.btn-ok-lite {
  height: 36px; padding: 0 12px; border: 0; border-radius: 9px;
  background: var(--yellow-bg); color: var(--yellow); font-weight: 650; font-size: 12.5px;
}

@media (max-width: 800px) {
  .app, .app.has-rail { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto; }
  .sidebar { grid-row: 1; grid-column: 1; flex-direction: row; align-items: center; gap: 16px; padding: 10px 12px; }
  .logo { padding: 0; }
  nav { flex-direction: row; }
  .side-foot { display: none; }
  .topbar { grid-row: 2; grid-column: 1; }
  .main { grid-row: 3; grid-column: 1; }
  .rail { grid-row: 4; grid-column: 1; max-height: 40vh; }
  .cal { min-height: 520px; }
}

.move-banner {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(22,19,32,.96);
  border: 1px solid rgba(232,121,249,.4);
  box-shadow: 0 10px 24px rgba(0,0,0,.4);
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}
.move-banner[hidden] { display: none !important; }
#move-cancel {
  height: 28px; padding: 0 10px; border: 0; border-radius: 8px;
  background: rgba(255,255,255,.08); color: var(--text);
  font-size: 12px; font-weight: 650;
}
.post.is-picked {
  box-shadow: 0 0 0 2px var(--accent), 0 8px 20px rgba(192,38,211,.35);
}
.btn-pickup {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border: 0; border-radius: 6px;
  background: rgba(10,8,16,.55);
  color: var(--muted);
  display: grid; place-items: center;
  padding: 0;
}
.btn-pickup svg { width: 12px; height: 12px; }
.btn-pickup:hover { color: var(--text); background: rgba(232,121,249,.3); }
body.is-picking .cal .cell { cursor: pointer; }
body.is-picking .week-edge {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.plan-runtime {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--text);
  background: rgba(255,255,255,.04);
  border-radius: 8px;
  padding: 6px 8px;
}
.plan-runtime[hidden] { display: none !important; }
.side-watch {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.side-label {
  font-size: 10px; font-weight: 650; letter-spacing: .08em;
  text-transform: uppercase; color: var(--dim);
  padding: 0 8px 6px;
}
.side-folders, .side-accounts { list-style: none; margin: 0 0 12px; padding: 0; }
.side-folder, .side-acct {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px; border-radius: 8px;
  font-size: 12px; color: var(--text);
}
.side-folder { cursor: pointer; border: 1px dashed transparent; }
.side-folder:hover, .side-folder.is-drop-target {
  background: rgba(232,121,249,.08);
  border-color: rgba(232,121,249,.35);
}
.side-folder.is-drop-target { background: rgba(232,121,249,.16); cursor: copy; }
.side-folder-name, .side-acct-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.side-folder-count, .side-acct-plat {
  flex-shrink: 0; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11px;
}
.side-acct { color: var(--muted); }

.main.is-drop-target, .cal-wrap.is-drop-target, .channel-grid.is-drop-target {
  outline: 2px dashed rgba(232,121,249,.45);
  outline-offset: -4px;
  background-color: rgba(232,121,249,.05);
}

.upload-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: rgba(6,4,12,.45);
}
.upload-overlay[hidden] { display: none !important; }
.upload-card {
  width: min(360px, calc(100vw - 32px));
  background: var(--elev);
  border: 1px solid rgba(232,121,249,.28);
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.upload-title { font-size: 14px; font-weight: 650; }
.upload-file { font-size: 12px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-track {
  height: 8px; border-radius: 999px; margin-top: 12px;
  background: rgba(255,255,255,.08); overflow: hidden;
}
.upload-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #c026d3, #e879f9);
  transition: width .15s ease;
}
.upload-note { margin-top: 8px; font-size: 11.5px; color: var(--muted); min-height: 1.2em; }
.upload-pct { margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .side-watch { display: none; }
}

/* Timeline: week + day, vertical zoom */
.cal-timeline {
  --ruler-w: 52px;
  --track-h: 2880px;
  --major-px: 120px;
  --minor-px: 10px;
  --px-min: 2px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.cal-head {
  display: grid;
  grid-template-columns: var(--ruler-w) repeat(7, 1fr);
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--elev);
  border-bottom: 1px solid var(--line);
}
.cal-timeline.cal-day .cal-head,
.cal-timeline.cal-day .cal-body {
  grid-template-columns: var(--ruler-w) 1fr;
}
.cal-head .corner {
  background: var(--elev);
  border-right: 1px solid var(--line);
}
.cal-head .dhead {
  position: static;
  cursor: pointer;
  min-height: 54px;
  border-bottom: 0;
}
.cal-head .dhead:last-child { border-right: 0; }
.cal-body {
  display: grid;
  grid-template-columns: var(--ruler-w) repeat(7, 1fr);
  height: var(--track-h);
  position: relative;
}
.cal-ruler {
  position: relative;
  border-right: 1px solid var(--line);
  background: rgba(16,14,24,.55);
}
.cal-tick {
  position: absolute;
  right: 6px;
  transform: translateY(-50%);
  color: var(--dim);
  font-size: 10px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.cal-tick.is-hour { color: var(--muted); font-weight: 650; font-size: 10.5px; }
.cal-tick.is-minute { font-size: 9px; color: var(--dim); }
.cal-day-col {
  position: relative;
  border-right: 1px solid var(--line);
  min-width: 0;
  overflow: visible;
  cursor: pointer;
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,.07) 0,
      rgba(255,255,255,.07) 1px,
      transparent 1px,
      transparent var(--minor-px)
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(232,121,249,.18) 0,
      rgba(232,121,249,.18) 1px,
      transparent 1px,
      transparent var(--major-px)
    );
  background-size: 100% var(--track-h);
}
.cal-day-col:last-child { border-right: 0; }
.cal-day-col.weekend { background-color: rgba(255,255,255,.012); }
.cal-day-col.today { background-color: rgba(232,121,249,.04); }
.cal-day-col.drop-target {
  outline: 1px dashed rgba(232,121,249,.55);
  outline-offset: -2px;
  background-color: rgba(232,121,249,.08);
}

.cal-timeline .post {
  --min-h: 0;
  top: var(--top, 0px);
  height: var(--h, 2px);
  left: 3px;
  right: 3px;
  min-height: 0;
}
.cal-timeline .post.is-compact,
.cal-timeline .post.is-slim {
  grid-template-columns: 1fr;
  padding: 2px 18px 2px 5px;
}
.cal-timeline .post.is-compact .post-thumb,
.cal-timeline .post.is-slim .post-thumb,
.cal-timeline .post.is-tiny .post-thumb,
.cal-timeline .post.is-slim .post-row,
.cal-timeline .post.is-tiny .post-row,
.cal-timeline .post.is-slim .btn-approve,
.cal-timeline .post.is-tiny .btn-approve { display: none; }
.cal-timeline .post.is-tiny {
  padding: 0;
  border-radius: 2px;
  overflow: visible;
}
.cal-timeline .post.is-tiny .post-body { display: none; }
.cal-timeline .post.is-tiny .btn-pickup { display: none; }
.post-float {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(22,19,32,.92);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 4;
  pointer-events: none;
}
.cal-day .post.is-tiny .post-float,
.cal-day .post.is-slim .post-float { display: block; }
.cal-week .post.is-tiny:hover,
.cal-week .post.is-slim:hover { z-index: 8; }
.cal-week .post.is-tiny:hover .post-float {
  display: block;
  left: 0;
  top: 100%;
  margin: 3px 0 0;
}

@media (max-width: 1100px) {
  .week-label { font-size: 12px; }
  .zoom-label { min-width: 40px; }
}

/* Slot hover popover */
.cal-timeline .post.is-tiny::after,
.cal-timeline .post.is-slim::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -5px; bottom: -5px;
}
.slot-hover {
  position: fixed;
  z-index: 80;
  width: 240px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  overflow: auto;
  pointer-events: none;
  background: rgba(18,16,28,.97);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  padding: 0 0 10px;
}
.slot-hover-thumb {
  display: block;
  width: 100%;
  height: 135px;
  object-fit: cover;
  background: var(--elev);
  border-radius: 12px 12px 0 0;
}
.slot-hover-thumb.placeholder {
  display: grid; place-items: center;
  color: var(--dim); font-size: 11px; font-weight: 650;
  letter-spacing: .04em; text-transform: uppercase;
}
.slot-hover-body { padding: 10px 12px 0; }
.slot-hover-title {
  font-weight: 680; font-size: 13.5px; letter-spacing: -0.02em;
  line-height: 1.3;
}
.slot-hover-file { font-size: 11px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.slot-hover-dl { margin: 8px 0 0; }
.slot-hover-dl > div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 4px 8px;
  font-size: 11.5px;
  padding: 2px 0;
}
.slot-hover-dl dt { color: var(--dim); font-weight: 600; }
.slot-hover-dl dd { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.slot-hover-caption {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.slot-hover-link { margin: 2px 0 6px; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.slot-hover-warn {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--yellow);
  background: var(--yellow-bg);
  border-radius: 8px;
  padding: 6px 8px;
}

/* Kompakt-Ansicht */
.cal-compact {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  grid-template-columns: none;
  grid-template-rows: none;
}
.cal-compact .cal-head {
  grid-template-columns: repeat(7, 1fr);
  flex-shrink: 0;
}
.cal-compact.cal-day .cal-head,
.cal-compact.cal-day .cal-compact-body {
  grid-template-columns: 1fr;
}
.cal-compact-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.cal-compact .compact-col {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
  min-width: 0;
  padding: 8px 6px 16px;
  overflow: visible;
  background-image: none;
  cursor: default;
  border-right: 1px solid var(--line);
}
.cal-compact .compact-col:last-child { border-right: 0; }
.cal-compact .compact-col.drop-target,
.cal-compact .cal-day-col.drop-target {
  outline: 1px dashed rgba(232,121,249,.55);
  outline-offset: -2px;
  background-color: rgba(232,121,249,.08);
}
.compact-empty {
  margin: 8px 2px;
  padding: 12px 8px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  background: rgba(255,255,255,.015);
}
.compact-pause {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 2px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--dim);
  cursor: copy;
}
.compact-pause::before,
.compact-pause::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-2);
}
.compact-pause.drop-pause {
  color: var(--accent);
}
.compact-pause.drop-pause::before,
.compact-pause.drop-pause::after {
  background: rgba(232,121,249,.55);
}
.cal-compact .post {
  position: relative;
  left: auto; right: auto; top: auto;
  height: 52px;
  min-height: 52px;
  width: auto;
  display: grid;
  grid-template-columns: 58px 32px minmax(0, 1fr) auto;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  gap: 2px 6px;
  padding: 5px 22px 5px 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.cal-compact .post .compact-time {
  grid-row: 1 / span 2;
  grid-column: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}
.cal-compact .post .post-thumb,
.cal-compact .post .compact-thumb {
  grid-row: 1 / span 2;
  grid-column: 2;
  width: 32px; height: 40px;
  border-radius: 5px;
  object-fit: cover;
  display: block;
}
.cal-compact .post .post-title {
  grid-row: 1;
  grid-column: 3 / span 2;
  font-size: 11.5px;
}
.cal-compact .post .compact-meta {
  grid-row: 2;
  grid-column: 3 / span 2;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cal-compact .post .compact-dur {
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}
.cal-compact .post .badge { margin-top: 0; flex-shrink: 0; }
.cal-compact .post .plats { flex-shrink: 0; }
.cal-compact .post .btn-pickup {
  position: absolute;
  top: 3px; right: 3px;
}
.cal-compact .post .btn-approve { display: none; }
.cal-compact .post .post-float { display: none !important; }
.cal-compact .post.drop-after {
  box-shadow: 0 3px 0 0 rgba(232,121,249,.7);
}
.cal-compact.cal-week .cal-head,
.cal-compact.cal-week .cal-compact-body {
  grid-template-columns: repeat(7, minmax(154px, 1fr));
  min-width: max(100%, 1078px);
}
.cal-compact.cal-week .post {
  height: 72px;
  min-height: 72px;
  grid-template-columns: minmax(0, 1fr) 34px;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  padding: 5px 20px 5px 6px;
  gap: 1px 6px;
}
.cal-compact.cal-week .post .compact-time {
  grid-row: 1;
  grid-column: 1;
  font-size: 11px;
}
.cal-compact.cal-week .post .post-thumb,
.cal-compact.cal-week .post .compact-thumb {
  grid-row: 1 / span 2;
  grid-column: 2;
  width: 34px;
  height: 42px;
}
.cal-compact.cal-week .post .post-title {
  grid-row: 2;
  grid-column: 1;
  font-size: 12px;
}
.cal-compact.cal-week .post .compact-meta {
  grid-row: 3;
  grid-column: 1 / span 2;
}


/* Popout-Mediathek */
body.is-popout .app, body.is-popout .app.has-rail {
  grid-template-columns: 1fr;
  grid-template-rows: 48px 1fr;
}
body.is-popout .sidebar { display: none; }
body.is-popout .topbar { grid-column: 1; grid-row: 1; padding-left: 12px; min-height: 48px; }
body.is-popout .main { grid-column: 1; grid-row: 2; padding: 0; }
body.is-popout .topbar-user { display: flex; }
body.is-popout .topbar-user > :not(.btn-preview-anim) { display: none; }
body.is-popout .page-head p { display: none; }
body.is-popout .media-tree { width: 168px; padding: 8px 6px 12px; }
body.is-popout .media-stage { padding: 10px 12px 14px; }
body.is-popout .btn-plan-sm { display: none; }

/* Mediathek-Ansichten */
.media-sched {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  margin-top: 5px;
}
.media-where, .media-next {
  font-size: 11px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.media-next { color: #e9d5ff; }
.media-item.is-draggable, .media-tile.is-draggable, .media-row.is-draggable { cursor: grab; }
.media-item.is-dragging-media, .media-tile.is-dragging-media, .media-row.is-dragging-media,
.is-dragging-media { opacity: .65; cursor: grabbing; }

.media-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.media-tile {
  display: flex; flex-direction: column;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}
.media-tile-thumb {
  width: 100%; height: 128px; object-fit: cover; background: var(--elev); display: block;
}
.media-tile-thumb.placeholder {
  display: grid; place-items: center;
  color: var(--dim); font-size: 11px; font-weight: 650;
  letter-spacing: .04em; text-transform: uppercase;
}
.media-tile-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.media-tile .media-flags { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; margin-top: 6px; }

.media-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.media-table th {
  text-align: left; font-size: 11px; font-weight: 650; color: var(--muted);
  letter-spacing: .02em; text-transform: uppercase;
  padding: 8px 8px; border-bottom: 1px solid var(--line);
  cursor: pointer; white-space: nowrap; user-select: none;
}
.media-table th:hover { color: var(--text); }
.media-table th.is-asc::after { content: " ↑"; color: var(--accent); }
.media-table th.is-desc::after { content: " ↓"; color: var(--accent); }
.media-table td {
  padding: 8px 8px; border-bottom: 1px solid var(--line);
  vertical-align: top; color: var(--text);
}
.media-td-name strong { display: block; font-size: 13px; }
.media-td-name .sendungsname-wrap { margin-bottom: 2px; }
.media-td-name .media-name { font-weight: 650; font-size: 13px; }
.media-row:hover { background: rgba(255,255,255,.04); }

.media-sched-tip {
  position: fixed; z-index: 80; max-width: 280px;
  background: #161320; border: 1px solid rgba(232,121,249,.28);
  border-radius: 10px; padding: 8px 10px;
  box-shadow: var(--shadow); pointer-events: none;
}
.media-sched-tip-head { font-weight: 650; font-size: 12.5px; margin-bottom: 4px; }
.media-sched-tip-acc { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.media-sched-tip ul { list-style: none; margin: 0; padding: 0; }
.media-sched-tip li { font-size: 11.5px; padding: 2px 0; color: var(--text); }
.media-sched-tip li span { color: var(--muted); }
.media-sched-tip li.is-past { color: var(--dim); }
.media-sched-tip li.is-past span { color: var(--dim); }

/* Sendeplan-Blitz und Fadenkreuz */
.post.is-flash {
  z-index: 8;
  animation: slot-blink 0.6s ease-in-out 5;
  outline: 2px solid #e879f9;
  box-shadow: 0 0 0 3px rgba(232,121,249,.45), 0 0 28px rgba(232,121,249,.55);
}
.cal-day-col.is-flash-col {
  box-shadow: inset 0 0 0 2px rgba(232,121,249,.35);
  background-image: linear-gradient(180deg, rgba(232,121,249,.07), transparent 40%, transparent 60%, rgba(232,121,249,.07));
}
.flash-cross {
  position: absolute; inset: 0; pointer-events: none; z-index: 7; overflow: hidden;
}
.flash-col-beam {
  position: absolute;
  background: linear-gradient(180deg, rgba(232,121,249,.18), rgba(232,121,249,.05) 40%, rgba(232,121,249,.05) 60%, rgba(232,121,249,.18));
  box-shadow: 0 0 22px rgba(232,121,249,.25);
}
.flash-row-left, .flash-row-right {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(232,121,249,.55));
  filter: drop-shadow(0 0 10px rgba(232,121,249,.55));
  transform-origin: right center;
  animation: flash-sweep-x 1.1s ease-out 1;
}
.flash-row-right {
  background: linear-gradient(270deg, transparent, rgba(232,121,249,.55));
  transform-origin: left center;
}
.flash-col-top, .flash-col-bottom {
  position: absolute;
  background: linear-gradient(180deg, transparent, rgba(232,121,249,.5));
  filter: drop-shadow(0 0 10px rgba(232,121,249,.5));
  transform-origin: center bottom;
  animation: flash-sweep-y 1.1s ease-out 1;
}
.flash-col-bottom {
  background: linear-gradient(0deg, transparent, rgba(232,121,249,.5));
  transform-origin: center top;
}
@keyframes flash-sweep-x {
  0% { transform: scaleX(0); opacity: 0; }
  18% { opacity: 1; }
  45% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
@keyframes flash-sweep-y {
  0% { transform: scaleY(0); opacity: 0; }
  18% { opacity: 1; }
  45% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}
@keyframes slot-blink {
  0%, 100% { filter: brightness(1); box-shadow: 0 0 0 0 rgba(232,121,249,0); }
  45% { filter: brightness(1.35); box-shadow: 0 0 0 3px #e879f9, 0 0 30px rgba(232,121,249,.8); }
}
.flash-cross.is-simple .flash-row-left,
.flash-cross.is-simple .flash-row-right,
.flash-cross.is-simple .flash-col-top,
.flash-cross.is-simple .flash-col-bottom { display: none; }
.post.is-flash-simple, .post.is-flash.is-flash-simple {
  animation: none;
  outline: 3px solid #e879f9;
  box-shadow: 0 0 0 4px rgba(232,121,249,.35);
}
@media (prefers-reduced-motion: reduce) {
  .post.is-flash { animation: none; outline: 3px solid #e879f9; box-shadow: 0 0 0 4px rgba(232,121,249,.35); }
  .flash-row-left, .flash-row-right, .flash-col-top, .flash-col-bottom { display: none; }
}

.ft-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 90; padding: 8px 16px; border-radius: 999px;
  background: rgba(22, 19, 32, .95);
  color: var(--text);
  border: 1px solid rgba(232, 121, 249, .4);
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  font-size: 13.5px; font-weight: 650;
  letter-spacing: -0.01em;
  pointer-events: none;
}
.ft-toast[hidden] { display: none !important; }
.ft-toast.has-action {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
}
.ft-toast-undo {
  border: 0;
  background: rgba(232, 121, 249, .22);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 750;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.ft-toast-undo:hover { background: rgba(232, 121, 249, .36); }


/* Titel & Text vorschlagen */
.suggest-box {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: 100%;
}
.btn-suggest-sm {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 7px; border: 1px solid rgba(96,165,250,.4);
  background: rgba(96,165,250,.12); color: var(--text);
  font-size: 11px; font-weight: 650;
}
.btn-suggest-sm:hover { background: rgba(96,165,250,.22); }
.btn-suggest-sm:disabled { opacity: .55; pointer-events: none; }
.badge.b-suggest {
  background: rgba(52,211,153,.16);
  color: #6ee7b7;
  border: 1px solid rgba(52,211,153,.3);
}
.suggest-status {
  font-size: 12px;
  font-weight: 620;
  color: var(--muted);
}
.suggest-status.is-pending { color: #fbbf24; }
.suggest-status.is-fail { color: #fda4af; }
.suggest-preview { font-size: 12.5px; color: var(--text); line-height: 1.4; }
.suggest-title { font-weight: 680; }
.suggest-caption { color: var(--muted); white-space: pre-wrap; }
.suggest-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.suggest-edit { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.suggest-label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 620; color: var(--muted); }
.suggest-title-input, .suggest-caption-input {
  width: 100%; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--text);
  padding: 6px 8px; font: inherit; font-size: 13px;
}
.suggest-error { font-size: 12px; color: #fda4af; }
.plan-suggest { margin-top: 10px; }
.media-tile .suggest-box { margin-top: 8px; }
.media-td-name .suggest-box { margin-top: 6px; }
.suggest-settings .field { margin-bottom: 12px; }


/* Monat, klickbare Pausen, Zuschneiden */
.cal-pause {
  position: absolute;
  left: 4px; right: 4px;
  top: var(--top, 0);
  height: var(--h, 12px);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 650;
  color: var(--dim);
  background: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,.03),
    rgba(255,255,255,.03) 4px,
    rgba(255,255,255,.07) 4px,
    rgba(255,255,255,.07) 8px
  );
  border: 1px dashed rgba(155,148,173,.35);
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
}
.cal-pause:hover, .cal-pause.drop-pause {
  color: var(--text);
  border-color: rgba(232,121,249,.6);
  background: rgba(232,121,249,.12);
}
.compact-pause, .month-pause { cursor: pointer; }
.compact-pause:hover, .month-pause:hover { color: var(--text); }

.pause-menu {
  position: fixed;
  z-index: 80;
  min-width: 200px;
  padding: 6px;
  border-radius: 12px;
  background: linear-gradient(180deg, #1a1724, #120f18);
  border: 1px solid rgba(232,121,249,.28);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.pause-menu[hidden] { display: none !important; }
.pause-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 620;
  cursor: pointer;
}
.pause-menu-item:hover { background: rgba(232,121,249,.14); }

.cut-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(251,191,36,.35);
  background: rgba(251,191,36,.12);
  color: #fbbf24;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}
.cut-icon { width: 11px; height: 11px; flex-shrink: 0; }
.cut-copy { color: var(--muted); font-size: 13.5px; line-height: 1.45; margin: 0 0 14px; }
.cut-actions { flex-wrap: wrap; }

.cal-month {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.cal-month-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 3;
  background: #120f18;
}
.cal-month-head .mhead {
  padding: 8px 8px 6px;
  font-size: 11px;
  font-weight: 680;
  color: var(--muted);
  text-align: center;
}
.cal-month-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(140px, auto);
  flex: 1;
}
.month-day {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 6px 8px;
  min-width: 0;
  background: rgba(255,255,255,.015);
}
.month-day.weekend { background: rgba(255,255,255,.03); }
.month-day.today { box-shadow: inset 0 0 0 1px rgba(232,121,249,.4); }
.month-day.is-out { opacity: .42; }
.month-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  margin-bottom: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.month-day-head .num { font-size: 13px; font-weight: 700; }
.month-day .month-empty { color: var(--dim); font-size: 11px; text-align: center; padding: 10px 0; }
.month-day .post {
  position: relative;
  left: auto; right: auto; top: auto;
  height: auto;
  min-height: 0;
  width: auto;
  margin: 0 0 4px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 4px 6px;
  padding: 4px 6px;
}
.month-day .compact-thumb, .month-day .post-thumb {
  width: 28px; height: 28px;
}
.cal.cal-month { --track-h: auto; }
body.is-month-view .zoom-controls { display: none; }

/* Vorschau-Serie: 5 Bilder im Sekundentakt */
.btn-preview-anim {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(232, 121, 249, .45);
  background: rgba(232, 121, 249, .16);
  color: #f5d0fe;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
.btn-preview-anim::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f0abfc;
  box-shadow: 0 0 0 3px rgba(232, 121, 249, .28);
  flex-shrink: 0;
}
.btn-preview-anim.is-on::before {
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .28);
  animation: ft-preview-pulse 1s ease-in-out infinite;
}
.btn-preview-anim.is-off {
  border-color: var(--line-2);
  background: rgba(255,255,255,.04);
  color: var(--muted);
}
.btn-preview-anim.is-off::before {
  background: #64748b;
  box-shadow: none;
}
@keyframes ft-preview-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
.ft-preview {
  position: relative;
  display: block;
  overflow: hidden;
  line-height: 0;
  background: var(--elev);
}
.ft-preview > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ft-preview-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 0 3px 3px;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
  pointer-events: none;
  z-index: 1;
}
.ft-preview-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  display: block;
  flex: 0 0 auto;
}
.ft-preview-dots i.on {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
  transform: scale(1.15);
}
.media-item .ft-preview {
  width: 88px;
  height: 50px;
  border-radius: 6px;
  flex-shrink: 0;
}
.media-tile .ft-preview {
  width: 100%;
  height: 128px;
  border-radius: 0;
}
.media-tile .ft-preview > img.media-tile-thumb,
.media-tile-thumb {
  width: 100%;
  height: 100%;
}
.media-table .ft-preview,
.media-td-thumb .ft-preview {
  width: 72px;
  height: 42px;
  border-radius: 5px;
}
.slot-hover .ft-preview {
  width: 240px;
  height: 135px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.pick-item .ft-preview {
  width: 40px;
  height: 28px;
  border-radius: 5px;
  flex-shrink: 0;
}
.post .ft-preview {
  width: 36px;
  height: 48px;
  border-radius: 5px;
  flex-shrink: 0;
}
.cal-compact .post .ft-preview.post-thumb,
.cal-compact .post .ft-preview.compact-thumb {
  width: 32px;
  height: 40px;
}
.cal-compact.cal-week .post .ft-preview.post-thumb,
.cal-compact.cal-week .post .ft-preview.compact-thumb {
  width: 34px;
  height: 42px;
}
.month-day .ft-preview,
.month-day .ft-preview.compact-thumb,
.month-day .ft-preview.post-thumb {
  width: 28px;
  height: 28px;
  border-radius: 3px;
}
/* Sehr kleine Kacheln: Punkte bleiben erkennbar */
.post .ft-preview-dots,
.pick-item .ft-preview-dots,
.month-day .ft-preview-dots {
  height: 6px;
  gap: 2px;
  padding: 0 2px 2px;
}
.post .ft-preview-dots i,
.pick-item .ft-preview-dots i,
.month-day .ft-preview-dots i {
  width: 3px;
  height: 3px;
}
.settings-preview-anim .btn-preview-anim {
  font-size: 13.5px;
  padding: 8px 14px 8px 12px;
}

/* Details-Spalte Vorschau */
.media-td-thumb { width: 84px; vertical-align: middle; }
.media-td-thumb .ft-preview,
.media-td-thumb .media-thumb { width: 72px; height: 42px; border-radius: 5px; }

/* Geisterlinie beim Ziehen auf die Zeitlinie */
.ft-ghost-line {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  height: 0;
  border-top: 2px solid #f0abfc;
  box-shadow: 0 0 10px rgba(232, 121, 249, .85);
  margin: 0;
  padding: 0;
}
.ft-ghost-line.is-queued { border-top-color: #4ade80; box-shadow: 0 0 10px rgba(74, 222, 128, .7); }
.ft-ghost-line.is-pause { border-top-color: #fbbf24; box-shadow: 0 0 10px rgba(251, 191, 36, .7); }
.ft-ghost-line.is-chip {
  border: 0;
  box-shadow: none;
  height: auto;
  width: auto !important;
}
.ft-ghost-time {
  position: absolute;
  left: 8px;
  top: 0;
  transform: translateY(-50%);
  background: #a21caf;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.45);
  white-space: nowrap;
  line-height: 1.2;
}
.ft-ghost-line.is-queued .ft-ghost-time { background: #15803d; }
.ft-ghost-line.is-pause .ft-ghost-time { background: #b45309; }
.ft-ghost-line.is-chip .ft-ghost-time {
  left: 0;
  transform: translate(0, -50%);
}

/* Vorschau-Bilder nicht als Datei aus dem Browser ziehen */
.ft-preview img,
img.media-thumb,
img.media-tile-thumb,
img.post-thumb,
img.slot-hover-thumb,
.pick-item img,
.media-td-thumb img {
  -webkit-user-drag: none;
  user-drag: none;
}

/* 2026-11-17: Löschen, Gelöscht, Konto-Ansicht, Sendeplan-Fenster */
.btn-media-del, .btn-media-remove, .btn-media-restore {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 24px; padding: 0 7px; border-radius: 7px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  color: var(--muted); font-size: 11.5px; font-weight: 560; white-space: nowrap;
}
.btn-media-del { width: 26px; padding: 0; }
.btn-media-del:hover { color: #fca5a5; border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.10); }
.btn-media-remove { color: #fca5a5; border-color: rgba(248,113,113,.35); }
.btn-media-remove:hover { background: rgba(248,113,113,.14); }
.btn-media-restore { color: #86efac; border-color: rgba(74,222,128,.35); }
.btn-media-restore:hover { background: rgba(74,222,128,.12); }
.media-td-actions { margin-top: 4px; }
.media-td-actions .media-flags { margin: 0; }
.media-del-dialog { max-width: 460px; }
.media-del-dialog p { margin: 8px 0; color: var(--muted); line-height: 1.45; }
.media-del-dialog .media-del-name { color: var(--text); font-weight: 620; word-break: break-word; }
.media-del-dialog .media-del-slots { color: #fcd34d; }
.media-del-dialog .dialog-actions { margin-top: 14px; display: flex; align-items: center; gap: 8px; }
.tree-row.tree-trash { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; opacity: .9; }
#media-note { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; }

.side-acct { cursor: pointer; border: 1px solid transparent; }
.side-acct:hover { background: rgba(255,255,255,.04); color: var(--text); }
.side-acct.is-active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(232,121,249,.14), rgba(232,121,249,.04));
  border-color: rgba(232,121,249,.22);
}
.side-acct-all .side-acct-name { font-weight: 620; }

.acct-filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 8px; padding: 6px 10px; border-radius: 9px;
  background: rgba(232,121,249,.08); border: 1px solid rgba(232,121,249,.25);
  font-size: 12.5px;
}
.acct-filter-bar[hidden] { display: none !important; }
.acct-filter-label, .acct-filter-hint { color: var(--muted); }
.acct-filter-all { margin-left: auto; color: var(--accent); font-weight: 600; }
.acct-filter-all:hover { text-decoration: underline; }

body.is-popout .rail { display: none; }
body.is-popout .topbar-main { flex-wrap: wrap; row-gap: 6px; }
.popout-kicker { font-size: 13.5px; font-weight: 600; letter-spacing: -0.02em; margin-right: 6px; white-space: nowrap; }
.acct.is-connected .st { background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.18); }

/* Jetzt-Linie und laufender Beitrag im Sendeplan */
.cal-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  z-index: 5;
  pointer-events: none;
}
.cal-now-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  border-top: 2px solid #f43f5e;
  box-shadow: 0 0 8px rgba(244, 63, 94, .4);
}
.cal-now-label {
  position: absolute;
  top: 0;
  left: 4px;
  transform: translateY(-50%);
  background: #f43f5e;
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.3;
  padding: 1px 6px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
  white-space: nowrap;
  z-index: 1;
}
.cal-timeline.cal-day .cal-now-label {
  left: 0;
  transform: translate(calc(-1 * var(--ruler-w) + 4px), -50%);
}
.cal-now-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 4px;
  pointer-events: none;
}
.cal-now-compact .cal-now-line { display: none; }
.cal-now-compact::before,
.cal-now-compact::after {
  content: "";
  flex: 1;
  border-top: 2px solid #f43f5e;
}
.cal-now-compact .cal-now-label {
  position: static;
  transform: none;
  flex-shrink: 0;
}

.heute-flag {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(232, 121, 249, .18);
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.month-day.today {
  box-shadow: inset 0 0 0 2px rgba(232, 121, 249, .7);
  background: rgba(232, 121, 249, .08);
}
.month-day.today .month-day-head .num { color: var(--accent); }
.dhead.today .heute-flag { margin-left: 4px; }
.dhead .heute-flag { margin-top: 2px; margin-left: 0; font-size: 8px; height: 14px; }

.post.is-onair {
  box-shadow: 0 0 0 1px rgba(244, 63, 94, .55), 0 0 14px rgba(244, 63, 94, .18);
  z-index: 4;
}
.post.is-onair .post-live,
.post-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 15px;
  padding: 0 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: #f43f5e;
  color: #fff;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.post-live::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px #fff;
}
.post-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
  pointer-events: none;
}
.post-progress > i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: #f43f5e;
}
.cal-timeline .post.is-tiny .post-live,
.cal-timeline .post.is-slim .post-live {
  display: inline-flex;
}
.cal-compact .post.is-onair,
.month-day .post.is-onair {
  box-shadow: 0 0 0 1px rgba(244, 63, 94, .55);
}

/* Ordner-Popup und vierspaltige Tagesansicht */
body.is-folder-solo .media-tree { display: none !important; }
body.is-folder-solo .mediathek-main,
body.is-folder-solo .media-stage { width: 100%; }
body.is-folder-solo .media-crumb { display: none; }

body.is-day-quad .zoom-controls { display: none; }
body.is-day-quad .cal-wrap { overflow: hidden; }
.cal.cal-timeline.cal-quad {
  min-height: 0;
  height: 100%;
}
.cal-timeline.cal-day.cal-quad .cal-head,
.cal-timeline.cal-day.cal-quad .cal-body {
  grid-template-columns: repeat(4, 1fr);
}
.cal-timeline.cal-quad .cal-day-col {
  padding-left: 38px;
  overflow: hidden;
}
.cal-quad-ruler {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 38px;
  border-right: 1px solid var(--line);
  background: rgba(16,14,24,.45);
  pointer-events: none;
  z-index: 1;
}
.cal-timeline.cal-quad .cal-tick {
  right: 4px;
  font-size: 9px;
}
.cal-timeline.cal-quad .cal-now-label {
  left: 2px;
  transform: translate(0, -50%);
}
.dhead.is-now-block .dow { color: #f43f5e; }

/* Kompakt: Jetzt-Marke am laufenden Beitrag statt Extra-Linie */
.cal-compact .post.is-onair { overflow: visible; }
.cal-now-onpost {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  z-index: 6;
  pointer-events: none;
}
.cal-now-onpost .cal-now-line {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 0;
  border-top: 0;
  border-left: 2px solid #f43f5e;
  box-shadow: 0 0 8px rgba(244, 63, 94, .4);
  height: auto;
}
.cal-now-onpost .cal-now-label {
  left: 5px;
  top: 0;
  transform: translateY(-50%);
}

.upload-pick { max-width: 520px; }
.upload-pick-list { list-style: none; margin: 10px 0 12px; padding: 0; max-height: 320px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.upload-pick-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: inherit; cursor: pointer;
}
.upload-pick-item:hover { border-color: rgba(232,121,249,.45); background: rgba(232,121,249,.1); }
.upload-pick-path { font-size: 12.5px; font-weight: 600; word-break: break-all; }
.upload-pick-meta { font-size: 11px; color: var(--muted); }
.upload-pick-cancel {
  border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px;
}
.upload-pick-cancel:hover { color: #fff; }
