@charset "UTF-8";

:root {
  /* Primitive palette */
  --p-ink-0: oklch(0.13 0.012 120);
  --p-ink-1: oklch(0.17 0.012 120);
  --p-ink-2: oklch(0.22 0.014 120);
  --p-ink-3: oklch(0.29 0.014 120);
  --p-paper: oklch(0.95 0.012 105);
  --p-muted: oklch(0.73 0.018 115);
  --p-lime: oklch(0.89 0.23 124);
  --p-blue: oklch(0.57 0.19 258);
  --p-coral: oklch(0.70 0.18 28);
  --p-coral-dark: oklch(0.29 0.055 28);

  /* Semantic palette */
  --page: var(--p-ink-0);
  --surface: var(--p-ink-1);
  --surface-raised: var(--p-ink-2);
  --line: var(--p-ink-3);
  --text: var(--p-paper);
  --text-muted: var(--p-muted);
  --accent: var(--p-lime);
  --user: var(--p-blue);
  --coach: var(--p-coral);

  /* Component tokens */
  --radius-panel: 22px;
  --radius-bubble: 18px;
  --cut: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  --font-ui: "Arial Narrow", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --font-body: "Trebuchet MS", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --font-mono: "Cascadia Mono", "Noto Sans Mono CJK SC", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { min-width: 320px; background: var(--page); }
body {
  min-height: 100dvh;
  color: var(--text);
  background: var(--page);
  font: 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .2;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, oklch(0.9 0.01 120 / .035) 3px 4px);
}
button, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
button:active { transform: translateY(1px); }
button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
img { display: block; max-width: 100%; }
svg { width: 24px; height: 24px; }
[hidden] { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1600px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--surface);
  clip-path: var(--cut);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-vocab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 7px 12px;
  color: var(--p-ink-0);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 10px;
  box-shadow: inset 0 -2px 0 oklch(0.13 0.012 120 / .2);
  font-size: 13px;
  font-weight: 900;
  transition: filter 160ms ease, box-shadow 160ms ease;
}
.topbar-vocab-button:hover { filter: brightness(1.08); box-shadow: none; }
.topbar-vocab-button svg { width: 20px; height: 20px; }
.topbar-vocab-button span { white-space: nowrap; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  color: var(--p-ink-0);
  background: var(--accent);
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
  transform: rotate(-5deg);
}
.brand-mark svg { width: 32px; height: 32px; }
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong {
  font: 900 clamp(20px, 4vw, 32px)/1 var(--font-ui);
  letter-spacing: -.04em;
}
.brand-copy > span { margin-top: 6px; color: var(--text-muted); font-size: 12px; letter-spacing: .35em; }
.session-status { display: none; align-items: center; gap: 12px; font: 12px/1.2 var(--font-mono); letter-spacing: .1em; }
.session-status b { padding: 8px 10px; color: var(--p-ink-0); background: var(--accent); }
.status-light { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.agents-panel, .chat-panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); }
.agents-panel { padding: 16px; border-radius: var(--radius-panel); }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.micro-label { color: var(--text-muted); font: 700 12px/1.2 var(--font-mono); letter-spacing: .13em; }
.panel-heading h1 { margin-top: 5px; font: 800 20px/1.25 var(--font-ui); }
.agent-count { flex: 0 0 auto; color: var(--accent); font: 700 12px/1 var(--font-mono); }
.agent-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 78vw);
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.agent-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 10px 12px;
  text-align: left;
  background: var(--surface-raised);
  border: 1px solid transparent;
  border-radius: 18px;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.agent-card:hover { border-color: var(--text-muted); }
.agent-card.active { color: var(--p-ink-0); background: var(--accent); }
.agent-card.active:hover { border-color: var(--p-paper); }
.agent-card img { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; border: 2px solid var(--p-paper); }
.agent-info { display: grid; min-width: 0; }
.agent-name { font: 800 18px/1.2 var(--font-ui); }
.agent-name small { margin-left: 8px; font: 700 12px/1 var(--font-mono); letter-spacing: .08em; opacity: .78; }
.agent-scenario { margin-top: 7px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.agent-meta { display: none; }
.daily-note {
  display: none;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 16px 0 2px;
  border-top: 1px solid var(--line);
}
.daily-index { color: var(--accent); font: 700 12px/1 var(--font-mono); }
.daily-note strong { font-size: 15px; }
.daily-note p { color: var(--text-muted); font-size: 13px; }
.daily-time { margin-left: auto; font: 700 12px/1 var(--font-mono); }

.chat-panel { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-panel); }
.chat-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.chat-person { display: flex; align-items: center; gap: 12px; }
.chat-person img { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; }
.chat-person h2 { margin-top: 3px; font: 800 22px/1.15 var(--font-ui); }
.chat-person h2 span { margin-left: 5px; color: var(--text-muted); font: 700 12px/1 var(--font-mono); letter-spacing: .08em; }
.mission-label { display: grid; gap: 3px; padding-left: 12px; border-left: 2px solid var(--accent); }
.mission-label span { color: var(--text-muted); font-size: 12px; }
.mission-label strong { font-size: 14px; }
.message-scroll {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 360px;
  padding: 20px 14px;
  background: oklch(0.145 0.012 120);
}
.message { display: flex; align-items: flex-start; gap: 10px; max-width: 92%; }
.message-avatar { width: 40px; height: 40px; flex: 0 0 auto; object-fit: cover; border-radius: 50%; }
.message-content { display: grid; gap: 7px; min-width: 0; }
.user-message { align-self: flex-end; }
.user-message .message-content { justify-items: end; }
.voice-message {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--p-ink-0);
  background: var(--p-paper);
  border-radius: 14px 14px 14px 4px;
}
.user-message .voice-message { color: var(--p-paper); background: var(--user); border-radius: 14px 14px 4px 14px; }
.audio-symbol { display: grid; place-items: center; }
.audio-symbol svg { width: 19px; height: 19px; }
.waveform { display: flex; align-items: center; gap: 3px; height: 30px; }
.waveform i { display: block; width: 3px; height: var(--bar); max-height: 26px; background: currentColor; border-radius: 2px; opacity: .72; }
.duration { font: 700 12px/1 var(--font-mono); }
.text-bubble {
  position: relative;
  padding: 12px 14px;
  color: var(--p-ink-0);
  background: var(--p-paper);
  border-radius: 6px 16px 16px 16px;
}
.text-bubble > p { overflow-wrap: anywhere; font-size: 16px; line-height: 1.55; }
.user-message .text-bubble { color: var(--p-paper); background: var(--user); border-radius: 16px 6px 16px 16px; }
.message-caption { display: block; margin-top: 8px; font-size: 12px; opacity: .8; }
.message-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; padding-top: 8px; border-top: 1px solid oklch(0.2 0.01 120 / .2); }
.text-toggle { min-height: 44px; padding: 0; color: oklch(0.32 0.02 120); background: transparent; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
details { font-size: 13px; }
summary { display: flex; align-items: center; gap: 3px; min-height: 44px; cursor: pointer; color: oklch(0.32 0.02 120); font-weight: 700; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary svg { width: 18px; height: 18px; transition: transform 160ms ease; }
details[open] summary svg { transform: rotate(180deg); }
.translation { padding: 4px 0 8px; color: oklch(0.29 0.02 120); line-height: 1.65; }

.coach-card {
  position: relative;
  margin: 0 14px;
  padding: 14px 16px;
  background: var(--p-coral-dark);
  border: 2px solid var(--coach);
  border-radius: 18px;
  box-shadow: inset 0 0 0 4px var(--surface);
}
.coach-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid oklch(0.8 0.12 28 / .3); }
.coach-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--p-ink-0); background: var(--coach); border-radius: 50%; }
.coach-icon svg { width: 20px; height: 20px; }
.coach-heading .micro-label { color: var(--p-paper); opacity: .75; }
.coach-heading h3 { margin-top: 3px; font: 800 17px/1.2 var(--font-ui); }
.coach-number { margin-left: auto; color: var(--p-paper); font: 700 12px/1 var(--font-mono); opacity: .75; }
.coach-body { display: grid; gap: 5px; padding-top: 10px; }
.coach-body p:first-child { font-size: 17px; font-weight: 800; }
.coach-body p:last-child { color: var(--p-paper); font-size: 14px; }
.coach-body b { color: var(--p-paper); background: oklch(0.18 0.03 28 / .7); padding: 1px 4px; }
.hint-box { margin: 12px 14px 0; padding: 12px 16px; color: var(--p-ink-0); background: var(--accent); border-radius: 12px; }
.hint-box > span { font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.hint-box p { margin-top: 4px; font-size: 14px; }
.hint-box p:last-child { font-weight: 800; }
.voice-dock {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 18px 14px 20px;
}
.hint-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 8px 10px;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.hint-button:hover { border-color: var(--accent); background: var(--line); }
.hint-button svg { width: 20px; height: 20px; }
.hint-button span { white-space: nowrap; }
.record-button {
  display: flex;
  justify-self: end;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 150px;
  min-height: 64px;
  padding: 6px 18px 6px 8px;
  color: var(--p-ink-0);
  background: var(--accent);
  clip-path: var(--cut);
  transition: filter 160ms ease, transform 160ms ease;
}
.record-button:hover { filter: brightness(1.08); }
.record-ring { display: grid; place-items: center; width: 50px; height: 50px; border: 2px solid var(--p-ink-0); border-radius: 50%; }
.record-ring svg { width: 26px; height: 26px; }
.record-copy { display: grid; text-align: left; line-height: 1.1; }
.record-copy strong { font: 900 18px/1.2 var(--font-ui); }
.record-copy small { margin-top: 4px; font: 700 12px/1 var(--font-mono); }
.input-meta { display: none; justify-self: end; text-align: right; }
.input-meta span { display: block; color: var(--text-muted); font-size: 12px; }
.input-meta b { color: var(--accent); font: 700 12px/1 var(--font-mono); }
.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  color: var(--p-ink-0);
  background: var(--p-paper);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 10px 30px oklch(0.05 0 0 / .45);
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 700;
}

@media (min-width: 600px) {
  .app-shell { padding: 20px 24px 24px; }
  .session-status { display: flex; }
  .agent-list { grid-auto-columns: minmax(270px, 44vw); }
  .agent-card { grid-template-columns: 60px minmax(0, 1fr) auto; }
  .agent-card img { width: 60px; height: 60px; }
  .agent-meta { display: grid; justify-items: end; gap: 6px; }
  .agent-meta b { font: 800 12px/1 var(--font-mono); }
  .agent-meta small { font-size: 12px; opacity: .8; }
  .message-scroll { padding: 24px; }
  .coach-card { margin: 0 24px; }
  .hint-box { margin: 12px 24px 0; }
  .voice-dock { grid-template-columns: 1fr auto 1fr; padding: 20px 24px 24px; }
  .record-button { justify-self: center; }
  .input-meta { display: block; }
  .hint-button { justify-self: start; padding-inline: 16px; }
}

@media (min-width: 900px) {
  .app-shell { display: flex; flex-direction: column; height: 100dvh; min-height: 720px; padding: 24px; overflow: hidden; }
  .topbar { flex: 0 0 80px; margin-bottom: 20px; padding-inline: 20px; }
  .workspace { flex: 1; min-height: 0; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; }
  .agents-panel { display: flex; flex-direction: column; min-height: 0; padding: 20px 16px; }
  .panel-heading { padding-inline: 4px; }
  .panel-heading h1 { font-size: 21px; }
  .agent-list { display: flex; flex-direction: column; gap: 10px; overflow-x: hidden; overflow-y: auto; padding: 2px 4px 8px; }
  .agent-card { flex: 0 0 auto; width: 100%; grid-template-columns: 58px minmax(0, 1fr); min-height: 88px; }
  .agent-card img { width: 58px; height: 58px; }
  .agent-meta { display: none; }
  .daily-note { display: flex; flex-wrap: wrap; margin-top: auto; }
  .chat-panel { min-height: 0; }
  .chat-header { flex: 0 0 auto; min-height: 82px; padding: 14px 24px; }
  .message-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .message { max-width: 78%; }
  .coach-card { flex: 0 0 auto; margin-top: 0; }
  .voice-dock { flex: 0 0 auto; }
}

@media (min-width: 1240px) {
  .app-shell { padding: 28px 32px; }
  .workspace { grid-template-columns: 350px minmax(0, 1fr); gap: 24px; }
  .agents-panel { padding: 22px 18px; }
  .agent-card { grid-template-columns: 62px minmax(0, 1fr) auto; padding: 12px 12px; }
  .agent-card img { width: 62px; height: 62px; }
  .agent-meta { display: grid; }
  .message-scroll { padding: 26px 32px; }
  .message { max-width: 72%; }
  .coach-card { margin-inline: 32px; padding: 14px 20px; }
  .hint-box { margin-inline: 32px; }
  .voice-dock { padding-inline: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Dedicated mobile practice console: collapsed by default, expanded on demand. */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 560px;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  overflow: hidden;
}
.topbar {
  flex: 0 0 46px;
  min-height: 46px;
  margin-bottom: 6px;
  padding: 1px 10px;
}
.brand { gap: 8px; }
.brand-mark { width: 32px; height: 32px; }
.brand-mark svg { width: 22px; height: 22px; }
.brand-copy strong { font-size: 18px; letter-spacing: -.02em; }
.brand-copy > span { margin-top: 3px; font-size: 10px; letter-spacing: .24em; }
.session-status { display: none; }
.workspace { display: block; flex: 1; min-height: 0; }
.agents-panel { display: none; }
.chat-panel { height: 100%; min-height: 0; border-radius: 18px; }
.chat-header { display: none; }
.mobile-agent-ui { display: block; flex: 0 0 auto; background: var(--surface); }
.mobile-agent-row { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 5px 10px; }
.mobile-agent-row > img { width: 36px; height: 36px; flex: 0 0 auto; object-fit: cover; border: 1px solid var(--line); border-radius: 50%; }
.mobile-agent-name { flex: 1; min-width: 0; }
.mobile-agent-name > span { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mobile-agent-name b { overflow: hidden; font: 800 17px/1.2 var(--font-ui); text-overflow: ellipsis; white-space: nowrap; }
.mobile-agent-name small { flex: 0 0 auto; padding: 2px 5px; color: var(--p-ink-0); background: var(--accent); font: 800 11px/1.2 var(--font-mono); }
.mobile-agent-name p { display: none; }
.agent-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 70px;
  min-height: 44px;
  margin-left: auto;
  padding: 8px 10px;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
}
.agent-switch:hover { border-color: var(--accent); }
.agent-switch svg { width: 21px; height: 21px; }
.agent-restart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  white-space: nowrap;
}
.agent-restart:hover { border-color: var(--accent); color: var(--accent); }
.agent-restart:disabled { cursor: not-allowed; opacity: .5; }
.agent-restart:disabled:active { transform: none; }
.mission-fold { border-top: 1px solid var(--line); font-size: 13px; }
.mission-fold summary { gap: 8px; min-height: 44px; padding: 0 12px; color: var(--text-muted); }
.mission-fold summary > span { flex: 0 0 auto; font-size: 12px; }
.mission-fold summary strong { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mission-fold summary svg { flex: 0 0 auto; margin-left: auto; color: var(--accent); }
.mission-fold[open] summary svg { transform: rotate(180deg); }
.mission-fold > p { padding: 0 12px 12px; color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.message-scroll {
  flex: 1;
  min-height: 0;
  gap: 18px;
  padding: 16px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.message { max-width: 94%; gap: 8px; }
.message-avatar { width: 32px; height: 32px; }
.message-content { gap: 6px; }
.voice-message { gap: 8px; padding: 7px 10px; }
.waveform { gap: 2px; }
.waveform i { width: 2px; }
.text-bubble { padding: 10px 12px; }
.listening-state { display: block; color: oklch(0.4 0.02 120); font-size: 12px; }
.message-tools { gap: 4px 14px; }
.coach-card {
  flex: 0 0 auto;
  margin: 0 10px;
  padding: 0 12px;
  border-width: 2px;
  border-radius: 14px;
  box-shadow: none;
}
.coach-heading { min-height: 54px; gap: 9px; padding: 0; color: var(--p-paper); border-bottom: 0; }
.coach-icon { width: 32px; height: 32px; flex: 0 0 auto; }
.coach-heading-copy { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.coach-heading-copy .micro-label { display: none; }
.coach-title { display: block; font: 800 16px/1.2 var(--font-ui); }
.coach-number { font-size: 12px; }
.coach-chevron { width: 20px; height: 20px; flex: 0 0 auto; color: var(--p-paper); transition: transform 160ms ease; }
.coach-card[open] .coach-heading { border-bottom: 1px solid oklch(0.8 0.12 28 / .3); }
.coach-card[open] .coach-chevron { transform: rotate(180deg); }
.coach-body { padding: 12px 0; }
.coach-body p:first-child { font-size: 16px; }
.hint-box { flex: 0 0 auto; margin: 8px 10px 0; }
.voice-dock {
  flex: 0 0 auto;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
}
.hint-button { width: 52px; height: 52px; min-height: 52px; padding: 0; border-radius: 50%; }
.hint-button span { display: none; }
.record-button { justify-self: center; min-width: 166px; min-height: 58px; }
.record-ring { width: 44px; height: 44px; }
.input-meta { display: none; }

.agent-drawer {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: none;
  max-height: 86dvh;
  margin: 0;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 60px oklch(0.05 0 0 / .5);
}
.agent-drawer::backdrop { background: oklch(0.08 0.01 120 / .78); backdrop-filter: blur(4px); }
.drawer-handle { width: 48px; height: 5px; margin: 0 auto 12px; background: var(--line); border-radius: 4px; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drawer-header h2 { margin-top: 4px; font: 800 23px/1.2 var(--font-ui); }
.drawer-close { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; color: var(--text); background: var(--surface-raised); border: 1px solid var(--line); border-radius: 50%; }
.drawer-close:hover { border-color: var(--accent); }
.drawer-intro { margin-top: 8px; color: var(--text-muted); font-size: 13px; }
.mobile-agent-list { display: grid; gap: 10px; margin-top: 16px; }
.mobile-agent-list .agent-card { grid-template-columns: 58px minmax(0, 1fr) auto; width: 100%; min-height: 84px; }
.mobile-agent-list .agent-card img { width: 58px; height: 58px; }
.mobile-agent-list .agent-meta { display: grid; justify-items: end; gap: 6px; }
.mobile-agent-list .agent-meta b { font: 800 12px/1 var(--font-mono); }
.mobile-agent-list .agent-meta small { font-size: 12px; }
.drawer-goal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 16px; padding: 16px 0 0; border-top: 1px solid var(--line); font-size: 13px; }
.drawer-goal > span { color: var(--accent); font: 700 12px/1 var(--font-mono); }
.drawer-goal b { margin-left: auto; font: 700 12px/1 var(--font-mono); }

@media (min-width: 900px) {
  .app-shell { height: 100dvh; min-height: 720px; padding: 24px; overflow: hidden; }
  .topbar { flex: 0 0 80px; min-height: 80px; margin-bottom: 20px; padding: 10px 20px; }
  .brand-mark { width: 52px; height: 52px; }
  .brand-mark svg { width: 32px; height: 32px; }
  .brand-copy strong { font-size: 32px; }
  .session-status { display: flex; }
  .workspace { display: grid; flex: 1; min-height: 0; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; }
  .agents-panel { display: flex; }
  .chat-panel { height: auto; min-height: 0; }
  .mobile-agent-ui { display: none; }
  .chat-header { display: flex; }
  .message-scroll { flex: 1; min-height: 0; gap: 22px; padding: 24px; }
  .message { max-width: 78%; gap: 10px; }
  .message-avatar { width: 40px; height: 40px; }
  .voice-message { gap: 10px; padding: 8px 12px; }
  .waveform { gap: 3px; }
  .waveform i { width: 3px; }
  .text-bubble { padding: 12px 14px; }
  .listening-state { font-size: 12px; }
  .coach-card { margin: 0 24px; padding: 14px 16px; border-radius: 18px; box-shadow: inset 0 0 0 4px var(--surface); }
  .coach-heading { min-height: 0; padding-bottom: 10px; }
  .coach-heading-copy { display: block; }
  .coach-heading-copy .micro-label { display: block; }
  .coach-title { margin-top: 3px; font-size: 17px; }
  .coach-chevron { display: none; }
  .coach-body { padding: 10px 0 0; }
  .coach-body p:first-child { font-size: 17px; }
  .hint-box { margin: 12px 24px 0; }
  .voice-dock { grid-template-columns: 1fr auto 1fr; padding: 20px 24px 24px; }
  .hint-button { width: auto; height: auto; min-height: 48px; padding: 8px 16px; border-radius: 12px; }
  .hint-button span { display: inline; }
  .record-button { min-width: 150px; min-height: 64px; }
  .record-ring { width: 50px; height: 50px; }
  .input-meta { display: block; }
  .agent-drawer { display: none !important; }
}

@media (min-width: 1240px) {
  .app-shell { padding: 28px 32px; }
  .workspace { grid-template-columns: 350px minmax(0, 1fr); gap: 24px; }
  .message-scroll { padding: 26px 32px; }
  .message { max-width: 72%; }
  .coach-card { margin-inline: 32px; padding: 14px 20px; }
  .hint-box { margin-inline: 32px; }
  .voice-dock { padding-inline: 32px; }
}

/* Character studio entry points */
.create-agent-button {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 2px 10px;
  width: 100%;
  min-height: 64px;
  margin-top: 12px;
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: 1px dashed var(--text-muted);
  border-radius: 14px;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.create-agent-button:hover { color: var(--accent); border-color: var(--accent); background: var(--surface-raised); }
.create-agent-button svg { grid-row: 1 / 3; width: 32px; height: 32px; }
.create-agent-button span { font-weight: 800; }
.create-agent-button small { color: var(--text-muted); font: 700 12px/1 var(--font-mono); }

/* Character designer: full-screen mobile sheet, centered desktop workshop. */
.designer-dialog {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 0;
  overflow: hidden;
}
.designer-dialog::backdrop { background: oklch(0.08 0.01 120 / .82); backdrop-filter: blur(5px); }
.designer-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.designer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.designer-header h2 { margin-top: 4px; font: 800 24px/1.2 var(--font-ui); }
.designer-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 0 0 auto;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.designer-steps li { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 48px; padding: 8px 5px; color: var(--text-muted); border-right: 1px solid var(--line); }
.designer-steps li:last-child { border-right: 0; }
.designer-steps li > span { font: 800 12px/1 var(--font-mono); }
.designer-steps li > b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.designer-steps li[aria-current="step"] { color: var(--p-ink-0); background: var(--accent); }
.designer-steps li.is-complete { color: var(--accent); background: var(--surface-raised); }
.designer-scroll { flex: 1; min-height: 0; padding: 0 16px 24px; overflow-y: auto; overscroll-behavior: contain; }
.design-section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.design-step { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.design-step > span { display: grid; place-items: center; width: 34px; height: 28px; color: var(--p-ink-0); background: var(--accent); font: 800 13px/1 var(--font-mono); }
.design-step h3 { font: 800 19px/1.2 var(--font-ui); }
.field-label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 13px; }
#character-prompt, #scenario-prompt {
  width: 100%;
  min-height: 148px;
  resize: vertical;
  padding: 14px;
  color: var(--text);
  background: var(--p-ink-0);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: 16px/1.65 var(--font-body);
}
#scenario-prompt { min-height: 210px; }
#character-prompt::placeholder, #scenario-prompt::placeholder { color: var(--text-muted); }
#character-prompt:focus-visible, #scenario-prompt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.field-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--text-muted); font-size: 12px; }
.field-meta span:first-child { max-width: 75%; }
.avatar-editor { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.avatar-editor > img { width: 72px; height: 72px; flex: 0 0 auto; object-fit: cover; border: 2px solid var(--line); border-radius: 50%; }
.avatar-editor > div { display: grid; justify-items: start; gap: 7px; min-width: 0; }
.avatar-section-label { color: var(--text-muted); font-size: 12px; }
.default-avatar-options { display: flex; flex-wrap: wrap; gap: 8px; }
.default-avatar-options label { display: block; width: 48px; height: 48px; flex: 0 0 auto; cursor: pointer; }
.default-avatar-options img { width: 46px; height: 46px; object-fit: cover; border: 2px solid var(--line); border-radius: 50%; transition: border-color 160ms ease, transform 160ms ease; }
.default-avatar-options label:hover img { border-color: var(--text-muted); }
.default-avatar-options input:checked + img { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.default-avatar-options input:focus-visible + img { outline: 3px solid var(--accent); outline-offset: 3px; }
.avatar-upload-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; color: var(--p-ink-0); background: var(--accent); clip-path: var(--cut); cursor: pointer; font-size: 14px; font-weight: 900; }
.avatar-upload-button:focus-within { outline: 3px solid var(--p-paper); outline-offset: 3px; }
#avatar-file-name { color: var(--text-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
#avatar-remove { min-height: 44px; padding: 0; color: var(--text-muted); background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
#avatar-remove:hover { color: var(--text); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; margin-top: 14px; cursor: pointer; }
.switch-row > span { display: grid; gap: 3px; }
.switch-row b { font-size: 15px; }
.switch-row small { color: var(--text-muted); font-size: 12px; }
.switch-row input {
  appearance: none;
  position: relative;
  width: 54px;
  height: 32px;
  flex: 0 0 auto;
  background: var(--line);
  border: 1px solid var(--text-muted);
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.switch-row input::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  background: var(--p-paper);
  border-radius: 50%;
  transition: transform 160ms ease;
}
.switch-row input:checked { background: var(--accent); border-color: var(--accent); }
.switch-row input:checked::after { transform: translateX(22px); background: var(--p-ink-0); }
.switch-row input:disabled { cursor: not-allowed; opacity: .45; }
.switch-row input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.section-copy { margin-bottom: 14px; color: var(--text-muted); font-size: 14px; line-height: 1.65; }
.voice-id-input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--p-ink-0);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: 16px/1.5 var(--font-mono);
}
.voice-id-input::placeholder { color: var(--text-muted); }
.voice-id-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.voice-id-help { margin-top: 9px; color: var(--text-muted); font-size: 12px; line-height: 1.65; }
.default-voice-picker { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.default-voice-options { display: flex; flex-wrap: wrap; gap: 8px; }
.default-voice-option {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 13px;
  color: var(--text);
  background: var(--p-ink-0);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font: 13px/1.4 var(--font-mono);
  overflow-wrap: anywhere;
}
.default-voice-option:hover { border-color: var(--text-muted); }
.default-voice-option:has(input:checked) { color: var(--p-ink-0); background: var(--accent); border-color: var(--accent); }
.default-voice-option input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
.designer-error { margin-top: 16px; padding: 12px 14px; color: var(--p-paper); background: var(--p-coral-dark); border-left: 4px solid var(--coach); font-size: 14px; }
.designer-loading { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px; background: var(--surface-raised); }
.designer-loading p { display: grid; gap: 3px; }
.designer-loading small { color: var(--text-muted); font-size: 12px; }
.loading-bars { display: flex; align-items: center; gap: 4px; height: 30px; }
.loading-bars i { width: 4px; height: 24px; background: var(--accent); animation: loadingPulse 700ms ease-in-out infinite alternate; }
.loading-bars i:nth-child(2) { animation-delay: 120ms; }
.loading-bars i:nth-child(3) { animation-delay: 240ms; }
@keyframes loadingPulse { from { transform: scaleY(.35); opacity: .45; } to { transform: scaleY(1); opacity: 1; } }
.design-result { margin-top: 20px; padding: 18px 0 4px; border-top: 2px solid var(--accent); scroll-margin-top: 16px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--accent); font: 700 12px/1.2 var(--font-mono); }
.result-heading b { color: var(--text-muted); font-weight: 700; text-align: right; }
.result-person { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.result-person img { width: 64px; height: 64px; object-fit: cover; border: 2px solid var(--accent); border-radius: 50%; }
.result-person h3 { font: 800 22px/1.2 var(--font-ui); }
.result-person p { margin-top: 4px; color: var(--text-muted); font-size: 14px; }
.result-background { margin-top: 14px; font-size: 15px; line-height: 1.7; }
.result-details { display: grid; gap: 12px; margin-top: 16px; }
.result-details > div { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; }
.result-details dt { color: var(--text-muted); font-size: 13px; }
.result-details dd { font-size: 14px; line-height: 1.6; }
.design-result blockquote { margin-top: 18px; padding: 14px 16px; color: var(--p-ink-0); background: var(--p-paper); border-radius: 4px 14px 14px 14px; font-size: 16px; font-weight: 700; line-height: 1.6; }
.voice-result-message { margin-top: 14px; color: var(--text-muted); font-size: 13px; line-height: 1.6; }
#voice-preview { width: 100%; margin-top: 12px; }
.use-character-button { width: 100%; min-height: 52px; margin-top: 16px; color: var(--p-ink-0); background: var(--accent); clip-path: var(--cut); font-weight: 900; }
.designer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.backend-badge { max-width: 42%; color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.backend-badge[data-mode="aliyun"] { color: var(--accent); }
.designer-footer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.design-back, .design-next { min-height: 48px; padding: 9px 14px; font-size: 14px; font-weight: 800; }
.design-back { color: var(--text); background: transparent; border: 1px solid var(--line); }
.design-back:hover { border-color: var(--accent); }
.design-next, .design-submit { color: var(--p-ink-0); background: var(--accent); clip-path: var(--cut); }
.design-submit { min-width: 142px; min-height: 50px; padding: 10px 16px; font-weight: 900; }
.design-submit:disabled, .design-next:disabled, .design-back:disabled { cursor: wait; opacity: .6; }

@media (min-width: 700px) {
  .designer-dialog { width: min(760px, calc(100% - 48px)); height: min(900px, 92dvh); max-height: 92dvh; margin: auto; border: 1px solid var(--line); border-radius: 24px; }
  .designer-header { padding: 20px 28px; }
  .designer-header h2 { font-size: 28px; }
  .designer-scroll { padding: 0 28px 28px; }
  .designer-footer { padding: 14px 28px; }
  .result-details { grid-template-columns: 1fr 1fr; }
  .result-details > div:last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-bars i { animation: none; }
}


/* Recent vocabulary queue: compact capture, bounded image review and inline recall. */
.vocabulary-entry-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  margin-top: 4px;
  padding: 10px 4px;
  text-align: left;
  background: transparent;
  border-top: 1px solid var(--line);
}
.vocabulary-entry-button span { display: grid; gap: 3px; }
.vocabulary-entry-button strong { font-size: 14px; }
.vocabulary-entry-button small { color: var(--text-muted); font: 11px/1.3 var(--font-mono); }
.vocabulary-entry-button > b { color: var(--accent); font-size: 22px; transition: transform 160ms ease; }
.vocabulary-entry-button:hover > b { transform: translateX(4px); }

.vocabulary-dialog {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 0;
  overflow: hidden;
}
.vocabulary-dialog::backdrop { background: oklch(0.08 0.01 120 / .82); backdrop-filter: blur(5px); }
.vocabulary-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
.vocabulary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.vocabulary-header h2 { margin-top: 4px; font: 800 22px/1.2 var(--font-ui); }

/* 主体改为“录入 → 词表 → 批量导入 → 图片识别”的有序弹性区，超出的各自内部滚动 */
.vocab-form {
  order: 1;
  display: grid;
  gap: 10px;
  flex: 0 0 auto;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.vocab-form label { display: grid; gap: 6px; color: var(--text-muted); font-size: 13px; }
.vocab-form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 9px 12px;
  color: var(--text);
  background: var(--p-ink-0);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 16px/1.5 var(--font-body);
}
.vocab-form input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.vocab-submit {
  align-self: end;
  min-height: 46px;
  padding: 10px 18px;
  color: var(--p-ink-0);
  background: var(--accent);
  clip-path: var(--cut);
  font-weight: 900;
}
.vocab-submit:disabled { cursor: wait; opacity: .6; }
.vocab-error {
  order: 2;
  flex: 0 0 auto;
  margin: 10px 16px 0;
  padding: 10px 12px;
  color: var(--text);
  border: 1px solid var(--coach);
  font-size: 14px;
}
.vocab-review {
  order: 3;
  flex: 2 1 0;
  min-height: 0;
  padding: 14px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.vocab-review-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vocab-review-heading > div { display: flex; align-items: baseline; gap: 10px; }
.vocab-review-heading span { color: var(--text-muted); font-size: 13px; }
.vocab-review-heading strong { color: var(--accent); font: 700 18px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.vocab-toggle {
  min-height: 40px;
  padding: 6px 12px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}
.vocab-toggle:hover { border-color: var(--accent); }
.vocab-toggle:disabled { cursor: not-allowed; opacity: .45; }
#vocab-progress { display: block; width: 100%; height: 6px; margin-top: 10px; accent-color: var(--accent); }
.vocab-feedback { min-height: 20px; margin-top: 8px; color: var(--accent); font-size: 13px; overflow-wrap: anywhere; }
.vocab-loading, .vocab-empty { padding: 20px 0; color: var(--text-muted); font-size: 14px; }
.vocab-list { margin-top: 6px; list-style: none; border-top: 1px solid var(--line); }
.vocab-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.vocab-index { color: var(--text-muted); font: 12px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.vocab-copy { display: grid; gap: 4px; min-width: 0; }
.vocab-copy > strong { font: 700 17px/1.3 var(--font-body); overflow-wrap: anywhere; }
.vocab-meaning { color: var(--text-muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.vocab-reveal {
  justify-self: start;
  min-height: 40px;
  padding: 0;
  color: var(--accent);
  background: transparent;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 13px;
}
.vocab-delete {
  min-width: 48px;
  min-height: 40px;
  padding: 8px;
  color: var(--text-muted);
  background: transparent;
  font-size: 13px;
}
.vocab-delete:hover { color: var(--coach); }
.vocab-delete:disabled { cursor: wait; opacity: .45; }

/* 批量导入：折叠态只占一行，展开后正文限高内部滚动 */
.batch-import {
  order: 4;
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.batch-import > summary { justify-content: space-between; min-height: 50px; padding: 0 16px; color: var(--text); }
.batch-import-body { max-height: 300px; padding: 0 16px 14px; overflow-y: auto; }
.batch-import-body > label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 13px; }
#vocab-batch-text { width: 100%; min-height: 110px; resize: vertical; padding: 12px; color: var(--text); background: var(--p-ink-0); border: 1px solid var(--line); border-radius: 10px; font: 15px/1.6 var(--font-mono); }
#vocab-batch-text:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.batch-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.batch-actions > span { max-width: 60ch; color: var(--text-muted); font-size: 12px; }
.batch-actions button { min-height: 44px; padding: 8px 16px; color: var(--p-ink-0); background: var(--accent); font-weight: 800; }
.batch-result { margin-top: 12px; padding: 10px 12px; color: var(--text); background: var(--surface-raised); font-size: 13px; line-height: 1.6; }
.batch-result ul { margin: 6px 0 0 18px; }

/* 图片识别：展开后成为弹性区域，识别列表内部滚动、确认按钮常驻可见 */
#vocab-image-import {
  order: 5;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
}
#vocab-image-import > summary { min-height: 50px; padding: 0 16px; color: var(--text); }
#vocab-image-import[open] {
  flex: 3 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#vocab-image-import[open] > summary {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
}
#vocab-image-import[open] > :not(summary) { flex: 0 0 auto; min-height: 0; }
#vocab-image-import[open] > .vocab-recognition-review {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.image-import-intro { margin: 0; padding: 12px 16px 0; color: var(--text-muted); font-size: 13px; line-height: 1.65; }
.vocab-image-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px 0; }
.vocab-image-picker, #vocab-image-recognize, .recognition-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  color: var(--p-ink-0);
  background: var(--accent);
  border-radius: 10px;
  box-shadow: inset 0 -2px 0 oklch(0.13 0.012 120 / .2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}
.vocab-image-picker:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
#vocab-image-recognize { color: var(--text); background: var(--surface-raised); border: 1px solid var(--line); box-shadow: none; }
#vocab-image-recognize:not(:disabled):hover { border-color: var(--accent); }
#vocab-image-recognize:disabled, .recognition-confirm:disabled { cursor: not-allowed; opacity: .45; }
.vocab-image-meta { margin: 0; padding: 8px 16px 0; color: var(--text-muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.vocab-image-preview { width: auto; max-width: calc(100% - 32px); max-height: 180px; margin: 10px 16px 0; object-fit: contain; background: var(--p-ink-0); border: 1px solid var(--line); border-radius: 10px; }
.vocab-image-status { min-height: 20px; margin: 8px 16px 0; color: var(--accent); font-size: 13px; line-height: 1.6; }
.vocab-recognition-review {
  margin-top: 10px;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--line);
}
.recognition-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; }
.recognition-heading > strong { font-size: 14px; }
.recognition-heading > button { min-height: 40px; padding: 6px 0 6px 12px; color: var(--accent); background: transparent; font-size: 13px; }
.vocab-recognition-review > p { color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.recognition-list {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: none;
  margin-top: 8px;
  overflow-y: auto;
  list-style: none;
  border-top: 1px solid var(--line);
  scrollbar-width: thin;
}
.recognition-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.recognition-check { width: 20px; height: 20px; margin: 6px; accent-color: var(--accent); cursor: pointer; }
.recognition-fields { display: grid; gap: 8px; min-width: 0; }
.recognition-fields label { display: grid; gap: 4px; min-width: 0; color: var(--text-muted); font-size: 11px; }
.recognition-fields input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; color: var(--text); background: var(--p-ink-0); border: 1px solid var(--line); border-radius: 8px; font: 14px/1.4 var(--font-body); }
.recognition-fields input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.recognition-state { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.recognition-confirm { flex: 0 0 auto; width: calc(100% - 32px); margin: 10px 16px 0; }
@media (min-width: 600px) {
  .recognition-fields { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .recognition-item { gap: 12px; }
}

@media (min-width: 700px) {
  .vocabulary-dialog { width: min(840px, calc(100% - 48px)); height: min(860px, 92dvh); max-height: 92dvh; margin: auto; border: 1px solid var(--line); border-radius: 24px; }
  .vocabulary-header { padding: 16px 28px; }
  .vocabulary-header h2 { font-size: 26px; }
  .vocab-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: end; gap: 12px; padding: 14px 28px; }
  .vocab-error { margin-inline: 28px; }
  .vocab-review { padding: 16px 28px; }
  .batch-import > summary { padding-inline: 28px; }
  .batch-import-body { padding: 0 28px 16px; }
  #vocab-image-import > summary { padding-inline: 28px; }
  .image-import-intro { padding-inline: 28px; }
  .vocab-image-controls { padding-inline: 28px; }
  .vocab-image-meta { padding-inline: 28px; }
  .vocab-image-preview { margin-inline: 28px; }
  .vocab-image-status { margin-inline: 28px; }
  .vocab-recognition-review { padding-inline: 28px; }
  .recognition-confirm { width: calc(100% - 56px); margin-inline: 28px; }
}

/* Routed shared desk and live practice session. */
a { color: inherit; }
.brand { color: inherit; text-decoration: none; }
button:disabled, textarea:disabled { cursor: not-allowed; opacity: .5; }
button:disabled:active { transform: none; }
textarea { font: inherit; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body[data-route="management"] { overflow-y: auto; }
body[data-route="management"] .app-shell { height: auto; min-height: 100dvh; overflow: visible; }
@media (max-width: 899px) {
  body[data-route="practice"] .app-shell { min-height: 0; }
}
.management-view { display: grid; gap: 32px; padding: 8px 0 32px; }
.management-intro {
  display: grid;
  gap: 24px;
  padding: 24px 4px 28px;
  border-bottom: 1px solid var(--line);
}
.management-intro h1 {
  max-width: 12em;
  margin-top: 8px;
  font: 900 clamp(32px, 8vw, 64px)/1.05 var(--font-ui);
  letter-spacing: -.04em;
}
.management-intro p:not(.micro-label) { max-width: 65ch; margin-top: 16px; color: var(--text-muted); line-height: 1.75; }
.management-actions { display: grid; align-content: end; gap: 10px; }
.primary-action, .secondary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 18px;
  font-weight: 800;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.primary-action { color: var(--p-ink-0); background: var(--accent); clip-path: var(--cut); }
.primary-action:hover { filter: brightness(1.08); }
.secondary-action { justify-content: space-between; color: var(--text); background: transparent; border: 1px solid var(--line); }
.secondary-action span { color: var(--text-muted); font: 12px/1 var(--font-mono); }
.secondary-action:hover { border-color: var(--accent); color: var(--accent); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2 { margin-top: 5px; font: 800 23px/1.2 var(--font-ui); }
.section-heading > span { flex: 0 0 auto; color: var(--text-muted); font: 12px/1.3 var(--font-mono); }
.route-section, .catalog-section { min-width: 0; }
.route-grid, .management-character-list { border-top: 1px solid var(--line); }
.route-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 92px;
  padding: 14px 4px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 160ms ease, padding 160ms ease;
}
.route-row:hover { padding-inline: 12px; background: var(--surface); }
.route-index { color: var(--accent); font: 700 12px/1 var(--font-mono); }
.route-copy { display: grid; gap: 5px; min-width: 0; }
.route-copy strong { font: 800 22px/1.1 var(--font-ui); }
.route-copy small { color: var(--text-muted); font-size: 13px; }
.route-mode { display: none; color: var(--text-muted); font: 12px/1 var(--font-mono); }
.route-row > b { color: var(--accent); font-size: 24px; }
.catalog-note { margin: -2px 0 16px; color: var(--text-muted); font-size: 13px; line-height: 1.7; }
.management-loading { padding: 28px 4px; color: var(--text-muted); border-top: 1px solid var(--line); }
.management-error, .practice-error { padding: 12px 14px; color: var(--text); background: var(--p-coral-dark); border: 1px solid var(--coach); font-size: 14px; }
.management-error { margin-bottom: 12px; }
.management-character-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}
.management-character-row > img { width: 58px; height: 58px; object-fit: cover; border-radius: 50%; }
.management-character-copy { min-width: 0; }
.management-character-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.management-character-title strong { font: 800 20px/1.2 var(--font-ui); }
.management-character-title span { color: var(--text-muted); font: 11px/1 var(--font-mono); letter-spacing: .08em; }
.management-character-copy > p { margin-top: 5px; color: var(--text-muted); font-size: 13px; }
.management-character-copy > small { display: block; margin-top: 7px; font-size: 13px; line-height: 1.55; }
.character-row-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.character-row-actions a, .character-row-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.character-row-actions a:hover { color: var(--p-ink-0); background: var(--accent); border-color: var(--accent); }
.character-row-actions button { color: var(--text-muted); }
.character-row-actions button:hover { color: var(--text); border-color: var(--coach); }
.catalog-empty { padding: 24px 4px; color: var(--text-muted); }

.management-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  margin-top: 14px;
  padding: 10px 4px;
  color: var(--text);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}
.management-link span { color: var(--text-muted); font-size: 12px; font-weight: 400; }
.management-link:hover { color: var(--accent); }
.restart-button {
  min-height: 44px;
  padding: 8px 12px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}
.restart-button:hover { border-color: var(--accent); color: var(--accent); }
.session-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 9px 14px;
  color: var(--text-muted);
  background: var(--p-ink-0);
  border-bottom: 1px solid var(--line);
  font: 12px/1.3 var(--font-mono);
}
.session-strip > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
#session-progress { width: 80px; height: 5px; accent-color: var(--accent); }
#session-token-label { flex: 0 0 auto; }
.practice-error { flex: 0 0 auto; margin: 10px 12px 0; }
.completion-box { flex: 0 0 auto; max-height: min(62dvh, 620px); margin: 10px 12px 0; padding: 14px; overflow-y: auto; color: var(--text); background: var(--p-ink-0); border: 1px solid var(--accent); }
.completion-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.completion-heading > strong { font: 900 18px/1.2 var(--font-ui); }
#completion-score { color: var(--accent); font: 900 34px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
#completion-score small { margin-left: 3px; color: var(--text-muted); font-size: 12px; }
#completion-message { display: block; margin-top: 5px; color: var(--text-muted); font-size: 13px; line-height: 1.55; }
.assessment-content { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.assessment-summary { font-size: 14px; line-height: 1.65; }
.assessment-dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-top: 12px; }
.assessment-dimensions > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.assessment-dimensions dt { color: var(--text-muted); font-size: 12px; }
.assessment-dimensions dd { color: var(--accent); font: 800 13px/1 var(--font-mono); }
.assessment-feedback { display: grid; gap: 10px; margin-top: 14px; }
.assessment-feedback p { font-size: 13px; line-height: 1.6; }
.assessment-feedback strong { display: block; margin-bottom: 3px; color: var(--accent); }
.assessment-feedback span { display: block; }
.assessment-retry { min-height: 44px; margin-top: 12px; padding: 8px 14px; color: var(--p-ink-0); background: var(--accent); font-size: 13px; font-weight: 900; }
.assessment-retry:disabled { cursor: wait; opacity: .6; }
.session-loading { margin: auto; color: var(--text-muted); }
.message-audio { display: grid; gap: 6px; min-width: min(100%, 240px); }
.message-audio audio { display: block; width: 100%; max-width: 360px; height: 44px; }
.audio-unavailable { display: inline-flex; align-items: center; min-height: 34px; color: var(--text-muted); font-size: 12px; }
.agent-message .audio-unavailable { color: var(--text-muted); }
.audio-error-note { color: inherit; font-size: 12px; line-height: 1.5; }
.message-caption { text-align: right; }
.coach-inline {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 0 12px;
  color: var(--text);
  text-align: left;
  background: var(--p-coral-dark);
  border: 2px solid var(--coach);
  border-radius: 14px;
}
.coach-message { align-self: center; flex: 0 0 auto; }
.agent-message .message-tools {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.reply-details { min-width: 0; }
.reply-details summary {
  min-height: 32px;
  font-size: 12px;
}
.reply-text { padding: 4px 0 8px; overflow-wrap: anywhere; font-size: 16px; line-height: 1.55; }
.coach-inline summary { min-height: 48px; color: var(--text); }
.coach-inline summary .micro-label { color: var(--text); opacity: .72; }
.coach-inline summary strong { font-size: 14px; }
.coach-inline summary svg { margin-left: auto; }
.coach-inline-body { display: grid; gap: 9px; padding: 0 0 12px; }
.coach-inline-body p { font-size: 14px; line-height: 1.65; }
.coach-inline-body p[lang="en"] { padding: 9px 10px; color: var(--p-ink-0); background: var(--p-paper); border-radius: 8px; font-weight: 700; }
.coach-inline-body small { color: var(--text-muted); font-size: 12px; }

.cancel-recording { min-height: 44px; padding: 8px; color: var(--text); background: transparent; text-decoration: underline; }
.record-button.is-recording { color: var(--p-ink-0); background: var(--coach); }
.record-button.is-recording .record-ring { animation: recordPulse 900ms ease-in-out infinite alternate; }
@keyframes recordPulse { from { transform: scale(.94); opacity: .7; } to { transform: scale(1); opacity: 1; } }
.text-dock {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface);
}
.text-dock .hint-button { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.text-dock .hint-button span { display: none; }
.text-input-wrap { position: relative; min-width: 0; }
#text-answer {
  display: block;
  width: 100%;
  height: 44px;
  min-height: 44px;
  max-height: 108px;
  resize: none;
  padding: 9px 46px 9px 11px;
  overflow-y: hidden;
  color: var(--text);
  background: var(--p-ink-0);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.5;
}
#text-answer:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
#text-answer::placeholder { color: var(--text-muted); text-overflow: ellipsis; }
.text-input-meta {
  position: absolute;
  top: 50%;
  right: 9px;
  display: block;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  pointer-events: none;
  transform: translateY(-50%);
  font-size: 11px;
}
.text-input-meta > span { display: none; }
.text-input-meta b { display: block; min-width: 34px; color: var(--accent); font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.text-input-meta b.is-over-limit { color: var(--coach); }
.send-button { min-width: 76px; min-height: 44px; padding: 8px 10px; color: var(--p-ink-0); background: var(--accent); clip-path: var(--cut); font-size: 14px; font-weight: 900; white-space: nowrap; }
.send-label-compact { display: none; }

.batch-import { flex: 0 0 auto; border-bottom: 1px solid var(--line); font-size: 14px; }
.batch-import > summary { justify-content: space-between; min-height: 52px; padding: 0 16px; color: var(--text); }
.batch-import-body { padding: 0 16px 16px; }
.batch-import-body > label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 13px; }
#vocab-batch-text { width: 100%; min-height: 120px; resize: vertical; padding: 12px; color: var(--text); background: var(--p-ink-0); border: 1px solid var(--line); border-radius: 10px; font: 15px/1.6 var(--font-mono); }
#vocab-batch-text:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.batch-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.batch-actions > span { max-width: 60ch; color: var(--text-muted); font-size: 12px; }
.batch-actions button { min-height: 44px; padding: 8px 16px; color: var(--p-ink-0); background: var(--accent); font-weight: 800; }
.batch-result { margin-top: 12px; padding: 10px 12px; color: var(--text); background: var(--surface-raised); font-size: 13px; line-height: 1.6; }
.batch-result ul { margin: 6px 0 0 18px; }
.image-import-intro { margin-bottom: 12px; color: var(--text-muted); font-size: 13px; line-height: 1.65; }
.vocab-image-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vocab-image-picker, #vocab-image-recognize, .recognition-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  color: var(--p-ink-0);
  background: var(--accent);
  border-radius: 10px;
  box-shadow: inset 0 -2px 0 oklch(0.13 0.012 120 / .2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}
.vocab-image-picker:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
#vocab-image-recognize { color: var(--text); background: var(--surface-raised); border: 1px solid var(--line); box-shadow: none; }
#vocab-image-recognize:not(:disabled):hover { border-color: var(--accent); }
#vocab-image-recognize:disabled, .recognition-confirm:disabled { cursor: not-allowed; opacity: .45; }
.vocab-image-meta { margin-top: 9px; color: var(--text-muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.vocab-image-preview { width: auto; max-width: 100%; max-height: 300px; margin-top: 12px; object-fit: contain; background: var(--p-ink-0); border: 1px solid var(--line); border-radius: 10px; }
.vocab-image-status { min-height: 22px; margin-top: 10px; color: var(--accent); font-size: 13px; line-height: 1.6; }
.vocab-recognition-review { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.recognition-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.recognition-heading > strong { font-size: 14px; }
.recognition-heading > button { min-height: 44px; padding: 6px 0 6px 12px; color: var(--accent); background: transparent; font-size: 13px; }
.vocab-recognition-review > p { color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.recognition-list { max-height: 380px; margin-top: 10px; overflow-y: auto; list-style: none; border-top: 1px solid var(--line); scrollbar-width: thin; }
.recognition-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.recognition-check { width: 20px; height: 20px; margin: 6px; accent-color: var(--accent); cursor: pointer; }
.recognition-fields { display: grid; gap: 8px; min-width: 0; }
.recognition-fields label { display: grid; gap: 4px; min-width: 0; color: var(--text-muted); font-size: 11px; }
.recognition-fields input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; color: var(--text); background: var(--p-ink-0); border: 1px solid var(--line); border-radius: 8px; font: 14px/1.4 var(--font-body); }
.recognition-fields input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.recognition-state { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.recognition-confirm { width: 100%; margin-top: 12px; }
@media (min-width: 600px) {
  .recognition-fields { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .recognition-item { gap: 12px; }
}

@media (min-width: 600px) {
  .management-intro { padding: 32px 8px; }
  .management-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .route-row { grid-template-columns: 44px minmax(0, 1fr) auto 30px; gap: 16px; padding-inline: 10px; }
  .route-mode { display: block; }
  .management-character-row { grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; padding: 18px 10px; }
  .management-character-row > img { width: 64px; height: 64px; }
  .character-row-actions { grid-column: auto; justify-content: flex-end; }
  .session-strip { padding-inline: 24px; }
  #session-progress { width: 140px; }
  .assessment-dimensions { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .assessment-dimensions > div { display: grid; justify-content: initial; }
  .assessment-feedback { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .practice-error, .completion-box { margin-inline: 24px; }
  .text-dock { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 16px 24px 20px; }
  .text-dock .hint-button { width: auto; height: auto; min-height: 48px; padding: 8px 16px; border-radius: 12px; }
  .text-dock .hint-button span { display: inline; }
  #text-answer { height: 48px; min-height: 48px; max-height: 160px; padding: 10px 12px; border-radius: 12px 12px 0 0; }
  .text-input-meta { position: static; display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; background: var(--p-ink-0); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; pointer-events: auto; transform: none; font-size: 12px; }
  .text-input-meta > span { display: block; }
  .text-input-meta b { min-width: 0; }
  .send-button { min-width: 108px; min-height: 52px; }
  .batch-import > summary { padding-inline: 28px; }
  .batch-import-body { padding: 0 28px 20px; }
}

@media (min-width: 900px) {
  body[data-route="management"] .app-shell { height: auto; min-height: 100dvh; overflow: visible; }
  body[data-route="management"] .topbar { position: sticky; top: 0; z-index: 5; }
  .management-view { gap: 42px; padding-bottom: 56px; }
  .management-intro { grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); align-items: end; padding: 36px 0 44px; }
  .management-actions { grid-template-columns: 1fr; }
  .section-heading h2 { font-size: 28px; }
  .route-copy strong { font-size: 26px; }
  .management-character-row { grid-template-columns: 70px minmax(0, 1fr) auto; }
  .management-character-row > img { width: 70px; height: 70px; }
  .chat-header { flex-wrap: nowrap; }
  .restart-button { flex: 0 0 auto; }
}

@media (max-width: 430px) {
  .topbar-vocab-button { min-height: 38px; padding: 6px 9px; font-size: 12px; }
  .topbar-vocab-button svg { width: 17px; height: 17px; }
  .brand-copy > span { letter-spacing: .2em; }
  .session-strip { align-items: center; gap: 8px; padding: 6px 10px; font-size: 11px; }
  .session-strip > div { display: flex; gap: 7px; }
  #session-progress { width: 48px; }
  #session-token-label { font-size: 10px; }
  .text-dock { grid-template-columns: 44px minmax(0, 1fr) 60px; gap: 6px; padding-inline: 8px; }
  .send-button { min-width: 60px; padding-inline: 8px; }
  .send-label-full { display: none; }
  .send-label-compact { display: inline; }
  .text-input-meta > span { max-width: 20ch; }
  .message { max-width: 98%; }
  .message-avatar { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .record-button.is-recording .record-ring { animation: none; }
}
