:root {
  --bg: #0a0a0c;
  --surface: #111114;
  --surface-2: #16161a;
  --surface-3: #1c1c21;
  --hover: #222228;
  --line: #232329;
  --line-2: #2f2f37;
  --text: #ededf0;
  --text-2: #b9b9c2;
  --muted: #86868f;
  --faint: #56565f;
  --accent: #7b8cff;
  --accent-strong: #6576ff;
  --accent-soft: rgba(123, 140, 255, 0.14);
  --open: #f2b84b;
  --working: #b398ff;
  --done: #46d39a;
  --question: #ff9f5a;
  --client: #5ac8fa;
  --danger: #ff5d6c;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --topbar: 52px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 13.5px/1.5 Geist, Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01';
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.spacer { flex: 1; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a2a31; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #3a3a43; }

/* ---------- icons & buttons ---------- */
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; pointer-events: none; }
/* play/pause: both icons live in the button; a class picks which one shows */
#playBtn .ico-play, #playBtn .ico-pause { display: grid; place-items: center; pointer-events: none; }
#playBtn .ico-pause, #playBtn.playing .ico-play { display: none; }
#playBtn.playing .ico-pause { display: grid; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2);
  font-weight: 500; font-size: 13px; white-space: nowrap; transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--hover); border-color: #3a3a44; }
.btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent-strong); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.btn.primary:hover { background: var(--accent); }
.btn.danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn.danger:hover { background: #ff7380; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 0;
  background: transparent; color: var(--muted); transition: background .12s, color .12s; flex: none;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.sm { width: 26px; height: 26px; border-radius: 6px; }
.icon-btn.sm svg.i { width: 14px; height: 14px; }
.kbd { font: 11px var(--mono); color: var(--faint); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; }

/* ---------- top bar ---------- */
.topbar {
  height: var(--topbar); display: flex; align-items: center; gap: 10px; padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14.5px; letter-spacing: -.015em; flex: none; }
.brand-mark { width: 24px; height: 24px; display: block; }
.crumb-sep { color: var(--faint); font-size: 16px; margin: 0 2px; }
.crumb { color: var(--muted); font-weight: 500; }
.crumb:hover { color: var(--text); }
.crumb-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 34vw; }
.search { position: relative; width: 320px; max-width: 36vw; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input {
  width: 100%; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg);
  padding: 0 10px 0 32px; outline: none; transition: border-color .12s;
}
.search input:focus { border-color: var(--line-2); }
.status-pill { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); padding: 0 10px; height: 28px; border-radius: 99px; border: 1px solid var(--line); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--done); flex: none; box-shadow: 0 0 0 3px rgba(70, 211, 154, .15); }
.dot.bad { background: var(--danger); box-shadow: 0 0 0 3px rgba(255, 93, 108, .15); }
.dot.busy { background: var(--working); box-shadow: 0 0 0 3px rgba(179, 152, 255, .18); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.me-btn { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 3px 8px 3px 3px; border-radius: 99px; color: var(--text-2); font-size: 13px; }
.me-btn:hover { background: var(--surface-3); color: var(--text); }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 600; color: #fff; flex: none; letter-spacing: 0; }
.avatar.lg { width: 28px; height: 28px; font-size: 11.5px; }

/* ---------- library ---------- */
.library { max-width: 1360px; margin: 0 auto; padding: 32px 28px 72px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.select {
  height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2);
  padding: 0 28px 0 10px; font-size: 13px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%2386868f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.select:hover { border-color: #3a3a44; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 28px 20px; }
.card { position: relative; cursor: pointer; outline: none; }
.thumb {
  aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; position: relative; background: #050506;
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s, transform .15s;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: transform .3s ease, filter .2s; }
.thumb img.main { object-fit: contain; }
.thumb img.backdrop { object-fit: cover; filter: blur(22px) brightness(.45) saturate(1.2); transform: scale(1.25); }
.card:hover .thumb, .card:focus-visible .thumb { box-shadow: 0 0 0 1px var(--line-2), 0 10px 30px rgba(0,0,0,.45); }
.card:hover .thumb img.main { transform: scale(1.025); filter: brightness(1.06); }
.thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 38%, transparent 70%, rgba(0,0,0,.35)); pointer-events: none; }
.tag {
  position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px;
  border-radius: 6px; background: rgba(10, 10, 12, .72); backdrop-filter: blur(6px); font: 500 11.5px var(--mono); color: #f2f2f5;
}
.tag svg.i { width: 13px; height: 13px; stroke-width: 1.9; }
.tag.tl { top: 8px; left: 8px; }
.tag.bl { bottom: 8px; left: 8px; }
.tag.br { bottom: 8px; right: 8px; }
.tag.claude { color: #d7ccff; }
.card-menu-btn {
  position: absolute; z-index: 2; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 7px; border: 0;
  display: grid; place-items: center; background: rgba(10, 10, 12, .72); backdrop-filter: blur(6px); color: #fff;
  opacity: 0; transition: opacity .12s, background .12s;
}
.card:hover .card-menu-btn, .card-menu-btn.open, .card:focus-within .card-menu-btn { opacity: 1; }
.card-menu-btn:hover, .card-menu-btn.open { background: rgba(40, 40, 48, .92); }
@media (hover: none) { .card-menu-btn { opacity: 1; } }
.card-info { display: flex; gap: 10px; padding: 11px 2px 0; align-items: flex-start; }
.card-title { font-weight: 550; font-size: 14px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { color: var(--muted); font-size: 12.5px; margin-top: 1px; display: flex; gap: 6px; flex-wrap: wrap; }
.card-meta span + span::before { content: '·'; margin-right: 6px; color: var(--faint); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 500; background: var(--surface-3); color: var(--muted); white-space: nowrap; flex: none; }
.chip.open { color: var(--open); background: rgba(242, 184, 75, .1); }
.chip.working { color: var(--working); background: rgba(179, 152, 255, .12); }
.chip.done { color: var(--done); background: rgba(70, 211, 154, .1); }
.chip.fail { color: var(--danger); background: rgba(255, 93, 108, .1); }
.chip .dot { width: 5px; height: 5px; box-shadow: none; }

.empty-state { border: 1px dashed var(--line-2); border-radius: 14px; padding: 72px 24px; text-align: center; color: var(--muted); transition: border-color .15s, background .15s; cursor: pointer; }
.empty-state h2 { color: var(--text); font-size: 16px; font-weight: 600; margin: 14px 0 4px; letter-spacing: -.01em; }
.empty-state .ico { width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.empty-state .ico svg.i { width: 20px; height: 20px; }
body.dragging .empty-state, .empty-state:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop-overlay { position: fixed; inset: 0; z-index: 70; display: none; place-items: center; background: rgba(10, 10, 12, .78); backdrop-filter: blur(4px); }
body.dragging .drop-overlay { display: grid; }
.drop-overlay div { border: 2px dashed var(--accent); border-radius: 18px; padding: 56px 80px; text-align: center; font-size: 16px; font-weight: 600; }
.no-results { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---------- menus ---------- */
.menu {
  position: fixed; z-index: 80; min-width: 196px; padding: 5px; border-radius: 10px; background: #1a1a1f;
  border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: pop .12s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; text-align: left; font-size: 13px; color: var(--text-2);
}
.menu button:hover, .menu button:focus-visible { background: var(--hover); color: var(--text); outline: none; }
.menu button.danger { color: var(--danger); }
.menu button.danger:hover { background: rgba(255, 93, 108, .1); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 2px; }

/* ---------- review ---------- */
.review { display: grid; grid-template-columns: minmax(0, 1fr) 384px; height: calc(100vh - var(--topbar)); overflow: hidden; }
.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #070708; }
.viewer { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.viewer .pane { position: absolute; inset: 20px 24px; }
.viewer .pane video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: transparent; outline: none; cursor: pointer;
}
/* compare: two panes side by side, or B wiped over A */
.viewer.side .pane.a { right: calc(50% + 6px); }
.viewer.side .pane.b { left: calc(50% + 6px); }
.viewer.wipe .pane.b { pointer-events: none; }
.pane-label { position: absolute; top: 8px; left: 8px; z-index: 3; font: 600 11.5px var(--mono); padding: 3px 8px; border-radius: 6px; background: rgba(10, 10, 12, .75); backdrop-filter: blur(6px); }
.viewer.wipe .pane.b .pane-label { left: auto; right: 8px; }
.wipe-handle { position: absolute; top: 20px; bottom: 20px; width: 2px; margin-left: -1px; background: #fff; z-index: 4; cursor: ew-resize; box-shadow: 0 0 0 1px rgba(0,0,0,.35); touch-action: none; }
.wipe-handle::before { content: ''; position: absolute; inset: 0 -10px; }
.wipe-handle span { position: absolute; top: 50%; left: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.wipe-handle span::before { content: '‹ ›'; position: absolute; inset: 0; display: grid; place-items: center; color: #111; font: 700 12px/1 var(--mono); letter-spacing: -1px; }
.cmp-bar { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: 10px; background: rgba(22, 22, 26, .92); border: 1px solid var(--line-2); backdrop-filter: blur(8px); font-size: 12.5px; white-space: nowrap; }
/* drawing on the frame */
.draw-layer, .draw-overlay { position: absolute; z-index: 2; pointer-events: none; }
.draw-layer.active { pointer-events: auto; cursor: crosshair; touch-action: none; outline: 2px dashed rgba(255, 255, 255, .35); outline-offset: 2px; }
.draw-tools { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; border-radius: 10px; background: rgba(22, 22, 26, .94); border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.draw-tools .sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 2px; }
.swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.3); }
.swatch.on { border-color: #fff; }
.speed-badge { position: absolute; top: 14px; right: 18px; z-index: 5; font: 600 12px var(--mono); padding: 4px 10px; border-radius: 99px; background: rgba(10, 10, 12, .78); backdrop-filter: blur(6px); }
.icon-btn.on { color: var(--accent); background: var(--accent-soft); }
.btn.ghost.on { color: var(--text); background: var(--surface-3); }
.viewer-badge { position: absolute; top: 14px; left: 18px; z-index: 2; }
.marker-pop {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: min(560px, 80%); z-index: 3;
  background: rgba(17, 17, 20, .9); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px;
  backdrop-filter: blur(10px); pointer-events: none; display: flex; gap: 9px; align-items: flex-start; font-size: 13px;
}
.controls { padding: 6px 16px 10px; background: var(--surface); border-top: 1px solid var(--line); }
.scrub { position: relative; height: 38px; cursor: pointer; user-select: none; touch-action: none; }
.scrub-track { position: absolute; left: 0; right: 0; bottom: 8px; height: 4px; border-radius: 4px; background: #2a2a31; transition: height .12s, bottom .12s; }
.scrub:hover .scrub-track { height: 6px; bottom: 7px; }
.scrub-buffer { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: #3a3a43; }
.scrub-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); }
.scrub-head { position: absolute; bottom: 4px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); pointer-events: none; }
.scrub-hover { position: absolute; bottom: 22px; transform: translateX(-50%); font: 500 11px var(--mono); background: #000; padding: 2px 6px; border-radius: 5px; pointer-events: none; z-index: 4; border: 1px solid var(--line-2); }
.marker {
  position: absolute; bottom: 16px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #fff;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--mc, var(--open)); transition: transform .1s; z-index: 2;
}
.marker:hover, .marker.active { transform: scale(1.22); z-index: 3; }
.ctl-row { display: flex; align-items: center; gap: 2px; }
.timecode { font: 500 12.5px var(--mono); color: var(--muted); margin: 0 10px 0 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.timecode b { color: var(--text); font-weight: 500; }
.ctl-hints { display: flex; gap: 12px; align-items: center; color: var(--faint); font-size: 11.5px; margin-right: 10px; white-space: nowrap; }
.speed-btn { height: 28px; min-width: 40px; padding: 0 8px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); font: 500 12px var(--mono); }
.speed-btn:hover { background: var(--surface-3); color: var(--text); }

.side { border-left: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.side-head { display: flex; align-items: center; gap: 2px; padding: 0 10px; height: 46px; border-bottom: 1px solid var(--line); flex: none; }
.tab { border: 0; background: transparent; height: 30px; padding: 0 10px; border-radius: 7px; color: var(--muted); font-weight: 500; display: flex; gap: 7px; align-items: center; font-size: 13px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); background: var(--surface-3); }
.tab .count { font: 500 11px var(--mono); color: var(--muted); }
.side-tools { display: flex; align-items: center; gap: 8px; padding: 10px 14px; flex: none; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: transparent; height: 24px; padding: 0 10px; border-radius: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.seg button.on { background: var(--surface-3); color: var(--text); }
.notes { flex: 1; overflow-y: auto; padding: 2px 8px 10px; }
.note { padding: 11px 10px 9px; border-radius: 10px; cursor: pointer; display: grid; grid-template-columns: 28px 1fr; gap: 10px; position: relative; transition: background .1s; }
.note + .note { margin-top: 2px; }
.note:hover { background: var(--surface-2); }
.note.active { background: var(--surface-3); box-shadow: inset 2px 0 0 var(--accent); }
.note.resolved .note-body, .note.addressed .note-body { color: var(--muted); }
.note-head { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); min-height: 20px; }
.note-head b { color: var(--text); font-weight: 600; font-size: 13px; }
.tcchip { font: 500 11px var(--mono); color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.note-body { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.note-foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.note-foot:empty { display: none; }
.note .acts { position: absolute; top: 7px; right: 7px; display: flex; gap: 1px; opacity: 0; background: var(--surface-3); border-radius: 7px; padding: 1px; transition: opacity .1s; }
.note:hover .acts { opacity: 1; }
.empty { padding: 48px 28px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .ico { width: 40px; height: 40px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); margin-bottom: 12px; }
.empty b { color: var(--text-2); display: block; font-weight: 600; margin-bottom: 2px; }

.sendbar { margin: 0 12px 10px; padding: 10px 10px 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: 13px; flex: none; }
.sendbar.claude { border-color: rgba(179, 152, 255, .3); background: rgba(179, 152, 255, .06); }
.sendbar .grow { flex: 1; min-width: 0; }
.sendbar .sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer { padding: 0 12px 12px; flex: none; }
.composer-box { border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); transition: border-color .12s, box-shadow .12s; }
.composer-box:focus-within { border-color: rgba(123, 140, 255, .55); box-shadow: 0 0 0 3px rgba(123, 140, 255, .12); }
.composer textarea { width: 100%; border: 0; background: transparent; resize: none; padding: 11px 12px 4px; min-height: 46px; max-height: 160px; outline: none; display: block; }
.composer textarea::placeholder { color: var(--faint); }
.composer-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px 10px; }
.composer-row .tcchip { cursor: pointer; }
.pin-hint { color: var(--faint); font-size: 11.5px; }

/* claude log */
.jobs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.job { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; flex: none; }
.job-head { display: flex; align-items: center; gap: 10px; padding: 11px 12px; }
.job-head .title { font-weight: 600; }
.job-head .sub { color: var(--muted); font-size: 12px; }
.log { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 7px; max-height: 46vh; overflow-y: auto; overflow-x: hidden; font-size: 13px; border-top: 1px solid var(--line); }
.log .ev-tool { font: 11.5px/1.5 var(--mono); color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 10px; border-left: 2px solid var(--line-2); }
.log .ev-say, .summary { white-space: pre-wrap; overflow-wrap: anywhere; }
.log .ev-error { color: var(--danger); white-space: pre-wrap; overflow-wrap: anywhere; }
.log .ev-done { color: var(--done); font-weight: 600; }
.log .ev-info { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.summary { padding: 10px 12px 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .62); display: grid; place-items: center; z-index: 90; padding: 16px; backdrop-filter: blur(3px); animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 480px; max-width: 100%; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 22px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); animation: pop .15s ease-out; }
.modal h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.modal .lead { color: var(--muted); margin: 0 0 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 11px; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .field textarea:focus { border-color: rgba(123, 140, 255, .55); box-shadow: 0 0 0 3px rgba(123, 140, 255, .12); }
.field .hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { font: 12.5px var(--mono); color: var(--text-2); }
.notice { display: flex; gap: 10px; padding: 10px 12px; border-radius: 9px; background: var(--surface-3); color: var(--text-2); font-size: 12.5px; margin-top: 14px; }
.notice svg.i { margin-top: 2px; color: var(--muted); }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text) !important; }
.toggle input { width: 34px; height: 20px; appearance: none; background: #2f2f37; border-radius: 99px; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.toggle input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: left .15s; }
.toggle input:checked { background: var(--accent-strong); }
.toggle input:checked::after { left: 16px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.progress { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: 14px; }
.progress div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: #1d1d23; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 10px 9px 14px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); animation: rise .18s ease-out; font-size: 13px; }
.toast.err { border-color: rgba(255, 93, 108, .45); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .modal { text-align: left; }


/* ---------- library sidebar & folders ---------- */
.lib-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - var(--topbar)); }
.lib-side { border-right: 1px solid var(--line); padding: 16px 10px; position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.lib-layout .library { margin: 0; max-width: 1280px; width: 100%; }
.side-item {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 7px; border: 0; background: transparent;
  color: var(--text-2); font-size: 13px; font-weight: 500; width: 100%; text-align: left; transition: background .1s, color .1s, box-shadow .1s;
}
.side-item svg.i { color: var(--muted); }
.side-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item .n { font: 500 11.5px var(--mono); color: var(--faint); }
.side-item:hover { background: var(--surface-2); color: var(--text); }
.side-item.on { background: var(--surface-3); color: var(--text); }
.side-item.on svg.i { color: var(--accent); }
.side-item.add { color: var(--muted); margin-top: 2px; }
.side-item.add:hover svg.i { color: var(--text); }
body.moving .side-item[data-drop] { box-shadow: inset 0 0 0 1px var(--line-2); }
.side-item.drop { background: var(--accent-soft) !important; box-shadow: inset 0 0 0 1px var(--accent) !important; color: var(--text); }
.side-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 18px 10px 6px; }
.folder-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.folder-tag svg.i { width: 12px; height: 12px; }
.folder-pick { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; }
.folder-pick button { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; border: 0; background: transparent; text-align: left; color: var(--text-2); font-size: 13px; }
.folder-pick button:hover { background: var(--hover); color: var(--text); }
.folder-pick button.on { background: var(--surface-3); color: var(--text); }
.folder-pick button.add { color: var(--muted); }
.card[draggable="true"] { -webkit-user-drag: element; }
@media (max-width: 900px) {
  .lib-layout { grid-template-columns: 1fr; }
  .lib-side { position: static; height: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; gap: 6px; }
  .side-label { display: none; }
  .side-item { width: auto; flex: none; height: 30px; border: 1px solid var(--line); border-radius: 99px; padding: 0 12px; }
  .side-item .name { overflow: visible; }
}

/* ---------- comments: ranges, frames, threads, mentions ---------- */
#ranges { position: absolute; inset: 0; }
.range-bar { position: absolute; top: 0; bottom: 0; border-radius: 4px; opacity: .55; }
.pin-range { position: absolute; top: -2px; bottom: -2px; border-radius: 4px; background: var(--accent); opacity: .6; }
.range-btn { height: 22px; padding: 0 8px; border-radius: 6px; border: 1px dashed var(--line-2); background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.range-btn:hover { color: var(--text); border-color: var(--muted); }
.tcchip.pinned { box-shadow: inset 0 0 0 1px rgba(123, 140, 255, .5); }
#endTc { cursor: pointer; }
#endTc .x { margin-left: 4px; opacity: .7; }
.note-frame { display: inline-block; position: relative; margin-top: 8px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #000; cursor: zoom-in; line-height: 0; box-shadow: 0 0 0 1px var(--line-2); }
.note-frame img { max-width: 132px; max-height: 96px; display: block; }
.note-frame span { position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; background: rgba(0,0,0,.7); color: #fff; }
.note-frame span svg.i { width: 11px; height: 11px; }
.link-btn { border: 0; background: transparent; padding: 0; color: var(--muted); font-size: 12px; font-weight: 500; }
.link-btn:hover { color: var(--text); }
.thread { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.reply { display: grid; grid-template-columns: 24px 1fr; gap: 8px; position: relative; }
.reply .note-head b { font-size: 12.5px; }
.reply .note-body { font-size: 13px; }
.reply-del { opacity: 0; margin-left: auto; }
.reply:hover .reply-del { opacity: 1; }
.avatar.claude-av { background: linear-gradient(135deg, #8b7bff, #5a8dff); }
.avatar.claude-av svg.i { width: 13px; height: 13px; stroke: #fff; }
.reply-box { display: flex; gap: 6px; align-items: flex-end; }
.reply-box textarea { flex: 1; min-height: 32px; max-height: 120px; resize: none; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); padding: 6px 9px; outline: none; font-size: 13px; }
.reply-box textarea:focus { border-color: rgba(123, 140, 255, .55); }
.mention { color: var(--accent); font-weight: 500; }
.mention-box { position: fixed; z-index: 95; min-width: 200px; padding: 4px; border-radius: 10px; background: #1a1a1f; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.mention-box button { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); font-size: 13px; text-align: left; }
.mention-box button.on, .mention-box button:hover { background: var(--hover); color: var(--text); }
.mention-box .avatar { width: 20px; height: 20px; font-size: 9.5px; }
.chip.question { color: var(--question); background: rgba(255, 159, 90, .12); }
.chip.question svg.i { width: 12px; height: 12px; }
.chip.client { color: var(--client); background: rgba(90, 200, 250, .12); height: 18px; font-size: 11px; }
.note.question { box-shadow: inset 2px 0 0 var(--question); }
.note.pending { box-shadow: inset 2px 0 0 var(--client); }
.sendbar.question { border-color: rgba(255, 159, 90, .3); background: rgba(255, 159, 90, .06); }
.sendbar > svg.i { color: var(--muted); }
.sendbar.question > svg.i { color: var(--question); }
.view-only { margin: 0 12px 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; display: flex; gap: 8px; align-items: center; }

/* automatic checks */
.qc-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); background: transparent; font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.qc-btn svg.i { width: 14px; height: 14px; }
.qc-btn.ok { color: var(--done); }
.qc-btn.warn { color: var(--open); border-color: rgba(242, 184, 75, .35); }
.qc-btn:hover { background: var(--surface-2); }
.qc-btn .dot { width: 5px; height: 5px; box-shadow: none; }
.qc-list { display: flex; flex-direction: column; gap: 2px; }
.qc-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 0; background: transparent; text-align: left; color: var(--text-2); font-size: 13px; }
.qc-row span:first-of-type { flex: 1; }
.qc-row[data-t]:hover { background: var(--hover); cursor: pointer; }
.qc-row.warn svg.i { color: var(--open); }
.qc-row.ok svg.i { color: var(--done); }
.qc-row.info svg.i { color: var(--muted); }

/* team, settings, sign-in */
.list { display: flex; flex-direction: column; gap: 2px; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.auth-card { width: 400px; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) { .ctl-hints { display: none; } }
@media (max-width: 900px) {
  .library { padding: 20px 16px 48px; }
  .search { display: none; }
  .status-pill .label, .me-btn .label, .hide-sm { display: none; }
  .crumb-title { max-width: 40vw; }
  .page-head { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .topbar { gap: 4px; padding: 0 8px 0 10px; }
  .topbar .status-pill, .topbar .crumb-sep { display: none; }
  .crumb-title { flex: 1 1 auto; max-width: none; margin-left: 6px; }
  .topbar .crumb-title ~ .spacer { display: none; }
  #verSel { max-width: 86px; padding-right: 22px; background-position: right 7px center; }
  #shareBtn { padding: 0 8px; }
}

/* ---- drawing tools ---- */
.draw-tools { flex-wrap: wrap; justify-content: center; max-width: calc(100% - 20px); }
.draw-tools .tool.on { background: var(--accent-soft); color: #fff; box-shadow: inset 0 0 0 1px rgba(123, 140, 255, .5); }
.size-dot { width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; display: grid; place-items: center; }
.size-dot span { width: var(--d); height: var(--d); border-radius: 50%; background: var(--text-2); }
.size-dot:hover { background: var(--surface-3); }
.size-dot.on { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.size-dot.on span { background: #fff; }
.draw-hint { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 5; pointer-events: none; padding: 5px 10px; border-radius: 99px; font-size: 12px; color: #fff; background: rgba(0, 0, 0, .62); white-space: nowrap; }

/* ---- auto-send pause ---- */
.sendbar.paused { border-color: rgba(255, 214, 10, .28); background: rgba(255, 214, 10, .05); }
.sendbar.paused .sub { white-space: normal; }
.sendbar .pause-ico { color: #ffd60a; display: grid; place-items: center; flex: none; }
.sendbar .btn svg.i { width: 13px; height: 13px; }

/* ---- attachments ---- */
.composer-box.drop, .reply-wrap.drop { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--accent-soft); }
.reply-wrap { border-radius: 8px; transition: background .12s, box-shadow .12s; }
.att-tray { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 10px 4px; }
.reply-wrap .att-tray { padding: 0 0 6px; }
.att-chip { position: relative; display: flex; align-items: center; gap: 7px; max-width: 100%; height: 34px; padding: 0 4px 0 4px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12px; overflow: hidden; }
.att-chip img { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; flex: none; }
.att-chip.err { border-color: rgba(255, 93, 108, .5); }
.att-chip.err .att-meta { color: var(--danger); }
.att-ico { width: 26px; height: 26px; border-radius: 5px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.att-ico svg.i { width: 14px; height: 14px; }
.att-name { min-width: 0; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.att-meta { color: var(--muted); font-size: 11px; flex: none; font-variant-numeric: tabular-nums; }
.att-x { width: 20px; height: 20px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); display: grid; place-items: center; flex: none; }
.att-x:hover { background: var(--surface-3); color: var(--text); }
.att-x svg.i { width: 12px; height: 12px; }
.att-prog { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); transition: width .15s; }
.note-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.att-thumb { padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #000; line-height: 0; cursor: zoom-in; box-shadow: 0 0 0 1px var(--line-2); }
.att-thumb img { height: 64px; max-width: 120px; object-fit: cover; display: block; }
.att-file { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 9px 0 4px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12px; color: var(--text-2); text-decoration: none; max-width: 100%; }
.att-file:hover { border-color: var(--accent); color: var(--text); }
.reply-box .icon-btn { margin-bottom: 2px; }
.sendbar.paused { flex-wrap: wrap; row-gap: 8px; }
.sendbar.paused .grow { flex-basis: calc(100% - 30px); }
.sendbar.paused .btn:first-of-type { margin-left: auto; }

/* =====================================================================
   Phones, iPads and foldables (Duo folded = narrow phone, open = near-square)
   The review page always fits the screen: the video stays put, comments
   scroll on their own, and the comment box stays at the bottom.
   ===================================================================== */
.review { height: calc(100vh - var(--topbar)); height: calc(100dvh - var(--topbar)); }
.lib-layout { min-height: calc(100dvh - var(--topbar)); }
.crumb { white-space: nowrap; }
.lib-side { scrollbar-width: none; }
.lib-side::-webkit-scrollbar { display: none; }
.viewer { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* Mid-size landscape (iPad landscape, Duo open sideways, small laptops) */
@media (max-width: 1180px) and (min-width: 900px) { .review { grid-template-columns: minmax(0, 1fr) 340px; } }

/* Portrait screens under 900px wide and every narrow screen: video on top, comments below */
@media (max-width: 899px) and (orientation: portrait), (max-width: 639px) {
  .review { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  /* Sized to the video's own shape (--ar is set from the video), never more than ~half the screen */
  .viewer { flex: none; height: min(calc((100vw - 16px) / var(--ar, 1.78) + 16px), 50vh); height: min(calc((100vw - 16px) / var(--ar, 1.78) + 16px), 50dvh); min-height: 160px; }
  .viewer .pane { inset: 8px; }
  .viewer.side .pane.a { right: calc(50% + 3px); }
  .viewer.side .pane.b { left: calc(50% + 3px); }
  .cmp-bar { bottom: 6px; }
  .side { border-left: 0; border-top: 1px solid var(--line); min-height: 0; }
}
/* Phones in portrait (incl. a folded Duo): a little less video so there's room to read comments */
@media (max-width: 599px) and (orientation: portrait) {
  .viewer { height: min(calc((100vw - 12px) / var(--ar, 1.78) + 12px), 42vh); height: min(calc((100vw - 12px) / var(--ar, 1.78) + 12px), 42dvh); }
  .viewer .pane { inset: 6px; }
}
/* Phones on their side: comments stay on the right, narrower */
@media (max-width: 899px) and (min-width: 640px) and (orientation: landscape) {
  .review { grid-template-columns: minmax(0, 1fr) 300px; }
  .viewer .pane { inset: 6px 8px; }
}
/* Short screens (phones on their side): tighter chrome */
@media (max-height: 520px) {
  :root { --topbar: 44px; }
  .controls { padding: 2px 10px 4px; }
  .scrub { height: 30px; }
  .side-head { height: 38px; }
  .side-tools { padding: 6px 10px; }
  .composer textarea { min-height: 36px; padding-top: 8px; }
  .composer-row { padding: 4px 6px 6px 8px; }
  .sendbar { margin: 0 8px 6px; padding: 6px 8px; }
}

/* Narrow side panels and phones: compact comments column */
@media (max-width: 1180px), (max-height: 520px) {
  .composer { padding: 0 8px 8px; }
}
@media (max-width: 599px) {
  .side-head { height: 42px; }
  .side-tools { padding: 6px 10px; }
  .notes { padding: 2px 4px 8px; }
  .composer-row { gap: 4px; }
  .controls { padding: 2px 8px 6px; }
  .timecode { font-size: 11px; margin: 0 4px; }
  .ctl-row { gap: 0; }
}
@media (max-width: 420px) {
  #prevBtn, #nextBtn { display: none; }
  .timecode .tc-dur { display: none; }
}

/* Respect the notch / home bar */
.topbar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
.composer, .view-only { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
.controls { padding-left: max(8px, env(safe-area-inset-left)); }
.side { padding-right: env(safe-area-inset-right); }
.library { padding-bottom: max(48px, env(safe-area-inset-bottom)); }

/* Touch screens: no hover, bigger targets, no zoom-on-focus in iOS Safari */
@media (hover: none) {
  .note .acts, .reply-del { opacity: 1; }
  .note .acts { position: static; float: right; margin: -2px -2px 0 6px; background: transparent; }
  .ctl-hints, .scrub-hover { display: none !important; }
  .scrub-track { height: 6px; bottom: 7px; }
  .scrub-head { width: 16px; height: 16px; margin-left: -8px; bottom: 2px; }
}
@media (pointer: coarse) {
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn.sm { width: 32px; height: 32px; }
  .btn.sm { height: 32px; }
  .swatch { width: 26px; height: 26px; }
  .size-dot { width: 32px; height: 32px; }
  .att-x { width: 28px; height: 28px; }
  input, textarea, select, .input { font-size: 16px !important; }
  .marker { width: 22px; height: 22px; margin-left: -11px; }
}

/* Phones: give the comment list as much room as possible */
@media (max-width: 599px) {
  .topbar .dl-member { display: none; }
  #verSel { max-width: 74px; }
  .qc-btn { padding: 0 7px; }
  .crumb-title { min-width: 48px; }
  .side-tools { padding: 4px 8px; }
  .side-tools .seg button { height: 26px; padding: 0 9px; font-size: 12px; }
  .sendbar { margin: 0 6px 6px; padding: 7px 8px 7px 10px; font-size: 12.5px; }
  .sendbar.question .sub, .sendbar:not(.paused):not(.claude) > svg.i + .grow .sub { display: none; }
  .composer textarea { min-height: 40px; padding: 9px 11px 2px; }
}
@media (max-width: 599px) {
  .side { position: relative; }
  .side-tools { position: absolute; top: 7px; right: 6px; padding: 0; z-index: 2; }
  .side-tools #openCount, .side-tools .spacer { display: none; }
  .side-tools .seg button { height: 26px; padding: 0 7px; font-size: 11.5px; }
  .side-head .tab { padding: 0 8px; }
}
@media (max-width: 379px) {
  .side-tools { position: static; padding: 4px 8px; }
}
.range-btn, .composer-row .tcchip { white-space: nowrap; }
.composer-row { flex-wrap: wrap; row-gap: 4px; }
@media (max-width: 899px) and (min-width: 640px) and (orientation: landscape) { .review { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-height: 520px) {
  .sendbar .sub { display: none; }
  .sendbar.paused .sub { display: block; }
  .composer-row .tcchip { font-size: 10.5px; }
  .composer-row .btn.primary { padding: 0 10px; }
}
@media (max-width: 900px) { .lib-layout { align-content: start; } }
@media (max-width: 599px) { .grid { gap: 20px 14px; } .page-head h1 { font-size: 22px; } }
@media (max-width: 599px) {
  .draw-tools { left: 6px; right: 6px; top: 6px; transform: none; max-width: none; gap: 4px; padding: 5px 6px; justify-content: center; background: rgba(22, 22, 26, .88); }
  .draw-tools .sep { display: none; }
  .draw-hint { bottom: 8px; font-size: 11.5px; }
}
@media (max-width: 1180px) and (min-width: 900px) { .review { grid-template-columns: minmax(0, 1fr) 356px; } }

/* ----- voice notes ----- */
.icon-btn.on { color: var(--accent); background: var(--accent-soft); }
.mic-btn.rec, .mic-btn.rec:hover { color: #fff; background: var(--danger); box-shadow: 0 0 0 calc(2px + var(--lvl, 0) * 7px) rgba(255, 93, 108, .26); transition: box-shadow .08s; }
.rec-strip { display: flex; align-items: center; gap: 8px; padding: 8px 8px 2px 12px; font-size: 12.5px; color: var(--text-2); }
.reply-wrap .rec-strip { padding: 6px 0 0; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); animation: pulse 1.1s ease-in-out infinite; flex: none; }
.rec-time { font: 500 12px var(--mono); color: var(--text); font-variant-numeric: tabular-nums; min-width: 30px; }
.rec-bars { display: inline-flex; gap: 2px; align-items: center; height: 16px; }
.rec-bars i { width: 3px; border-radius: 2px; background: var(--danger); height: calc(3px + var(--lvl, 0) * 13px); transition: height .07s; }
.rec-bars i:nth-child(1), .rec-bars i:nth-child(5) { height: calc(3px + var(--lvl, 0) * 6px); }
.rec-bars i:nth-child(2), .rec-bars i:nth-child(4) { height: calc(3px + var(--lvl, 0) * 10px); }
.rec-label { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-strip .spacer { flex: 1; }

/* ----- chat with Claude ----- */
.chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 16px; }
.cmsg { display: flex; gap: 10px; align-items: flex-start; animation: rise .18s ease-out; }
.cmsg > .avatar { flex: none; margin-top: 1px; }
.cbody { min-width: 0; flex: 1; }
.cbody .note-head { margin-bottom: 3px; }
.ctext { font-size: 13.5px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.ctext p { margin: 0 0 6px; }
.ctext p:last-child, .ctext ul:last-child, .ctext ol:last-child { margin-bottom: 0; }
.ctext ul, .ctext ol { margin: 2px 0 6px; padding-left: 18px; }
.ctext li { margin: 2px 0; }
.ctext code { font: 12px var(--mono); background: var(--surface-3); padding: 1px 4px; border-radius: 4px; }
.cmsg.claude .ctext, .typing-dots { background: var(--surface-2); border: 1px solid var(--line); padding: 8px 11px; border-radius: 4px 12px 12px 12px; display: inline-block; max-width: 100%; }
.cmsg.info { align-self: center; font-size: 12px; color: var(--muted); text-align: center; max-width: 92%; line-height: 1.45; }
.cctx { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cframe { border: 0; padding: 0; background: none; border-radius: 6px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px var(--line); }
.cframe img { height: 42px; display: block; }
.cctx .tcchip { border: 0; cursor: pointer; }
.cvoice { display: inline-flex; color: var(--faint); }
.cvoice svg.i { width: 12px; height: 12px; }
.cmade { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.typing-dots { display: inline-flex; gap: 4px; padding: 11px 13px; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.csub { font-size: 12px; color: var(--muted); margin-top: 5px; overflow-wrap: anywhere; }
.chat-empty { margin: auto 0; padding: 32px 18px; }
.chat-empty svg.i { vertical-align: -2px; width: 14px; height: 14px; }
.chat-empty .ico svg.i { width: 18px; height: 18px; vertical-align: 0; }
.chat-sugg { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 16px; }
.chip-btn { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 5px 11px; font-size: 12px; }
.chip-btn:hover { color: var(--text); border-color: var(--accent); }
#chatAt { border: 0; cursor: pointer; white-space: nowrap; }
#chatAt.off { color: var(--faint); background: var(--surface-3); text-decoration: line-through; }
@media (max-width: 599px) {
  .side-head .tab svg.i { display: none; }
  .side-head .tab { gap: 5px; }
  .chat-list { padding: 10px 8px 8px; gap: 14px; }
}
.cstop { margin-top: 4px; font-size: 11.5px; }

/* ----- auto-send timer: obvious to first-time reviewers ----- */
.sendbar.timer { position: relative; overflow: hidden; flex-wrap: wrap; row-gap: 8px; }
.sendbar.timer .grow { flex: 1 1 160px; }
.sendbar.timer .sb-actions { display: flex; gap: 6px; margin-left: auto; }
.sendbar .sb-head { font-weight: 600; font-size: 13.5px; }
.sendbar.timer .sub { white-space: normal; line-height: 1.4; margin-top: 1px; }
.sendbar.timing { border-color: rgba(123, 140, 255, .38); background: rgba(123, 140, 255, .07); }
.sb-time { font: 600 15px var(--mono); color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.sb-ring { position: relative; width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: var(--accent); }
.sb-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.sb-ring circle { fill: none; stroke-width: 3; }
.sb-ring .bg { stroke: rgba(123, 140, 255, .16); }
.sb-ring .fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset 1s linear; }
.sb-ring > svg.i { width: 15px; height: 15px; position: relative; }
.sb-ring.idle { color: var(--muted); border-radius: 50%; background: var(--surface-3); width: 30px; height: 30px; }
.sb-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(123, 140, 255, .12); }
.sb-progress i { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }
.sendbar.timing.soon { border-color: rgba(255, 159, 90, .45); background: rgba(255, 159, 90, .07); }
.sendbar.timing.soon .sb-time, .sendbar.timing.soon .sb-ring { color: var(--question); }
.sendbar.timing.soon .sb-ring .fg, .sendbar.timing.soon .sb-progress i { stroke: var(--question); background: var(--question); }
.empty-tip { display: flex; gap: 7px; align-items: flex-start; justify-content: center; margin: 14px auto 0; max-width: 300px; padding: 8px 11px; border-radius: 9px; background: var(--accent-soft); color: var(--text-2); font-size: 12.5px; text-align: left; }
.empty-tip svg.i { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--accent); }
/* Keep the timer readable when screens are short or narrow (these used to hide the sub-line). */
@media (max-height: 520px) { .sendbar.timer .sub { display: none; } .sendbar.timer.paused .sub { display: block; } }
@media (max-width: 599px) { .sendbar.timer .sub { font-size: 11.5px; } .sb-ring { width: 30px; height: 30px; } }

/* Connect my computer: numbered steps */
.steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 10px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.steps li::marker { color: var(--accent); font-weight: 600; }
.steps .field { margin: 8px 0 0; }
.steps .field label:empty { display: none; }

/* ----- voice conversation with Claude ----- */
.talk-btn { color: #fff; background: linear-gradient(135deg, #8b7bff, #5a8dff); border-color: transparent; }
.talk-btn:hover { filter: brightness(1.08); color: #fff; }
.talk-btn svg.i { width: 13px; height: 13px; }
.vc { flex: none; display: flex; align-items: center; gap: 14px; margin: 0 12px 12px; padding: 14px 14px 14px 16px; border-radius: 16px;
  background: radial-gradient(120% 140% at 0% 50%, rgba(123, 140, 255, .16), rgba(123, 140, 255, .04) 60%), var(--surface-2); border: 1px solid rgba(123, 140, 255, .32);
  padding-bottom: max(14px, env(safe-area-inset-bottom)); flex-wrap: wrap; }
.vc-orb { --lvl: 0; position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0; flex: none; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #a99cff, #5a6dff 60%, #3d48c9); box-shadow: 0 0 0 calc(var(--lvl) * 14px) rgba(123, 140, 255, .22), 0 6px 22px rgba(90, 109, 255, .35);
  transition: box-shadow .08s linear, transform .2s; }
.vc-core { color: #fff; display: grid; place-items: center; }
.vc-core svg.i { width: 22px; height: 22px; stroke: #fff; }
.vc[data-state="hearing"] .vc-orb { transform: scale(1.06); }
.vc[data-state="thinking"] .vc-orb, .vc[data-state="transcribing"] .vc-orb { animation: vcThink 1.1s ease-in-out infinite; box-shadow: 0 6px 22px rgba(90, 109, 255, .35); }
.vc[data-state="speaking"] .vc-orb { background: radial-gradient(circle at 35% 30%, #c3b5ff, #8b6dff 60%, #5a3dc9); animation: vcSpeak 1.4s ease-in-out infinite; }
.vc[data-state="muted"] .vc-orb { background: var(--surface-3); box-shadow: none; }
.vc[data-state="muted"] .vc-core svg.i { stroke: var(--muted); }
@keyframes vcThink { 50% { transform: scale(.9); opacity: .75; } }
@keyframes vcSpeak { 0%, 100% { box-shadow: 0 0 0 4px rgba(139, 109, 255, .25), 0 6px 22px rgba(90, 109, 255, .35); } 50% { box-shadow: 0 0 0 13px rgba(139, 109, 255, .08), 0 6px 22px rgba(90, 109, 255, .35); } }
.vc-text { flex: 1 1 150px; min-width: 0; }
.vc-state { font-weight: 600; font-size: 15px; }
.vc-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; overflow-wrap: anywhere; }
.vc-actions { display: flex; gap: 6px; margin-left: auto; }
.vc-actions svg.i { width: 13px; height: 13px; }
@media (max-width: 1180px), (max-height: 520px) { .vc { margin: 0 8px 8px; } }
