/* Copper Leaf show timeline — styles. Copper Leaf brand: navy, orange, crimson; Montserrat + Roboto. */
:root {
  --bg: #0F1529;
  --panel: #141C35;
  --panel2: #192341;
  --panel3: #1F2A4D;
  --line: #2A3558;
  --line2: #222C4F;
  --line3: #3A4672;
  --text: #FFFFFF;
  --soft: #D9DDE8;
  --muted: #B8BFD3;
  --dim: #8C95B0;
  --orange: #FF7800;
  --orange2: #FF9A45;
  --crimson: #F22A5C;
  --purple: #C77DFF;
  --green: #4CC79A;
  --amber: #FFD166;
  --grad: linear-gradient(135deg, #F22A5B, #FF7713);
  --r: 12px;
  --mono: 'Roboto Mono', ui-monospace, Menlo, monospace;
  --head: Montserrat, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Roboto, 'Helvetica Neue', Arial, sans-serif; font-size: 14px; line-height: 1.45; }
a { color: var(--orange2); }
a:hover { color: #FFB27A; }
button, input, select, textarea { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--crimson); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -0.01em; margin: 0; }
h1 { font-weight: 800; font-size: 28px; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-weight: 700; font-size: 17px; }
h3 { font-weight: 600; font-size: 14px; }
p { margin: 0; }
input, select, textarea { background: var(--bg); border: 1px solid var(--line3); border-radius: 8px; padding: 8px 10px; min-height: 38px; max-width: 100%; min-width: 0; }
textarea { resize: vertical; line-height: 1.5; }
input[disabled], select[disabled], textarea[disabled] { opacity: 0.7; }
input[type=checkbox], input[type=radio] { min-height: 0; width: 17px; height: 17px; accent-color: var(--orange); margin: 0; flex: 0 0 auto; }
input[type=color] { padding: 2px; width: 46px; }
input[type=range] { accent-color: var(--orange); min-height: 0; padding: 0; border: 0; background: none; width: 160px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.b { font-weight: 600; }
.amber { color: var(--amber); }
.good { color: var(--green); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.gap4 { gap: 4px; } .gap8 { gap: 8px; } .gap16 { gap: 16px; }
.grow { flex: 1 1 auto; min-width: 0; }
.pad8 { padding: 8px; } .pad16 { padding: 12px 16px; }
.sep { width: 1px; height: 22px; background: var(--line3); margin: 0 4px; }
.eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-weight: 500; display: block; }
.eyebrow.good { color: var(--green); }
.empty { padding: 60px 24px; text-align: center; color: var(--muted); }
.booting { padding: 80px; text-align: center; color: var(--muted); }

/* ---------- buttons & chips */
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line3); background: transparent; color: var(--text); font-family: var(--head); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 140ms cubic-bezier(.4,0,.2,1), filter 140ms; }
.btn:hover { background: rgba(255,255,255,0.05); color: var(--text); transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #192341; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.06); background: var(--orange); }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { border-color: var(--line3); }
.btn.danger { color: #FF8AA6; }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 12px; }
.btn.tiny { min-height: 28px; padding: 0 10px; font-size: 11px; gap: 4px; }
.btn.big { min-height: 48px; padding: 0 24px; font-size: 15px; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line3); background: transparent; color: var(--text); cursor: pointer; flex: 0 0 auto; text-decoration: none; }
.iconbtn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.iconbtn.on { background: var(--orange); color: #192341; border-color: var(--orange); }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; padding: 4px 0; min-height: 32px; }
.linkbtn:hover { color: var(--text); }
.roundbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line3); background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.roundbtn.play { width: 54px; height: 54px; border: 0; background: var(--grad); box-shadow: 0 6px 18px rgba(242,42,92,0.35); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 500; border: 1px solid var(--line3); color: var(--soft); white-space: nowrap; }
.chip.intl { background: var(--green); color: #0F1529; border-color: var(--green); }
.chip.pend { border: 1px dashed var(--amber); color: var(--amber); }
.chip.warn { background: rgba(255,209,102,0.18); border-color: var(--amber); color: var(--amber); }
.chip.st-placeholder { border-style: dashed; color: var(--muted); }
.chip.st-temp { background: rgba(255,120,0,0.18); border-color: rgba(255,120,0,0.6); color: #FFB27A; }
.chip.st-final { background: var(--green); border-color: var(--green); color: #0F1529; }
.chip.lane { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--text); }
.pill { min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line3); background: transparent; color: var(--soft); font-size: 12px; cursor: pointer; }
.pill.on { background: var(--amber); border-color: var(--amber); color: #192341; font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.diamond { display: inline-block; width: 8px; height: 8px; background: var(--purple); transform: rotate(45deg); }

/* ---------- forms */
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; min-width: 0; }
.field > span:first-child { font-size: 12px; color: var(--dim); }
.field.small > span:first-child { font-size: 11px; }
.field.inline { margin: 0; }
.field .val { padding: 6px 0; }
.titleinput { font-family: var(--head); font-weight: 700; font-size: 17px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; }
.radio { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; margin-bottom: 8px; }
.radio:has(input:checked) { border-color: rgba(255,120,0,0.6); background: rgba(255,120,0,0.1); }
.radio > span { display: flex; flex-direction: column; gap: 2px; }
.ripple { border: 0; padding: 0; margin: 12px 0; }
.ripple legend { font-family: var(--head); font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; border: 2px dashed var(--line3); border-radius: 12px; padding: 16px; text-align: center; cursor: pointer; margin-bottom: 12px; color: var(--muted); }
.drop:hover, .drop.over { border-color: var(--orange); color: var(--text); }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width 200ms; }
.note { padding: 10px 12px; border-radius: 8px; background: var(--panel3); font-size: 13px; margin: 8px 0; }
.note.warn { background: rgba(255,209,102,0.12); border: 1px solid rgba(255,209,102,0.5); }
.note ul { margin: 6px 0 0; padding-left: 18px; }
.quote { padding: 10px 14px; background: var(--bg); border-radius: 8px; line-height: 1.55; color: #E6E9F1; margin: 0 0 10px; }
.example { background: var(--bg); padding: 10px 12px; border-radius: 8px; font-size: 12px; white-space: pre-wrap; margin: 6px 0 10px; }
.codebox { font-family: var(--mono); font-size: 22px; letter-spacing: 0.3em; width: 170px; text-align: center; }

/* ---------- tables & lists */
.tblwrap { overflow-x: auto; position: relative; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; color: var(--dim); font-size: 12px; padding: 10px 12px; border-bottom: 2px solid var(--line3); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-top: 1px solid var(--line2); vertical-align: top; }
.tbl tbody tr[data-id], .tbl tbody tr[data-obj] { cursor: pointer; }
.tbl tbody tr[data-id]:hover, .tbl tbody tr[data-obj]:hover { background: rgba(255,255,255,0.03); }
.tbl tr.selrow { background: #1B2546; box-shadow: inset 3px 0 0 var(--amber); }
.tbl input, .tbl select { min-height: 32px; padding: 4px 8px; width: 100%; min-width: 80px; }
.tbl input.num { width: 70px; min-width: 60px; }
.tbl input.short { width: 70px; min-width: 50px; }
.tbl.kf td, .tbl.kf th { padding: 4px; }
.tbl.kf input.mono { min-width: 118px; }
.tbl.matrix select { min-width: 92px; }
.lv.lv0 { color: var(--dim); }
.lv.lv3 { color: var(--amber); }
.lv.lv4 { color: var(--orange2); }
.lv.lv5 { color: var(--green); }
.rolename { font-family: var(--head); font-weight: 600; min-width: 150px; }
.listrow { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid var(--line2); }
.listrow:first-of-type { border-top: 0; }
.listrow.big { padding: 12px 16px; cursor: pointer; }
.listrow.big:hover { background: rgba(255,255,255,0.03); }
.lanehead { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; }

/* ---------- toasts & modals */
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 300; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--panel2); border: 1px solid var(--line3); border-radius: 10px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(0,0,0,0.35); transition: opacity 400ms, transform 400ms; }
.toast.good { border-color: var(--green); }
.toast.bad { border-color: var(--crimson); }
.toast.out { opacity: 0; transform: translateY(8px); }
.modalwrap { position: fixed; inset: 0; background: rgba(8,12,26,0.72); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 200; overflow-y: auto; }
.modal { background: var(--panel); border: 1px solid var(--line3); border-radius: 14px; width: min(520px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.modal.wide { width: min(780px, 100%); }
.modalhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modalbody { padding: 16px 18px; }
.modalbody p { margin-bottom: 10px; }
.modalfoot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 18px 16px; border-top: 1px solid var(--line); }

/* ---------- sign in & plain pages */
.signin { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px 16px; background: radial-gradient(circle at 85% -10%, rgba(242,42,92,0.18), transparent 45%), var(--bg); }
.signbrand { display: flex; align-items: center; gap: 14px; }
.sbtitle { font-family: var(--head); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.sbsub { color: var(--muted); }
.signcard { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.signsec { display: flex; flex-direction: column; gap: 10px; }
.signsec p { color: var(--muted); }
.signor { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px; }
.signor::before, .signor::after { content: ''; flex: 1; height: 1px; background: var(--line); }
body.plain { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.plainbox { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; max-width: 520px; margin: 10vh auto; display: flex; flex-direction: column; gap: 12px; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--panel2); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 6px; }
.brandname { font-family: var(--head); font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.brandsub { font-size: 12px; color: var(--muted); }
.projname { font-size: 12px; color: var(--muted); padding: 0 6px; line-height: 1.35; }
.projsel { width: 100%; font-size: 12px; }
.navlist { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.navit { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--soft); text-decoration: none; font-size: 13px; min-height: 40px; }
.navit:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.navit.on { background: var(--bg); color: var(--text); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line3); }
.navit.sub { padding-left: 14px; min-height: 34px; font-size: 12.5px; }
.navcount { margin-left: auto; background: var(--crimson); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 20px; padding: 1px 6px; text-align: center; }
.navhead { margin: 14px 10px 4px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.sidefoot { border-top: 1px solid var(--line); padding: 12px 6px 0; display: flex; flex-direction: column; gap: 4px; }
.whoname { font-weight: 500; }
.whorole { font-size: 12px; color: var(--muted); }
.appver { font-size: 11px; color: var(--dim); font-family: var(--mono); }
.main { padding: 22px 24px 40px; min-width: 0; }
.main:focus { outline: none; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead > div:first-child { display: flex; flex-direction: column; gap: 6px; max-width: 860px; }
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 16px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.sm { padding: 10px 12px; margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.card h2 { margin-bottom: 10px; }
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cardhead h2 { margin: 0; }
.twocol { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.twocol > * { min-width: 0; }
.twocol > :first-child { flex: 1 1 260px; }
.twocol > :last-child { flex: 999 1 560px; }
.twocol.wideleft > :first-child { flex: 999 1 560px; }
.twocol.wideleft > :last-child { flex: 1 1 340px; max-width: 460px; }
.twocol.eq > * { flex: 1 1 420px; }
.filters { margin-bottom: 14px; }

/* ---------- timeline page */
.tlpage { display: flex; flex-direction: column; gap: 0; }
.tltop { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.preview { flex: 999 1 560px; display: flex; flex-direction: column; gap: 10px; }
.insp { flex: 1 1 360px; max-width: 520px; display: flex; flex-direction: column; gap: 10px; }
.room { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 0 6px; perspective: 900px; }
.scr { position: relative; background: #1F2A4D; border-radius: 3px; overflow: hidden; flex: 0 0 auto; }
.scr video, .scr img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.scr-l2 { width: 9%; aspect-ratio: 3 / 4.5; transform: rotateY(48deg); }
.scr-l1 { width: 11%; aspect-ratio: 3 / 4.5; transform: rotateY(30deg); background: #23305A; }
.scr-c { width: 52%; aspect-ratio: 8 / 3; background: #0B1022; border: 1px solid var(--line3); border-radius: 4px; }
.scr-r1 { width: 11%; aspect-ratio: 3 / 4.5; transform: rotateY(-30deg); background: #23305A; }
.scr-r2 { width: 9%; aspect-ratio: 3 / 4.5; transform: rotateY(-48deg); }
.scr-c video, .scr-c img { object-fit: contain; }
.scrlabel { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px; font-size: 10px; color: var(--soft); line-height: 1.2; }
.scr-c .scrlabel { font-family: var(--head); font-weight: 700; font-size: 14px; }
.scrname { position: absolute; left: 6px; top: 4px; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.scr.broken .scrlabel { color: var(--amber); z-index: 1; background: rgba(15,21,41,0.8); }
.scr.has .scrname { color: rgba(255,255,255,0.75); text-shadow: 0 1px 2px #000; }
.subtitle { min-height: 22px; text-align: center; font-size: 13px; color: var(--muted); }
.subtitle.on { color: #fff; }
.lxnow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: rgba(255,209,102,0.08); border: 1px solid rgba(255,209,102,0.45); color: var(--text); text-decoration: none; font-size: 13px; color: var(--amber); }
.lxnow:hover { color: var(--amber); background: rgba(255,209,102,0.14); }
.lxcue { font-weight: 500; white-space: nowrap; }
.lxtext { flex: 1; min-width: 0; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lxnext { font-size: 12px; color: var(--muted); white-space: nowrap; }
.transport { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.tcbox { display: flex; flex-direction: column; line-height: 1.15; margin-left: 4px; }
.tcbig { font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: 0.02em; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg); border-radius: 999px; }
.seg button { min-height: 32px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: var(--soft); font-family: var(--head); font-weight: 600; font-size: 12px; cursor: pointer; }
.seg button.on { background: #fff; color: #192341; }
.inspempty { display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
.tips { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.7; }
.insph { font-size: 18px; line-height: 1.3; }
.nowbox { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 10px; background: rgba(76,199,154,0.12); border: 1px solid var(--green); min-width: 0; }
.nowbox.none { background: transparent; border: 1px dashed var(--dim); }
.nowbox.new { background: rgba(255,209,102,0.08); border-color: rgba(255,209,102,0.6); }
.nowbox .fname { font-size: 13px; word-break: break-all; }
.vlist { display: flex; flex-direction: column; gap: 6px; }
.vrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--bg); border: 1px solid var(--bg); font-size: 12px; }
.vrow.cur { background: rgba(76,199,154,0.12); border-color: rgba(76,199,154,0.6); }
.vno { min-width: 26px; font-weight: 500; }
.vinfo { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.vrow .iconbtn { width: 28px; height: 28px; }
.rights { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.insact { margin-top: 4px; }
.thread { display: flex; flex-direction: column; gap: 8px; }
.msg { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.msg.reply { margin-left: 16px; }
.msg p { margin-top: 4px; white-space: pre-wrap; }

.tlcard { padding: 0; overflow: hidden; }
.tltools { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.tlctl { font-size: 12px; }
.overview { position: relative; height: 24px; border-radius: 5px; background: var(--bg); overflow: hidden; cursor: pointer; }
.ovs { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--muted); background: #1F2A4D; }
.ovs:nth-child(even) { background: #23305A; }
.ovwin { position: absolute; top: 0; bottom: 0; border: 2px solid var(--orange); border-radius: 5px; pointer-events: none; }
.ovhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; pointer-events: none; }
.legend { display: inline-flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin-left: auto; color: var(--muted); }
.lg { display: inline-block; width: 20px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 2px; font-style: normal; }
.lg.ph { border: 1px dashed var(--muted); }
.lg.tmp { border: 1px solid var(--muted); background: rgba(184,191,211,0.3); }
.lg.fin { background: var(--muted); }
.lg.ver { width: auto; height: auto; padding: 0 4px; background: var(--bg); color: #fff; font-family: var(--mono); font-size: 10px; border: 1px solid var(--line3); }
.tlscroll { overflow: auto; max-height: calc(100vh - 140px); position: relative; }
.tlinner { position: relative; }
.ruler { display: flex; height: 28px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 6; background: var(--panel); }
.lhead { flex: 0 0 210px; width: 210px; position: sticky; left: 0; z-index: 5; background: var(--panel); border-right: 1px solid var(--line); padding: 3px 8px 3px 12px; display: flex; flex-direction: column; justify-content: center; gap: 1px; overflow: hidden; }
.rulerhead { z-index: 7; }
.rtrack { position: relative; cursor: pointer; }
.tick { position: absolute; top: 0; bottom: 0; padding-left: 4px; border-left: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--dim); display: flex; align-items: center; pointer-events: none; white-space: nowrap; }
.lrow { display: flex; height: 38px; border-bottom: 1px solid var(--line2); }
.lrow.k-scene { height: 34px; border-bottom-color: var(--line3); }
.lrow[data-lane="vAnn"], .lrow[data-lane="sfx"], .lrow[data-lane="obj"], .lrow[data-lane="scrR2"] { border-bottom-color: var(--line3); }
.lrow.k-comments { height: 40px; }
.lname { display: flex; align-items: center; gap: 7px; font-family: var(--head); font-weight: 600; font-size: 12px; white-space: nowrap; min-width: 0; }
.lockic { color: var(--dim); display: inline-flex; }
.lmeta { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--dim); min-width: 0; }
.lmeta .ell { flex: 1; }
.ms { display: inline-flex; gap: 3px; flex: 0 0 auto; }
.msb { width: 20px; height: 18px; border-radius: 4px; border: 1px solid var(--line3); background: transparent; color: var(--dim); font-size: 10px; font-weight: 700; cursor: pointer; padding: 0; line-height: 1; }
.msb.on { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.msb.solo.on { background: var(--amber); border-color: var(--amber); color: #192341; }
.ltrack { position: relative; flex: 0 0 auto; }
.blk { position: absolute; top: 4px; bottom: 4px; border-radius: 5px; padding: 0 6px; display: flex; align-items: center; gap: 5px; overflow: hidden; font-size: 11px; font-weight: 500; text-align: left; cursor: pointer; border: 1px dashed var(--c); color: var(--c); background: transparent; min-width: 4px; }
.blk.st-temp { background: var(--ct); border: 1px solid var(--cb); color: #fff; }
.blk.st-final { background: var(--c); border: 1px solid var(--c); color: #121A31; }
.blk.scene { background: #1F2A4D; border: 1px solid var(--line); color: var(--soft); }
.blk.scene.locked { box-shadow: inset 0 -3px 0 var(--green); }
.blk.sel { box-shadow: 0 0 0 2px #fff; z-index: 3; }
.blk.drag { cursor: grab; touch-action: none; }
.blk.dragging { cursor: grabbing; opacity: 0.85; z-index: 4; }
.blk.cutdim { opacity: 0.3; text-decoration: line-through; }
.blabel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.blkic { display: inline-flex; color: var(--green); }
.bver { flex: 0 0 auto; padding: 1px 5px; border-radius: 3px; background: var(--bg); color: #fff; font-family: var(--mono); font-size: 10px; line-height: 1.4; }
.bflag { flex: 0 0 auto; padding: 1px 5px; border-radius: 3px; font-size: 10px; line-height: 1.4; }
.bflag.warn { background: var(--amber); color: #192341; }
.bflag.pend { border: 1px dashed var(--amber); color: var(--amber); background: rgba(15,21,41,0.6); }
.grip { position: absolute; right: 0; top: 0; bottom: 0; width: 7px; cursor: ew-resize; }
.grip:hover { background: rgba(255,255,255,0.25); }
.cue { position: absolute; top: 0; bottom: 0; border: 0; background: transparent; padding: 0; cursor: pointer; display: flex; align-items: center; color: var(--c); font-size: 11px; white-space: nowrap; }
.cue.drag { cursor: grab; touch-action: none; }
.cline { position: absolute; top: 3px; bottom: 3px; left: -1px; width: 2px; border-radius: 1px; background: var(--c); }
.clabel { margin-left: 6px; padding: 2px 7px; border-radius: 4px; background: color-mix(in srgb, var(--c) 16%, transparent); color: #fff; font-weight: 500; }
.cue.sel .clabel { outline: 2px solid #fff; background: color-mix(in srgb, var(--c) 40%, transparent); }
.cue.moved .clabel { box-shadow: inset 0 0 0 1px var(--amber); }
.pin { position: absolute; top: 6px; width: 27px; height: 27px; border-radius: 50% 50% 50% 4px; border: 0; background: var(--orange); color: #192341; font-weight: 700; font-size: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.pin.done { background: var(--line3); color: var(--muted); }
.pin.sel { box-shadow: 0 0 0 2px #fff; }
.cut { position: absolute; top: 28px; bottom: 0; background: repeating-linear-gradient(135deg, rgba(242,42,92,0.06) 0 6px, transparent 6px 12px); border-left: 1px dashed rgba(242,42,92,0.5); border-right: 1px dashed rgba(242,42,92,0.5); pointer-events: none; z-index: 2; }
.cut span { position: absolute; top: 2px; left: 4px; font-size: 10px; color: #FF8AA6; white-space: nowrap; }
.cut.active { background: repeating-linear-gradient(135deg, rgba(242,42,92,0.2) 0 6px, rgba(15,21,41,0.35) 6px 12px); }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(15,21,41,0.6); pointer-events: none; z-index: 8; }
.cutrow { display: grid; grid-template-columns: 140px auto 140px minmax(0, 1fr) 34px; gap: 8px; align-items: center; margin-bottom: 8px; }

/* ---------- script page */
.scenelist { display: flex; flex-direction: column; gap: 2px; max-width: 300px; position: sticky; top: 16px; }
.scn { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 8px; color: var(--soft); text-decoration: none; font-size: 13px; }
.scn:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.scn.on { background: var(--panel2); color: var(--text); font-weight: 500; }
.lines { display: flex; flex-direction: column; gap: 18px; }
.sceneblock { display: flex; flex-direction: column; gap: 8px; }
.line { display: flex; gap: 14px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.line.attn { border-color: rgba(255,209,102,0.6); }
.lnum { display: flex; flex-direction: column; min-width: 56px; }
.ltext { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ltext .who { font-size: 12px; font-weight: 700; color: var(--orange2); letter-spacing: 0.06em; }
.ltext textarea { font-size: 15px; background: transparent; border-color: var(--line); }
.ltext p { font-size: 15px; line-height: 1.55; }
.lfile { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 280px; min-width: 0; }

/* ---------- room page */
.planwrap { background: var(--bg); border-radius: 10px; padding: 8px; }
.plan { width: 100%; height: auto; display: block; font-family: Roboto, sans-serif; }
.legendrow { margin-top: 10px; }

/* ---------- approvals */
.appr .cmp { margin: 12px 0; gap: 12px; }
.appr input { min-width: 200px; }

/* ---------- smaller screens */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .navlist { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; }
  .navhead { flex-basis: 100%; }
  .sidefoot { flex-direction: row; align-items: center; gap: 12px; border-top: 0; padding: 0; }
  .main { padding: 16px; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scenelist { position: static; max-width: none; }
}
@media (max-width: 560px) {
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 23px; }
}
/* scenes manager */
p.warn { color: var(--amber); }
.scenetbl td { vertical-align: middle; }
.scenetbl input { min-width: 70px; }
.scenetbl td:nth-child(2) input { min-width: 180px; }
.scenetbl td:nth-child(3) input, .scenetbl td:nth-child(4) input { width: 120px; }
.signhelp { margin: 16px 0 0; text-align: center; }
.sidefoot a.linkbtn { text-decoration: none; display: flex; }
/* room plan editing */
.palette { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.palchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line3); color: var(--soft); font-size: 12px; cursor: grab; min-height: 30px; }
.palchip:hover, .palchip.on { border-color: var(--orange); color: var(--text); }
.planwrap.placing svg { cursor: crosshair; }
.plan .spkdot.movable { cursor: grab; }
.plan .spkdot.movable:active { cursor: grabbing; }
.plan .spkdot { touch-action: none; }
.spkbox { margin-top: 12px; padding: 12px; border: 1px solid var(--line3); border-radius: 10px; background: var(--panel2); }
.spkbox .grid4 { gap: 8px; margin-top: 6px; }
/* background jobs */
.jobs { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.jobcard { pointer-events: auto; background: var(--panel2); border: 1px solid var(--line3); border-radius: 12px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 6px; }
.jobcard.good { border-color: rgba(76,199,154,.6); }
.jobcard.warn { border-color: rgba(255,209,102,.6); }
.jobcard .progress { height: 6px; background: var(--line2); border-radius: 3px; overflow: hidden; }
.jobcard .progress span { display: block; height: 100%; background: var(--orange); }
/* AI voice at work */
.aiwork { color: #7FD0F0; display: inline-flex; align-items: center; gap: 6px; }
.note.aiwork { display: flex; background: rgba(127,208,240,0.10); border: 1px solid rgba(127,208,240,0.45); }
.bflag.ai { background: #7FD0F0; color: #0F1529; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.loadnote { color: #7FD0F0; display: none; } .loadnote.on { display: block; }
/* drag to reorder rows */
.dragtbl .gripcell { width: 28px; padding-right: 0; }
.grip { background: none; border: 0; color: var(--dim); cursor: grab; padding: 6px 4px; border-radius: 6px; display: inline-flex; }
.grip:hover, .grip:focus-visible { color: var(--text); background: var(--panel3); }
.dragtbl tr.dragging { opacity: 0.45; }
.dragtbl tr.dropbefore td { box-shadow: inset 0 2px 0 var(--orange); }
.dragtbl tr.dropafter td { box-shadow: inset 0 -2px 0 var(--orange); }
.cardhead .small.muted { margin-right: auto; margin-left: 12px; }
/* cue control details */
.ctlbox { border: 1px solid var(--line3); border-radius: 10px; padding: 10px 12px 4px; margin: 8px 0 12px; }
.ctlbox legend { font-size: 12px; color: var(--dim); padding: 0 6px; text-transform: uppercase; letter-spacing: .1em; }
.cyan { color: #7FD0F0; }
/* cue control details */
.ctlbox { border: 1px solid var(--line3); border-radius: 10px; padding: 10px 12px 4px; margin: 8px 0 12px; }
.ctlbox legend { font-size: 12px; color: var(--dim); padding: 0 6px; text-transform: uppercase; letter-spacing: .1em; }
.cyan { color: #7FD0F0; }
/* checklist */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line3); color: var(--soft); font-size: 13px; cursor: pointer; min-height: 34px; }
.fchip:hover { color: var(--text); border-color: var(--muted); }
.fchip.on { background: var(--orange); border-color: var(--orange); color: #111; font-weight: 600; }
.fchip .cnt { font-size: 11px; padding: 0 6px; border-radius: 999px; background: rgba(0,0,0,0.25); }
.filtrow { margin-bottom: 14px; }
.progress.big { height: 8px; max-width: 520px; }
.chkscene { margin: 0; padding: 10px 16px 6px; font-size: 13px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; border-top: 1px solid var(--line2); }
.chkrow { padding: 6px 16px; }
.chklane { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-width: 150px; white-space: nowrap; }
.chip.ph { border-style: dashed; }
.chip.tmp { background: #2B3456; }
@media (max-width: 900px) { .chklane { min-width: 0; } }
/* room tabs and lighting */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 10px 16px; font-size: 15px; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--orange); font-weight: 600; }
.ltop { align-items: center; margin-bottom: 8px; }
.ltop select { max-width: 340px; }
.ltop input[type=range] { flex: 1 1 200px; min-width: 160px; }
.lcueline { margin: 0 0 12px; font-size: 14px; }
.aview { width: 100%; height: auto; display: block; border-radius: 10px; margin-top: 8px; }
.lplanwrap svg { width: 100%; height: auto; display: block; }
.lplan .fix.movable { cursor: grab; }
.lplan.aiming, .lplan.placing { cursor: crosshair; }
.lplan .fix { touch-action: none; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; border: 1px solid var(--line3); }
input[type=color] { min-height: 34px; padding: 2px; }
