/* BMXnet Doku portal – application layer on top of tokens.css + base.css (design v0.1) */
html, body { height: 100%; }
body { background: var(--bg-app); overflow: hidden; }
body.printmode { overflow: auto; background: #fff; color: #111; }
a { color: var(--text-link); }
#app { height: 100%; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; overflow: auto; position: relative; }
.view-pool, .view-clip { overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hint { font-size: var(--fs-11); color: var(--text-muted); }
.hint.center { text-align: center; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.sm { font-size: var(--fs-11); }
.grow { flex: 1; }
.pad { padding: var(--sp-2) var(--sp-4); }
.tc { font-family: var(--font-mono); font-feature-settings: var(--font-feature-tc); }
.linkish { background: none; border: 0; padding: 0; color: var(--text-link); cursor: pointer; font-size: inherit; }
.boot, .loading { display: grid; place-items: center; height: 60vh; }
/* the hidden attribute must win over component display rules (.vload is display:grid – spinner never disappeared) */
[hidden] { display: none !important; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
.empty-page { display: grid; place-items: center; gap: var(--sp-3); padding: var(--sp-12); color: var(--text-secondary); text-align: center; }
body.offline::after { content: "Offline – reconnecting …"; position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); background: var(--error); color: #fff; padding: 4px 12px; border-radius: var(--r-pill); font-size: var(--fs-12); z-index: 90; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn svg.i { width: 16px; height: 16px; }
.btn-sm svg.i { width: 14px; height: 14px; }
.btn-lg { height: 44px; font-size: var(--fs-14); width: 100%; }
.btn-danger-fill { background: #c4352e; color: #fff; }
.btn-danger-fill:hover { background: #a92a24; }
.btn.btn-secondary.btn-danger { border-color: rgb(255 90 82 / .45); color: var(--error); background: var(--bg-card); }
.btn.btn-ghost.btn-danger { color: var(--error); }
.btn[aria-pressed=true] { color: var(--marker-yellow); }
.input.sm { height: 28px; font-size: var(--fs-12); padding: 0 var(--sp-2); }
select.input { padding-right: 24px; }
textarea.input { height: auto; padding: var(--sp-2) var(--sp-3); line-height: var(--lh-text); resize: vertical; }
.input[readonly] { opacity: .85; }
.field label { display: block; font-size: var(--fs-12); color: var(--text-secondary); margin-bottom: 5px; font-weight: var(--fw-medium); }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); align-items: end; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); align-items: end; }
.row-end { display: flex; justify-content: flex-end; gap: var(--sp-2); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--text-secondary); cursor: pointer; }
.chk input, .radios input { accent-color: var(--accent); width: 16px; height: 16px; }
fieldset { border: 1px solid var(--border-subtle); border-radius: var(--r-md); padding: var(--sp-3); margin: 0; }
legend { font-size: var(--fs-12); color: var(--text-secondary); padding: 0 4px; }
.radios { display: flex; flex-direction: column; gap: var(--sp-2); }
.radios label { display: flex; gap: var(--sp-2); align-items: center; cursor: pointer; }
.callout { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-md); }
.callout > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.alert { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); font-size: var(--fs-13); }
.alert.err { background: var(--error-soft); color: var(--error); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.chip.info { cursor: default; color: var(--text-link); border-color: transparent; background: var(--accent-soft); }
.chip .x { display: inline-grid; place-items: center; border: 0; background: none; color: inherit; padding: 0; cursor: pointer; }
.chip .x svg { width: 13px; height: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.roles .chip .i { width: 13px; height: 13px; }
.roles .chip:disabled { cursor: default; }
.roles .chip:disabled:not([aria-pressed=true]) { display: none; }
.lang { font-size: 10px; padding: 0 4px; border: 1px solid var(--border-strong); border-radius: 3px; color: var(--text-secondary); }
.dot { display: inline-block; }
.av { border-radius: 50%; object-fit: cover; background: var(--bg-hover); flex: none; display: inline-block; vertical-align: middle; }
.av-ini { display: inline-grid; place-items: center; font-size: 10px; font-weight: 600; color: #fff; background: #4a3a6a; }
.kbd { margin-right: 2px; }
.caps { display: block; margin: var(--sp-4) 0 var(--sp-2); }
h4.caps { margin-top: var(--sp-5); }

/* ---------- header ---------- */
.hdr { flex: none; }
.brand { text-decoration: none; color: var(--text-primary); }
.hdr-r { margin-left: auto; }
.nav { margin: 0 auto; }
.nav-mini { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--r-md); color: var(--text-muted); text-decoration: none; font-size: var(--fs-12); }
.nav-mini:hover, .nav-mini.on { color: var(--text-primary); background: var(--bg-hover); }
.nav-mini svg { width: 16px; height: 16px; }
.user { border: 0; background: none; cursor: pointer; padding: 2px 4px; border-radius: var(--r-md); }
.user:hover { background: var(--bg-hover); }
.menu-wrap { position: relative; display: inline-flex; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: 4px; z-index: var(--z-menu); display: flex; flex-direction: column; }
.menu[hidden] { display: none; }
.menu.up { top: auto; bottom: calc(100% + 6px); min-width: 150px; }
.menu button { display: flex; align-items: center; gap: var(--sp-2); width: 100%; text-align: left; border: 0; background: none; color: var(--text-primary); padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-13); white-space: nowrap; }
.menu button:hover, .menu button:focus-visible { background: var(--bg-hover); }
.menu button[aria-checked=true] { color: var(--text-link); }
.menu button[aria-checked=true]::after { content: "✓"; margin-left: auto; }
.menu-h { padding: 8px 10px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 4px; display: flex; flex-direction: column; }
.menu-h span { font-size: var(--fs-11); color: var(--text-muted); }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: var(--z-toast); width: min(380px, calc(100vw - 32px)); }
.toasts .toast { animation: tin var(--dur) var(--ease); align-items: center; }
.toasts .toast .tx { flex: 1; min-width: 0; }
.toasts .toast .x { width: 26px; height: 26px; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .2s; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: var(--bg-overlay); display: grid; place-items: center; z-index: var(--z-modal); padding: var(--sp-4); }
.modal-overlay .modal { max-width: 520px; width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal-overlay .modal.wide { max-width: 760px; }
.modal-overlay .modal-rc { max-width: 1100px; }
.modal-b { overflow: auto; color: var(--text-primary); }
.modal-b p { color: var(--text-secondary); margin: 0 0 var(--sp-2); }
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; border: 1px solid var(--border-subtle); border-radius: var(--r-md); padding: 4px; margin-top: var(--sp-2); }
.pick-list.tall { max-height: 52vh; }
.pick { display: flex; align-items: center; gap: var(--sp-2); padding: 6px 8px; border: 0; background: none; color: var(--text-primary); border-radius: var(--r-sm); cursor: pointer; text-align: left; min-height: 36px; }
.pick:hover { background: var(--bg-hover); }
.pick[aria-selected=true], .pick[aria-pressed=true] { background: var(--bg-selected); box-shadow: inset 2px 0 0 var(--accent); }
.pick small { margin-left: auto; color: var(--text-muted); }
.pick .ck { visibility: hidden; color: var(--accent); }
.pick[aria-pressed=true] .ck { visibility: visible; }
.pick[hidden] { display: none; }
.copybox { display: flex; gap: var(--sp-2); }
.mark-head { display: flex; gap: var(--sp-3); align-items: center; }
.crop-prev { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-md); background: #000; display: grid; place-items: center; color: var(--text-muted); }
table.kb td { padding: 6px 0; }

/* ---------- login ---------- */
.login-body { overflow: auto; background: radial-gradient(ellipse at 50% -10%, #1e2a3a 0, var(--bg-stage) 60%); }
.login { min-height: 100vh; display: grid; place-items: center; padding: var(--sp-4); }
.login-card { width: min(400px, 100%); background: var(--bg-panel); border: 1px solid var(--border-subtle); border-radius: var(--r-xl); padding: var(--sp-8) var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-4); box-shadow: var(--shadow-3); }
.login-card .brand { font-size: var(--fs-20); }
.login-lead { color: var(--text-secondary); margin: 0; line-height: var(--lh-text); }
.emergency summary { cursor: pointer; color: var(--text-muted); font-size: var(--fs-12); margin-bottom: var(--sp-3); }

/* ---------- media pool ---------- */
.work { height: 100%; }
.pool .stage { position: relative; }
.bins-toggle { display: none; }
.bins .caps { margin: 0; }
.bin { width: 100%; border: 0; background: none; text-align: left; font-size: var(--fs-13); }
.bin .lb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bin svg { width: 16px; height: 16px; }
.fgrid { display: flex; flex-direction: column; gap: var(--sp-2); padding: 0 var(--sp-2) var(--sp-4); }
.fgrid label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-11); color: var(--text-muted); }
.durr { display: flex; gap: 4px; align-items: center; }
.durr input { width: 100%; }
.search { width: 260px; }
.search.is-busy svg { animation: spin 1s linear infinite; }
.filters[hidden] { display: none; }
.filters { padding-bottom: var(--sp-2); border-bottom: 1px solid var(--border-subtle); }
.split { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.vgrid { position: relative; overflow: auto; flex: 1; min-height: 0; outline: none; }
.vspace { position: relative; }
.vgrid .tile { position: absolute; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .spr { position: absolute; inset: 0; opacity: 0; background-repeat: no-repeat; pointer-events: none; }
.thumb .dnu-badge { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: var(--r-sm); background: rgb(196 53 46 / .92); color: #fff; font-size: var(--fs-11); font-weight: 600; }
.thumb .dnu-badge svg { width: 12px; height: 12px; }
.tile.is-dnu .thumb img { filter: grayscale(.7) brightness(.7); }
.tmeta .mk { align-items: center; gap: 4px; }
.mkb { display: inline-flex; align-items: center; gap: 2px; font-size: 10px; height: 16px; padding: 0 4px; border-radius: 3px; background: var(--bg-hover); }
.mkb svg { width: 11px; height: 11px; }
.mkb.red { color: var(--marker-red); } .mkb.blue { color: var(--marker-blue); } .mkb.green { color: var(--marker-green); } .mkb.yellow { color: var(--marker-yellow); }
.vgrid.as-list .lrow { position: absolute; left: 16px; right: 16px; height: 52px; display: grid; grid-template-columns: 80px 120px 10px 150px 100px 1fr 40px auto; gap: var(--sp-3); align-items: center; padding: 4px 8px; border-radius: var(--r-md); cursor: pointer; border: 1px solid transparent; }
.lrow:hover { background: var(--bg-hover); }
.lrow[aria-selected=true] { border-color: var(--accent); background: var(--bg-card); }
.lrow img { width: 80px; height: 45px; object-fit: cover; border-radius: var(--r-sm); background: #000; }
.lrow .dot { width: 8px; height: 8px; border-radius: 50%; }
.lrow .nm, .lrow .cat { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lrow .mk { display: flex; gap: 4px; }
.lrow.is-dnu img { filter: grayscale(.8); }
.hits { max-height: 38%; overflow: auto; border-bottom: 1px solid var(--border); background: var(--bg-panel); flex: none; }
.hits-h { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4); position: sticky; top: 0; background: var(--bg-panel); z-index: 1; }
.hits-h .caps { margin: 0; }
.hits-h .ibtn { margin-left: auto; }
.hits-list { display: flex; flex-direction: column; padding: 0 var(--sp-2) var(--sp-2); }
.hit { display: grid; grid-template-columns: 150px 1fr 30px; gap: var(--sp-3); text-align: left; padding: 6px 8px; border: 0; background: none; color: var(--text-primary); border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-13); }
.hit:hover { background: var(--bg-hover); }
.hit .tc { color: var(--text-link); font-size: var(--fs-12); }
.hit .alt { display: block; color: var(--text-muted); font-size: var(--fs-12); }
mark { background: rgb(240 178 50 / .3); color: var(--text-primary); border-radius: 2px; padding: 0 1px; }
.insp { overflow: auto; }
.insp-empty { margin: var(--sp-6) var(--sp-4); }
.insp-body { padding: var(--sp-3) var(--sp-4) var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }
.insp-title { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-16); }
.insp-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.avs { display: flex; gap: 4px; flex-wrap: wrap; }
.mini-cm { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-12); color: var(--text-secondary); }
table.kv { width: 100%; border-collapse: collapse; font-size: var(--fs-12); }
table.kv th { text-align: left; color: var(--text-muted); font-weight: 500; padding: 5px 8px 5px 0; vertical-align: top; width: 38%; }
table.kv td { padding: 5px 0; color: var(--text-primary); vertical-align: top; word-break: break-word; }
table.kv tr + tr { border-top: 1px solid var(--border-subtle); }
table.kv .dot { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- player ---------- */
.player { display: flex; flex-direction: column; }
.player .vframe { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--r-sm); overflow: hidden; cursor: pointer; outline: none; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .vtc { z-index: 2; }
.player .subs { position: absolute; left: 6%; right: 6%; bottom: 7%; text-align: center; pointer-events: none; z-index: 2; }
.player .subs span { display: inline; background: rgb(0 0 0 / .72); color: #fff; font-size: clamp(13px, 2.1vw, 22px); line-height: 1.45; padding: 2px 8px; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.player.compact .subs span { font-size: 12px; }
.vframe:fullscreen { border-radius: 0; }
.vframe:fullscreen .subs span { font-size: 30px; }
.player .vload { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.player .cropbox { position: absolute; border: 2px solid var(--accent); background: var(--accent-soft); z-index: 4; pointer-events: none; }
.vframe.cropping { cursor: crosshair; }
.crophint { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: rgb(0 0 0 / .78); color: #fff; padding: 6px 10px; border-radius: var(--r-md); font-size: var(--fs-12); }
.vtcbar { display: flex; align-items: baseline; gap: var(--sp-3); margin: var(--sp-3) 0 var(--sp-1); }
.vtcbar .dur { margin-left: auto; font-size: var(--fs-11); color: var(--text-muted); }
.tcbtn { border: 0; background: none; color: var(--text-primary); padding: 0; cursor: text; font-size: var(--fs-20); }
.tcbtn:hover { color: var(--text-link); }
.tc-edit { width: 150px; font-size: var(--fs-16); }
.tc-err:empty { display: none; }
.player.compact .tcbtn { font-size: var(--fs-16); }
.ratepill { font-family: var(--font-mono); font-size: var(--fs-11); padding: 1px 6px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--text-link); }
.ptl { position: relative; height: 34px; margin: 2px 0 var(--sp-2); cursor: pointer; touch-action: none; outline: none; }
.ptl.has-lanes { height: 56px; }
.ptl .track { position: absolute; left: 0; right: 0; top: 14px; height: 4px; border-radius: 2px; background: var(--border); }
.ptl .buf { position: absolute; left: 0; top: 14px; height: 4px; border-radius: 2px; background: var(--border-strong); width: 0; }
.ptl .io { position: absolute; top: 9px; height: 14px; background: var(--inout-fill); border-left: 2px solid var(--inout); border-right: 2px solid var(--inout); }
.ptl .mks { position: absolute; inset: 0; pointer-events: none; }
.ptl .mks .rng { position: absolute; top: 11px; height: 10px; background: rgb(242 69 61 / .55); border: 1px solid var(--marker-red); border-radius: 2px; }
.ptl .mks .mk { position: absolute; top: 0; width: 11px; height: 11px; margin-left: -5.5px; border: 0; padding: 0; border-radius: 2px 2px 50% 50%; background: var(--c); cursor: pointer; pointer-events: auto; }
.ptl .ph { position: absolute; top: 4px; height: 26px; width: 2px; margin-left: -1px; background: var(--playhead); pointer-events: none; z-index: 2; }
.ptl.has-lanes .ph { height: 50px; }
.ptl .ph::before { content: ""; position: absolute; top: -4px; left: -5px; border: 6px solid transparent; border-top: 7px solid var(--playhead); }
.ptl .lanes { position: absolute; left: 0; right: 0; top: 26px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.ptl .lane { position: relative; height: 3px; }
.ptl .lane i { position: absolute; top: 0; height: 3px; border-radius: 2px; background: var(--c); }
.ptl:focus-visible { box-shadow: var(--focus-ring); border-radius: 4px; }
.hoverthumb { position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%); background: #000; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; pointer-events: none; z-index: 6; box-shadow: var(--shadow-2); }
.hoverthumb .ht-img { width: 160px; height: 90px; background-repeat: no-repeat; }
.hoverthumb .tc { display: block; text-align: center; font-size: var(--fs-11); padding: 2px; background: rgb(0 0 0 / .8); color: #fff; }
.transport { flex-wrap: wrap; }
.transport .ibtn.on { color: var(--accent); }
.transport .io-ic { font-family: var(--font-mono); font-weight: 700; font-size: 15px; }
.transport .spd { font-family: var(--font-mono); font-size: var(--fs-11); width: 38px; }
.transport .vol { width: 70px; accent-color: var(--accent); }
.transport .ibtn:disabled { opacity: .4; cursor: default; }
.ioline .keys { margin-left: auto; display: inline-flex; gap: 3px; }
.player.compact .ioline { margin-top: 2px; }

/* ---------- clip view ---------- */
.clipview { display: grid; grid-template-columns: minmax(0, 1fr) 420px; height: 100%; }
.cv-stage { background: var(--bg-stage); overflow: auto; padding: var(--sp-3) var(--sp-5) var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }
.cv-head { display: flex; align-items: center; gap: var(--sp-3); }
.cv-title { font-size: var(--fs-16); font-weight: 600; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-sub { font-family: var(--font-sans); font-weight: 400; color: var(--text-muted); font-size: var(--fs-12); }
.cv-player { max-width: calc((100vh - 290px) * 16 / 9); width: 100%; align-self: center; }
.cv-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.cv-insp { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--border-subtle); }
.tabbody { flex: 1; overflow: auto; min-height: 0; }
.prog { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--warn); border-radius: var(--r-md); flex-wrap: wrap; }
.prog.ok { border-left-color: var(--ok); }
.prog.muted { border-left-color: var(--border-strong); color: var(--text-muted); }
.prog .lbl { font-size: var(--fs-11); color: var(--text-muted); margin-right: 4px; }
.prog .hint { display: block; }
.prog.sm { font-size: var(--fs-12); padding: 6px 10px; }
.dnu-list { display: flex; flex-direction: column; gap: 4px; }
.dnu-row { display: flex; align-items: center; gap: var(--sp-2); padding: 6px 10px; background: var(--error-soft); border-radius: var(--r-md); color: var(--text-primary); font-size: var(--fs-12); flex-wrap: wrap; }
.dnu-row svg { color: var(--error); width: 15px; height: 15px; }
.dnu-row .btn { margin-left: auto; }
.tr-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-3) var(--sp-3) var(--sp-2); position: sticky; top: 0; background: var(--bg-panel); z-index: 1; }
.tr-list { display: flex; flex-direction: column; padding: 0 var(--sp-2) var(--sp-4); }
.seg-row { display: grid; grid-template-columns: 46px 1fr auto; gap: var(--sp-2); text-align: left; border: 0; background: none; color: var(--text-secondary); padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer; line-height: var(--lh-text); font-size: var(--fs-13); }
.seg-row:hover { background: var(--bg-hover); color: var(--text-primary); }
.seg-row.on { background: var(--bg-card); color: var(--text-primary); box-shadow: inset 2px 0 0 var(--accent); }
.seg-row .tc { color: var(--text-link); font-size: var(--fs-11); padding-top: 2px; }
.seg-row .lng { font-size: 10px; color: var(--text-muted); }
.mrow { display: flex; align-items: center; gap: var(--sp-2); margin-top: 4px; }
.mitem.is-done p { color: var(--text-muted); text-decoration: line-through; }
.mitem .pill { margin-left: auto; height: 18px; font-size: 10px; }
.mitem .top { flex-wrap: wrap; }
.compose .row { flex-wrap: wrap; }
.compose .seg { margin-right: auto; }
.empty.sm { padding: var(--sp-4); margin: var(--sp-3); flex-direction: row; justify-content: center; }
.empty.big { margin: var(--sp-8) auto; max-width: 520px; }
.info { padding: var(--sp-3) var(--sp-4) var(--sp-8); }
.info .chips select { width: auto; }
.stars { display: flex; gap: 2px; }
.star { border: 0; background: none; color: var(--text-disabled); cursor: pointer; padding: 2px; }
.star.on { color: var(--marker-yellow); }
.star.on svg { fill: currentColor; }
.used, .hist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-12); }
.plist { padding: 0 var(--sp-2); }
.person .nm { color: var(--text-primary); text-decoration: none; font-weight: 600; }
.occs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.occs .chip { height: 22px; font-size: 10px; }

/* ---------- storyboard ---------- */
.sbview { padding: var(--sp-5) var(--sp-6) var(--sp-8); min-height: 100%; position: relative; }
.sb-h { margin-bottom: var(--sp-3); }
.sb-h .seg button { display: inline-flex; align-items: center; gap: 4px; }
.sb-h .seg svg { width: 14px; height: 14px; }
.principles { margin-bottom: var(--sp-4); color: var(--text-secondary); }
.principles summary { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-size: var(--fs-12); color: var(--text-muted); }
.principles .pr-body { padding: var(--sp-2) var(--sp-4); border-left: 2px solid var(--border-strong); margin-top: var(--sp-2); }
.principles p { margin: 4px 0; }
.board { align-items: start; padding-bottom: var(--sp-4); scroll-snap-type: x proximity; }
.board .col { scroll-snap-align: start; min-height: 260px; }
.col-h h3 { flex: 1; min-width: 0; }
.col-h .sum { white-space: nowrap; }
.col-h .ibtn { width: 26px; height: 26px; }
.col-p { padding: 0 var(--sp-3) var(--sp-2); font-size: var(--fs-12); color: var(--text-muted); }
.col-p b { color: var(--text-secondary); font-weight: 500; }
.col-p p { margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: var(--lh-text); }
.col-p:hover p { -webkit-line-clamp: unset; }
.col-prog { height: 3px; margin: 0 var(--sp-3) var(--sp-2); background: var(--border-subtle); border-radius: 2px; overflow: hidden; }
.col-prog i { display: block; height: 100%; background: var(--c); }
.col-b { min-height: 80px; }
.scard { grid-template-columns: 18px 96px 1fr auto; position: relative; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.scard.is-open { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.scard.is-sketch { border-style: dashed; }
.scard.dragging { opacity: .3; }
.scard.ghost { position: fixed; z-index: 70; pointer-events: none; margin: 0; }
.scard:focus-visible { box-shadow: var(--focus-ring); }
.scard .th { background: #000; display: grid; place-items: center; }
.scard .th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scard .th .n { position: absolute; right: 3px; bottom: 3px; background: rgb(0 0 0 / .75); color: #fff; font-size: 10px; padding: 0 4px; border-radius: 3px; }
.scard .sk-ico { color: var(--text-muted); }
.scard .meta { flex-wrap: wrap; }
.scard .meta .pill { height: 18px; font-size: 10px; padding: 0 6px; }
.scard .meta .pill svg { width: 11px; height: 11px; }
.scard .meta .cm { display: inline-flex; gap: 2px; align-items: center; }
.scard .meta .cm svg { width: 12px; height: 12px; }
.scard .avs { margin-top: 4px; }
.scard .card-menu .ibtn { width: 24px; height: 24px; }
.scard .grip { cursor: grab; }
.dropzone { flex: none; }
.col-add { justify-content: flex-start; }
.sb-list { display: flex; flex-direction: column; gap: var(--sp-4); max-width: 980px; }
.sb-list .col-b .scard { grid-template-columns: 18px 128px 1fr auto; }
.seq-drawer { position: fixed; top: var(--h-header); right: 0; bottom: 0; width: min(520px, 100vw); background: var(--bg-panel); border-left: 1px solid var(--border); box-shadow: var(--shadow-3); z-index: 30; display: flex; flex-direction: column; animation: din var(--dur-slow) var(--ease); }
.seq-drawer[hidden] { display: none; }
@keyframes din { from { transform: translateX(30px); opacity: 0; } }
.dr-h { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--border-subtle); }
.dr-h .dot { width: 10px; height: 10px; border-radius: 50%; }
.dr-b { flex: 1; overflow: auto; padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-4); }
.dr-save { position: sticky; bottom: calc(-1 * var(--sp-4)); background: var(--bg-panel); padding: var(--sp-3) 0; display: flex; gap: var(--sp-2); align-items: center; justify-content: flex-end; border-top: 1px solid var(--border-subtle); }
.dr-save .hint { margin-right: auto; color: var(--warn); }
.sk-toggle { padding-bottom: 8px; }
.sketch { display: flex; flex-direction: column; gap: var(--sp-3); }
.sketch[hidden] { display: none; }
.tr-btns { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.actors { display: flex; flex-wrap: wrap; gap: 6px; }
.actors .chip a { color: var(--text-primary); text-decoration: none; }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.item { display: grid; grid-template-columns: 96px 1fr auto; gap: var(--sp-2); padding: 6px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--r-md); }
.item.warn { border-color: rgb(255 90 82 / .5); }
.item .ith img { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r-sm); background: #000; display: block; }
.item .ib { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.item .ir1 { display: flex; gap: var(--sp-2); align-items: center; }
.item .ir1 a { color: var(--text-link); text-decoration: none; }
.item .ir2 { display: flex; gap: var(--sp-2); }
.item .ir2 label { display: flex; align-items: center; gap: 4px; font-size: var(--fs-11); color: var(--text-muted); }
.item .ir2 input { width: 76px; }
.item .iact { display: flex; flex-direction: column; }
.item .iact .ibtn { width: 26px; height: 24px; }
.tabs.sm .tab { flex-direction: row; justify-content: center; gap: 6px; }
.dr-extra { min-height: 80px; }
.trash { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.trash li { display: flex; align-items: center; gap: var(--sp-3); }
.trash li .hint { margin-right: auto; }

/* rough cut */
.rc-frame { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--r-sm); overflow: hidden; }
.rc-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.rc-v.on { opacity: 1; }
.rc-label { position: absolute; left: 8px; top: 8px; font-size: var(--fs-11); padding: 1px 6px; background: rgb(0 0 0 / .6); border-radius: var(--r-sm); color: #fff; }
.rc-note { position: absolute; left: 8px; bottom: 8px; right: 8px; color: #fff; font-size: var(--fs-12); text-shadow: 0 1px 2px #000; }
.rc-tl { position: relative; display: flex; gap: 2px; height: 14px; margin: var(--sp-3) 0; }
.rc-seg { border: 0; padding: 0; background: var(--border-strong); border-radius: 2px; cursor: pointer; min-width: 3px; }
.rc-seg:hover { background: var(--text-muted); }
.rc-seg.warn { background: rgb(242 69 61 / .6); }
.rc-ph { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--playhead); pointer-events: none; }
.rc .big { font-size: var(--fs-16); margin-right: 6px; }

/* ---------- people ---------- */
.people .toolbar, .tasks .toolbar { position: sticky; top: 0; background: var(--bg-app); z-index: 2; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: var(--sp-4); padding: var(--sp-4); }
.pcard { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--text-primary); display: flex; flex-direction: column; }
.pcard:hover { border-color: var(--border-strong); }
.pcard .ph { position: relative; aspect-ratio: 1; background: var(--bg-stage); display: grid; place-items: center; }
.pcard .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard .ph .badge { position: absolute; left: 6px; top: 6px; }
.pcard .ph .badge svg { width: 11px; height: 11px; }
.ph-none { color: var(--text-disabled); }
.ph-none svg { width: 40px; height: 40px; }
.pc-b { padding: var(--sp-2) var(--sp-3) var(--sp-3); display: flex; flex-direction: column; gap: 2px; }
.pc-b .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-b .sub { display: flex; gap: 6px; align-items: center; font-size: var(--fs-11); color: var(--text-muted); }
.pc-b .sub2 { font-size: var(--fs-11); color: var(--text-secondary); }
.pc-b .sugg { font-size: var(--fs-11); color: var(--text-link); display: flex; gap: 4px; align-items: center; }
.pc-b .sugg svg { width: 12px; height: 12px; }
.person-view { padding: var(--sp-4) var(--sp-6) var(--sp-8); }
.pv-main { display: flex; gap: var(--sp-5); align-items: center; margin: var(--sp-3) 0 var(--sp-5); }
.pv-main h1 { margin: 0 0 4px; font-size: var(--fs-20); }
.pv-shot { width: 120px; height: 120px; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-card); display: grid; place-items: center; flex: none; }
.pv-shot img { width: 100%; height: 100%; object-fit: cover; }
.merged { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: var(--fs-12); color: var(--text-muted); }
.pv-cols { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.pv-form { padding: var(--sp-4); border-radius: var(--r-lg); border: 1px solid var(--border-subtle); }
.alts { display: flex; gap: 6px; flex-wrap: wrap; }
.alt { width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: var(--r-md); overflow: hidden; background: #000; cursor: pointer; }
.alt img { width: 100%; height: 100%; object-fit: cover; }
.alt.on { border-color: var(--accent); }
.pv-occ h3 { margin: 0 0 var(--sp-3); font-size: var(--fs-16); }
.occ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-3); }
.occ { display: grid; grid-template-columns: 112px 1fr; gap: var(--sp-3); padding: var(--sp-2); background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--r-md); }
.occ-th img { width: 112px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r-sm); background: #000; display: block; }
.occ-b a { color: var(--text-link); text-decoration: none; }
.occ-times { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ot { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-11); background: var(--bg-hover); border-radius: var(--r-sm); padding: 2px 4px 2px 6px; }
.ot .pill { height: 16px; font-size: 9px; }
.ibtn.sm { width: 20px; height: 20px; }
.ibtn.sm svg { width: 13px; height: 13px; }
.removed { margin-top: var(--sp-4); }
.removed summary { cursor: pointer; color: var(--text-muted); font-size: var(--fs-12); margin-bottom: 6px; }

/* ---------- tasks / admin ---------- */
.tasks, .admin { padding-bottom: var(--sp-8); }
.admin { padding: var(--sp-5) var(--sp-6); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-12); }
.tbl th { text-align: left; color: var(--text-muted); font-weight: 500; padding: 8px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-app); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
.tbl td.body { white-space: pre-wrap; max-width: 520px; color: var(--text-primary); font-size: var(--fs-13); }
.tbl tr.is-done td { opacity: .6; }
.tbl a { text-decoration: none; }
.tlist { padding: 0 var(--sp-4); }
.card.wide2 { grid-column: span 2; }
.card .caps { margin-top: 0; }
.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; position: absolute; inset: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch span:not(.sr) { position: absolute; inset: 0; background: var(--border-strong); border-radius: 10px; transition: background var(--dur); }
.switch span:not(.sr)::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--dur); }
.switch input:checked + span { background: var(--accent-fill); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: var(--focus-ring); }
.catlist { display: flex; flex-direction: column; gap: 8px; margin-top: var(--sp-4); font-size: var(--fs-12); }
.catlist .chip { height: 22px; margin: 2px; cursor: default; }

/* ---------- print ---------- */
.print { max-width: 900px; margin: 0 auto; padding: 24px; color: #111; background: #fff; font-size: 12px; line-height: 1.5; }
.print h1 { font-size: 26px; margin: 0; }
.print h2 { font-size: 18px; border-bottom: 2px solid #111; padding-bottom: 4px; margin-top: 28px; }
.print h3 { font-size: 13px; margin: 16px 0 4px; }
.print h3 small { font-weight: 400; color: #555; }
.print .sub { color: #555; margin: 0; }
.print table { border-collapse: collapse; width: 100%; margin: 4px 0; }
.print th, .print td { border: 1px solid #ccc; padding: 3px 6px; text-align: left; font-size: 11px; }
.print .it td:nth-child(n+2):nth-child(-n+5) { font-family: var(--font-mono); }
.print .sq { break-inside: avoid; }
.print-bar { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 12px; }
@media print { .no-print { display: none !important; } body { overflow: visible; } .view { overflow: visible; } .print { padding: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .clipview { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 1100px) {
  .work.pool { grid-template-columns: minmax(0, 1fr) 320px; }
  .work.pool .bins-panel { display: flex; position: fixed; left: 0; top: var(--h-header); bottom: 0; width: 280px; z-index: 35; box-shadow: var(--shadow-3); transform: translateX(-105%); transition: transform var(--dur-slow) var(--ease); }
  .work.pool.bins-open .bins-panel { transform: none; }
  .bins-toggle { display: inline-grid; }
  .clipview { grid-template-columns: 1fr; height: auto; }
  .view-clip { overflow: auto; }
  .cv-insp { border-left: 0; border-top: 1px solid var(--border-subtle); min-height: 60vh; }
  .cv-player { max-width: none; }
  .pv-cols { grid-template-columns: 1fr; }
  .card.wide2 { grid-column: auto; }
}
@media (max-width: 820px) {
  .nav-mini span, .user .nm { display: none; }
  .work.pool { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .work.pool .insp { order: -1; max-height: 46vh; border-bottom: 1px solid var(--border-subtle); }
  .view-pool { overflow: auto; }
  .search { width: 100%; order: 5; }
  .sbview { padding: var(--sp-4); }
  .board { grid-auto-columns: 86vw; scroll-snap-type: x mandatory; }
  .row3 { grid-template-columns: 1fr; }
  .vgrid.as-list .lrow { grid-template-columns: 72px 110px 1fr auto; }
  .vgrid.as-list .lrow .dot, .vgrid.as-list .lrow .cat, .vgrid.as-list .lrow .lang, .vgrid.as-list .lrow .mk { display: none; }
  .hit { grid-template-columns: 1fr; gap: 2px; }
  .person-view, .admin { padding: var(--sp-4); }
}
@media (pointer: coarse) {
  .ibtn { width: 40px; height: 40px; }
  .transport .ibtn { width: 40px; }
  .bin { padding: 10px var(--sp-2); }
  .ptl { height: 44px; }
  .item .iact .ibtn { width: 36px; height: 32px; }
}

/* ---------- refinements after first screenshots ---------- */
a.btn { text-decoration: none; }
.toolbar .input.sm { width: auto; max-width: 220px; }
.col-b .empty { flex-direction: column; margin: 0; padding: var(--sp-5) var(--sp-3); }
.col-b .empty .ico { width: 36px; height: 36px; }
.board { grid-auto-columns: minmax(290px, 1fr); }
.col-h { align-items: flex-start; }
.col-h h3 { line-height: 1.3; }
.col-h .sum { padding-top: 2px; }
.cv-head .btn { text-decoration: none; }
.hit { grid-template-columns: 190px 1fr 34px; align-items: start; }
.hit .lang { align-self: start; justify-self: end; }
.filters .chip.info { height: 26px; }
@media (min-width: 1400px) {
  .sbview.drawer-open #board { margin-right: 520px; }
  .sbview.drawer-open .sb-h { margin-right: 520px; }
}
.nav a { white-space: nowrap; }
.menu .sm-only { display: none; }
@media (max-width: 1180px) {
  .brand small, .nav-mini span, .user .nm { display: none; }
  .hdr { gap: var(--sp-3); }
  .nav a { padding: 0 var(--sp-3); }
}
@media (max-width: 700px) {
  .nav-mini { display: none; }
  .menu .sm-only { display: flex; }
  .hdr { padding: 0 var(--sp-2); gap: var(--sp-2); }
  .user > svg { display: none; }
  .sb-h .btn { flex: 1 1 auto; }
}
.thumb .badge { white-space: nowrap; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; display: inline-flex; }
@media (max-width: 820px) { .work.pool:not(.has-sel) .insp { display: none; } .work.pool:not(.has-sel) { grid-template-rows: minmax(0, 1fr); } }
.pgrid.dupgrid { grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); }
.dup { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--sp-3); align-items: center; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: var(--sp-3); }
.dupp { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--text-primary); text-align: center; }
.dupp img, .dupp .ph-none { width: 120px; height: 120px; object-fit: cover; border-radius: var(--r-md); background: var(--bg-stage); display: grid; place-items: center; }
.dupp .nm { font-weight: 600; }
.dupmid { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.dupmid .score { text-align: center; font-size: var(--fs-16); color: var(--warn); }
.chip.unsure { border-style: dashed; color: var(--warn); }
@media (max-width: 700px) { .pgrid.dupgrid { grid-template-columns: 1fr; } }
/* day timeline */
.tlview .toolbar { position: sticky; top: 0; background: var(--bg-app); z-index: 2; flex-wrap: wrap; }
.tl { display: flex; flex-direction: column; gap: 6px; padding: 0 var(--sp-4) var(--sp-8); }
.tl-row { display: grid; grid-template-columns: 64px minmax(260px, 34%) 1fr; gap: var(--sp-3); padding: var(--sp-2); background: var(--bg-panel); border: 1px solid var(--border-subtle); border-radius: var(--r-md); }
.tl-time { display: flex; flex-direction: column; color: var(--text-primary); font-size: var(--fs-14); }
.tl-time span { color: var(--text-muted); font-size: var(--fs-11); }
.tl-prog { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tl-p { display: grid; grid-template-columns: auto 1fr; gap: 2px 6px; align-items: center; font-size: var(--fs-12); }
.tl-p b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-p .hint { grid-column: 2; }
.tl-p .pill { height: 18px; font-size: 10px; }
.tl-clips { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.tl-c { position: relative; width: 112px; text-decoration: none; }
.tl-c img { width: 112px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r-sm); background: #000; display: block; }
.tl-c .tc { position: absolute; left: 3px; bottom: 3px; font-size: 10px; background: rgb(0 0 0 / .75); color: #fff; padding: 0 4px; border-radius: 3px; }
.tl-c i { position: absolute; right: 4px; top: 4px; width: 8px; height: 8px; border-radius: 50%; }
.tl-c.is-dnu img { filter: grayscale(.8) brightness(.6); }
.tl-c:hover img { outline: 2px solid var(--accent); }
@media (max-width: 820px) { .tl-row { grid-template-columns: 52px 1fr; } .tl-clips { grid-column: 1 / -1; } }
.people .toolbar [hidden] { display: none !important; }
.tl-p { grid-template-columns: 86px 1fr; align-items: start; }
.tl-p .pill { justify-self: start; height: 18px; padding: 0 6px; }

/* ---------- main navigation: one colour per area (Storyboard blue, Media Pool BMX red, People gold) ---------- */
.nav a { --nc: var(--accent); position: relative; transition: color .15s, background-color .15s; }
.nav a.n-shootplan { --nc: #2bb673; }
.nav a.n-storyboard { --nc: #3b8eff; }
.nav a.n-pool { --nc: #e5383b; }
.nav a.n-people { --nc: #e8b52e; }
.nav a svg { color: var(--nc); opacity: .75; transition: opacity .15s, transform .15s; }
.nav a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -1px; height: 2px; background: var(--nc); border-radius: 2px; transition: left .18s ease, right .18s ease; }
.nav a:hover { color: var(--text-primary); background: color-mix(in srgb, var(--nc) 12%, transparent); }
.nav a:hover svg { opacity: 1; transform: translateY(-1px) scale(1.08); }
.nav a:hover::after { left: 22%; right: 22%; }
.nav a[aria-current] { border-bottom-color: transparent; }
.nav a[aria-current]::after { left: 0; right: 0; }
.nav a[aria-current] svg { color: var(--nc); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .nav a, .nav a svg, .nav a::after { transition: none; } .nav a:hover svg { transform: none; } }

/* ---------- admin: footage runtime ---------- */
.kv.rt td.rt-bar { width: 40%; }
.rt-bar span { display: block; height: 6px; border-radius: 3px; background: var(--accent); }
.rt-interviews .rt-bar span { background: #3b8eff; }
.rt-learning .rt-bar span { background: #2bb673; }
.rt-shows .rt-bar span { background: #e5383b; }
.rt-community .rt-bar span { background: #e8b52e; }
.rt-misc .rt-bar span { background: var(--text-muted); }
.rt-all summary { cursor: pointer; color: var(--text-secondary); margin: var(--sp-2) 0; }
.rt-scroll { max-height: 340px; overflow: auto; }
.rt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--text-muted); vertical-align: middle; }
.rt-interviews .rt-dot { background: #3b8eff; } .rt-learning .rt-dot { background: #2bb673; } .rt-shows .rt-dot { background: #e5383b; } .rt-community .rt-dot { background: #e8b52e; }

/* ---------- shooting plan (stripboard) ---------- */
.spview { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: var(--sp-5) var(--sp-6) 0; }
.sp-legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: calc(-1 * var(--sp-3)) 0 var(--sp-3); }
.strip-key { padding: 1px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.spboard { flex: 1; min-height: 0; display: flex; gap: var(--sp-3); overflow-x: auto; padding-bottom: var(--sp-5); align-items: flex-start; }
.spcol { flex: 0 0 300px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: 100%; }
.spcol.tray { background: var(--bg-canvas, var(--bg-panel)); border-style: dashed; }
.spcol-h { display: flex; gap: 6px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.spdrop { padding: 8px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 80px; }
.sp-nodays { padding: 16px; flex-basis: 260px; }
.strip { border-radius: 6px; padding: 7px 9px; cursor: grab; border: 1px solid rgba(0,0,0,.25); box-shadow: 0 1px 0 rgba(0,0,0,.25); touch-action: none; user-select: none; }
.strip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.strip.is-open { box-shadow: 0 0 0 2px var(--accent); }
.strip.is-dropped { opacity: .5; text-decoration: line-through; }
.strip.dragging { opacity: .3; }
.strip-ph { border: 2px dashed var(--accent); border-radius: 6px; }
.strip .s1 { display: flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13px; }
.strip .s1 .tm { font-family: var(--font-mono); font-size: 11px; opacity: .85; white-space: nowrap; }
.strip .s1 .ttl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 4px; align-items: center; }
.strip .s1 svg { width: 14px; height: 14px; flex: none; }
.strip .s2, .strip .s3 { font-size: 11px; opacity: .85; margin-top: 2px; }
.strip .s3 svg { width: 12px; height: 12px; vertical-align: -2px; }
.strip .s4 { display: flex; gap: 6px; align-items: center; margin-top: 4px; font-size: 11px; }
.strip .warnico { color: #ffb020; display: inline-flex; }
.strip .warnico.rel { color: #ff6b6b; }
/* stripboard convention: day interior white, day exterior yellow, night interior blue, night exterior green */
.st-day-int { background: #ecebe6; color: #16181c; }
.st-day-ext { background: #f2d24b; color: #1d1a08; }
.st-night-int { background: #2f63c9; color: #fff; }
.st-night-ext { background: #23874c; color: #fff; }
.st-none { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-strong); }
.st-day-int .warnico, .st-day-ext .warnico { color: #b3261e; }
.st-day-int .hint, .st-day-ext .hint { color: #333; }
.sp-drawer .dr-f { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); }
.sp-drawer fieldset { border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 10px; }
.sp-drawer legend { padding: 0 4px; color: var(--text-secondary); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .04em; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qlist { padding-left: 20px; margin: 4px 0; display: flex; flex-direction: column; gap: 6px; }
.qlist li { display: flex; gap: 4px; align-items: flex-start; }
.qlist li textarea { flex: 1; }
.shots { width: 100%; border-collapse: collapse; font-size: 12px; }
.shots th { text-align: left; font-weight: 500; color: var(--text-secondary); padding: 2px 3px; }
.shots td { padding: 2px 3px; }
.shots .input.sm { width: 100%; min-width: 0; }
.hint.warn { color: var(--warn); }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.callsheet .cs-head th { width: 18%; background: #f3f3f3; }
.callsheet .cs-sched tr.cf td { background: #fff3cd; }
.callsheet .cs-entry { break-inside: avoid; border-top: 1px solid #ddd; margin-top: 10px; }
.callsheet .cs-q { margin: 4px 0 4px 18px; }
.callsheet .mono { font-family: var(--font-mono); white-space: nowrap; }
@media (max-width: 700px) { .row3 { grid-template-columns: 1fr 1fr; } .spcol { flex-basis: 85vw; } }
.sbadge { display: inline-block; font-size: 10px; font-weight: 600; line-height: 16px; padding: 0 6px; border-radius: 8px; background: rgba(0,0,0,.18); text-transform: uppercase; letter-spacing: .03em; }
.sbadge.sb-planned { background: rgba(0,0,0,.28); } .sbadge.sb-shot { background: #1f7a3f; color: #fff; } .sbadge.sb-dropped { background: #8a1c1c; color: #fff; }
@media (min-width: 1100px) { .spview:has(.sp-drawer:not([hidden])) .spboard { margin-right: 520px; } }
.shots td:nth-child(2) select { min-width: 92px; }
.strip .hint { color: inherit; opacity: .8; }

/* ---------- releases ---------- */
.rel-badge { display: inline-flex; vertical-align: middle; }
.rel-badge svg { width: 16px; height: 16px; }
.rel-present { color: var(--ok); } .rel-partial { color: var(--warn); } .rel-refused { color: var(--error); } .rel-none { color: var(--text-muted); }
.rel-badge.on-card { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.6); border-radius: 50%; padding: 3px; }
.relbox { border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 10px; }
.relbox legend { padding: 0 4px; color: var(--text-secondary); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .04em; display: inline-flex; gap: 4px; align-items: center; }
.scans { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 4px; }
.scans li { display: flex; gap: 6px; align-items: center; }
.scans a { display: inline-flex; gap: 4px; align-items: center; }
.upl { cursor: pointer; }
.relscan td { vertical-align: top; }
.relscan .input { min-width: 220px; }
.nowrap { white-space: nowrap; }
.callout.warn { border-color: var(--warn); }

/* ---------- rights log ---------- */
.mkb.orange { color: #ffa733; }
.thumb .rights-badge { position: absolute; right: 6px; top: 6px; display: inline-flex; padding: 3px; border-radius: 50%; background: rgb(255 167 51 / .95); color: #1d1300; }
.thumb .rights-badge svg { width: 13px; height: 13px; }
.rights { margin-top: var(--sp-3); }
.rights h4 { display: flex; gap: 6px; align-items: center; }
.rights h4 svg { width: 14px; height: 14px; color: #ffa733; }
.rlist { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 4px; }
.rlist li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 6px; border-radius: var(--r-sm); border-left: 3px solid #ffa733; background: var(--bg-card); }
.rlist li.r-cleared { border-left-color: var(--ok); opacity: .8; }
.rlist li.r-unusable { border-left-color: var(--error); }
.rlist .rk { font-weight: 600; }
.rlist select { width: auto; }
.rlist .rn { flex-basis: 100%; }
.radd summary { cursor: pointer; color: var(--text-secondary); display: inline-flex; gap: 4px; align-items: center; margin: 4px 0; }

/* ---------- user manual ---------- */
.manual { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: var(--sp-5); padding: var(--sp-4) var(--sp-5); max-width: 1320px; margin: 0 auto; }
.m-toc { position: sticky; top: var(--sp-3); align-self: start; max-height: calc(100vh - 90px); overflow: auto; padding-right: var(--sp-2); }
.m-toc .search { margin-bottom: var(--sp-3); }
.m-toc ul { list-style: none; margin: 0; padding: 0; }
.m-toc ul ul { margin: 2px 0 6px 12px; border-left: 1px solid var(--border); padding-left: 8px; }
.m-toc a { display: block; padding: 3px 6px; border-radius: var(--r-sm); color: var(--text-secondary); text-decoration: none; font-size: var(--fs-13, 13px); }
.m-toc ul ul a { font-size: 12px; color: var(--text-muted); }
.m-toc a:hover, .m-toc a.on { color: var(--text-primary); background: var(--bg-hover); }
.m-grp { margin-bottom: var(--sp-3); }
.m-grp > .caps { display: block; margin: var(--sp-2) 6px; }
.m-res ul { list-style: none; padding: 0; margin: var(--sp-2) 0; }
.m-res a { display: grid; gap: 2px; padding: 6px; border-radius: var(--r-sm); text-decoration: none; color: var(--text-primary); }
.m-res a:hover { background: var(--bg-hover); }
.m-res .snip { font-size: 12px; color: var(--text-secondary); }
.m-res mark, .m-art mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 2px; }
.m-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); position: sticky; top: 0; z-index: 2; background: var(--bg-app, var(--bg)); padding: var(--sp-2) 0; }
.m-bar .badge, .card .badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.badge:empty { display: none; }
.m-art { max-width: 860px; line-height: 1.6; }
.m-ch { padding-bottom: var(--sp-6, 40px); margin-bottom: var(--sp-6, 40px); border-bottom: 1px solid var(--border); scroll-margin-top: 64px; }
.m-ch h1 { font-size: 26px; margin: 0 0 var(--sp-3); }
.m-ch h2 { font-size: 19px; margin: var(--sp-5) 0 var(--sp-2); scroll-margin-top: 64px; }
.m-ch h3 { font-size: 15px; margin: var(--sp-4) 0 var(--sp-2); color: var(--text-secondary); scroll-margin-top: 64px; }
.m-ch p, .m-ch li { color: var(--text-primary); }
.m-ch ul, .m-ch ol { padding-left: 22px; }
.m-ch li { margin: 3px 0; }
.m-ch kbd { display: inline-block; min-width: 18px; padding: 0 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; font: 600 12px/18px var(--font-mono, ui-monospace, monospace); text-align: center; background: var(--bg-elevated, var(--bg-hover)); }
.m-ch a { color: var(--accent); }
.m-note { border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); padding: var(--sp-2) var(--sp-3); border-radius: 0 var(--r-md) var(--r-md) 0; margin: var(--sp-3) 0; }
.m-tbl { overflow-x: auto; margin: var(--sp-3) 0; }
.m-tbl table { border-collapse: collapse; width: 100%; font-size: 13px; }
.m-tbl th, .m-tbl td { border-bottom: 1px solid var(--border); padding: 6px 8px; text-align: left; vertical-align: top; }
.m-tbl th { color: var(--text-secondary); font-weight: 600; }
.m-fig { margin: var(--sp-3) 0 var(--sp-4); }
.m-fig img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
.m-fig figcaption { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.m-flash { animation: mflash 1.6s ease; }
@keyframes mflash { 0%, 40% { background: color-mix(in srgb, var(--accent) 22%, transparent); } 100% { background: transparent; } }
.m-ask { margin-top: var(--sp-5); padding: var(--sp-3); border: 1px dashed var(--border-strong); border-radius: var(--r-md); display: grid; gap: var(--sp-2); }
.m-ask .caps { display: flex; align-items: center; gap: 6px; }
.m-ask .row, .m-q-edit .row { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.m-qtab { max-width: 860px; }
.m-qlist { list-style: none; padding: 0; display: grid; gap: var(--sp-3); }
.m-q { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-3); display: grid; gap: var(--sp-2); }
.m-q-h { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.m-q-text, .m-q-a p { white-space: pre-wrap; margin: 0; }
.m-q-a { background: var(--bg-hover); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3); display: grid; gap: 4px; }
.m-top { display: flex; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-3); }
.m-top .search { flex: 1; margin: 0; }
.m-burger { display: none; }
@media (max-width: 860px) {
  .manual { grid-template-columns: 1fr; padding: 0 var(--sp-3) var(--sp-3); }
  /* sticky bar: search + menu button; the chapter list opens as a panel below it */
  .m-toc { position: sticky; top: 0; z-index: 4; max-height: none; overflow: visible; padding: var(--sp-2) 0; margin: 0; background: var(--bg-stage); }
  .m-top { margin: 0; }
  .m-burger { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid var(--border-strong); border-radius: var(--r-md); }
  .m-toc.open .m-burger { background: var(--bg-hover); }
  .m-panel { display: none; position: absolute; left: 0; right: 0; top: 100%; max-height: 70vh; overflow: auto; padding: var(--sp-2) var(--sp-3);
    background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: 0 12px 32px rgba(0, 0, 0, .55); }
  .m-toc.open .m-panel { display: block; }
  .m-toc ul ul { display: none; }
  .m-bar { top: 56px; }
  .m-bar #mprint { display: none; }
  .m-ch, .m-ch h2, .m-ch h3 { scroll-margin-top: 120px; }
}
@media print {
  .manual { display: block; padding: 0; }
  .m-toc, .m-bar, .m-ask, .m-qtab, .hdr { display: none !important; }
  .m-art { max-width: none; color: #000; }
  .m-ch { break-before: page; border: 0; }
  .m-ch:first-child { break-before: auto; }
  .m-ch p, .m-ch li, .m-ch h1, .m-ch h2, .m-ch h3, .m-tbl th, .m-tbl td { color: #000; }
  .m-fig img { max-height: 9cm; width: auto; break-inside: avoid; }
  .m-note { background: #f3f3f3; }
}
.m-bar .seg button { display: inline-flex; align-items: center; gap: 6px; }
.m-q-h .pill { white-space: nowrap; align-self: center; }
.m-ch li > ul { margin: 4px 0 2px; }

/* ---------- welcome screen (first visit) ---------- */
.modal.welcome { width: min(960px, 94vw); max-width: none; }
.welcome .welcome-img { display: block; width: 100%; height: auto; border-radius: var(--r-md); margin-bottom: var(--sp-4); aspect-ratio: 16 / 9; object-fit: cover; background: #0a0a0c; }
.welcome .modal-h { border-bottom: 0; padding-bottom: 0; }
.welcome .modal-h h3 { visibility: hidden; }
.welcome .welcome-img { margin-bottom: 0; }

/* ---------- media pool: library switch, archive footage, multi-selection ---------- */
.toolbar .seg a { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-sm); color: var(--text-muted); font-size: var(--fs-12); font-weight: var(--fw-semibold); text-decoration: none; }
.toolbar .seg a svg { width: 14px; height: 14px; }
.toolbar .seg a.on { background: var(--bg-hover); color: var(--text-primary); }
.toolbar .seg a:hover { color: var(--text-primary); }
.src-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: var(--r-sm); background: rgb(200 150 60 / .92); color: #1b1200; font-size: var(--fs-11); font-weight: 700; letter-spacing: .02em; }
.src-badge svg { width: 12px; height: 12px; }
.thumb .src-badge { position: absolute; left: 6px; top: 30px; }
.src-badge.inline { vertical-align: middle; margin-left: 4px; }
.tile.is-multi .thumb, .lrow.is-multi { outline: 2px solid var(--accent); outline-offset: -2px; }
.mchk { position: absolute; z-index: 2; right: 8px; bottom: 64px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; background: rgb(0 0 0 / .45); display: grid; place-items: center; color: #fff; }
.tile .mchk { bottom: auto; top: 6px; right: 34px; }
.is-multi .mchk { background: var(--accent); border-color: var(--accent); }
.mchk svg { width: 13px; height: 13px; }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: 8px 16px; background: color-mix(in srgb, var(--accent) 14%, var(--bg-panel)); border-bottom: 1px solid var(--border); }
.bulkbar[hidden] { display: none; }
.bulkbar .n { font-weight: 600; margin-right: var(--sp-2); }

/* ---------- photo library ---------- */
.fotos .fallback { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-12); margin-right: auto; }
.fotos .fallback svg { width: 13px; height: 13px; }
.fgrid-wrap { position: relative; overflow: auto; flex: 1; min-height: 0; outline: none; }
.fspace { position: relative; }
.ftile { position: absolute; cursor: pointer; }
.ftile .fth { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--bg-stage); }
.ftile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ftile:hover img { transform: scale(1.03); }
.ftile.is-dnu img { opacity: .35; filter: grayscale(1); }
.ftile.is-multi .fth { outline: 2px solid var(--accent); outline-offset: -2px; }
.ftile .mchk { top: 6px; left: 6px; right: auto; bottom: auto; }
.ftile .fser, .ftile .fppl { position: absolute; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: var(--r-sm); background: rgb(0 0 0 / .62); color: #fff; font-size: var(--fs-11); font-weight: 600; }
.ftile .fser { right: 6px; } .ftile .fppl { left: 6px; }
.ftile .fser svg, .ftile .fppl svg { width: 12px; height: 12px; }
.ftile .dnu-badge { position: absolute; right: 6px; top: 6px; display: inline-flex; padding: 3px; border-radius: 50%; background: rgb(196 53 46 / .92); color: #fff; }
.ftile .dnu-badge svg { width: 12px; height: 12px; }
.ftile .fmeta { display: flex; gap: 6px; padding: 4px 2px; font-size: var(--fs-12); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.fpeople { display: flex; flex-direction: column; max-height: 42vh; overflow: auto; }
.bin.person .av { flex: none; }
#fpq { margin: 4px 0 6px; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgb(6 6 8 / .94); display: grid; grid-template-columns: 1fr 340px; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 24px; }
.lb-imgwrap { position: relative; max-width: 100%; max-height: calc(100vh - 48px); }
.lb-img { display: block; max-width: 100%; max-height: calc(100vh - 48px); object-fit: contain; border-radius: var(--r-md); }
.lb-face { position: absolute; border: 2px solid var(--accent); border-radius: 4px; }
.lb-face.pruefen { border-style: dashed; border-color: #ffb547; }
.lb-face b { position: absolute; left: -2px; top: 100%; white-space: nowrap; background: var(--accent); color: #fff; font-size: 11px; padding: 0 4px; border-radius: 0 0 3px 3px; }
.lb-face.pruefen b { background: #ffb547; color: #1d1300; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-nav:hover:not(:disabled) { background: rgb(255 255 255 / .2); }
.lb-nav:disabled { opacity: .25; cursor: default; }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-side { background: var(--bg-panel); border-left: 1px solid var(--border); padding: var(--sp-4); overflow: auto; }
.lb-h { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.lb-h .ibtn { margin-left: auto; }
.lb-people { display: flex; flex-direction: column; gap: 4px; }
.lb-person { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--r-sm); color: var(--text-primary); text-decoration: none; }
.lb-person:hover { background: var(--bg-hover); }
.lb-person .pill { margin-left: auto; }
.lb-person.sugg { opacity: .8; }
.lb-serie { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 4px; }
.lb-serie button { padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.lb-serie button.on { border-color: var(--accent); }
.lb-serie img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 800px) { .lightbox { grid-template-columns: 1fr; grid-template-rows: 60vh auto; overflow: auto; } .lb-side { border-left: 0; } }
.pfotos h3 { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-5); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.pf { position: relative; padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; cursor: pointer; aspect-ratio: 1; background: var(--bg-stage); }
.pf img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf span { position: absolute; left: 4px; bottom: 4px; font-size: 10px; padding: 0 4px; border-radius: 3px; background: rgb(0 0 0 / .6); color: #fff; }
.pf-grid.sugg .pf { opacity: .75; }

/* ---------- learning videos (manual tab) ---------- */
.m-vlink { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; color: var(--text-primary); font-weight: 600; cursor: pointer; }
.m-vlink:hover { color: var(--accent); }
.lv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.lv-head h1 { margin: 0 0 4px; }
.lv-tot { opacity: .75; font-variant-numeric: tabular-nums; margin-left: 4px; }
.lv-stage { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.lv-player video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-md); display: block; }
.lv-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4); margin-top: var(--sp-3); }
.lv-ctrl > strong { flex: 1 1 100%; }
.lv-sel { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.lv-grp { display: flex; align-items: center; gap: 6px; }
.lv-grp .hint { display: inline-flex; align-items: center; gap: 4px; }
.lv-nav { display: flex; gap: var(--sp-2); margin-left: auto; flex-wrap: wrap; }
.lv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lv-list button { width: 100%; display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; text-align: left; padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg-elev, transparent); color: var(--text-primary); cursor: pointer; }
.lv-list button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.lv-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-hover); font-size: 12px; font-weight: 700; }
.lv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-4); }
.lv-card { display: flex; flex-direction: column; gap: 6px; text-align: left; background: none; border: 0; padding: 0; color: var(--text-primary); cursor: pointer; }
.lv-poster { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16 / 9; background: #0a0a0c; }
.lv-poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.lv-card:hover .lv-poster img { transform: scale(1.03); }
.lv-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.75); color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.lv-play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.lv-play svg { width: 48px; height: 48px; color: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); }
.lv-card:hover .lv-play, .lv-card:focus-visible .lv-play { opacity: 1; }
@media (max-width: 900px) { .lv-stage { grid-template-columns: 1fr; } .lv-nav { margin-left: 0; } }

/* tutorial videos: own subtitle overlay (no <track>, see lernvideos.js) */
.lv-vwrap { position: relative; }
.lv-vwrap video { display: block; width: 100%; }
.lv-sub { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); max-width: 86%; padding: .25em .6em; border-radius: 6px;
  background: rgba(0, 0, 0, .72); color: #fff; font-size: clamp(13px, 2.1vw, 22px); line-height: 1.35; text-align: center; pointer-events: none; white-space: pre-line; }

/* pool: close the open clip */
.insp .viewer { position: relative; }
.insp .viewer .insp-close { position: absolute; top: 8px; right: 8px; z-index: 6; width: 34px; height: 34px; border-radius: 50%; background: rgb(0 0 0 / .6); color: #fff; display: grid; place-items: center; }
.insp .viewer .insp-close:hover { background: rgb(0 0 0 / .85); }
