:root {
  --bg: #0c0c10;
  --bg2: #121218;
  --panel: #17171f;
  --panel2: #1d1d27;
  --hover: #23232f;
  --line: #2a2a36;
  --line2: #34344a;
  --text: #ececf3;
  --muted: #8d8da0;
  --dim: #5f5f73;
  --accent: #7c5cff;
  --accent-2: color-mix(in srgb, var(--accent) 70%, white);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .13);
  --warn: #fbbf24;
  --bad: #f2546b;
  --bad-soft: rgba(242, 84, 107, .13);
  --r: 10px;
  --r-sm: 7px;
  --sidebar: 236px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2c2c3a; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.ic { flex: none; display: inline-block; vertical-align: -3px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap { gap: 8px; } .gap-lg { gap: 16px; } .gap-sm { gap: 4px; }
.end { justify-content: flex-end; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 14px; } .mt-sm { margin-top: 8px; } .mb { margin-bottom: 14px; }
.hidden { display: none !important; }
.small { font-size: 12px; } .tiny { font-size: 11px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line2); background: var(--panel2); font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s, transform .05s; }
.btn:hover { background: var(--hover); border-color: #44445a; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 86%, white); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { background: var(--bad); border-color: transparent; color: #fff; }
.btn.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.xs { height: 24px; padding: 0 8px; font-size: 12px; gap: 5px; }
.btn.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent-2); }
.btn:disabled { opacity: .45; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); position: relative; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.on { color: var(--accent-2); background: var(--accent-soft); }
.input, .textarea, select.input { width: 100%; height: 36px; padding: 0 11px; border-radius: var(--r-sm); border: 1px solid var(--line2); background: var(--bg2); outline: none; transition: border-color .12s, box-shadow .12s; }
.textarea { height: auto; padding: 9px 11px; resize: vertical; min-height: 64px; }
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.switch { position: relative; width: 34px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #34344a; border-radius: 20px; transition: .15s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(14px); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 20px; font-size: 11.5px; font-weight: 500; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.accent { background: var(--accent-soft); color: var(--accent-2); border-color: transparent; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.warn { background: rgba(251, 191, 36, .12); color: var(--warn); border-color: transparent; }
.tc { font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--accent-2); background: var(--accent-soft); border-radius: 5px; padding: 1px 6px; border: 0; cursor: pointer; }
.tc:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700; flex: none; letter-spacing: -.02em; }
.avatars { display: flex; } .avatars .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg2); } .avatars .avatar:first-child { margin-left: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
.mention { color: var(--accent-2); font-weight: 500; }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 11px; border-radius: 5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.seg button.on { background: var(--panel2); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty > .ic { margin: 0 auto; }
.empty h3 { color: var(--text); margin: 14px 0 6px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toasts, modals, menus ---------- */
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #2a2a38; border: 1px solid var(--line2); padding: 9px 16px; border-radius: 9px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: pop .18s; font-weight: 500; }
.toast.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.toast.bad { border-color: var(--bad); }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }
.modal-back { position: fixed; inset: 0; background: rgba(4, 4, 8, .7); backdrop-filter: blur(3px); z-index: 500; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 460px; max-width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: pop .18s; }
.modal.wide { width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 6px 18px 18px; overflow: auto; }
.popmenu { position: fixed; z-index: 600; min-width: 190px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 5px; box-shadow: 0 16px 40px rgba(0,0,0,.55); animation: pop .12s; }
.popmenu button { display: flex; width: 100%; align-items: center; gap: 9px; border: 0; background: transparent; padding: 7px 9px; border-radius: 6px; text-align: left; font-size: 13px; color: var(--text); }
.popmenu button:hover { background: var(--hover); }
.popmenu button.danger { color: var(--bad); }
.popmenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.settings-row:first-child { border-top: 0; }
.settings-row .lbl { font-weight: 500; }
.settings-row .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.copybox { display: flex; gap: 6px; }
.copybox .input { font-family: var(--mono); font-size: 12px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 30px; background:
  radial-gradient(800px 400px at 50% -10%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 70%), var(--bg); }
.auth-card { width: 380px; max-width: 100%; background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; padding: 30px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.auth-card h1 { font-size: 22px; margin: 18px 0 4px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; letter-spacing: -.02em; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #22c3a6)); display: grid; place-items: center; color: #fff; }
.logo img { height: 26px; max-width: 120px; object-fit: contain; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100vh; }
.sidebar { background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.sidebar .top { padding: 16px 14px 10px; }
.sidebar nav { padding: 4px 8px; overflow: auto; flex: 1; }
.nav-h { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); font-weight: 600; padding: 14px 8px 6px; display: flex; justify-content: space-between; align-items: center; }
.nav-h button { border: 0; background: none; color: var(--dim); padding: 0; display: grid; }
.nav-h button:hover { color: var(--text); }
.nav-a { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 7px; color: var(--muted); font-weight: 500; font-size: 13.5px; cursor: pointer; }
.nav-a:hover { background: var(--hover); color: var(--text); }
.nav-a.on { background: var(--panel2); color: var(--text); }
.nav-a .count { margin-left: auto; font-size: 11.5px; color: var(--dim); }
.sidebar .me { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.search-box { position: relative; margin-top: 14px; }
.search-box .ic { position: absolute; left: 10px; top: 10px; color: var(--dim); }
.search-box input { padding-left: 32px; height: 34px; background: var(--panel); }
.search-results { position: absolute; top: 40px; left: 0; width: 360px; z-index: 50; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.5); max-height: 60vh; overflow: auto; }
.search-results a { display: block; padding: 7px 9px; border-radius: 6px; font-size: 13px; }
.search-results a:hover { background: var(--hover); }
.search-results h5 { margin: 8px 9px 4px; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.main { min-width: 0; overflow: auto; display: flex; flex-direction: column; }
.topbar { height: 58px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.topbar h2 { font-size: 16px; }
.content { padding: 24px; }
.badge { position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.notif-list { width: 360px; max-height: 70vh; overflow: auto; }
.notif { display: block; padding: 9px 10px; border-radius: 7px; font-size: 13px; }
.notif:hover { background: var(--hover); }
.notif.unread { background: var(--accent-soft); }

/* ---------- projects grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; transition: border-color .12s, transform .12s; position: relative; }
.card:hover { border-color: var(--line2); transform: translateY(-2px); }
.card .thumb { aspect-ratio: 16/9; background: #0a0a0e center/cover no-repeat; position: relative; display: grid; place-items: center; color: var(--dim); }
.card .thumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.75); padding: 1px 6px; border-radius: 4px; font: 600 11px var(--mono); color: #fff; }
.card .thumb .tags { position: absolute; left: 8px; top: 8px; display: flex; gap: 5px; }
.card .thumb .tags .pill { background: rgba(10,10,14,.8); border-color: transparent; color: #ddd; backdrop-filter: blur(4px); }
.card .meta { padding: 11px 13px 12px; }
.card .meta h4 { font-size: 14px; font-weight: 600; }
.card .meta .sub { display: flex; gap: 10px; color: var(--muted); font-size: 12px; margin-top: 5px; align-items: center; }
.card .kebab { position: absolute; top: 6px; right: 6px; opacity: 0; background: rgba(10,10,14,.8); }
.card:hover .kebab { opacity: 1; }
.card.new { border-style: dashed; display: grid; place-items: center; min-height: 200px; color: var(--muted); background: transparent; }
.card.new:hover { color: var(--text); border-color: var(--accent); }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
table.list tr.click:hover td { background: var(--panel); cursor: pointer; }
.lthumb { width: 72px; aspect-ratio: 16/9; border-radius: 5px; background: #0a0a0e center/cover; }

/* ---------- new project ---------- */
.drop { border: 1.5px dashed var(--line2); border-radius: 12px; padding: 34px 20px; text-align: center; color: var(--muted); transition: .12s; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* ---------- review ---------- */
.review { display: grid; grid-template-rows: auto 1fr; height: 100vh; background: var(--bg); }
.rv-top { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 56px; border-bottom: 1px solid var(--line); background: var(--bg2); min-width: 0; }
.rv-top .title { font-size: 15px; font-weight: 600; max-width: 340px; padding: 4px 6px; border-radius: 6px; outline: none; }
.rv-top .title[contenteditable=true]:hover { background: var(--hover); }
.rv-body { display: grid; grid-template-columns: 1fr 380px; min-height: 0; }
.rv-body.panel-closed { grid-template-columns: 1fr 0; }
.rv-body.panel-closed .side { display: none; }
.stage-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.stage { flex: 1 1 0; min-height: 260px; display: grid; place-items: center; background: #050507; position: relative; padding: 16px; container-type: size; overflow: hidden; }
.player { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.player .frame { --ar: 16/9; position: relative; aspect-ratio: var(--ar); width: min(100cqw, calc(100cqh * var(--ar))); background: #000; border-radius: 4px; overflow: hidden; }
.player video, .player .embed, .player .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }
.player .audio-art { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, var(--accent-soft), #050507 70%); }
.player .audio-art .bars { display: flex; gap: 4px; align-items: center; height: 80px; }
.player .audio-art .bars i { width: 5px; background: var(--accent); border-radius: 3px; height: 20%; animation: bar 1s ease-in-out infinite; animation-play-state: paused; }
.player.playing .audio-art .bars i { animation-play-state: running; }
@keyframes bar { 50% { height: 100%; } }
canvas.draw-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
canvas.draw-layer.active { pointer-events: auto; cursor: crosshair; }
.watermark { position: absolute; inset: 0; pointer-events: none; z-index: 4; display: grid; place-items: center; overflow: hidden; }
.watermark span { font-size: clamp(16px, 4vw, 44px); font-weight: 700; color: rgba(255,255,255,.13); transform: rotate(-24deg); white-space: nowrap; text-shadow: 0 0 2px rgba(0,0,0,.3); }
.prewatch { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(5,5,8,.86); backdrop-filter: blur(6px); padding: 20px; }
.prewatch .box { max-width: 460px; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 22px; }
.draw-tools { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 7; display: flex; gap: 4px; align-items: center; background: rgba(23,23,31,.95); border: 1px solid var(--line2); border-radius: 10px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; margin: 0 2px; }
.swatch.on { border-color: #fff; }
.transport { padding: 10px 18px 0; background: var(--bg2); border-top: 1px solid var(--line); }
.controls { display: flex; align-items: center; gap: 6px; height: 38px; }
.controls .time { font: 600 13px var(--mono); margin: 0 8px; }
.controls .time .dim { font-weight: 400; }
.timeline { position: relative; height: 46px; margin: 2px 0 4px; cursor: pointer; user-select: none; }
.timeline .track { position: absolute; left: 0; right: 0; top: 22px; height: 6px; background: #2a2a38; border-radius: 6px; overflow: hidden; }
.timeline .heat { position: absolute; left: 0; right: 0; top: 30px; height: 4px; display: flex; opacity: .9; }
.timeline .heat i { flex: 1; background: var(--warn); }
.timeline .buffered { position: absolute; left: 0; top: 0; bottom: 0; background: #3a3a4c; }
.timeline .played { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.timeline .head { position: absolute; top: 17px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--accent-soft); pointer-events: none; }
.timeline .hover-tc { position: absolute; top: -4px; transform: translateX(-50%); background: #000; font: 600 11px var(--mono); padding: 2px 6px; border-radius: 4px; pointer-events: none; display: none; }
.timeline:hover .hover-tc { display: block; }
.timeline .mk { position: absolute; top: 2px; transform: translateX(-50%); z-index: 2; }
.timeline .mk .avatar { box-shadow: 0 0 0 2px var(--bg2); cursor: pointer; transition: transform .1s; }
.timeline .mk .avatar:hover { transform: scale(1.2); }
.timeline .mk.resolved { opacity: .35; }
.timeline .range { position: absolute; top: 22px; height: 6px; background: color-mix(in srgb, var(--c) 55%, transparent); border-radius: 3px; pointer-events: none; }
.timeline .draft-range { position: absolute; top: 19px; height: 12px; border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: 4px; pointer-events: none; }
.composer { padding: 10px 18px 16px; background: var(--bg2); }
.composer-box { border: 1px solid var(--line2); background: var(--panel); border-radius: 12px; transition: border-color .12s; }
.composer-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer-box textarea { width: 100%; background: transparent; border: 0; outline: 0; resize: none; padding: 11px 13px 4px; min-height: 46px; max-height: 160px; }
.composer-box .bar { display: flex; align-items: center; gap: 4px; padding: 5px 7px 7px; flex-wrap: wrap; }
.composer .who { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; color: var(--muted); }
.poll-edit { padding: 4px 12px 8px; display: grid; gap: 6px; }
.poll-edit .input { height: 32px; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 12px 6px; padding: 4px 6px 4px 10px; background: var(--panel2); border-radius: 7px; font-size: 12px; }
.rec-dot { width: 9px; height: 9px; background: var(--bad); border-radius: 50%; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }

.side { border-left: 1px solid var(--line); background: var(--bg2); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.side-tabs { display: flex; gap: 2px; padding: 10px 12px 0; border-bottom: 1px solid var(--line); }
.side-tabs button { border: 0; background: none; padding: 8px 10px 10px; color: var(--muted); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 6px; align-items: center; }
.side-tabs button.on { color: var(--text); border-color: var(--accent); }
.side-tabs .n { font-size: 11px; background: var(--panel2); padding: 0 6px; border-radius: 9px; color: var(--muted); }
.side-tools { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.side-scroll { flex: 1; overflow: auto; padding: 6px 0 20px; }
.group-h { display: flex; align-items: center; gap: 7px; padding: 12px 16px 6px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); cursor: pointer; user-select: none; }
.group-h .n { margin-left: auto; font-size: 11px; }
.note { padding: 12px 16px; border-bottom: 1px solid var(--line); position: relative; transition: background .12s; }
.note:hover { background: var(--panel); }
.note.active { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.note.resolved .body { color: var(--muted); }
.note .head { display: flex; align-items: center; gap: 8px; }
.note .head .name { font-weight: 600; font-size: 13px; }
.note .head .when { color: var(--dim); font-size: 12px; }
.note .head .acts { margin-left: auto; display: flex; gap: 2px; opacity: 0; transition: opacity .1s; }
.note:hover .head .acts, .note .head .acts.show { opacity: 1; }
.note .head .acts .icon-btn { width: 26px; height: 26px; }
.note .body { margin: 7px 0 0 34px; word-wrap: break-word; }
.note .body .line { display: flex; gap: 7px; align-items: baseline; flex-wrap: wrap; }
.note .foot { margin: 8px 0 0 34px; display: flex; gap: 12px; align-items: center; }
.note .foot button { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 0; display: inline-flex; gap: 5px; align-items: center; }
.note .foot button:hover { color: var(--text); }
.note .foot button.done { color: var(--ok); }
.note audio { width: 100%; height: 34px; margin-top: 6px; }
.note .att { margin-top: 8px; max-width: 100%; max-height: 180px; border-radius: 7px; cursor: zoom-in; display: block; }
.note .replies { margin: 10px 0 0 34px; border-left: 2px solid var(--line); padding-left: 12px; display: grid; gap: 10px; }
.note .reply .body, .note .reply .foot { margin-left: 0; }
.note .reply-form { margin: 10px 0 0 34px; display: flex; gap: 6px; }
.chk { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line2); display: grid; place-items: center; background: transparent; padding: 0; color: transparent; }
.chk:hover { border-color: var(--ok); }
.chk.on { background: var(--ok); border-color: var(--ok); color: #06281c; }
.poll { margin-top: 8px; display: grid; gap: 6px; }
.poll button { position: relative; overflow: hidden; display: flex; justify-content: space-between; text-align: left; border: 1px solid var(--line2); background: var(--panel); border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.poll button:hover { border-color: var(--accent); }
.poll button.mine { border-color: var(--accent); }
.poll button .bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-soft); z-index: 0; }
.poll button span { position: relative; z-index: 1; }
.version-tag { font-size: 10.5px; color: var(--dim); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.transcript-seg { display: flex; gap: 10px; padding: 7px 16px; cursor: pointer; line-height: 1.55; }
.transcript-seg:hover { background: var(--panel); }
.transcript-seg.now { background: var(--accent-soft); }
.transcript-seg mark { background: rgba(251,191,36,.3); color: inherit; border-radius: 2px; }
.quote-btn { position: fixed; z-index: 60; }
.approve-bar { display: flex; gap: 6px; align-items: center; }
.vstack { display: flex; align-items: center; gap: 2px; }
.deadline-banner { display: flex; gap: 8px; align-items: center; padding: 8px 18px; background: rgba(251,191,36,.08); color: var(--warn); font-size: 13px; border-bottom: 1px solid var(--line); }

/* image sets */
.img-toolbar { display: flex; gap: 8px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; padding: 18px; }
.img-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; position: relative; }
.img-card:hover { border-color: var(--line2); }
.img-card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.img-card .ph { aspect-ratio: 4/3; background: #0a0a0e center/contain no-repeat; }
.img-card .cap { padding: 8px 10px; display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.img-card .vote { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; border: 0; background: none; color: var(--muted); font-size: 12px; padding: 2px 4px; border-radius: 5px; }
.img-card .vote.on { color: var(--bad); }
.img-card .vote.on svg { fill: var(--bad); }
.img-card .pick { position: absolute; top: 8px; left: 8px; width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid #fff8; background: #0008; display: grid; place-items: center; }
.img-card.sel .pick { background: var(--accent); border-color: var(--accent); }
.img-card .nbadge { position: absolute; top: 8px; right: 8px; }
.img-view { position: relative; display: inline-block; max-width: 100%; max-height: calc(100vh - 160px); }
.img-view img { max-width: 100%; max-height: calc(100vh - 160px); display: block; user-select: none; -webkit-user-drag: none; }
.pin { position: absolute; transform: translate(-50%, -100%); z-index: 5; cursor: pointer; }
.pin .avatar { box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(0,0,0,.5); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.pin .avatar > * { transform: rotate(45deg); }
.pin.draft .avatar { background: var(--accent); }

/* compare */
.compare { position: fixed; inset: 0; z-index: 400; background: #050507; display: grid; grid-template-rows: 56px 1fr 64px; }
.compare .bar { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.compare .area { position: relative; display: grid; place-items: center; padding: 16px; min-height: 0; }
.compare .area.side { grid-template-columns: 1fr 1fr; gap: 12px; }
.compare .pane { position: relative; width: 100%; height: 100%; display: grid; place-items: center; min-height: 0; }
.compare .pane video, .compare .pane img { max-width: 100%; max-height: 100%; display: block; }
.compare .wipe { position: relative; max-width: 100%; max-height: 100%; aspect-ratio: 16/9; height: 100%; }
.compare .wipe > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.compare .wipe .top { clip-path: inset(0 0 0 var(--x, 50%)); }
.compare .wipe .handle { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 2px; background: #fff; z-index: 3; cursor: ew-resize; inset: auto; height: 100%; }
.compare .wipe .handle::after { content: '⇆'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; font-weight: 700; }
.compare .lab { position: absolute; top: 10px; z-index: 4; background: rgba(0,0,0,.7); padding: 2px 8px; border-radius: 5px; font: 600 12px var(--mono); }
.compare .foot { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-top: 1px solid var(--line); background: var(--bg2); }

/* board */
.board { display: flex; gap: 14px; padding: 20px 24px; overflow-x: auto; align-items: flex-start; min-height: calc(100vh - 58px); }
.bcol { width: 290px; flex: none; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 110px); }
.bcol.inbox { background: transparent; border-style: dashed; }
.bcol-h { display: flex; align-items: center; gap: 6px; padding: 11px 12px 8px; font-weight: 600; }
.bcol-h .n { color: var(--dim); font-size: 12px; font-weight: 500; }
.bcol-body { padding: 4px 10px 10px; overflow: auto; display: grid; gap: 8px; min-height: 60px; }
.bcol-body.over { background: var(--accent-soft); border-radius: 8px; }
.bcard { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; cursor: grab; font-size: 13px; }
.bcard:hover { border-color: var(--line2); }
.bcard.dragging { opacity: .4; }
.bcard .h { display: flex; gap: 6px; align-items: center; margin-bottom: 5px; font-size: 12px; color: var(--muted); }
.bcard .cl { margin-top: 8px; display: grid; gap: 4px; }
.bcard .cl label { display: flex; gap: 7px; align-items: center; font-size: 12.5px; }
.bcard .cl label.done span { text-decoration: line-through; color: var(--dim); }

/* storage */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.panel h3 { font-size: 15px; margin-bottom: 4px; }
.steps { margin: 10px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.8; font-size: 13px; }
.steps code, .code { font-family: var(--mono); font-size: 12px; background: var(--bg2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; color: var(--text); }
.drive-card { display: flex; gap: 16px; align-items: center; }
.drive-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line2); display: grid; place-items: center; color: var(--accent-2); flex: none; }

/* recorder */
.rec-stage { aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); display: grid; place-items: center; position: relative; }
.rec-stage video, .rec-stage canvas { width: 100%; height: 100%; object-fit: contain; }

.heat-row { display: flex; height: 26px; align-items: flex-end; gap: 1px; background: var(--bg2); border-radius: 6px; padding: 3px; }
.heat-row i { flex: 1; background: var(--warn); border-radius: 1px; min-height: 1px; }
.kbd { font-family: var(--mono); font-size: 11.5px; background: var(--panel2); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }

@media (max-width: 1000px) {
  .rv-body { grid-template-columns: 1fr; grid-template-rows: auto auto; overflow: auto; }
  .side { border-left: 0; border-top: 1px solid var(--line); min-height: 60vh; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .review { height: auto; min-height: 100vh; }
}

/* ---------- Mac app window chrome (only inside the Flowli Note app) ---------- */
html.in-app .sidebar .top { padding-top: 48px; -webkit-app-region: drag; }
html.in-app .topbar, html.in-app .rv-top, html.in-app .compare .bar, html.in-app .img-toolbar { -webkit-app-region: drag; }
html.in-app .rv-top { padding-left: 86px; }
html.in-app .compare .bar { padding-left: 86px; }
html.in-app .auth::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: 40px; -webkit-app-region: drag; }
html.in-app :is(.topbar, .rv-top, .compare .bar, .img-toolbar, .sidebar .top) :is(button, a, input, select, .seg, .title, [contenteditable], .search-results, .avatars) { -webkit-app-region: no-drag; }
@media (max-width: 1000px) { html.in-app .topbar { padding-left: 86px; } }
html.in-app .board-page .topbar { padding-left: 86px; }
