/* WAV v3 web interface — tokens and layout from the Claude Design canvases
   ("Web - WAV Library / Meeting Console / Ask / Settings / Dictation HUD"
   + "WAV Design System"). Strictly monochrome; status is typography; the
   chromatic wave is the single sanctioned color — at most one per view. */

:root {
  --bg: #0A0A0B; --bg2: #111113; --panel: #141416;
  --line: rgba(255, 255, 255, .08);
  --txt: #F4F4F5; --txt2: #A1A1AA; --txt3: #5E5E66;
  --hover: rgba(255, 255, 255, .04);
}
[data-theme="light"] {
  --bg: #FFFFFF; --bg2: #FAFAFA; --panel: #F5F5F6;
  --line: rgba(0, 0, 0, .09);
  --txt: #141416; --txt2: #55555E; --txt3: #9A9AA2;
  --hover: rgba(0, 0, 0, .03);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  color: var(--txt);
  font-family: Inter, -apple-system, sans-serif;
  font-size: 14px;
}
a { color: var(--txt); text-decoration: none; }
input, textarea { font-family: Inter, sans-serif; color: var(--txt); }
input::placeholder, textarea::placeholder { color: var(--txt3); }
textarea { outline: none; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

@keyframes wavhue { to { filter: hue-rotate(360deg); } }
@keyframes wavpulse { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes procpulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hue { animation: wavhue 9s linear infinite; }
.hue7 { animation: wavhue 7s linear infinite; }
.pulse { animation: procpulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .hue, .hue7, .pulse, .wavebar { animation: none !important; }
}

#app { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  height: 56px; display: flex; align-items: center; gap: 16px;
  padding: 0 20px; border-bottom: 1px solid var(--line); flex-shrink: 0;
  position: relative;
}
/* True viewport-centered slot (the flex row's sides differ in width, so
   margin:auto inside the flow lands left of center). Clamped so it never
   collides with the brand or the right-side nav. */
.topbar-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: clamp(180px, 32vw, 520px);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* Stroke wordmark — part of the logo; wav-logo.js repaints the stroke each
   frame with the bars' hue flow. The CSS stroke is the pre-JS/reduced-motion
   fallback. */
.brand .wav-wordmark { height: 15px; width: auto; display: block; overflow: visible; }
.brand .wav-wordmark .wav-wm-seg {
  fill: none; stroke: var(--txt); stroke-width: 7;
  stroke-linecap: round; stroke-linejoin: round;
}
.logo-bars { display: flex; align-items: flex-end; gap: 2px; height: 18px; }
.logo-bars span { width: 3px; border-radius: 2px; }
.crumb-sep { color: var(--txt3); font-size: 13px; }
.crumb { font-size: 14px; font-weight: 600; }
.crumb-meta { font-size: 11px; color: var(--txt3); }
.topnav { display: flex; align-items: center; gap: 20px; font-size: 13px; color: var(--txt2); }
.topnav a { color: var(--txt2); }
.topnav a:hover, .topnav a.on { color: var(--txt); }
.topnav a.on { font-weight: 600; }
.theme-toggle { cursor: pointer; color: var(--txt3); display: flex; background: none; border: none; padding: 0; flex-shrink: 0; }
.topbar .signin { font-size: 13px; color: var(--txt2); flex-shrink: 0; }
.topbar .signin:hover { color: var(--txt); }
.theme-toggle:hover { color: var(--txt); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--panel); flex-shrink: 0;
  border: 1px solid var(--line); display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 600; cursor: pointer;
}
.avatar:hover { border-color: var(--txt3); }

.searchbox {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg2);
  color: var(--txt3); font-size: 13px; cursor: text;
}
.searchbox:hover { border-color: var(--txt3); }
.kbd {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
}

/* ── Shell ───────────────────────────────────────────────── */
.shell { display: flex; flex: 1; min-height: 0; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ── Sidebar (Library) ───────────────────────────────────── */
.sidebar {
  width: 236px; flex-shrink: 0; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 16px 12px; gap: 2px;
}
.workspace {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.workspace:hover { background: var(--hover); }
.navrow {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--txt2);
}
.navrow:hover { background: var(--hover); }
.navrow.on { background: var(--hover); color: var(--txt); font-weight: 600; }
.navrow .count { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--txt3); }
.navrow .glyph { color: var(--txt3); font-size: 11px; }
.navrow.droptarget { outline: 1px dashed var(--txt3); }
.navrow.depth1 { padding-left: 28px; }
.side-label {
  font-size: 10px; letter-spacing: .12em; font-weight: 600;
  color: var(--txt3); padding: 16px 10px 6px;
}
.quota {
  margin-top: auto; padding: 12px 10px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; cursor: pointer;
}
.quota-head { display: flex; justify-content: space-between; font-size: 11px; }
.quota-head b { font-weight: 600; letter-spacing: .1em; color: var(--txt2); }
.quota-head span { font-family: 'JetBrains Mono', monospace; color: var(--txt3); }
.meter { height: 2px; background: var(--line); border-radius: 1px; }
.meter > div { height: 2px; background: var(--txt2); border-radius: 1px; }
.quota-foot { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--txt3); }

/* ── Library list ────────────────────────────────────────── */
.lib-head { padding: 28px 32px 16px; display: flex; align-items: flex-end; gap: 16px; }
.lib-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.lib-title .chev { color: var(--txt3); font-size: 13px; }
.lib-count { font-size: 13px; color: var(--txt3); margin-top: 3px; font-family: 'JetBrains Mono', monospace; }
.ask-pill {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 19px; background: var(--bg2);
  font-size: 13px; color: var(--txt2); cursor: pointer;
}
.ask-pill:hover { border-color: var(--txt3); color: var(--txt); }
.rows { flex: 1; overflow-y: auto; padding: 0 32px 32px; }
.rowitem {
  display: flex; align-items: center; gap: 16px; padding: 15px 12px;
  border-bottom: 1px solid var(--line); margin: 0 -12px; cursor: pointer;
  position: relative; color: var(--txt);
}
.rowitem:hover { background: var(--hover); }
.rowitem[draggable="true"] { cursor: grab; }
.row-title { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-summary { display: block; font-size: 13px; color: var(--txt2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { display: block; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--txt3); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-actions { display: flex; gap: 14px; font-size: 12px; color: var(--txt3); opacity: 0; }
.rowitem:hover .row-actions { opacity: 1; }
.row-actions span:hover { color: var(--txt); }
.row-status {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em;
  color: var(--txt3); width: 130px; text-align: right; flex-shrink: 0;
}
.row-status.failed { font-weight: 600; color: var(--txt); }
.row-progress { position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--line); }
.row-progress > span { display: block; height: 2px; background: var(--txt2); }
.live-bars { display: flex; align-items: center; gap: 2.5px; height: 22px; }
.live-bars span { width: 3px; height: 20px; border-radius: 2px; transform-origin: center; animation: wavpulse 1s ease-in-out infinite; }
.empty {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; color: var(--txt3);
}
.empty-bars { display: flex; align-items: flex-end; gap: 3px; height: 24px; opacity: .5; }
.empty-bars span { width: 3px; border-radius: 2px; background: var(--txt3); }

/* ── Section labels & status text ───────────────────────── */
.slabel { font-size: 11px; letter-spacing: .12em; font-weight: 600; color: var(--txt3); }
.status { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .08em; }

/* ── Console ─────────────────────────────────────────────── */
.mode-toggle { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.mode-toggle span { padding: 6px 14px; cursor: pointer; color: var(--txt3); }
.mode-toggle span.on { background: var(--panel); color: var(--txt); }
.mode-toggle span + span { border-left: 1px solid var(--line); }
.pane-head {
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.transcript-pane { flex: 1.35; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.notes-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg2); overflow-y: auto; }
.seglist { flex: 1; overflow-y: auto; padding: 20px 28px; display: flex; flex-direction: column; gap: 4px; }
.seg {
  display: flex; gap: 14px; padding: 9px 12px; margin: 0 -12px;
  border-radius: 6px; position: relative; border-left: 2px solid transparent;
}
.seg:hover { background: var(--hover); }
.seg.active { background: var(--hover); }
.seg-edge {
  position: absolute; left: -2px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, hsl(0, 80%, 60%), hsl(120, 70%, 55%), hsl(260, 75%, 62%));
  animation: wavhue 7s linear infinite;
}
.seg-ts {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--txt3);
  width: 44px; flex-shrink: 0; padding-top: 3px; cursor: pointer;
}
.seg-ts:hover { color: var(--txt); }
.seg-speaker { display: block; font-size: 12px; font-weight: 600; color: var(--txt2); margin-bottom: 2px; }
.seg-text { display: block; font-size: 14px; line-height: 1.65; color: var(--txt2); }
.seg.active .seg-text { color: var(--txt); }
/* Playback follow is turn-level: the active segment lights as a whole
   (.seg.active + .seg-edge) and stays centered — no per-word highlight. */
.caret { display: inline-block; width: 8px; height: 16px; background: var(--txt2); animation: blink 1s step-end infinite; }

.speakers-panel { padding: 12px 28px; border-bottom: 1px solid var(--line); display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.spk { display: flex; align-items: center; gap: 8px; }
.spk-avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--panel);
  border: 1px solid var(--line); display: flex; align-items: center;
  justify-content: center; font-size: 10px; font-weight: 600;
}
.spk.unassigned .spk-avatar { border-color: var(--txt3); color: var(--txt3); }
.spk-name { font-size: 12px; font-weight: 600; }
.spk.unassigned .spk-name { color: var(--txt2); }
.spk-share { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--txt3); }
.assign-chip {
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  border: 1px dashed var(--txt3); border-radius: 10px; padding: 2px 8px;
  cursor: pointer; color: var(--txt2);
}
.assign-chip:hover { color: var(--txt); border-style: solid; }
.retag { font-size: 10px; font-weight: 600; letter-spacing: .08em; color: var(--txt3); cursor: pointer; opacity: 0; }
.spk:hover .retag { opacity: 1; }
.retag:hover { color: var(--txt); }
.assign-bar {
  padding: 12px 28px; border-bottom: 1px solid var(--line); background: var(--panel);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.cand-chip {
  display: flex; align-items: center; gap: 7px; font-size: 12px;
  border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; cursor: pointer;
}
.cand-chip:hover { border-color: var(--txt3); }
.cand-chip .match { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--txt3); }
.sample-chip {
  display: flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace;
  font-size: 11px; border: 1px solid var(--txt3); border-radius: 14px;
  padding: 4px 12px; cursor: pointer;
}
.sample-chip:hover { background: var(--txt); color: var(--bg); }
.assign-note { padding: 10px 28px; border-bottom: 1px solid var(--line); font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--txt2); }
.assign-note a { text-decoration: underline; }

.tpl-chip { font-size: 11px; padding: 4px 10px; border-radius: 12px; cursor: pointer; border: 1px solid var(--line); color: var(--txt3); }
.tpl-chip:hover { color: var(--txt); }
.tpl-chip.on { border-color: var(--txt3); color: var(--txt); font-weight: 600; }
.tact { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--txt3); cursor: pointer; background: none; border: none; padding: 0; }
.tact:hover { color: var(--txt); }
.pill-cta {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  border: 1px solid var(--txt); border-radius: 14px; padding: 4px 12px; cursor: pointer;
}
.pill-cta:hover { background: var(--txt); color: var(--bg); }

.noteblock { margin-bottom: 16px; }
.noteline { font-size: 13.5px; line-height: 1.7; display: flex; gap: 8px; }
.noteline .glyph { color: var(--txt3); }
.noteline.yours span:last-child { color: var(--txt2); font-style: italic; }
.note-input {
  width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); font-size: 12.5px; padding: 0 12px; outline: none; margin: 4px 0 10px;
}
.actrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.actcheck {
  width: 15px; height: 15px; border: 1.5px solid var(--txt3); border-radius: 4px;
  flex-shrink: 0; cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 10px; color: var(--txt);
}
.act-draft { font-size: 11px; font-weight: 600; color: var(--txt3); cursor: pointer; opacity: 0; white-space: nowrap; }
.actrow:hover .act-draft { opacity: 1; }
.act-draft:hover { color: var(--txt); }
.draft-card { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }

.mini-ask-q {
  align-self: flex-end; max-width: 85%; font-size: 13px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px;
}
.cite-chip {
  display: inline-flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--txt2); border: 1px solid var(--line);
  border-radius: 12px; padding: 3px 10px; cursor: pointer;
}
.cite-chip:hover { border-color: var(--txt3); color: var(--txt); }
.round-input {
  flex: 1; height: 34px; border: 1px solid var(--line); border-radius: 17px;
  background: var(--bg); font-size: 13px; padding: 0 14px; outline: none;
}
.round-btn {
  height: 34px; width: 34px; border: 1px solid var(--line); border-radius: 17px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--txt2); background: none; font-size: 14px; flex-shrink: 0;
}
.round-btn:hover { border-color: var(--txt3); color: var(--txt); }

.player {
  height: 88px; border-top: 1px solid var(--line); display: flex;
  align-items: center; gap: 18px; padding: 0 28px; flex-shrink: 0;
}
.skip { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--txt2); cursor: pointer; flex-shrink: 0; }
.skip:hover { color: var(--txt); }
.playbtn {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--txt);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-size: 15px; flex-shrink: 0; background: none; color: var(--txt);
}
.playbtn:hover { background: var(--txt); color: var(--bg); }
/* Canvas transport scrubber (spec 0027 port — elevenlabs/ui behavior with
   the WAV chromatic hue-flow on the played bars). */
.wavebar-strip { flex: 1; height: 40px; cursor: pointer; overflow: hidden; min-width: 0; }
.wavebar-strip canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.speed { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--txt2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; cursor: pointer; flex-shrink: 0; }
.speed:hover { color: var(--txt); }
.stop-pill {
  height: 38px; padding: 0 18px; display: flex; align-items: center;
  border: 1px solid var(--txt); border-radius: 19px; font-size: 12px;
  font-weight: 600; letter-spacing: .08em; cursor: pointer;
}
.stop-pill:hover { background: var(--txt); color: var(--bg); }
.livewave { flex: 1; display: flex; align-items: center; gap: 2.5px; height: 34px; overflow: hidden; }
.livewave span { width: 3px; flex-shrink: 0; border-radius: 2px; transform-origin: center; animation: wavpulse 1s ease-in-out infinite; }

/* ── Ask ─────────────────────────────────────────────────── */
.filters {
  width: 230px; flex-shrink: 0; border-right: 1px solid var(--line);
  padding: 20px 16px; display: flex; flex-direction: column; gap: 20px; font-size: 13px;
}
.fgroup-label { font-size: 10px; letter-spacing: .12em; font-weight: 600; color: var(--txt3); margin-bottom: 8px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { font-size: 12px; padding: 4px 11px; border-radius: 12px; cursor: pointer; border: 1px solid var(--line); color: var(--txt3); }
.fchip:hover { color: var(--txt); }
.fchip.on { border-color: var(--txt3); color: var(--txt); }
.filters-foot { margin-top: auto; font-size: 11px; color: var(--txt3); line-height: 1.6; border-top: 1px solid var(--line); padding-top: 14px; }
.ask-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.ask-scroll { flex: 1; overflow-y: auto; width: 100%; display: flex; flex-direction: column; align-items: center; }
.ask-thread { width: 100%; max-width: 720px; padding: 32px 24px; display: flex; flex-direction: column; gap: 24px; }
.ask-q { align-self: flex-end; max-width: 80%; font-size: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; }
.ask-a { font-size: 14.5px; line-height: 1.75; white-space: pre-wrap; }
.ask-scope { align-self: flex-end; font-size: 11px; color: var(--txt3); margin-top: -8px; }
.ask-callout {
  font-size: 13.5px; color: var(--txt2); border: 1px dashed var(--line);
  border-radius: 10px; padding: 12px 14px; display: flex; align-items: center;
  gap: 12px; flex-wrap: wrap;
}
/* Sources: one group per cited meeting, its moments as rows underneath. */
.src-block { display: flex; flex-direction: column; gap: 10px; }
.src-label { font-size: 10.5px; letter-spacing: .12em; color: var(--txt3); font-weight: 600; }
.src-group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.src-head {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  font-size: 13px; font-weight: 600; color: var(--txt); background: var(--bg2);
}
.src-head:hover .src-title { text-decoration: underline; }
.src-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-n { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--txt3); flex-shrink: 0; }
.src-row {
  display: flex; gap: 12px; align-items: baseline; padding: 8px 14px;
  border-top: 1px solid var(--line); color: var(--txt2); font-size: 13px;
}
.src-row:hover { background: var(--hover); color: var(--txt); }
.src-ts { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--txt3); flex-shrink: 0; }
.src-quote { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lib-nomatch { display: none; padding: 48px 20px; text-align: center; color: var(--txt3); font-size: 13px; }
.cite-card {
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; cursor: pointer; color: var(--txt);
}
.cite-card:hover { border-color: var(--txt3); background: var(--hover); }
.cite-glyph { display: flex; align-items: flex-end; gap: 1.5px; height: 12px; flex-shrink: 0; }
.cite-glyph span { width: 2px; border-radius: 1px; background: var(--txt3); }
.cite-meeting { display: block; font-size: 13px; font-weight: 600; }
.cite-quote { display: block; font-size: 12.5px; color: var(--txt2); margin-top: 2px; font-style: italic; }
.cite-ts { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--txt3); flex-shrink: 0; }
.ask-foot { width: 100%; max-width: 720px; padding: 0 24px 28px; display: flex; flex-direction: column; gap: 12px; }
.sug-chip { font-size: 12.5px; color: var(--txt2); border: 1px solid var(--line); border-radius: 14px; padding: 6px 13px; cursor: pointer; }
.sug-chip:hover { border-color: var(--txt3); color: var(--txt); }
.ask-inputbar {
  display: flex; gap: 10px; align-items: center; border: 1px solid var(--line);
  border-radius: 24px; padding: 6px 6px 6px 18px; background: var(--bg2);
}
.ask-inputbar input { flex: 1; height: 34px; border: none; background: transparent; font-size: 14px; outline: none; }
.send-btn {
  height: 34px; width: 34px; border-radius: 17px; background: var(--txt);
  color: var(--bg); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; border: none;
}

/* ── Settings ────────────────────────────────────────────── */
.set-side { width: 200px; flex-shrink: 0; border-right: 1px solid var(--line); padding: 20px 12px; display: flex; flex-direction: column; gap: 2px; }
.set-tab { padding: 8px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--txt2); }
.set-tab:hover { background: var(--hover); }
.set-tab.on { background: var(--hover); color: var(--txt); font-weight: 600; }
.set-body { flex: 1; min-width: 0; overflow-y: auto; }
.set-inner { max-width: 760px; padding: 36px 40px 64px; }
.set-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 24px; }
.set-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.set-key { width: 180px; font-size: 13px; color: var(--txt2); flex-shrink: 0; }
.chip { font-size: 12px; padding: 4px 11px; border-radius: 12px; border: 1px solid var(--line); color: var(--txt3); }
.chip.on { border-color: var(--txt3); color: var(--txt); }
.voice-dots { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.voice-dots span { width: 5px; height: 5px; border-radius: 50%; }
.voice-acts { display: flex; gap: 14px; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--txt3); opacity: 0; flex-shrink: 0; }
.voice-row:hover .voice-acts { opacity: 1; }
.voice-acts span { cursor: pointer; }
.voice-acts span:hover { color: var(--txt); }
.plan-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.plan-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.plan-row { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.plan-row:last-child { border-bottom: none; }
.pending-card { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--txt3); border-radius: 10px; display: flex; align-items: center; gap: 14px; }

/* ── Dictation HUD ───────────────────────────────────────── */
.hud-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.hud-window {
  width: 640px; max-width: calc(100vw - 48px); background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); overflow: hidden;
}
.hud-titlebar { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.hud-titlebar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.hud-field { display: flex; gap: 8px; font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.hud-field span:first-child { color: var(--txt3); width: 44px; }
.hud-mic {
  display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 22px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 26px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4); cursor: pointer;
}
.hud-mic:hover { border-color: var(--txt3); }
.hud-bars { display: flex; align-items: center; gap: 2.5px; height: 24px; }
.hud-bars span { width: 3px; border-radius: 2px; transform-origin: center; animation: wavpulse .9s ease-in-out infinite; }
.dict-chip {
  display: flex; align-items: center; gap: 7px; font-size: 11px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
  padding: 5px 12px; color: var(--txt2); animation: riseIn .3s ease both;
}
.dict-chip b { font-family: 'JetBrains Mono', monospace; font-weight: 400; color: var(--txt3); }

/* ── Mobile responsive layer (≤760px) — from the web canvases ─
   .m-only / .m-hide mirror the canvases' class contract; the
   drawer, bottom nav, pane tabs, filter strip and settings tab
   bar are the canvases' mobile-only structures. */

.m-only { display: none !important; }

/* Library: bottom-sheet nav drawer */
.drawer { position: fixed; inset: 0; z-index: 20; display: none; pointer-events: none; }
.drawer-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .25s; }
.drawer-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 72vh;
  background: var(--bg); border-top: 1px solid var(--line);
  border-radius: 16px 16px 0 0; transform: translateY(102%);
  transition: transform .3s cubic-bezier(.32, .72, 0, 1);
  display: flex; flex-direction: column; padding: 10px 12px 34px; gap: 2px;
  overflow-y: auto;
}
.drawer.open { pointer-events: auto; }
.drawer.open .drawer-back { opacity: 1; }
.drawer.open .drawer-sheet { transform: none; }
.drawer-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 2px auto 12px; flex-shrink: 0; }
.drawer .navrow { padding: 12px 10px; font-size: 14px; }
.drawer .navrow.depth1 { padding-left: 28px; }
.drawer .workspace { padding: 8px 10px; }

/* Library: fixed bottom nav */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: none;
  border-top: 1px solid var(--line); background: var(--bg);
  grid-template-columns: 1fr 1fr 1fr; align-items: center; justify-items: center;
  padding: 10px 0 24px;
}
.bottomnav .bn-label { font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--txt3); }
.bottomnav .bn-label.on { color: var(--txt); }
.bottomnav .bn-rec {
  width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--txt);
  color: var(--txt); display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}

/* Library: mobile search bar (under the topbar) */
.m-search {
  margin: 12px 16px 0; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg2);
  color: var(--txt3); font-size: 13px; flex-shrink: 0;
}
.m-search input { flex: 1; border: none; background: transparent; outline: none; font-size: 13px; }

/* Console: mobile pane tabs */
.m-tabs { border-bottom: 1px solid var(--line); flex-shrink: 0; }
.m-tabs span {
  flex: 1; text-align: center; padding: 12px 0; font-size: 11px; font-weight: 600;
  letter-spacing: .12em; color: var(--txt3); border-bottom: 2px solid transparent;
  cursor: pointer;
}
.m-tabs span.on { color: var(--txt); border-bottom-color: var(--txt); }

/* Ask: horizontal filter-chip strip */
.m-filters { gap: 6px; overflow-x: auto; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.m-filters .fchip { flex-shrink: 0; white-space: nowrap; }

/* Settings: top tab bar */
.m-settabs { gap: 20px; padding: 0 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; overflow-x: auto; }
.m-settabs span {
  padding: 12px 0; font-size: 12px; font-weight: 600; letter-spacing: .06em;
  color: var(--txt2); border-bottom: 2px solid transparent; cursor: pointer;
  white-space: nowrap;
}
.m-settabs span.on { color: var(--txt); border-bottom-color: var(--txt); }

@media (max-width: 760px) {
  .m-only { display: flex !important; }
  .topbar { gap: 10px; padding: 0 14px; }
  .m-hide, .topnav, .sidebar, .row-actions, .ask-pill, .set-side, .filters { display: none !important; }
  .m-col { flex-direction: column !important; }
  .pane-off { display: none !important; }
  .m-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .drawer { display: block; }
  .bottomnav { display: grid; }

  /* Library */
  .lib-head { padding: 18px 16px 10px; }
  .rows { padding: 0 16px 100px; }
  .row-status { width: auto; }

  /* Console: panes stack; the visible pane fills the column */
  .transcript-pane, .notes-pane { flex: 1 1 auto; border-right: none; width: 100%; }
  .transcript-pane > div, .notes-pane > div { padding-left: 16px !important; padding-right: 16px !important; }
  .transcript-pane textarea, .notes-pane textarea { padding: 16px !important; }
  .player { padding: 0 14px; gap: 10px; }

  /* Settings */
  .set-inner { padding: 24px 16px 48px; }
  .set-row { flex-wrap: wrap; }
  .set-row .set-key { width: 100%; }
  .plan-row { flex-wrap: wrap; }
  .voice-acts { opacity: 1; }
}

/* ── Unified app (the "Web - WAV App" canvas) ──────────────────────────────
   One screen: sidebar · list · detail, ⌘K search, results page, profile
   popover. Responsive contract from the canvas: .t-hide/.t-only (≤1160,
   sidebar → drawer), .r-tabs + .dpane.off (≤980, transcript ↔ notes
   tabs), .m-only/.m-hide + [data-mpane] (≤760, list ↔ detail panes). */

.topbar .app-nav { margin-left: auto; }
.sidebar { width: 216px; padding: 14px 10px; background: var(--bg2); }
.navrow { padding: 6px 10px; }
.side-label { padding: 14px 10px 6px; }
.side-foot { margin-top: auto; font-size: 10.5px; color: var(--txt3); padding: 8px 10px; line-height: 1.5; border-top: 1px solid var(--line); }

.r-list { width: 296px; flex-shrink: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.r-head { padding: 14px 16px 10px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.r-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-count { font-size: 11px; color: var(--txt3); margin-top: 1px; }
.icon-btn { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--txt3); cursor: pointer; flex-shrink: 0; background: none; }
.icon-btn:hover { color: var(--txt); border-color: var(--txt3); }
.r-rows { flex: 1; overflow-y: auto; padding: 0 0 16px; }
.r-row { display: block; padding: 13px 16px 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; border-left: 2px solid transparent; position: relative; color: var(--txt); }
.r-row:hover { background: var(--hover); }
.r-row.on { background: var(--hover); border-left-color: var(--txt); }
.r-row[draggable="true"] { cursor: grab; }
.r-row .rt { display: flex; align-items: center; gap: 8px; }
.r-row .rtitle { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-row .rsum { display: -webkit-box; font-size: 12px; color: var(--txt2); margin-top: 3px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r-row .rmeta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.r-row .rfile { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--txt3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-row .rstat { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .06em; color: var(--txt3); flex-shrink: 0; }
.r-row .rstat.live, .r-row .rstat.failed { color: var(--txt); }
.r-row .rstat.failed { font-weight: 600; }
.r-row .rprog { position: absolute; left: 14px; right: 16px; bottom: 0; height: 2px; background: var(--line); }
.r-row .rprog > span { display: block; height: 2px; background: var(--txt2); }
.mini-wave { display: flex; align-items: flex-end; gap: 1.5px; height: 13px; flex-shrink: 0; }
.mini-wave span { width: 2px; height: 11px; border-radius: 1px; transform-origin: center; animation: wavpulse 1s ease-in-out infinite; }

.r-detail { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.d-head { padding: 16px 24px 0; flex-shrink: 0; position: relative; }
.d-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-meta { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--txt3); margin-top: 4px; }
.d-chip { font-size: 10px; letter-spacing: .1em; font-weight: 600; color: var(--txt3); border: 1px solid var(--line); border-radius: 10px; padding: 3px 9px; flex-shrink: 0; cursor: pointer; white-space: nowrap; background: none; }
.d-chip:hover { color: var(--txt); border-color: var(--txt3); }
.d-chip.tpl { color: var(--txt2); cursor: default; }
.d-rule { margin-top: 12px; border-bottom: 1px solid var(--line); }
.r-tabs { display: none; margin-top: 12px; border-bottom: 1px solid var(--line); }
.r-tabs span { flex: 1; text-align: center; padding: 10px 0; font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--txt3); border-bottom: 2px solid transparent; cursor: pointer; }
.r-tabs span.on { color: var(--txt); border-bottom-color: var(--txt); }
.back-link { display: none; align-items: center; gap: 6px; font-size: 12px; color: var(--txt2); cursor: pointer; }
.d-body { flex: 1; display: flex; min-height: 0; }
.dpane { min-width: 0; display: flex; flex-direction: column; }
.dpane.tp { flex: 1.35; border-right: 1px solid var(--line); }
.dpane.np { flex: 1; background: var(--bg2); }
.pane-hd { display: flex; align-items: center; gap: 10px; padding: 10px 24px 6px; flex-shrink: 0; }
.hint { font-size: 10.5px; color: var(--txt3); }
.dpane .seglist { padding: 6px 24px 16px; gap: 2px; }
.seg-text { color: var(--txt); }
.seg .seg-text[data-edit] { cursor: text; }
.seg-edit { width: 100%; box-sizing: border-box; border: 1px solid var(--txt3); border-radius: 6px; background: var(--bg2); color: var(--txt); font-size: 13.5px; line-height: 1.65; padding: 4px 8px; outline: none; }
.seg-pen { font-size: 11px; color: var(--txt3); opacity: .55; cursor: pointer; padding-top: 3px; flex-shrink: 0; }
.seg-pen:hover { color: var(--txt); opacity: 1; }
.notes-scroll { flex: 1; overflow-y: auto; padding: 12px 20px 18px; }
.noteline { font-size: 13px; }
.p-bar { height: 60px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 24px; flex-shrink: 0; }
.p-bar .playbtn { width: 36px; height: 36px; font-size: 12px; }
.p-bar .wavebar-strip { height: 28px; }
.pending { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--txt3); padding: 0 24px; text-align: center; }
.pend-bars { display: flex; align-items: flex-end; gap: 3px; height: 22px; opacity: .6; }
.pend-bars span { width: 3px; border-radius: 2px; background: var(--txt3); }

/* popovers */
.backdrop { position: fixed; inset: 0; z-index: 55; }
.pop { position: absolute; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); z-index: 60; animation: riseIn .15s ease both; }
.prof-pop { position: fixed; top: 60px; right: 16px; width: 250px; overflow: hidden; }
.plan-blk { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--txt); }
.plan-blk:hover { background: var(--hover); }
.plan-blk .meter { display: block; height: 2px; }
.pop-row { display: flex; padding: 7px 9px; border-radius: 6px; font-size: 12.5px; color: var(--txt2); cursor: pointer; }
.pop-row:hover { background: var(--hover); color: var(--txt); }
.hot-pop { top: 52px; right: 24px; width: 290px; max-width: calc(100vw - 48px); padding: 12px 14px; z-index: 50; }
.hot-pop input { width: 100%; box-sizing: border-box; height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-size: 12px; outline: none; margin-bottom: 10px; }
.hw { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 11px; padding: 3px 9px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--txt2); }
.hw span { cursor: pointer; color: var(--txt3); }
.hw span:hover { color: var(--txt); }

/* ⌘K search */
.s-layer { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.s-layer.on { pointer-events: auto; }
.s-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .2s; }
.s-layer.on .s-back { opacity: 1; }
.s-panel { position: absolute; top: 84px; left: 50%; width: 620px; max-width: calc(100vw - 32px); transform: translateX(-50%) translateY(-10px); opacity: 0; transition: transform .22s cubic-bezier(.32, .72, 0, 1), opacity .18s; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 64px rgba(0, 0, 0, .45); display: flex; flex-direction: column; max-height: min(560px, calc(100vh - 120px)); overflow: hidden; }
.s-layer.on .s-panel { transform: translateX(-50%) translateY(0); opacity: 1; }
.s-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.s-head input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; font-size: 15px; }
.s-body { flex: 1; overflow-y: auto; padding: 6px 8px 8px; }
.s-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 6px; cursor: pointer; }
.s-row:hover { background: var(--hover); }
.s-txt { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-sub { display: block; font-size: 11.5px; color: var(--txt3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-right { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--txt3); flex-shrink: 0; }
.hit { background: rgba(255, 193, 7, .25); border-radius: 2px; padding: 0 1px; }
.s-foot { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--txt2); cursor: pointer; flex-shrink: 0; }
.s-foot:hover { color: var(--txt); background: var(--hover); }
.res-page { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.res-head { padding: 20px 24px 0; flex-shrink: 0; }
.res-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.res-chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.res-chips::-webkit-scrollbar { display: none; }
.res-body { flex: 1; overflow-y: auto; padding: 0 24px 24px; }
.res-row { display: flex; align-items: center; gap: 14px; padding: 11px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.res-row:hover { background: var(--hover); }
.res-row .s-txt { white-space: normal; line-height: 1.5; }
.link { font-size: 12px; color: var(--txt2); cursor: pointer; }
.link:hover { color: var(--txt); }
.wav-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 16px; font-size: 12.5px; color: var(--txt); box-shadow: 0 14px 40px rgba(0, 0, 0, .4); z-index: 80; animation: riseIn .18s ease both; max-width: 90vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; }
.wav-toast.on { display: block; }

/* tablet/phone left drawer (the canvas's) */
.ldrawer { position: fixed; inset: 0; z-index: 65; pointer-events: none; }
.ldrawer .drawer-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .25s; }
.ldrawer-sheet { position: absolute; left: 0; top: 0; bottom: 0; width: 264px; max-width: 82vw; background: var(--bg); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .28s cubic-bezier(.32, .72, 0, 1); display: flex; flex-direction: column; padding: 14px 12px; gap: 2px; overflow-y: auto; }
.ldrawer .navrow { padding: 11px 10px; font-size: 14px; }
.ldrawer.open { pointer-events: auto; }
.ldrawer.open .drawer-back { opacity: 1; }
.ldrawer.open .ldrawer-sheet { transform: none; }

.t-only { display: none !important; }
.bottomnav.m-grid { display: none; }
@media (max-width: 1160px) {
  .t-hide { display: none !important; }
  .t-only { display: flex !important; }
}
@media (max-width: 980px) {
  .r-tabs { display: flex !important; }
  .dpane.off { display: none !important; }
  .dpane.tp { border-right: none; }
  .r-list { width: 256px !important; }
}
@media (max-width: 760px) {
  .topnav.app-nav { display: flex !important; gap: 14px; }   /* theme + avatar stay; Ask/Admin are .m-hide */
  .back-link { display: inline-flex; }
  .r-list { width: auto !important; flex: 1 1 auto !important; border-right: none !important; }
  [data-mpane="detail"] .r-list { display: none !important; }
  [data-mpane="list"] .r-detail { display: none !important; }
  [data-mpane="list"] .bottomnav.m-grid { display: grid; }
  [data-mpane="detail"] .bottomnav.m-grid { display: none !important; }
  [data-mpane="list"] .r-rows { padding-bottom: 110px !important; }
  .s-panel { top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: auto !important; max-width: none !important; transform: none !important; border-radius: 0 !important; max-height: none !important; border: none !important; }
  .d-head { padding: 14px 16px 0 !important; }
  .pane-hd, .dpane .seglist, .notes-scroll, .res-head, .res-body { padding-left: 16px !important; padding-right: 16px !important; }
  .p-bar { padding: 0 14px !important; gap: 10px !important; }
  .hot-pop { right: 16px; }
}

/* ── loading skeleton ─────────────────────────────────────────────────────
   Shown while the Firebase session / first data batch resolves (L.pending).
   Monochrome shimmer per DESIGN.md §2.5 — no demo-data flash. */
.skel {
  display: inline-block;
  background: var(--line);
  border-radius: 5px;
  animation: skel-pulse 1.3s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes skel-pulse {
  0%, 100% { opacity: .6; }
  50%      { opacity: .22; }
}

/* ── Settings (canvas "Web - WAV Settings") · API keys · sign-in ────────
   Shared primitives first, then the per-tab structures. */
.pill-cta { background: none; color: var(--txt); font-family: Inter, sans-serif; white-space: nowrap; }
.pill-cta:disabled { opacity: .4; cursor: default; }
.pill-cta:disabled:hover { background: none; color: var(--txt); }
.pill-cta.danger-fill { border-color: #c4453b; color: #c4453b; }
.pill-cta.danger-fill:hover:not(:disabled) { background: #c4453b; color: #fff; }
.tact:disabled { opacity: .45; cursor: default; }
.tact.danger { font-weight: 700; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--txt); }
.chip.hot { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.chip .x { cursor: pointer; color: var(--txt3); font-size: 13px; line-height: 1; }
.chip .x:hover { color: var(--txt); }
.tinput {
  flex: 1; min-width: 160px; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 10px; font-size: 13px; color: var(--txt); font-family: Inter, sans-serif; outline: none; width: 100%;
}
.tinput:focus { border-color: var(--txt3); }
.tinput.otp { font-size: 22px; letter-spacing: .42em; text-align: center; padding: 12px 10px; }
.switch {
  position: relative; width: 34px; height: 20px; border-radius: 10px; border: 1px solid var(--txt3); background: none;
  cursor: pointer; flex-shrink: 0; padding: 0;
}
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--txt3); transition: transform .15s ease, background .15s; }
.switch.on { border-color: var(--txt); }
.switch.on::after { transform: translateX(14px); background: var(--txt); }
.notice { font-size: 13px; color: var(--txt2); line-height: 1.6; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; }
.dict-box { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.dict-box .tinput { min-width: 0; }

/* API keys */
.key-card { padding: 18px 20px; border: 1px solid var(--txt3); border-radius: 10px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.key-card.reveal { gap: 10px; padding: 16px 18px; }
.key-secret { font-size: 12px; padding: 8px 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; flex: 1; min-width: 0; overflow-wrap: anywhere; user-select: all; }
.key-row .eye { display: flex; color: var(--txt3); cursor: pointer; flex-shrink: 0; }
.key-row .eye:hover { color: var(--txt); }
.key-row .voice-acts span { white-space: nowrap; }

/* Sign in */
.auth-wrap { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 56px 20px 80px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; padding: 28px 28px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.flabel { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--txt2); }
.btn-solid, .btn-line {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; border-radius: 22px; cursor: pointer;
  font-family: Inter, sans-serif; font-size: 11.5px; font-weight: 600; letter-spacing: .1em;
}
.btn-solid { background: var(--txt); color: var(--bg); border: 1px solid var(--txt); }
.btn-solid:hover:not(:disabled) { opacity: .9; }
.btn-line { background: none; color: var(--txt); border: 1px solid var(--txt3); }
.btn-line:hover:not(:disabled) { border-color: var(--txt); }
.btn-solid:disabled, .btn-line:disabled { opacity: .35; cursor: default; }
.or { display: flex; align-items: center; gap: 12px; font-size: 10.5px; letter-spacing: .14em; color: var(--txt3); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-err { font-size: 12.5px; color: var(--txt); font-weight: 500; line-height: 1.5; }
.doc-list { display: flex; flex-direction: column; gap: 6px; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--txt); cursor: pointer; font-family: Inter, sans-serif; }
.doc-row:hover { border-color: var(--txt3); }
.agree { display: flex; align-items: flex-start; gap: 10px; text-align: left; background: none; border: none; padding: 4px 0; color: var(--txt2); font-size: 12.5px; line-height: 1.5; cursor: pointer; font-family: Inter, sans-serif; }
.agree a { color: var(--txt); text-decoration: underline; text-underline-offset: 2px; }
.agree .box { width: 16px; height: 16px; border: 1px solid var(--txt3); border-radius: 3px; flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--bg); }
.agree.on .box { background: var(--txt); border-color: var(--txt); }
.agree.on { color: var(--txt); }
.sheet { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100vw - 32px)); max-height: min(80vh, 720px); display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; z-index: 60; animation: riseIn .18s ease both; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.sheet-body { overflow-y: auto; padding: 6px 20px 18px; font-size: 13.5px; line-height: 1.7; color: var(--txt2); }
.sheet-body h4 { margin: 18px 0 4px; font-size: 13px; color: var(--txt); }
.sheet-body p { margin: 0; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--line); }

/* Canvas mobile contract: label rows wrap, the 180px key spans the row, hover-only actions stay visible. */
@media (max-width: 760px) {
  .frow { flex-wrap: wrap; }
  .frow > .set-key { width: 100% !important; }
  .voice-acts { opacity: 1 !important; }
  .auth-wrap { padding: 28px 12px 60px; }
  .auth-card { padding: 22px 18px 20px; }
}

/* ── Spec 0038: canvas "Web - WAV App" — projects rail, ··· menu, hotwords
   panel, versions + regenerate, archive banner, toast UNDO ─────────── */
.sidebar .side-top { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.sidebar .side-top .workspace { margin-bottom: 0; }
.sidebar.mini { width: 48px; padding: 14px 0; align-items: center; gap: 4px; }
.mini-btn { width: 32px; height: 32px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; color: var(--txt2); flex-shrink: 0; }
.mini-btn.proj { font-size: 11px; font-weight: 600; }
.mini-btn:hover, .mini-btn.on { background: var(--hover); color: var(--txt); }
.mini-btn.droptarget { outline: 1px dashed var(--txt3); }
.mini-rule { width: 20px; height: 1px; background: var(--line); margin: 8px 0; flex-shrink: 0; }
.navrow.proj { position: relative; }
.navrow.proj[draggable="true"] { cursor: grab; }
.navrow.drop-before { box-shadow: inset 0 2px 0 var(--txt); }
.navrow.drop-after { box-shadow: inset 0 -2px 0 var(--txt); }
.mini-plus { width: 18px; height: 18px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1; color: var(--txt3); cursor: pointer; margin: -2px 0; flex-shrink: 0; }
.mini-plus:hover { color: var(--txt); background: var(--hover); }
.proj-more { font-size: 12px; letter-spacing: .05em; color: var(--txt3); opacity: 0; cursor: pointer; padding: 0 2px; flex-shrink: 0; line-height: 1; }
.navrow.proj:hover .proj-more, .navrow.proj.on .proj-more { opacity: .7; }
.proj-more:hover { opacity: 1 !important; color: var(--txt); }
.proj-pop { margin: 2px 0 4px 18px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 5px; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); animation: riseIn .15s ease both; }
.np-row { display: flex; align-items: center; gap: 8px; padding: 4px 10px; }
.np-row.depth1 { padding-left: 26px; }
.np-row .glyph { color: var(--txt3); font-size: 11px; }
.np-row input, .np-inline { flex: 1; min-width: 0; height: 26px; padding: 0 8px; border: 1px solid var(--txt3); border-radius: 6px; background: var(--bg); color: var(--txt); font-family: Inter, sans-serif; font-size: 13px; outline: none; }
.np-hint { font-size: 10.5px; color: var(--txt3); padding: 2px 10px 4px 28px; }
.np-hint.depth1 { padding-left: 44px; }
.top-drop { margin: 6px 0 0; padding: 10px; border: 1px dashed var(--line); border-radius: 6px; font-size: 11px; color: var(--txt3); text-align: center; }
.top-drop.on { border-color: var(--txt); }

.d-chip.more-btn { width: 24px; height: 22px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; letter-spacing: .05em; box-sizing: border-box; }
.d-chip.on, .d-chip.more-btn.on { color: var(--txt); border-color: var(--txt3); }
.more-pop { top: 44px; right: 24px; width: 236px; padding: 5px; z-index: 31; display: flex; flex-direction: column; }
.pop-head { display: flex; align-items: center; gap: 8px; padding: 7px 9px 5px; font-size: 10px; letter-spacing: .12em; font-weight: 600; color: var(--txt3); cursor: pointer; }
.pop-head:hover { color: var(--txt); }
.pop-sep { height: 1px; background: var(--line); margin: 4px 4px; }
.pop-row { align-items: center; }
.tact.confirm { border: 1px solid var(--txt); border-radius: 14px; padding: 5px 12px; color: var(--txt); font-size: 10px; }
.tact.confirm:hover { background: var(--txt); color: var(--bg); }
.arch-banner { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 11.5px; color: var(--txt2); }

.ver-switch { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.ver-chip { font-family: 'JetBrains Mono', monospace; font-size: 10px; padding: 2px 7px; border-radius: 6px; cursor: pointer; color: var(--txt3); }
.ver-chip:hover { color: var(--txt); }
.ver-chip.on { background: var(--hover); color: var(--txt); }
.regen-btn { display: inline-flex; align-items: center; gap: 5px; }
.regen-btn .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--txt); }
.hot-pending { margin: 0 24px 6px; padding: 7px 10px; border: 1px dashed var(--line); border-radius: 6px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--txt2); flex-shrink: 0; }
.regen-pop { top: 40px; right: 24px; width: 330px; max-width: calc(100% - 48px); padding: 14px; z-index: 20; display: flex; flex-direction: column; gap: 10px; }
.regen-pop textarea { width: 100%; box-sizing: border-box; resize: none; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--txt); font-family: Inter, sans-serif; font-size: 12px; line-height: 1.5; outline: none; }
.seg { position: relative; }
.seg-dot { position: absolute; left: 2px; top: 12px; width: 4px; height: 4px; border-radius: 50%; background: var(--txt); }

.hot-layer { position: fixed; inset: 0; z-index: 72; }
.hot-layer .backdrop { z-index: 0; }
.hot-panel { top: 84px; left: 50%; width: 470px; max-width: calc(100vw - 32px); max-height: min(640px, calc(100vh - 120px)); transform: translateX(-50%); opacity: 1; animation: riseIn .15s ease both; transition: none; }
.hot-sec-hd { padding: 12px 0 6px; display: flex; align-items: baseline; gap: 8px; }
.hot-panel input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--txt); font-family: Inter, sans-serif; font-size: 12.5px; outline: none; }
.hw.new { border-color: var(--txt3); color: var(--txt); }
.hw.shadow { color: var(--txt3); text-decoration: line-through; }
.hw.over { border-style: dashed; color: var(--txt3); }
.scope-chip { font-size: 10.5px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; color: var(--txt3); white-space: nowrap; }
.scope-chip:hover { color: var(--txt); }
.scope-chip.on { background: var(--hover); border-color: var(--txt3); color: var(--txt); }

.wav-toast { display: none; align-items: center; gap: 14px; }
.wav-toast.on { display: flex; }
.wav-toast .toast-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wav-toast .toast-undo { font-size: 10px; letter-spacing: .1em; font-weight: 600; cursor: pointer; flex-shrink: 0; border-left: 1px solid var(--line); padding-left: 12px; }
.wav-toast .toast-undo:hover { color: var(--txt2); }
@media (max-width: 760px) {
  .hot-panel { transform: none !important; }
  .more-pop, .regen-pop { right: 16px; }
  .hot-pending { margin: 0 16px 6px; }
}
.regen-pop .chip { font-size: 11px; padding: 4px 10px; user-select: none; }
.regen-pop .chip.on { background: var(--hover); border-color: var(--txt2); }
.more-pop .pop-row > span { white-space: nowrap; }

/* ── spec 0039: speaker corrections (merge / relabel / split) ─────────── */
.seg-speaker.clickable { cursor: pointer; }
.seg-speaker.clickable:hover { color: var(--txt); text-decoration: underline dotted; text-underline-offset: 3px; }
.seg.spk-open { background: var(--bg2); border-radius: 6px; }
.seg-text.splitting { cursor: pointer; line-height: 1.9; }
.seg-text.splitting .w { padding: 1px 2px; border-radius: 3px; border-bottom: 1px dotted var(--line); }
.seg-text.splitting .w:hover { background: var(--hover); color: var(--txt); }
.seg-text.splitting .w.sel { background: var(--txt); color: var(--bg); border-bottom-color: transparent; }
.spk-bar { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.retag.merge { margin-left: 4px; }
/* ── 2026-10 redesign IA (ia.js; REDESIGN.md §2–5) ───────────────────────
   One sidebar on every app route, new destinations (Home, Call Assistant,
   Templates, Connect AI), Library source chips + quota + upload, recording
   detail tabs. Monochrome throughout; muted text uses --txt2 (readable). */

.sidebar.ia-side, .ldrawer-sheet { overflow-y: auto; }
.ia-upload {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 34px;
  margin: 2px 0 10px; border-radius: 17px; border: 1px solid var(--txt); background: none;
  color: var(--txt); font: 600 12.5px Inter, sans-serif; cursor: pointer; flex-shrink: 0;
}
.ia-upload:hover { background: var(--txt); color: var(--bg); }
.ia-nav .ia-g { width: 14px; text-align: center; color: var(--txt2); font-size: 12px; }
.ia-nav.on .ia-g { color: var(--txt); }
.ia-key { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--txt2); opacity: 0; transition: opacity .15s; }
.ia-nav:hover .ia-key, .ia-nav:focus-visible .ia-key { opacity: 1; }
.ia-rule { display: block; height: 1px; background: var(--line); margin: 8px 6px; flex-shrink: 0; }
.ia-more { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.ia-quota { display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 4px; margin-top: 8px; border-top: 1px solid var(--line); color: var(--txt); }
.ia-quota:hover .ia-qlabel { color: var(--txt); }
.ia-who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.avatar.ia-av { width: 24px; height: 24px; font-size: 10px; cursor: default; flex-shrink: 0; }
.ia-meter { display: block; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.ia-meter > span { display: block; height: 4px; background: var(--txt2); }
.ia-qlabel { font-size: 10.5px; color: var(--txt2); }
.ia-quota.low .ia-qlabel, .ia-libquota.low .mono { color: var(--txt); font-weight: 600; }
.ia-quota.low .ia-meter > span, .ia-libquota.low .ia-meter > span { background: var(--txt); }
:focus-visible { outline: 2px solid var(--txt); outline-offset: 2px; }

/* Frame for non-Library routes */
.ia-shell { flex: 1; min-height: 0; }
.ia-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.ia-main > .shell { flex: 1; min-height: 0; }
.ia-bn { grid-template-columns: repeat(5, 1fr) !important; }
.bottomnav .bn-rec svg { width: 16px; height: 16px; }
.bottomnav .bn-label { cursor: pointer; }

/* Page scaffolding */
.ia-page { flex: 1; overflow-y: auto; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 20px; width: 100%; }
.ia-pagehead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ia-pagehead .ia-h1 { flex: 1; }
.ia-h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.ia-h2 { font-size: 18px; font-weight: 600; margin: 0; }
.ia-p { font-size: 13px; line-height: 1.6; margin: 0; max-width: 72ch; }
.ia-muted { color: var(--txt2); }
.ia-strong { font-weight: 600; }
.ia-sub { font-size: 12px; line-height: 1.5; }
.ia-fine { font-size: 11.5px; color: var(--txt2); line-height: 1.5; }
.ia-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ia-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ia-wrap { flex-wrap: wrap; }
.ia-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ia-grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ia-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ia-grid.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ia-grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ia-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--bg2); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ia-card.hero { border-color: var(--txt2); }
.ia-note { font-size: 12.5px; color: var(--txt2); line-height: 1.6; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; }
.ia-empty { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 32px 4px; max-width: 520px; }
.ia-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 14px;
  border-radius: 16px; border: 1px solid var(--txt); background: none; color: var(--txt);
  font: 600 12.5px Inter, sans-serif; cursor: pointer; white-space: nowrap;
}
.ia-btn:hover:not(:disabled) { background: var(--txt); color: var(--bg); }
.ia-btn.ghost { border-color: var(--line); }
.ia-btn.ghost:hover:not(:disabled) { border-color: var(--txt); background: none; color: var(--txt); }
.ia-btn:disabled { opacity: .5; cursor: default; }
.ia-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ia-chips .chip[role="button"], .chip[data-ia-pref], .chip[data-lang] { cursor: pointer; }
.chip { color: var(--txt2); }
.ia-x { background: none; border: none; color: inherit; font-size: 10px; cursor: pointer; padding: 0 0 0 4px; }
.ia-list { display: flex; flex-direction: column; }
.ia-item { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); color: var(--txt); font-size: 13px; min-width: 0; }
a.ia-item:hover { background: var(--hover); }
.ia-when { width: 44px; flex-shrink: 0; font-size: 11.5px; }
.ia-title { font-weight: 600; }
.ia-att { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.ia-att:last-of-type { border-bottom: none; }
.ia-att > a { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--txt); }
.ia-attx { flex-shrink: 0; width: 24px; height: 24px; border: none; border-radius: 6px; background: none; color: var(--txt2); font-size: 11px; cursor: pointer; }
.ia-attx:hover, .ia-attx:focus-visible { color: var(--txt); background: var(--hover); }
.ia-attfoot { gap: 16px; padding-top: 4px; }
/* Home (W-01): two independent columns, so neither leaves a gap beside the other */
.ia-home { display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 28%, 400px); gap: 20px; align-items: start; }
.ia-home-main, .ia-home-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ia-act { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.ia-act .actcheck { margin-top: 2px; flex-shrink: 0; cursor: pointer; }
.ia-avs { display: flex; }
.ia-avs .avatar + .avatar { margin-left: -6px; }
.ia-quote { font-size: 13px; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.ia-code { position: relative; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
.ia-code pre { margin: 0; flex: 1; min-width: 0; overflow-x: auto; font-size: 12px; line-height: 1.6; white-space: pre; }
.ia-codeline { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--bg); font-size: 12.5px; min-width: 0; }
.ia-codeline .mono { flex: 1; }
.ia-textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 10px 12px; font-size: 13px; line-height: 1.6; color: var(--txt); }
.ia-textarea:focus, .ia-title-input:focus { border-color: var(--txt2); }
.ia-title-input { font: 700 22px Inter, sans-serif; letter-spacing: -.01em; border: 1px solid transparent; border-radius: 8px; background: none; padding: 2px 6px; margin-left: -6px; color: var(--txt); outline: none; width: 100%; }
.ia-split { display: flex; gap: 24px; align-items: flex-start; }
.ia-profiles { width: 230px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; }
.ia-prof { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 9px 10px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--txt); font: 500 13px Inter, sans-serif; cursor: pointer; min-width: 0; }
.ia-prof:hover { background: var(--hover); }
.ia-prof.on { border-color: var(--line); background: var(--hover); font-weight: 600; }

/* Library head (W-02) */
.ia-srcchips { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; flex-shrink: 0; scrollbar-width: none; }
.ia-srcchips .fchip { flex-shrink: 0; white-space: nowrap; color: var(--txt2); }
.ia-srcchips .fchip.on { color: var(--txt); }
.ia-srcchips .fchip .mono { font-size: 10.5px; color: var(--txt2); margin-left: 2px; }
.ia-drop { display: flex; align-items: center; gap: 8px; margin: 0 16px 10px; padding: 9px 12px; border: 1px dashed var(--line); border-radius: 8px; font-size: 12px; color: var(--txt2); cursor: pointer; flex-shrink: 0; }
.ia-drop b { color: var(--txt); font-weight: 600; }
.ia-drop:hover { border-color: var(--txt2); }
.ia-dragging .ia-drop { border-color: var(--txt); border-style: solid; background: var(--hover); }
.ia-dragging .r-list, .ia-dragging .ia-main { box-shadow: inset 0 0 0 2px var(--txt2); }
.ia-libquota { display: flex; align-items: center; gap: 8px; margin: 0 16px 10px; font-size: 11px; color: var(--txt2); flex-shrink: 0; }
.ia-libquota .ia-meter { flex: 1; }
.ia-libquota .mono { white-space: nowrap; }
.ia-manage { font-size: 11px; font-weight: 600; color: var(--txt); white-space: nowrap; }
.ia-uprow-acts { display: flex; gap: 14px; margin-top: 8px; }

/* Recording detail (W-03): Notes · Assistant · Ask, authorship, citations */
.ia-nptabs { display: flex; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ia-nptabs span { padding: 11px 0 9px; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; color: var(--txt2); border-bottom: 2px solid transparent; cursor: pointer; }
.ia-nptabs span.on { color: var(--txt); border-bottom-color: var(--txt); }
.noteline.ai > span:last-child { color: var(--txt2); }
.noteline.yours > span:last-child { color: var(--txt); font-style: normal; font-weight: 500; }
.noteline.yours .glyph { color: var(--txt); }
.ia-cite { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--txt); border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; cursor: pointer; white-space: nowrap; }
.ia-cite:hover { border-color: var(--txt2); }
.ia-legend { font-size: 11px; color: var(--txt2); margin-top: 14px; line-height: 1.5; }
.ia-sumlang { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.ia-sumlang select { background: var(--bg); color: var(--txt); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font: 12px Inter, sans-serif; }
.ia-askpane { padding: 0 !important; }
.ia-askpane > div { border-top: none !important; }
.ia-answer { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; font-size: 13.5px; line-height: 1.6; }
.ia-say { display: flex; flex-direction: column; gap: 2px; }
.ia-srcchip { font-size: 10.5px; border: 1px solid var(--line); border-radius: 8px; padding: 1px 7px; color: var(--txt2); }
.ia-draft { margin: 0; white-space: pre-wrap; font: 13px/1.6 Inter, sans-serif; color: var(--txt); }

/* Dictation: HUD + read-only history */
.ia-dict { flex: 1; min-height: 0; display: flex; }
.ia-dicthist { width: 340px; flex-shrink: 0; border-left: 1px solid var(--line); padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 1160px) {
  .ia-split { flex-direction: column; }
  .ia-profiles { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .ia-profiles .slabel { width: 100%; }
}
@media (max-width: 900px) {
  .ia-grid, .ia-grid.even { grid-template-columns: minmax(0, 1fr); }
  .ia-home { display: flex; flex-direction: column; align-items: stretch; }
  .ia-home-main, .ia-home-side { display: contents; }
  .ia-home .hero { order: 1; } .ia-home-att { order: 2; } .ia-home-recent { order: 3; } .ia-home-acts { order: 4; } .ia-home-mac { order: 5; }
  .ia-dict { flex-direction: column; overflow-y: auto; }
  .ia-dict .hud-stage { min-height: 460px; flex: none; }
  .ia-dicthist { width: auto; border-left: none; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .ia-main { padding-bottom: 76px; }
  .ia-page { padding: 18px 16px 32px; }
  .ia-btn { min-height: 44px; }
  .ia-attx { width: 44px; height: 44px; }
  .ia-upload { min-height: 44px; }
  .ia-key { display: none; }
  .ia-main .set-side { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { .ia-key { transition: none; } }
.ia-card.ia-row-between { flex-direction: row; align-items: center; }
.ldrawer .navrow.depth1 { padding-left: 28px; }
