/* Habib's approval room. Warm near-black with a saffron accent for actions (the Troster room's layout).
   App shell: fixed sidebar + one page at a time that fits the viewport; only inner panels scroll. */
:root {
  --bg: #0E0B09;
  --side: #120E0B;
  --raise: #18130F;
  --raise2: #201914;
  --line: #2A211B;
  --line2: #3B2F26;
  --text: #F6EFE7;
  --muted: #BCAB9B;
  --dim: #87776A;
  --led: #FFC233;
  --led-soft: rgba(255, 194, 51, 0.1);
  --led-edge: rgba(255, 194, 51, 0.38);
  --ink: #1C1204;
  --amber: #FF6A4D;
  --amber-soft: rgba(255, 106, 77, 0.1);
  --amber-edge: rgba(255, 106, 77, 0.38);
  --r: 14px;
  --r-sm: 10px;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --head: "Space Grotesk", system-ui, sans-serif;
  --dot: "Space Grotesk", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); }
body { color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--led); outline-offset: 2px; }
::selection { background: var(--led); color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

img:not([src]) { visibility: hidden; }
.booting { min-height: 100vh; display: grid; place-items: center; color: var(--dim); }
.led { font-family: var(--dot); font-weight: 900; color: var(--led); letter-spacing: 0.03em; text-shadow: 0 0 14px rgba(255, 194, 51, 0.45); }
.num { font-family: var(--dot); font-weight: 900; color: var(--dim); }
.muted { color: var(--muted); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.side { display: flex; flex-direction: column; min-height: 0; background: var(--side); border-right: 1px solid var(--line); }
.side-top { padding: 22px 20px 16px; }
.side-top .led { font-size: 19px; display: block; }
.room { margin-top: 2px; color: var(--dim); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 12px 16px; }
.rtabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 3px; margin: 4px 0 18px; border: 1px solid var(--line); border-radius: 10px; }
.rtabs a { display: flex; align-items: center; justify-content: center; height: 30px; border-radius: 7px; font-family: var(--dot); font-weight: 900; font-size: 13px; color: var(--dim); }
.rtabs a:hover { color: var(--text); }
.rtabs a.on { background: var(--raise2); color: var(--led); }
.side-label { padding: 0 8px; margin: 16px 0 6px; color: var(--dim); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px; border-radius: 8px; color: var(--muted); white-space: nowrap; }
.nav:hover { background: var(--raise); color: var(--text); }
.nav.on { background: var(--raise2); color: var(--text); }
.nav .num, .nav .ico { width: 20px; flex: none; text-align: center; font-size: 13px; }
.nav.on .num { color: var(--led); }
.nav .ico { color: var(--dim); display: inline-flex; justify-content: center; }
.nav .ico svg { width: 15px; height: 15px; }
.nav .dot { margin-left: auto; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.dot { flex: none; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--line2); }
.dot.ok { background: var(--led); box-shadow: 0 0 8px rgba(255, 194, 51, 0.6); }
.dot.wk { background: var(--muted); }
.dot.warn { background: var(--amber); }
.side-note { margin: 8px 8px 0; padding: 12px; border: 1px dashed var(--line2); border-radius: var(--r-sm); color: var(--muted); font-size: 12px; line-height: 1.45; }
.side-foot { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.side-foot .me { color: var(--text); font-weight: 600; }

.main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; padding: 14px 32px; border-bottom: 1px solid var(--line); }
.mh-title { min-width: 0; }
.mh-title .eyebrow { margin-bottom: 2px; }
.mh-title h1 { font-family: var(--head); font-size: 26px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; display: flex; align-items: baseline; gap: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-title h1 .num { font-size: 24px; color: var(--led); }
.mh-title p { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.6; }
.look { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.sw { display: inline-flex; }
.sw i { width: 12px; height: 12px; border-radius: 50%; margin-right: -3px; border: 1px solid rgba(255,255,255,.12); }
.mh-title .copy { font-size: 12px; color: var(--led); }
.mh-right { flex: none; display: flex; align-items: center; gap: 10px; }
.main-body { flex: 1; min-height: 0; overflow: auto; padding: 24px 32px 28px; }
.main-body.fill { display: flex; flex-direction: column; overflow: hidden; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--led); }
.mobile-bar { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; font-size: 13px; font-weight: 500; white-space: nowrap; transition: border-color 0.15s, background 0.15s, filter 0.15s; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--led); border-color: var(--led); color: var(--ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.07); }
.btn:disabled, .btn.off { opacity: 0.35; cursor: not-allowed; pointer-events: none; filter: none; }
.btn.small { height: 32px; padding: 0 12px; font-size: 12px; }
.btn.icon { width: 38px; padding: 0; font-size: 16px; }
.link { background: none; border: 0; color: var(--muted); font-size: 13px; transition: color 0.15s; }
.link:hover { color: var(--text); }
.link.danger:hover { color: var(--amber); }
.chat { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 999px; background: none; color: var(--muted); font-size: 12px; }
.chat:hover, .chat.on { color: var(--text); border-color: var(--muted); }
.chat svg { width: 14px; height: 14px; }

/* ---------- states ---------- */
.state { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 999px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.state.approved { color: var(--led); border-color: var(--led-edge); background: var(--led-soft); }
.state.changes { color: var(--amber); border-color: var(--amber-edge); background: var(--amber-soft); }
.state.wk, .state.sent { color: var(--text); }
.state.ready { color: var(--led); border-color: var(--led-edge); }
.state.todo, .state.hidden { color: var(--dim); border-style: dashed; }

/* ---------- pages: progress ---------- */
.progress { display: flex; align-items: center; gap: 12px; }
.bar { width: 160px; height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--led); border-radius: 4px; transition: width 0.4s; }
.progress span { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ---------- team board: one column per person ---------- */
.board { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(240px, 420px)) 140px; gap: 16px; overflow-x: auto; }
.col { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--raise); transition: border-color 0.15s, background 0.15s; }
.col.over { border-color: var(--led); background: var(--led-soft); }
.col-head { padding: 16px 16px 12px; }
.col-head .row { display: flex; align-items: baseline; justify-content: space-between; }
.col-head b { font-family: var(--head); font-size: 17px; }
.col-head span { color: var(--muted); font-size: 12px; }
.col-head span .link { margin-left: 6px; font-size: 12px; }
.col-add { align-items: center; justify-content: center; border-style: dashed; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.col-add:hover { color: var(--text); border-color: var(--line2); }
.meter { display: block; height: 3px; margin-top: 10px; background: var(--line); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--led); }
.col-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.col-empty { color: var(--dim); font-size: 12px; text-align: center; padding: 24px 8px; border: 1px dashed var(--line2); border-radius: var(--r-sm); }
.bcard { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); cursor: grab; transition: border-color 0.15s; }
.bcard:hover { border-color: var(--line2); }
.bcard.dragging { opacity: 0.4; }
.bthumb { width: 64px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--raise2); display: grid; place-items: center; color: var(--dim); font-size: 10px; }
.bthumb img, .bthumb video { width: 100%; height: 100%; object-fit: cover; }
.bbody { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bbody .meta { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bbody .t { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bbody .state { height: 20px; font-size: 11px; padding: 0 8px; align-self: flex-start; }

/* ---------- scene page: one row per item ---------- */
.items { display: flex; flex-direction: column; gap: 22px; }
.row-item { padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--raise); scroll-margin: 16px; transition: border-color 0.4s, box-shadow 0.4s; }
.row-item.flash { border-color: var(--led); box-shadow: 0 0 0 4px var(--led-soft); }
.row-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; min-height: 38px; }
.row-title { flex: 1 1 340px; min-width: 0; display: flex; align-items: center; gap: 12px; }
.kind { flex: none; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.row-title h3 { font-family: var(--head); font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { display: flex; align-items: flex-start; gap: 10px; margin: -6px 0 14px; color: var(--muted); font-size: 13px; }
.controls { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tiles.n1 { grid-template-columns: minmax(0, 1000px); }
.tiles.n1 .frame { aspect-ratio: var(--ar, 16 / 9); }
.tiles.team { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tile { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; background: var(--raise2); cursor: zoom-in; outline: 2px solid transparent; outline-offset: 3px; transition: outline-color 0.15s; }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.tiles.team .frame { aspect-ratio: var(--ar, 16 / 9); height: 260px; width: auto; max-width: 100%; background: var(--raise2); }
.tiles.team .frame img, .tiles.team .frame video { object-fit: contain; }
.tiles.team { display: flex; flex-wrap: wrap; align-items: flex-start; }
.tiles.team .tile { width: min-content; max-width: 100%; }
.tiles.team .drop { width: 180px; }
.tiles.team .drop { aspect-ratio: auto; height: 260px; }
.frame:hover img, .frame:hover video { transform: scale(1.02); }
.tile.chosen .frame { outline-color: var(--led); }
.frame.tall { aspect-ratio: 3 / 4; }
.frame.tall img { object-fit: contain; }
.tiles:not(.team) .frame.tall { max-height: 62vh; }
.lab { position: absolute; left: 8px; top: 8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: rgba(8, 6, 5, 0.74); font-family: var(--dot); font-size: 15px; font-weight: 900; color: var(--text); }
.tile.chosen .lab { background: var(--led); color: var(--ink); }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
.cap { color: var(--muted); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick { flex: none; height: 30px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 999px; background: none; font-size: 12px; color: var(--muted); transition: 0.15s; }
.pick:hover { border-color: var(--muted); color: var(--text); }
.pick.on { border-color: var(--led); background: var(--led); color: var(--ink); font-weight: 600; }
.x { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(8, 6, 5, 0.78); color: var(--text); font-size: 15px; line-height: 1; opacity: 0; transition: opacity 0.15s; }
.tile:hover .x, .file:hover .x, .x:focus-visible { opacity: 1; }
.drop { aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px dashed var(--line2); border-radius: var(--r-sm); color: var(--dim); font-size: 12px; text-align: center; cursor: pointer; transition: 0.15s; }
.drop .plus { font-size: 24px; font-weight: 300; line-height: 1; margin-bottom: 2px; }
.drop:hover, .drop.over, .row-item.over .drop { border-color: var(--led); color: var(--led); background: var(--led-soft); }
.row-item.over { border-color: var(--led-edge); }
.empty { color: var(--muted); padding: 40px 0; }

/* team inline editing */
.inline { min-width: 0; background: none; border: 0; border-bottom: 1px solid transparent; border-radius: 0; padding: 1px 0; transition: border-color 0.15s; }
.inline:hover { border-bottom-color: var(--line); }
.inline:focus { border-bottom-color: var(--line2); outline: none; }
.inline.title { flex: 1; font-family: var(--head); font-size: 19px; font-weight: 700; }
.inline.brief { flex: 1; color: var(--muted); font-size: 13px; line-height: 1.45; resize: none; overflow: hidden; }
.cap-in { width: 100%; background: none; border: 0; border-bottom: 1px solid transparent; padding: 2px 0; font-size: 12px; color: var(--muted); }
.cap-in:focus { border-bottom-color: var(--line2); outline: none; color: var(--text); }
.sel { height: 32px; padding: 0 28px 0 12px; border: 1px solid var(--line2); border-radius: 999px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236E7E75' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 11px center; font-size: 12px; appearance: none; -webkit-appearance: none; }
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--line2); border-radius: 999px; }
.seg button { height: 26px; padding: 0 10px; border: 0; border-radius: 999px; background: none; font-size: 12px; color: var(--dim); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--raise2); color: var(--text); }
.seg button.on[data-v="ready"] { background: var(--led); color: var(--ink); font-weight: 600; }
.vis { height: 32px; padding: 0 12px; border: 1px dashed var(--line2); border-radius: 999px; background: none; font-size: 12px; color: var(--dim); }
.vis.on { border-style: solid; border-color: var(--led-edge); color: var(--led); }

/* ---------- client summary ---------- */
.intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.intro p { color: var(--muted); max-width: 620px; font-size: 14px; }
.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.scard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--raise); overflow: hidden; transition: border-color 0.15s, transform 0.15s; }
.scard:hover { border-color: var(--line2); transform: translateY(-1px); }
.mosaic { aspect-ratio: 16 / 9; display: grid; gap: 2px; background: var(--raise2); }
.mosaic.n2 { grid-template-columns: 1fr 1fr; }
.mosaic img, .mosaic video { width: 100%; height: 100%; object-fit: cover; }
.scard-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.scard-body p { font-weight: 600; font-size: 13px; display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.scard-body .num { color: var(--led); }
.scard-body .state { height: 22px; font-size: 11px; }
.waiting { max-width: 520px; padding: 28px; border: 1px solid var(--line); border-radius: var(--r); background: var(--raise); }
.waiting h2 { font-family: var(--head); font-size: 22px; margin-bottom: 8px; }
.waiting p { color: var(--muted); margin-bottom: 18px; }

/* ---------- materials ---------- */
.reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.req { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--raise); transition: border-color 0.15s, background 0.15s; }
.req.over { border-color: var(--led); background: var(--led-soft); }
.req-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.req h3 { font-size: 14px; font-weight: 600; line-height: 1.35; }
.req-detail { color: var(--muted); font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.files { display: flex; flex-wrap: wrap; gap: 6px; }
.file { position: relative; }
.thumbbtn { display: block; border: 0; background: none; border-radius: 6px; overflow: hidden; }
.thumb { width: 52px; height: 52px; object-fit: cover; background: var(--raise2); }
.chip { display: inline-flex; align-items: center; height: 30px; max-width: 180px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 6px; background: none; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { color: var(--text); }
.more-files { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: 1px dashed var(--line2); border-radius: 6px; background: none; color: var(--muted); font-size: 13px; }
.more-files:hover { color: var(--text); border-color: var(--muted); }
.file .x { right: -6px; top: -6px; width: 20px; height: 20px; font-size: 12px; background: var(--raise2); border: 1px solid var(--line2); }
.req-foot { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.req-foot .field { flex: 1; height: 32px; padding: 0 10px; font-size: 12px; }
.req-team { display: flex; gap: 14px; flex-wrap: wrap; }
.req-team .link { font-size: 12px; }
.hint { color: var(--led); font-size: 12px; }
.req.add { justify-content: center; border-style: dashed; background: none; }
.req.add form { display: flex; flex-direction: column; gap: 8px; }

/* ---------- fields ---------- */
.field { width: 100%; height: 40px; padding: 0 12px; background: var(--bg); border: 1px solid var(--line2); border-radius: var(--r-sm); transition: border-color 0.15s; }
textarea.field { height: auto; padding: 10px 12px; resize: none; }
.field:focus { border-color: var(--muted); outline: none; }

/* ---------- comments drawer ---------- */
.drawer { position: absolute; top: 0; right: 0; bottom: 0; z-index: 30; width: min(420px, 100%); display: flex; flex-direction: column; background: var(--raise); border-left: 1px solid var(--line2); box-shadow: -24px 0 48px rgba(0, 0, 0, 0.45); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.drawer-head p { color: var(--dim); font-size: 12px; }
.drawer-head h2 { font-family: var(--head); font-size: 18px; font-weight: 700; margin-top: 2px; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.msgs .none { color: var(--dim); font-size: 13px; }
.msg .meta { font-size: 11px; color: var(--dim); }
.msg .meta b { color: var(--muted); font-weight: 600; }
.msg.time .meta b { color: var(--led); }
.msg .body { margin-top: 2px; white-space: pre-wrap; }
.compose { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.compose .hintline { color: var(--amber); font-size: 12px; }
.compose .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.compose small { color: var(--dim); font-size: 11px; }

/* ---------- lightbox, modal, toast ---------- */
.lb { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: rgba(6, 4, 3, 0.96); }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; color: var(--muted); font-size: 13px; }
.lb-top b { color: var(--text); font-weight: 600; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 80px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line2); background: rgba(14, 11, 9, 0.7); font-size: 22px; color: var(--text); }
.lb-nav:hover { border-color: var(--muted); }
.lb-nav.prev { left: 20px; }
.lb-nav.next { right: 20px; }
.lb-file { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px; border: 1px solid var(--line2); border-radius: var(--r); color: var(--muted); text-align: center; }
.lb-file p { color: var(--text); font-weight: 600; }
.prompt-box { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg); text-align: left; transition: border-color 0.15s; }
.prompt-box:hover { border-color: var(--led-edge); }
.pb-head { display: flex; align-items: center; gap: 6px; color: var(--led); font-size: 11px; font-weight: 600; }
.pb-head svg { width: 12px; height: 12px; flex: none; }
.pb-head b { margin-left: auto; color: var(--dim); font-weight: 500; }
.prompt-box:hover .pb-head b { color: var(--led); }
.pb-text { color: var(--muted); font-size: 11px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prompt-chip { align-self: flex-start; max-width: 100%; height: 26px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 999px; background: none; color: var(--led); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prompt-chip:hover { border-color: var(--led-edge); }
.lb-prompt { display: flex; align-items: flex-start; gap: 16px; max-width: 1100px; margin: 0 auto; padding: 12px 24px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.lb-prompt p { flex: 1; max-height: 54px; overflow-y: auto; }
.lb-prompt b { color: var(--led); font-weight: 600; margin-right: 6px; }
.cmp { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 20px; padding: 0 24px 24px; }
.cmp-pane { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.cmp-label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.cmp-label span { color: var(--dim); margin-left: 6px; letter-spacing: 0; }
.cmp-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #070504; border-radius: var(--r-sm); overflow: hidden; }
.cmp-stage img, .cmp-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.cmp-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.cmp-strip button { flex: none; width: 54px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: var(--raise2); opacity: 0.6; }
.cmp-strip button:hover { opacity: 1; }
.cmp-strip button.on { border-color: var(--led); opacity: 1; }
.cmp-strip img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .cmp { grid-template-columns: 1fr; overflow-y: auto; } .cmp-stage { min-height: 45vh; } }
.lb-bottom { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 16px 24px 24px; }
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(6, 4, 3, 0.82); }
.sheet { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 14px; padding: 28px; border: 1px solid var(--line2); border-radius: 20px; background: var(--raise); }
.sheet h2 { font-family: var(--head); font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.sheet form { display: flex; flex-direction: column; gap: 10px; }
.sheet .row { display: flex; gap: 10px; align-items: center; }
.sheet .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet .sel { height: 40px; width: 100%; border-radius: var(--r-sm); }
.sheet .people3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.sheet .people3 .btn { height: 56px; font-family: var(--head); font-size: 18px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 18px; border: 1px solid var(--line2); border-radius: 999px; background: var(--raise2); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.toast.err { border-color: var(--amber-edge); color: var(--amber); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; text-align: center; }
.login .led { font-size: clamp(38px, 8vw, 72px); }
.login h1 { font-family: var(--head); font-size: 18px; font-weight: 500; color: var(--muted); }
.login form { display: flex; gap: 10px; width: 100%; max-width: 380px; margin-top: 12px; }
.login .field { height: 44px; }
.login .btn { height: 44px; }
.login .err { min-height: 22px; color: var(--amber); font-size: 14px; }
.login .foot { position: fixed; bottom: 24px; left: 0; right: 0; color: var(--dim); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- small screens: sidebar becomes a drawer, pages scroll ---------- */
@media (max-width: 860px) {
  .shell { display: block; height: auto; overflow: visible; }
  .mobile-bar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; background: rgba(14, 11, 9, 0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .mobile-bar .led { font-size: 17px; }
  .side { position: fixed; inset: 0 auto 0 0; z-index: 40; width: 280px; transform: translateX(-100%); transition: transform 0.2s; }
  .side.open { transform: none; box-shadow: 24px 0 48px rgba(0, 0, 0, 0.5); }
  .scrim { position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, 0.5); }
  .main-head { flex-direction: column; align-items: flex-start; padding: 16px; }
  .mh-title h1 { white-space: normal; font-size: 22px; }
  .mh-right { flex-wrap: wrap; }
  .main-body, .main-body.fill { overflow: visible; padding: 16px; }
  .board { grid-template-columns: repeat(var(--cols, 3), 260px) 120px; }
  .col-body { max-height: 70vh; }
  .row-head { flex-direction: column; align-items: flex-start; }
  .row-title { flex: none; width: 100%; }
  .controls { flex-wrap: wrap; }
  .tiles { grid-template-columns: 1fr; }
  .intro { flex-direction: column; align-items: flex-start; }
  .drawer { position: fixed; width: 100%; }
  .lb-stage { padding: 0 12px; }
  .x { opacity: 1; }
}
.vars { display: inline-flex; align-items: center; gap: 2px; flex: none; padding-top: 2px; }
.vars svg { width: 13px; height: 13px; margin-right: 4px; }
.vars .link { font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 6px; }
.vars .link:hover { background: var(--line); }
.seg small { color: var(--dim); font-size: 11px; margin-left: 2px; }
.rv { display: flex; flex-direction: column; gap: 6px; }
.rv .seg { align-self: flex-start; }
.rv .seg button.on[data-v="keep"] { background: var(--led); color: var(--ink); font-weight: 600; }
.rv .seg button.on[data-v="redo"] { background: var(--amber); color: var(--ink); font-weight: 600; }
.rv-note { width: 100%; height: 30px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 6px; background: none; color: var(--text); font-size: 12px; }
.rv-note:focus { outline: none; border-color: var(--muted); }
.rv small { color: var(--dim); font-size: 11px; }
.tile.rv-keep .frame { box-shadow: 0 0 0 2px var(--led); }
.tile.rv-redo .frame { box-shadow: 0 0 0 2px var(--amber); }
.tile.rv-drop .frame { opacity: 0.35; }
.row-sub .tally { color: var(--text); white-space: nowrap; }
.by { position: absolute; left: 8px; bottom: 8px; height: 22px; padding: 0 8px; border-radius: 6px; display: flex; align-items: center; background: rgba(8, 6, 5, 0.74); font-size: 11px; color: var(--muted); }
