/* Ova — design system. Values come from the design handoff; keep them in step with it. */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Material Symbols Rounded";
  src: url("fonts/MaterialSymbolsRounded.woff2") format("woff2");
  font-weight: 100 700;
  font-display: block;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: dark;
  --frame: #050407;
  --panel: radial-gradient(90% 70% at 90% -10%, rgba(140,70,190,.5) 0%, rgba(140,70,190,0) 60%), radial-gradient(70% 50% at 45% 18%, rgba(90,40,130,.35) 0%, rgba(90,40,130,0) 70%), #0d0911;
  --composer: rgba(22,16,28,.78);
  --aside: rgba(8,6,11,.45);
  --navActive: #1b1820;
  --pill: #0b080e;
  --glass: rgba(255,255,255,.035);
  --glass2: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.08);
  --lineStrong: rgba(255,255,255,.15);
  --surface: #141018;
  --surface2: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.08);
  --bg: #0d0911;
  --text: #efeaf5;
  --muted: #9d94ab;
  --accent: #b37dff;
  --accentText: #ffffff;
  --accentSoft: rgba(179,125,255,.14);
  --accentLine: rgba(179,125,255,.5);
  --glowA: rgba(140,70,190,.5);
  --glowB: rgba(90,40,130,.35);
  --danger: #ff7b7b;
  --dangerSoft: rgba(255,123,123,.13);
  --success: #4ade80;
  --successSoft: rgba(74,222,128,.12);
  --warn: #fbbf24;
  --warnSoft: rgba(251,191,36,.11);
  --s1: #60a5fa;
  --s1Soft: rgba(96,165,250,.14);
  --s2: #c084fc;
  --s2Soft: rgba(192,132,252,.15);
  --s3: #fb923c;
  --s3Soft: rgba(251,146,60,.14);
  --glow: rgba(168,85,247,.45);
  --primary: linear-gradient(180deg, #b37dff, #7c3aed);
  --primaryShadow: 0 4px 16px var(--glow), inset 0 1px 0 rgba(255,255,255,.28);
  --orb: radial-gradient(circle at 33% 27%, rgba(255,255,255,.95) 0%, rgba(240,222,255,.55) 9%, rgba(190,140,255,0) 30%), radial-gradient(circle at 68% 82%, rgba(96,150,255,.95) 0%, rgba(96,150,255,0) 42%), radial-gradient(circle at 50% 50%, #b26bff 0%, #7a2fe0 40%, #3b0f80 75%, #1c0640 100%);
}

/* The light theme applies when the system asks for it, unless the user forced the dark one,
   and when the user forced it. The two blocks must stay identical. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --frame: #ebe7f0;
    --panel: radial-gradient(90% 70% at 90% -10%, rgba(176,120,240,.38) 0%, rgba(176,120,240,0) 60%), radial-gradient(70% 50% at 45% 18%, rgba(200,170,245,.28) 0%, rgba(200,170,245,0) 70%), #fbfafd;
    --composer: rgba(255,255,255,.82);
    --aside: rgba(255,255,255,.55);
    --navActive: #ffffff;
    --pill: #ffffff;
    --glass: rgba(255,255,255,.62);
    --glass2: rgba(30,20,45,.05);
    --line: rgba(30,20,45,.09);
    --lineStrong: rgba(30,20,45,.15);
    --surface: #ffffff;
    --surface2: rgba(30,20,45,.05);
    --border: rgba(30,20,45,.09);
    --bg: #fbfafd;
    --text: #17121e;
    --muted: #6b6478;
    --accent: #8b3fe8;
    --accentSoft: rgba(139,63,232,.1);
    --accentLine: rgba(139,63,232,.45);
    --glowA: rgba(176,120,240,.38);
    --glowB: rgba(200,170,245,.28);
    --danger: #dc2626;
    --dangerSoft: rgba(220,38,38,.1);
    --success: #15803d;
    --successSoft: rgba(21,128,61,.1);
    --warn: #a15c00;
    --warnSoft: rgba(217,140,0,.12);
    --s1: #2563eb;
    --s1Soft: rgba(37,99,235,.1);
    --s2: #9333ea;
    --s2Soft: rgba(147,51,234,.1);
    --s3: #ea580c;
    --s3Soft: rgba(234,88,12,.1);
    --glow: rgba(139,63,232,.35);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --frame: #ebe7f0;
  --panel: radial-gradient(90% 70% at 90% -10%, rgba(176,120,240,.38) 0%, rgba(176,120,240,0) 60%), radial-gradient(70% 50% at 45% 18%, rgba(200,170,245,.28) 0%, rgba(200,170,245,0) 70%), #fbfafd;
  --composer: rgba(255,255,255,.82);
  --aside: rgba(255,255,255,.55);
  --navActive: #ffffff;
  --pill: #ffffff;
  --glass: rgba(255,255,255,.62);
  --glass2: rgba(30,20,45,.05);
  --line: rgba(30,20,45,.09);
  --lineStrong: rgba(30,20,45,.15);
  --surface: #ffffff;
  --surface2: rgba(30,20,45,.05);
  --border: rgba(30,20,45,.09);
  --bg: #fbfafd;
  --text: #17121e;
  --muted: #6b6478;
  --accent: #8b3fe8;
  --accentSoft: rgba(139,63,232,.1);
  --accentLine: rgba(139,63,232,.45);
  --glowA: rgba(176,120,240,.38);
  --glowB: rgba(200,170,245,.28);
  --danger: #dc2626;
  --dangerSoft: rgba(220,38,38,.1);
  --success: #15803d;
  --successSoft: rgba(21,128,61,.1);
  --warn: #a15c00;
  --warnSoft: rgba(217,140,0,.12);
  --s1: #2563eb;
  --s1Soft: rgba(37,99,235,.1);
  --s2: #9333ea;
  --s2Soft: rgba(147,51,234,.1);
  --s3: #ea580c;
  --s3Soft: rgba(234,88,12,.1);
  --glow: rgba(139,63,232,.35);
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: "Geist", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  background: var(--frame);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: color-mix(in oklab, var(--accent) 80%, white); }

button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }

select, input { font: inherit; }
select option { background: var(--surface); color: var(--text); }

h1 { font-size: 1.8rem; margin: 0 0 4px; font-weight: 500; letter-spacing: -0.02em; }
h2 { font-size: 1rem; margin: 0 0 4px; font-weight: 600; }

.loading { height: 100vh; display: grid; place-items: center; color: var(--muted); }

.icon {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 17px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  flex: none;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  user-select: none;
}
.icon.fill { font-variation-settings: "FILL" 1; }
.icon.spin { animation: ova-spin 1s linear infinite; }
.i14 { font-size: 14px; } .i15 { font-size: 15px; } .i16 { font-size: 16px; } .i18 { font-size: 18px; }
.i19 { font-size: 19px; } .i20 { font-size: 20px; } .i21 { font-size: 21px; } .i22 { font-size: 22px; }

@keyframes ova-spin { to { transform: rotate(360deg); } }
@keyframes ova-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.orb { display: block; border-radius: 50%; flex: none; background: var(--orb);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), inset 0 -10px 22px rgba(0,0,0,.35), 0 10px 34px rgba(110,80,255,.5), 0 0 90px rgba(168,85,247,.28); }
.orb-30 { width: 30px; height: 30px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), inset 0 -5px 10px rgba(0,0,0,.35), 0 4px 14px rgba(110,80,255,.45); }
.orb-26 { width: 26px; height: 26px; margin-top: 4px; box-shadow: 0 0 14px rgba(168,85,247,.45); }
.orb-92 { width: 92px; height: 92px; transition: transform .12s linear; }

.pill {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--lineStrong); background: var(--pill); color: var(--text);
  font-size: 0.84rem; font-weight: 500; white-space: nowrap; text-decoration: none;
}
.pill.is-on { background: var(--accentSoft); border-color: color-mix(in oklab, var(--accent) 55%, transparent); }
.pill.is-muted { color: var(--muted); }
.pill.is-ring { border-color: color-mix(in oklab, var(--accent) 55%, transparent); }

.icon-button {
  width: 28px; height: 28px; flex: none; border-radius: 8px; border: none; background: none;
  color: var(--muted); display: grid; place-items: center; padding: 0;
}
.icon-button.is-30 { width: 30px; height: 30px; }

.button-primary {
  display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: none;
  background: var(--primary); color: #fff; box-shadow: var(--primaryShadow); font-weight: 600; white-space: nowrap;
}

/* ---------- Shell ---------- */

.app { height: 100vh; display: flex; background: var(--frame); color: var(--text); overflow: hidden; }

.sidebar {
  width: 232px; flex: none; display: flex; flex-direction: column; gap: 2px;
  padding: 16px 12px 12px; overflow-y: auto; scrollbar-width: none;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 16px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-tagline { font-size: 0.74rem; color: var(--muted); }

.new-session {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--navActive); color: var(--text);
  font-weight: 500; text-align: left; margin-bottom: 14px;
}

.nav-label { font-size: 0.78rem; color: var(--muted); padding: 0 8px 6px; }

.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: none;
  text-align: left; background: transparent; color: var(--muted); font-weight: 500; text-decoration: none;
}
.nav-item:hover { color: var(--muted); }
.nav-item.active { background: var(--navActive); color: var(--text); }
.nav-item > span:nth-child(2) { flex: 1; }
.nav-item.is-disabled { opacity: .45; pointer-events: none; }
.nav-badge { font-size: 0.7rem; font-weight: 600; color: #fff; background: var(--accent); border-radius: 999px; padding: 1px 7px; }

.nav-separator { height: 1px; background: var(--line); margin: 12px 8px; flex: none; }

.pair { font-size: 0.9rem; font-weight: 400; }
.pair > span:nth-child(2) { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pair .icon { font-size: 18px; }

.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }

.impact-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 14px 12px;
  border-radius: 16px; background: var(--navActive); border: 1px solid var(--line); text-align: center;
}
.impact-card-icon { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--lineStrong); display: grid; place-items: center; color: var(--accent); }
.impact-card-title { font-weight: 600; font-size: 0.92rem; }
.impact-card-line { font-size: 0.76rem; color: var(--muted); line-height: 1.4; }
.impact-card-bars { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; font-size: 0.72rem; color: var(--muted); width: 100%; text-align: left; }
.impact-card-button { width: 100%; padding: 7px 10px; border-radius: 9px; border: none; background: var(--glass2); color: var(--text); font-size: 0.82rem; font-weight: 500; }

.bar { display: block; height: 4px; border-radius: 2px; background: var(--glass2); overflow: hidden; }
.bar > span { display: block; height: 100%; transition: width .4s; }

.state-line { display: flex; align-items: center; gap: 8px; padding: 2px 6px; color: var(--muted); font-size: 0.82rem; }
.state-line > span:nth-child(2) { flex: 1; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--border); }
.state-dot.is-preparing { background: var(--warn); }
.state-dot.is-live { background: var(--success); box-shadow: 0 0 0 4px var(--successSoft); }

.panel {
  flex: 1; min-width: 0; margin: 8px 8px 8px 0; border-radius: 22px; background: var(--panel);
  border: 1px solid var(--line); display: flex; overflow: hidden;
}
.panel.is-focus { margin: 0; border-radius: 0; }

.page { flex: 1; min-width: 0; overflow-y: auto; padding: 24px 28px 40px; }

/* ---------- Live translation ---------- */

.live { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overflow-x: hidden; }

.live-header { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 16px 0; }
.live-header .icon { font-size: 17px; }
.live-header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.steps { flex: none; display: flex; align-items: center; justify-content: center; gap: 0; padding: 14px 16px 0; overflow: hidden; }
.step {
  position: relative; display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); transition: all .25s; min-width: 0; flex: 0 1 auto;
  --step: var(--muted); --stepSoft: var(--glass2);
}
.step.is-tight { padding-right: 5px; }
.step-0 { --step: var(--success); --stepSoft: var(--successSoft); }
.step-1 { --step: var(--s1); --stepSoft: var(--s1Soft); }
.step-2 { --step: var(--s2); --stepSoft: var(--s2Soft); }
.step-3, .step-4 { --step: var(--s3); --stepSoft: var(--s3Soft); }
.step-dot { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--glass2); color: var(--muted); }
.step-dot .icon { font-size: 16px; }
.step-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.step-label { font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.step-sub { font-size: 0.7rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.step.is-done { border-color: color-mix(in oklab, var(--step) 30%, transparent); color: var(--text); }
.step.is-done .step-dot { background: var(--stepSoft); color: var(--step); }
.step.is-active { background: var(--stepSoft); border-color: color-mix(in oklab, var(--step) 70%, transparent); color: var(--text); box-shadow: 0 0 22px color-mix(in oklab, var(--step) 45%, transparent); }
.step.is-active .step-dot { background: var(--step); color: #fff; }
.step.is-active .step-dot .icon { font-variation-settings: "FILL" 1; }
.step-link { flex: 0 1 26px; min-width: 6px; height: 2px; border-radius: 1px; background: var(--line); overflow: hidden; }
.step-link > div { height: 100%; width: 0; transition: width .35s ease; }
.step-link.is-lit > div { width: 100%; }
.link-1 > div { background: var(--s1); } .link-2 > div { background: var(--s2); } .link-3 > div, .link-4 > div { background: var(--s3); }

.notice {
  margin: 12px 16px 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-radius: 14px;
  background: var(--warnSoft); border: 1px solid color-mix(in oklab, var(--warn) 40%, transparent);
}
.notice > .icon { font-size: 20px; color: var(--warn); }
.notice-text { flex: 1; font-size: 0.9rem; }

.empty-state { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 20px; text-align: center; }
.empty-orb { border: none; background: none; padding: 0; animation: ova-float 5s ease-in-out infinite; }
.empty-orb:disabled { opacity: 1; }
.empty-copy { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.empty-title { font-size: 1.75rem; font-weight: 500; letter-spacing: -0.02em; }
.empty-text { max-width: 440px; color: var(--muted); text-wrap: pretty; }

.conversation { flex: 1; min-height: 150px; overflow-y: auto; display: flex; flex-direction: column-reverse; gap: 22px; padding: 20px 16px; }
.turn { width: 100%; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.turn-source { align-self: flex-end; max-width: 75%; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.turn-meta { font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
.turn-bubble { background: var(--glass2); border: 1px solid var(--line); color: var(--text); padding: 9px 15px; border-radius: 18px 18px 6px 18px; }
.turn-bubble.is-pending { font-style: italic; opacity: .6; }
.turn-target { display: flex; gap: 12px; align-items: flex-start; max-width: 85%; }
.turn-block {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px 14px; margin: -10px -14px; border-radius: 16px;
  background: transparent; border: 1px solid transparent; transition: background .25s, border-color .25s;
}
.turn-block.is-translating { background: var(--s2Soft); border-color: color-mix(in oklab, var(--s2) 45%, transparent); }
.turn-block.is-speaking { background: var(--s3Soft); border-color: color-mix(in oklab, var(--s3) 45%, transparent); }
.turn-status { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; color: var(--muted); }
.stage { display: flex; align-items: center; gap: 3px; font-weight: 500; }
.stage .icon { font-size: 14px; }
.stage-s1 { color: var(--s1); } .stage-s2 { color: var(--s2); } .stage-s3 { color: var(--s3); }
.stage-success { color: var(--success); } .stage-muted { color: var(--muted); } .stage-danger { color: var(--danger); }
.turn-text { font-size: 1.2rem; line-height: 1.45; letter-spacing: -0.005em; }
.turn-actions { display: flex; gap: 4px; margin-left: -6px; }

.subtitles { flex: 1; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; padding: 24px 48px 28px; overflow: hidden; }
.subtitles-header { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lineStrong); box-shadow: 0 0 10px var(--lineStrong); }
.live-dot.is-live { background: #ff7b7b; box-shadow: 0 0 10px #ff7b7b; }
.subtitles-lines { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; max-width: 1000px; }
.subtitle-previous { font-size: 1.35rem; line-height: 1.35; text-wrap: pretty; opacity: .3; }
.subtitle-previous.is-latest { opacity: .55; }
.subtitle-current { display: flex; flex-direction: column; gap: 10px; }
.subtitle-text { font-size: 38px; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; text-wrap: pretty; }
.is-focus .subtitle-text { font-size: 52px; }
.subtitle-source { font-size: 1rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.subtitle-source .icon { color: var(--accent); }
.subtitle-empty { font-size: 1.8rem; font-weight: 400; color: var(--muted); letter-spacing: -0.02em; }

.pipeline { flex: 1; min-height: 150px; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 860px; margin: 0 auto; }
.pipeline-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 0.78rem; color: var(--muted); padding: 0 4px; }
.pipeline-legend > span { display: flex; align-items: center; gap: 5px; }
.pipeline-legend > span:last-child { margin-left: auto; white-space: nowrap; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.bg-s1 { background: var(--s1); } .bg-s2 { background: var(--s2); } .bg-s3 { background: var(--s3); }
.pipeline-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.pipeline-row.is-translating { border-color: color-mix(in oklab, var(--s2) 45%, transparent); }
.pipeline-row.is-speaking { border-color: color-mix(in oklab, var(--s3) 45%, transparent); }
.pipeline-time { flex: none; width: 58px; font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pipeline-texts { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pipeline-source { font-size: 0.85rem; color: var(--muted); }
.pipeline-source.is-pending { font-style: italic; }
.pipeline-target { font-size: 1rem; }
.pipeline-latency { flex: 1 1 150px; max-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.latency-bar { display: flex; height: 6px; border-radius: 3px; background: var(--glass2); overflow: hidden; gap: 2px; }
.latency-bar > div { transition: width .1s linear; }
.latency-label { font-size: 0.72rem; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 4px; }
.latency-label .icon { font-size: 14px; }

.dock { flex: none; width: 100%; max-width: 800px; margin: 0 auto; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.views { display: flex; flex-wrap: wrap; gap: 8px; }
.views .pill { color: var(--muted); }
.views .pill.is-on { color: var(--text); }
.views .icon { font-size: 16px; }

.composer {
  display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 12px 16px; border-radius: 20px;
  border: 1px solid var(--lineStrong); background: var(--composer); backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0,0,0,.18); transition: border-color .3s, box-shadow .3s;
}
.composer.is-listening { border-color: color-mix(in oklab, var(--accent) 50%, transparent); box-shadow: 0 0 0 4px var(--accentSoft), 0 10px 40px rgba(0,0,0,.25); }
.composer-status { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; }
.composer-status > .icon { font-size: 21px; color: var(--accent); margin-top: 1px; }
.composer-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.composer-title { font-size: 0.98rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-title.is-busy { color: var(--text); }
.composer-sub { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gauge { position: relative; width: 100%; max-width: 220px; height: 4px; border-radius: 2px; background: var(--glass2); overflow: hidden; }
.gauge-fill { height: 100%; background: var(--muted); transition: width .08s linear; }
.gauge-fill.is-voice { background: var(--success); }
.gauge-mark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--muted); }

.composer-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.picker { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 10px; min-width: 0; }
.picker > .icon { color: var(--muted); }
.picker select { border: none; background: transparent; color: var(--text); font-size: 0.86rem; font-weight: 500; padding: 0; outline: none; width: 100%; min-width: 0; }
.picker-source { flex: 0 1 180px; } .picker-target { flex: 0 1 150px; }
.picker-voice { flex: 0 1 110px; gap: 4px; padding: 0; }
.swap { width: 28px; height: 28px; flex: none; border-radius: 8px; border: none; background: var(--glass2); color: var(--text); display: grid; place-items: center; padding: 0; }
.divider { width: 1px; height: 18px; background: var(--lineStrong); flex: none; }
.speak-toggle.is-on, .voice-preview { color: var(--accent); }
.speak-toggle .icon { font-size: 19px; } .voice-preview .icon { font-size: 20px; }
.install-voice { border: none; background: none; color: var(--accent); padding: 0 6px; font-size: 0.86rem; font-weight: 500; display: flex; align-items: center; gap: 4px; text-decoration: none; }

.mic {
  position: relative; margin-left: auto; width: 42px; height: 42px; flex: none; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; display: grid; place-items: center; padding: 0;
  box-shadow: 0 4px 16px var(--glow), inset 0 1px 0 rgba(255,255,255,.28);
}
.mic .icon { font-size: 22px; }
.mic.is-listening { background: linear-gradient(180deg, #ff7d7d, #dc2626); box-shadow: 0 4px 16px rgba(220,38,38,.4), inset 0 1px 0 rgba(255,255,255,.28); }
.mic.is-preparing { background: var(--glass2); }
.mic-ring { position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; transition: transform .1s linear; pointer-events: none; }
.mic.is-listening .mic-ring { border-color: rgba(255,123,123,.35); }

.ready-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.ready-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.ready-card:hover { color: var(--text); }
.ready-card-top { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; }
.ready-card-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--glass2); border: 1px solid var(--line); }
.color-s1 { color: var(--s1); } .color-s2 { color: var(--s2); } .color-s3 { color: var(--s3); }
.tag { font-size: 0.7rem; font-weight: 500; padding: 3px 9px; border-radius: 999px; }
.tag-ready { background: var(--successSoft); color: var(--success); }
.tag-missing { background: var(--warnSoft); color: var(--warn); }
.ready-card-stage { font-weight: 500; font-size: 0.92rem; }
.ready-card-detail { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

/* ---------- Impact panel ---------- */

.impact { scrollbar-width: thin; width: 290px; flex: none; border-left: 1px solid var(--line); background: var(--aside); backdrop-filter: blur(18px); overflow-y: auto; padding: 16px 14px 20px; display: flex; flex-direction: column; gap: 12px; }
.impact-head { display: flex; align-items: center; gap: 8px; }
.impact-head > .icon { font-size: 19px; color: var(--accent); }
.impact-head h2 { margin: 0; font-size: 0.98rem; font-weight: 600; flex: 1; }
.impact-mode { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 12px; font-size: 0.8rem; background: var(--successSoft); color: var(--success); }
.impact-mode.is-online { background: var(--s2Soft); color: var(--s2); }
.impact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 10px 11px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.tile.is-compact { gap: 4px; }
.tile-label { display: flex; align-items: center; gap: 5px; font-size: 0.74rem; color: var(--muted); }
.tile-label .icon { font-size: 15px; }
.tile-value { font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -0.02em; }
.tile-value small { font-size: 0.76rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.tile-value.is-small { font-size: 1.05rem; line-height: 1.5; letter-spacing: 0; }
.tile-note { font-size: 0.7rem; color: var(--muted); }
.tile-note.is-warn { color: var(--warn); }
.spark { display: flex; align-items: flex-end; gap: 1px; height: 26px; }
.spark > div { flex: 1; min-height: 1px; opacity: .8; border-radius: 1px 1px 0 0; }
.tile .bar { margin-top: auto; }
.tile .bar > span { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.tile .bar.is-warn > span { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.block { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); color: var(--text); text-align: left; text-decoration: none; }
.block:hover { color: var(--text); }
.block.is-tight { gap: 6px; }
.block-title { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 500; width: 100%; }
.block-title .icon { font-size: 16px; color: var(--muted); }
.block-title > span:last-child { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.stack { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--glass2); }
.stack > div { transition: flex .4s; }
.latency-columns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; font-size: 0.72rem; color: var(--muted); }
.latency-columns b { display: block; font-weight: 600; font-size: 0.82rem; }
.fine { font-size: 0.72rem; color: var(--muted); line-height: 1.5; }
.block-line { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); }

/* ---------- Screens not yet redesigned (Modules, Settings) ---------- */

.page-header { margin-bottom: 18px; }
.page-header p { margin: 0; color: var(--muted); }

.card { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 190px; flex: 1 1 190px; }
.field > span { font-size: 0.82rem; color: var(--muted); }
.field-link { padding: 7px 0; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form .field { flex: none; max-width: 520px; }
.form-actions { display: flex; justify-content: flex-end; }
.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; }
.hint { margin: -4px 0 0; color: var(--muted); font-size: 0.87rem; max-width: 640px; }
.status-ok { color: var(--success); }
.status-error { color: var(--danger); }

.field select, .field input:not([type="checkbox"]):not([type="range"]) {
  color: var(--text); background: var(--pill); border: 1px solid var(--lineStrong); border-radius: 10px; padding: 7px 10px; min-height: 36px;
}
select:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="range"] { accent-color: var(--accent); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }

.button { color: var(--text); background: var(--pill); border: 1px solid var(--lineStrong); border-radius: 999px; padding: 7px 16px; min-height: 36px; font-weight: 500; }
.button.button-primary { border: none; background: var(--primary); color: #fff; box-shadow: var(--primaryShadow); font-weight: 600; }
.button-danger { background: linear-gradient(180deg, #ff7d7d, #dc2626); border: none; color: #fff; font-weight: 600; }
.link-button { color: var(--accent); background: none; border: none; padding: 0; }

.banner { display: flex; justify-content: space-between; gap: 16px; background: var(--glass2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; }
.banner-error { background: var(--dangerSoft); border-color: color-mix(in oklab, var(--danger) 40%, transparent); }
.banner-success { background: var(--successSoft); border-color: color-mix(in oklab, var(--success) 40%, transparent); }
.empty { color: var(--muted); text-align: center; padding: 48px 16px; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tab { color: var(--muted); background: var(--pill); border: 1px solid var(--lineStrong); border-radius: 999px; padding: 7px 14px; font-size: 0.84rem; font-weight: 500; }
.tab-active { color: var(--text); background: var(--accentSoft); border-color: color-mix(in oklab, var(--accent) 55%, transparent); }

.module { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 15px 16px; margin-bottom: 8px; }
.module-name { font-weight: 600; }
.module-description { color: var(--muted); font-size: 0.9rem; }
.module-size { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.module-actions { display: flex; align-items: center; gap: 8px; }
.badge { font-size: 0.7rem; font-weight: 500; color: var(--success); background: var(--successSoft); border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.progress { width: 150px; height: 5px; border-radius: 3px; background: var(--glass2); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); box-shadow: 0 0 8px var(--accent); transition: width 150ms linear; }

/* ---------- Narrow windows and phones ---------- */

@media (max-width: 720px) {
  .app { flex-direction: column-reverse; height: 100dvh; }
  .sidebar { width: auto; flex-direction: row; align-items: center; gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); overflow: visible; }
  .brand, .new-session, .nav-label, .nav-separator, .pair, .sidebar-bottom { display: none; }
  .nav-item { flex: 1; justify-content: center; }
  .panel { margin: 0; border-radius: 0; border: none; padding-top: env(safe-area-inset-top); }
  .page { padding: 16px 14px 24px; }
  .subtitles { padding: 16px 20px 20px; }
  .impact { display: none; }
  .module { grid-template-columns: 1fr auto; }
  .module-actions { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .empty-orb { animation: none; }
  .icon.spin { animation-duration: 2.5s; }
}

/* When room is short (impact panel open, narrow window) only the active step keeps its text. */
.steps.is-tight .step:not(.is-active) { padding-right: 5px; }
.steps.is-tight .step:not(.is-active) .step-text { display: none; }

@media (max-width: 1000px) {
  .step:not(.is-active) { padding-right: 5px; }
  .step:not(.is-active) .step-text { display: none; }
}

/* ---------- Companion window ---------- */

/* The window itself is transparent: only the card or the bar, and their shadow, are visible. */
html:has(.companion-stage), html:has(.companion-stage) body { background: transparent; overflow: hidden; }

.companion-stage { position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding: 44px; color: var(--text); }
.companion-stage.is-bar { justify-content: center; }

.companion-card {
  width: 360px; max-width: 100%; display: flex; flex-direction: column; border-radius: 22px; background: var(--panel);
  border: 1px solid var(--lineStrong); box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.2); overflow: hidden;
}
.companion-top { display: flex; align-items: center; gap: 6px; padding: 10px 10px 6px 14px; cursor: grab; }
.companion-top .icon-button { border-radius: 9px; }
.companion-top .icon-button.is-pinned { color: var(--accent); }
.companion-pair { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; font-size: 0.82rem; font-weight: 500; }
.companion-pair .icon { color: var(--accent); }
.companion-pair > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.companion-body { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 150px; padding: 6px 18px 12px; }
.companion-previous { font-size: 0.92rem; line-height: 1.35; color: var(--muted); }
.companion-current { font-size: 1.3rem; line-height: 1.3; letter-spacing: -0.01em; font-weight: 500; text-wrap: pretty; }
.companion-source { display: flex; align-items: flex-start; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.companion-source .icon { margin-top: 2px; }
.companion-empty { font-size: 1.15rem; color: var(--muted); letter-spacing: -0.01em; }

.mini-steps { display: flex; align-items: center; gap: 0; padding: 0 18px 12px; }
.mini-step { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--glass2); color: var(--muted); transition: all .25s; }
.mini-step.step-0, .bar-dot.step-0 { --step: var(--success); --stepSoft: var(--successSoft); }
.mini-step.step-1, .bar-dot.step-1 { --step: var(--s1); --stepSoft: var(--s1Soft); }
.mini-step.step-2, .bar-dot.step-2 { --step: var(--s2); --stepSoft: var(--s2Soft); }
.mini-step.step-3, .mini-step.step-4, .bar-dot.step-3, .bar-dot.step-4 { --step: var(--s3); --stepSoft: var(--s3Soft); }
.mini-step.is-done { background: var(--stepSoft); color: var(--step); }
.mini-step.is-active { background: var(--step); color: #fff; box-shadow: 0 0 22px color-mix(in oklab, var(--step) 45%, transparent); }
.mini-link { flex: 1; height: 2px; border-radius: 1px; background: var(--line); overflow: hidden; }
.mini-link > span { display: block; height: 100%; width: 0; transition: width .35s; }
.mini-link.is-lit > span { width: 100%; }
.mini-link.link-1 > span { background: var(--s1); } .mini-link.link-2 > span { background: var(--s2); }
.mini-link.link-3 > span, .mini-link.link-4 > span { background: var(--s3); }

.companion-foot { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-top: 1px solid var(--line); background: var(--composer); }
.companion-status { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.companion-title { font-size: 0.86rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { display: flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip .icon { font-size: 12px; }

.mic.is-46 { width: 46px; height: 46px; margin-left: 0; } .mic.is-46 .icon { font-size: 23px; }
.mic.is-40 { width: 40px; height: 40px; margin-left: 0; } .mic.is-40 .icon { font-size: 21px; }

.companion-bar {
  width: 560px; max-width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 999px;
  background: var(--composer); backdrop-filter: blur(18px); border: 1px solid var(--lineStrong); box-shadow: 0 18px 50px rgba(0,0,0,.45); cursor: grab;
}
.orb-button { flex: none; border: none; background: none; padding: 0; display: grid; place-items: center; }
.orb-button:disabled { opacity: 1; }
.orb-34 { width: 34px; height: 34px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), inset 0 -6px 14px rgba(0,0,0,.35), 0 6px 20px rgba(110,80,255,.5); transition: transform .12s linear; }
.bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.bar-main { font-size: 0.98rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-sub { font-size: 0.74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-dots { display: flex; gap: 4px; flex: none; }
.bar-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lineStrong); transition: background .25s; }
.bar-dot.is-done { background: color-mix(in oklab, var(--step) 55%, transparent); }
.bar-dot.is-active { background: var(--step); box-shadow: 0 0 22px color-mix(in oklab, var(--step) 45%, transparent); }

/* ---------- Pages (Modules, Settings) ---------- */

.page-column { max-width: 940px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; flex-direction: column; gap: 4px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 0; color: var(--muted); }

.pill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill-count { font-size: 0.7rem; color: var(--muted); }
.pill-select { border: none; background: transparent; color: var(--text); outline: none; font-size: 0.84rem; }
.notice.is-inline { margin: 0; }

.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.summary-card { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.summary-card.is-column { flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; }
.summary-icon { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--accentSoft); color: var(--accent); }
.summary-text { display: flex; flex-direction: column; min-width: 0; }
.summary-text > span:first-child { font-weight: 500; }
.summary-text > span:last-child { font-size: 0.82rem; color: var(--muted); }
.summary-disk { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 0.86rem; }
.summary-disk > span:first-child { display: flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.summary-disk > span:first-child .icon { color: var(--muted); }
.summary-disk > span:last-child { color: var(--muted); }

.meter { height: 5px; border-radius: 3px; background: var(--glass2); overflow: hidden; }
.meter > div { height: 100%; background: var(--accent); box-shadow: 0 0 8px var(--accent); transition: width .1s linear; }

.module-list { display: flex; flex-direction: column; gap: 8px; }
.module-card {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  border-radius: 18px; padding: 15px 16px; background: var(--glass); border: 1px solid var(--line);
}
.module-card.is-recommended { border-color: color-mix(in oklab, var(--accent) 40%, transparent); }
.module-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--glass2); border: 1px solid var(--line); color: var(--muted); }
.module-icon.kind-s1 { background: var(--s1Soft); color: var(--s1); }
.module-icon.kind-s2 { background: var(--s2Soft); color: var(--s2); }
.module-icon.kind-s3 { background: var(--s3Soft); color: var(--s3); }
.module-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.module-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.module-title > span:first-child { font-weight: 500; }
.module-text { color: var(--muted); font-size: 0.86rem; }
.module-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }

.badge-pill { display: flex; align-items: center; gap: 3px; font-size: 0.7rem; font-weight: 500; border-radius: 999px; padding: 2px 8px; }
.badge-pill .icon { font-size: 12px; }
.badge-pill.is-accent { color: var(--accent); background: var(--accentSoft); }
.badge-pill.is-success { color: var(--success); background: var(--successSoft); }
.badge-pill.is-s2 { color: var(--s2); background: var(--s2Soft); }

.spec { display: flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.76rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.spec .icon { color: var(--muted); }
.spec .dots { margin-left: 2px; }
.dots { display: flex; gap: 2px; }
.dots > span { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.dots-s1 > .is-on { background: var(--s1); }
.dots-s2 > .is-on { background: var(--s2); }

.module-fit { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; }
.fit-success { color: var(--success); } .fit-warn { color: var(--warn); } .fit-danger { color: var(--danger); }

.module-buttons { display: flex; align-items: center; gap: 8px; }
.download { display: flex; flex-direction: column; gap: 5px; width: 150px; }
.download > span { font-size: 0.74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.round-button { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--lineStrong); background: var(--pill); color: var(--text); display: grid; place-items: center; padding: 0; }
.round-button.is-danger { color: var(--danger); }
.button-primary.is-compact { font-weight: 500; font-size: 0.86rem; }

@media (max-width: 720px) {
  .module-card { grid-template-columns: 42px minmax(0, 1fr); }
  .module-buttons { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---------- Settings ---------- */

.page-head.is-row { flex-direction: row; align-items: flex-start; gap: 12px; }
.page-head.is-row > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.toast { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--successSoft); color: var(--success); font-size: 0.82rem; font-weight: 500; white-space: nowrap; }
.info-line { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); font-size: 0.88rem; }
.info-line .icon { color: var(--muted); }

.section { display: flex; flex-direction: column; gap: 10px; }
.section-title { font-size: 0.95rem; margin: 0; font-weight: 500; color: var(--muted); }
.section-title.is-strong { color: var(--text); display: flex; align-items: center; gap: 8px; }
.section-title.is-strong .icon { color: var(--muted); }

.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 10px; }
.profile-card { display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); color: var(--text); }
.profile-card.is-selected { border-color: color-mix(in oklab, var(--accent) 65%, transparent); background: var(--accentSoft); box-shadow: 0 0 30px var(--accentSoft); }
.profile-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.profile-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--glass2); border: 1px solid var(--line); color: var(--accent); }
.profile-radio { color: var(--border); }
.is-selected .profile-radio { color: var(--accent); }
.profile-name { display: flex; flex-direction: column; gap: 2px; }
.profile-name > span:first-child { font-weight: 600; font-size: 1rem; }
.profile-name > span:last-child { font-size: 0.82rem; color: var(--muted); }
.profile-stats { display: flex; flex-direction: column; gap: 5px; font-size: 0.78rem; width: 100%; }
.profile-stats > span { display: flex; align-items: center; gap: 6px; }
.profile-stats .icon { color: var(--muted); }
.profile-stats > span > span:nth-child(2) { flex: 1; color: var(--muted); }
.profile-stats > span > span:last-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-stats > span > span:last-child { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.profile-fit { display: flex; align-items: center; gap: 5px; font-size: 0.76rem; padding-top: 9px; border-top: 1px solid var(--line); width: 100%; }
.fit-muted { color: var(--muted); } .fit-accent { color: var(--accent); }

.callout { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-radius: 14px; background: var(--accentSoft); border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent); }
.callout > .icon { color: var(--accent); }
.callout > span:nth-child(2) { flex: 1; font-size: 0.9rem; }

.panel-card { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.panel-card.is-rows { padding: 4px 20px; gap: 0; }
.panel-card.is-tight { gap: 12px; }
.panel-card.is-wide-gap { gap: 18px; }

.switch-row { display: flex; align-items: center; gap: 12px; }
.switch-row > .icon { color: var(--muted); }
.switch-row > div { flex: 1; display: flex; flex-direction: column; }
.switch-row > div > span:last-child { font-size: 0.82rem; color: var(--muted); }
.switch { width: 42px; height: 24px; flex: none; border-radius: 12px; border: none; padding: 2px; background: var(--lineStrong); display: flex; transition: background .2s; }
.switch > span { width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch.is-on { background: var(--primary); box-shadow: 0 0 12px var(--glow); }
.switch.is-on > span { transform: translateX(18px); }

.group { display: flex; flex-direction: column; gap: 8px; }
.group-title { font-size: 0.88rem; font-weight: 500; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--text); }
.choice > .icon { font-size: 24px; color: var(--muted); }
.choice > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.choice > span:last-child > span:first-child { font-weight: 500; }
.choice > span:last-child > span:last-child { font-size: 0.8rem; color: var(--muted); }
.choice.is-selected { border-color: color-mix(in oklab, var(--accent) 65%, transparent); background: var(--accentSoft); }
.choice.is-selected > .icon { color: var(--accent); }

.device-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.device { display: flex; flex-direction: column; gap: 6px; }
.device-row { display: flex; gap: 8px; }
.label { font-size: 0.8rem; color: var(--muted); }
.input { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--lineStrong); background: var(--pill); color: var(--text); }
.gauge.is-wide { max-width: none; }

.disclosure { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); color: var(--text); text-align: left; }
.disclosure > .icon { color: var(--muted); }
.disclosure > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.disclosure > span:nth-child(2) > span:first-child { font-weight: 500; }
.disclosure > span:nth-child(2) > span:last-child { font-size: 0.82rem; color: var(--muted); }

.engine-row { display: grid; grid-template-columns: 34px 120px auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); }
.engine-row:last-child { border-bottom-color: transparent; }
.engine-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.engine-icon.kind-s1 { background: var(--s1Soft); color: var(--s1); }
.engine-icon.kind-s2 { background: var(--s2Soft); color: var(--s2); }
.engine-icon.kind-s3 { background: var(--s3Soft); color: var(--s3); }
.engine-name { font-weight: 500; }
.engine-detail { font-size: 0.86rem; color: var(--muted); min-width: 0; }
.segment { display: flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--pill); }
.segment > button { display: flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; border: none; background: transparent; color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.segment > button.is-on { background: var(--accentSoft); color: var(--text); }

.input-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.labelled { display: flex; flex-direction: column; gap: 5px; }
.fine-line { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); flex: 1; }

.slider { display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.slider > span { display: flex; justify-content: space-between; }
.slider > span:first-child > span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); }
.slider > span:last-child { font-size: 0.76rem; color: var(--muted); }

@media (max-width: 720px) {
  .engine-row { grid-template-columns: 34px 1fr; }
  .engine-row .segment, .engine-detail { grid-column: 1 / -1; }
}

/* ---------- First-launch assistant ---------- */

.welcome { flex: 1; margin: 8px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); overflow-y: auto; display: flex; justify-content: center; padding: 36px 24px; }
.welcome-column { width: 100%; max-width: 680px; display: flex; flex-direction: column; gap: 22px; }
.welcome-brand { display: flex; align-items: center; gap: 10px; }
.welcome-brand > .pill { margin-left: auto; }
.welcome-progress { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 8px 0 4px; }
.welcome-orb { animation: ova-float 5s ease-in-out infinite; }
.orb-64 { width: 64px; height: 64px; }
.welcome-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.welcome-step { display: flex; align-items: center; gap: 6px; padding: 5px 11px 5px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--pill); color: var(--muted); font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
.welcome-step.is-current { border-color: color-mix(in oklab, var(--accent) 55%, transparent); background: var(--accentSoft); color: var(--text); }
.welcome-step.is-current .icon { color: var(--accent); }
.welcome-step.is-done { color: var(--text); }
.welcome-step.is-done .icon { color: var(--success); }

.welcome-card { background: var(--glass); border: 1px solid var(--line); border-radius: 22px; padding: 28px 30px; display: flex; flex-direction: column; gap: 20px; backdrop-filter: blur(14px); }
.welcome-title { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.welcome-title h1 { margin: 0; }
.welcome-title p { margin: 0; color: var(--muted); }

.language-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: end; }
.language-field { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--lineStrong); background: var(--pill); }
.language-field > span { font-size: 0.78rem; color: var(--muted); }
.language-field select { border: none; background: transparent; color: var(--text); font-size: 1.05rem; font-weight: 600; padding: 0; outline: none; width: 100%; min-width: 0; }
.swap-round { width: 44px; height: 44px; margin-bottom: 12px; border-radius: 50%; border: 1px solid var(--lineStrong); background: var(--pill); color: var(--text); display: grid; place-items: center; padding: 0; }

.tip { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--glass2); color: var(--muted); font-size: 0.88rem; }
.tip > .icon { color: var(--accent); }
.tip.is-plain { color: var(--text); }
.tip.is-plain > .icon { color: var(--muted); }
.tip.is-plain > span:nth-child(2), .tip.is-error > span:nth-child(2) { flex: 1; }
.tip.is-plain > span:last-child { color: var(--muted); white-space: nowrap; }
.tip.is-error { background: var(--dangerSoft); color: var(--text); }
.tip.is-error > .icon { color: var(--danger); }

.spec-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pill.is-small { padding: 5px 11px; font-size: 0.8rem; }
.pill.is-small .icon { color: var(--muted); }
.pill.is-large { padding: 9px 16px; }
.button-primary.is-large { gap: 8px; padding: 9px 20px; }

.option-list { display: flex; flex-direction: column; gap: 8px; }
.option { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; text-align: left; padding: 13px 15px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); color: var(--text); }
.option.is-selected { border-color: color-mix(in oklab, var(--accent) 65%, transparent); background: var(--accentSoft); box-shadow: 0 0 30px var(--accentSoft); }
.option-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--glass2); border: 1px solid var(--line); color: var(--accent); }
.option-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.option-text > span:first-child { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.option-text > span:nth-child(2) { font-size: 0.84rem; color: var(--muted); }
.option-text > span:last-child { font-size: 0.8rem; display: flex; align-items: center; gap: 4px; }
.option-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.badge-pill.is-strong { font-weight: 600; }

.download-list { display: flex; flex-direction: column; gap: 12px; }
.download-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) 70px; gap: 12px; align-items: center; --stage: var(--s3); --stageSoft: var(--s3Soft); }
.download-item.kind-s1 { --stage: var(--s1); --stageSoft: var(--s1Soft); }
.download-item.kind-s2 { --stage: var(--s2); --stageSoft: var(--s2Soft); }
.download-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--stageSoft); color: var(--stage); }
.download-item > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.download-item > div > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 0.9rem; }
.download-item > div > div:first-child > span:first-child { font-weight: 600; }
.download-item > div > div:first-child > span:last-child { color: var(--muted); }
.download-item > span:last-child { text-align: right; font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.meter.is-stage > div { background: var(--stage); box-shadow: 0 0 10px var(--stage); }

.mic-test { display: flex; align-items: center; gap: 20px; padding: 20px; border-radius: 16px; background: var(--glass2); border: 1px solid var(--line); }
.mic-test-icon { width: 60px; height: 60px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--glass2); color: #fff; transition: background .3s; }
.mic-test-icon .icon { font-size: 28px; }
.mic-test-icon.is-voice { background: var(--primary); box-shadow: 0 0 24px var(--glow); }
.mic-test-icon.is-ok { background: linear-gradient(180deg, #5ee39a, #16a34a); box-shadow: 0 0 24px rgba(74,222,128,.4); }
.mic-test > div { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.mic-test > div > div:first-child { font-weight: 600; }
.mic-test > div > div:last-child { font-size: 0.8rem; color: var(--muted); }
.gauge.is-thick { height: 8px; border-radius: 4px; }
.labelled.is-narrow { max-width: 420px; }
.input.is-tall { padding: 10px 12px; }

.welcome-actions { display: flex; justify-content: space-between; gap: 10px; padding-top: 4px; }

@media (max-width: 720px) {
  .welcome { margin: 0; border-radius: 0; border: none; padding: 20px 14px; }
  .welcome-card { padding: 20px 16px; }
  .language-grid { grid-template-columns: 1fr; }
  .swap-round { margin: 0 auto; }
  .option { grid-template-columns: 40px minmax(0, 1fr); }
  .option-side { grid-column: 1 / -1; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-orb { animation: none; }
}

/* ---------- Meeting ---------- */

.meeting-intro { max-width: 720px; text-wrap: pretty; }
.meeting-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.meeting-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.meeting-card.is-in { border-color: color-mix(in oklab, var(--s1) 40%, transparent); }
.meeting-card.is-out { border-color: color-mix(in oklab, var(--s2) 40%, transparent); }
.meeting-card-head { display: flex; align-items: flex-start; gap: 12px; }
.meeting-tile { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; }
.meeting-tile.is-in { background: var(--s1Soft); color: var(--s1); }
.meeting-tile.is-out { background: var(--s2Soft); color: var(--s2); }
.meeting-card-title { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.meeting-card-title > span:first-child { font-weight: 600; font-size: 1.02rem; }
.meeting-card-title > span:last-child { font-size: 0.84rem; color: var(--muted); }
.meeting-field { display: flex; flex-direction: column; gap: 8px; }
.meeting-field > span { font-size: 0.8rem; color: var(--muted); }
.meeting-segment { align-self: flex-start; }
.meeting-segment > button { padding: 5px 12px; }
.meeting-running { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px var(--success); }
.meeting-note { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--glass2); font-size: 0.88rem; }
.meeting-note .icon { color: var(--muted); }
.meeting-note > span:last-child { flex: 1; }
.meeting-note b, .meeting-howto b { font-weight: 600; color: var(--text); }
.meeting-check { display: flex; align-items: center; gap: 10px; padding: 0; border: none; background: none; color: var(--text); text-align: left; }
.meeting-check > .icon { color: var(--muted); }
.meeting-check > .icon.is-on { color: var(--accent); }
.meeting-check > span:last-child { display: flex; flex-direction: column; line-height: 1.4; }
.meeting-check > span:last-child > span:first-child { font-size: 0.9rem; }
.meeting-check > span:last-child > span:last-child { font-size: 0.78rem; color: var(--muted); }
.meeting-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 0.88rem; }
.meeting-banner.is-success { background: var(--successSoft); color: var(--success); }
.meeting-banner.is-warn { gap: 12px; padding: 10px 10px 10px 12px; background: var(--warnSoft); }
.meeting-banner.is-warn > .icon { color: var(--warn); }
.meeting-banner-text { flex: 1; display: flex; flex-direction: column; font-size: 0.86rem; }
.meeting-banner-text > span:first-child { font-weight: 500; }
.meeting-banner-text > span:last-child { color: var(--muted); font-size: 0.8rem; }
.meeting-howto { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--glass2); font-size: 0.84rem; }
.meeting-howto > span:first-child { font-weight: 500; }
.meeting-howto > span:last-child { color: var(--muted); }
.meeting-test { display: flex; align-items: center; gap: 10px; }
.meeting-test > span { font-size: 0.84rem; color: var(--muted); }
.meeting-test > span.is-success { color: var(--success); }
.meeting-test > span.is-error, .meeting-start > span.is-error { color: var(--danger); }
.meeting-consent { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); font-size: 0.9rem; }
.meeting-consent > .icon { color: var(--accent); }
.meeting-consent > span:not(.icon) { flex: 1; text-wrap: pretty; }
.meeting-consent.is-copied { gap: 10px; padding: 12px 16px; border-color: transparent; background: var(--successSoft); color: var(--success); }
.meeting-consent.is-copied > .icon { color: inherit; }
.meeting-start { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 4px; }
.meeting-start > span { font-size: 0.84rem; color: var(--muted); }
.button-primary.meeting-start-button { gap: 10px; padding: 12px 22px; font-size: 1rem; }

/* The meeting windows are transparent: only the panel, the subtitle and their shadows show. */
html:has(.meeting-stage), html:has(.meeting-stage) body, html:has(.caption-stage), html:has(.caption-stage) body { background: transparent; overflow: hidden; }

.meeting-stage { position: fixed; inset: 0; display: flex; padding: 44px; color: var(--text); }
.meeting-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: 22px; background: var(--panel); border: 1px solid var(--lineStrong); box-shadow: 0 24px 60px rgba(0,0,0,.45); overflow: hidden; }
.meeting-panel-top { display: flex; align-items: center; gap: 8px; padding: 12px 10px 10px 14px; cursor: grab; }
.orb-24 { width: 24px; height: 24px; box-shadow: inset 0 -5px 10px rgba(0,0,0,.35), 0 4px 14px rgba(110,80,255,.45); }
.orb-14 { width: 14px; height: 14px; box-shadow: inset 0 -5px 10px rgba(0,0,0,.35), 0 4px 14px rgba(110,80,255,.45); }
.meeting-panel-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.meeting-panel-title > span:first-child { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meeting-panel-title > span:last-child { font-size: 0.74rem; color: var(--muted); display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.meeting-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.pill.meeting-end { padding: 6px 12px; color: var(--danger); }
.meeting-lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 10px; }
.meeting-lane { display: flex; flex-direction: column; gap: 6px; padding: 10px 11px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); color: var(--text); text-align: left; }
.meeting-lane > span:first-child { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; }
.meeting-lane.is-in { --lane: var(--s1); --laneSoft: var(--s1Soft); }
.meeting-lane.is-out { --lane: var(--s2); --laneSoft: var(--s2Soft); }
.meeting-lane .icon { color: var(--lane); }
.meeting-lane.is-on { border-color: color-mix(in oklab, var(--lane) 45%, transparent); background: var(--laneSoft); }
.meeting-lane-state { margin-left: auto; font-size: 0.7rem; font-weight: 500; color: var(--muted); }
.meeting-lane.is-on .meeting-lane-state { color: var(--lane); }
.meeting-level { height: 4px; border-radius: 2px; background: var(--glass2); overflow: hidden; }
.meeting-level > span { display: block; height: 100%; background: var(--lane); transition: width .1s linear; }
.meeting-feed { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column-reverse; gap: 12px; padding: 8px 14px 12px; border-top: 1px solid var(--line); }
.meeting-bubble { display: flex; flex-direction: column; gap: 4px; max-width: 92%; padding: 9px 12px; border-radius: 14px; }
.meeting-bubble.is-in { align-self: flex-start; background: var(--glass); border: 1px solid var(--line); }
.meeting-bubble.is-out { align-self: flex-end; background: var(--s2Soft); border: 1px solid color-mix(in oklab, var(--s2) 30%, transparent); }
.meeting-who { display: flex; align-items: center; gap: 5px; font-size: 0.7rem; color: var(--muted); white-space: nowrap; }
.meeting-bubble.is-in .meeting-who .icon { color: var(--s1); }
.meeting-bubble.is-out .meeting-who .icon { color: var(--s2); }
.meeting-target { font-size: 0.98rem; line-height: 1.4; }
.meeting-source { font-size: 0.76rem; color: var(--muted); }
.meeting-status { display: flex; align-items: center; gap: 4px; font-size: 0.7rem; }
.meeting-status .icon { font-size: 13px; }
.meeting-error { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--dangerSoft); color: var(--danger); font-size: 0.86rem; }
.meeting-foot { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--composer); }
.meeting-foot .chips { flex: 1; min-width: 0; }
.meeting-foot .chip { padding: 2px 8px; }
.meeting-mic { width: 48px; height: 48px; flex: none; border-radius: 50%; border: none; background: var(--glass2); color: var(--text); display: grid; place-items: center; }
.meeting-mic.is-on { background: var(--primary); color: #fff; box-shadow: 0 4px 16px var(--glow); }
.meeting-mic .icon { font-size: 24px; }

.caption-stage { position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 44px; }
.caption { width: max-content; max-width: 680px; display: flex; flex-direction: column; gap: 4px; padding: 12px 18px; border-radius: 14px; background: rgba(8,6,12,.82); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.1); color: #fff; box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.caption-head { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; color: rgba(255,255,255,.6); }
.caption-text { font-size: 1.25rem; font-weight: 500; line-height: 1.35; text-wrap: pretty; }

/* ---------- Phone and tablet ---------- */

.mobile {
  height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; color: var(--text); font-size: 15px; line-height: 1.45;
  background: radial-gradient(90% 55% at 90% -10%, var(--glowA) 0%, rgba(140,70,190,0) 60%), radial-gradient(70% 40% at 40% 15%, var(--glowB) 0%, rgba(90,40,130,0) 70%), var(--bg);
  padding-top: env(safe-area-inset-top);
}
.mobile a { color: inherit; text-decoration: none; }
.text-normal { --textScale: 1; } .text-large { --textScale: 1.18; } .text-xlarge { --textScale: 1.38; }

/* On a tablet the screens made for a phone keep a readable width, centered. */
.m-screen { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; overflow-y: auto; width: 100%; max-width: 760px; margin: 0 auto; }
.m-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
.m-dot.is-off { background: var(--muted); box-shadow: none; }
.m-dot.is-live { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.m-round { width: 44px; height: 44px; flex: none; border-radius: 50%; border: none; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; }
.m-round.is-outlined { border: 1px solid var(--lineStrong); background: var(--pill); color: var(--text); }
.m-note { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; color: var(--muted); }
.m-note.is-centered { justify-content: center; text-align: center; }
.m-note.is-error, .is-error { color: var(--danger); }
.m-title { margin: 0; font-size: 1.7rem; font-weight: 500; letter-spacing: -0.02em; }
.orb.is-floating, .is-floating > .orb { animation: ova-float 5s ease-in-out infinite; }

/* Tab bar */
.m-tabs { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); flex: none; margin: auto 12px 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 6px; border-radius: 26px; background: var(--composer); border: 1px solid var(--lineStrong); backdrop-filter: blur(18px); }
.m-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 44px; font-size: 0.68rem; color: var(--muted); }
.mobile a.m-tab { color: var(--muted); }
.mobile a.m-tab.is-on { font-weight: 600; color: var(--text); }
.m-tab .icon { font-size: 23px; }
.m-tab.is-on .icon { color: var(--accent); }
.m-tab.is-disabled { opacity: .45; }

/* Home */
.m-home { padding: 14px 18px calc(12px + env(safe-area-inset-bottom)); gap: 16px; }
.m-top { display: flex; align-items: center; gap: 10px; }
.m-brand { flex: 1; font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; }
.m-pc { display: flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--lineStrong); background: var(--pill); font-size: 0.78rem; white-space: nowrap; }
.m-languages { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: center; gap: 6px; padding: 8px; border-radius: 20px; background: var(--composer); border: 1px solid var(--lineStrong); }
.m-language { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 6px 10px; }
.m-language.is-right { text-align: right; }
.m-language > span:first-child { font-size: 0.72rem; color: var(--muted); }
.m-language > span:nth-child(2) { font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-language > select { position: absolute; inset: 0; width: 100%; opacity: 0; }
.m-swap { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--lineStrong); background: var(--pill); color: var(--text); display: grid; place-items: center; padding: 0; }
.m-talk { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0 6px; text-align: center; }
.m-talk-orb { border: none; background: none; padding: 0; display: grid; place-items: center; }
.m-talk-orb:disabled { opacity: .7; }
.m-talk-orb.is-floating { animation: ova-float 5s ease-in-out infinite; }
.orb-104 { width: 104px; height: 104px; transition: transform .12s linear; }
.orb-76 { width: 76px; height: 76px; }
.m-talk-title { font-size: 1.35rem; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
.m-talk-sub { font-size: 0.84rem; color: var(--muted); text-wrap: pretty; }
.m-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-mode { display: flex; flex-direction: column; gap: 8px; padding: 14px; min-height: 112px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.m-mode.is-disabled { opacity: .5; }
.m-mode-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; }
.m-mode-icon.is-s1 { background: var(--s1Soft); color: var(--s1); } .m-mode-icon.is-s2 { background: var(--s2Soft); color: var(--s2); }
.m-mode-icon.is-s3 { background: var(--s3Soft); color: var(--s3); } .m-mode-icon.is-success { background: var(--successSoft); color: var(--success); }
.m-mode-name { font-weight: 600; font-size: 0.95rem; }
.m-mode-text { font-size: 0.76rem; color: var(--muted); line-height: 1.35; }

/* Face to face */
.m-face { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.m-face-half { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.m-face-half.is-theirs { transform: rotate(180deg); padding: 30px 24px 28px; background: radial-gradient(90% 70% at 50% 100%, rgba(96,150,255,.22) 0%, rgba(96,150,255,0) 70%), var(--bg); }
.m-face-half.is-mine { padding: 22px 24px calc(28px + env(safe-area-inset-bottom)); background: radial-gradient(90% 70% at 50% 100%, rgba(168,85,247,.25) 0%, rgba(168,85,247,0) 70%), var(--bg); }
.m-face-head { display: flex; align-items: center; justify-content: space-between; }
.m-face-head > span:first-child { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); }
.m-face-status { font-size: 0.74rem; }
.m-face-text { font-size: calc(1.6rem * var(--textScale, 1)); font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; text-wrap: pretty; }
.m-face-source { font-size: 0.84rem; color: var(--muted); }
.m-face-source.is-error { color: var(--danger); }
.m-face-mic { margin-top: auto; display: flex; justify-content: center; }
.m-mic-plain { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--lineStrong); background: var(--pill); color: var(--muted); display: grid; place-items: center; padding: 0; }
.m-mic-plain.is-on { color: var(--s1); }
.m-mic-plain .icon { font-size: 28px; }
.m-mic-main { width: 72px; height: 72px; border-radius: 50%; border: none; background: linear-gradient(180deg, var(--accent), #7c3aed); color: #fff; display: grid; place-items: center; padding: 0; box-shadow: 0 4px 20px rgba(168,85,247,.5), inset 0 1px 0 rgba(255,255,255,.28); }
.m-mic-main.is-listening { background: linear-gradient(180deg, #ff7d7d, #dc2626); box-shadow: 0 4px 16px rgba(220,38,38,.4); }
.m-mic-main .icon { font-size: 32px; }
.m-face-bar { flex: none; display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 16px; background: var(--composer); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.m-face-pair { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 0.84rem; font-weight: 500; }
.m-face-pair .orb { box-shadow: none; }
.m-face-pair .orb.is-live { box-shadow: 0 0 22px rgba(168,85,247,.55); }

/* Listening to a speaker */
.m-listen { overflow: hidden; }
.m-listen-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.m-listen-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.m-listen-title > span:first-child { font-weight: 600; }
.m-listen-title > span:last-child { display: flex; align-items: center; gap: 5px; font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.m-steps { display: flex; justify-content: center; align-items: center; padding: 0 16px 14px; }
.m-steps.is-end { margin-left: auto; padding: 0; }
.m-step { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--glass2); color: var(--muted); transition: all .25s; }
.m-step.is-30 { width: 30px; height: 30px; }
.m-step.step-0 { --step: var(--success); --stepSoft: var(--successSoft); } .m-step.step-1 { --step: var(--s1); --stepSoft: var(--s1Soft); }
.m-step.step-2 { --step: var(--s2); --stepSoft: var(--s2Soft); } .m-step.step-3 { --step: var(--s3); --stepSoft: var(--s3Soft); }
.m-step.is-done { background: var(--stepSoft); color: var(--step); }
.m-step.is-active { background: var(--step); color: #fff; box-shadow: 0 0 16px color-mix(in oklab, var(--step) 60%, transparent); }
.m-step-link { width: 30px; height: 2px; background: var(--line); }
.m-step-link.is-short { width: 24px; }
.m-step-link.is-lit.link-1 { background: var(--s1); } .m-step-link.is-lit.link-2 { background: var(--s2); } .m-step-link.is-lit.link-3 { background: var(--s3); }
.m-transcript { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; padding: 0 24px 18px; overflow: hidden; }
.m-previous { font-size: calc(1.05rem * var(--textScale, 1)); line-height: 1.4; color: var(--muted); }
.m-previous.age-2 { color: var(--text); opacity: .3; } .m-previous.age-1 { color: var(--text); opacity: .55; }
.m-current { display: flex; flex-direction: column; gap: 8px; }
.m-current-text { font-size: calc(1.7rem * var(--textScale, 1)); font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; text-wrap: pretty; }
.m-current-source { display: flex; gap: 6px; font-size: 0.84rem; color: var(--muted); }
.m-current-source .icon { color: var(--accent); }
.m-composer { flex: none; margin: 0 12px calc(18px + env(safe-area-inset-bottom)); padding: 14px; border-radius: 24px; background: var(--composer); border: 1px solid var(--lineStrong); display: flex; flex-direction: column; gap: 12px; }
.m-composer.is-on { border-color: var(--accentLine); box-shadow: 0 0 0 4px var(--accentSoft); }
.m-composer-main { display: flex; align-items: center; gap: 10px; }
.m-composer-main > .icon { color: var(--accent); }
.m-composer-status { flex: 1; display: flex; flex-direction: column; gap: 5px; font-size: 0.9rem; }
.m-composer-status .gauge { max-width: 200px; }
.m-action { width: 52px; height: 52px; flex: none; border-radius: 50%; border: none; background: var(--primary); color: #fff; display: grid; place-items: center; padding: 0; box-shadow: var(--primaryShadow); }
.m-action.is-stop { background: linear-gradient(180deg, #ff7d7d, #dc2626); box-shadow: 0 4px 16px rgba(220,38,38,.4); }
.m-action .icon { font-size: 26px; }
.m-action.is-56 { width: 56px; height: 56px; } .m-action.is-56 .icon { font-size: 28px; }
.m-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.m-chip { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--lineStrong); background: var(--pill); font-size: 0.8rem; color: var(--muted); }
.m-chip.is-on { border-color: var(--accentLine); background: var(--accentSoft); color: var(--text); }

/* Subtitles */
.m-subtitles { flex: 1; min-height: 0; display: flex; }
.m-subtitles-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 28px 44px 36px; }
.m-subtitles-main.is-turned { transform: rotate(180deg); }
.m-subtitles-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.m-subtitles-top .pill { font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.m-subtitles-text { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 22px; max-width: 820px; overflow: hidden; }
.m-subtitle-previous { font-size: calc(1.7rem * var(--textScale, 1)); line-height: 1.35; }
.m-subtitle-previous.age-2 { opacity: .3; } .m-subtitle-previous.age-1 { opacity: .55; }
.m-subtitle { display: flex; flex-direction: column; gap: 12px; }
.m-subtitle-text { font-size: calc(3.4rem * var(--textScale, 1)); font-weight: 500; line-height: 1.15; letter-spacing: -0.025em; text-wrap: pretty; }
.m-subtitle-source { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; color: var(--muted); }
.m-subtitle-source .icon { color: var(--accent); }
.m-subtitles-aside { width: 300px; flex: none; display: flex; flex-direction: column; gap: 14px; padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); border-left: 1px solid var(--line); background: var(--aside); overflow-y: auto; }
.m-aside-brand { display: flex; align-items: center; gap: 10px; }
.m-aside-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.m-aside-brand > span:last-child > span:first-child { font-weight: 600; font-size: 1.1rem; }
.m-aside-brand > span:last-child > span:last-child { font-size: 0.76rem; color: var(--muted); }
.m-aside-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.m-aside-card > span:first-child { font-size: 0.8rem; color: var(--muted); }
.m-sizes { display: flex; gap: 6px; }
.m-sizes > button { flex: 1; height: 44px; border-radius: 12px; border: 1px solid var(--lineStrong); background: transparent; color: var(--text); display: grid; place-items: center; }
.m-sizes > button.is-on { border-color: var(--accentLine); background: var(--accentSoft); }
.m-sizes > .size-0 { font-size: 0.9rem; } .m-sizes > .size-1 { font-size: 1.1rem; } .m-sizes > .size-2 { font-size: 1.35rem; }
.m-aside-stat { display: flex; flex-direction: column; gap: 4px; padding: 11px 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.m-aside-stat > span:first-child { font-size: 0.72rem; color: var(--muted); }
.m-aside-stat > span:last-child { font-weight: 500; }
.m-aside-actions { margin-top: auto; display: flex; align-items: center; gap: 10px; }
.m-aside-status { flex: 1; font-size: 0.9rem; color: var(--muted); }

/* Rows (settings, toggles) */
.m-rows { display: flex; flex-direction: column; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.m-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border: none; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: left; font-size: inherit; }
.m-row:last-child { border-bottom: none; }
.m-row > .icon { color: var(--muted); }
.m-row > span:nth-child(2) { flex: 1; }
.m-row-value { color: var(--muted); font-size: 0.88rem; }
.m-subtitles-aside .m-row { min-height: 52px; gap: 10px; font-size: 0.9rem; }

.m-row.is-select { position: relative; }
.m-row.is-select > select { position: absolute; inset: 0; width: 100%; opacity: 0; }
.m-note.is-warn { padding: 10px 12px; border-radius: 12px; background: var(--warnSoft); color: var(--warn); font-size: 0.84rem; }
.mobile a.m-note.is-warn { color: var(--warn); }
.tag-used { background: var(--s2Soft); color: var(--s2); }

/* Settings */
.m-settings { padding: 14px 16px calc(12px + env(safe-area-inset-bottom)); gap: 10px; }
.m-section { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); }
.m-section .icon { color: var(--accent); }
.m-delay { display: flex; flex-direction: column; gap: 7px; padding: 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.m-delay-head { display: flex; font-size: 0.8rem; font-weight: 500; }
.m-delay-head > span { margin-left: auto; font-weight: 600; }
.m-delay-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.m-delay-legend { display: grid; grid-template-columns: repeat(3, 1fr); font-size: 0.68rem; color: var(--muted); }
.m-delay-legend b { display: block; font-weight: 600; font-size: 0.78rem; }

.m-stat { display: flex; flex-direction: column; gap: 5px; padding: 11px 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.m-stat > span:first-child { display: flex; align-items: center; gap: 5px; font-size: 0.74rem; color: var(--muted); }
.m-stat > span:nth-child(2) { font-size: 1.25rem; font-weight: 500; }
.m-stat > span:nth-child(2) > span { font-size: 0.76rem; color: var(--muted); }
.m-stat > span:last-child { font-size: 0.7rem; color: var(--muted); }

/* History */
.m-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--lineStrong); background: var(--pill); color: var(--muted); }
.m-search > input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: var(--text); font-size: 1rem; }
.m-chips.is-scroll { flex-wrap: nowrap; overflow-x: auto; }
.m-chips.is-scroll > .m-chip { white-space: nowrap; flex: none; }
.m-day { font-size: 0.78rem; color: var(--muted); }
.m-history { display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); color: var(--text); text-align: left; }
.m-history > .icon { color: var(--muted); }
.m-mode-icon.is-40 { width: 40px; height: 40px; flex: none; border-radius: 12px; }
.m-history-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m-history-text > span:first-child { font-weight: 600; }
.m-history-text > span:nth-child(2) { font-size: 0.78rem; color: var(--muted); }
.m-history-text > span:last-child { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-listen-top.is-flush { padding: 0; }
.m-record { display: flex; flex-direction: column; gap: 10px; }
.m-record-line { display: flex; flex-direction: column; gap: 4px; max-width: 92%; padding: 10px 13px; border-radius: 16px; }
.m-record-line.is-out { align-self: flex-end; background: var(--s2Soft); border: 1px solid color-mix(in oklab, var(--s2) 30%, transparent); }
.m-record-line.is-in { align-self: flex-start; background: var(--glass); border: 1px solid var(--line); }
.m-record-text { font-size: 1rem; line-height: 1.4; }
.m-record-source { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--muted); }
.m-record-source .icon { color: var(--accent); }
.m-mark { flex: 1; height: 56px; border-radius: 999px; border: 1px solid var(--lineStrong); background: var(--pill); color: var(--text); display: flex; align-items: center; justify-content: center; gap: 8px; }
.m-mark.is-on { border-color: var(--accentLine); background: var(--accentSoft); }

/* Models */
.m-pc-card { display: flex; flex-direction: column; gap: 6px; padding: 13px 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.m-pc-card > span:first-child { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 500; }
.m-pc-card > span:first-child .icon { color: var(--accent); }
.m-pc-card > span:last-child { font-size: 0.76rem; color: var(--muted); }
.m-chip.is-small { min-height: 0; padding: 8px 13px; font-size: 0.82rem; }
.m-models { display: flex; flex-direction: column; gap: 8px; }
.m-model { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.m-model.is-busy { border-color: var(--accentLine); }
.m-model-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.m-model-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; }
.m-model-name .tag { font-size: 0.68rem; padding: 2px 8px; }
.m-model-desc { font-size: 0.8rem; color: var(--muted); }
.m-chip-count { font-size: 0.7rem; color: var(--muted); }
.m-chip.is-on .m-chip-count { color: var(--accent); }
.m-model-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.m-model-chips > span { display: inline-flex; align-items: center; gap: 5px; }
.m-model-chips > span { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.74rem; }
.m-model-progress { display: flex; align-items: center; gap: 10px; font-size: 0.74rem; color: var(--muted); }
.m-model-progress .bar { flex: 1; height: 5px; border-radius: 3px; background: var(--glass2); overflow: hidden; }
.m-model-progress .bar > span { display: block; height: 100%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.m-install { height: 44px; flex: none; padding: 0 16px; border-radius: 999px; border: none; background: linear-gradient(180deg, var(--accent), #7c3aed); color: #fff; font-weight: 500; display: flex; align-items: center; gap: 6px; }

/* Connection */
.m-connect { padding: 28px 22px calc(28px + env(safe-area-inset-bottom)); gap: 20px; }
.m-connect-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding-top: 10px; }
.m-connect-hero h1 { margin: 0; font-size: 1.65rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
.m-connect-hero p { margin: 0; color: var(--muted); font-size: 0.95rem; text-wrap: pretty; }
.m-connect-form { display: flex; flex-direction: column; gap: 10px; }
.m-field { display: flex; flex-direction: column; gap: 6px; }
.m-field > span { font-size: 0.8rem; color: var(--muted); }
.m-field > input { height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--lineStrong); background: var(--pill); color: var(--text); outline: none; font-size: 1rem; }
.m-field > input:focus { border-color: var(--accentLine); }
.m-found { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--accentLine); box-shadow: 0 0 30px var(--accentSoft); }
.m-note.is-scanned { padding: 10px 12px; border-radius: 12px; background: var(--successSoft); color: var(--success); font-size: 0.84rem; }
.m-connect-label { font-size: 0.8rem; color: var(--muted); }
button.m-found { color: var(--text); text-align: left; border-color: var(--line); box-shadow: none; }
button.m-found.is-on { border-color: var(--accentLine); box-shadow: 0 0 30px var(--accentSoft); }
button.m-found > .icon { color: var(--accent); }
.m-found-icon { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--accentSoft); color: var(--accent); }
.m-found-icon .icon { font-size: 24px; }
.m-found-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-found-text > span:first-child { font-weight: 600; }
.m-found-text > span:last-child { font-size: 0.8rem; color: var(--muted); }
.m-found-state { display: flex; align-items: center; gap: 4px; font-size: 0.76rem; color: var(--success); }
.m-connect-button.is-outlined { background: var(--pill); color: var(--text); border: 1px solid var(--lineStrong); box-shadow: none; }
.m-connect-button.is-outlined .icon { color: var(--accent); }
.m-connect-button { height: 52px; border-radius: 999px; border: none; background: linear-gradient(180deg, var(--accent), #7c3aed); color: #fff; font-weight: 600; font-size: 1rem; box-shadow: 0 4px 16px rgba(168,85,247,.45), inset 0 1px 0 rgba(255,255,255,.28); display: flex; align-items: center; justify-content: center; gap: 8px; }

/* A phone has no room for a side column: the subtitle controls go under the text. */
@media (max-width: 760px) {
  .m-subtitles { flex-direction: column; }
  .m-subtitles-main { padding: 16px 22px 18px; }
  .m-subtitles-top .m-steps { display: none; }
  .m-subtitle-text { font-size: calc(1.9rem * var(--textScale, 1)); }
  .m-subtitle-previous { font-size: calc(1.1rem * var(--textScale, 1)); }
  .m-subtitle-source { font-size: 0.9rem; }
  .m-subtitles-aside { width: auto; max-height: 46%; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border-left: none; border-top: 1px solid var(--line); gap: 10px; }
}

/* What went wrong, shown where there is no console to read it. */
/* ---------- Agent console ---------- */

.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-card { width: min(100%, 400px); display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); }
.gate-text { margin: 0; color: var(--muted); }
.gate-error { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.86rem; color: var(--danger); }
.button-primary.is-wide { justify-content: center; padding: 10px 14px; }

.fatal { position: fixed; inset: 0; z-index: 100; overflow: auto; padding: 24px 18px; background: var(--bg); color: var(--text); }
.fatal h1 { margin: 0 0 8px; font-size: 1.3rem; color: var(--danger); }
.fatal p { margin: 0 0 12px; }
.fatal pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 0.74rem; color: var(--muted); user-select: text; }
