:root {
  color-scheme: light;
  --bg: #eef6fd;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --line: #cfe1f2;
  --line-soft: rgba(34, 102, 168, 0.14);
  --ink: #0b294d;
  --text: #18344f;
  --muted: #657b91;
  --blue: #216bd9;
  --blue-deep: #0b4e9d;
  --cyan: #16a4d4;
  --red: #ff4f56;
  --amber: #bf7b12;
  --shadow: 0 20px 60px rgba(39, 90, 150, 0.12);
  --sidebar-w: 292px;
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  background:
    radial-gradient(circle at 76% 18%, rgba(60, 156, 237, .18), transparent 30rem),
    linear-gradient(180deg, #f9fcff 0%, #eef6fd 55%, #eaf4fb 100%);
}

.sidebar {
  position: relative;
  height: 100svh;
  padding: 28px 24px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,252,255,.96));
  border-right: 1px solid var(--line);
  box-shadow: 16px 0 42px rgba(49, 92, 141, .08);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  z-index: 20;
}

.sidebar-toggle {
  position: absolute;
  top: 20px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sidebar-toggle span {
  display: block;
  width: 16px;
  height: 16px;
  border-left: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  transform: rotate(45deg);
  position: absolute;
  top: 10px;
}

.sidebar-toggle span:first-child {
  left: 10px;
}

.sidebar-toggle span:last-child {
  left: 18px;
}

.brand-card {
  margin-top: 48px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
  box-shadow: 0 16px 40px rgba(31, 87, 148, .08);
  display: grid;
  grid-template-columns: 1fr auto 74px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.brand-logo {
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.syz-logo {
  height: 44px;
  justify-self: stretch;
}

.qsy-logo {
  height: 60px;
  width: 74px;
}

.brand-cross {
  color: #8297ab;
  font-size: 22px;
  font-weight: 900;
}

.assistant-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.assistant-mark,
.voice-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 14px 24px rgba(34, 106, 216, .22);
}

.assistant-name {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.05;
  font-weight: 950;
}

.assistant-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
}

.side-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.side-title {
  display: block;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.select,
.quick-list button,
.ghost-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  color: var(--ink);
  font-weight: 800;
}

.select {
  padding: 0 14px;
  font-size: 18px;
}

.quick-list {
  display: grid;
  gap: 8px;
}

.quick-list button,
.ghost-button {
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.quick-list button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  border-color: #9ec4e9;
  background: #fff;
}

.kb-section {
  border-bottom: 0;
  margin-top: auto;
}

.kb-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(250,253,255,.84);
}

.kb-card span,
.kb-card small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
  font-weight: 760;
}

.kb-card strong {
  display: block;
  margin: 4px 0 5px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}

.ghost-button {
  margin-top: 12px;
  background: #fff;
  font-size: 17px;
}

.main {
  height: 100svh;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  padding: 26px clamp(22px, 4vw, 64px) 16px;
  gap: 16px;
}

.topbar {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  color: #536e8a;
  font-size: 14px;
  font-weight: 780;
}

.sidebar-restore {
  display: none;
  position: fixed;
  left: 18px;
  top: 18px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 38px rgba(31, 87, 148, .14);
  cursor: pointer;
  place-items: center;
}

.sidebar-restore span {
  display: block;
  width: 15px;
  height: 15px;
  border-right: 4px solid var(--ink);
  border-top: 4px solid var(--ink);
  transform: rotate(45deg);
  position: absolute;
  top: 14px;
}

.sidebar-restore span:first-child {
  left: 11px;
}

.sidebar-restore span:last-child {
  left: 18px;
}

.topbar-title,
.mobile-menu {
  display: none;
}

.topbar-status.ok {
  color: #146fb3;
}

.topbar-status.bad {
  color: #b24b38;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(480px, .95fr);
  gap: 28px;
  align-items: end;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(54px, 5.6vw, 82px);
  line-height: .9;
  font-weight: 950;
  letter-spacing: 0;
}

.hero-chip {
  border: 1px solid #c5ddf5;
  background: #e9f3ff;
  color: #1267d8;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 900;
}

.hero-brand-strip {
  margin: 20px 0 14px;
  display: inline-grid;
  grid-template-columns: 116px auto 56px auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 10px 28px rgba(35, 91, 150, .08);
}

.hero-brand-strip img {
  max-height: 34px;
  max-width: 116px;
  object-fit: contain;
}

.hero-brand-strip span {
  color: #8ca0b3;
  font-weight: 900;
}

.hero-brand-strip b {
  color: #60778f;
  font-size: 14px;
}

.hero p {
  margin: 0;
  max-width: 920px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.72;
  font-weight: 720;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  min-height: 96px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(30, 83, 137, .06);
}

.metric-icon {
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

.metric-card small,
.metric-card em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 820;
}

.metric-card strong {
  color: var(--ink);
  font-size: 25px;
  line-height: 1.18;
  font-weight: 950;
}

.metric-card strong em {
  display: inline;
  margin-left: 4px;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 2px solid #bfd2e6;
  min-height: 48px;
}

.tab {
  position: relative;
  height: 48px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 930;
  cursor: pointer;
}

.tab.active {
  color: #1267d8;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff4f56, #216bd9);
}

.workspace {
  min-height: 0;
  border-top: 1px solid #d6e7f3;
  padding-top: 14px;
  overflow: hidden;
}

.panel {
  display: none;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.panel.active {
  display: block;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel h2,
.section-heading h2 {
  margin: 0;
  color: #09233d;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 950;
}

.voice-launch,
.primary-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  cursor: pointer;
  font-weight: 930;
  box-shadow: 0 16px 34px rgba(33, 107, 217, .22);
}

.voice-launch {
  min-height: 40px;
  padding: 0 18px;
}

.suggestions {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  overflow: hidden;
}

.suggestions summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 14px;
  color: #064b82;
  font-weight: 930;
}

.suggestions summary::-webkit-details-marker {
  display: none;
}

.suggestions summary::before {
  content: "▶";
  margin-right: 6px;
}

.suggestions[open] summary::before {
  content: "▼";
}

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.suggestion-grid button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  color: #17385b;
  text-align: left;
  cursor: pointer;
  font-weight: 760;
  line-height: 1.4;
}

.wechat-tip {
  margin: 12px 0 0;
  border: 1px solid #f0d6a6;
  border-radius: 14px;
  background: #fff9ec;
  color: #815315;
  padding: 12px 14px;
  font-weight: 820;
  line-height: 1.5;
}

.chat-scroll {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
}

.message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.message.user {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--line);
  font-weight: 950;
}

.bubble {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  padding: 14px 16px;
  color: var(--text);
  line-height: 1.72;
  font-size: 16px;
  box-shadow: 0 14px 34px rgba(26, 84, 140, .07);
  white-space: pre-wrap;
}

.message.user .bubble {
  justify-self: end;
  max-width: min(760px, 86%);
  background: #eaf4ff;
  border-color: #bddaf5;
}

.message.user .avatar {
  order: 2;
  background: #ff5258;
  color: #fff;
  border: 0;
}

.sources {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 16px;
  font-weight: 720;
}

.diagnosis-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  padding: 20px;
}

.diagnosis-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.diagnosis-form .full {
  grid-column: 1 / -1;
}

.diagnosis-form input,
.diagnosis-form select,
.diagnosis-form textarea,
.composer input {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.diagnosis-form input,
.diagnosis-form select {
  min-height: 46px;
  padding: 0 14px;
}

.diagnosis-form textarea {
  min-height: 96px;
  resize: vertical;
  padding: 12px 14px;
}

.primary-button {
  min-height: 48px;
  padding: 0 18px;
  font-size: 17px;
}

.diagnosis-result {
  margin-top: 16px;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.cap-card {
  min-height: 168px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.86);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 14px 34px rgba(26, 84, 140, .06);
}

.cap-card span {
  color: #60778f;
  font-size: 13px;
  font-weight: 860;
}

.cap-card strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
}

.cap-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
  font-weight: 720;
}

.cap-card.muted {
  background: #f8fbff;
}

.voice-panel {
  position: fixed;
  inset: 98px clamp(24px, 5vw, 78px) 94px calc(var(--sidebar-w) + clamp(24px, 5vw, 78px));
  z-index: 30;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 72% 74%, rgba(23, 185, 210, .18), transparent 24rem),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(235,247,255,.96));
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  padding: 24px 26px;
}

.voice-panel[hidden] {
  display: none;
}

.voice-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.voice-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.voice-brand h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 950;
}

.voice-brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-weight: 820;
}

.voice-close {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue-deep);
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 930;
}

.voice-body {
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  gap: 14px;
}

.voice-orb {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, #74e2ff 20%, #1f71e7 72%, #0d51b2);
  box-shadow:
    0 0 0 10px rgba(73, 148, 227, .12),
    0 0 0 24px rgba(64, 148, 237, .07),
    0 28px 70px rgba(20, 99, 210, .26);
}

.voice-orb::after {
  content: "";
  position: absolute;
  inset: 22px 30px 30px 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.34);
  filter: blur(2px);
}

.voice-orb.listening,
.voice-orb.speaking {
  animation: pulse 1.15s ease-in-out infinite;
}

.voice-orb.thinking {
  animation: rotateGlow 1.6s linear infinite;
}

.voice-body h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.25;
  font-weight: 950;
}

.voice-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 16px;
  font-weight: 820;
}

.voice-live {
  width: min(720px, 92%);
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  color: #24445f;
  line-height: 1.55;
  padding: 12px 18px;
  font-weight: 760;
}

.voice-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.82);
}

.voice-start {
  min-height: 56px;
}

.icon-button {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: #73879a;
  cursor: pointer;
  font-weight: 950;
  font-size: 17px;
}

.composer {
  align-self: end;
  width: min(980px, 100%);
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 20px 60px rgba(39, 90, 150, 0.14);
  padding: 12px 14px 10px;
}

.composer.hidden {
  display: none;
}

.composer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #f1f4f8;
}

.composer input {
  min-height: 44px;
  padding: 0 16px;
  font-size: 16px;
}

.send-button {
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  font-weight: 900;
}

.send-button:disabled {
  background: #d7dee8;
  cursor: wait;
}

.composer-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 760;
}

.composer-note button {
  border: 0;
  background: transparent;
  color: var(--blue-deep);
  cursor: pointer;
  font-weight: 930;
  white-space: nowrap;
}

.app-shell.sidebar-collapsed {
  --sidebar-w: 0px;
  grid-template-columns: 0 1fr;
}

.app-shell.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

.app-shell.sidebar-collapsed .sidebar-restore {
  display: grid;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.055); }
}

@keyframes rotateGlow {
  from { filter: hue-rotate(0deg); transform: rotate(0deg); }
  to { filter: hue-rotate(18deg); transform: rotate(360deg); }
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .metric-grid,
  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .app-shell {
    display: block;
    min-height: 100svh;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 310px);
    transform: translateX(-104%);
    transition: transform .2s ease;
    padding-top: 54px;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: none;
  }

  .brand-card {
    margin-top: 0;
  }

  .main {
    min-height: 100svh;
    height: auto;
    overflow: visible;
    padding: 0 14px calc(112px + env(safe-area-inset-bottom));
    gap: 12px;
    display: block;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 12;
    height: 50px;
    margin: 0 -14px 10px;
    padding: 0 14px;
    justify-content: space-between;
    background: rgba(247,251,255,.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }

  .sidebar-restore {
    display: none !important;
  }

  .topbar-title,
  .mobile-menu {
    display: block;
  }

  .topbar-title {
    color: var(--ink);
    font-size: 17px;
    font-weight: 950;
  }

  .mobile-menu {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }

  .mobile-menu span {
    display: block;
    width: 16px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
  }

  .topbar-status {
    max-width: 126px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    font-size: 12px;
  }

  .hero {
    display: block;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.76);
    padding: 18px;
    box-shadow: 0 14px 34px rgba(26,84,140,.07);
  }

  .hero-title-row {
    gap: 10px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-chip {
    font-size: 13px;
    padding: 6px 10px;
  }

  .hero-brand-strip {
    width: 100%;
    grid-template-columns: minmax(90px, 1fr) auto 50px;
    gap: 8px;
    margin: 14px 0 12px;
  }

  .hero-brand-strip b {
    display: none;
  }

  .hero p {
    font-size: 15px;
    line-height: 1.65;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }

  .metric-card {
    min-height: 82px;
    grid-template-columns: 28px 1fr;
    gap: 8px;
    padding: 12px;
  }

  .metric-icon {
    font-size: 20px;
  }

  .metric-card strong {
    font-size: 18px;
  }

  .metric-card small,
  .metric-card em {
    font-size: 11px;
  }

  .tabs {
    margin-top: 10px;
    gap: 8px;
    justify-content: space-between;
    min-height: 44px;
  }

  .tab {
    height: 44px;
    font-size: 15px;
  }

  .workspace {
    margin-top: 10px;
    padding-top: 12px;
    overflow: visible;
  }

  .panel {
    overflow: visible;
  }

  .panel h2,
  .section-heading h2 {
    font-size: 21px;
  }

  .voice-launch {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .suggestion-grid,
  .diagnosis-form,
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .message,
  .message.user {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .message.user {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 13px;
  }

  .bubble {
    padding: 12px 13px;
    font-size: 15px;
    line-height: 1.66;
  }

  .message.user .bubble {
    max-width: 92%;
  }

  .diagnosis-form {
    padding: 14px;
    gap: 14px;
  }

  .cap-card {
    min-height: 132px;
  }

  .composer {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: auto;
    z-index: 26;
    padding: 10px;
    border-radius: 18px;
  }

  .composer-form {
    grid-template-columns: minmax(0, 1fr) 46px;
    padding: 8px;
  }

  .composer input {
    min-height: 42px;
    font-size: 15px;
  }

  .composer-note {
    font-size: 11px;
    padding-top: 6px;
  }

  .composer-note span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .voice-panel {
    inset: 58px 12px calc(10px + env(safe-area-inset-bottom)) 12px;
    border-radius: 22px;
    padding: 14px;
    gap: 8px;
  }

  .voice-brand h2 {
    font-size: 20px;
  }

  .voice-brand p {
    font-size: 12px;
  }

  .voice-close {
    padding: 8px 10px;
    font-size: 13px;
  }

  .voice-orb {
    width: 92px;
    height: 92px;
  }

  .voice-body h3 {
    font-size: 22px;
  }

  .voice-body p {
    font-size: 13px;
  }

  .voice-live {
    width: 100%;
    min-height: 52px;
    font-size: 13px;
    max-height: 110px;
    overflow: auto;
  }
}

@media (max-width: 380px) {
  .hero {
    padding: 14px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tab {
    font-size: 14px;
  }

  .composer input {
    font-size: 14px;
  }
}
