/* PodVision – mørkt biograf-tema. Layout: lærredet i midten, scenebånd og tidslinje under, sidepanel til højre (stables på mobil). */
:root {
  --bg: #0b0d12;          /* salens mørke, let blåligt */
  --surface: #12161f;
  --surface-2: #1a1f2b;
  --line: #262d3b;
  --fg: #ece7dc;          /* lærredshvid, varm */
  --muted: #9198a6;
  --accent: #e3a857;      /* projektorlys */
  --accent-ink: #1c1306;
  --accent-soft: rgba(227, 168, 87, .14);
  --danger: #e57b6a;
  --ok: #86c9a0;
  --screen: #050608;

  --f-display: "Libre Caslon Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r: 10px;
  --gut-l: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 var(--f-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ambient {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60vw 40vh at 50% -10%, rgba(227, 168, 87, .10), transparent 70%),
    radial-gradient(40vw 30vh at 100% 100%, rgba(80, 110, 160, .08), transparent 70%);
}
main, .topbar { position: relative; z-index: 1; }

/* ---------- topbar ---------- */
.topbar { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); }
.topbar-inner { display: flex; align-items: center; gap: 16px; padding: 10px var(--gut-r) 10px var(--gut-l); max-width: 1500px; margin: 0 auto; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; }
.brand-mark { width: 22px; height: 22px; border-radius: 5px; background: var(--accent); clip-path: polygon(18% 10%, 92% 50%, 18% 90%); }
.brand-name { font-family: var(--f-display); font-size: 1.5rem; letter-spacing: .01em; }
.proj-name { color: var(--muted); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.proj-name::before { content: "/"; margin-right: 12px; color: var(--line); }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.status-chip { font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; white-space: nowrap; }
.status-chip::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 7px; animation: pulse 1.4s infinite; vertical-align: 1px; }
@keyframes pulse { 50% { opacity: .3; } }

.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 6px; display: grid; min-width: 210px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); z-index: 60; }
.menu-pop button { text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 6px; cursor: pointer; }
.menu-pop button:hover { background: var(--accent-soft); }

/* ---------- knapper og felter ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); padding: 9px 16px; cursor: pointer; font-weight: 700; font-size: .95rem; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: .85rem; }
.btn.big { padding: 14px 20px; font-size: 1.05rem; width: 100%; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.input:focus { border-color: var(--accent); outline: none; }
.fine { color: var(--muted); font-size: .85rem; margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: var(--accent); margin: 0; font-weight: 700; }

/* ---------- forside ---------- */
.home-inner { max-width: 1180px; margin: 0 auto; padding: 40px var(--gut-r) 64px var(--gut-l); display: grid; gap: 32px; }
.home-hero { max-width: 760px; display: grid; gap: 12px; }
.home-hero h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.3rem, 6vw, 4.2rem); line-height: 1.02; margin: 0; text-wrap: balance; }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 62ch; margin: 0; }
.home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.side-col { display: grid; gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 14px; }
.card h2 { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; margin: 0; }
.card p { margin: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.drop { border: 1.5px dashed var(--line); border-radius: 12px; padding: 28px 16px; display: grid; justify-items: center; gap: 6px; text-align: center; cursor: pointer; background: var(--bg); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.has-file { border-style: solid; border-color: var(--accent); }
.drop-icon { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--accent); position: relative; }
.drop-icon::after { content: ""; position: absolute; left: 12px; top: 8px; border-left: 11px solid var(--accent); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.drop-title { font-weight: 700; overflow-wrap: anywhere; }
.drop-hint { color: var(--muted); font-size: .85rem; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; font-size: .88rem; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.check input { margin-top: 4px; accent-color: var(--accent); }
.more { border-top: 1px solid var(--line); padding-top: 10px; }
.more summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.more[open] { display: grid; gap: 12px; }
.form-error { color: var(--danger); background: rgba(229, 123, 106, .1); border: 1px solid rgba(229, 123, 106, .35); border-radius: 8px; padding: 10px 12px; }
.saved-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.saved-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.saved-list .meta { flex: 1; min-width: 0; }
.saved-list .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.saved-list .meta span { color: var(--muted); font-size: .8rem; }
.saved-empty { color: var(--muted); font-size: .9rem; }
.free-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); font-size: .92rem; }
.free-list b { color: var(--fg); }

/* ---------- arbejder ---------- */
.work { padding: 48px var(--gut-r) 64px var(--gut-l); }
.work-inner { max-width: 720px; margin: 0 auto; }
.work-inner h2 { font-size: 2rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.steps li { color: var(--muted); padding-left: 26px; position: relative; }
.steps li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); }
.steps li.active { color: var(--fg); font-weight: 700; }
.steps li.active::before { border-color: var(--accent); background: var(--accent); animation: pulse 1.2s infinite; }
.steps li.done { color: var(--fg); }
.steps li.done::before { border-color: var(--ok); background: var(--ok); }
.steps li.skip { text-decoration: line-through; opacity: .5; }
.bar { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #b9813c, var(--accent)); transition: width .3s; }
.bar-text { color: var(--muted); font-family: var(--f-mono); font-size: .85rem; margin: 0; font-variant-numeric: tabular-nums; }
.live { max-height: 220px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: .92rem; color: var(--muted); display: grid; gap: 4px; }
.live:empty { display: none; }
.live p { margin: 0; }
.live time { font-family: var(--f-mono); color: var(--accent); font-size: .8rem; margin-right: 8px; }
.work-actions { display: flex; justify-content: flex-end; }

/* ---------- afspiller ---------- */
.player { padding-block: 18px 40px; }
.player-grid { max-width: 1500px; margin: 0 auto; padding-left: var(--gut-l); padding-right: var(--gut-r); display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.theatre { display: grid; gap: 14px; min-width: 0; }
.style-switch { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.style-switch button { flex: 1; background: none; border: 0; padding: 8px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); white-space: nowrap; font-weight: 700; font-size: .9rem; }
.style-switch button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.notice { background: var(--accent-soft); border: 1px solid rgba(227, 168, 87, .35); border-radius: 10px; padding: 10px 14px; font-size: .92rem; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.notice .btn { margin-left: auto; }

.stage-wrap { background: var(--screen); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .02); display: flex; flex-direction: column; }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; background: var(--screen); container-type: inline-size; }
.layer { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.layer.on { opacity: 1; z-index: 1; }
.stage-wrap.pseudo-fs { position: fixed; inset: 0; z-index: 1000; border-radius: 0; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.stage-wrap:fullscreen, .stage-wrap.pseudo-fs { border-radius: 0; border: 0; }
.stage-wrap:fullscreen .stage, .stage-wrap.pseudo-fs .stage { flex: 1; aspect-ratio: auto; height: auto; min-height: 0; }
.stage-wrap:-webkit-full-screen .stage { flex: 1; aspect-ratio: auto; }

/* billedramme */
.frame { position: absolute; inset: 0; }
.frame .bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(30px) brightness(.35) saturate(1.1); }
.frame .pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.frame .pic.cover { object-fit: cover; }
.shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .0) 45%, rgba(0, 0, 0, .78) 100%); pointer-events: none; }
.lower { position: absolute; left: 4%; right: 4%; bottom: 7%; display: grid; gap: .6cqw; z-index: 2; }
.lower .eyebrow { font-size: max(10px, 1.05cqw); color: var(--accent); }
.lower h2 { font-family: var(--f-display); font-weight: 400; margin: 0; font-size: clamp(18px, 3.6cqw, 56px); line-height: 1.05; text-shadow: 0 2px 20px rgba(0, 0, 0, .7); text-wrap: balance; max-width: 30ch; }
.kw { display: flex; flex-wrap: wrap; gap: .5cqw; }
.kw span { font-size: max(10px, 1.1cqw); padding: .25cqw .8cqw; border-radius: 99px; background: rgba(11, 13, 18, .6); border: 1px solid rgba(236, 231, 220, .2); backdrop-filter: blur(4px); white-space: nowrap; }
.kw span.y { color: var(--accent); border-color: rgba(227, 168, 87, .5); font-family: var(--f-mono); }
.credit { position: absolute; right: 1.2cqw; top: 1.2cqw; max-width: 46%; font-size: max(9px, .85cqw); line-height: 1.35; background: rgba(5, 6, 8, .72); padding: .5cqw .8cqw; border-radius: 6px; color: #c9c3b6; z-index: 3; }
.credit a { color: var(--fg); }
.credit.ai { color: var(--accent); }
.loading-card, .title-card { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 6%; background:
  radial-gradient(70% 60% at 50% 40%, #1d2433 0%, var(--screen) 80%); }
.title-card .tc-inner { display: grid; gap: 1.4cqw; justify-items: center; }
.title-card h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(22px, 5cqw, 72px); margin: 0; line-height: 1.05; text-wrap: balance; }
.title-card .rule { width: 8cqw; height: 2px; background: var(--accent); }
.title-card p { color: var(--muted); max-width: 60ch; margin: 0; font-size: max(12px, 1.4cqw); }
.title-card .retry { pointer-events: auto; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* slides */
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: 1.05fr 1fr; background: linear-gradient(135deg, #141924 0%, #0b0e14 100%); }
.slide-text { padding: 6% 4% 6% 6%; display: flex; flex-direction: column; justify-content: center; gap: 1.6cqw; min-width: 0; }
.slide-text h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(18px, 3.8cqw, 60px); line-height: 1.04; margin: 0; text-wrap: balance; }
.slide-text ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .9cqw; }
.slide-text li { font-size: max(11px, 1.55cqw); padding-left: 1.8cqw; position: relative; color: #d8d2c6; }
.slide-text li::before { content: ""; position: absolute; left: 0; top: .7em; width: .8cqw; height: 2px; background: var(--accent); }
.slide-text li b { color: var(--fg); }
.slide-text .desc { color: var(--muted); font-size: max(10px, 1.25cqw); margin: 0; font-style: italic; }
.slide-num { position: absolute; left: 6%; bottom: 5%; font-family: var(--f-mono); font-size: max(9px, .95cqw); color: var(--muted); }
.slide figure { margin: 0; position: relative; overflow: hidden; background: #000; }
.slide figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide figure .credit { top: auto; bottom: 1.2cqw; max-width: 90%; }
.slide .year-badge { position: absolute; top: 5%; left: 6%; font-family: var(--f-mono); color: var(--accent); font-size: max(10px, 1.2cqw); letter-spacing: .1em; }

/* animation */
.kb { position: absolute; inset: 0; overflow: hidden; }
.kb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: var(--ox, 50%) var(--oy, 50%); animation: kb var(--dur, 30s) linear forwards; }
@keyframes kb { from { transform: scale(1.04) translate(var(--fx, 0), var(--fy, 0)); } to { transform: scale(1.22) translate(var(--tx, 0), var(--ty, 0)); } }
.anim-text { position: absolute; left: 5%; bottom: 8%; right: 30%; display: grid; gap: 1cqw; z-index: 2; }
.anim-text .yr { font-family: var(--f-mono); color: var(--accent); font-size: clamp(14px, 3cqw, 44px); opacity: 0; animation: rise .9s .2s ease forwards; letter-spacing: .05em; }
.anim-text h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(20px, 4.4cqw, 66px); margin: 0; line-height: 1.02; opacity: 0; animation: rise 1s .5s ease forwards; text-shadow: 0 3px 24px rgba(0, 0, 0, .7); text-wrap: balance; }
.anim-text .kw span { opacity: 0; animation: rise .7s ease forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.minimap { position: absolute; right: 1.5cqw; bottom: 1.5cqw; width: 26%; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; z-index: 4; border: 1px solid rgba(236, 231, 220, .25); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
.minimap .leaflet-control-attribution { font-size: 8px; }

/* personkort */
.person { position: absolute; left: 1.4cqw; top: 1.4cqw; width: min(320px, 34%); z-index: 5; background: rgba(18, 22, 31, .9); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: max(11px, .95cqw); animation: rise .6s ease; }
.person img { width: 64px; height: 80px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.person .p-body { min-width: 0; display: grid; gap: 2px; align-content: start; }
.person .p-kicker { font-size: .72em; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.person h3 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.35em; line-height: 1.1; }
.person .p-life { font-family: var(--f-mono); color: var(--muted); font-size: .85em; }
.person p { margin: 2px 0 0; color: #cfc9bd; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.person a { font-size: .85em; }
.person .p-close { position: absolute; right: 4px; top: 2px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 4px; }

.subs { position: absolute; left: 50%; transform: translateX(-50%); bottom: 2.4cqw; z-index: 6; max-width: 86%; text-align: center; font-size: clamp(13px, 1.9cqw, 30px); line-height: 1.3; background: rgba(0, 0, 0, .74); padding: .35em .7em; border-radius: 6px; }
.stage.has-subs .lower, .stage.has-subs .anim-text { bottom: calc(7% + 4.6cqw); }
.big-play { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; border: 0; background: rgba(227, 168, 87, .92); z-index: 7; cursor: pointer; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.big-play span { position: absolute; left: 33px; top: 25px; border-left: 26px solid var(--accent-ink); border-top: 17px solid transparent; border-bottom: 17px solid transparent; }

.controls { display: grid; gap: 6px; padding: 10px 14px 12px; background: linear-gradient(180deg, #0d1016, #0a0c11); border-top: 1px solid var(--line); }
.seek-row { display: flex; align-items: center; gap: 10px; }
.tc { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 44px; }
.tc:last-child { text-align: right; }
#seek { flex: 1; accent-color: var(--accent); min-width: 0; }
.btn-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.grow { flex: 1; }
.ctl { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; cursor: pointer; font-family: var(--f-mono); font-size: .82rem; }
.ctl:hover { border-color: var(--muted); }
.ctl.play { width: 46px; height: 38px; background: var(--accent); border-color: var(--accent); position: relative; }
.ctl.play::before { content: ""; position: absolute; left: 18px; top: 11px; border-left: 13px solid var(--accent-ink); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.ctl.play.playing::before { left: 16px; top: 11px; width: 4px; height: 16px; border: 0; background: var(--accent-ink); box-shadow: 9px 0 0 var(--accent-ink); }
.ctl.toggle[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.ctl-select { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-family: var(--f-mono); font-size: .82rem; }

/* scenebånd */
.strip-label { display: flex; justify-content: space-between; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 6px; }
.strip-label .hint { text-transform: none; letter-spacing: 0; }
.strip-scroll, .years-scroll { overflow-x: auto; border-radius: 8px; }
.strip { position: relative; display: flex; min-width: 100%; height: 58px; gap: 2px; }
.strip .sc { position: relative; flex: 0 0 auto; min-width: 8px; background: var(--surface-2); border: 0; padding: 6px 7px; text-align: left; cursor: pointer; overflow: hidden; border-radius: 4px; display: grid; align-content: space-between; }
.strip .sc:hover { background: #232a38; }
.strip .sc.cur { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.strip .sc b { font-size: .74rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.strip .sc i { font-style: normal; font-family: var(--f-mono); font-size: .68rem; color: var(--muted); }
.strip .sc .thumb { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .18; }
.playhead { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--accent); z-index: 3; pointer-events: none; box-shadow: 0 0 10px var(--accent); }

.years { position: relative; height: 64px; min-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.years .axis { position: absolute; left: 16px; right: 16px; top: 34px; height: 1px; background: var(--line); }
.years .ym { position: absolute; top: 12px; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; background: none; border: 0; cursor: pointer; padding: 0 2px; }
.years .ym .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--muted); margin-top: 16px; order: 2; transition: transform .2s; }
.years .ym .lbl { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); order: 1; position: absolute; top: -2px; white-space: nowrap; }
.years .ym.alt .lbl { top: 42px; }
.years .ym.cur .dot { background: var(--accent); border-color: var(--accent); transform: scale(1.35); box-shadow: 0 0 12px var(--accent); }
.years .ym.cur .lbl { color: var(--accent); font-weight: 600; }

/* sidepanel */
.sidebar { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; position: sticky; top: 76px; max-height: calc(100vh - 96px); }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; background: none; border: 0; padding: 12px 8px; cursor: pointer; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.tab-panel { overflow: auto; padding: 12px; min-height: 0; flex: 1; }
.scene-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.scene-list li button { width: 100%; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; display: grid; gap: 4px; }
.scene-list li button:hover { border-color: var(--muted); }
.scene-list li.cur button { border-color: var(--accent); background: var(--accent-soft); }
.scene-list .row1 { display: flex; gap: 8px; align-items: baseline; }
.scene-list time { font-family: var(--f-mono); font-size: .75rem; color: var(--accent); flex: none; }
.scene-list .t { font-weight: 700; font-size: .92rem; }
.scene-list .k { color: var(--muted); font-size: .8rem; }
.map { height: 360px; border-radius: 8px; overflow: hidden; margin-bottom: 10px; background: #1a1f2b; }
.leaflet-container { font: inherit; background: #1a1f2b; }
.map-pin { width: 14px; height: 14px; border-radius: 50%; background: #c9c3b6; border: 2px solid #0b0d12; box-shadow: 0 0 0 2px rgba(0,0,0,.3); }
.map-pin.cur { background: var(--accent); width: 18px; height: 18px; box-shadow: 0 0 0 4px rgba(227, 168, 87, .35); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface-2); color: var(--fg); }
.leaflet-popup-content button { margin-top: 6px; }
.leaflet-tile-pane { filter: saturate(.75) brightness(.9); }

/* redigering */
.editor { display: grid; gap: 14px; }
.editor h3 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; }
.editor .field { color: var(--muted); }
.editor .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.editor .row .input { flex: 1; min-width: 90px; }
.cand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cand-grid button { padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; aspect-ratio: 4 / 3; background: var(--bg); }
.cand-grid button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cand-grid button.sel { border-color: var(--accent); }
.ed-sec { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.ed-sec > span { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.ed-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.upload-btn { position: relative; overflow: hidden; }
.confirm-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; z-index: 2000; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: calc(100% - 32px); font-size: .92rem; }
.toast.err { border-color: var(--danger); color: #f3c1b8; }

#print-root { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .player-grid { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; max-height: none; }
  .tab-panel { max-height: 560px; }
}
@media (max-width: 1060px) { .home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .home-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 720px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .proj-name { display: none; }
  .brand-name { font-size: 1.25rem; }
  .topbar-actions .btn { padding: 7px 10px; font-size: .85rem; }
  .status-chip { display: none; }
  .person { width: 46%; grid-template-columns: 1fr; }
  .person img { display: none; }
  .person p { -webkit-line-clamp: 2; }
  .credit { max-width: 60%; }
  .anim-text { right: 5%; }
  .minimap { width: 34%; }
  .slide { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .slide figure { position: absolute; inset: 0; opacity: .28; }
  .slide-text { position: relative; z-index: 2; }
  .big-play { width: 64px; height: 64px; }
  .big-play span { left: 25px; top: 19px; border-left-width: 20px; border-top-width: 13px; border-bottom-width: 13px; }
  .ctl { padding: 7px 9px; }
  .title-card p, .title-card .kw { display: none; }
  .stage.has-subs .title-card .tc-inner { transform: translateY(-14%); }
}

@media (prefers-reduced-motion: reduce) {
  .kb img, .anim-text *, .person { animation: none !important; opacity: 1 !important; }
  .layer { transition: none; }
}

/* ---------- udskrift / PDF af slides ---------- */
@media print {
  @page { size: 297mm 167mm; margin: 0; }
  body { background: #0b0d12; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  .print-slide { width: 297mm; height: 167mm; position: relative; page-break-after: always; break-after: page; overflow: hidden; container-type: inline-size; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-slide .slide { position: absolute; inset: 0; }
}

/* ---------- podcast-søgning ---------- */
.finder { gap: 16px; }
.search-row { display: flex; gap: 8px; }
.search-row .input { flex: 1; font-size: 1.05rem; padding: 12px 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { background: transparent; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: .88rem; color: var(--muted); }
.chips button:hover, .chips button.on { border-color: var(--accent); color: var(--fg); }
.finder-body:empty { display: none; }
.finder-msg { color: var(--muted); padding: 8px 0; display: flex; gap: 10px; align-items: center; }
.finder-msg .spinner { width: 20px; height: 20px; border-width: 2px; }
.pod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pod { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: grid; gap: 6px; min-width: 0; }
.pod img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.pod:hover img { transform: translateY(-3px); border-color: var(--accent); }
.pod b { font-size: .92rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pod span { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-head { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 18px; align-items: start; }
.pod-head img { width: 140px; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.pod-head h2 { font-size: 1.8rem; line-height: 1.1; }
.pod-head .by { color: var(--muted); margin: 4px 0 8px; }
.pod-head .about { color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 75ch; }
.back-link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 700; margin-bottom: 8px; }
.ep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ep-list li { display: flex; gap: 14px; align-items: center; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.ep-list .ep-meta { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ep-list .ep-meta b { font-weight: 700; }
.ep-list .ep-sub { font-size: .8rem; color: var(--muted); font-family: var(--f-mono); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ep-list .ep-desc { font-size: .85rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.tag { font-family: var(--f-body); font-size: .72rem; border-radius: 99px; padding: 1px 8px; border: 1px solid var(--line); color: var(--fg); }
.tag.ok { border-color: var(--ok); color: var(--ok); }
.tag.acc { border-color: var(--accent); color: var(--accent); }
.more-row { display: flex; justify-content: center; padding-top: 6px; }
.settings { gap: 12px; }
.saved-list img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; }

/* ---------- live-status ---------- */
.live-status { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: grid; gap: 8px; }
.ls-row { display: flex; gap: 10px; align-items: baseline; font-size: .9rem; }
.ls-text { flex: 1; min-width: 0; }
.ls-dot { transform: translateY(-1px); }
.stage.is-waiting .big-play { display: none; }
.ls-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s infinite; flex: none; }
.live-status.done .ls-dot { background: var(--ok); animation: none; }
.live-status .bar { height: 6px; }
.seek-wrap { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; }
.seek-wrap #seek { width: 100%; position: relative; z-index: 1; }
.coverage { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: 7px; border-radius: 2px; background: var(--line); pointer-events: none; }
.waiting { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; overflow: hidden; }
.waiting .wbg { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(40px) brightness(.3); }
.waiting .w-inner { position: relative; display: grid; gap: 1.4cqw; justify-items: center; padding: 6%; }
.waiting img.art { width: 18cqw; min-width: 90px; aspect-ratio: 1; object-fit: cover; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.waiting h2 { font-family: var(--f-display); font-weight: 400; margin: 0; font-size: clamp(18px, 3.4cqw, 50px); line-height: 1.08; text-wrap: balance; max-width: 26ch; }
.waiting p { margin: 0; color: var(--muted); font-size: max(12px, 1.3cqw); }
@media (max-width: 560px) {
  .pod-head { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .pod-head img { width: 84px; }
  .pod-head h2 { font-size: 1.3rem; }
  .ep-list li { flex-direction: column; align-items: stretch; }
  .pod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
#browser-opts { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
