/* YuClips Studio — clean professional minimalist NLE (CLAUDE.md §3, owner direction).
   Solid matte dark surfaces, 1px neutral borders, no backdrop blur.
   Motion: subtle and short (≈120–200 ms, ease-out, no bounce, no loops, no glow) — panels fold open,
   modals fade/scale in, pages rise in, bars glide. Off for prefers-reduced-motion. Numbers: tabular figures.
   Colour only for meaning: --ok ready · --err error · --info snap/info · --warn chapter/warning · --fx effects/beat drops. */

:root {
	--bg: #09090b; --bg-2: #0c0c0e;
	--panel: #111114; --panel-2: #16161a; --panel-3: #1c1c21; --panel-hover: #1f1f24;
	--border: #1f1f23; --border-2: #2a2a30; --border-3: #3a3a42;
	--text: #ededef; --text-2: #a1a1aa; --text-3: #71717a;
	--ok: #4ade80; --err: #ff6369; --info: #38bdf8; --warn: #f59e0b; --fx: #f97316;
	--err-bg: rgb(255 99 105 / 0.1); --warn-bg: rgb(245 158 11 / 0.1); --info-bg: rgb(56 189 248 / 0.1); --ok-bg: rgb(74 222 128 / 0.1);
	--accent: #fafafa; --accent-fg: #09090b;
	--r-sm: 4px; --r: 6px; --r-lg: 8px;
	--t: 90ms;
	--sans: Geist, Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "Geist Mono", "JetBrains Mono", ui-monospace, Consolas, monospace;
	--rail-w: 60px; --rail-open: 216px; --top-h: 48px;
	--ease: cubic-bezier(.2, .7, .2, 1); --t-in: 170ms; --t-out: 130ms;
	color-scheme: dark;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
	font: 13px/1.5 var(--sans); font-variant-numeric: tabular-nums; text-transform: lowercase;
	-webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.015em; margin: 0; }
p { margin: 0.3em 0; }
button { font: inherit; color: inherit; cursor: pointer; text-transform: lowercase; }
input, textarea, select { font: inherit; color: inherit; text-transform: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 1px solid var(--info); outline-offset: 1px; }
::selection { background: rgb(56 189 248 / 0.3); }
kbd { font: 500 10.5px/1 var(--mono); padding: 2px 5px; border-radius: var(--r-sm); background: var(--panel-3); border: 1px solid var(--border-2); text-transform: none; margin-right: 2px; }
.keep-case { text-transform: none; }
.hidden { display: none !important; }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.small { font-size: 11.5px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.error { color: var(--err); font-size: 12.5px; }
.pad { padding: 12px 14px; }
.pad-x { padding: 0 10px; }
.up { color: var(--ok); } .down { color: var(--err); }
.display { font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 10.5px; font-weight: 600; color: var(--text-3); }

/* ---------- surfaces ---------- */
.pane, .card { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); }
.card { background: var(--panel); }
.pane.scroll, .card.scroll { overflow: auto; }
.glass-menu { background: var(--panel-2); border: 1px solid var(--border-2); box-shadow: 0 12px 32px rgb(0 0 0 / 0.5); }
/* a card whose job is running: a static accent edge, no motion */
.busy { box-shadow: inset 2px 0 0 var(--info); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border-2); border-radius: var(--r); padding: 5px 11px;
	font-size: 12.5px; font-weight: 500; line-height: 1.3; background: var(--panel-2); color: var(--text); white-space: nowrap;
	transition: background var(--t), border-color var(--t), color var(--t); }
.btn:hover:not(:disabled) { background: var(--panel-hover); border-color: var(--border-3); }
.btn:active:not(:disabled) { background: var(--panel-3); }
.btn .ico { flex: none; }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: #fff; border-color: #fff; }
.btn.primary:disabled { background: var(--panel-2); color: var(--text-3); border-color: var(--border-2); }
.btn.danger { background: transparent; color: var(--err); border-color: rgb(255 99 105 / 0.35); }
.btn.danger:hover:not(:disabled) { background: var(--err-bg); border-color: var(--err); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { background: var(--panel-3); color: var(--text); border-color: transparent; }
.btn.ghost.danger { color: var(--err); }
.btn.on { background: var(--panel-3); border-color: var(--text-3); color: #fff; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sm { padding: 3px 8px; font-size: 11.5px; gap: 5px; }
.btn.icon { padding: 5px; aspect-ratio: 1; }
.btn.icon.sm { padding: 3px; }
.btn.play { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.play:hover:not(:disabled) { background: #fff; }
.mini { border: 1px solid var(--border-2); background: var(--panel-2); color: var(--text-2); font: 500 9.5px/1 var(--mono); padding: 3px 5px; border-radius: var(--r-sm); text-transform: lowercase; }
.mini:hover { color: var(--text); border-color: var(--border-3); }

.field { width: 100%; border: 1px solid var(--border-2); background: var(--bg-2); border-radius: var(--r); padding: 6px 9px; outline: none; font-size: 13px;
	transition: border-color var(--t); }
.field:hover:not(:focus):not(:disabled) { border-color: var(--border-3); }
.field:focus { border-color: var(--info); }
.field::placeholder { color: var(--text-3); text-transform: lowercase; }
textarea.field { resize: vertical; line-height: 1.45; }
.bare { border: 0; outline: 0; background: transparent; width: 100%; font-size: 14px; }
.num-sm { width: 72px; }
select { appearance: none; -webkit-appearance: none; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a1a1aa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px !important; }
/* `.field` sets the `background` shorthand, which would drop the arrow; put it back */
select.field { background-color: var(--bg-2);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a1a1aa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 10px center; }
select option { background: var(--panel-2); color: var(--text); }
input[type=color] { width: 28px; height: 22px; border: 1px solid var(--border-2); padding: 0; background: none; border-radius: var(--r-sm); cursor: pointer; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--r); border: 1px solid var(--border-2);
	background: var(--panel-2); font-size: 12px; color: var(--text-2); white-space: nowrap; transition: background var(--t), color var(--t), border-color var(--t); }
button.chip:hover:not(.on) { color: var(--text); border-color: var(--border-3); }
.chip.on { background: var(--panel-3); color: #fff; border-color: var(--text-3); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.badge { display: inline-block; font: 500 10.5px/1.35 var(--mono); padding: 0 6px; border-radius: var(--r-sm); white-space: nowrap;
	border: 1px solid var(--border-2); color: var(--text-2); background: var(--panel-2); text-transform: lowercase; }
.badge.scheduled, .badge.posting, .badge.running, .badge.rendering, .badge.queued { color: var(--info); border-color: rgb(56 189 248 / 0.35); background: var(--info-bg); }
.badge.posted, .badge.ready, .badge.done, .badge.ok, .badge.live { color: var(--ok); border-color: rgb(74 222 128 / 0.35); background: var(--ok-bg); }
.badge.failed, .badge.rejected, .badge.error, .badge.broken, .badge.expired { color: var(--err); border-color: rgb(255 99 105 / 0.35); background: var(--err-bg); }
.badge.expiring, .badge.review, .badge.paused { color: var(--warn); border-color: rgb(245 158 11 / 0.35); background: var(--warn-bg); }
.badge.long { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.badge.short { color: var(--text); border-color: var(--text-3); }
.badge.edited { color: var(--warn); }
.empty { border: 1px dashed var(--border-2); border-radius: var(--r-lg); padding: 16px; color: var(--text-2); text-align: center; }
.loading { padding: 16px; color: var(--text-3); }
.bar { height: 3px; border-radius: 2px; background: var(--panel-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--info); }

/* segmented control: a recessed well, the chosen option is a solid fill */
.seg { display: flex; flex-wrap: wrap; align-items: stretch; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--r); padding: 2px; gap: 2px; min-width: 0; max-width: 100%; }
.seg > button { flex: 1 1 auto; min-width: 0; border: 0; background: none; border-radius: var(--r-sm); padding: 3px 9px; font-size: 12px; font-weight: 500;
	white-space: nowrap; color: var(--text-2); transition: background var(--t), color var(--t); }
.seg > button:hover:not(.on) { color: var(--text); background: var(--panel-2); }
.seg > button.on { background: var(--panel-3); color: #fff; box-shadow: inset 0 0 0 1px var(--border-3); }
.seg.sm > button { padding: 1px 7px; font-size: 11.5px; }
.seg.fit { display: inline-flex; width: fit-content; }
.seg.fit > button { flex: 0 1 auto; }

input.toggle { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 32px; height: 18px; margin: 0; border-radius: 9px;
	background: var(--panel-3); border: 1px solid var(--border-3); cursor: pointer; transition: background var(--t), border-color var(--t); }
input.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-2); transition: transform var(--t), background var(--t); }
input.toggle:checked { background: var(--accent); border-color: var(--accent); }
input.toggle:checked::after { transform: translateX(14px); background: var(--accent-fg); }
input.toggle:disabled { opacity: .4; cursor: default; }
input[type=checkbox]:not(.toggle) { appearance: none; -webkit-appearance: none; flex: none; width: 15px; height: 15px; margin: 0; border-radius: var(--r-sm); cursor: pointer;
	background: var(--bg-2); border: 1px solid var(--border-3); display: inline-grid; place-content: center; vertical-align: -3px; }
input[type=checkbox]:not(.toggle)::after { content: ''; width: 9px; height: 9px; opacity: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.2l2.3 2.3L8.6 2.6' fill='none' stroke='%2309090b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
input[type=checkbox]:not(.toggle):checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:not(.toggle):checked::after { opacity: 1; }
input[type=range] { appearance: none; -webkit-appearance: none; height: 18px; margin: 0; background: transparent; cursor: pointer; min-width: 60px; flex: 1; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--text-2) var(--p, 0%), var(--panel-3) var(--p, 0%)); }
input[type=range]::-moz-range-track { height: 3px; border-radius: 2px; background: var(--panel-3); }
input[type=range]::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--text-2); }
input[type=range]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; border: 0; background: var(--text); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; border: 0; background: var(--text); }

/* ---------- caption fonts the engine burns in ---------- */
@font-face { font-family: 'cap-montserrat'; src: url('/fonts/Montserrat-ExtraBold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'cap-poppins'; src: url('/fonts/Poppins-ExtraBold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'cap-archivo'; src: url('/fonts/ArchivoBlack-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'cap-anton'; src: url('/fonts/Anton-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'cap-bebas'; src: url('/fonts/BebasNeue-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'cap-barlow'; src: url('/fonts/BarlowCondensed-ExtraBold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'cap-kanit'; src: url('/fonts/Kanit-ExtraBold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'cap-bangers'; src: url('/fonts/Bangers-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'cap-kalam'; src: url('/fonts/Kalam-Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'cap-dmserif'; src: url('/fonts/DMSerifDisplay-Regular.ttf') format('truetype'); font-display: swap; }

/* =================================================================== shell */
.layout { display: grid; grid-template-columns: var(--rail-w) 1fr; grid-template-rows: var(--top-h) 1fr; height: 100vh; }
.layout.bare { display: block; }
.rail { grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; padding: 8px 0; gap: 6px; z-index: 5;
	background: var(--bg-2); border-right: 1px solid var(--border); }
.brand { display: grid; place-items: center; margin-bottom: 4px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r); background: var(--accent); color: var(--accent-fg);
	font: 700 16px/1 var(--sans); text-transform: none; }
.brand-mark.big { width: 44px; height: 44px; font-size: 24px; border-radius: var(--r-lg); }
.rail-items { display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 0 6px; overflow-y: auto; min-height: 0; }
.rail-item { position: relative; display: grid; place-items: center; height: 40px; border-radius: var(--r); color: var(--text-3);
	transition: background var(--t), color var(--t); }
.rail-item:hover { background: var(--panel-2); color: var(--text); }
.rail-item.on { background: var(--panel-3); color: #fff; }
.rail-item.on::before { content: ''; position: absolute; left: -6px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--accent); }
.rail-label { font-size: 9.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-dot { position: absolute; top: 2px; right: 8px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--err); color: #fff; font: 600 9.5px/15px var(--mono); text-align: center; }
.rail-profile { margin-top: auto; width: 100%; padding: 8px 6px 0; display: flex; flex-direction: column; align-items: center; gap: 3px; border-top: 1px solid var(--border); }
.rail-avatar { position: relative; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--panel-3); border: 1px solid var(--border-3); }
.rail-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rail-avatar:hover { border-color: var(--text-2); }
.rail-initial { font-size: 13px; font-weight: 600; text-transform: none; }
.rail-name { color: var(--text-2); }
.rail-logout { border: 0; background: none; color: var(--text-3); padding: 4px; border-radius: var(--r-sm); display: grid; place-items: center; }
.rail-logout:hover { color: var(--text); background: var(--panel-2); }
.topbar { display: flex; align-items: center; gap: 14px; padding: 0 14px 0 16px; min-width: 0; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.wordmark { font: 400 22px/1 'cap-dmserif', "DM Serif Display", Georgia, serif; text-transform: none; color: var(--text); letter-spacing: -0.01em; padding-right: 4px; }
.quick-add { flex: 0 1 560px; display: flex; align-items: center; gap: 4px; padding: 3px 3px 3px 10px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--border-2); min-width: 0; }
.quick-add:focus-within { border-color: var(--info); }
.qa-url { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12.5px; }
.qa-url::placeholder { color: var(--text-3); text-transform: lowercase; }
.qa-genre { border: 1px solid var(--border-2); background-color: var(--panel-2); border-radius: var(--r-sm); font-size: 11.5px; padding: 3px 24px 3px 8px; color: var(--text-2); }
.qa-uploads { display: flex; gap: 6px; min-width: 0; overflow: hidden; }
.flash { font-size: 11px; padding: 2px 7px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--border-2); white-space: nowrap; color: var(--text-2); }
.flash.err { color: var(--err); border-color: rgb(255 99 105 / 0.4); }
.estat { position: relative; }
.estat-pill { position: relative; overflow: hidden; min-width: 190px; max-width: 280px; cursor: pointer; color: var(--text); }
.estat-pill b { font-weight: 600; font-size: 11px; }
.sdot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex: none; }
.sdot.live { background: var(--ok); } .sdot.wait { background: var(--warn); }
.warn-count { margin-left: auto; background: var(--err); color: #fff; border-radius: var(--r-sm); padding: 0 5px; }
/* a thin straight line along the bottom inside the pill, clear of its rounded edges */
.estat-bar { position: absolute; left: 12px; right: 12px; bottom: 3px; height: 1.5px; border-radius: 0; background: var(--info); opacity: 0;
	transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .5s var(--ease), opacity var(--t-in); pointer-events: none; }
.estat-bar.on { opacity: .9; }
.estat-pop { position: absolute; right: 0; top: calc(100% + 6px); width: 300px; z-index: 40; border-radius: var(--r-lg); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.srow { display: flex; flex-direction: column; gap: 3px; padding: 7px 8px; border-radius: var(--r); }
.srow + .srow { border-top: 1px solid var(--border); }
.estat-pop .bad { color: var(--err); padding: 6px 8px; font-size: 12px; border-radius: var(--r); }
.estat-pop .bad:hover { background: var(--err-bg); }
.tb-btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px; border-radius: var(--r); border: 1px solid var(--border-2); background: var(--panel); color: var(--text-2); }
.tb-btn:hover { color: var(--text); border-color: var(--border-3); }
.tb-btn.has { color: var(--text); }
.tb-btn b { font-size: 11px; }
.dropall { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgb(9 9 11 / 0.82); border: 2px dashed var(--info); pointer-events: none; }
.dropall h2 { font-size: 20px; }
.toast-undo { margin-left: 6px; border: 1px solid var(--border-3); background: var(--panel-3); border-radius: var(--r-sm); padding: 1px 8px; font-size: 11.5px; pointer-events: auto; }
.toast-undo:hover { border-color: var(--text-2); }
.pick-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.strong { font-weight: 600; }
.part-list { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r); padding: 4px; }
.part-row { display: flex; gap: 10px; align-items: center; padding: 4px 6px; border-radius: var(--r-sm); cursor: pointer; }
.part-row:hover { background: var(--panel-3); }
.num-md { width: 96px; }
.cmd-trigger { flex: 1 1 auto; max-width: 480px; display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: var(--r);
	background: var(--panel); border: 1px solid var(--border-2); color: var(--text-3); font-size: 12px; text-align: left; transition: border-color var(--t); }
.cmd-trigger span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-trigger:hover { border-color: var(--border-3); color: var(--text-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px; border-radius: var(--r); font-size: 11.5px; white-space: nowrap; max-width: 340px;
	background: var(--panel); border: 1px solid var(--border-2); }
.pill.dry { color: var(--warn); border-color: rgb(245 158 11 / 0.45); background: var(--warn-bg); font: 600 10.5px/1.4 var(--mono); letter-spacing: .06em; text-transform: none; }
.pill.live { color: var(--text); }
.pill.idle { color: var(--text-3); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }
.main { min-width: 0; min-height: 0; overflow: auto; position: relative; }
.layout.bare .main { height: 100vh; }

.scrim { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / 0.6); display: grid; place-items: start center; padding-top: 11vh; }
.cmd { width: min(600px, 92vw); border-radius: var(--r-lg); overflow: hidden; }
.cmd-input { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border-2); }
.cmd-list { max-height: 50vh; overflow-y: auto; padding: 4px; }
.cmd-row { display: flex; width: 100%; justify-content: space-between; align-items: center; border: 0; background: none; padding: 7px 10px; border-radius: var(--r); text-align: left; text-transform: none; }
.cmd-row.on { background: var(--panel-3); }
.cmd-foot { padding: 7px 12px; border-top: 1px solid var(--border-2); }
.modal { width: min(560px, 94vw); max-height: 80vh; overflow: auto; padding: 0; background: var(--panel-2); border-color: var(--border-2); box-shadow: 0 16px 48px rgb(0 0 0 / 0.6); }
.modal.wide { width: min(860px, 94vw); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 8px 16px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 14px; }
.modal-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: var(--r); max-width: 420px; font-size: 12.5px; text-transform: none; }
.toast-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--info); flex: none; }
.toast.ok .toast-dot { background: var(--ok); }
.toast.err .toast-dot { background: var(--err); }
.toast.err { border-color: rgb(255 99 105 / 0.4); }

/* =================================================================== pages */
.page { padding: 16px 22px 40px 20px; display: flex; flex-direction: column; gap: 14px; max-width: 1500px; }
.page.narrow { max-width: 960px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.page-head p { font-size: 12.5px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row { display: flex; align-items: center; gap: 12px; min-height: 30px; padding: 2px 0; }
.row-label { flex: 0 0 38%; font-size: 12px; color: var(--text-2); }
.row-ctl { flex: 1; display: flex; justify-content: flex-end; align-items: center; min-width: 0; gap: 6px; }
.row-btns { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; min-width: 0; }
.row-btns.wrap { flex-wrap: wrap; }
.lbl { display: block; font-size: 11.5px; color: var(--text-2); margin: 8px 0 4px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dry-note { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r); background: var(--warn-bg); border: 1px solid rgb(245 158 11 / 0.3); }

/* login */
.login-wrap { height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: min(380px, 94vw); padding: 24px 22px 18px; display: flex; flex-direction: column; }
.login-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.login-brand h1 { font-size: 22px; text-transform: none; }
.login-btn { margin-top: 14px; padding: 8px; }
.login-foot { display: flex; justify-content: center; margin-top: 12px; }

/* videos */
.composer { padding: 14px; }
.composer.drop { border-color: var(--info); background: var(--info-bg); }
.composer.slim { padding: 10px 12px; }
.composer-main { display: flex; flex-direction: column; gap: 12px; }
.url-row { display: flex; align-items: center; gap: 8px; }
.url-row .field.url { flex: 1; font-size: 13.5px; padding: 8px 10px; }
.probe { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--border); }
.probe-thumb { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r-sm); }
.format-pick { display: flex; flex-direction: column; gap: 6px; }
.format-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.format-card { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border-radius: var(--r); background: var(--bg-2);
	border: 1px solid var(--border-2); transition: border-color var(--t), background var(--t); }
.format-card > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.format-card:hover { border-color: var(--border-3); }
.format-card.on { background: var(--panel-3); border-color: var(--text-2); }
.fc-ratio { flex: none; border-radius: 3px; border: 1.5px solid currentColor; opacity: .75; }
.fc-ratio.v { width: 16px; height: 28px; } .fc-ratio.h { width: 36px; height: 21px; }
.long-opts { padding: 2px; }
.len-row { display: flex; align-items: center; gap: 8px; }
.len-row .lbl { margin: 0 8px 0 0; }
.composer-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.composer-foot .genre { width: 170px; }
.uploads { display: flex; flex-direction: column; gap: 6px; }
.upload-row { display: grid; grid-template-columns: 1fr 2fr 48px; gap: 12px; align-items: center; padding: 8px 12px; }
.sources { display: flex; flex-direction: column; gap: 8px; }
.source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.source { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.source-head, .source-foot, .stage { display: flex; align-items: center; gap: 8px; }
.source-title { font-size: 14px; line-height: 1.3; font-weight: 500; }

/* queue */
.queue { padding: 0; display: flex; flex-direction: column; }
.q-row { display: grid; grid-template-columns: 36px minmax(0, 2.2fr) minmax(0, 1.4fr) 110px 190px; gap: 12px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.q-row:last-child { border-bottom: 0; }
.q-head { background: var(--panel-2); }
.q-row:not(.q-head):hover { background: var(--panel-2); }
.q-job, .q-acts { display: flex; align-items: center; gap: 8px; min-width: 0; }
.q-prog { display: flex; flex-direction: column; gap: 4px; }
.q-acts { justify-content: flex-end; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.user-row .field { width: 150px; }

/* schedule */
.cal-title { font-size: 15px; font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; padding: 2px; }
.cal-day { min-height: 90px; padding: 6px; display: flex; flex-direction: column; gap: 3px; border-radius: var(--r); }
.cal.week .cal-day { min-height: 320px; }
.cal-day.today { border-color: var(--info); }
.cal-day.other { opacity: .45; }
.cal-date { color: var(--text-3); }
.post-chip { display: flex; gap: 6px; align-items: center; border: 1px solid var(--border-2); text-align: left; padding: 3px 6px; border-radius: var(--r-sm); background: var(--panel-2); font-size: 11.5px; min-width: 0; }
.post-chip:hover { border-color: var(--border-3); }
.post-chip.failed { border-color: var(--err); }
.post-chip.posted { opacity: .6; }
.plat-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--text-2); }
.plat-dot.youtube { background: #ef4444; } .plat-dot.instagram { background: #d946ef; } .plat-dot.tiktok { background: var(--info); }
.plat { font: 600 10px/1.4 var(--mono); padding: 0 6px; border-radius: var(--r-sm); background: var(--panel-3); border: 1px solid var(--border-2); text-transform: uppercase; letter-spacing: .04em; }
.failed { display: flex; flex-direction: column; gap: 6px; }
.failed-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; }
.failed-row .error { max-width: 30%; }
.post-edit { display: flex; flex-direction: column; gap: 4px; }

/* accounts */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; }
.acc { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.acc-head { display: flex; gap: 12px; align-items: center; }
.acc-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--panel-3); border: 1px solid var(--border-2); flex: none; }
.acc-handle { font-size: 14px; font-weight: 600; }
.acc-grid2 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }

/* music */
.filter-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filter-row .search { width: 240px; }
.music-list { display: flex; flex-direction: column; gap: 6px; }
.track { display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 2fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 8px 12px; }
.track-info { min-width: 0; }
.wave { width: 100%; height: 36px; display: block; }
.drop-line { stroke: var(--fx); stroke-width: 1.5; }

/* overview & reports */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.stat { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.stat-n { font-size: 26px; }
.chart { padding: 12px 14px; }
.chart-svg { width: 100%; height: 140px; display: block; margin-top: 8px; }
.perf-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--border); }
.reports { display: grid; grid-template-columns: 220px 1fr; gap: 12px; }
.report-list { padding: 4px; max-height: 70vh; display: flex; flex-direction: column; gap: 1px; }
.report-item { border: 0; background: none; text-align: left; padding: 6px 10px; border-radius: var(--r); }
.report-item.on, .report-item:hover { background: var(--panel-3); }
.report-body { display: flex; flex-direction: column; gap: 10px; }

/* notifications */
.notes { display: flex; flex-direction: column; gap: 6px; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; }
.note.unread { box-shadow: inset 2px 0 0 var(--info); }
.note-dot { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--text-3); flex: none; }
.note-dot.error, .note-dot.failed { background: var(--err); } .note-dot.posted, .note-dot.ready { background: var(--ok); }
.note-title { font-weight: 500; }
.note .field { width: 180px; }

/* settings */
.set-sec { display: flex; flex-direction: column; gap: 2px; }
.set-sec .row-label { flex-basis: 34%; }
.profile { flex-direction: row; gap: 20px; align-items: flex-start; }
.avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--panel-3); border: 1px solid var(--border-2); }
.tpl-row { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.json { max-height: 60vh; overflow: auto; white-space: pre-wrap; text-transform: none; color: var(--text-2); }
.hero-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px; max-width: 460px; }

/* =================================================================== studio */
.studio { height: calc(100vh - var(--top-h)); padding: 6px; display: grid; gap: 6px;
	grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(290px, 340px);
	grid-template-rows: minmax(300px, 1fr) minmax(300px, 40vh);
	grid-template-areas: "bin mon insp" "tl tl tl"; }
.st-full { grid-column: 1 / -1; grid-row: 1 / -1; display: grid; place-items: center; }
.st-bin { grid-area: bin; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.st-monitor { grid-area: mon; min-height: 0; overflow: hidden; }
.st-insp { grid-area: insp; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.st-tl { grid-area: tl; min-height: 0; overflow: hidden; }
.panel-tabs { padding: 6px; border-bottom: 1px solid var(--border); flex: none; }
.panel-tabs .seg { width: 100%; }
.panel-tabs .seg > button { flex: 1 1 0; }

/* bin */
.bin { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.bin-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; }
.bin-list { display: flex; flex-direction: column; gap: 2px; }
.bin-clip { display: flex; gap: 9px; align-items: center; border: 1px solid transparent; background: none; text-align: left; padding: 5px; border-radius: var(--r); min-width: 0; }
.bin-clip:hover { background: var(--panel-2); }
.bin-clip.on { background: var(--panel-3); border-color: var(--border-3); }
.bin-thumb { width: 40px; height: 56px; object-fit: cover; border-radius: var(--r-sm); background: var(--panel-3); flex: none; }
.bin-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 12px; }
.bin-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.director { display: flex; flex-direction: column; gap: 12px; }
.ai-card { padding: 10px 12px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--border-2); }
.ai-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; color: var(--text-2); }
.ai-notes { font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; color: var(--text); }
.ai-stats { margin-top: 8px; }
.field-block { display: flex; flex-direction: column; gap: 5px; }
.protect-card { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r); background: var(--warn-bg); border: 1px solid rgb(245 158 11 / 0.3); }
.protect-card > div { flex: 1; }
.dot-amber { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.chapter-row { display: flex; gap: 6px; align-items: center; padding: 2px; border-radius: var(--r); }
.chapter-row.sel { background: var(--warn-bg); }
.chapter-at { border: 1px solid rgb(245 158 11 / 0.35); background: var(--warn-bg); color: var(--warn); padding: 2px 6px; border-radius: var(--r-sm); }
.bare-field { padding: 3px 7px; background: transparent; border-color: transparent; }
.chapter-add { display: flex; gap: 6px; margin-top: 6px; }
.words-tab, .music-tab { display: flex; flex-direction: column; gap: 8px; }
.words-tools { display: flex; gap: 6px; }
.transcript { font-size: 13px; line-height: 1.85; margin: 0; padding: 0 4px 30px; }
.tw { cursor: pointer; padding: 1px 2px; border-radius: 3px; }
.tw:hover { background: var(--panel-3); }
.tw.cut { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgb(255 99 105 / 0.6); }
.tw.muted { text-decoration: line-through; opacity: .5; }
.tw.edited { box-shadow: inset 0 -1.5px 0 var(--warn); }
.tw.cur { background: var(--accent); color: var(--accent-fg); }
.tw.sel { outline: 1px solid var(--info); }
.tw.tone-excited, .tone-chip.tone-excited.on { color: var(--fx); }
.tw.tone-negative { color: var(--err); }
.tw.tone-fact { color: var(--info); }
.tw.cur.tone-excited, .tw.cur.tone-negative, .tw.cur.tone-fact { color: var(--accent-fg); }
.word-editor { padding: 10px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--border-2); display: flex; flex-direction: column; gap: 7px; }
.we-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tone-chip.on.tone-negative { color: var(--err); } .tone-chip.on.tone-fact { color: var(--info); }
.track-row { display: flex; align-items: center; gap: 8px; padding: 5px; border-radius: var(--r); }
.track-row:hover { background: var(--panel-2); }
.track-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; }
.track-acts { display: flex; gap: 4px; }

/* monitor */
.mon { display: flex; flex-direction: column; height: 100%; }
.mon-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.mon-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; }
.mon-modes { display: flex; gap: 6px; flex: none; }
.mon-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; display: grid; place-items: center; background: #050506; }
.mon-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.mon-video.under { opacity: 0; pointer-events: none; }
.mon-frame { position: relative; container-type: size; overflow: hidden; border-radius: 2px; background: #000; border: 1px solid var(--border-2); z-index: 1; }
.mon-frame.hidden { display: none; }
.mon-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mon-note, .mon-error { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 3; padding: 5px 10px; border-radius: var(--r); font-size: 11.5px;
	background: var(--panel-2); border: 1px solid var(--border-2); white-space: nowrap; }
.mon-error { top: 50%; bottom: auto; transform: translate(-50%, -50%); color: var(--text-2); }
.mon-transport { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-top: 1px solid var(--border); }
.tc { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
/* the caption + hook overlays preview the burned-in look, so they keep the render's own styling */
.cap-layer { position: absolute; left: 5%; right: 5%; transform: translateY(-50%); text-align: center; font-weight: 800; line-height: 1.12; color: var(--cap-color, #fff);
	pointer-events: none; z-index: 2; letter-spacing: 0.01em; font-variant-numeric: normal; }
.cap-line { display: inline; }
.cap-layer.boxed .cap-line { background: rgb(0 0 0 / 0.62); padding: 0.06em 0.32em; border-radius: 0.18em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cap-w.tone-excited { color: #ff7a4d; } .cap-w.tone-negative { color: #ff6369; } .cap-w.tone-fact { color: #5ceeff; }
.cap-w.hl { color: var(--cap-hl, #ffe14d); }
.hook-layer { position: absolute; left: 6%; right: 6%; transform: translateY(-50%); text-align: center; z-index: 3; cursor: pointer; text-transform: none; font-weight: 800; line-height: 1.25; font-variant-numeric: normal; }
.hook-card { display: inline; }
.hook-layer.per-line .hook-card span { background: var(--hook-bg); color: var(--hook-fg); padding: 0.1em 0.38em; border-radius: 0.18em; -webkit-box-decoration-break: clone; box-decoration-break: clone; line-height: 1.5; }
.hook-layer.box .hook-card { display: inline-block; background: var(--hook-bg); color: var(--hook-fg); padding: 0.28em 0.5em; border-radius: 0.3em; }
.hook-layer.fill .hook-card { display: block; background: var(--hook-bg); color: var(--hook-fg); padding: 0.3em 0.4em; border-radius: 0.2em; }
.fx-badges { position: absolute; left: 6px; top: 6px; display: flex; flex-direction: column; gap: 3px; z-index: 4; pointer-events: none; }
.fx-badge { font: 600 10px/1 var(--mono); padding: 3px 6px; border-radius: var(--r-sm); color: var(--fx); background: rgb(9 9 11 / 0.85); border: 1px solid rgb(249 115 22 / 0.5); text-transform: none; }
.trans-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.trans-layer.flash { background: #fff; }
.cam-box { position: absolute; z-index: 3; border: 1.5px solid var(--info); border-radius: 2px; cursor: move; box-shadow: 0 0 0 9999px rgb(0 0 0 / 0.45); }
.cam-box-label { position: absolute; left: -1px; top: -19px; font: 600 10px/1 var(--mono); padding: 3px 5px; border-radius: var(--r-sm); background: var(--info); color: var(--accent-fg); white-space: nowrap; text-transform: none; }
.hdl { position: absolute; width: 10px; height: 10px; background: #fff; border: 1.5px solid var(--info); border-radius: 2px; }
.hdl.nw { left: -6px; top: -6px; cursor: nwse-resize; } .hdl.ne { right: -6px; top: -6px; cursor: nesw-resize; }
.hdl.sw { left: -6px; bottom: -6px; cursor: nesw-resize; } .hdl.se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.cam-empty { position: absolute; z-index: 3; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; padding: 5px 6px 5px 10px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--border-2); }

/* inspector */
.insp { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.insp-body { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 12px 12px; }
.insp-sec { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 1px; }
.insp-sec.sel-sec { box-shadow: inset 2px 0 0 var(--fx); padding-left: 8px; }
.insp-sec h4 { margin-bottom: 4px; }
.insp .row-label { flex-basis: 40%; font-size: 11.5px; }
.insp .row-ctl .seg { max-width: 100%; }
.num { display: inline-flex; align-items: center; gap: 4px; }
.num .field { width: 92px; padding: 3px 7px; font-size: 12px; font-family: var(--mono); }
.color-field { display: inline-flex; gap: 6px; align-items: center; }
.keys { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 5px; }
.save-bar { flex: none; padding: 8px 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; background: var(--bg-2); }
.save-row { display: flex; align-items: center; gap: 8px; }
.save-kind { flex: 1; display: flex; align-items: center; gap: 7px; color: var(--text-2); min-width: 0; }
.save-warn { color: #ffb4b7; background: var(--err-bg); border: 1px solid rgb(255 99 105 / 0.3); padding: 5px 8px; border-radius: var(--r); text-transform: none; }
.force { display: flex; gap: 8px; align-items: center; color: var(--warn); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.clean { background: var(--ok); }
.dot.meta { background: var(--info); }
.dot.fast { background: var(--warn); }
.dot.full { background: var(--fx); }
.target-list { display: flex; flex-direction: column; gap: 4px; }
.target-row { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--border); }
.target-row.on { border-color: var(--border-3); background: var(--panel-3); }
.target-row .field { width: 190px; padding: 4px 7px; font-size: 12px; }

/* timeline dock */
.tl { display: flex; flex-direction: column; height: 100%; min-height: 0; user-select: none; -webkit-user-select: none; }
.tl-toolbar { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: var(--bg-2); }
.tool-group { display: flex; align-items: center; gap: 3px; padding-right: 8px; border-right: 1px solid var(--border); }
.tool-group:last-child { border-right: 0; padding-right: 0; }
.tc-group .tc { min-width: 74px; }
.hist { margin-left: 4px; }
.zoom-range { width: 140px; flex: none; }
.zoom-label { min-width: 44px; text-align: right; }
.tl-mm-row { display: flex; align-items: center; border-bottom: 1px solid var(--border); }
.tl-mm-pad { width: 156px; flex: none; padding: 0 10px; font-size: 10.5px; }
.minimap { position: relative; flex: 1; height: 16px; margin: 4px 8px 4px 0; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--border-2); cursor: pointer; overflow: hidden; }
.mm-piece { position: absolute; top: 3px; bottom: 3px; background: #3f3f46; border-radius: 1px; }
.mm-piece.alt { background: #52525b; }
.mm-chapter { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--warn); }
.mm-window { position: absolute; top: 0; bottom: 0; border-radius: 2px; border: 1px solid var(--text-2); background: rgb(255 255 255 / 0.05); cursor: grab; }
.mm-playhead { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--err); }
.tl-body { flex: 1; min-height: 0; display: flex; overflow-y: auto; }
.tl-heads { flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--bg-2); }
.th { display: flex; align-items: center; gap: 6px; padding: 0 8px; border-bottom: 1px solid var(--border); font-size: 11px; color: var(--text-2); min-width: 0; }
.th-code { font-weight: 700; color: var(--text); width: 20px; flex: none; font-family: var(--mono); }
.th-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.th-acts { display: flex; gap: 3px; flex-direction: column; }
.tl-scroll { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; position: relative; background: var(--panel); }
.tl-content { position: relative; min-height: 100%; }
/* track heights: header rows and track lanes must match */
.ruler, .th.ruler-h { height: 38px; }
.v1, .th.v1 { height: 54px; }
.v2, .th.v2 { height: 36px; }
.fx, .th.fx { height: 44px; }
.t1, .th.t1 { height: 32px; }
.a1, .th.a1 { height: 46px; }
.a2, .th.a2 { height: 58px; }
.trk { position: relative; border-bottom: 1px solid var(--border); }
.trk.ruler { background: var(--bg-2); cursor: text; }
.trk.v1.razor { cursor: crosshair; }
.vp-canvas { position: absolute; top: 0; pointer-events: none; display: block; }
.trk.a1 .vp-canvas, .trk.a2 .vp-canvas { top: 1px; }
.end-zone { position: absolute; top: 0; bottom: 0; right: 0; background: var(--bg-2); pointer-events: none; }
.playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: var(--err); z-index: 20; pointer-events: none; will-change: transform; }
.ph-head { position: absolute; top: 0; left: -5px; width: 11px; height: 10px; background: var(--err); clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); }
.snap-line { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--info); z-index: 19; pointer-events: none; }
.protect-band { position: absolute; top: 0; height: 10px; background: rgb(245 158 11 / 0.18); border-bottom: 2px solid var(--warn); overflow: hidden; pointer-events: auto; }
.protect-band span { font: 600 8px/9px var(--mono); color: var(--warn); padding: 0 4px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.chapter-flag { position: absolute; bottom: 1px; display: flex; align-items: center; gap: 3px; height: 14px; padding: 0 5px 0 3px; border-radius: 0 3px 3px 0; z-index: 3;
	background: var(--warn); color: var(--accent-fg); font: 600 10px/1 var(--sans); white-space: nowrap; max-width: 220px; overflow: hidden; cursor: grab; }
.chapter-flag::before { content: ''; position: absolute; left: 0; top: -22px; width: 1px; height: 22px; background: var(--warn); }
.chapter-flag.sel { outline: 1px solid #fff; }
.clip-block { position: absolute; top: 5px; bottom: 5px; border-radius: var(--r-sm); overflow: hidden; cursor: pointer; background: #2a2a31; border: 1px solid #3f3f46; }
.clip-block:hover { border-color: #71717a; }
.clip-block.sel { border-color: var(--text); background: #34343c; }
.clip-block.short { border-color: var(--err); }
.blk-label { position: absolute; left: 9px; top: 4px; right: 9px; font: 10px/1.3 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); pointer-events: none; }
.trim { position: absolute; top: 0; bottom: 0; width: 7px; z-index: 2; cursor: ew-resize; background: transparent; }
.trim.l { left: 0; } .trim.r { right: 0; }
.clip-block:hover .trim, .fx-pill:hover .trim, .music-blk:hover .trim, .sel .trim { background: rgb(255 255 255 / 0.35); }
.razor .clip-block, .razor .clip-block .trim { cursor: crosshair; }
.cut-seam { position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 4; border: 1px solid rgb(255 99 105 / 0.6); padding: 1px 4px; border-radius: var(--r-sm); font: 600 9px/1.2 var(--mono);
	background: var(--bg); color: var(--err); white-space: nowrap; text-transform: none; }
.cut-seam:hover { background: var(--err); color: var(--accent-fg); }
.split-seam { position: absolute; top: 4px; bottom: 4px; width: 0; border-left: 1px dashed var(--text-2); z-index: 3; pointer-events: none; }
.shot-tick { position: absolute; bottom: 5px; height: 9px; width: 1px; background: var(--info); opacity: .7; pointer-events: none; z-index: 2; }
.razor-line { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--err); z-index: 5; pointer-events: none; }
.fx-pill { position: absolute; border-radius: 3px; cursor: grab; overflow: visible; display: flex; align-items: center; z-index: 2; }
.fx-pill .pill-label { font: 9px/1 var(--mono); padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; text-transform: none; }
.fx-pill.cam { top: 3px; height: 14px; background: #d4d4d8; color: var(--accent-fg); }
.fx-pill.fit { top: 19px; height: 14px; background: #3f3f46; color: var(--text); border: 1px solid #52525b; }
.fx-pill.zoom { top: 17px; height: 22px; background: rgb(249 115 22 / 0.22); color: #fdba74; border: 1px solid rgb(249 115 22 / 0.7); }
.fx-pill.sfx { top: 19px; height: 18px; width: 12px; background: var(--fx); transform: rotate(45deg) scale(0.7); border-radius: 2px; }
.fx-pill.sfx .sfx-tag { position: absolute; left: 14px; top: -2px; transform: rotate(-45deg) scale(1.4); transform-origin: left top; font: 8.5px/1 var(--mono); color: var(--fx); white-space: nowrap; text-transform: none; }
.fx-pill.sel { outline: 1px solid #fff; outline-offset: 1px; z-index: 3; }
.hook-bar { position: absolute; left: 0; top: 3px; height: 11px; border-radius: 2px; background: rgb(245 158 11 / 0.15); border: 1px solid rgb(245 158 11 / 0.6);
	font: 600 8.5px/9px var(--mono); color: var(--warn); padding: 0 6px; overflow: hidden; white-space: nowrap; cursor: pointer; }
.hook-bar.sel { outline: 1px solid #fff; }
.word-blk { position: absolute; top: 5px; height: 21px; border-radius: 2px; background: #232328; border: 1px solid #2f2f36;
	font-size: 10px; line-height: 19px; padding: 0 3px; overflow: hidden; white-space: nowrap; cursor: pointer; color: #d4d4d8; }
.word-blk:hover { border-color: #52525b; }
.word-blk.tone-excited { border-bottom: 2px solid var(--fx); }
.word-blk.tone-negative { border-bottom: 2px solid var(--err); }
.word-blk.tone-fact { border-bottom: 2px solid var(--info); }
.word-blk.edited { background: rgb(245 158 11 / 0.14); border-color: rgb(245 158 11 / 0.4); }
.word-blk.muted { opacity: .4; text-decoration: line-through; }
.word-blk.sel { background: var(--accent); color: var(--accent-fg); }
.trk-hint { position: absolute; top: 8px; font-size: 10.5px; color: var(--text-3); white-space: nowrap; pointer-events: none; }
.music-blk { position: absolute; top: 3px; bottom: 3px; border-radius: var(--r-sm); cursor: grab; background: rgb(255 255 255 / 0.03); border: 1px solid #3f3f46; overflow: visible; }
.music-blk.sel { border-color: var(--text); }
.music-title { position: absolute; left: 7px; top: 2px; font-size: 9.5px; white-space: nowrap; pointer-events: none; color: var(--text); z-index: 2; }
.fade-svg { position: absolute; inset: 14px 0 2px 0; width: 100%; height: calc(100% - 16px); pointer-events: none; }
.fade-hdl { position: absolute; top: 12px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #fff; z-index: 3; cursor: ew-resize; }
.fade-hdl.out { margin-left: 0; margin-right: -4px; }
.vol-line { position: absolute; left: 0; right: 0; height: 1.5px; margin-top: -1px; background: rgb(255 255 255 / 0.65); cursor: ns-resize; z-index: 2; }
.vol-line::after { content: ''; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }
.drop-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--fx); z-index: 2; pointer-events: none; }

/* compact screens */
@media (max-width: 1280px) {
	.studio { grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) minmax(270px, 300px); }
	.cmd-trigger span { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* ---------- dense tables (videos, queue-style lists) ---------- */
.head-line { display: flex; align-items: baseline; gap: 10px; }
.tbl-wrap { overflow-x: auto; padding: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 11.5px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--panel-2); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl .r { text-align: right; }
.tbl tr.busy td:first-child { box-shadow: inset 2px 0 0 var(--info); }
.v-title { max-width: 520px; }
.v-title > div { margin: 1px 0; }
.v-status { min-width: 170px; }
.acts { white-space: nowrap; }
.acts .btn { margin-left: 4px; }
.stepper { display: flex; gap: 3px; margin: 5px 0 3px; }
.step { width: 16px; height: 3px; border-radius: 1px; background: var(--panel-3); }
.step.done { background: var(--text-2); }
.step.now { background: var(--info); }
.composer .format-cards { margin-top: 10px; }
.composer .long-opts { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- review queue (studio bin) ---------- */
.rq { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.rq-tabs { width: 100%; }
.rq-tabs > button { flex: 1 1 0; padding: 3px 4px; font-size: 11.5px; }
.rq-tabs .cnt { margin-left: 4px; color: var(--text-3); font-size: 10.5px; }
.rq-tabs > button.on .cnt { color: var(--text-2); }
.rq-head { display: flex; justify-content: space-between; align-items: center; }
.rq-bulk { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--border-2); }
.lnk { border: 0; background: none; color: var(--text-2); font-size: 11.5px; padding: 0 2px; text-decoration: underline; text-underline-offset: 2px; }
.lnk:hover { color: var(--text); }
.rq-row { display: flex; align-items: center; gap: 4px; border-radius: var(--r); }
.rq-row.checked { background: var(--info-bg); }
.rq-row .ck { margin-left: 4px; }
.rq-row .bin-clip { flex: 1; min-width: 0; }
.rq-row.busy .bin-clip { box-shadow: inset 2px 0 0 var(--info); }
.rq-score { margin-left: auto; font-size: 13px; font-weight: 600; padding-left: 6px; color: var(--text); }
.rq .bin-list { flex: 1; min-height: 0; overflow-y: auto; }
.rq .keys { margin: 4px 0 0; }
.why-card { padding: 10px 12px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--border-2); display: flex; flex-direction: column; gap: 4px; }
.score-bars { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.score-bar { display: grid; grid-template-columns: 90px 1fr 28px; gap: 8px; align-items: center; }

/* ---------- planner (schedule) ---------- */
.page.wide { max-width: none; }
.planner { padding: 0; overflow-x: auto; }
.pl-row { display: grid; grid-template-columns: 200px repeat(7, minmax(130px, 1fr)); border-bottom: 1px solid var(--border); min-width: 1100px; }
.pl-row:last-child { border-bottom: 0; }
.pl-head { background: var(--panel-2); position: sticky; top: 0; z-index: 2; }
.pl-day { padding: 7px 10px; font-size: 12px; font-weight: 600; color: var(--text-2); border-left: 1px solid var(--border); }
.pl-day.today { color: var(--text); box-shadow: inset 0 -2px 0 var(--info); }
.pl-acc { display: flex; gap: 10px; align-items: center; padding: 10px; min-width: 0; border-left: 3px solid var(--border-3); }
.acc-youtube .pl-acc { border-left-color: #ef4444; } .acc-instagram .pl-acc { border-left-color: #d946ef; } .acc-tiktok .pl-acc { border-left-color: var(--info); }
.pl-cell { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-left: 1px solid var(--border); min-width: 0; }
.pl-cell.today { background: rgb(56 189 248 / 0.03); }
.pl-cell.past { opacity: .55; }
.slot { height: 22px; display: flex; align-items: center; padding: 0 8px; border-radius: var(--r-sm); border: 1px dashed var(--border-2); color: var(--text-3); font-size: 11px; }
.slot.free { color: var(--text-2); }
.post-card { position: relative; display: flex; gap: 7px; align-items: center; padding: 4px 18px 4px 4px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--border-2); text-align: left; min-width: 0; cursor: pointer; }
.post-card[draggable=true] { cursor: grab; }
.post-card:hover { border-color: var(--border-3); }
.post-card img { width: 24px; height: 32px; object-fit: cover; border-radius: 2px; flex: none; background: var(--panel-3); }
.pc-text { display: flex; flex-direction: column; min-width: 0; font-size: 11px; line-height: 1.3; }
.pc-text b { font-size: 11px; }
.pc-dot { position: absolute; right: 6px; top: 6px; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--text-3); }
.pc-dot.posted { background: var(--ok); border-color: var(--ok); }
.pc-dot.failed { background: var(--err); border-color: var(--err); }
.pc-dot.posting { background: var(--info); border-color: var(--info); }
.post-card.failed { border-color: rgb(255 99 105 / 0.5); }
.cal.month .post-card { padding: 3px 16px 3px 3px; }
.url-row .field.genre { width: 160px; flex: none; }
.url-row .field.url { flex: 1 1 auto; width: auto; min-width: 0; }
/* login: the live site's centred card */
.login { align-items: stretch; gap: 10px; padding: 34px 26px 22px; width: min(380px, 94vw); }
.login-word { text-align: center; font: 400 38px/1 'cap-dmserif', "DM Serif Display", Georgia, serif; text-transform: none; }
.login-tag { text-align: center; color: var(--text-2); margin: 0 0 10px; }
.pw-wrap { position: relative; }
.pw-wrap .field { padding-right: 36px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--text-3); padding: 4px; display: grid; }
.pw-eye:hover { color: var(--text); }
.login-note { text-align: center; color: var(--text-3); font-size: 11.5px; margin-top: 6px; }
.login .field { padding: 9px 11px; font-size: 13.5px; }
/* accounts (original card layout) */
.acc { gap: 10px; }
.plat-label { font-size: 11.5px; font-weight: 600; }
.plat-label.youtube { color: #f87171; } .plat-label.instagram { color: #e879f9; } .plat-label.tiktok { color: var(--info); }
.btn.wide { width: 100%; }
.health { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r); background: var(--ok-bg); border: 1px solid rgb(74 222 128 / 0.3); }
.acc-hint { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: var(--r); border: 1px solid var(--border-2); }
.acc-sec { display: flex; flex-direction: column; gap: 4px; }
.acc-sec .lbl { margin: 2px 0 0; }
.acc-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--border-2); }
.slot-chip { padding-right: 4px; }
.slot-chip .x { border: 0; background: none; color: var(--text-3); padding: 0 4px; font-size: 13px; line-height: 1; }
.slot-chip .x:hover { color: var(--err); }
.slot-add { display: flex; align-items: center; gap: 4px; }
.slot-add .field.mono { width: 46px; text-align: center; padding: 4px; }
.slot-add select.field { flex: 1; }
.stepper-row { display: flex; align-items: center; gap: 10px; }
.stepper-ctl { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-2); border-radius: var(--r); padding: 2px; }
.stepper-ctl .btn { border: 0; background: none; padding: 2px 8px; }
.stepper-ctl .mono { min-width: 52px; text-align: center; }
/* settings card grid */
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.set-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.set-card.wide { grid-column: span 2; }
.set-card h3 { font-size: 13.5px; }
.set-body { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.set-card .seg { width: 100%; }
.set-card .seg > button { flex: 1 1 0; padding: 5px 8px; }
.profile .row-btns { flex-wrap: wrap; }
.opt-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.opt-card { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--border-2); text-align: center; }
.opt-card:hover { border-color: var(--border-3); }
.opt-card.on { background: var(--panel-3); border-color: var(--text-2); }
.opt-pic { width: 34px; height: 34px; border: 1.5px solid var(--text-2); border-radius: 3px; }
.opt-pic.r9x16 { width: 20px; height: 34px; } .opt-pic.r1x1 { width: 30px; height: 30px; } .opt-pic.r16x9 { width: 40px; height: 23px; }
.opt-pic.rauto { width: 20px; height: 34px; background: linear-gradient(var(--panel-3) 40%, transparent 40%); }
.opt-pic.rcrop { width: 20px; height: 34px; background: var(--panel-3); }
.opt-pic.rfit { width: 20px; height: 34px; background: linear-gradient(transparent 32%, var(--panel-3) 32% 68%, transparent 68%); }
@media (max-width: 900px) { .set-card.wide { grid-column: auto; } }
.stat-line { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.spark { width: 90px; height: 30px; color: var(--text-2); flex: none; }
.perf-thumb { width: 26px; height: 36px; object-fit: cover; border-radius: 2px; background: var(--panel-3); flex: none; }

/* ---------- rail foot (feedback + avatar menu, as in the original) ---------- */
.rail-profile { display: none; }
.rail-foot { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 1px; padding: 8px 6px 4px; }
.rail-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: var(--r); background: none; color: var(--text-3); }
.rail-btn:hover, .rail-btn.on { background: var(--panel-2); color: var(--text); }
.rail-foot .rail-avatar { width: 36px; height: 36px; padding: 0; cursor: pointer; border: 1px solid var(--border-3); }
.rail-foot .rail-avatar.open { border-color: var(--text); }
.menu-scrim { position: fixed; inset: 0; z-index: 30; }
.menu-scrim.dim { background: rgb(0 0 0 / 0.25); }
.acct-menu { position: fixed; left: calc(var(--rail-open) + 8px); bottom: 10px; z-index: 31; width: 220px; border-radius: var(--r-lg); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.acct-who { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.acct-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r); border: 0; background: none; text-align: left; font-size: 12.5px; color: var(--text-2); }
.acct-item:hover { background: var(--panel-3); color: var(--text); }
.acct-item.out:hover { color: var(--err); }

/* ---------- top-bar drop-down panels ---------- */
.topbar { position: relative; z-index: 32; }
.dd { position: relative; }
.tb-btn { cursor: pointer; }
.tb-btn.open { border-color: var(--text-2); color: var(--text); }
.dd-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 430px; max-height: min(72vh, 680px); display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; z-index: 40; }
.np { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.np-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.np-head h3 { font-size: 14px; }
.np-new { color: var(--info); }
.np-tabs { display: flex; align-items: center; gap: 8px; padding: 0 14px 8px; border-bottom: 1px solid var(--border); }
.np-act { color: var(--err); }
.np-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px; }
.np-none { padding: 20px; text-align: center; }
.np-item, .cl-item { position: relative; display: flex; gap: 10px; padding: 10px 28px 10px 10px; border-radius: var(--r); }
.np-item:hover, .cl-item:hover { background: var(--panel-3); }
.np-item.unread, .cl-item.unread { box-shadow: inset 2px 0 0 var(--info); }
.np-lead { flex: none; width: 28px; }
.np-lead img { width: 28px; height: 40px; object-fit: cover; border-radius: 2px; background: var(--panel-3); }
.np-mark { display: block; width: 8px; height: 8px; margin: 6px auto 0; border-radius: 50%; background: var(--text-3); }
.np-mark.bad { background: var(--err); } .np-mark.warn { background: var(--warn); } .np-mark.good { background: var(--ok); }
.np-mid { flex: 1; min-width: 0; }
.np-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.np-top b { font-size: 12.5px; font-weight: 600; }
.np-top b.bad { color: var(--err); } .np-top b.warn { color: var(--warn); }
.np-body { font-size: 12px; color: var(--text-2); margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.np-acts { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 7px; }
.np-x { position: absolute; right: 6px; top: 8px; border: 0; background: none; color: var(--text-3); padding: 3px; border-radius: var(--r-sm); opacity: 0; }
.np-item:hover .np-x, .cl-item:hover .np-x { opacity: 1; }
.np-x:hover { color: var(--text); background: var(--panel-2); }
.np-foot { padding: 8px 14px; border-top: 1px solid var(--border); }
.cl-item { flex-direction: column; gap: 4px; }
.cl-body { font-size: 12px; color: var(--text-2); }
.cl-body p { margin: 2px 0; }
.cl-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin: 6px 0 2px; }
.np-page { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.np-page .card { max-height: 78vh; display: flex; flex-direction: column; overflow: hidden; }

/* ---------- settings: section index + panels of rows ---------- */
.settings-page { max-width: 1180px; }
.st-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: start; }
.st-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 1px; padding-top: 2px; }
.st-nav-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border: 0; border-radius: var(--r); background: none; text-align: left; color: var(--text-2); font-size: 12.5px; }
.st-nav-item:hover { background: var(--panel-2); color: var(--text); }
.st-nav-item.on { background: var(--panel-3); color: #fff; }
.st-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.st-sec { padding: 0; scroll-margin-top: 12px; }
.st-sec-head { padding: 14px 18px 12px; border-bottom: 1px solid var(--border); }
.st-sec-head h2 { font-size: 14px; }
.st-sec-head p { margin: 2px 0 0; }
.st-rows { display: flex; flex-direction: column; }
.st-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.st-row:last-child { border-bottom: 0; }
.st-row.stack { align-items: start; }
.st-label { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.st-ctl { display: flex; justify-content: flex-end; min-width: 0; }
.st-ctl > .field, .st-ctl > select.field { max-width: 320px; }
.st-ctl .opt-cards { width: 100%; max-width: 420px; }
.st-ctl .opt-card { font-size: 11.5px; }
.st-slider { width: 100%; max-width: 320px; }
.st-pw { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 320px; }
.st-pw .btn { align-self: flex-end; }
.st-avatar { position: relative; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--panel-3); border: 1px solid var(--border-3); flex: none; }
.st-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-genres { padding: 12px 18px 0; margin: 0; }
.st-sec .tpl-row { padding: 6px 18px; margin: 0; }
.st-sec .tpl-row:last-child { padding-bottom: 14px; }
.st-empty { padding: 12px 18px 0; }
@media (max-width: 1000px) { .st-layout { grid-template-columns: 1fr; } .st-nav { position: static; flex-direction: row; flex-wrap: wrap; } }

/* TikTok section of the post dialog (Content Sharing Guidelines) */
.tt-post { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 12px; border: 1px solid var(--border-2); border-radius: var(--r-lg); background: var(--panel-2); }
.tt-head { display: flex; align-items: center; gap: 10px; }
.tt-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-2); }
.tt-preview { width: 100%; max-height: 260px; background: var(--bg); border-radius: var(--r); border: 1px solid var(--border); }
.tt-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tt-checks.col { flex-direction: column; gap: 6px; padding: 6px 2px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); cursor: pointer; text-transform: none; }
.check.off { color: var(--text-3); cursor: not-allowed; }
.tt-consent { color: var(--text-2); text-transform: none; border-top: 1px solid var(--border); padding-top: 8px; margin: 4px 0 0; }
p.info { color: var(--info); text-transform: none; margin: 2px 0; }
.failed-row.unknown { border-left: 2px solid var(--warn); }


/* =================================================================== rail: widens on hover (over the page) */
.rail-slot { grid-row: 1 / 3; position: relative; z-index: 40; width: var(--rail-w); }
.rail-slot > .rail { position: absolute; top: 0; left: 0; bottom: 0; width: var(--rail-w); align-items: stretch; overflow: hidden;
	transition: width 180ms var(--ease), box-shadow 180ms var(--ease); }
.rail.wide, .rail:has(.rail-me.open) { width: var(--rail-open); box-shadow: 12px 0 32px rgb(0 0 0 / 0.45); }
.rail .brand { justify-content: flex-start; display: flex; align-items: center; gap: 10px; padding: 0 0 0 15px; height: 34px; }
.rail .brand-mark { flex: none; }
.brand-text { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; text-transform: none; }
.rail-item { display: flex; align-items: center; justify-content: flex-start; width: 100%; height: 40px; padding: 0; border: 0; background: none; text-align: left; }
.rail-ic { flex: none; width: 48px; height: 40px; display: grid; place-items: center; }
.rail-text { white-space: nowrap; overflow: hidden; font-size: 13px; font-weight: 500; opacity: 0; transform: translateX(-4px);
	transition: opacity 120ms ease, transform 160ms var(--ease); }
.rail.wide .rail-text, .rail:has(.rail-me.open) .rail-text { opacity: 1; transform: none; transition-delay: 50ms; }
.rail-me .rail-text { color: var(--text-2); }
.rail-me.open, .rail-me:hover { background: var(--panel-2); }
.rail .rail-avatar { width: 30px; height: 30px; border: 1px solid var(--border-3); }
.rail-me.open .rail-avatar { border-color: var(--text); }

/* =================================================================== avatars + platform marks */
.avatar { position: relative; display: inline-grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; flex: none; background: #2c2c33; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-ghost { width: 100%; height: 100%; fill: #6e6e78; transform: translateY(6%); }
.st-avatar .avatar, .user-av { width: 48px; height: 48px; }
.user-av { width: 34px; height: 34px; border: 1px solid var(--border-2); }
.acc-av { position: relative; display: inline-block; flex: none; width: var(--s); height: var(--s); }
.acc-av .avatar { border: 1px solid var(--border-2); }
.acc-av .pbadge { position: absolute; right: -3px; bottom: -3px; width: max(14px, calc(var(--s) * 0.44)); height: max(14px, calc(var(--s) * 0.44)); box-shadow: 0 0 0 2px var(--panel); }
.pbadge { display: inline-grid; place-items: center; border-radius: 28%; flex: none; width: 18px; height: 18px; }
.pbadge svg { width: 64%; height: 64%; }
.pbadge.youtube { background: #e62117; }
.pbadge.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.pbadge.tiktok { background: #010101; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14); }
.pl-acc .acc-av .pbadge { box-shadow: 0 0 0 2px var(--panel); }

/* =================================================================== what's new */
.cl-item { cursor: pointer; }
.cl-sum { margin: 0; color: var(--text-2); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-more { color: var(--text-3); }
.cl-item:hover .cl-more { color: var(--info); }
.cl-detail { display: flex; flex-direction: column; gap: 6px; }
.cl-detail h2 { font-size: 18px; }
.cl-detail .cl-body p { margin: 0 0 4px; padding-left: 12px; position: relative; color: var(--text-2); }
.cl-detail .cl-body p::before { content: ''; position: absolute; left: 2px; top: .62em; width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.cl-detail .cl-sec { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }

/* =================================================================== queue, studio progress, schedule, settings, accounts, music */
.q-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.q-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proc-list { display: flex; flex-direction: column; gap: 8px; width: min(460px, 100%); margin-top: 6px; text-align: left; }
.proc { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: var(--r-lg); background: var(--panel); }
.proc:hover { border-color: var(--border-3); }
.proc-top { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.planner .slot { display: none; }
.planner.dragging .slot.free { display: flex; }
.slot.ok { border-color: var(--border-3); color: var(--text-2); }
.slot.over { border-style: solid; border-color: var(--info); background: var(--info-bg); color: var(--text); }
.slot { transition: background var(--t), border-color var(--t), color var(--t); }
.pl-acc .acc-av { --s: 32px; }
.retry-box { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border-2); border-radius: var(--r); }
.warn { color: var(--warn); }
.tz { position: relative; min-width: 0; }
.tz-btn { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.tz-btn.open { border-color: var(--info); }
.tz-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 35; min-width: 260px; border-radius: var(--r-lg); padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.tz-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; }
.tz-row { display: flex; justify-content: space-between; gap: 10px; border: 0; background: none; padding: 6px 8px; border-radius: var(--r-sm); text-align: left; color: var(--text-2); }
.tz-row:hover, .tz-row.on { background: var(--panel-3); color: var(--text); }
.tz-none { padding: 6px 8px; }
.mood-pick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* =================================================================== motion (subtle; off for reduced motion) */
.reveal { display: contents; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fold-down { from { opacity: 0; transform: translateY(-4px); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fold-up-out { to { opacity: 0; transform: translateY(-4px); clip-path: inset(0 0 100% 0); } }
@keyframes fold-up { from { opacity: 0; transform: translateY(4px); clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fold-down-out { to { opacity: 0; transform: translateY(4px); clip-path: inset(100% 0 0 0); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(4px) scale(.985); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(5px); } }
@keyframes row-in { from { opacity: 0; transform: translateY(-3px); } }
@keyframes row-out { to { opacity: 0; transform: translateX(10px); max-height: 0; padding-top: 0; padding-bottom: 0; margin: 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* drop-downs fold open like an accordion and fold back when closing */
.dd-panel, .estat-pop, .tz-menu { animation: fold-down var(--t-in) var(--ease) backwards; }
.reveal.leaving > .dd-panel, .reveal.leaving > .estat-pop, .reveal.leaving > .tz-menu { animation: fold-up-out var(--t-out) ease-in forwards; }
.acct-menu { animation: fold-up var(--t-in) var(--ease) backwards; transform-origin: bottom; }
.reveal.leaving > .acct-menu { animation: fold-down-out var(--t-out) ease-in forwards; }
.menu-scrim.dim { animation: fade-in var(--t-in) ease backwards; }
.reveal.leaving > .menu-scrim { animation: fade-out var(--t-out) ease forwards; }
/* modals: the backdrop fades, the card rises a touch */
.scrim { animation: fade-in 160ms ease backwards; }
.scrim > .modal, .scrim > .cmd { animation: pop-in 190ms var(--ease) backwards; }
.reveal.leaving > .scrim { animation: fade-out var(--t-out) ease forwards; }
.reveal.leaving > .scrim > .modal { animation: pop-out var(--t-out) ease-in forwards; }
/* a new page rises in; settings tabs and lists fade in */
.main > * { animation: rise-in 200ms var(--ease) backwards; }
.st-sec { animation: rise-in 180ms var(--ease) backwards; }
.np-item, .cl-item, .q-row:not(.q-head), .proc { animation: row-in 180ms var(--ease) backwards; }
.np-item.leaving, .cl-item.leaving { animation: row-out 170ms ease-in forwards; max-height: 260px; overflow: hidden; pointer-events: none; }
.toast { animation: toast-in 180ms var(--ease) backwards; }
/* bars glide to their new value */
.bar i { transition: width .5s var(--ease); }
/* buttons answer a press; clickable cards lift a hair */
.btn { transition: background var(--t), border-color var(--t), color var(--t), transform 90ms ease; }
.btn:active:not(:disabled) { transform: scale(.97); }
.proc, .post-card, .acc.card, .cl-item, .format-card, .opt-card { transition: transform 140ms var(--ease), border-color var(--t), background var(--t); }
.proc:hover, .post-card:hover, .acc.card:hover, .format-card:hover, .opt-card:hover { transform: translateY(-1px); }
/* the segmented control's pick slides between options */
.seg { position: relative; }
.seg > button { position: relative; z-index: 1; }
.seg.slid::before { content: ''; position: absolute; left: 0; top: 0; width: var(--w); height: var(--h); transform: translate(var(--x), var(--y));
	border-radius: var(--r-sm); background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--border-3); transition: transform 190ms var(--ease), width 190ms var(--ease), height 190ms var(--ease); }
.seg.slid > button.on { background: transparent; box-shadow: none; }
.st-nav-item { transition: background var(--t), color var(--t); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
