/* Studio M Podcast – Gestaltung */
:root {
  --bg: #0d0d0f;
  --bg-2: #141417;
  --panel: #19191d;
  --panel-2: #212126;
  --line: #2c2c33;
  --text: #ece8e1;
  --muted: #9a968f;
  --accent: #f0b35a;
  --accent-ink: #1a1307;
  --rec: #ff4b3e;
  --ok: #6fcf8e;
  --warn: #f0b35a;
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
h1 { font-family: var(--serif); font-weight: 500; font-size: 34px; letter-spacing: -.01em; margin: 0 0 18px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin: 26px 0 12px; }
h2:first-child, .card > h2:first-of-type { margin-top: 0; }
[hidden] { display: none !important; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .02em; color: var(--text); text-decoration: none; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 4px rgba(255,75,62,.15); }

/* Formulare */
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 14px; }
label > input, label > select, label > textarea, label > .copy-row { margin-top: 6px; }
input, select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 15px; outline: none;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240,179,90,.15); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
input[type=range] { padding: 0; border: 0; background: none; accent-color: var(--accent); }
label.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 14px; cursor: pointer; }
label.check input { margin-top: 3px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.copy-row { display: flex; gap: 8px; }
.label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 12px; }
.alert { background: rgba(255,75,62,.1); border: 1px solid rgba(255,75,62,.35); color: #ffb3ad; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.flash { background: rgba(111,207,142,.1); border: 1px solid rgba(111,207,142,.35); color: #bfecc9; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.ok { color: var(--ok); } .warn { color: var(--warn); }
.small-link { font-size: 13px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 10px 16px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { border-color: #3c3c45; background: #28282e; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { background: #f5c173; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(255,75,62,.5); color: #ff8f86; background: transparent; }
.btn.tiny { padding: 4px 10px; font-size: 12px; border-radius: 7px; }
.btn.wide { width: 100%; }
.btn.big { padding: 14px 22px; font-size: 16px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { background: none; border: 0; color: var(--muted); padding: 7px 12px; border-radius: 7px; font: inherit; font-size: 13px; cursor: pointer; }
.seg button.active { background: var(--panel-2); color: var(--text); }
.seg.small button { padding: 4px 8px; font-size: 12px; }

/* Karten & Layout */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.narrow { max-width: 440px; width: 100%; }
.center-card { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.center-card .brand { margin-bottom: 22px; }
.container { max-width: 1240px; margin: 0 auto; padding: 28px 24px 60px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--bg-2); position: sticky; top: 0; z-index: 10; }
.topbar nav { display: flex; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.stack { display: grid; gap: 22px; }
.stack-sm { display: grid; gap: 8px; }
.empty { text-align: center; padding: 40px; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); }
.steps li { margin-bottom: 8px; }

/* Übersicht */
.session-list { display: grid; gap: 12px; }
.session-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; }
.session-row.past { opacity: .62; }
.sr-time { font-size: 13px; color: var(--accent); }
.sr-title { font-family: var(--serif); font-size: 20px; margin: 2px 0; }
.sr-meta { font-size: 13px; color: var(--muted); }
.sr-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Aufnahmen-Tabelle */
.rec { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.rec:first-of-type { border-top: 0; padding-top: 0; }
.rec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tracks { width: 100%; border-collapse: collapse; font-size: 13px; }
.tracks th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 6px; border-bottom: 1px solid var(--line); }
.tracks td { padding: 7px 6px; border-bottom: 1px solid #222228; vertical-align: middle; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 20px; background: var(--panel-2); color: var(--muted); margin-left: 4px; }
.danger-zone { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.danger-zone h2 { width: 100%; }

/* ---------- Gast: Landing ---------- */
.screen { min-height: 100vh; }
.landing { max-width: 720px; margin: 0 auto; padding: 28px 22px 60px; }
.landing-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 44px; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch button { background: none; border: 1px solid transparent; color: var(--muted); padding: 5px 9px; border-radius: 7px; cursor: pointer; font: inherit; font-size: 12px; letter-spacing: .06em; }
.lang-switch button.active { border-color: var(--line); color: var(--text); background: var(--panel); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 12px; color: var(--accent); margin: 0 0 10px; }
.landing-title { font-size: clamp(32px, 6vw, 52px); line-height: 1.08; margin-bottom: 12px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 28px; }
.when { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 18px; }
.when-time { font-family: var(--serif); font-size: 46px; line-height: 1; margin: 4px 0 8px; }
.when-sub { color: var(--muted); font-size: 14px; }
.when-side { border-left: 1px solid var(--line); padding-left: 18px; }
.when-host { font-size: 16px; margin-bottom: 10px; }
.countdown { display: inline-block; font-size: 13px; color: var(--accent); background: rgba(240,179,90,.08); padding: 4px 10px; border-radius: 20px; }
.countdown:empty { display: none; }
.when-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.mode-card { position: relative; display: grid; gap: 2px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); cursor: pointer; margin: 0; transition: border-color .15s; }
.mode-card input { position: absolute; opacity: 0; }
.mode-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240,179,90,.12); }
.mc-icon { font-size: 22px; }
.mc-title { color: var(--text); font-size: 15px; font-weight: 600; }
.mc-desc { color: var(--muted); font-size: 13px; }
.consent { border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 14px; }
.consent-text { max-height: 220px; overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px; font-size: 13px; color: #c9c5be; margin-bottom: 14px; }

/* ---------- Technik-Check ---------- */
.check-wrap { max-width: 900px; margin: 0 auto; padding: 28px 22px 60px; }
.check-wrap .brand { margin-bottom: 40px; }
.check-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.preview { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: none; }
.preview.has-video video { display: block; }
.preview.has-video .preview-audio { display: none; }
.preview-audio { font-size: 54px; opacity: .7; }
.meter { height: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin: -4px 0 18px; }
.meter.big { height: 12px; margin: 10px 0; }
.meter-bar { height: 100%; width: 0; background: linear-gradient(90deg, #6fcf8e, #c9d86a 70%, #f0b35a); transition: width .06s linear; }
.meter-bar.hot { background: var(--rec); }
.mode-toggle { margin-bottom: 16px; }
.is-guest .host-only, .is-host .guest-only { display: none !important; }

/* ---------- Studio ---------- */
body.in-studio { overflow: hidden; }
.studio { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.studio-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.st-title { font-family: var(--serif); font-weight: 500; font-size: 17px; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-center { display: flex; justify-content: center; }
.st-right { display: flex; justify-content: flex-end; gap: 10px; align-items: center; font-size: 13px; }
.conn, .upl { padding: 4px 10px; border-radius: 20px; background: var(--panel-2); color: var(--muted); }
.conn.connected { color: var(--ok); }
.conn.reconnecting, .conn.connecting { color: var(--warn); }
.conn.disconnected { color: #ff8f86; }
.upl.busy { color: var(--warn); }
.rec-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,75,62,.12); border: 1px solid rgba(255,75,62,.45); color: #ffb3ad; padding: 5px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }

.studio-main { position: relative; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.studio-main > .stage { flex: 1 1 auto; }
.studio-main > .prompter { flex: 0 0 auto; }
.studio-main[data-dock="side"] { flex-direction: row; }
.studio-main[data-dock="side"] .prompter { order: 2; height: auto; width: 40%; min-width: 320px; resize: horizontal; }
.studio-main[data-dock="full"] .prompter { position: absolute; inset: 12px; z-index: 5; height: auto; }

.stage { min-height: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); grid-auto-rows: 1fr; align-content: stretch; }
.tile { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 180px; display: flex; align-items: center; justify-content: center; transition: box-shadow .2s, border-color .2s; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; background: #000; }
.tile.has-video video { display: block; }
.tile.has-video .avatar { display: none; }
.tile.local video { transform: scaleX(-1); }
.tile.speaking { border-color: var(--ok); box-shadow: 0 0 0 2px rgba(111,207,142,.5); }
.avatar { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(140deg, #2b2b32, #1d1d22); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 34px; color: var(--accent); transition: box-shadow .2s; }
.tile.speaking .avatar { box-shadow: 0 0 0 6px rgba(111,207,142,.18), 0 0 0 12px rgba(111,207,142,.08); }
.tile-foot { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); padding: 4px 10px; border-radius: 8px; font-size: 13px; }
.tile-mic { display: none; }
.tile.muted .tile-mic { display: inline; }
.tile-q { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.tile[data-q="excellent"] .tile-q, .tile[data-q="good"] .tile-q { background: var(--ok); }
.tile[data-q="poor"] .tile-q { background: var(--warn); }
.tile[data-q="lost"] .tile-q { background: var(--rec); }
.tile.placeholder { border-style: dashed; background: transparent; }
.wait { display: grid; justify-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(240,179,90,.5); } 100% { box-shadow: 0 0 0 22px rgba(240,179,90,0); } }

.studio-controls { display: flex; justify-content: center; gap: 10px; padding: 12px; border-top: 1px solid var(--line); background: var(--bg-2); flex-wrap: wrap; }
.ctl { display: grid; justify-items: center; gap: 2px; min-width: 92px; padding: 9px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--text); cursor: pointer; font: inherit; }
.ctl:hover { background: var(--panel-2); }
.ctl-ico { font-size: 18px; line-height: 1.2; }
.ctl-lbl { font-size: 12px; color: var(--muted); }
.ctl.off { background: rgba(255,75,62,.12); border-color: rgba(255,75,62,.4); }
.ctl.rec .ctl-ico { color: var(--rec); }
.ctl.rec.active { background: var(--rec); border-color: var(--rec); }
.ctl.rec.active .ctl-ico, .ctl.rec.active .ctl-lbl { color: #fff; }
.ctl.active:not(.rec) { border-color: var(--accent); }
.ctl.leave:hover { border-color: rgba(255,75,62,.5); }
.ctl:disabled { opacity: .5; }

.peer-uploads { position: absolute; right: 18px; bottom: 92px; display: grid; gap: 6px; z-index: 6; }
.peer-chip { background: var(--panel-2); border: 1px solid var(--line); padding: 6px 12px; border-radius: 20px; font-size: 12px; }
.peer-chip.busy { color: var(--warn); }
.peer-chip.done { color: var(--ok); }
.peer-chip.failed { color: #ff8f86; }
.audio-unlock { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 20; background: var(--accent); color: var(--accent-ink); border: 0; padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: #26262c; border: 1px solid var(--line); padding: 11px 18px; border-radius: 10px; font-size: 14px; z-index: 30; box-shadow: 0 10px 40px rgba(0,0,0,.5); max-width: 90vw; }
body.recording .studio-top { box-shadow: inset 0 -2px 0 var(--rec); }

/* ---------- Teleprompter ---------- */
.prompter { position: relative; height: 42vh; min-height: 200px; display: grid; grid-template-rows: auto 1fr; background: #070708; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; resize: vertical; }
.pr-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--bg-2); flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pr-btn { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 34px; height: 30px; cursor: pointer; font-size: 13px; }
.pr-btn:hover { border-color: var(--accent); }
.pr-bar select { width: auto; max-width: 220px; padding: 5px 8px; font-size: 12px; }
.pr-pos { min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
.pr-range { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; }
.pr-range input { width: 90px; margin: 0; }
.pr-viewport { position: relative; overflow-y: auto; scrollbar-width: thin; }
.pr-viewport::before, .pr-viewport::after { content: ''; position: sticky; display: block; left: 0; right: 0; height: 40px; z-index: 2; pointer-events: none; }
.pr-viewport::before { top: 0; background: linear-gradient(#070708, rgba(7,7,8,0)); margin-bottom: -40px; }
.pr-viewport::after { bottom: 0; background: linear-gradient(rgba(7,7,8,0), #070708); margin-top: -40px; }
.pr-focus { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed rgba(240,179,90,.35); pointer-events: none; z-index: 1; }
.pr-focus::before { content: '▶'; position: absolute; left: 8px; top: -11px; color: var(--accent); font-size: 14px; }
.pr-text { max-width: 980px; margin: 0 auto; padding-left: 44px; padding-right: 44px; font-size: 40px; line-height: 1.45; color: #f4f1ea; font-weight: 500; }
.pr-text h3 { font-size: .5em; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 1.6em 0 .5em; font-weight: 600; opacity: .7; }
.pr-text h3.current { opacity: 1; }
.pr-text p { margin: 0 0 .8em; }
.pr-text .cue { color: #8d8a84; font-style: italic; font-size: .7em; }
.pr-empty { color: var(--muted); font-size: 18px; }
.pr-editor { display: grid; grid-template-rows: 1fr auto; padding: 10px; gap: 8px; min-height: 0; }
.pr-editor textarea { height: 100%; min-height: 160px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
.pr-editor .actions { margin-top: 0; justify-content: flex-end; }
.pr-editor .actions .hint { margin: 0 auto 0 0; }

/* ---------- Responsiv ---------- */
@media (max-width: 900px) {
  .grid-2, .check-card { grid-template-columns: 1fr; }
  .session-row { flex-direction: column; align-items: flex-start; }
  .sr-actions { justify-content: flex-start; }
  .studio-main[data-dock="side"] { flex-direction: column; }
  .studio-main[data-dock="side"] .prompter { order: 0; height: 42vh; width: auto; min-width: 0; }
}
@media (max-width: 640px) {
  .row, .mode-cards, .when { grid-template-columns: 1fr; }
  .when-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
  .stage { grid-template-columns: 1fr; }
  .ctl { min-width: 64px; padding: 8px 10px; }
  .st-title { display: none; }
  .studio-top { grid-template-columns: auto 1fr auto; }
  h1 { font-size: 28px; }
}

/* ---------- v1.1: Session-Layout, Cover, Hilfe ---------- */
.container.wide { max-width: 1640px; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; }
.subnav a { color: var(--muted); text-decoration: none; font-size: 13px; padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); }
.subnav a:hover { color: var(--text); border-color: #3c3c45; }
.grid-2.stretch { align-items: stretch; }
.grid-2.section { margin-top: 22px; }
.flex-col { display: flex; flex-direction: column; }
.flex-col textarea.grow { flex: 1 1 auto; min-height: 280px; }
.actions.end { justify-content: flex-end; }
.hint.tight { margin: 6px 0 0; }
label.check.small { font-size: 13px; margin: 8px 0 0; color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.material { align-items: start; }
.material input[type=file] { padding: 8px; font-size: 13px; }
.cover-pick { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.cover-thumb { width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--bg-2); border: 1px dashed var(--line); display: flex; align-items: center; justify-content: center; }
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cover-thumb span { font-size: 11px; color: var(--muted); text-align: center; }
.sr-cover { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 10px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.sr-cover:empty { display: none; }
.sr-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.session-row .sr-main { flex: 1 1 auto; }
dialog.help { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; max-width: 560px; width: calc(100% - 32px); position: relative; }
dialog.help::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
dialog.help .close { position: absolute; top: 14px; right: 14px; }
dialog.help h2 { margin-top: 22px; }
dialog.help h2:first-of-type { margin-top: 0; }
dialog.help .steps li { margin-bottom: 10px; }
dialog.help .steps strong { color: var(--text); }

/* Einladungsseite mit Cover */
.landing-hero { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center; margin-bottom: 28px; }
.landing-hero .lead { margin-bottom: 0; }
.hero-cover { width: 200px; height: 200px; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06); }
.hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.landing-hero.no-cover { grid-template-columns: 1fr; }
.brand-cover { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.tile.placeholder .wait-cover { width: 120px; height: 120px; border-radius: 14px; object-fit: cover; opacity: .9; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
@media (max-width: 1000px) { .container.wide .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .landing-hero { grid-template-columns: 1fr; gap: 18px; }
  .hero-cover { width: 160px; height: 160px; }
}

/* v1.2: Einladungsseite zweispaltig */
.landing { max-width: 1240px; }
.landing-head { margin-bottom: 32px; }
.landing-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.landing-grid .landing-hero { grid-template-columns: 168px 1fr; gap: 24px; }
.landing-grid .hero-cover { width: 168px; height: 168px; }
.landing-grid .landing-hero.no-cover { grid-template-columns: 1fr; }
.landing-grid .landing-title { font-size: clamp(30px, 3.2vw, 44px); }
.landing-grid .when { margin-bottom: 0; }
.landing-form .consent-text { max-height: 190px; }
.when-side #whenAgreedBox { margin-bottom: 10px; }
@media (max-width: 980px) {
  .landing { max-width: 720px; }
  .landing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .landing-grid .landing-hero { grid-template-columns: 1fr; }
  .landing-grid .hero-cover { width: 140px; height: 140px; }
}

/* ---------- v1.3: Bedienleiste, Jingles, Countdown, Host-Layout ---------- */
.studio-controls { align-items: stretch; gap: 14px; }
.ctl-group { display: flex; gap: 8px; align-items: stretch; }
.ctl-group + .ctl-group { padding-left: 14px; border-left: 1px solid var(--line); }
.rec-mode { display: grid; align-content: center; gap: 4px; justify-items: center; }
.rec-mode .ctl-lbl { font-size: 11px; }
.rec-mode .seg button { white-space: nowrap; }
.rec-mode.locked { opacity: .55; pointer-events: none; }

.jingles { align-items: stretch; }
.pad { position: relative; display: flex; }
.pad-play {
  position: relative; overflow: hidden; width: 92px; display: grid; align-content: center; justify-items: start; gap: 2px;
  padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  cursor: pointer; font: inherit; text-align: left;
}
.pad-play:hover { border-color: var(--accent); }
.pad-key { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pad-name { font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; z-index: 1; }
.pad-cd { position: absolute; top: 6px; right: 24px; font-size: 11px; opacity: .8; }
.pad-prog { position: absolute; left: 0; bottom: 0; height: 100%; width: calc(var(--p, 0) * 100%); background: rgba(240,179,90,.22); pointer-events: none; }
.pad.is-empty .pad-play { border-style: dashed; background: transparent; }
.pad.is-empty .pad-name { color: var(--muted); font-weight: 500; }
.pad.loading .pad-play { opacity: .6; }
.pad.playing .pad-play { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(240,179,90,.35); }
.pad-edit { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; line-height: 1; padding: 0; z-index: 2; }
.pad-edit:hover { color: var(--text); background: var(--panel-2); }
.pad-vol { display: grid; align-content: center; gap: 4px; margin: 0; }
.pad-vol .ctl-lbl { font-size: 11px; }
.pad-vol input { width: 80px; }
.jingle-dialog label { margin-bottom: 12px; }

/* Aufnahme-Uhr: gut sichtbar, mit geplanter Dauer */
.rec-pill { font-size: 15px; padding: 6px 16px; }
.rec-time { font-variant-numeric: tabular-nums; font-size: 17px; }
.rec-plan { opacity: .6; font-weight: 500; }
.rec-kind { font-weight: 500; opacity: .75; font-size: 12px; }
.rec-kind:empty { display: none; }
.rec-pill.late { background: rgba(240,179,90,.15); border-color: rgba(240,179,90,.6); color: #ffd79c; }
.rec-pill.over { background: var(--rec); border-color: var(--rec); color: #fff; }
.rec-pill.over .rec-dot { background: #fff; }
.st-center { gap: 10px; align-items: center; }
.cd-pill { background: rgba(240,179,90,.15); border: 1px solid rgba(240,179,90,.6); color: #ffd79c; padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Countdown beim Gast */
.cd-overlay { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(8,8,10,.72); backdrop-filter: blur(6px); pointer-events: none; }
.cd-label { font-size: 18px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.cd-num { font-family: var(--serif); font-size: min(38vh, 300px); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; animation: cdpop 1s ease-out infinite; }
.cd-overlay.go .cd-num { font-size: min(16vh, 120px); color: var(--ok); animation: none; }
@keyframes cdpop { 0% { transform: scale(1.12); opacity: .4; } 25% { transform: scale(1); opacity: 1; } 100% { transform: scale(.96); opacity: .9; } }

/* Host: Gast groß in der Mitte unter dem Teleprompter, eigenes Bild klein links daneben */
.is-host .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr); grid-auto-rows: minmax(0, 1fr); }
.is-host .stage .tile { grid-column: 2; }
.is-host .stage .tile.local { grid-column: 1; grid-row: 1; align-self: start; justify-self: end; width: min(100%, 260px); min-height: 0; aspect-ratio: 16 / 9; }
.is-host .stage .tile.local .avatar { width: 54px; height: 54px; font-size: 20px; }
.is-host .stage .tile.local .tile-foot { left: 6px; bottom: 6px; font-size: 11px; padding: 2px 8px; }
.is-host .stage .tile:not(.local) { height: 100%; max-width: 100%; aspect-ratio: 16 / 9; justify-self: center; min-height: 0; }
@media (max-width: 900px) {
  .is-host .stage { grid-template-columns: 1fr; }
  .is-host .stage .tile, .is-host .stage .tile.local { grid-column: 1; grid-row: auto; width: 100%; justify-self: stretch; }
  .ctl-group + .ctl-group { padding-left: 0; border-left: 0; }
}

/* Pegelanzeige (Host) */
.meters { display: grid; gap: 4px; min-width: 210px; }
.meters:empty { display: none; }
.mrow { display: grid; grid-template-columns: 54px 1fr 12px; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); }
.mrow .mname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbar { position: relative; height: 8px; border-radius: 3px; overflow: hidden;
  background: linear-gradient(90deg, #3fae67 0%, #6fcf8e 60%, #e3c75a 80%, #f0a05a 90%, #ff4b3e 95%, #ff4b3e 100%); }
.mcover { position: absolute; top: 0; right: 0; bottom: 0; background: #26262c; width: 100%; }
.mpeak { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; opacity: .85; left: 0; }
.mtick { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(0,0,0,.45); }
.mclip { width: 10px; height: 10px; border-radius: 50%; background: #3a2a2a; border: 1px solid #553; }
.mclip.on { background: var(--rec); box-shadow: 0 0 6px var(--rec); border-color: var(--rec); }
.mrow.quiet .mname::after { content: ' ↓'; color: var(--warn); }
form.inline { display: inline-flex; margin: 0; }
.btn.icon { padding: 10px 12px; }
.btn.danger-hover:hover { border-color: rgba(255,75,62,.6); color: #ff8f86; }

/* kompaktere Bedienleiste, damit alles in eine Zeile passt */
.studio-controls { padding: 10px 12px; gap: 10px; }
.studio-controls .ctl { min-width: 78px; padding: 8px 10px; }
.studio-controls .ctl.rec { min-width: 124px; }
.ctl-group + .ctl-group { padding-left: 10px; }
.pad-play { width: 82px; padding: 7px 9px; }
.jingles { gap: 6px; }
.pad-vol input { width: 70px; }

/* Übersicht: Aktionen bleiben immer in einer Zeile, der Text bricht früher um */
.session-row .sr-main { flex: 1 1 auto; min-width: 0; }
.session-row .sr-title, .session-row .sr-meta { overflow-wrap: anywhere; }
.session-row .sr-actions { flex: 0 0 auto; flex-wrap: nowrap; }
@media (max-width: 900px) { .session-row .sr-actions { flex-wrap: wrap; } }

/* v1.5: Abschluss-Screen, Hinweis-Banner */
.end-card { text-align: center; max-width: 480px; }
.end-card .brand { margin-bottom: 18px; }
.end-icon { font-size: 44px; line-height: 1; margin: 6px 0 10px; }
.end-card h1 { font-size: 30px; margin-bottom: 10px; }
.end-text { font-size: 16px; color: var(--text); margin: 0 0 16px; }
.end-card.waiting h1 { color: var(--warn); }
.end-card.waiting { border-color: rgba(240,179,90,.55); box-shadow: 0 0 0 4px rgba(240,179,90,.08); }
.end-card.done h1, .end-card.done .end-icon { color: var(--ok); }
.end-card.failed h1 { color: #ff8f86; }
.end-pct { font-family: var(--serif); font-size: 40px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.end-card.done .end-pct { font-family: var(--font); font-size: 15px; color: var(--ok); }
.end-kinds { list-style: none; padding: 0; margin: 8px 0 0; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.end-kinds li.ok { color: var(--ok); }
.end-card .hint { text-align: center; }
.end-card .actions { justify-content: center; }
.backup { text-align: left; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.backup summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.backup .stack-sm { margin-top: 10px; }
.banner { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 50; background: rgba(240,179,90,.16); border: 1px solid rgba(240,179,90,.6); color: #ffd79c; padding: 9px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; backdrop-filter: blur(8px); max-width: 92vw; text-align: center; }
.banner.ok { background: rgba(111,207,142,.14); border-color: rgba(111,207,142,.55); color: #bfecc9; }
#uplBanner { top: auto; bottom: 96px; }

/* v1.6: Download-Spalte */
.tracks td.dl { white-space: nowrap; }
.tracks td.dl .btn + .btn { margin-left: 4px; }
.hint-inline { font-size: 12px; color: var(--muted); margin-left: 6px; cursor: help; border-bottom: 1px dotted var(--muted); }

/* v1.7: Hoch- und Quadratformat */
.preview.fmt-crop { height: min(56vh, 520px); width: auto; max-width: 100%; justify-self: center; margin: 0 auto; }
.tile.portrait video, .tile.square video { object-fit: contain; }
.is-host .stage .tile:not(.local) { aspect-ratio: var(--ar, 16 / 9); }
.is-host .stage .tile.local { aspect-ratio: var(--ar, 16 / 9); }
.is-host .stage .tile.local.portrait { width: min(100%, 150px); }
.is-host .stage .tile.local.square { width: min(100%, 190px); }
