:root {
  color-scheme: dark;
  --bg: #0d0e10; --panel: #15171a; --panel2: #1b1e22; --line: #262a30; --line2: #323741;
  --text: #ecebe7; --muted: #9a9ea6; --dim: #6c717a;
  --accent: #7fd6a8; --accent-ink: #0b1a12; --claude: #a99bff; --warn: #f0b85a; --bad: #ff7a72; --link: #8ec5ff;
  --r: 10px; --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: #3b4a63; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; height: 52px; padding: 0 18px;
  background: rgba(13,14,16,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; letter-spacing: .02em; font-size: 16px; color: var(--text); }
.brand span { color: var(--accent); }
.nav a { color: var(--muted); margin-right: 14px; font-size: 14px; }
.nav a.on { color: var(--text); }
.top .sp { flex: 1; }
.pill { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pill.live { color: var(--claude); border-color: #4a4380; }

/* buttons */
.btn { background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 12px; font-size: 13px; color: var(--text); }
.btn:hover { border-color: #4a505c; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); padding: 4px 8px; }
.btn.ghost:hover { color: var(--text); background: var(--panel2); }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sm { padding: 3px 9px; font-size: 12px; }

/* ideas list */
.wrap { max-width: 1180px; margin: 0 auto; padding: 22px 18px 80px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h1.page-h { font-size: 22px; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-top: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 15px; display: block; color: var(--text); }
.card:hover { border-color: var(--line2); text-decoration: none; background: #181a1e; }
.card .id { font: 600 11px var(--mono); color: var(--accent); }
.card .t { font-weight: 650; font-size: 16px; margin: 3px 0 6px; }
.card .h { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card .stats { margin-top: 10px; font-size: 12px; color: var(--dim); display: flex; gap: 12px; flex-wrap: wrap; }
input.txt, textarea.txt, select.txt { background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; padding: 7px 10px; outline: none; }
input.txt:focus, textarea.txt:focus { border-color: #556070; }

/* idea layout */
.idea { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 44%); min-height: calc(100vh - 52px); }
.pagecol { padding: 18px 26px 120px; border-right: 1px solid var(--line); min-width: 0; }
.side { position: sticky; top: 52px; height: calc(100vh - 52px); display: flex; flex-direction: column; min-width: 0; background: #0f1113; }
.tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); overflow-x: auto; flex-shrink: 0; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 7px 11px 9px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { color: var(--dim); font-size: 11.5px; margin-left: 4px; }
.mtabs { display: none; }
.panel { flex: 1; overflow-y: auto; padding: 14px 16px 30px; min-height: 0; }

.back { color: var(--muted); font-size: 13px; }
.titlebox { font-size: 26px; font-weight: 700; line-height: 1.25; width: 100%; background: none; border: 0; outline: none; padding: 6px 0 2px; resize: none; overflow: hidden; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 14px; color: var(--muted); font-size: 12.5px; }
.chip { border: 1px solid var(--line2); border-radius: 99px; padding: 1px 9px; font-size: 12px; color: var(--muted); }
.chip.id { font-family: var(--mono); color: var(--accent); border-color: #2c4a3b; }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.linkbox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; min-width: 0; }
.linkbox .lab { font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.linkbox .val { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkbox .acts { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

.sec { margin: 22px 0 8px; display: flex; align-items: baseline; gap: 10px; }
.sec h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; font-weight: 650; }
.sec .sp { flex: 1; }
.sec .note { font-size: 12px; color: var(--dim); }

.hbp { display: grid; gap: 8px; }
.field { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: start; }
.field label { font-size: 12px; color: var(--dim); padding-top: 7px; text-transform: uppercase; letter-spacing: .05em; }
textarea.cell { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 6px 8px; resize: none; overflow: hidden;
  outline: none; line-height: 1.45; min-height: 32px; display: block; }
textarea.cell:hover { border-color: var(--line); }
textarea.cell:focus { border-color: #4b5462; background: var(--panel); }
textarea.cell::placeholder { color: #50555e; }

.pointers { list-style: none; margin: 0; padding: 0; }
.pointers li { display: grid; grid-template-columns: 16px 1fr auto; gap: 4px; align-items: start; }
.pointers li .dot { color: var(--dim); padding-top: 7px; text-align: center; }
.rowacts { opacity: 0; display: flex; gap: 0; padding-top: 3px; transition: opacity .1s; }
li:hover .rowacts, li:focus-within .rowacts, .srow:hover .rowacts, .srow:focus-within .rowacts { opacity: 1; }
.rowacts button { background: none; border: 0; color: var(--dim); padding: 2px 5px; font-size: 13px; border-radius: 5px; }
.rowacts button:hover { color: var(--text); background: var(--panel2); }
.flash { animation: flash 2.2s ease-out; }
@keyframes flash { 0% { background: rgba(169,155,255,.20); } 100% { background: transparent; } }

.script { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.shead, .srow { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1.25fr) 26px; }
.shead { background: var(--panel); font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.shead div { padding: 7px 8px; }
.srow { border-top: 1px solid var(--line); }
.srow .num { color: var(--dim); font: 12px var(--mono); padding: 10px 0 0 10px; }
.srow .vo { border-right: 1px solid var(--line); padding: 3px; }
.srow .vis { padding: 3px; }
.srow .vo textarea.cell { font-weight: 500; }
.clips { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 8px 0; }
.clip { display: inline-flex; align-items: center; gap: 6px; background: #1d2530; border: 1px solid #2c3a4d; border-radius: 6px; padding: 2px 4px 2px 8px; font-size: 12.5px; max-width: 100%; }
.clip a { color: #a9d2ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip .ts { font: 11.5px var(--mono); color: var(--warn); white-space: nowrap; }
.clip button { background: none; border: 0; color: var(--dim); padding: 0 4px; }
.audio-l { display: grid; grid-template-columns: 46px 1fr; align-items: start; }
.audio-l span { font-size: 11px; color: var(--dim); padding: 8px 0 0 9px; text-transform: uppercase; letter-spacing: .05em; }
.audio-l textarea.cell { font-style: italic; color: #d9d3c2; }
.srow .rowacts { flex-direction: column; padding-top: 6px; }
.addbar { padding: 8px; border-top: 1px solid var(--line); background: var(--panel); }

/* chat */
.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.msgs { flex: 1; overflow-y: auto; padding: 14px 16px 10px; min-height: 0; }
.msg { margin: 0 0 14px; max-width: 100%; }
.msg.user { display: flex; justify-content: flex-end; }
.msg.user .b { background: #1f2a24; border: 1px solid #2b3d32; border-radius: 12px 12px 3px 12px; padding: 8px 12px; max-width: 88%; white-space: pre-wrap; word-wrap: break-word; }
.msg.assistant .b { padding: 2px 2px; word-wrap: break-word; }
.msg.system .b, .msg.error .b { font-size: 12.5px; color: var(--muted); text-align: center; padding: 4px 10px; }
.msg.error .b { color: var(--bad); }
.msg .tools { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.tchip { font: 11.5px var(--mono); color: var(--claude); background: #1c1a2d; border: 1px solid #332e57; border-radius: 5px; padding: 1px 6px; }
.tchip.run { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.msg .foot { font-size: 11px; color: var(--dim); margin-top: 4px; }
.md p { margin: 0 0 8px; } .md p:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 20px; }
.md code { font: 12.5px var(--mono); background: var(--panel2); padding: 1px 4px; border-radius: 4px; }
.md pre { background: var(--panel); border: 1px solid var(--line); padding: 10px; border-radius: 8px; overflow-x: auto; font: 12.5px/1.45 var(--mono); }
.md table { border-collapse: collapse; font-size: 13px; margin: 6px 0 10px; display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { border: 1px solid var(--line2); padding: 5px 8px; text-align: left; vertical-align: top; }
.md th { background: var(--panel); font-weight: 600; }
.md h1, .md h2, .md h3 { font-size: 15px; margin: 10px 0 6px; }
.composer { border-top: 1px solid var(--line); padding: 10px 12px 12px; background: #0f1113; flex-shrink: 0; }
.quick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.quick button { flex-shrink: 0; background: var(--panel); border: 1px solid var(--line2); border-radius: 99px; padding: 4px 10px; font-size: 12.5px; color: var(--muted); }
.quick button:hover { color: var(--text); border-color: #4a505c; }
.compose-row { display: flex; gap: 8px; align-items: flex-end; }
.compose-row textarea { flex: 1; resize: none; max-height: 200px; min-height: 42px; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; outline: none; }
.compose-row textarea:focus { border-color: #556070; }
.sub { font-size: 11.5px; color: var(--dim); margin-top: 6px; display: flex; gap: 10px; align-items: center; }
.sub .sp { flex: 1; }
.typing::after { content: "▍"; color: var(--claude); animation: pulse 1s infinite; }

/* side lists */
.empty { color: var(--dim); font-size: 13px; padding: 14px 2px; }
.item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 12px; margin-bottom: 10px; }
.item .nm { font-weight: 650; }
.item .sub2 { color: var(--muted); font-size: 12.5px; }
.item .kv { font-size: 13px; margin-top: 6px; display: grid; grid-template-columns: 62px 1fr; gap: 2px 8px; }
.item .kv b { color: var(--dim); font-weight: 500; font-size: 12px; }
.item .src { color: var(--dim); font-size: 11.5px; }
.item .acts { margin-top: 9px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line2); color: var(--muted); }
.badge.true { color: var(--accent); border-color: #2c4a3b; } .badge.false { color: var(--bad); border-color: #5a2d2a; }
.badge.nuanced, .badge.unverified { color: var(--warn); border-color: #5a4a2a; }
.badge.crm { color: var(--accent); }
details.dismissed summary { color: var(--dim); font-size: 12.5px; cursor: pointer; margin: 6px 0; }

/* assets */
.asearch { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.asearch input[type=search] { flex: 1; min-width: 180px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 6px 11px; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--panel2); color: var(--text); }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.side .agrid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.acard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.acard video, .acard .thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #000; display: block; }
.acard .body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.acard .t { font-size: 13px; font-weight: 600; line-height: 1.3; word-break: break-word; }
.acard .s { font-size: 11.5px; color: var(--dim); }
.acard .note { font-size: 12px; color: var(--muted); font-style: italic; }
.acard audio { width: 100%; height: 34px; margin-top: 4px; }
.acard .acts { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; align-items: center; flex-wrap: wrap; }
.src-mine { color: var(--accent) !important; }
.errs { font-size: 12px; color: var(--warn); margin: 6px 0 10px; }
.moment { border-top: 1px solid var(--line); padding: 9px 2px; font-size: 13px; }
.moment .ts { font: 12px var(--mono); color: var(--warn); }
.fileline { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.fileline .d { color: var(--dim); font: 12px var(--mono); }
.progress { height: 6px; background: var(--panel2); border-radius: 99px; overflow: hidden; margin: 6px 0; }
.progress i { display: block; height: 100%; background: var(--accent); }
pre.log { font: 11.5px/1.4 var(--mono); color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px; max-height: 180px; overflow: auto; white-space: pre-wrap; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #262a31; border: 1px solid var(--line2); color: var(--text);
  padding: 9px 14px; border-radius: 10px; font-size: 13.5px; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.5); max-width: calc(100vw - 32px); }
.toast.bad { border-color: #6a3330; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 18px; width: 100%; max-width: 460px; }
.modal h3 { margin: 0 0 10px; font-size: 16px; }
.modal .row { margin-top: 12px; justify-content: flex-end; }
.modal input.txt { width: 100%; }
.revlist { max-height: 50vh; overflow-y: auto; }
.revlist div { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; gap: 8px; }

/* mobile */
@media (max-width: 1000px) {
  .idea { display: block; }
  .pagecol { border-right: 0; padding: 12px 16px 120px; }
  .side { position: static; height: auto; background: none; }
  .tabs { display: none; }
  .mtabs { display: flex; position: sticky; top: 52px; z-index: 15; background: var(--bg); gap: 2px; padding: 6px 12px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .mtabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 7px 10px 9px; color: var(--muted); font-size: 14px; white-space: nowrap; }
  .mtabs button.on { color: var(--text); border-bottom-color: var(--accent); }
  .idea.m-page .side { display: none; }
  .idea:not(.m-page) .pagecol { display: none; }
  .idea:not(.m-page) .side { height: calc(100dvh - 52px - 44px); }
  .panel { padding: 12px 16px 30px; }
  .links { grid-template-columns: 1fr; }
  .shead { display: none; }
  .srow { grid-template-columns: 26px minmax(0, 1fr) 24px; grid-template-areas: "n vo a" "n vis a"; }
  .srow .num { grid-area: n; padding-left: 4px; }
  .srow .vo { grid-area: vo; border-right: 0; border-bottom: 1px dashed var(--line); }
  .srow .vis { grid-area: vis; }
  .srow .rowacts { grid-area: a; opacity: 1; }
  .rowacts { opacity: 1; }
  .top { gap: 12px; padding: 0 14px; }
  .titlebox { font-size: 22px; }
  .wrap { padding: 16px 16px 80px; }
}

/* clip picker */
.modal.picker { max-width: 1120px; height: min(90vh, 900px); display: flex; flex-direction: column; padding: 14px 16px; }
.picker .ph { display: flex; gap: 10px; align-items: baseline; }
.picker .ph h3 { margin: 0; }
.picker .ph .vo { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.picker .have { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; min-height: 26px; }
.picker .pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.picker .pills button { background: var(--panel2); border: 1px solid var(--line2); border-radius: 99px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.picker .pills button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.picker .bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.picker .bar input[type=search], .picker .bar input[type=url] { flex: 1; min-width: 200px; }
.picker .res { flex: 1; overflow-y: auto; margin-top: 10px; min-height: 0; }
.picker .status { font-size: 12px; color: var(--dim); margin: 6px 0; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pcard { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.pcard.added { border-color: var(--accent); }
.pcard .media { position: relative; background: #000; aspect-ratio: 16/9; }
.pcard .media.tall { aspect-ratio: 9/12; }
.pcard .media video, .pcard .media img, .pcard .media iframe { width: 100%; height: 100%; object-fit: contain; display: block; border: 0; }
.pcard .media .dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.75); font: 11px var(--mono); padding: 1px 5px; border-radius: 4px; }
.pcard .body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; font-size: 13px; }
.pcard .t { font-weight: 600; line-height: 1.3; word-break: break-word; }
.pcard .s { font-size: 11.5px; color: var(--dim); }
.pcard .ts { font: 12px var(--mono); color: var(--warn); }
.pcard .acts { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; align-items: center; flex-wrap: wrap; }
.mchips { display: flex; flex-direction: column; gap: 4px; }
.mchip { text-align: left; background: #2a2414; border: 1px solid #5a4a2a; color: #f0d9a8; border-radius: 6px; padding: 3px 7px; font-size: 12px; }
.mchip.on { background: var(--warn); color: #1a1405; }
.mchip.approx { border-style: dashed; }
@media (max-width: 1000px) { .modal.picker { height: 94vh; padding: 12px; } .pgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pgrid { grid-template-columns: 1fr; } }
.pcard .media { aspect-ratio: auto; height: 240px; }
@media (max-width: 520px) { .pcard .media { height: 300px; } }
.frame { display: flex; align-items: flex-end; gap: 6px; padding: 6px 8px 0; }
.frame img { width: 132px; aspect-ratio: 2/3; object-fit: cover; border-radius: 6px; border: 1px solid var(--line2); background: #fff; display: block; }
.frame-empty { width: 132px; aspect-ratio: 2/3; border: 1px dashed var(--line2); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--dim); }
.frame-empty.busy { color: var(--claude); border-color: #4a4380; animation: pulse 1.2s infinite; }
.seg button.on { background: var(--panel2); color: var(--text); }
.grid-h { grid-column: 1 / -1; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 0; font-weight: 650; }
.grid-h span { text-transform: none; letter-spacing: 0; color: var(--dim); font-weight: 400; }
.card.prod .golive { font-weight: 650; font-size: 13px; color: var(--text); }
.card .next { font-size: 12.5px; color: var(--warn); margin-top: 6px; line-height: 1.35; }
.chip.st-script, .chip.st-idea { color: #a9d2ff; border-color: #2c3a4d; }
.chip.st-shot { color: var(--warn); border-color: #5a4a2a; }
.chip.st-edit, .chip.st-review { color: var(--accent); border-color: #2c4a3b; }
.plannerline { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
.plannerline b { color: var(--text); }
.plannerline .next { color: var(--warn); margin-top: 3px; }

/* clip links in chat (7 Nov) */
.cliplink { color: var(--accent); border-bottom: 1px dotted var(--accent); cursor: pointer; border-radius: 3px; }
.cliplink:hover, .cliplink:focus { background: rgba(127,214,168,.12); outline: none; }
.cliplink.nopv { color: var(--muted); border-bottom-color: var(--dim); }
#cliphover { position: fixed; z-index: 60; width: 260px; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 6px; pointer-events: none; box-shadow: 0 8px 28px rgba(0,0,0,.5); }
#cliphover video { width: 100%; max-height: 300px; border-radius: 6px; background: #000; display: block; object-fit: contain; }
#cliphover .cap { font: 11px var(--mono); color: var(--muted); padding: 5px 2px 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal.clipmodal { max-width: 560px; }
.modal.clipmodal h3 .ts { font: 12px var(--mono); color: var(--accent); margin-left: 10px; }
.modal.clipmodal video { width: 100%; max-height: 72vh; background: #000; border-radius: 8px; display: block; }
.modal.clipmodal .row { flex-wrap: wrap; gap: 8px; }
/* row buttons (7 Nov): × on top, "+" pinned to the bottom edge of the row it adds below */
.srow .rowacts { align-self: stretch; }
.srow .rowacts .addbelow { margin-top: auto; }
.rowacts button[title="Delete row"]:hover { color: var(--bad); }
/* clip picker start/end marks (7 Nov) */
.pcard .marks { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; }
.pcard .ts.marked { color: var(--accent); font-weight: 600; }
/* range bar: drag start / end / the whole selection (7 Nov) */
.rangebar { margin: 8px 0 4px; user-select: none; }
.rb-track { position: relative; height: 26px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px; cursor: pointer; touch-action: none; }
.rb-sel { position: absolute; top: 0; bottom: 0; background: rgba(127,214,168,.22); border: 1px solid var(--accent); border-radius: 5px; cursor: grab; min-width: 6px; }
.rb-sel:active { cursor: grabbing; }
.rb-h { position: absolute; top: -1px; bottom: -1px; width: 10px; background: var(--accent); cursor: ew-resize; }
.rb-h.l { left: -5px; border-radius: 4px 0 0 4px; } .rb-h.r { right: -5px; border-radius: 0 4px 4px 0; }
.rb-ph { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); pointer-events: none; }
.rb-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.rb-lab { font: 12px var(--mono); color: var(--accent); margin-left: auto; }
.modal.clipmodal .rowpick { flex: 1; min-width: 180px; }
/* drag a clip from the chat onto a script row; click a row clip to set start / end (7 Nov) */
.cliplink[draggable="true"] { -webkit-user-drag: element; }
body.dragclip .srow .vis { outline: 1px dashed var(--line2); outline-offset: -3px; border-radius: 6px; }
.srow.drop-on { background: rgba(127,214,168,.07); }
body.dragclip .srow.drop-on .vis { outline: 2px solid var(--accent); }
.srow.drop-on .clips::after { content: 'Drop to add it here'; font-size: 12px; color: var(--accent); align-self: center; padding-left: 4px; }
.clip.fc a, .clip.fc .cn, .clip.fc .ts { cursor: pointer; }
.clip.fc:hover { border-color: var(--accent); }
.clip .ts.none { color: var(--dim); font: italic 11.5px var(--font, inherit); }
/* dashboard search (7 Nov) */
.searchrow { margin-top: 14px; gap: 10px; }
.searchrow input.search { flex: 1; min-width: 220px; max-width: 560px; }
.searchcount { font: 12px var(--mono); color: var(--muted); }
/* editor link page /e/<token> (7 Nov): read-only script, no row buttons */
.share .wrap { max-width: 1100px; }
.script.ro .shead, .script.ro .srow { grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1.25fr); }
.rotext { white-space: pre-wrap; padding: 7px 9px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.rotext.vo-t { font-weight: 500; }
.script.ro .audio-l .rotext { font-style: italic; color: #d9d3c2; padding-top: 6px; }
.share-meta { margin: 6px 0 16px; }
.script.ro .clip.fc { cursor: pointer; }
@media (max-width: 1000px) {
  .script.ro .srow { grid-template-columns: 26px minmax(0, 1fr); grid-template-areas: "n vo" "n vis"; }
}
/* every clip chip opens its popup on click (7 Nov) */
.clip.tap { cursor: pointer; }
.clip.tap:hover { border-color: var(--accent); }
.modal.clipmodal iframe.filepv { width: 100%; height: min(62vh, 560px); border: 0; border-radius: 8px; background: #000; display: block; }

/* music under the pointers (7 Nov) */
.music { list-style: none; margin: 0; padding: 0; }
.music li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 4px; align-items: start; padding: 2px 0 6px; }
.music li + li { border-top: 1px dashed var(--line); padding-top: 6px; }
.music li .dot { color: var(--accent); padding-top: 6px; text-align: center; font-size: 13px; }
.music .mbody { min-width: 0; }
.music .mtop { display: flex; align-items: start; gap: 4px; }
.music .mtop textarea.mtitle { font-weight: 600; flex: 1; }
.music .mplay { background: var(--panel2); border: 1px solid var(--line2); color: var(--accent); border-radius: 99px; width: 28px; height: 28px;
  margin-top: 2px; font-size: 11px; flex-shrink: 0; cursor: pointer; padding: 0; }
.music .mplay:hover { border-color: var(--accent); }
.music .mbot { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4px; }
input.cell { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 6px 8px; outline: none;
  color: var(--link); font: 12.5px var(--mono); min-height: 32px; text-overflow: ellipsis; }
input.cell:hover { border-color: var(--line); }
input.cell:focus { border-color: #4b5462; background: var(--panel); color: var(--text); }
input.cell::placeholder { color: #50555e; font-family: var(--font); }
.music textarea.mnote { color: var(--muted); font-size: 13.5px; }
@media (max-width: 700px) { .music .mbot { grid-template-columns: 1fr; } }

/* share button + modal (7 Nov) */
.btn.sharebtn { display: inline-flex; align-items: center; gap: 6px; }
.btn.sharebtn.on { border-color: #2c4a3b; color: var(--accent); }
.livedot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(127,214,168,.18); }
.modal.sharemodal { max-width: 520px; }
.sharemodal h3 { display: flex; align-items: center; gap: 8px; }
.mnote { font-size: 13px; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.mnote.dim { color: var(--dim); font-size: 12px; margin: 8px 0 0; }
.sharerow { display: flex; gap: 8px; }
.sharerow input.txt { flex: 1; min-width: 0; font: 12.5px var(--mono); color: var(--link); }
.sharemodal .row .sp { flex: 1; }
.modal.clipmodal iframe.filepv.spotify { height: 352px; }

/* share page: music above the script */
.share-music { margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 10px 14px; }
.share-music .lab { font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.share-music .song { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 2px 6px; padding: 6px 0; }
.share-music .song + .song { border-top: 1px dashed var(--line); }
.share-music .song .dot { color: var(--accent); }
.share-music .song .t { font-weight: 600; overflow-wrap: anywhere; }
.share-music .song .t a { cursor: pointer; }
.share-music .song .n { grid-column: 2; color: var(--muted); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) { .sec { flex-wrap: wrap; row-gap: 8px; } }

/* footage bin + clip tiles (7 Nov, his ask: a gallery with Premiere-style hover scrub) */
.fwrap { --tile: 180px; }
.fbar { position: sticky; top: -14px; z-index: 3; display: flex; gap: 10px; align-items: center; background: #0f1113; padding: 10px 0 8px; margin-top: -10px; }
.fbar input[type=search] { flex: 1; min-width: 0; }
.fsize { width: 96px; accent-color: var(--accent); }
.fmax { font-size: 15px; line-height: 1; padding: 5px 8px; }
.fline { display: flex; gap: 10px; align-items: baseline; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.fline .sp { flex: 1; }
.fhint { color: var(--dim); font-size: 11.5px; }
.fstat:not(:empty) { margin-bottom: 12px; }
.fsrc { margin: 18px 0 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.fsrc > summary { font-size: 12px; color: var(--dim); cursor: pointer; }
.fsrc[open] > summary { margin-bottom: 10px; }
.fmoments:not(:empty) { margin-bottom: 18px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.fmoments .sec { margin-top: 0; }
.mfoot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 3px; }
.mfoot select { max-width: 100% !important; }
.bin { margin: 0 0 16px; }
.bin > summary { cursor: pointer; display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 2px 8px; list-style: none; }
.bin > summary::-webkit-details-marker { display: none; }
.bin > summary::before { content: '▾'; color: var(--dim); width: 10px; }
.bin:not([open]) > summary::before { content: '▸'; }
.bin > summary b { color: var(--text); font-weight: 600; }
.bcount { font-size: 12px; color: var(--dim); }
.bin[hidden], .ctile[hidden] { display: none !important; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--tile), 100%), 1fr)); gap: 14px 10px; align-items: start; }
.cgrid.tall { grid-template-columns: repeat(auto-fill, minmax(min(calc(var(--tile) * .62), 100%), 1fr)); }
.ctile { display: flex; flex-direction: column; gap: 5px; min-width: 0; cursor: pointer; outline: none; container-type: inline-size; }
.ctile:focus-visible .cthumb { box-shadow: 0 0 0 2px var(--accent); }
.cthumb { position: relative; width: 100%; background: #000 center / contain no-repeat; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ctile:hover .cthumb { border-color: #565d69; }
.cposter { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.cspr { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background-repeat: no-repeat; opacity: 0; pointer-events: none; }
.cthumb.scrub .cspr.ok { opacity: 1; }
.cbar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); opacity: 0; pointer-events: none; z-index: 2; }
.cthumb.scrub .cbar { opacity: 1; }
.cmark { position: absolute; bottom: 0; height: 3px; background: var(--warn); pointer-events: none; z-index: 1; }
.cthumb.scrub .cmark { opacity: .55; }
.ctc { position: absolute; right: 5px; bottom: 7px; z-index: 3; background: rgba(0,0,0,.74); color: #f2f2f2; font: 11px/1.35 var(--mono); padding: 0 5px; border-radius: 4px; pointer-events: none; }
.ckind { position: absolute; left: 6px; top: 5px; z-index: 3; font-size: 12px; color: var(--accent); }
.cthumb.nopic::after { content: 'no preview yet'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11.5px; color: var(--dim); }
.cmeta { min-width: 0; padding: 0 1px; }
.cname { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csum { font-size: 12px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 1px; }
@container (max-width: 125px) { .csum:not(.mtext) { display: none; } .cname { font-size: 11.5px; } }
.csum.mtext { -webkit-line-clamp: 3; color: var(--text); opacity: .8; }
.fmoments .cgrid.tall { grid-template-columns: repeat(auto-fill, minmax(min(calc(var(--tile) * .8), 100%), 1fr)); }
/* full-screen bin */
.idea.side-max { grid-template-columns: minmax(0, 1fr); }
.idea.side-max .pagecol { display: none; }
.idea.side-max .side .panel { padding-left: 22px; padding-right: 22px; }
/* the clips a chat reply names, under it */
.cstrip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 1px 6px; margin-top: 4px; scrollbar-width: thin; }
.cstrip .ctile { flex: none; }
.cstrip .cthumb { height: 150px; }
.cstrip .cname { font-size: 11.5px; font-weight: 500; color: var(--muted); }
@media (max-width: 1000px) { .fmax, .fhint { display: none; } .fbar { top: -14px; } }
