:root {
  /* ---- Night (default) — Apple system colors ---- */
  --bg: #161618;
  --bg2: #1c1c1e;
  --panel: #232325;
  --panel2: #2c2c2e;
  --line: rgba(84,84,88,.55);
  --line-strong: rgba(120,120,128,.6);
  --text: #f5f5f7;
  --muted: rgba(235,235,245,.62);
  --accent: #0a84ff;
  --accent-ink: #ffffff;
  --go: #30d158;
  --go-ink: #04230e;
  --ok: #30d158;
  --warn: #ff9f0a;
  --bad: #ff453a;
  --live-bg: #0e0e10;
  --hover: rgba(255,255,255,.06);
  --hover-strong: #3a3a3c;
  --sel: color-mix(in srgb, var(--accent) 18%, transparent);
  --topbar-bg: rgba(22,22,24,.78);
  --overlay: rgba(0,0,0,.72);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 8px 24px rgba(0,0,0,.35);
  --c-avp: #64d2ff;
  --c-host: #ffd60a;
  --c-ceremony: #bf5af2;
  --c-performance: #ff9f0a;
  --c-speech: #0a84ff;
  --c-awarding: #30d158;
  --c-break: #8e8e93;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
/* ---- Day ---- */
:root[data-theme="day"] {
  --bg: #f5f5f7;
  --bg2: #f2f2f7;
  --panel: #ffffff;
  --panel2: #e9e9ee;
  --line: rgba(60,60,67,.16);
  --line-strong: rgba(60,60,67,.32);
  --text: #1d1d1f;
  --muted: rgba(60,60,67,.72);
  --accent: #007aff;
  --accent-ink: #ffffff;
  --go: #34c759;
  --go-ink: #04230e;
  --ok: #1f8a3b;
  --warn: #c45500;
  --bad: #d70015;
  --live-bg: #f2f2f7;
  --hover: rgba(0,0,0,.045);
  --hover-strong: #dcdce1;
  --topbar-bg: rgba(246,246,248,.8);
  --overlay: rgba(242,242,247,.86);
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.06);
  --c-avp: #30b0c7;
  --c-host: #e0a800;
  --c-ceremony: #af52de;
  --c-performance: #ff9500;
  --c-speech: #007aff;
  --c-awarding: #34c759;
  --c-break: #8e8e93;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel2); }

/* ---------- buttons ---------- */
.btn { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--hover-strong); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.btn-go:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); border-color: color-mix(in srgb, var(--accent) 85%, #fff); }
.btn-xl { font-size: 22px; padding: 16px 40px; border-radius: 12px; }
.danger { color: var(--bad) !important; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.icon-btn:hover { color: var(--text); background: var(--panel2); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 10px 20px; background: var(--topbar-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 16px; letter-spacing: .2px; }
.brand-mark { color: var(--accent); }
.tabs { display: flex; gap: 4px; }
.tabs button { background: none; border: 0; padding: 7px 14px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.tabs button.active { color: var(--text); background: var(--panel2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.save-status { color: var(--muted); font-size: 12px; }
.save-status.err { color: var(--warn); }
.menu { position: absolute; right: 120px; top: 52px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; min-width: 230px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.menu button { background: none; border: 0; text-align: left; padding: 8px 12px; border-radius: 6px; cursor: pointer; }
.menu button:hover { background: var(--panel2); }

/* ---------- rundown ---------- */
.view { padding: 18px 20px 80px; }
.session-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.session-tabs { display: flex; gap: 6px; align-items: center; }
.session-tabs .stab { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; }
.session-tabs .stab.active { border-color: var(--accent); color: var(--accent); }
.session-meta { margin-left: auto; display: flex; gap: 12px; align-items: center; color: var(--muted); }
.session-meta input { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; margin-left: 6px; }
.meta-pill { font-size: 12px; color: var(--muted); background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }

.rundown-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: auto; background: var(--bg2); }
table.rundown { width: 100%; border-collapse: collapse; }
.rundown th { position: sticky; top: 0; background: var(--panel); text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line); z-index: 1; }
.rundown td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rundown tr.seg { cursor: pointer; }
.rundown tr.seg:hover td { background: var(--hover); }
.rundown tr.seg.selected td { background: var(--sel); }
.rundown tr.drop-before td { box-shadow: inset 0 2px 0 var(--accent); }
.c-drag { width: 26px; } .c-num { width: 34px; } .c-time { width: 84px; } td.time { white-space: nowrap; } .c-dur { width: 60px; }
.drag { cursor: grab; color: var(--muted); user-select: none; }
.num, .time, .dur { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.time { color: var(--text); }
.act-title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.act-perf { color: var(--muted); font-size: 13px; margin-top: 2px; }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--cat, var(--muted)); }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.cell-text { font-size: 13px; max-width: 260px; }
.cues-mini { margin-top: 6px; font-size: 12px; color: var(--muted); }
.cues-mini div::before { content: "↳ "; color: var(--muted); }
.warn-ico { color: var(--warn); font-size: 12px; cursor: help; }
.rundown-foot { padding: 12px; }

/* ---------- drawer ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--panel); border-left: 1px solid var(--line); z-index: 30; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.45); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 15px; }
.drawer-body { padding: 16px 18px 40px; overflow: auto; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.field textarea { resize: vertical; min-height: 60px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field small { color: var(--muted); font-size: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cue-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: var(--bg2); }
.cue-box-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cue-box-head b { flex: 1; font-size: 13px; }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.gap-note { font-size: 12px; color: var(--warn); font-family: var(--mono); }
.link-row { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.open-link { color: var(--accent); text-decoration: none; font-size: 12px; white-space: nowrap; padding: 0 3px; }
.open-link:hover { text-decoration: underline; }
.icon-btn.has-link { opacity: 1; filter: none; }
.vitem .icon-btn[data-v="link"]:not(.has-link) { opacity: .35; }
.link-cell { display: flex; align-items: center; gap: 2px; }
.chip-link { color: var(--accent); text-decoration: none; font-weight: 700; padding: 0 2px; }
.chip-link:hover { text-decoration: underline; }
.col-name { flex: 1; background: none; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; font-weight: 700; font-size: 14px; }
.col-name:focus { outline: none; border-color: var(--accent); background: var(--panel2); }
.col-opts { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.col-opts input { accent-color: var(--accent); margin-right: 6px; }
.col-label { display: inline-block; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-right: 4px; }
th.c-custom { color: var(--accent); }
.c-addcol { width: 34px; }
.sb-grid dt { word-break: break-word; }
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: 22px 0 10px; font-weight: 700; }

/* ---------- assets ---------- */
.assets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1000px) { .assets-grid { grid-template-columns: 1fr; } }
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; font-size: 16px; flex: 1; }
.vgroup { border-top: 1px solid var(--line); padding: 10px 0; }
.vgroup-head { display: flex; align-items: center; gap: 8px; }
.vgroup-head input { flex: 1; background: none; border: 0; font-weight: 700; padding: 2px 0; }
.vgroup-note { width: 100%; background: none; border: 0; color: var(--muted); font-size: 12px; padding: 2px 0; }
.vitems { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.vitem { display: inline-flex; align-items: center; gap: 4px; background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 3px 4px 3px 8px; font-size: 13px; }
.vitem.ready { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.vitem input[type=checkbox] { accent-color: var(--ok); margin: 0; }
.vitem span[contenteditable] { outline: none; min-width: 20px; }
.vitem .icon-btn { font-size: 12px; padding: 0 4px; }
table.sounds { width: 100%; border-collapse: collapse; font-size: 13px; }
.sounds th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 6px; }
.sounds td { border-top: 1px solid var(--line); padding: 4px; vertical-align: top; }
.sounds td input[type=text] { width: 100%; background: none; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; }
.sounds td input[type=text]:focus { border-color: var(--line); background: var(--panel2); outline: none; }
.sounds input[type=checkbox] { accent-color: var(--ok); margin-top: 8px; }
.check-list { font-size: 13px; }
.check-item { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; }
.check-item .lvl { flex: none; width: 18px; }
.check-item a { color: var(--accent); cursor: pointer; text-decoration: none; }

/* ---------- report ---------- */
table.report { width: 100%; border-collapse: collapse; font-size: 13px; }
.report th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 8px; border-bottom: 1px solid var(--line); }
.report td { padding: 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.report .over { color: var(--bad); } .report .under { color: var(--ok); }
.report .note-row td { color: var(--accent); font-style: italic; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 10px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* ================= LIVE ================= */
.live { position: fixed; inset: 0; z-index: 50; background: var(--live-bg); display: flex; flex-direction: column; padding: 14px 18px 8px; gap: 12px; }
.live-top { display: flex; align-items: center; gap: 20px; }
.lt-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lt-title { font-weight: 700; font-size: 16px; }
.lt-sub { color: var(--muted); font-size: 13px; }
.lt-stats { margin-left: auto; display: flex; gap: 10px; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; min-width: 120px; }
.stat span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat b { font-family: var(--mono); font-size: 22px; font-variant-numeric: tabular-nums; font-weight: 600; }
.stat-drift.ahead { border-color: color-mix(in srgb, var(--ok) 50%, transparent); } .stat-drift.ahead b { color: var(--ok); }
.stat-drift.behind { border-color: color-mix(in srgb, var(--bad) 60%, transparent); } .stat-drift.behind b { color: var(--bad); }
.stat-drift.slight b { color: var(--warn); }

.live-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); gap: 14px; min-height: 0; }
.now-col { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.now-card { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--cat, var(--accent)); border-radius: 14px; padding: 18px 22px 16px; }
.now-head { display: flex; align-items: center; gap: 10px; }
.badge { background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 12px; letter-spacing: .1em; padding: 3px 9px; border-radius: 5px; }
.now-index { color: var(--muted); font-size: 13px; }
.paused-flag { background: var(--warn); color: #1d1300; font-weight: 800; font-size: 12px; letter-spacing: .1em; padding: 3px 9px; border-radius: 5px; animation: blink 1s steps(2) infinite; }
.now-title { font-size: clamp(28px, 3.6vw, 52px); line-height: 1.05; margin: 8px 0 4px; letter-spacing: -.01em; }
.now-perf { font-size: clamp(16px, 1.6vw, 22px); color: var(--muted); }
.timer-row { display: flex; align-items: flex-end; gap: 28px; margin-top: 10px; }
.big-timer { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: clamp(64px, 10vw, 150px); line-height: 1; letter-spacing: -.03em; color: var(--text); }
.big-timer.warn { color: var(--warn); }
.big-timer.over { color: var(--bad); }
.timer-side { display: grid; gap: 6px; padding-bottom: 10px; }
.timer-side span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: block; }
.timer-side b { font-family: var(--mono); font-size: 18px; font-variant-numeric: tabular-nums; }
.progress { height: 8px; border-radius: 4px; background: var(--panel2); margin-top: 14px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--cat, var(--accent)); transition: width .25s linear; }
.progress-fill.over { background: var(--bad); }

.now-detail { flex: 1; overflow: auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.dcard { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.dcard.wide { grid-column: 1 / -1; }
.dcard h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.dcard.notes { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.dcard.notes .dtext { font-size: 18px; }
.dtext { font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 15px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; cursor: pointer; user-select: none; }
.chip.done { opacity: .45; text-decoration: line-through; }
.chip.done::before { content: "✓ "; color: var(--ok); }
.cue-list { display: flex; flex-direction: column; gap: 6px; }
.cue { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; }
.cue .cue-n { font-family: var(--mono); color: var(--muted); }
.cue.past { opacity: .45; }
.cue.current { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.cue.current .cue-n { color: var(--accent); }
.cue-t { font-weight: 700; font-size: 17px; }
.cue-at { font-family: var(--mono); color: var(--accent); font-size: 13px; margin-left: 8px; font-weight: 500; }
.cue-meta { color: var(--muted); font-size: 14px; margin-top: 3px; }
.cue-meta b { color: var(--text); font-weight: 500; }

.side-col { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.next-card { background: var(--panel); border: 1px dashed var(--line-strong); border-left: 6px solid var(--cat, var(--muted)); border-radius: 14px; padding: 14px 16px; }
.next-card .badge { background: var(--panel2); color: var(--text); }
.next-card h2 { margin: 8px 0 2px; font-size: 24px; line-height: 1.15; }
.next-card .np { color: var(--muted); font-size: 15px; }
.sb-grid { display: grid; grid-template-columns: 74px 1fr; gap: 6px 10px; margin-top: 10px; font-size: 14px; }
.sb-grid dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; padding-top: 2px; }
.sb-grid dd { margin: 0; }
.live-list-head { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; }
.live-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; min-height: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.live-list li { display: grid; grid-template-columns: 76px 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); border-left: 4px solid var(--cat, transparent); cursor: pointer; font-size: 14px; }
.live-list li:hover { background: var(--hover); }
.live-list li.past { opacity: .4; }
.live-list li.current { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.live-list li.next { background: var(--hover); }
.ll-time, .ll-dur { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ll-act small { color: var(--muted); display: block; font-size: 12px; }
.ll-act .actual { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.ll-act .actual.over { color: var(--bad); } .ll-act .actual.under { color: var(--ok); }

.live-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lc-group { display: flex; gap: 6px; align-items: center; }
.lc-msgs { flex: 1; justify-content: center; flex-wrap: wrap; }
.lc { padding: 10px 14px; font-size: 15px; }
.lc.msg { font-size: 12px; padding: 8px 10px; font-weight: 600; letter-spacing: .04em; }
.lc.msg.active { background: var(--bad); border-color: var(--bad); color: #fff; }
.lc-go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 800; font-size: 20px; padding: 12px 34px; }
.lc-go:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); }
.kbd-hint { text-align: center; color: var(--muted); font-size: 13px; letter-spacing: .03em; }
.start-overlay { position: absolute; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 5; }
.start-box { text-align: center; max-width: 520px; }
.start-box h2 { font-size: 36px; margin: 0 0 6px; }
.start-box p { color: var(--muted); }
@keyframes blink { 50% { opacity: .35; } }
@keyframes flash { 0%,100% { background: var@media print {
  :root { --bg: #fff; --bg2: #fff; --panel: #fff; --text: #000; --muted: #444; --line: #bbb; }
  body { background: #fff; color: #000; font-size: 10.5px; }
  .no-print, .topbar, .session-bar .session-tabs, .rundown-foot, .drawer, .live, .toast { display: none !important; }
  .view { padding: 0; }
  .rundown-wrap { border: 0; overflow: visible; }
  .rundown th { position: static; background: #eee; color: #000; }
  .rundown td { padding: 5px; }
  .tag { border-color: #bbb; background: #f5f5f5; }
  .cell-text { max-width: none; }
  tr { page-break-inside: avoid; }
  .print-title { display: block !important; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
}
(--panel); } 50% { background: color-mix(in srgb, var(--bad) 22%, var(--panel)); } }
.now-card.overtime { animation: flash 1.6s ease-in-out 6; border-color: color-mix(in srgb, var(--bad) 85%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 60%, transparent); }

@media (max-width: 1100px) {
  .live-main { grid-template-columns: 1fr; overflow: auto; }
  .lt-stats .stat { min-width: 0; padding: 4px 8px; } .stat b { font-size: 16px; }
}

/* ---------- print ---------- */
.print-title { display: none; }

/* ---------- auto assets panel ---------- */
.asset-toolbar { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.asset-filters { margin-left: auto; display: flex; gap: 8px; }
.asset-filters input, .asset-filters select { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.asset-filters input[type=search] { width: 240px; }
.asset-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.sum-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.sum-top { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.sum-top b { font-family: var(--mono); font-size: 22px; }
.sum-bar { height: 6px; background: var(--panel2); border-radius: 3px; margin: 8px 0 6px; overflow: hidden; }
.sum-bar div { height: 100%; background: var(--ok); }
.sum-sub { font-size: 12px; color: var(--muted); }
.asset-sec { margin-bottom: 14px; }
.asset-sec-head { all: unset; display: flex; align-items: center; gap: 10px; cursor: pointer; width: 100%; }
.asset-sec-head h2 { margin: 0; font-size: 16px; }
.caret { color: var(--muted); width: 12px; }
.sec-note { width: 100%; background: none; border: 1px dashed transparent; border-radius: 6px; color: var(--accent); font-size: 13px; padding: 4px 6px; margin: 8px 0 4px; }
.sec-note:hover, .sec-note:focus { border-color: var(--line); outline: none; }
table.assets-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.assets-table th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 6px; border-bottom: 1px solid var(--line); font-weight: 600; }
.assets-table td { padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.assets-table tr.is-ready td { background: color-mix(in srgb, var(--ok) 5%, transparent); }
.assets-table input:not([type=checkbox]), .assets-table select { width: 100%; background: none; border: 1px solid transparent; border-radius: 6px; padding: 5px 6px; }
.assets-table input:not([type=checkbox]):hover { border-color: var(--line); }
.assets-table input:not([type=checkbox]):focus, .assets-table select:focus { border-color: var(--accent); background: var(--panel2); outline: none; }
.assets-table select { border-color: var(--line); background: var(--panel2); }
.assets-table .a-name { font-weight: 600; }
.assets-table input[type=checkbox] { accent-color: var(--ok); width: 16px; height: 16px; }
.c-ready { width: 52px; text-align: center; } .c-type { width: 110px; }
.a-group { font-size: 12px; color: var(--muted); padding-left: 7px; }
.a-uses { max-width: 340px; }
.use-chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 12px; margin: 2px 3px 2px 0; cursor: pointer; color: var(--text); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.use-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag.tag-ready { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.tag-link { color: var(--accent); }
@media (max-width: 900px) { .asset-summary { grid-template-columns: 1fr; } .asset-filters input[type=search] { width: 160px; } }

/* ---------- pictures of visuals ---------- */
.c-thumb { width: 132px; }
.thumb-drop { position: relative; width: 120px; aspect-ratio: 16 / 9; border: 1px dashed var(--line-strong); border-radius: 8px; display: grid; place-items: center; cursor: pointer; overflow: hidden; background: var(--bg); color: var(--muted); font-size: 12px; }
.thumb-drop:hover, .thumb-drop:focus, .thumb-drop.drag { border-color: var(--accent); color: var(--accent); outline: none; }
.thumb-drop.drag { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.thumb-drop img { width: 100%; height: 100%; object-fit: cover; }
.thumb-x { position: absolute; top: 3px; right: 3px; border: 0; border-radius: 5px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; padding: 1px 5px; cursor: pointer; opacity: 0; }
.thumb-drop:hover .thumb-x { opacity: 1; }

.vthumb { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: #000; }
.vthumb-empty { display: grid; place-items: center; background: repeating-linear-gradient(45deg, var(--panel2), var(--panel2) 8px, var(--panel) 8px, var(--panel) 16px); border: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; padding: 4px; }
.vthumb-empty.big span { font-size: 16px; color: var(--text); }

.led-card { border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.led-row { display: grid; grid-template-columns: 1.25fr 1fr auto; gap: 12px; align-items: start; }
.led-slot .vthumb { border: 2px solid transparent; }
.led-now .vthumb { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }
.led-next .vthumb { border-color: var(--warn); }
.led-label { margin-top: 6px; font-size: 17px; font-weight: 700; }
.led-label small { color: var(--muted); font-weight: 400; font-size: 13px; }
.pill { font-size: 12px; font-weight: 800; letter-spacing: .08em; padding: 2px 7px; border-radius: 4px; vertical-align: 2px; }
.pill-on { background: #c0392b; color: #fff; }
.pill-next { background: var(--warn); color: #1d1300; }
.led-btns { display: flex; flex-direction: column; gap: 6px; }
.vstrip { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; }
.vcard { all: unset; position: relative; flex: none; width: 128px; cursor: pointer; border-radius: 8px; padding: 4px; border: 2px solid transparent; }
.vcard:hover { background: var(--panel2); }
.vcard.on { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.vcard.next { border-color: var(--warn); }
.vcard.past { opacity: .4; }
.vname { display: block; font-size: 12px; margin-top: 4px; line-height: 1.25; }
.vcue { display: block; font-size: 12px; color: var(--muted); }
.vlink { position: absolute; top: 6px; right: 8px; background: rgba(0,0,0,.7); border-radius: 4px; }
.sb-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sb-thumb span { display: block; font-size: 12px; line-height: 1.2; margin-top: 2px; color: var(--muted); }
@media (max-width: 1100px) { .led-row { grid-template-columns: 1fr 1fr; } .led-btns { grid-column: 1 / -1; flex-direction: row; } }
/* keep the LED panel compact so cues and notes stay visible */
.led-row { grid-template-columns: clamp(200px, 22vw, 400px) clamp(160px, 16vw, 300px) auto; justify-content: start; }
.led-label { font-size: 15px; }
.lc-msgs { flex-wrap: nowrap; overflow-x: auto; min-width: 0; justify-content: flex-start; }
.live-controls { flex-wrap: nowrap; }
.lc-group { flex: none; } .lc-msgs { flex: 1 1 auto; }

/* ---------- second screen chooser ---------- */
.mon-menu { position: fixed; z-index: 120; width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 16px 50px rgba(0,0,0,.6); display: flex; flex-direction: column; }
.mon-head { padding: 8px 10px 6px; font-weight: 700; }
.mon-head small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.mon-menu button { background: none; border: 0; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.mon-menu button:hover { background: var(--panel2); }
.mon-menu button small { display: block; color: var(--muted); font-size: 12px; }

.opt { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.opt input { accent-color: var(--accent); }
.toast-btn { margin-left: 10px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: 3px 10px; font-weight: 700; cursor: pointer; }

/* ---------- backups & files ---------- */
.save-status { cursor: pointer; } .save-status:hover { color: var(--text); text-decoration: underline; }
.folder-path { font-family: var(--mono); font-size: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; word-break: break-all; }
table.files-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.files-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.files-table a.icon-btn { text-decoration: none; display: inline-block; }
.snap-label { color: var(--accent); font-size: 12px; text-transform: capitalize; }

/* ================= design review fixes (2026-11-10) ================= */
/* stage messages wrap instead of hiding off the end of the bar */
.lc-msgs { flex-wrap: wrap; overflow: visible; }
.stat b { white-space: nowrap; }
.ll-time { white-space: nowrap; }
/* toast sits at the top while the live console is open, so it never covers the controls */
body.live-open .toast { top: 76px; bottom: auto; }

/* narrow screens (iPad portrait, phones): everything stacks and GO gets its own full-width row */
@media (max-width: 1100px) {
  .live { overflow-y: auto; }
  .live-main { overflow: visible; }
  .now-col, .side-col { min-height: auto; }
  .now-detail { flex: none; overflow: visible; }
  .live-list { flex: none; max-height: 55vh; }
  .live-top { flex-wrap: wrap; }
  .lt-stats { margin-left: 0; width: 100%; }
  .lt-stats .stat { flex: 1; }
  .live-controls { flex-wrap: wrap; position: sticky; bottom: 0; background: var(--live-bg); padding: 8px 0 4px; z-index: 2; }
  .lc-group { flex: 1 1 auto; flex-wrap: wrap; }
  .lc-group:last-child { flex-basis: 100%; }
  .lc-go { order: -1; flex: 1 1 100%; font-size: 22px; padding: 14px; }
  .lc-msgs { flex-basis: 100%; justify-content: flex-start; }
  .kbd-hint { display: none; }
}
/* touch screens: Apple's 44pt minimum for anything you tap */
@media (pointer: coarse) {
  .btn, .lc, .lc.msg, .chip, .use-chip, .tabs button, .stab, .menu button, .mon-menu button { min-height: 44px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  .vcard { min-height: 44px; }
}

/* editor rundown: room for lights / notes so rows stay short */
.rundown td.cell-text { min-width: 200px; max-width: 340px; }

/* phones: top bar wraps instead of running off the screen */
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .topbar-right { margin-left: 0; width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .session-meta { margin-left: 0; flex-wrap: wrap; }
}

/* keyboard focus is always visible */
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .use-chip:focus-visible, .vcard:focus-visible,
.asset-sec-head:focus-visible, .thumb-drop:focus-visible, .stab:focus-visible, .tabs button:focus-visible,
.live-list li:focus-visible, .cue:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* respect the computer's Reduce Motion setting */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* phones: keep the pinned control bar compact (about a quarter of the screen) */
@media (max-width: 700px) {
  .lc-msgs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px;
    mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .lc-msgs .lc.msg { flex: none; }
  #lcStage, #lcLed, #lcMon { display: none; } /* these open extra windows: a laptop thing */
  .lc-go { padding: 10px; }
}
@media (pointer: coarse) { .lc { min-width: 44px; } }
.no-fullscreen #lcFull { display: none; }
@media (max-width: 700px) {
  .lt-stats { flex-wrap: wrap; gap: 6px; }
  .lt-stats .stat { flex: 1 1 calc(50% - 6px); }
  .stat b { font-size: 18px; }
  .timer-row { flex-wrap: wrap; gap: 6px 20px; }
  .timer-side { grid-template-columns: repeat(3, auto); gap: 4px 16px; padding-bottom: 0; }
  .now-card { padding: 14px 16px; }
  .now-detail { grid-template-columns: 1fr; }
}
/* Activity column wide enough that cue lines stay on one line */
.rundown tbody td:nth-child(5) { min-width: 240px; }
.cues-mini div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }

/* ======================= Apple-style restyle (approved: Mac app, night + day) ======================= */
body { letter-spacing: -.005em; }
.btn { border-radius: 8px; border-color: transparent; background: var(--panel2); font-weight: 500; }
.btn:hover { background: var(--hover-strong); border-color: transparent; }
.btn-go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn-go:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.theme-btn { min-width: 92px; }

/* top bar: translucent like a macOS toolbar, tabs as a segmented control */
.topbar { background: var(--topbar-bg); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); border-bottom: .5px solid var(--line); }
.brand-mark { color: var(--accent); }
.tabs { background: var(--panel2); border-radius: 9px; padding: 2px; gap: 0; }
.tabs button { padding: 5px 16px; border-radius: 7px; color: var(--text); font-weight: 500; }
.tabs button.active { background: var(--panel); box-shadow: 0 1px 3px rgba(0,0,0,.18), 0 0 0 .5px var(--line); }
.session-tabs .stab { border-radius: 8px; }
.session-tabs .stab.active { border-color: var(--accent); color: var(--accent); }

/* grouped "inset list" surfaces */
.rundown-wrap, .panel, .drawer, .menu, .mon-menu { border-color: var(--line); }
.rundown-wrap, .panel { background: var(--panel); border-radius: 12px; box-shadow: var(--shadow); }
.rundown th { background: var(--panel); }
.drawer { background: var(--bg2); }
.field input, .field textarea, .field select { background: var(--panel); border-color: var(--line); border-radius: 8px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.tag { border-radius: 6px; background: var(--panel2); border-color: transparent; }
.section-label, .panel-head h2 { letter-spacing: -.01em; }
.section-label { color: var(--muted); }

/* ---------- live console: Mac-app layout ---------- */
.live { background: var(--live-bg); }
.live-main { grid-template-columns: 290px minmax(0, 1fr) 360px; gap: 16px; }
.live-sidebar { display: flex; flex-direction: column; gap: 8px; min-height: 0; background: var(--bg2); border-radius: 12px; padding: 12px 8px; border: .5px solid var(--line); }
.live-sidebar .live-list-head { padding: 0 8px; }
.live-sidebar .live-list { border: 0; background: transparent; border-radius: 0; }
.live-list li { border-bottom: 0; border-left: 0; border-radius: 8px; margin: 1px 0; padding: 7px 10px; grid-template-columns: 70px 1fr auto; }
.live-list li.current { background: var(--accent); color: var(--accent-ink); }
.live-list li.current .ll-time, .live-list li.current .ll-dur, .live-list li.current small { color: color-mix(in srgb, var(--accent-ink) 82%, transparent); }
.live-list li.next { background: var(--hover); }
.live-list li:hover { background: var(--hover); }
.live-list li.current:hover { background: var(--accent); }
.ll-act { position: relative; padding-left: 14px; }
.ll-act::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--cat); }

.now-card { border: .5px solid var(--line); border-left: .5px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); padding: 18px 24px 18px; }
.now-head .badge { background: transparent; color: var(--accent); padding: 0; letter-spacing: .02em; font-size: 13px; }
.now-index { font-size: 13px; }
.now-title { font-weight: 700; letter-spacing: -.025em; }
.big-timer { font-family: var(--font); font-weight: 600; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.progress { height: 6px; border-radius: 3px; background: var(--panel2); }
.progress-fill { background: var(--accent); border-radius: 3px; }
.now-card.overtime { border-color: color-mix(in srgb, var(--bad) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--bad) 55%, transparent), var(--shadow); }
.paused-flag { border-radius: 6px; }

.dcard { background: var(--panel); border: .5px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.dcard h4 { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.dcard.notes { background: color-mix(in srgb, var(--warn) 9%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.cue { border-radius: 10px; border-color: transparent; background: var(--bg2); }
.cue.current { border-color: transparent; background: var(--sel); box-shadow: inset 0 0 0 1.5px var(--accent); }
.cue.current .cue-n { color: var(--accent); }
.cue-at { color: var(--accent); }
.chip { border-radius: 999px; border-color: transparent; background: var(--panel2); }

.side-col { gap: 16px; overflow: auto; }
.next-card { background: var(--panel); border: .5px solid var(--line); border-left: .5px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.next-card .badge { background: transparent; color: var(--muted); padding: 0; font-size: 13px; letter-spacing: .02em; }
/* the LED panel lives in the right column, like the approved mockup */
#ledBox:empty { display: none; }
#ledBox .led-card { border-color: var(--line); }
#ledBox .led-row { grid-template-columns: 1fr 1fr; }
#ledBox .led-btns { grid-column: 1 / -1; flex-direction: row; }
#ledBox .led-btns .btn { flex: 1; }
#ledBox .led-label { font-size: 14px; }
#ledBox .vcard { width: 104px; }

.stat { background: transparent; border: 0; padding: 2px 10px; min-width: 0; }
.stat span { text-transform: none; letter-spacing: 0; font-size: 12px; }
.stat b { font-family: var(--font); font-size: 20px; font-weight: 600; }
.stat-drift.behind, .stat-drift.slight, .stat-drift.ahead { border: 0; }
.lt-stats { gap: 6px; background: var(--panel); border: .5px solid var(--line); border-radius: 12px; padding: 6px 8px; }

.live-controls { border-top: .5px solid var(--line); padding-top: 10px; }
.lc { border-radius: 10px; }
.lc.msg { border-radius: 999px; letter-spacing: .02em; }
.lc-go, .lc-go:hover { background: var(--go); color: var(--go-ink); border-color: var(--go); border-radius: 12px; box-shadow: 0 4px 16px color-mix(in srgb, var(--go) 35%, transparent); font-weight: 700; }
.lc-go:hover { filter: brightness(1.06); }
.kbd-hint { color: var(--muted); }
.start-overlay { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.toast { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); border-radius: 12px; }

@media (max-width: 1400px) { .live-main { grid-template-columns: 250px minmax(0, 1fr) 320px; } }
@media (max-width: 1100px) {
  .live-main { grid-template-columns: 1fr; }
  .live-sidebar { order: 3; max-height: none; }
  .side-col { order: 2; overflow: visible; }
  .now-col { order: 1; }
  .live-controls { background: var(--live-bg); }
}
.timer-side b, .ll-time, .ll-dur, .time, .dur, .num { font-family: var(--font); font-variant-numeric: tabular-nums; }
.timer-side span { text-transform: none; letter-spacing: 0; font-size: 12px; }
.live-list li { font-size: 13px; }
/* narrow screens: the content takes its full height so the control bar stays pinned while scrolling */
@media (max-width: 1100px) { .live-main { flex: none; } }

/* ======================= Direk DM: icons, buttons, subtle motion ======================= */
.ic { width: 17px; height: 17px; flex: none; display: block; }
.ic-wrap { display: inline-flex; }
.btn, .lc, .menu button, .mon-menu button, .icon-btn { display: inline-flex; align-items: center; gap: 7px; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-icon { padding-left: 9px; padding-right: 9px; }
.icon-btn .ic { width: 16px; height: 16px; }
.files-table td .ic { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; color: var(--muted); }
.panel-head .btn .ic { width: 15px; height: 15px; }

/* press + hover: quick and quiet */
.btn, .lc, .chip, .use-chip, .vcard { transition: transform .12s ease, background-color .15s ease, box-shadow .2s ease, filter .15s ease; }
.btn:active, .lc:active, .chip:active, .vcard:active { transform: scale(.97); }
.btn-go:hover, .lc-go:hover { transform: translateY(-1px); }

/* brand */
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.brand-logo { width: 24px; height: 24px; border-radius: 6px; }
.brand-name { font-weight: 700; letter-spacing: -.01em; }
.brand-sep { color: var(--muted); font-weight: 400; }
#brandTitle { color: var(--muted); font-weight: 500; }

/* GO + Go Live: a soft sheen passes every few seconds */
.btn-shimmer { position: relative; overflow: hidden; isolation: isolate; }
.btn-shimmer::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.38), transparent); transform: skewX(-18deg);
  animation: sheen 6.5s ease-in-out infinite; pointer-events: none; }
@keyframes sheen { 0%, 78% { left: -60%; } 100% { left: 130%; } }
.lc-go { gap: 10px; letter-spacing: .02em; }
.lc-go .ic { width: 20px; height: 20px; }

/* Save button states */
.btn-save { position: relative; }
.btn-save.saved { color: var(--ok); }
.btn-save.dirty { background: color-mix(in srgb, var(--accent) 16%, var(--panel2)); color: var(--accent); }
.btn-save.dirty::before { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); animation: dot 1.8s ease-in-out infinite; }
@keyframes dot { 50% { opacity: .35; transform: scale(.75); } }
.btn-save.saving { opacity: .75; }
.btn-save.error { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--panel2)); }
.btn-save.pop .ic { animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* menus */
.menu button { gap: 10px; }
.menu button .ic { color: var(--muted); }
.menu.export-menu { position: fixed; width: 320px; padding: 6px; z-index: 60; }
.menu-head { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 10px 4px; }
.menu-foot { font-size: 12px; color: var(--muted); padding: 8px 10px 4px; border-top: .5px solid var(--line); margin-top: 4px; }
.export-menu button { padding: 9px 10px; align-items: flex-start; }
.export-menu button span { display: flex; flex-direction: column; }
.export-menu button small { color: var(--muted); font-size: 12px; font-weight: 400; }
.export-menu i .ic { width: 26px; height: 26px; }
.export-menu i.ic-xlsx { color: #1f9d55; } .export-menu i.ic-docx { color: #2f6bd8; } .export-menu i.ic-pdf { color: #e5483b; }
.export-menu button:hover i { transform: translateY(-1px); transition: transform .15s; }
.mon-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mon-head small { width: 100%; }

/* Assets summary icons */
.sum-top span { display: inline-flex; align-items: center; gap: 7px; }
.sum-top .ic { color: var(--accent); }
.asset-sec-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.asset-sec-head h2 .ic { color: var(--accent); width: 18px; height: 18px; }
.export-menu i.ic-xlsx .ic { color: #1f9d55; } .export-menu i.ic-docx .ic { color: #2f6bd8; } .export-menu i.ic-pdf .ic { color: #e5483b; }

/* ======================= Home: current production, productions list, settings ======================= */
.brand { cursor: pointer; }
.home { max-width: 1180px; margin: 0 auto; display: grid; gap: 20px; }
.home-current { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: stretch;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px 28px; box-shadow: var(--shadow); }
.hc-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.hc-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--panel2);
  color: var(--text); font-weight: 600; font-size: 12px; }
.hc-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c-break); }
.hc-status.is-live { background: color-mix(in srgb, var(--bad) 18%, transparent); }
.hc-status.is-live::before { background: var(--bad); animation: hc-pulse 1.6s ease-in-out infinite; }
.hc-status.is-done::before { background: var(--ok); }
.hc-status.is-part::before { background: var(--warn); }
@keyframes hc-pulse { 50% { opacity: .35; } }
.hc-title { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; overflow-wrap: anywhere; }
.hc-theme { margin-top: 6px; font-size: 16px; color: var(--muted); }
.hc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; }
.home-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 10px; border-radius: 8px; background: var(--panel2); }
.home-chip .ic { width: 15px; height: 15px; color: var(--muted); }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 5px 2px; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }
.hc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hc-actions .btn { padding: 9px 16px; }
.hc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border-radius: 12px; overflow: hidden; align-self: center; }
.hc-stats > div { background: var(--bg2); padding: 14px 16px; }
.hc-stats dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.hc-stats dd { margin: 0; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hc-stats dd small { font-size: 15px; color: var(--muted); font-weight: 500; }
.hc-stats .sum-bar { margin: 8px 0 0; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.home-panel { background: var(--panel); padding: 18px 18px 8px; }
.prod-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); }
.prod-row:first-child { border-top: 0; }
.prod-row.is-open { background: var(--sel); border-radius: 10px; padding: 12px; border-top: 0; margin-bottom: 4px; }
.prod-row.is-open + .prod-row { border-top: 0; }
.prod-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.prod-info b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-info small { font-size: 12px; color: var(--muted); }
.prod-edited { opacity: .8; }
.prod-tag { font-size: 11px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.prod-acts { display: flex; align-items: center; gap: 4px; flex: none; }
.prod-acts .icon-btn { padding: 6px 8px; }
.prod-empty { display: flex; gap: 12px; align-items: flex-start; padding: 16px 4px 12px; color: var(--muted); }
.prod-empty > .ic { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.prod-empty div > b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.prod-empty small { font-size: 13px; line-height: 1.45; }

.set-group { font-size: 12px; font-weight: 600; color: var(--muted); margin: 6px 0 2px; padding: 8px 4px 0; }
.set-group:not(:first-child) { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; }
.set-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--panel2); display: grid; place-items: center; color: var(--muted); }
.set-ic .ic { width: 16px; height: 16px; }
.set-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.set-txt b { font-weight: 500; }
.set-txt small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-ctl { flex: none; display: flex; gap: 6px; }
.seg-ctl { display: inline-flex; background: var(--panel2); border-radius: 8px; padding: 2px; }
.seg-ctl button { background: none; border: 0; padding: 4px 10px; border-radius: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg-ctl button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.2); font-weight: 600; }
.switch { position: relative; display: inline-block; width: 40px; height: 24px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--panel2); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + span { background: var(--go); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.np-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.np-opt:has(input:checked) { border-color: var(--accent); background: var(--sel); }
.np-opt input { margin-top: 3px; accent-color: var(--accent); }
.np-opt b { display: block; font-weight: 600; }
.np-opt small { font-size: 12px; color: var(--muted); }
.np-keep { margin: 6px 2px 0; white-space: normal; }
.np-note { font-size: 12px; margin: 16px 0; }
.np-actions { display: flex; justify-content: flex-end; gap: 8px; }

.prod-archive { margin: 6px 0 8px; border-top: 1px solid var(--line); }
.prod-archive summary { display: flex; align-items: center; gap: 8px; padding: 12px 4px 8px; cursor: pointer; color: var(--muted);
  font-size: 13px; font-weight: 600; list-style: none; }
.prod-archive summary::-webkit-details-marker { display: none; }
.prod-archive summary::after { content: "›"; margin-left: auto; font-size: 18px; line-height: 1; transition: transform .15s; }
.prod-archive[open] summary::after { transform: rotate(90deg); }
.prod-archive summary .ic { width: 16px; height: 16px; }
.prod-archive summary:hover { color: var(--text); }
.prod-archive summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.prod-count { background: var(--panel2); border-radius: 999px; padding: 1px 8px; font-size: 12px; color: var(--text); }
.prod-row.is-archived .prod-info b { color: var(--muted); }
.np-archive { margin-top: 10px; }
@media (max-width: 900px) {
  .home-current { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .home-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .view#view-home { padding: 14px 16px 60px; }
  .hc-actions .btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .set-row { flex-wrap: wrap; }
  .set-ctl { margin-left: 42px; }
  .prod-row { flex-wrap: wrap; row-gap: 6px; }
  .prod-info { flex-basis: 100%; }
  .prod-info b { white-space: normal; }
  .prod-acts { margin-left: auto; }
  .set-txt small { white-space: normal; }
}

/* Home is the production picker: hide the open production's tabs and tools there */
body.at-home #tabs, body.at-home .brand-sep, body.at-home #brandTitle, body.at-home #saveStatus, body.at-home #btnSave,
body.at-home #btnExport, body.at-home #btnMon, body.at-home #btnMore, body.at-home #btnGoLive { display: none; }
body.at-home .topbar-right { width: auto; margin-left: auto; }
.tabs .tab-home { display: inline-flex; align-items: center; gap: 6px; }
.tabs .tab-home .ic { width: 15px; height: 15px; }
.set-foot { font-size: 12px; color: var(--muted); margin: 8px 4px 12px; line-height: 1.45; }

/* ======================= Tasks (per production) ======================= */
.tab-tasks { display: inline-flex; align-items: center; gap: 6px; }
.tab-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--panel2); color: var(--text);
  font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.tabs button.active .tab-count { background: var(--bg2); }
.tab-count.is-bad { background: var(--bad); color: #fff; }
.tasks-wrap { max-width: 1000px; margin: 0 auto; display: grid; gap: 16px; }
.tasks-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tasks-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.tasks-head p { margin: 2px 0 0; font-size: 13px; }
.tasks-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tasks-tools select { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 13px; }
.tasks-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tasks-sum .sum-top b small { font-size: 14px; color: var(--muted); font-weight: 500; }
.tasks-sum .sum-next { font-family: var(--font); font-size: 18px; }
.tasks-sum .sum-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-card.is-bad { border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.sum-card.is-bad .sum-top b { color: var(--bad); }
.task-add { display: flex; gap: 8px; }
.task-add input { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.task-add input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.task-add #taskNew { flex: 1; min-width: 0; }
.task-add #taskNewDue { width: 160px; }
.task-group { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px 8px; }
.task-group-head { display: flex; align-items: center; gap: 8px; padding: 8px 2px 6px; }
button.task-group-head { all: unset; display: flex; align-items: center; gap: 8px; padding: 8px 2px 6px; cursor: pointer; width: 100%; }
button.task-group-head:focus-visible { outline: 2px solid var(--accent); border-radius: 6px; }
.task-group-head h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.g-overdue .task-group-head h3 { color: var(--bad); }
.task-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line); }
.task-group-head + .task-row { border-top: 0; }
.task-row.is-high .task-title::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); margin: 0 6px 2px 0; }
.task-row.st-done .task-title { color: var(--muted); text-decoration: line-through; }
.task-check { position: relative; flex: none; width: 22px; height: 22px; cursor: pointer; }
.task-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.task-check span { position: absolute; inset: 0; border-radius: 50%; border: 1.6px solid var(--line-strong); transition: background .15s, border-color .15s; pointer-events: none; }
.task-check input:checked + span { background: var(--ok); border-color: var(--ok); }
.task-check input:checked + span::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.task-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.task-check:hover span { border-color: var(--ok); }
.task-main { all: unset; flex: 1; min-width: 0; display: grid; gap: 3px; cursor: pointer; padding: 2px 0; }
.task-main:focus-visible { outline: 2px solid var(--accent); border-radius: 6px; }
.task-title { font-weight: 500; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tchip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); background: var(--panel2); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.tchip .ic { width: 12px; height: 12px; }
.tchip.due-overdue { color: #fff; background: var(--bad); }
.tchip.due-soon { color: var(--warn); }
.tchip.pri-high { color: var(--warn); font-weight: 600; }
.tlink { all: unset; display: inline-flex; align-items: center; gap: 5px; max-width: 34%; font-size: 12px; color: var(--accent); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.tlink span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlink .ic { width: 14px; height: 14px; flex: none; }
.tlink:hover, .tlink:focus-visible { background: var(--sel); }
.tlink.is-gone { color: var(--muted); text-decoration: line-through; }
.task-empty { display: flex; gap: 12px; padding: 18px; background: var(--panel); border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); }
.task-empty > .ic { width: 22px; height: 22px; flex: none; }
.task-empty b { display: block; color: var(--text); margin-bottom: 3px; }
.task-empty small { font-size: 13px; line-height: 1.5; }
.prep-panel { background: var(--panel); }
.prep-intro { font-size: 13px; margin: -6px 0 8px; }
.prep-type { border-top: 1px solid var(--line); }
.prep-head { all: unset; display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 2px; cursor: pointer; box-sizing: border-box; }
.prep-head:focus-visible { outline: 2px solid var(--accent); border-radius: 6px; }
.prep-head .ic { width: 16px; height: 16px; color: var(--muted); }
.prep-count { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prep-bar { width: 90px; margin: 0; display: block; }
.prep-bar span { display: block; height: 100%; background: var(--ok); }
.prep-list { padding: 0 0 8px 24px; }
.prep-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.prep-info { flex: 1; min-width: 0; display: grid; }
.prep-info b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prep-info small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prep-needs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.prep-acts { display: flex; flex: none; }
.prep-acts .icon-btn { padding: 5px 7px; }
.prep-done { margin: 0 0 10px 24px; color: var(--ok); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.prep-done .ic { width: 16px; height: 16px; }
.seg-task { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.seg-task .link-btn { text-align: left; color: var(--text); flex: 1; }
.seg-task.is-done .link-btn { color: var(--muted); text-decoration: line-through; }
.hc-tasks { cursor: pointer; transition: background .15s; }
.hc-tasks:hover { background: var(--panel2) !important; }
.hc-tasks:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hc-tasks.is-bad dd { color: var(--bad); }
.hc-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-stats dd.hc-next { font-size: 20px; }
@media (max-width: 900px) { .tasks-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .task-add { flex-wrap: wrap; }
  .task-add #taskNew { flex-basis: 100%; }
  .task-add #taskNewDue { flex: 1; width: auto; }
  .task-row { flex-wrap: wrap; }
  .tlink { max-width: none; margin-left: 32px; }
  .prep-list { padding-left: 0; }
  .prep-row { flex-wrap: wrap; }
  .prep-needs { justify-content: flex-start; }
  .prep-bar { display: none; }
}
@media (max-width: 700px) {
  /* five tabs don't fit a phone: tighter, and the bar scrolls sideways instead of widening the page */
  .tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; padding: 7px 10px; }
  .tasks-sum .sum-top { flex-direction: column; align-items: flex-start; gap: 2px; }
  .tasks-sum .sum-next { font-size: 16px; }
  .prep-info { flex: 1 1 calc(100% - 40px); }
  .prep-needs { margin-left: 32px; flex: 1; }
}

/* ---------- Tasks: team (people) and statuses ---------- */
.people-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; }
.people-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.people-head h3 { margin: 0; font-size: 15px; }
.people-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.person { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg2); cursor: pointer; min-width: 0; transition: border-color .15s, background .15s; }
.person:hover { border-color: var(--line-strong); }
.person:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.person.is-on { border-color: var(--accent); background: var(--sel); }
.person-txt { display: grid; min-width: 0; gap: 1px; }
.person-txt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-txt small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-counts { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-counts .pc-open { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.bad { color: var(--bad); }
.person-add { justify-content: center; color: var(--accent); border-style: dashed; font-weight: 500; }
.person-add .ic { width: 16px; height: 16px; }
.person-add-form { cursor: default; flex-direction: column; align-items: stretch; gap: 6px; grid-column: span 2; }
.person-add-form input { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.person-add-form input:focus { outline: none; border-color: var(--accent); }
.person-add-btns { display: flex; gap: 6px; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  color: #fff; background: var(--av, var(--c-break)); letter-spacing: .02em; }
.avatar .ic { width: 16px; height: 16px; }
.avatar.all { background: var(--panel2); color: var(--text); }
.avatar.none { background: var(--panel2); color: var(--muted); }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.xs { width: 16px; height: 16px; font-size: 8px; }
.avatar.lg { width: 48px; height: 48px; font-size: 17px; }
.tchip.who { padding-left: 3px; }
.tchip.muted-chip { opacity: .7; }
.task-add select { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; max-width: 200px; }
.task-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px;
  background: var(--sel); font-size: 14px; }
.task-none { margin: 4px 2px; }
/* status: a small pill dropdown on each task */
.status-pill { appearance: none; -webkit-appearance: none; flex: none; border: 0; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; background: var(--panel2); color: var(--text); text-align: center; }
.status-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.status-todo { background: var(--panel2); color: var(--text); }
.status-doing { background: color-mix(in srgb, var(--c-speech) 22%, transparent); color: var(--c-speech); }
.status-waiting { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.status-done { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.status-select.status-doing, .status-select.status-waiting, .status-select.status-done, .status-select.status-todo { background: var(--panel); color: var(--text); }
.status-pill option, .status-select option { background: var(--panel); color: var(--text); }
.inline-person { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 14px; padding: 10px; border-radius: 10px; background: var(--sel); }
.inline-person input { flex: 1 1 140px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.person-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.person-hero b { display: block; font-size: 18px; }
.person-hero small { font-size: 13px; color: var(--muted); }
.seg-task .tchip { flex: none; }
@media (max-width: 700px) {
  .people-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person-add-form { grid-column: 1 / -1; }
  .task-add select { flex: 1; max-width: none; }
  .task-row .status-pill { margin-left: 32px; }
}
@media (max-width: 700px) { .person-counts { white-space: normal; } .person { align-items: flex-start; } }

/* ---------- delegating from Assets and the Rundown ---------- */
.person-pick { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 13px;
  max-width: 190px; color: var(--muted); }
.person-pick.has-person { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.person-pick:focus { outline: none; border-color: var(--accent); }
.c-who { min-width: 170px; white-space: nowrap; }
.c-who .person-pick { width: 100%; }
.who-status { all: unset; display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; cursor: pointer; }
.who-status:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sec-tools { display: flex; gap: 8px; align-items: center; }
.sec-tools .sec-note { flex: 1; min-width: 0; }
.sec-tools .person-pick { flex: none; max-width: 240px; }
.seg-badge { display: inline-flex; align-items: center; gap: 3px; margin-top: 6px; padding: 2px 8px 2px 3px; border-radius: 999px;
  background: var(--panel2); font-size: 11px; color: var(--muted); }
.seg-badge span:last-child { margin-left: 3px; }
.seg-badge .ic { width: 12px; height: 12px; vertical-align: -2px; color: var(--ok); }
.seg-badge.is-late { color: var(--bad); }
.seg-task { flex-wrap: wrap; }
.seg-task .person-pick { max-width: 150px; padding: 3px 6px; font-size: 12px; }
.seg-task .status-pill { padding: 3px 10px; }
.seg-task-add { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 6px; }
.seg-task-add input { flex: 1 1 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.seg-task-add input:focus { outline: none; border-color: var(--accent); }
.prep-row .person-pick { max-width: 160px; flex: none; }
@media (max-width: 700px) {
  .sec-tools { flex-wrap: wrap; }
  .sec-tools .person-pick { max-width: none; flex: 1; }
  .prep-row .person-pick { margin-left: 32px; max-width: none; flex: 1; }
}
/* Assets table: columns keep a readable width; on a narrow window the table scrolls sideways inside its section */
.asset-sec { overflow-x: auto; }
table.assets-table { min-width: 900px; }
.assets-table .a-name { min-width: 170px; }
.assets-table .a-uses { min-width: 190px; }
.assets-table .link-cell input { min-width: 140px; }
.assets-table input[data-a="note"] { min-width: 130px; }
.assets-table select[data-a="type"] { min-width: 96px; }
