:root {
  color-scheme: dark;
  --bg: #080b12;
  --bg-raised: #0f141f;
  --panel: rgba(17, 23, 35, 0.82);
  --panel-solid: #111724;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --text: #eef3ff;
  --text-soft: #c5cfdf;
  --muted: #8492a8;
  --faint: #667389;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #7de5ff;
  --accent-two: #9b8cff;
  --accent-three: #f08cff;
  --accent-grad: linear-gradient(135deg, #67e8ff 0%, #8f8cff 52%, #eb8cff 100%);
  --user-bubble: linear-gradient(135deg, #2f7cf6 0%, #6d5aec 58%, #8b5cf6 100%);
  --code-bg: #090d15;
  --code-head: #0e1420;
  --danger: #ff7f96;
  --success: #52e3a1;
  --warning: #f8c66a;
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 28px rgba(0, 0, 0, 0.18);
  --sidebar-width: 284px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, "Cascadia Code", monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f5fb;
  --bg-raised: #ffffff;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #ffffff;
  --surface: rgba(18, 28, 48, 0.04);
  --surface-strong: rgba(18, 28, 48, 0.075);
  --text: #141b2a;
  --text-soft: #3c475c;
  --muted: #6b778b;
  --faint: #8993a5;
  --border: rgba(21, 34, 60, 0.09);
  --border-strong: rgba(21, 34, 60, 0.16);
  --accent: #007ea8;
  --accent-two: #6c55e8;
  --accent-three: #c04ab8;
  --accent-grad: linear-gradient(135deg, #25b8e6 0%, #7461eb 52%, #d45ac8 100%);
  --user-bubble: linear-gradient(135deg, #2477ee 0%, #6554e4 58%, #8657ee 100%);
  --code-bg: #0a0e17;
  --code-head: #101725;
  --shadow-lg: 0 30px 80px rgba(30, 48, 91, 0.16);
  --shadow-sm: 0 10px 30px rgba(30, 48, 91, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button,
a,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  color: #fff;
  background: rgba(102, 126, 255, 0.55);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 154, 179, 0.35) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(140, 154, 179, 0.3);
  border: 2px solid transparent;
  border-radius: 99px;
  background-clip: padding-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(110px);
  opacity: 0.32;
}

.ambient-one {
  top: -26vh;
  left: -12vw;
  width: 54vw;
  height: 54vw;
  background: radial-gradient(circle, #274bff 0%, #5b2bff 44%, transparent 72%);
}

.ambient-two {
  right: -16vw;
  bottom: -34vh;
  width: 58vw;
  height: 58vw;
  background: radial-gradient(circle, #a72dff 0%, #ff3d9a 40%, transparent 70%);
  opacity: 0.16;
}

html[data-theme="light"] .ambient {
  filter: blur(120px);
  opacity: 0.13;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

.sidebar {
  position: relative;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 14px 16px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(28px) saturate(135%);
  -webkit-backdrop-filter: blur(28px) saturate(135%);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-orb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, #f4ffff 0 7%, transparent 28%),
    radial-gradient(circle at 38% 34%, #7be7ff 0 24%, #7179ff 58%, #d85cff 100%);
  box-shadow: 0 0 16px rgba(124, 141, 255, 0.55);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.brand-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-close {
  display: none;
}

.new-chat-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  padding: 0 13px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(103, 232, 255, 0.09), rgba(143, 140, 255, 0.08)),
    var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease,
    box-shadow 160ms ease;
}

.new-chat-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 229, 255, 0.32);
  box-shadow: 0 8px 24px rgba(79, 96, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.new-chat-btn:active {
  transform: translateY(0);
}

.new-chat-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.9;
  stroke-linecap: round;
}

.new-chat-btn kbd {
  margin-left: auto;
  padding: 2px 6px;
  color: var(--faint);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 500;
}

.history-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 23px 10px 9px;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.history-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 99px;
  font-size: 9.5px;
  letter-spacing: 0;
}

.history-list {
  flex: 1;
  min-height: 0;
  margin: 0 -4px;
  padding: 0 4px 14px;
  overflow-x: hidden;
  overflow-y: auto;
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 34px 16px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.history-empty svg {
  width: 31px;
  height: 31px;
  margin-bottom: 7px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  opacity: 0.5;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  margin-bottom: 2px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 11px;
  transition: background 150ms ease, border-color 150ms ease;
}

.history-item:hover {
  background: var(--surface);
}

.history-item.is-active {
  background:
    linear-gradient(135deg, rgba(111, 226, 255, 0.075), rgba(154, 124, 255, 0.07)),
    var(--surface);
  border-color: var(--border);
}

.history-main {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  padding: 8px 7px;
  color: var(--text-soft);
  background: transparent;
  border-radius: 8px;
  text-align: left;
}

.history-item.is-active .history-main {
  color: var(--text);
}

.history-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  color: var(--faint);
}

.history-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-item.is-active .history-icon {
  color: var(--accent);
}

.history-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.history-title {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-time {
  color: var(--faint);
  font-size: 10px;
  line-height: 1.35;
}

.history-delete {
  display: grid;
  place-items: center;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  padding: 0;
  color: var(--faint);
  background: transparent;
  border-radius: 7px;
  opacity: 0;
  transition: color 150ms ease, background 150ms ease, opacity 150ms ease;
}

.history-item:hover .history-delete,
.history-delete:focus-visible {
  opacity: 1;
}

.history-delete:hover {
  color: var(--danger);
  background: rgba(255, 127, 150, 0.09);
}

.history-delete svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.host-monitor {
  padding: 10px 11px 9px;
  background:
    linear-gradient(135deg, rgba(112, 231, 255, 0.045), rgba(154, 124, 255, 0.04)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.host-monitor-head,
.host-metric-head,
.host-monitor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.host-monitor-head {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.host-updated {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0;
}

.host-metric + .host-metric {
  margin-top: 7px;
}

.host-metric-head span {
  color: var(--muted);
  font-size: 9.5px;
}

.host-metric-head strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.host-bar {
  height: 3px;
  margin-top: 3px;
  overflow: hidden;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border-radius: 99px;
}

.host-bar > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent-grad);
  border-radius: inherit;
  transition: width 450ms ease, background 180ms ease;
}

.host-bar > span.is-warn {
  background: linear-gradient(90deg, #f4c96b, #f4a663);
}

.host-bar > span.is-high {
  background: linear-gradient(90deg, #ff9c75, #ff6f8d);
}

.host-monitor-foot {
  margin-top: 8px;
  color: var(--faint);
  font-size: 8.5px;
}

.host-monitor-foot b {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-weight: 500;
}

.host-monitor.is-unavailable {
  opacity: 0.65;
}

.host-detail-meta dd {
  font-size: 10.5px;
}

.connection-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.status-dot {
  position: relative;
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  background: var(--warning);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(248, 198, 106, 0.55);
}

.status-dot.is-live {
  background: var(--success);
  box-shadow: 0 0 10px rgba(82, 227, 161, 0.55);
}

.status-dot.is-offline {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 127, 150, 0.45);
}

.status-dot.is-pulsing::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--warning);
  animation: statusPulse 2s ease-out infinite;
}

.status-dot.is-live.is-pulsing::after {
  color: var(--success);
}

.connection-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.connection-copy strong {
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-copy small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--faint);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  color: var(--muted);
  background: transparent;
  border-radius: 10px;
  font-size: 12px;
  text-align: left;
  transition: color 150ms ease, background 150ms ease;
}

.settings-button:hover {
  color: var(--text);
  background: var(--surface);
}

.settings-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-chevron {
  margin-left: auto;
  color: var(--faint);
  font-size: 18px;
  line-height: 1;
}

.sidebar-scrim {
  display: none;
}

.main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 66px;
  padding: 0 clamp(18px, 3vw, 34px);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.menu-btn {
  display: none;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-name {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.mini-orb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, #f5ffff 0 8%, transparent 30%),
    radial-gradient(circle at 40% 40%, #7be7ff 0 28%, #7f74ff 62%, #d05fff 100%);
  box-shadow: 0 0 12px rgba(125, 160, 255, 0.55);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.model-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  max-width: 220px;
  padding: 0 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.model-picker:focus-within {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.model-picker svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.model-picker select {
  min-width: 0;
  max-width: 180px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 11px;
  font-weight: 550;
  cursor: pointer;
  color-scheme: dark;
}

html[data-theme="light"] .model-picker select {
  color-scheme: light;
}

.model-picker select:disabled {
  color: var(--faint);
  cursor: wait;
}

.mode-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 27px;
  padding: 0 10px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}

.mode-dot {
  width: 5px;
  height: 5px;
  background: var(--warning);
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(248, 198, 106, 0.6);
}

.mode-pill.is-live .mode-dot {
  background: var(--success);
  box-shadow: 0 0 7px rgba(82, 227, 161, 0.6);
}

.mode-pill.is-offline .mode-dot {
  background: var(--danger);
  box-shadow: 0 0 7px rgba(255, 127, 150, 0.5);
}

.theme-icon-moon {
  display: none;
}

html[data-theme="light"] .theme-icon-sun {
  display: none;
}

html[data-theme="light"] .theme-icon-moon {
  display: block;
}

.chat-scroll {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(34px, 7vh, 74px) 0 40px;
  text-align: center;
  animation: welcomeIn 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.welcome.is-hidden {
  display: none;
}

.hero-orb-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 126px;
  height: 126px;
  margin-bottom: 12px;
}

.hero-orb {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 24%, #fbffff 0 5%, rgba(255, 255, 255, 0) 23%),
    radial-gradient(circle at 38% 35%, #8cecff 0 17%, #7079ff 52%, #c25cff 79%, #f06dff 100%);
  box-shadow:
    0 0 34px rgba(103, 187, 255, 0.36),
    0 0 80px rgba(127, 100, 255, 0.32),
    inset -11px -14px 26px rgba(73, 18, 130, 0.32),
    inset 7px 7px 16px rgba(255, 255, 255, 0.18);
  animation: orbFloat 5s ease-in-out infinite;
}

.hero-orb::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 24%;
  width: 18%;
  height: 11%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  filter: blur(2px);
  transform: rotate(-24deg);
}

.orbit {
  position: absolute;
  z-index: 1;
  width: 104px;
  height: 46px;
  border: 1px solid rgba(148, 168, 255, 0.18);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.orbit-one {
  animation: orbitSpin 11s linear infinite;
}

.orbit-two {
  width: 88px;
  height: 38px;
  transform: rotate(58deg);
  border-color: rgba(222, 125, 255, 0.15);
  animation: orbitSpinReverse 14s linear infinite;
}

.hero-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px 2px rgba(125, 229, 255, 0.55);
  animation: sparkle 3.6s ease-in-out infinite;
}

.spark-one {
  top: 19px;
  right: 18px;
}

.spark-two {
  bottom: 31px;
  left: 15px;
  width: 3px;
  height: 3px;
  animation-delay: -1.2s;
}

.spark-three {
  top: 44px;
  left: 9px;
  width: 2px;
  height: 2px;
  animation-delay: -2.4s;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.27em;
  text-transform: uppercase;
}

.welcome h1 {
  max-width: 700px;
  margin: 0;
  background: linear-gradient(180deg, var(--text) 20%, var(--text-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(2.15rem, 4.4vw, 3.5rem);
  font-weight: 680;
  letter-spacing: -0.045em;
  line-height: 1.14;
  text-wrap: balance;
}

.welcome-copy {
  max-width: 540px;
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  text-wrap: balance;
}

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  width: 100%;
  max-width: 760px;
  margin-top: 32px;
}

.suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease,
    box-shadow 180ms ease;
}

.suggestion:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.suggestion-icon {
  display: grid;
  place-items: center;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.suggestion-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.suggestion-icon-blue {
  color: #73c9ff;
  background: rgba(52, 148, 255, 0.1);
}

.suggestion-icon-violet {
  color: #b59aff;
  background: rgba(139, 92, 246, 0.1);
}

.suggestion-icon-amber {
  color: #f6c66d;
  background: rgba(246, 184, 74, 0.09);
}

.suggestion-icon-mint {
  color: #66e3b5;
  background: rgba(54, 211, 153, 0.09);
}

.suggestion-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.suggestion-copy strong {
  font-size: 12.5px;
  font-weight: 600;
}

.suggestion-copy small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--faint);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-arrow {
  margin-left: auto;
  padding-right: 2px;
  color: var(--faint);
  font-size: 14px;
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.suggestion:hover .suggestion-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.welcome-footnote {
  margin: 22px 0 0;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 30px clamp(18px, 3vw, 34px) 38px;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: messageIn 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.message.is-user {
  flex-direction: row-reverse;
}

.message-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 650;
  user-select: none;
}

.message.is-assistant .message-avatar {
  background:
    radial-gradient(circle at 34% 25%, #f6ffff 0 6%, transparent 26%),
    radial-gradient(circle at 38% 36%, #7ce8ff 0 22%, #747cff 59%, #d25cff 100%);
  box-shadow: 0 0 18px rgba(119, 132, 255, 0.24);
}

.message.is-user .message-avatar {
  color: var(--text-soft);
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.message-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: min(82%, 720px);
}

.message.is-user .message-main {
  align-items: flex-end;
}

.message-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 3px 6px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.2;
}

.message.is-user .message-meta {
  flex-direction: row-reverse;
}

.message-author {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.message-time {
  color: var(--faint);
}

.bubble {
  position: relative;
  min-width: 52px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px 18px 18px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.message.is-user .bubble {
  color: #fff;
  background: var(--user-bubble);
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 18px 5px 18px 18px;
  box-shadow: 0 8px 28px rgba(61, 67, 200, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.13);
  white-space: pre-wrap;
}

.message.is-error .bubble {
  color: var(--danger);
  background: rgba(255, 127, 150, 0.055);
  border-color: rgba(255, 127, 150, 0.2);
}

.bubble > *:first-child {
  margin-top: 0;
}

.bubble > *:last-child {
  margin-bottom: 0;
}

.bubble p {
  margin: 0 0 0.72em;
}

.bubble strong {
  color: var(--text);
  font-weight: 650;
}

.message.is-user .bubble strong {
  color: #fff;
}

.bubble em {
  font-style: italic;
}

.bubble h1,
.bubble h2,
.bubble h3 {
  margin: 1.1em 0 0.45em;
  color: var(--text);
  font-weight: 650;
  line-height: 1.35;
}

.bubble h1 {
  font-size: 1.28em;
}

.bubble h2 {
  font-size: 1.17em;
}

.bubble h3 {
  font-size: 1.07em;
}

.bubble ul,
.bubble ol {
  margin: 0.45em 0 0.8em;
  padding-left: 1.35em;
}

.bubble li {
  margin: 0.26em 0;
  padding-left: 0.15em;
}

.bubble li::marker {
  color: var(--muted);
}

.bubble blockquote {
  margin: 0.7em 0;
  padding: 0.3em 0 0.3em 0.9em;
  color: var(--muted);
  border-left: 2px solid var(--border-strong);
}

.bubble hr {
  height: 1px;
  margin: 1em 0;
  background: var(--border);
  border: 0;
}

.inline-error,
.inline-note {
  margin-top: 0.8em !important;
  padding-top: 0.65em;
  border-top: 1px solid var(--border);
  font-size: 0.9em;
}

.inline-error {
  color: var(--danger);
}

.inline-note {
  color: var(--faint);
}

.bubble a {
  color: var(--accent);
  text-decoration-color: rgba(125, 229, 255, 0.35);
  text-underline-offset: 3px;
}

.message.is-user .bubble a {
  color: #fff;
}

.bubble code:not(.code-block code) {
  padding: 0.16em 0.38em;
  color: var(--accent);
  background: rgba(125, 229, 255, 0.08);
  border: 1px solid rgba(125, 229, 255, 0.1);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.message.is-user .bubble code:not(.code-block code) {
  color: #eefbff;
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.12);
}

.code-block {
  width: 100%;
  margin: 0.85em 0;
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 10px 0 13px;
  color: #8390a6;
  background: var(--code-head);
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  font-family: var(--font-mono);
  font-size: 10px;
}

.code-lang {
  text-transform: lowercase;
}

.copy-code {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 7px;
  color: #94a2b8;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 9.5px;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.copy-code:hover {
  color: #dfe8f8;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.copy-code svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.code-block pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  color: #d8e3f6;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  tab-size: 2;
}

.code-block code {
  font-family: inherit;
  white-space: pre;
}

.typing-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.14em;
  background: var(--accent);
  border-radius: 2px;
  animation: caretBlink 0.9s steps(2, start) infinite;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 1.3em;
}

.typing-dots i {
  width: 5px;
  height: 5px;
  background: var(--muted);
  border-radius: 50%;
  animation: typingBounce 1.25s ease-in-out infinite;
}

.typing-dots i:nth-child(2) {
  animation-delay: 0.16s;
}

.typing-dots i:nth-child(3) {
  animation-delay: 0.32s;
}

.scroll-bottom-wrap {
  position: absolute;
  bottom: 122px;
  left: 50%;
  z-index: 9;
  transform: translateX(-50%);
  pointer-events: none;
}

.scroll-bottom-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
}

.scroll-bottom-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-bottom-btn:hover {
  color: var(--text);
}

.scroll-bottom-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-area {
  position: relative;
  z-index: 10;
  flex: 0 0 auto;
  padding: 8px clamp(16px, 3vw, 34px) max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 0%, var(--bg) 42%);
}

.composer {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 12px 12px 8px 17px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(26px) saturate(130%);
  -webkit-backdrop-filter: blur(26px) saturate(130%);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.composer:focus-within {
  border-color: rgba(125, 229, 255, 0.34);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.32),
    0 0 0 3px rgba(125, 229, 255, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.composer textarea {
  display: block;
  width: 100%;
  max-height: 180px;
  min-height: 24px;
  padding: 3px 4px 6px 0;
  resize: none;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
  line-height: 1.65;
}

.composer textarea::placeholder {
  color: var(--faint);
}

.composer-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.composer-hint {
  overflow: hidden;
  color: var(--faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.send-btn,
.stop-btn {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 0;
  color: #071018;
  background: var(--accent-grad);
  border-radius: 11px;
  box-shadow: 0 8px 20px rgba(104, 112, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.send-btn:hover:not(:disabled),
.stop-btn:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.07);
}

.send-btn:active:not(:disabled),
.stop-btn:active {
  transform: scale(0.97);
}

.send-btn:disabled {
  cursor: default;
  opacity: 0.38;
  box-shadow: none;
}

.send-btn svg,
.stop-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stop-btn {
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.stop-btn svg {
  fill: currentColor;
  stroke: none;
}

.composer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: min(860px, 100%);
  margin: 8px auto 0;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.4;
  text-align: center;
}

.meta-divider {
  width: 2px;
  height: 2px;
  background: var(--faint);
  border-radius: 50%;
  opacity: 0.6;
}

.settings-dialog {
  width: min(580px, calc(100vw - 32px));
  max-height: min(84dvh, 760px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 23px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}

.settings-dialog[open] {
  animation: dialogIn 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.settings-dialog::backdrop {
  background: rgba(3, 7, 14, 0.58);
  backdrop-filter: blur(7px);
}

html[data-theme="light"] .settings-dialog::backdrop {
  background: rgba(25, 36, 63, 0.25);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 25px 17px;
  border-bottom: 1px solid var(--border);
}

.dialog-header .eyebrow {
  margin-bottom: 3px;
  font-size: 8.5px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.dialog-body {
  max-height: calc(min(84dvh, 760px) - 84px);
  padding: 18px 25px 25px;
  overflow-y: auto;
}

.setting-card {
  padding: 17px;
  background:
    linear-gradient(135deg, rgba(112, 231, 255, 0.055), rgba(154, 124, 255, 0.05)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
}

.setting-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.setting-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  color: var(--warning);
  background: rgba(248, 198, 106, 0.08);
  border: 1px solid rgba(248, 198, 106, 0.15);
  border-radius: 99px;
  font-size: 9.5px;
  font-weight: 600;
}

.settings-status.is-live {
  color: var(--success);
  background: rgba(82, 227, 161, 0.08);
  border-color: rgba(82, 227, 161, 0.15);
}

.settings-status.is-offline {
  color: var(--danger);
  background: rgba(255, 127, 150, 0.08);
  border-color: rgba(255, 127, 150, 0.15);
}

.settings-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 15px 0 0;
}

.settings-meta > div {
  min-width: 0;
  padding: 11px 12px;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.settings-meta .settings-model-list {
  grid-column: 1 / -1;
}

html[data-theme="light"] .settings-meta > div {
  background: rgba(255, 255, 255, 0.42);
}

.settings-meta dt {
  color: var(--faint);
  font-size: 9.5px;
}

.settings-meta dd {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.setting-block {
  padding-top: 21px;
}

.setting-block + .setting-block {
  margin-top: 21px;
  border-top: 1px solid var(--border);
}

.setting-block h3 {
  margin: 0 0 7px;
  font-size: 13.5px;
  font-weight: 650;
}

.setting-block p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.setting-block code {
  padding: 0.12em 0.35em;
  color: var(--accent);
  background: rgba(125, 229, 255, 0.07);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.env-snippet {
  margin: 10px 0 0;
  padding: 12px 14px;
  overflow-x: auto;
  color: #cdd8ed;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.7;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}

.secondary-btn,
.danger-btn {
  min-height: 33px;
  padding: 0 12px;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 500;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.secondary-btn:hover {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--border-strong);
}

.danger-btn {
  margin-top: 11px;
  color: var(--danger);
  background: rgba(255, 127, 150, 0.055);
  border-color: rgba(255, 127, 150, 0.16);
}

.danger-btn:hover {
  background: rgba(255, 127, 150, 0.1);
  border-color: rgba(255, 127, 150, 0.28);
}

.toast-region {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  color: var(--text);
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  box-shadow: var(--shadow-lg);
  font-size: 11.5px;
  line-height: 1.45;
  animation: toastIn 220ms ease both;
}

.toast.is-leaving {
  animation: toastOut 180ms ease both;
}

.toast::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(125, 229, 255, 0.5);
}

.toast.is-error::before {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(255, 127, 150, 0.5);
}

.toast.is-success::before {
  background: var(--success);
  box-shadow: 0 0 8px rgba(82, 227, 161, 0.5);
}

.noscript-note {
  position: fixed;
  inset: 20px;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 30px;
  color: #fff;
  background: #111724;
  border-radius: 16px;
  text-align: center;
}

@keyframes welcomeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.015);
  }
}

@keyframes orbitSpin {
  from {
    transform: rotate(-24deg);
  }
  to {
    transform: rotate(336deg);
  }
}

@keyframes orbitSpinReverse {
  from {
    transform: rotate(58deg);
  }
  to {
    transform: rotate(-302deg);
  }
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.75);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes statusPulse {
  from {
    opacity: 0.45;
    transform: scale(0.8);
  }
  to {
    opacity: 0;
    transform: scale(1.8);
  }
}

@keyframes typingBounce {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes caretBlink {
  0%,
  45% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(4px);
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(86vw, 320px);
    transform: translateX(-102%);
    transition: transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: var(--shadow-lg);
  }

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

  .sidebar-close {
    display: inline-grid;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(3, 7, 14, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
  }

  .sidebar-scrim.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-btn {
    display: inline-grid;
  }

  .message-main {
    max-width: 85%;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 14.5px;
  }

  .topbar {
    flex-basis: 60px;
    gap: 6px;
    padding: 0 12px;
  }

  .topbar-name {
    display: none;
  }

  .model-picker {
    max-width: 160px;
    padding: 0 7px;
  }

  .model-picker select {
    max-width: 126px;
  }

  .mode-pill {
    display: none;
  }

  .welcome {
    width: calc(100% - 28px);
    padding-top: clamp(24px, 5vh, 46px);
  }

  .hero-orb-wrap {
    width: 106px;
    height: 106px;
    margin-bottom: 7px;
  }

  .hero-orb {
    width: 62px;
    height: 62px;
  }

  .orbit {
    width: 90px;
    height: 40px;
  }

  .orbit-two {
    width: 76px;
    height: 34px;
  }

  .welcome h1 {
    font-size: clamp(1.9rem, 8vw, 2.5rem);
  }

  .welcome-copy {
    margin-top: 13px;
    font-size: 12.5px;
    line-height: 1.75;
  }

  .suggestion-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 24px;
  }

  .suggestion {
    padding: 11px 12px;
  }

  .suggestion-icon {
    flex-basis: 35px;
    width: 35px;
    height: 35px;
  }

  .welcome-footnote {
    margin-top: 17px;
  }

  .messages {
    gap: 21px;
    padding: 22px 13px 28px;
  }

  .message {
    gap: 8px;
  }

  .message-avatar {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    margin-top: 20px;
    border-radius: 9px;
    font-size: 10px;
  }

  .message-main {
    max-width: calc(100% - 38px);
  }

  .message-meta {
    padding-bottom: 5px;
  }

  .bubble {
    padding: 11px 13px;
    border-radius: 4px 15px 15px 15px;
    font-size: 13.5px;
    line-height: 1.68;
  }

  .message.is-user .bubble {
    border-radius: 15px 4px 15px 15px;
  }

  .code-block {
    margin-left: -4px;
    margin-right: -4px;
  }

  .code-block pre {
    padding: 12px 13px;
    font-size: 11px;
  }

  .composer-area {
    padding: 7px 10px max(11px, env(safe-area-inset-bottom));
  }

  .composer {
    padding: 10px 9px 6px 14px;
    border-radius: 18px;
  }

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

  .composer-hint {
    display: none;
  }

  .composer-meta {
    gap: 0;
    margin-top: 6px;
    font-size: 9px;
  }

  .composer-meta .meta-divider,
  .composer-meta span:last-child {
    display: none;
  }

  .scroll-bottom-wrap {
    bottom: 99px;
  }

  .settings-dialog {
    width: calc(100vw - 20px);
    max-height: 88dvh;
    border-radius: 19px;
  }

  .dialog-header {
    padding: 19px 19px 14px;
  }

  .dialog-body {
    max-height: calc(88dvh - 75px);
    padding: 14px 19px 20px;
  }

  .settings-meta {
    grid-template-columns: 1fr;
  }

  .toast-region {
    right: 16px;
    bottom: 92px;
  }
}

@media (max-width: 380px) {
  .suggestion-copy small {
    max-width: 190px;
  }

  .model-picker {
    max-width: 140px;
  }

  .model-picker select {
    max-width: 108px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
