/* Pipeline — cinematic dark studio. Tokens first; everything else reads from them. */
:root {
  --bg: #0b0b0d; --side: #121214; --main: #0e0e10; --card: #17171a; --card2: #1f1f23; --hover: #26262b;
  --line: rgba(255,255,255,.07); --line2: rgba(255,255,255,.12);
  --text: #ededee; --muted: #a8a8b0; --dim: #8b8b93;
  --accent: #7c82ff; --accent2: #a5aaff; --accent-bg: rgba(124,130,255,.14);
  --tc: #f7c75b; --tc-bg: rgba(247,199,91,.12);
  --review: #38bdf8; --revision: #fb923c; --approved: #34d399; --waiting: #a1a1aa; --danger: #f87171;
  --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --ease: cubic-bezier(.2,.8,.2,1); --d1: 120ms; --d2: 200ms; --d3: 400ms;
  --font: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --pop: 0 24px 60px -12px rgba(0,0,0,.75), 0 0 0 1px var(--line2);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
/* app chrome isn't selectable; what people type or copy is */
input, textarea, select, [contenteditable], .cmt .body, .reply p, .capbox, .finalcap p, .vb, .mono.small { -webkit-user-select: text; user-select: text; }
img, video { -webkit-user-drag: none; }
@media (hover: none) { .hide-touch { display: none !important; } }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--accent-bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.fill { fill: currentColor; stroke: none; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cap { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 0; }
kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line2); background: var(--card2); color: var(--muted); }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; }
.brand svg { flex: none; }

/* ---------- shell: sidebar + main card ---------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 10px; padding: 10px; height: 100vh; height: 100dvh; }
.side { background: var(--side); border-radius: var(--r-xl); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; min-height: 0; padding: 16px 12px 12px; }
.side-head { display: flex; align-items: center; gap: 10px; padding: 2px 6px 16px; border-bottom: 1px solid var(--line); }
.side-head .brand { flex: 1; font-size: 18px; }
.side nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--r); color: var(--muted); font-size: 14px; transition: background var(--d1), color var(--d1); width: 100%; text-align: left; }
.nav:hover { background: var(--card); color: var(--text); }
.nav.on { background: var(--card2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.nav .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; background: var(--card2); color: var(--muted); }
.badge.hot { background: var(--accent); color: #0c0c1e; font-weight: 600; }
.badge.rev { background: rgba(251,146,60,.16); color: var(--revision); }
.side-sec { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px; font-size: 12px; color: var(--dim); }
.tree { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px 8px; }
.tree .nav { height: 36px; font-size: 13.5px; }
.tree .nav .count { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.tree .grp > .nav .chev { width: 14px; height: 14px; transition: transform var(--d2) var(--ease); color: var(--dim); }
.tree .grp.open > .nav .chev { transform: rotate(90deg); }
.tree .kids { margin-left: 22px; padding-left: 8px; border-left: 1px solid var(--line); display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--d2) var(--ease); }
.tree .grp.open > .kids { grid-template-rows: 1fr; }
.tree .kids > div { overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.search { position: relative; margin: 12px 0 0; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); width: 16px; height: 16px; }
.search input { width: 100%; height: 38px; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg); padding: 0 12px 0 36px; transition: border-color var(--d1); }
.search input:focus { border-color: var(--line2); outline: none; }
.engine-card { margin-top: 8px; padding: 14px; border-radius: 18px; background: linear-gradient(180deg, #1c1c20, #161619); box-shadow: inset 0 0 0 1px var(--line2); display: flex; align-items: center; gap: 12px; }
.engine-card .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(161,161,170,.12); color: var(--waiting); flex: none; }
.engine-card.on .ic { background: rgba(52,211,153,.12); color: var(--approved); }
.engine-card strong { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; }
.engine-card span.sub { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.dot7 { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); flex: none; }
.on .dot7 { background: var(--approved); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(52,211,153,.25); } 50% { box-shadow: 0 0 0 6px rgba(52,211,153,0); } }
.engine { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--danger); background: rgba(248,113,113,.1); }
.engine::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.engine.on { color: var(--approved); background: rgba(52,211,153,.1); }

.main { min-width: 0; min-height: 0; background: var(--main); border-radius: var(--r-xl); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.scroll { flex: 1; overflow: auto; padding: 26px 32px 60px; }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.pagehead .t { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pagehead h1 { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; overflow-wrap: anywhere; }
.pagehead .kicker { margin: 0 0 4px; font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.pagehead .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.fic { position: relative; width: 52px; height: 42px; flex: none; }
.fic::before { content: ""; position: absolute; left: 0; top: 0; width: 22px; height: 12px; border-radius: 6px 6px 0 0; background: #5a61e6; }
.fic::after { content: ""; position: absolute; inset: 6px 0 0; border-radius: 4px 10px 10px 10px; background: linear-gradient(180deg, #8b91ff, #6268ee); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 22px; color: var(--dim); min-width: 0; }
.crumbs a:hover { color: var(--text); }
.crumbs .here { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec { margin-bottom: 32px; }
.sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sec-h h2 { margin: 0; font-size: 16px; font-weight: 600; }
.pill { height: 24px; padding: 0 9px; border-radius: 999px; display: inline-flex; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); background: var(--card2); }
.pill.rev { color: var(--revision); background: transparent; box-shadow: inset 0 0 0 1px rgba(251,146,60,.4); }
.pill.rev2 { color: var(--review); background: transparent; box-shadow: inset 0 0 0 1px rgba(56,189,248,.4); }

/* ---------- buttons, inputs, chips ---------- */
.btn { height: 38px; padding: 0 14px; border-radius: var(--r); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; font-weight: 500; background: var(--card2); border: 1px solid var(--line2); transition: background var(--d1), transform var(--d1), border-color var(--d1), opacity var(--d1); white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.white { background: #ececee; color: #0c0c0e; border-color: transparent; border-radius: 999px; font-weight: 600; }
.btn.white:hover { background: #fff; }
.btn.green { background: var(--approved); border-color: transparent; color: #03261a; font-weight: 600; }
.btn.green:hover { background: #5ee0b0; }
.btn.amber { background: rgba(251,146,60,.1); border-color: rgba(251,146,60,.35); color: var(--revision); font-weight: 600; }
.btn.amber:hover { background: rgba(251,146,60,.16); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--card2); }
.btn.pillish { border-radius: 999px; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; }
.btn svg.i { width: 16px; height: 16px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); transition: background var(--d1), color var(--d1), transform var(--d1); flex: none; }
.icon-btn:hover { background: var(--card2); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.on { color: var(--accent); }
.field { display: grid; gap: 8px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.input, textarea.input, select.input { width: 100%; min-height: 42px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--bg); padding: 10px 12px; font-size: 14px; transition: border-color var(--d1), box-shadow var(--d1); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,130,255,.22); }
.input::placeholder { color: var(--dim); }
textarea.input { resize: vertical; line-height: 1.5; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 7px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--card2); color: var(--muted); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.s-waiting { color: var(--waiting); background: rgba(161,161,170,.12); }
.chip.s-in_review { color: var(--review); background: rgba(56,189,248,.12); }
.chip.s-revision { color: var(--revision); background: rgba(251,146,60,.12); }
.chip.s-approved { color: var(--approved); background: rgba(52,211,153,.12); }
.chip.plain::before { display: none; }
.cnt { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border-radius: 7px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; }
.cnt::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.cnt.s-in_review { color: var(--review); background: rgba(56,189,248,.12); }
.cnt.s-revision { color: var(--revision); background: rgba(251,146,60,.12); }
.cnt.s-approved { color: var(--approved); background: rgba(52,211,153,.12); }
.vchip { height: 26px; padding: 0 6px 0 10px; border-radius: 8px; background: var(--card2); border: 1px solid var(--line2); font-family: var(--mono); font-size: 12px; color: var(--text); display: inline-flex; align-items: center; gap: 3px; }
.vchip svg.i { width: 14px; height: 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }

/* ---------- home: needs-attention cards ---------- */
.needs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.need { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: background var(--d2), transform var(--d2) var(--ease); }
.need:hover { background: var(--card2); transform: translateY(-2px); }
.need .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.need .info strong { font-size: 15px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.need .go { width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line2); display: grid; place-items: center; color: var(--muted); flex: none; transition: background var(--d1), color var(--d1); }
.need:hover .go { background: var(--text); color: var(--bg); }
.poster-s { width: 44px; height: 78px; border-radius: 10px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.1); background: var(--card2) center/cover no-repeat; display: grid; place-items: center; color: var(--dim); }
.poster-s svg.i { width: 16px; height: 16px; }

/* ---------- folders ---------- */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 6px; margin: 0 -12px; }
.fold { display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 14px; border-radius: 20px; transition: background var(--d2); }
.fold:hover { background: var(--card); }
.fshape { position: relative; height: 150px; }
.fshape .tab { position: absolute; left: 0; top: 0; width: 42%; height: 26px; border-radius: 12px 12px 0 0; background: #222226; }
.fshape .back { position: absolute; left: 0; right: 0; top: 12px; bottom: 0; border-radius: 4px 16px 16px 16px; background: #222226; }
.peek { position: absolute; top: 22px; width: 58px; height: 103px; border-radius: 9px; background: #000 center/cover no-repeat; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 8px 20px -6px rgba(0,0,0,.8); transform: rotate(var(--rot)); transition: transform var(--d3) var(--ease); }
.fold:hover .peek { transform: translateY(-10px) rotate(var(--rot)); }
.fshape .front { position: absolute; left: 0; right: 0; bottom: 0; height: 92px; border-radius: 16px; background: linear-gradient(180deg, rgba(48,48,54,.92), rgba(36,36,41,.97)); backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 -12px 24px -12px rgba(0,0,0,.7); display: flex; align-items: flex-end; justify-content: space-between; padding: 12px; }
.fshape .front .cnts { display: flex; gap: 5px; flex-wrap: wrap; }
.fold .ttl { display: flex; flex-direction: column; gap: 3px; padding: 0 2px; min-width: 0; }
.fold .ttl strong { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold .ttl span { font-size: 12.5px; color: var(--dim); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border-radius: 18px; background: var(--side); box-shadow: inset 0 0 0 1px var(--line); }
table.t { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
table.t td { padding: 8px 16px; border-top: 1px solid var(--line); color: var(--muted); transition: background var(--d1); }
table.t tr.link { cursor: pointer; }
table.t tr.link:hover td { background: rgba(255,255,255,.025); }
table.t td.nm a { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 500; min-width: 0; }
table.t td.nm a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.t td.r, table.t th.r { text-align: right; }
.thumb-s { width: 26px; height: 46px; border-radius: 6px; flex: none; background: var(--card2) center/cover no-repeat; display: grid; place-items: center; color: var(--dim); }
.thumb-s svg.i { width: 13px; height: 13px; }
.empty { border: 1px dashed var(--line2); border-radius: 18px; padding: 44px 24px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 10px; }
.empty svg.i { width: 26px; height: 26px; color: var(--dim); }

/* ---------- clip cards ---------- */
.statbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(184px, 100%), 1fr)); }
.card { display: flex; flex-direction: column; gap: 10px; padding: 8px 8px 12px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: transform var(--d2) var(--ease), background var(--d2); }
.card:hover { transform: translateY(-3px); background: var(--card2); }
.cover { position: relative; aspect-ratio: 9 / 16; border-radius: 15px; background: #0a0a0c center/cover no-repeat; overflow: hidden; }
.cover .scrub { position: absolute; inset: 0; background-repeat: no-repeat; opacity: 0; transition: opacity var(--d1); }
.cover:hover .scrub { opacity: 1; }
.cover .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); width: 0; }
.ov { position: absolute; height: 22px; padding: 0 7px; border-radius: 7px; display: inline-flex; align-items: center; gap: 5px; background: rgba(0,0,0,.55); backdrop-filter: blur(10px); font-family: var(--mono); font-size: 11px; font-weight: 500; color: #fff; }
.cover .vtag { top: 8px; left: 8px; }
.cover .dur { right: 8px; bottom: 8px; }
.cover .none { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--dim); font-size: 12.5px; text-align: center; padding: 16px; border: 1px dashed var(--line2); border-radius: 15px; }
.cover .none svg.i { width: 24px; height: 24px; }
.card .meta { padding: 0 6px; display: flex; flex-direction: column; gap: 8px; }
.card .meta strong { font-size: 14px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta .row { justify-content: space-between; }
.card .meta .row .small { white-space: nowrap; }

/* ---------- player view ---------- */
.review { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--main); }
.ptop { height: 60px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 12px; border-bottom: 1px solid var(--line); min-width: 0; }
.ptop .crumb { display: flex; align-items: center; gap: 10px; font-size: 15px; min-width: 0; }
.ptop .crumb a { color: var(--dim); white-space: nowrap; } .ptop .crumb a:hover { color: var(--text); }
.ptop .crumb .sep { color: var(--dim); }
.ptop .crumb strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptop .keys { font-size: 12.5px; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.rbody { flex: 1; min-height: 0; display: flex; }
.stagecol { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 14px; gap: 12px; }
.stage { flex: 1; min-height: 0; position: relative; overflow: hidden; border-radius: var(--r-xl); background: #050506; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; isolation: isolate; }
.stage .glow { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; background: center/cover no-repeat; filter: blur(70px) saturate(1.4); opacity: .55; transform: scale(1.1); z-index: -2; transition: opacity 1s var(--ease); pointer-events: none; }
.stage .vign { position: absolute; inset: 0; background: radial-gradient(ellipse 55% 70% at 50% 50%, transparent 30%, rgba(5,5,6,.8) 100%); z-index: -1; pointer-events: none; }
.stage .frame { position: absolute; inset: 24px; display: grid; place-items: center; pointer-events: none; }
/* absolute: a 1080x1920 proxy must never size the layout, only fit (letterbox) inside the stage */
.stage video { position: absolute; inset: 24px; width: calc(100% - 48px); height: calc(100% - 48px); object-fit: contain; display: block; border-radius: 14px; }
.stage .meta { position: absolute; top: 18px; left: 20px; height: 26px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; background: rgba(0,0,0,.45); backdrop-filter: blur(10px); font-family: var(--mono); font-size: 11px; color: rgba(237,237,238,.8); pointer-events: none; }
.stage .bigplay { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(255,255,255,.16); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); display: grid; place-items: center; opacity: 0; transform: scale(.7); transition: opacity var(--d2) var(--ease), transform var(--d3) var(--ease); pointer-events: none; }
.stage .bigplay svg { width: 30px; height: 30px; fill: #fff; stroke: none; margin-left: 3px; }
.stage.paused.fresh .bigplay { opacity: 1; transform: scale(1); }
.stage .pop { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(0,0,0,.45); backdrop-filter: blur(10px); display: grid; place-items: center; opacity: 0; pointer-events: none; }
.stage .pop svg { width: 26px; height: 26px; fill: #fff; stroke: none; }
.stage .pop.show { animation: popfade .55s var(--ease) forwards; }
@keyframes popfade { 0% { opacity: .95; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.25); } }
.stage .ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.stage.drawing { cursor: crosshair; box-shadow: inset 0 0 0 2px var(--tc); }
.stage.drawing .ink { pointer-events: auto; touch-action: none; }
.stage.drawing .bigplay { opacity: 0 !important; }
.stage .hud { position: absolute; top: 18px; right: 20px; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(0,0,0,.5); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--line2); font-size: 12px; font-weight: 500; font-family: var(--mono); color: var(--tc); opacity: 0; transform: translateY(-6px); transition: opacity var(--d2), transform var(--d2) var(--ease); pointer-events: none; }
.stage .hud.show { opacity: 1; transform: none; }
.stage .spin { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: #fff; animation: spin .8s linear infinite; opacity: 0; transition: opacity var(--d2); pointer-events: none; }
.stage.waiting .spin { opacity: 1; }
.stage.empty { display: grid; place-items: center; cursor: default; color: var(--muted); text-align: center; padding: 24px; }
@keyframes spin { to { transform: rotate(360deg); } }
.pbar { flex: none; padding: 10px 16px 12px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); user-select: none; }
.timeline { position: relative; height: 42px; cursor: pointer; touch-action: none; }
.track { position: absolute; left: 0; right: 0; top: 29px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.1); transition: height var(--d1) var(--ease), top var(--d1) var(--ease); }
.timeline:hover .track, .timeline.drag .track { top: 27px; height: 10px; }
.track .buf, .track .play, .track .range { position: absolute; top: 0; bottom: 0; left: 0; border-radius: inherit; }
.track .buf { background: rgba(255,255,255,.12); }
.track .play { background: var(--text); }
.track .range { background: rgba(247,199,91,.85); z-index: 2; }
.knob { position: absolute; top: 32px; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(124,130,255,.45), 0 2px 8px rgba(0,0,0,.6); pointer-events: none; transition: transform var(--d1) var(--ease); }
.timeline:hover .knob, .timeline.drag .knob { transform: scale(1.15); }
/* comment pins: a small avatar on a stem that points at its frame */
.marks { position: absolute; left: 0; right: 0; top: 12px; height: 0; }
.mark { position: absolute; top: 0; transform: translate(-50%, -50%); width: 20px !important; height: 20px !important; font-size: 8px !important; border: 2px solid var(--card); box-shadow: 0 2px 6px rgba(0,0,0,.55); transition: transform var(--d1) var(--ease), box-shadow var(--d1); z-index: 2; cursor: pointer; overflow: visible; }
.mark::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 8px; margin: 2px 0 0 -1px; border-radius: 1px; background: currentColor; opacity: .55; pointer-events: none; }
.mark:hover, .mark.on { transform: translate(-50%, calc(-50% - 2px)) scale(1.15); z-index: 3; }
.mark.on { box-shadow: 0 0 0 2px var(--tc), 0 2px 8px rgba(0,0,0,.6); }
.mark.on::after { background: var(--tc); opacity: 1; }
.mark.done { opacity: .45; }
.track .mark-range { position: absolute; top: 0; bottom: 0; border-radius: inherit; background: rgba(247,199,91,.4); pointer-events: none; z-index: 1; transition: background var(--d1); }
.track .mark-range.on { background: var(--tc); box-shadow: 0 0 8px rgba(247,199,91,.5); }
.timeline:focus-visible { outline: none; }
.timeline:focus-visible .knob { box-shadow: 0 0 0 4px var(--accent), 0 2px 8px rgba(0,0,0,.6); }
.thumbtip { position: absolute; bottom: 46px; transform: translateX(-50%); pointer-events: none; opacity: 0; transition: opacity var(--d1); display: grid; gap: 4px; justify-items: center; z-index: 5; }
.timeline:hover .thumbtip, .timeline.drag .thumbtip { opacity: 1; }
.thumbtip .img { border-radius: 10px; box-shadow: 0 0 0 1px var(--line2), 0 16px 40px rgba(0,0,0,.7); background: #000 no-repeat; }
.thumbtip .t { background: rgba(0,0,0,.85); border-radius: 6px; padding: 2px 7px; font-size: 11.5px; color: var(--tc); }
.ctrl { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 4px; }
.ctrl .l, .ctrl .r { display: flex; align-items: center; gap: 2px; min-width: 0; }
.ctrl .r { justify-content: flex-end; }
.ctrl .icon-btn { width: 38px; height: 38px; }
.ctrl .icon-btn.play { color: var(--text); }
.ctrl .vsep { width: 1px; height: 20px; background: var(--line2); margin: 0 6px; flex: none; }
.tcbtn { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--bg); transition: border-color var(--d1); }
.tcbtn:hover { border-color: rgba(255,255,255,.2); }
.tcbtn .now { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 500; color: var(--tc); }
.tcbtn .d { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.tcbtn .mode { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.speed { font-family: var(--mono); font-size: 12px; width: auto !important; padding: 0 10px; }
.vol { width: 0; overflow: hidden; transition: width var(--d2) var(--ease); display: flex; align-items: center; }
.volwrap { display: flex; align-items: center; }
.volwrap:hover .vol, .volwrap:focus-within .vol { width: 84px; }
input[type=range].slider { -webkit-appearance: none; appearance: none; width: 72px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.15); margin: 0 6px; }
input[type=range].slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
input[type=range].slider::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }

/* rail */
.prail { width: 392px; flex: none; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--side); }
.prail-head { padding: 14px 14px 10px; flex: none; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 8px; border-radius: 10px; color: var(--dim); font-size: 13px; font-weight: 500; transition: background var(--d2), color var(--d2), box-shadow var(--d2); white-space: nowrap; min-width: 0; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { background: var(--card2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2), 0 1px 2px rgba(0,0,0,.4); }
.seg button .n { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.pbody { flex: 1; overflow: auto; overscroll-behavior: contain; }
.listhead { display: flex; align-items: center; justify-content: space-between; padding: 2px 16px 0; font-size: 12.5px; color: var(--dim); }
.clist { display: flex; flex-direction: column; gap: 10px; padding: 10px 14px 14px; }
.cmt { padding: 14px; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: background var(--d2), box-shadow var(--d2), opacity var(--d2); cursor: pointer; }
.cmt:hover { background: #1a1a1e; }
.cmt.on { background: linear-gradient(180deg, rgba(247,199,91,.09), rgba(247,199,91,.03)); box-shadow: inset 0 0 0 1px rgba(247,199,91,.4); }
.cmt.done { opacity: .6; }
.cmt.done .body { color: var(--muted); text-decoration: line-through; }
.cmt.new { animation: rise var(--d3) var(--ease) both; }
.cmt .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cmt .who .nm { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.cmt .who strong { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmt .who .ago { font-size: 12px; color: var(--dim); white-space: nowrap; }
.cmt .idx { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.cmt .eq { display: none; align-items: flex-end; gap: 2px; height: 12px; }
.cmt.on.playing .eq { display: inline-flex; }
.eq i { width: 2px; height: 12px; background: var(--tc); border-radius: 1px; transform-origin: bottom; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .15s; } .eq i:nth-child(3) { animation-delay: .3s; }
@keyframes eq { 0%,100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.cmt .content { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cmt .body { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.tcchip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 7px; background: var(--tc-bg); color: var(--tc); font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; transition: background var(--d1); }
button.tcchip:hover { background: rgba(247,199,91,.2); }
.tcchip svg.i { width: 11px; height: 11px; }
.cmt .acts { display: flex; align-items: center; gap: 2px; margin: 8px -6px 0; }
.cmt .acts .btn { height: 28px; padding: 0 8px; font-size: 12.5px; }
.cmt .acts .icon-btn { width: 28px; height: 28px; }
.cmt .acts .icon-btn svg { width: 14px; height: 14px; }
.donebtn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--line2); color: var(--muted); transition: background var(--d1), color var(--d1); }
.donebtn:hover { color: var(--text); }
.donebtn.on { border-color: transparent; background: rgba(52,211,153,.14); color: var(--approved); }
.donebtn svg.i { width: 13px; height: 13px; }
.reply { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.reply .rb { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.reply .rb .h { display: flex; gap: 6px; align-items: baseline; font-size: 12.5px; }
.reply .rb p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); white-space: pre-wrap; word-break: break-word; }
.replybox { margin-top: 10px; display: flex; gap: 6px; }
.replybox .input { min-height: 36px; padding: 6px 10px; }
.foot { flex: none; padding: 12px 14px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.foot:empty { display: none; }
.composer { border: 1px solid var(--line2); border-radius: var(--r-lg); background: var(--card); padding: 10px 10px 8px; display: flex; flex-direction: column; gap: 8px; transition: border-color var(--d1), box-shadow var(--d1); }
.composer:focus-within { border-color: rgba(124,130,255,.6); box-shadow: 0 0 0 3px rgba(124,130,255,.16); }
.composer .lead { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.composer textarea { width: 100%; border: 0; background: transparent; resize: none; padding: 0 2px; min-height: 42px; max-height: 160px; outline: none; display: block; font-size: 14px; line-height: 1.45; }
.composer .tools { display: flex; align-items: center; gap: 6px; }
.composer .tools .btn { height: 30px; padding: 0 8px; font-size: 12.5px; }
.composer .tools { flex-wrap: wrap; }
.composer .tool.on { color: var(--tc); background: var(--tc-bg); }
.composer .tool.rec { color: #fff; background: #d63c3c; animation: recpulse 1.2s ease-in-out infinite; }
@keyframes recpulse { 50% { background: #a32424; } }
.inkbar { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line2); }
.inkbar .icon-btn { width: 30px; height: 30px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0,0,0,.35); flex: none; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #fff; }
.att { display: flex; flex-wrap: wrap; gap: 6px; }
.att:empty { display: none; }
.attchip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 30px; padding: 3px 4px 3px 9px; border-radius: 10px; background: var(--card2); box-shadow: inset 0 0 0 1px var(--line2); font-size: 12.5px; color: var(--muted); }
.attchip svg.i { width: 15px; height: 15px; }
.attchip .icon-btn { width: 24px; height: 24px; }
.attchip img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }
.attchip audio { height: 30px; max-width: 200px; }
button.attchip { padding-right: 10px; color: var(--tc); }
.cmt audio.voice, .reply audio.voice { width: 100%; max-width: 300px; height: 36px; }
.refimg { max-width: 100%; max-height: 180px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line2); cursor: zoom-in; object-fit: cover; }
.gtag { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent2); background: var(--accent-bg); padding: 1px 6px; border-radius: 6px; }
.tcchip.rng { background: rgba(247,199,91,.18); }
dialog.mdl.imgview { width: auto; max-width: calc(100% - 24px); padding: 12px; display: grid; gap: 8px; }
dialog.mdl.imgview img { max-width: 100%; max-height: calc(100dvh - 120px); border-radius: 14px; display: block; }
.composer .hint { font-size: 12px; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.send { width: 32px; height: 32px; border-radius: 50%; background: #ececee; color: #0c0c0e; display: grid; place-items: center; transition: transform var(--d1), opacity var(--d1), background var(--d1); flex: none; }
.send:hover { background: #fff; }
.send svg.i { width: 16px; height: 16px; stroke-width: 2.2; }
.send:disabled { opacity: .3; }
.send:active { transform: scale(.9); }
.decision { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.decision .btn { height: 46px; border-radius: 999px; font-size: 14px; }
.decision.one { grid-template-columns: 1fr; gap: 6px; }
.decision .autosend { margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.decision .autosend svg.i { width: 13px; height: 13px; }
.closed-note { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding: 4px 4px; }
.closed-note svg.i { color: var(--dim); }
.empty-c { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.banner { margin: 2px 14px 0; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.45; display: flex; gap: 10px; align-items: flex-start; animation: rise var(--d3) var(--ease) both; }
.banner svg { margin-top: 1px; }
.banner.revision { background: rgba(251,146,60,.08); color: var(--revision); box-shadow: inset 0 0 0 1px rgba(251,146,60,.28); }
.banner.approved { background: rgba(52,211,153,.08); color: var(--approved); box-shadow: inset 0 0 0 1px rgba(52,211,153,.28); }
.banner.info { background: var(--card); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.pad { padding: 4px 14px 18px; display: flex; flex-direction: column; gap: 18px; }
.pad h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.pad .sub { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.kv { margin: 0; padding: 4px 14px; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: grid; grid-template-columns: 110px 1fr; font-size: 13px; }
.kv dt, .kv dd { padding: 11px 0; border-bottom: 1px solid var(--line); }
.kv dt:nth-last-child(2), .kv dd:last-child { border-bottom: 0; }
.kv dt { color: var(--dim); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.keys-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.keys-grid div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--card); font-size: 12.5px; color: var(--muted); }
.boxcard { padding: 14px; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 12px; }
.vrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--card); font-size: 13px; }
.vrow .n { font-family: var(--mono); font-weight: 600; }

/* caption approval */
.variant { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow var(--d2), background var(--d2); }
.variant:hover { background: #1a1a1e; }
.variant.on { background: linear-gradient(180deg, rgba(124,130,255,.14), rgba(124,130,255,.04)); box-shadow: inset 0 0 0 1.5px var(--accent); }
.variant .radio { width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line2); flex: none; transition: border var(--d1); }
.variant.on .radio { border: 5px solid var(--accent); }
.variant .vt { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.variant .vh { font-size: 13px; font-weight: 600; }
.variant .vb { font-size: 13px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.variant .tg { font-size: 12px; color: var(--accent2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-ed { padding: 12px; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 8px; }
.opt-ed .h { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 600; }
.opt-ed .input { font-size: 13px; }
.opt-ed .cap-tags { color: var(--accent2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 3px 0 10px; border-radius: 999px; background: var(--card2); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; animation: pop var(--d2) var(--ease); }
.tag button { width: 22px; height: 22px; border-radius: 50%; color: var(--dim); display: grid; place-items: center; }
.tag button:hover { color: var(--text); background: rgba(255,255,255,.08); }
.tag button svg.i { width: 12px; height: 12px; }
.tag.plain { padding-right: 10px; }
.tagtext { font-size: 12.5px; color: var(--accent2); }
.counter { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.counter.bad { color: var(--danger); }
.big { height: 50px !important; border-radius: 999px !important; font-size: 15px !important; }
.done-hero { padding: 24px 2px 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.done-hero .ring { position: relative; width: 88px; height: 88px; display: grid; place-items: center; }
.done-hero .ring i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--approved); animation: ring 1.4s var(--ease) both; }
.done-hero .ring i:nth-child(2) { animation-delay: .3s; }
.done-hero .ring span { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--approved); color: #03261a; box-shadow: 0 0 50px rgba(52,211,153,.4); animation: popin .45s var(--ease) both; }
.done-hero .ring svg.i { width: 32px; height: 32px; stroke-width: 2.6; }
.done-hero h2 { font-size: 28px; font-weight: 700; letter-spacing: -.035em; margin: 6px 0 0; animation: rise var(--d3) var(--ease) both; }
.done-hero p { margin: 0; font-size: 13px; color: var(--muted); animation: rise var(--d3) .05s var(--ease) both; }
.finalcap { align-self: stretch; text-align: left; padding: 14px; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 10px; animation: rise var(--d3) .1s var(--ease) both; }
.finalcap p { margin: 0; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
@keyframes ring { from { transform: scale(.8); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }
@keyframes popin { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- instagram ---------- */
.igbox { align-self: stretch; text-align: left; padding: 14px; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 12px; animation: rise var(--d3) .15s var(--ease) both; }
.igbox strong { font-size: 14px; font-weight: 600; }
.igic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 85%, #4f5bd5); flex: none; }
.igic svg.i { width: 15px; height: 15px; stroke-width: 2; }
.igstate { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.igstate svg.i { width: 16px; height: 16px; margin-top: 1px; }
.igstate.ok { background: rgba(52,211,153,.08); color: var(--approved); box-shadow: inset 0 0 0 1px rgba(52,211,153,.28); }
.igstate.busy { background: var(--accent-bg); color: var(--accent2); box-shadow: inset 0 0 0 1px rgba(124,130,255,.3); }
.igstate.sched { background: var(--tc-bg); color: var(--tc); box-shadow: inset 0 0 0 1px rgba(247,199,91,.3); }
.igstate.bad { background: rgba(248,113,113,.08); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(248,113,113,.3); overflow-wrap: anywhere; }
.igacts { display: grid; }
.igacts .btn { height: 44px; }
.igsched { display: flex; gap: 8px; }
.igsched .input { min-height: 40px; padding: 8px 10px; color-scheme: dark; }
.igsched .btn { height: 42px; flex: none; }
.minispin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(165,170,255,.25); border-top-color: var(--accent2); animation: spin .8s linear infinite; flex: none; margin-top: 1px; }
.engine-card.ig .ic { background: var(--card2); color: var(--dim); }
.engine-card.ig.on .ic { color: #fff; background: linear-gradient(135deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 85%, #4f5bd5); }
.engine-card .btn.sm { flex: none; }

/* ---------- upload ---------- */
.dropov { position: fixed; inset: 0; z-index: 40; background: rgba(11,11,13,.78); backdrop-filter: blur(8px); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity var(--d2); }
.dropov.show { opacity: 1; }
.dropov .box { border: 2px dashed var(--accent); border-radius: 28px; padding: 48px 64px; text-align: center; background: var(--accent-bg); display: grid; justify-items: center; gap: 8px; transform: scale(.96); transition: transform var(--d3) var(--ease); max-width: calc(100% - 32px); }
.dropov.show .box { transform: none; }
.dropov .box svg.i { width: 30px; height: 30px; color: var(--accent2); }
.dropov .box strong { font-size: 20px; }
#uploads { position: fixed; right: 24px; bottom: 24px; width: min(380px, calc(100% - 32px)); max-height: 60vh; overflow: auto; z-index: 30; border-radius: var(--r-xl); background: rgba(23,23,26,.96); backdrop-filter: blur(20px); box-shadow: 0 40px 80px -24px rgba(0,0,0,.95), 0 0 0 1px var(--line2); animation: rise var(--d3) var(--ease) both; }
#uploads .uh { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.upitem { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); }
.upitem:first-of-type { border-top: 0; }
.upitem .top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.upitem .fn { font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upitem .st { font-size: 12px; color: var(--muted); }
.upitem .lane { color: var(--dim); font-family: var(--font); }
.sic.gh { background: rgba(124,130,255,.14); color: var(--accent2); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; white-space: nowrap; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .knob2 { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--card2); box-shadow: inset 0 0 0 1px var(--line2); transition: background var(--d2); flex: none; }
.switch .knob2::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform var(--d2) var(--ease), background var(--d2); }
.switch input:checked + .knob2 { background: var(--accent); }
.switch input:checked + .knob2::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + .knob2 { outline: 2px solid var(--accent); outline-offset: 2px; }
.danger-zone { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding-top: 6px; border-top: 1px solid var(--line); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: rgba(248,113,113,.12); color: var(--danger); }
.ptop .plogo { display: grid; margin: 0 4px 0 6px; }
.sharefolder { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--main); }
.sharefolder .scroll { flex: 1; overflow: auto; padding: 24px; }
.upbars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.hq { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.upbar { display: flex; flex-direction: column; gap: 5px; font-size: 10.5px; color: var(--dim); white-space: nowrap; min-width: 0; }
.upbar .tr2 { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.upbar .tr2 i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--accent); transition: width var(--d3) var(--ease); }
.upbar.ok .tr2 i { background: var(--approved); }
.upbar span { overflow: hidden; text-overflow: ellipsis; }

/* ---------- dialogs, menus, toast, login ---------- */
dialog { border: 0; background: #18181b; color: var(--text); border-radius: 26px; padding: 0; width: min(440px, calc(100% - 32px)); box-shadow: 0 0 0 1px var(--line2), 0 60px 120px -30px #000; }
dialog[open] { animation: dlg var(--d3) var(--ease) both; }
dialog::backdrop { background: rgba(5,5,7,.6); backdrop-filter: blur(6px); }
dialog form { padding: 24px; display: grid; gap: 18px; }
dialog h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
dialog .note { margin: 0; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(251,146,60,.08); box-shadow: inset 0 0 0 1px rgba(251,146,60,.28); color: var(--revision); font-size: 13.5px; }
@keyframes dlg { from { transform: translateY(8px) scale(.97); opacity: 0; } }
.menu { position: fixed; z-index: 50; min-width: 190px; background: #1b1b1f; border-radius: 14px; padding: 5px; box-shadow: var(--pop); animation: pop var(--d1) var(--ease); }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 9px; color: var(--muted); font-size: 13px; }
.menu button:hover { background: var(--hover); color: var(--text); }
.menu button.on { color: var(--text); }
.menu .mhead { display: flex; align-items: center; gap: 8px; padding: 6px 10px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--text); max-width: 280px; }
.menu .mhead span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .mhead svg { flex: none; border-radius: 5px; }
.menu .msep { height: 1px; margin: 4px 6px; background: var(--line); }
.menu .ml { flex: 1; text-align: left; white-space: nowrap; }
.menu kbd { font-size: 10px; padding: 1px 5px; }
.menu button.danger { color: var(--danger); }
.menu button.danger:hover { background: rgba(248,113,113,.12); color: var(--danger); }
/* multi-select + drag targets on the folder grid */
.card { position: relative; }
.card .selbox { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(0,0,0,.5); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); color: transparent; opacity: 0; transition: opacity var(--d1), background var(--d1); z-index: 2; }
.card .selbox svg.i { width: 15px; height: 15px; stroke-width: 2.6; }
.card:hover .selbox, .selecting .card .selbox { opacity: 1; }
.card.sel .selbox { opacity: 1; background: var(--accent); box-shadow: none; color: #fff; }
.card.sel { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-bg); }
.card.dragging { opacity: .45; }
.card.dropping { box-shadow: 0 0 0 3px var(--accent), 0 16px 40px -12px rgba(124,130,255,.5); transform: scale(1.02); }
.card.dropping::after { content: "Drop: new version"; position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); padding: 6px 12px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; pointer-events: none; z-index: 3; }
.dropov.oncard { background: transparent; backdrop-filter: none; }
.dropov.oncard .box { display: none; }
.selbar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 8px; min-width: min(420px, calc(100% - 24px)); padding: 8px 8px 8px 16px; border-radius: 16px; background: #1b1b1f; box-shadow: var(--pop); animation: rise var(--d2) var(--ease); }
@media (max-width: 900px) { .selbar { bottom: 76px; } .card .selbox { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
#toast { position: fixed; top: 22px; left: 50%; transform: translate(-50%, -10px); display: flex; align-items: center; gap: 10px; background: #1d1d21; color: var(--text); padding: 10px 16px 10px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 500; box-shadow: 0 24px 50px -16px rgba(0,0,0,.9), 0 0 0 1px var(--line2); opacity: 0; pointer-events: none; transition: opacity var(--d2), transform var(--d3) var(--ease); z-index: 60; max-width: calc(100% - 32px); }
#toast::before { content: ""; width: 24px; height: 24px; border-radius: 50%; flex: none; background: var(--approved) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2303261a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/14px no-repeat; }
#toast.err::before { background: var(--danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23300' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17v.5'/%3E%3C/svg%3E") center/14px no-repeat; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.login { position: relative; min-height: 100vh; min-height: 100dvh; overflow: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 72px; padding: 48px 24px; background: radial-gradient(900px 500px at 20% 10%, rgba(124,130,255,.16), transparent 60%), radial-gradient(700px 500px at 90% 90%, rgba(247,199,91,.07), transparent 60%), var(--bg); }
.login::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 3px 3px; pointer-events: none; }
.login .hero { position: relative; z-index: 1; flex: 0 1 460px; display: flex; flex-direction: column; gap: 34px; }
.login .hero .brand { font-size: 22px; }
.login .hero h1 { margin: 0; font-size: clamp(36px, 6vw, 52px); font-weight: 600; letter-spacing: -.045em; line-height: .98; }
.login .hero h1 span { color: var(--muted); }
.login .lines { display: flex; flex-direction: column; gap: 10px; }
.login .lines div { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 7px 14px 7px 7px; border-radius: 999px; background: rgba(23,23,26,.85); box-shadow: 0 0 0 1px var(--line2); font-size: 13px; color: var(--muted); animation: rise .6s var(--ease) both; }
.login .lines div:nth-child(2) { animation-delay: .1s; margin-left: 28px; } .login .lines div:nth-child(3) { animation-delay: .2s; margin-left: 56px; }
.login .lines b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.login .lines b svg.i { width: 14px; height: 14px; stroke-width: 2.4; }
.login form { position: relative; z-index: 1; flex: 0 1 400px; display: grid; gap: 18px; padding: 28px; border-radius: 28px; background: rgba(20,20,23,.72); backdrop-filter: blur(28px) saturate(1.3); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px var(--line2), 0 50px 100px -30px rgba(0,0,0,.95); animation: rise .5s var(--ease) both; }
.login form h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.login form .input { height: 48px; border-radius: 14px; font-size: 15px; background: rgba(11,11,13,.6); }
.login form .btn.white { height: 50px; font-size: 15px; }
.login .err { color: var(--danger); font-size: 13px; min-height: 1.2em; margin-top: -8px; }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw button { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border-radius: 10px; color: var(--dim); display: grid; place-items: center; }
.pw button:hover { color: var(--text); }
.skel { background: linear-gradient(90deg, var(--card) 0%, var(--card2) 50%, var(--card) 100%); background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: 16px; }
@keyframes sh { to { background-position: -200% 0; } }
.fade { animation: rise var(--d3) var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.loadbar { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--accent); z-index: 70; opacity: 0; transition: width .6s var(--ease), opacity .3s; pointer-events: none; }
.loadbar.on { opacity: 1; width: 70%; }

/* ---------- small screens ---------- */
.tabbar { display: none; }
@media (max-width: 1100px) {
  .review { height: auto; min-height: 100dvh; }
  body.reviewing { overflow: auto; }
  .rbody { flex-direction: column; }
  .stagecol { flex: none; position: sticky; top: 0; z-index: 3; background: var(--main); height: 62vh; height: 62dvh; padding: 0 10px 8px; }
  .prail { width: auto; border-left: 0; border-top: 1px solid var(--line); min-height: 60dvh; }
  .prail .pbody { overflow: visible; }
  .prail .foot { position: sticky; bottom: 0; background: var(--side); z-index: 2; }
  .ptop .keys { display: none; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; padding: 0; gap: 0; }
  .main { border-radius: 0; box-shadow: none; }
  .side { position: fixed; inset: 0 0 64px 0; z-index: 20; border-radius: 0; transform: translateX(-100%); transition: transform var(--d3) var(--ease); visibility: hidden; }
  .shell.side-open .side { transform: none; visibility: visible; }
  .tabbar { display: flex; justify-content: space-around; align-items: center; height: 64px; padding: 0 8px env(safe-area-inset-bottom); background: var(--side); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { position: relative; flex: 1; height: 52px; display: grid; place-items: center; border-radius: 12px; color: var(--dim); }
  .tabbar .on { color: var(--text); }
  .tabbar .badge { position: absolute; top: 6px; left: calc(50% + 4px); margin: 0; height: 18px; min-width: 18px; font-size: 10px; }
  .scroll { padding: 20px 16px 40px; }
  .pagehead h1 { font-size: 28px; }
  .fic { display: none; }
  table.t { min-width: 0; }
  table.t .hide-sm { display: none; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .ctrl .hide-sm { display: none; }
  .stage video { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
  .stage .meta { display: none; }
  .ptop { height: 56px; padding: 0 10px 0 4px; gap: 8px; }
}
@media (max-width: 640px) {
  .tcbtn .d, .tcbtn .mode { display: none; }
  .tcbtn { padding: 0 10px; }
  .ptop .crumb a, .ptop .crumb .sep { display: none; }
  .ptop .master span, .ptop .btn.sm span { display: none; }
  .ptop .btn.sm { width: 34px; padding: 0; }
  .ptop .chip { display: none; }
  .stagecol { height: 46vh; height: 46dvh; padding: 0 6px 6px; gap: 6px; }
  .pbar { padding: 2px 8px 4px; border-radius: 14px; }
  .ctrl { margin-top: 0; }
  .ctrl .icon-btn { width: 34px; height: 34px; }
  .tcbtn { height: 32px; }
  .tcbtn .now { font-size: 14px; }
  .foot { gap: 6px; }
  .decision .btn { height: 46px !important; font-size: 13.5px; }
  .composer .lead span:not(.tcchip) { display: none; }
  .composer .lead { min-height: 0; }
  .composer textarea { min-height: 24px; }
  .stage video { inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); border-radius: 12px; }
  .prail .foot { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 24px -12px rgba(0,0,0,.7); }
  .prail-head { padding: 10px 10px 6px; }
  .clist { padding: 8px 10px 12px; }
  .composer { padding: 8px; gap: 6px; }
  .composer .lead { font-size: 11.5px; }
  .composer .tool .lbl { display: none; }
  .composer .tool { width: 38px; height: 38px !important; padding: 0 !important; }
  .composer .tool svg.i { width: 19px; height: 19px; }
  .composer textarea { font-size: 16px; min-height: 38px; } /* 16px: iOS doesn't zoom into the field */
  .send { width: 38px; height: 38px; }
  .timeline { height: 46px; }
  .mark { width: 24px !important; height: 24px !important; }
  /* folders: compact two-up cards instead of full-width tiles */
  .folders { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; margin: 0 -8px; }
  .fold { padding: 8px; gap: 8px; border-radius: 16px; }
  .fshape { height: 96px; }
  .fshape .tab { height: 18px; border-radius: 9px 9px 0 0; }
  .fshape .back { top: 8px; border-radius: 3px 12px 12px 12px; }
  .fshape .front { height: 58px; border-radius: 12px; padding: 8px; }
  .fshape .front .avatar { width: 22px !important; height: 22px !important; font-size: 9px !important; }
  .peek { top: 14px; width: 34px; height: 60px; border-radius: 6px; }
  .fold .ttl strong { font-size: 13.5px; }
  .fold .ttl span { font-size: 12px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sharefolder .scroll { padding: 14px 12px 32px; }
  .ctrl .speed, .ctrl .vsep { display: none; }
  .pbar { padding: 6px 10px 6px; }
  .stage { border-radius: 18px; }
  .decision .btn { height: 54px; }
  .login { gap: 36px; padding: 32px 16px; }
  .login .lines { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- shared: modal shell ---------- */
dialog.mdl { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
.mbody { padding: 22px; display: grid; gap: 16px; }
.mbody h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.bt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.bt strong { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.capbox { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line2); font-size: 13px; line-height: 1.55; color: var(--muted); white-space: pre-wrap; overflow: auto; max-height: 140px; overflow-wrap: anywhere; }

/* ---------- schedule dialog ---------- */
dialog.sched { width: min(920px, calc(100% - 24px)); }
.sgrid { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.sprev { padding: 22px; background: radial-gradient(400px 300px at 50% 0%, rgba(124,130,255,.14), transparent 70%), #111114; display: grid; gap: 12px; align-content: start; border-right: 1px solid var(--line); }
.phone { position: relative; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 30px 60px -20px rgba(0,0,0,.9); }
.phone .pimg { position: absolute; inset: 0; background: #0a0a0c center/cover no-repeat; }
.phone .pcap { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 14px 16px; background: linear-gradient(transparent, rgba(0,0,0,.85)); display: grid; gap: 6px; }
.phone .pu { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #fff; }
.phone .pt { font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.86); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.sform { padding: 22px; display: grid; gap: 16px; align-content: start; min-width: 0; }
.sform h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.plat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line2); }
.plat.on { box-shadow: inset 0 0 0 1.5px var(--accent); background: linear-gradient(180deg, rgba(124,130,255,.12), rgba(124,130,255,.03)); }
.plat > svg.i { color: var(--accent2); }
.dayrow { display: grid; grid-auto-flow: column; grid-auto-columns: 56px; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.daybtn { height: 60px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-content: center; gap: 2px; font-size: 11px; color: var(--dim); transition: background var(--d1), box-shadow var(--d1); }
.daybtn b { font-size: 18px; color: var(--text); font-weight: 600; }
.daybtn:hover { background: var(--card2); }
.daybtn[aria-pressed="true"] { background: var(--accent); color: #0c0c1e; box-shadow: none; }
.daybtn[aria-pressed="true"] b { color: #0c0c1e; }
.timerow { display: flex; flex-wrap: wrap; gap: 6px; }
.timebtn { height: 38px; padding: 0 12px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line2); font-size: 13px; transition: background var(--d1); }
.timebtn:hover { background: var(--card2); }
.timebtn[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.timerow .input { width: 120px; min-height: 38px; padding: 6px 10px; border-radius: 999px; color-scheme: dark; }
.field .row .input[type=date] { width: auto; min-height: 36px; padding: 6px 10px; color-scheme: dark; }
.sumline { margin: 0; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--tc-bg); color: var(--tc); font-size: 13px; }
.sumline strong { color: var(--text); }
.sumline svg.i { flex: none; }

/* ---------- calendar ---------- */
.calhead { display: grid; gap: 14px; margin-bottom: 18px; }
.calhead h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pillbtn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line2); font-size: 13px; color: var(--muted); }
.pillbtn i { width: 8px; height: 8px; border-radius: 50%; }
.pillbtn[aria-pressed="true"] { background: var(--card2); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--dim); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend .sched, .ev.sched { --c: var(--accent); }
.legend .busy, .ev.busy { --c: var(--accent2); }
.legend .ok, .ev.ok { --c: var(--approved); }
.legend .bad, .ev.bad { --c: var(--danger); }
.readytray { margin-bottom: 18px; display: grid; gap: 8px; }
.trayrow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.traychip { display: inline-flex; align-items: center; gap: 10px; flex: none; padding: 6px 12px 6px 6px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px rgba(251,146,60,.35); font-size: 13px; font-weight: 500; transition: background var(--d1); max-width: 260px; }
.traychip:hover { background: var(--card2); }
.traychip > span:not(.thumb-s):not(.chip) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calbody { transition: opacity var(--d2); }
.calbody.loading { opacity: .5; pointer-events: none; }
.ev { position: absolute; display: flex; gap: 8px; align-items: flex-start; padding: 6px; border-radius: 10px; text-align: left; overflow: hidden; background: color-mix(in srgb, var(--c) 16%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent), inset 3px 0 0 hsl(var(--hue) 70% 70%); transition: transform var(--d1) var(--ease), box-shadow var(--d1); z-index: 2; }
.ev:hover { transform: translateY(-1px); z-index: 4; box-shadow: inset 0 0 0 1.5px var(--c), 0 10px 24px -8px rgba(0,0,0,.8); }
.ev .thumb-s { width: 22px; height: 39px; border-radius: 5px; }
.ev .bt strong { font-size: 12px; }
.ev .et { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .es { color: var(--c); font-family: var(--font); font-weight: 500; }
.ev.mini { position: relative; padding: 4px 6px; width: 100%; }
.ev.mini .thumb-s { display: none; }
.week { border-radius: 18px; background: var(--side); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.wk-head { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.wd { display: grid; justify-items: center; gap: 2px; padding: 10px 0; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.wd b { font-size: 19px; font-weight: 600; color: var(--text); letter-spacing: -.02em; text-transform: none; min-width: 36px; height: 30px; display: grid; place-items: center; border-radius: 10px; }
.wd.today b { background: var(--accent); color: #0c0c1e; }
.wd.past { opacity: .55; }
.wk-scroll { max-height: calc(100dvh - 330px); min-height: 360px; overflow-y: auto; }
.wk-grid { position: relative; }
.wk-grid .hr { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); height: 0; }
.wk-grid .hr span { position: absolute; left: 0; width: 48px; top: -8px; text-align: right; font-size: 11px; color: var(--dim); background: var(--side); }
.wk-grid .col { position: absolute; top: 0; bottom: 0; width: calc((100% - 56px) / 7); border-left: 1px solid var(--line); }
.wk-grid .col .ev { margin-left: 3px; }
.wk-grid .col.past { background: repeating-linear-gradient(-45deg, rgba(255,255,255,.016) 0 6px, transparent 6px 12px); }
.wk-grid .col.today { background: rgba(124,130,255,.04); }
.nowline { position: absolute; width: calc((100% - 56px) / 7); height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.nowline::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.nowtag { position: absolute; left: 4px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--danger); color: #2a0606; font-size: 11px; font-weight: 600; display: grid; place-items: center; z-index: 3; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: 18px; background: var(--side); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.mdow { padding: 10px; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.mcell { min-height: 112px; padding: 6px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mcell:nth-child(7n + 1) { border-left: 0; }
.mcell.out { opacity: .4; }
.mnum { align-self: flex-start; min-width: 28px; height: 26px; padding: 0 6px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mnum:hover { background: var(--card2); color: var(--text); }
.mcell.today .mnum { background: var(--accent); color: #0c0c1e; }
.more { font-size: 11.5px; color: var(--muted); text-align: left; padding: 2px 6px; }
.clistv { display: grid; gap: 22px; }
.clistv section { display: grid; gap: 8px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: left; transition: background var(--d1); }
.lrow:hover { background: var(--card2); }
.lrow .lt { width: 48px; color: var(--tc); font-size: 13px; }
.evs { font-size: 12px; font-weight: 500; white-space: nowrap; }
.evs.sched, .evs.busy { color: var(--accent2); } .evs.ok { color: var(--approved); } .evs.bad { color: var(--danger); }
.picklist { display: grid; gap: 6px; max-height: 60dvh; overflow: auto; }
.pickrow { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; text-align: left; transition: background var(--d1); }
.pickrow:hover, .pickrow:focus-visible { background: var(--card2); }

/* ---------- notifications ---------- */
.acts-list { display: grid; gap: 6px; max-width: 820px; }
.act { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 16px; transition: background var(--d1); }
.act:hover { background: var(--card); }
.act.new { background: linear-gradient(90deg, rgba(124,130,255,.08), transparent); box-shadow: inset 2px 0 0 var(--accent); }
.aic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--card2); color: var(--muted); flex: none; }
.k-approved .aic, .k-posted .aic { color: var(--approved); background: rgba(52,211,153,.12); }
.k-revision .aic { color: var(--revision); background: rgba(251,146,60,.12); }
.k-post_failed .aic { color: var(--danger); background: rgba(248,113,113,.12); }
.k-comment .aic, .k-reply .aic { color: var(--tc); background: var(--tc-bg); }
.act .bt { font-size: 14px; color: var(--muted); gap: 4px; }
.act .bt strong { display: inline; font-size: 14px; color: var(--text); }
.act .q { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act > .small { white-space: nowrap; }

/* ---------- storage ---------- */
.scards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 14px; max-width: 1100px; }
.scard { padding: 18px; border-radius: 20px; background: var(--side); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 16px; align-content: start; }
.scard h2 { margin: 0; font-size: 17px; font-weight: 600; }
.sic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.sic.r2 { background: rgba(251,146,60,.14); color: #fdba74; }
.sic.gd { background: rgba(56,189,248,.14); color: #7dd3fc; }
.sbody { display: grid; gap: 10px; }
.sbody .big { font-size: 14px; }
.sbody .big strong { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.meter { height: 10px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; margin-bottom: 6px; }
.meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .8s var(--ease); }
.meter.warn i { background: var(--revision); } .meter.bad i { background: var(--danger); }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.srow .sub { grid-column: 1 / -1; }
.shares { display: grid; gap: 6px; }

/* ---------- search palette ---------- */
dialog.palette { width: min(620px, calc(100% - 24px)); margin-top: 12vh; padding: 0; overflow: hidden; }
.psearch { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.psearch svg.i { color: var(--dim); }
.psearch .input { border: 0; background: transparent; box-shadow: none !important; font-size: 16px; padding: 6px 0; }
.presults { max-height: 55dvh; overflow: auto; padding: 6px; display: grid; gap: 2px; }
.presult { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; text-align: left; }
.presult.on { background: var(--card2); }
.pic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--card2); color: var(--muted); flex: none; }

/* ---------- project board ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.bcol { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 18px; background: var(--side); box-shadow: inset 0 0 0 1px var(--line); min-height: 160px; }
.bh { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 6px; }
.bcard { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: background var(--d1), transform var(--d2) var(--ease); }
.bcard:hover { background: var(--card2); transform: translateY(-1px); }
.statbar { align-items: center; }
.statbar .seg button { flex: none; height: 30px; }

@media (max-width: 900px) {
  .sgrid { grid-template-columns: 1fr; }
  .sprev { border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: 120px 1fr; align-items: end; }
  .sprev > span { display: none; }
  .month .ev.mini .bt strong { display: none; }
  .mcell { min-height: 76px; padding: 4px; }
  .wk-head, .wk-grid { min-width: 720px; }
  .week { overflow-x: auto; }
  .review.share .stagecol { height: calc(100dvh - 56px); }
}

/* ---------- admin: Instagram accounts ---------- */
.iglimits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 10px; margin-bottom: 18px; }
.iglimits > div { padding: 14px 16px; border-radius: 16px; background: var(--side); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 4px; }
.iglimits strong { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.iglimits span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.igrules ul { margin: 0; padding: 16px 18px 16px 34px; border-radius: 16px; background: var(--side); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.5; max-width: 900px; }
table.t td .meter { height: 6px; margin: 0; }
table.t td.nm a svg.i { width: 15px; height: 15px; color: var(--dim); }
