:root {
  color-scheme: dark;
  --bg: #080a0f;
  --bg-soft: #0d1017;
  --panel: #11141c;
  --panel-2: #171b25;
  --panel-3: #1e2330;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f6fb;
  --text-soft: #d3d8e3;
  --muted: #8f98aa;
  --subtle: #626b7b;
  --accent: #8b5cf6;
  --accent-bright: #a78bfa;
  --cyan: #22d3ee;
  --success: #34d399;
  --danger: #fb7185;
  --warning: #fbbf24;
  --sidebar: 282px;
  font-family:
    Inter,
    "SF Pro Display",
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
.hidden {
  display: none !important;
}
.mobile-only {
  display: none !important;
}
.eyebrow {
  margin: 0;
  color: #b9a8ff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.muted {
  color: var(--muted);
}
svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 16px;
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  cursor: pointer;
  transition: 0.2s;
}
.button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  box-shadow: 0 14px 38px rgba(124, 58, 237, 0.25);
}
.button.ghost {
  background: rgba(255, 255, 255, 0.035);
}
.button.large {
  padding: 14px 20px;
  border-radius: 14px;
}
.button.full {
  width: 100%;
}
.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: 0.18s;
}
.icon-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
/* Landing */
.landing-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(
      circle at 65% 10%,
      rgba(124, 58, 237, 0.16),
      transparent 32%
    ),
    radial-gradient(
      circle at 90% 65%,
      rgba(34, 211, 238, 0.08),
      transparent 25%
    ),
    #080a0f;
}
.landing-nav {
  height: 86px;
  padding: 0 clamp(22px, 6vw, 88px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-brand,
.app-brand,
.admin-brand,
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.landing-brand > span,
.app-brand > span,
.admin-brand > span,
.auth-brand > span {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  font-weight: 900;
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.25);
}
.landing-main {
  min-height: calc(100vh - 150px);
  padding: 7vh clamp(22px, 6vw, 88px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 7vw, 120px);
}
.landing-copy h1 {
  font-size: clamp(52px, 7vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  margin: 18px 0 30px;
  max-width: 850px;
}
.landing-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #c4b5fd, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing-copy > p:not(.eyebrow) {
  max-width: 680px;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.8;
  color: var(--muted);
}
.landing-actions {
  display: flex;
  gap: 12px;
  margin-top: 36px;
}
.landing-trust {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--subtle);
  font-size: 12px;
  margin-top: 35px;
}
.landing-trust span:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 8px;
  box-shadow: 0 0 14px var(--success);
}
.landing-visual {
  position: relative;
  min-height: 590px;
  display: grid;
  place-items: center;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
}
.orb-a {
  width: 350px;
  height: 350px;
  background: rgba(124, 58, 237, 0.18);
  filter: blur(60px);
  top: 4%;
  right: 0;
}
.orb-b {
  width: 280px;
  height: 280px;
  background: rgba(34, 211, 238, 0.09);
  filter: blur(70px);
  bottom: 0;
  left: 0;
}
.preview-window {
  position: relative;
  width: min(100%, 700px);
  aspect-ratio: 1.15;
  border-radius: 26px;
  border: 1px solid var(--line-strong);
  background: rgba(14, 17, 24, 0.88);
  box-shadow: 0 45px 120px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-5deg) rotateX(2deg);
  backdrop-filter: blur(30px);
}
.preview-head {
  height: 48px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px;
  color: var(--subtle);
  font-size: 10px;
}
.preview-head i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b4250;
}
.preview-head span {
  margin-left: auto;
  margin-right: auto;
}
.preview-body {
  height: calc(100% - 48px);
  display: grid;
  grid-template-columns: 125px 1fr;
}
.preview-side {
  border-right: 1px solid var(--line);
  padding: 20px 13px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.preview-side b {
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(
    90deg,
    rgba(139, 92, 246, 0.3),
    rgba(37, 99, 235, 0.18)
  );
}
.preview-side span {
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}
.preview-chat {
  padding: clamp(24px, 4vw, 52px);
  display: flex;
  flex-direction: column;
}
.preview-chat small {
  color: #a78bfa;
  font-weight: 800;
}
.preview-chat h2 {
  font-size: clamp(22px, 3vw, 38px);
  letter-spacing: -0.04em;
  margin: 8px 0 auto;
}
.preview-message {
  max-width: 85%;
  padding: 13px 15px;
  border-radius: 16px;
  margin: 8px 0;
  font-size: 12px;
  line-height: 1.6;
}
.preview-message.user {
  align-self: flex-end;
  background: #252b38;
}
.preview-message.ai {
  display: flex;
  gap: 10px;
}
.preview-message.ai strong {
  flex: 0 0 25px;
  height: 25px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  font-size: 10px;
}
.preview-message.ai p {
  margin: 2px 0;
}
.cursor {
  display: inline-block;
  width: 5px;
  height: 13px;
  background: var(--accent-bright);
  margin-left: 3px;
  animation: blink 1s infinite;
}
.preview-composer {
  height: 52px;
  border: 1px solid var(--line-strong);
  background: #141822;
  border-radius: 15px;
  margin-top: auto;
  color: var(--subtle);
  padding: 0 15px;
  display: flex;
  align-items: center;
  font-size: 11px;
}
.preview-composer b {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #eee;
  color: #111;
  display: grid;
  place-items: center;
}
.landing-footer {
  text-align: center;
  color: var(--subtle);
  font-size: 11px;
  padding: 22px;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
/* App layout */
.ai-page {
  height: 100vh;
  overflow: hidden;
}
.ai-layout {
  height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
}
.chat-sidebar {
  height: 100vh;
  border-right: 1px solid var(--line);
  background: #0c0f15;
  padding: 16px 12px 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 20;
}
.sidebar-header {
  height: 51px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-brand > span {
  width: 33px;
  height: 33px;
  border-radius: 10px;
}
.app-brand > div {
  display: flex;
  flex-direction: column;
}
.app-brand strong {
  font-size: 14px;
  letter-spacing: -0.02em;
}
.app-brand small {
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--subtle);
  text-transform: uppercase;
  margin-top: 2px;
}
.new-chat-button {
  height: 44px;
  margin: 13px 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  display: flex;
  align-items: center;
  padding: 0 13px;
  gap: 10px;
  cursor: pointer;
}
.new-chat-button:hover {
  background: rgba(255, 255, 255, 0.065);
}
.new-chat-button > span {
  font-size: 21px;
  font-weight: 300;
}
.new-chat-button kbd {
  margin-left: auto;
  color: var(--subtle);
  font-size: 9px;
  border: 0;
  background: transparent;
}
.conversation-search {
  height: 38px;
  margin: 2px 4px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--subtle);
}
.conversation-search svg {
  width: 15px;
}
.conversation-search input {
  flex: 1;
  width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  padding: 0 8px;
}
.conversation-search > span {
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}
.conversation-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 8px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.conversation-label button {
  border: 0;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
}
.conversation-label svg {
  width: 13px;
}
.conversation-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 2px;
}
.conversation-list::-webkit-scrollbar {
  width: 4px;
}
.conversation-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9px;
}
.conversation-item {
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 2px;
  position: relative;
}
.conversation-item:hover,
.conversation-item.active {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}
.conversation-item.active {
  background: linear-gradient(
    90deg,
    rgba(139, 92, 246, 0.13),
    rgba(255, 255, 255, 0.035)
  );
}
.conversation-item .star-mark {
  color: var(--warning);
  font-size: 10px;
}
.conversation-item .conversation-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.conversation-item .conversation-time {
  font-size: 9px;
  color: var(--subtle);
}
.conversation-item .more-button {
  display: none;
  width: 25px;
  height: 25px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  place-items: center;
  cursor: pointer;
}
.conversation-item:hover .conversation-time {
  display: none;
}
.conversation-item:hover .more-button {
  display: grid;
}
.conversation-item .more-button svg {
  width: 15px;
}
.list-skeleton {
  padding: 6px;
}
.list-skeleton span {
  display: block;
  height: 38px;
  border-radius: 10px;
  margin-bottom: 5px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.025),
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.025)
  );
  background-size: 200%;
  animation: skeleton 1.4s infinite;
}
.sidebar-footer {
  border-top: 1px solid var(--line);
  padding: 10px 3px 0;
}
.sidebar-footer > a,
.sidebar-footer > button {
  width: 100%;
  height: 37px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 11px;
  cursor: pointer;
}
.sidebar-footer > a:hover,
.sidebar-footer > button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.sidebar-footer svg {
  width: 16px;
}
.sidebar-footer > button {
  height: 50px;
  margin-top: 3px;
}
.user-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: white;
  font-size: 12px;
  font-weight: 850;
}
.user-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}
.user-summary strong {
  font-size: 11px;
}
.user-summary small {
  font-size: 9px;
  color: var(--subtle);
  margin-top: 2px;
}
.sidebar-footer > button > svg {
  width: 13px;
}
.sidebar-overlay {
  display: none;
}
.chat-main {
  height: 100vh;
  min-width: 0;
  display: grid;
  grid-template-rows: 66px 1fr auto;
  position: relative;
  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(139, 92, 246, 0.065),
      transparent 28%
    ),
    var(--bg);
}
.chat-topbar {
  height: 66px;
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(8, 10, 15, 0.82);
  backdrop-filter: blur(20px);
  z-index: 10;
}
.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
}
.topbar-actions {
  justify-content: flex-end;
  gap: 3px;
}
.conversation-title-button,
.model-picker {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
}
.conversation-title-button {
  max-width: 290px;
  font-weight: 750;
  font-size: 13px;
}
.conversation-title-button span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversation-title-button svg,
.model-picker > svg {
  width: 13px;
  color: var(--subtle);
}
.model-picker {
  padding: 7px 10px;
  border-radius: 11px;
}
.model-picker:hover {
  background: rgba(255, 255, 255, 0.04);
}
.model-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.65);
}
.model-picker > span:not(.model-dot) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.model-picker small {
  font-size: 8px;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.model-picker strong {
  font-size: 11px;
  margin-top: 1px;
}
.chat-scroll {
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.chat-scroll::-webkit-scrollbar {
  width: 6px;
}
.chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9px;
}
.welcome-view {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(65px, 10vh, 120px) 28px 60px;
  text-align: center;
}
.welcome-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  position: relative;
}
.welcome-mark > span {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  font-size: 25px;
  font-weight: 900;
  box-shadow: 0 17px 50px rgba(124, 58, 237, 0.3);
  position: relative;
  z-index: 1;
}
.welcome-mark > i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 24px;
  animation: pulse 2.4s infinite;
}
.welcome-view h1 {
  font-size: clamp(35px, 4.2vw, 58px);
  letter-spacing: -0.055em;
  margin: 12px 0 11px;
}
.welcome-view > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 14px;
}
.assistant-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 27px 0 32px;
}
.assistant-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.assistant-chip:hover,
.assistant-chip.active {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.1);
  color: var(--text);
}
.assistant-chip b {
  font-size: 10px;
  color: var(--accent-bright);
}
.suggestion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 690px;
  margin: 0 auto;
  text-align: left;
}
.suggestion-grid button {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  padding: 15px;
  display: grid;
  grid-template-columns: 27px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  cursor: pointer;
  transition: 0.18s;
}
.suggestion-grid button:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
}
.suggestion-grid svg {
  grid-row: 1/3;
  width: 18px;
  color: var(--accent-bright);
}
.suggestion-grid strong {
  font-size: 12px;
}
.suggestion-grid span {
  color: var(--subtle);
  font-size: 10px;
  margin-top: 4px;
}
.message-list {
  max-width: 880px;
  margin: 0 auto;
  padding: 42px 30px 200px;
}
.message {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 13px;
  margin-bottom: 30px;
  position: relative;
}
.message.user {
  grid-template-columns: 1fr;
}
.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  margin-top: 1px;
}
.message.user .message-avatar {
  display: none;
}
.message-body {
  min-width: 0;
}
.message.user .message-body {
  justify-self: end;
  max-width: min(82%, 680px);
}
.message-content {
  font-size: 14px;
  line-height: 1.78;
  color: var(--text-soft);
  word-break: break-word;
}
.message.user .message-content {
  background: #202530;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px 18px 5px 18px;
  padding: 11px 15px;
  color: #edf0f5;
}
.message-content p {
  margin: 0 0 13px;
}
.message-content p:last-child {
  margin-bottom: 0;
}
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4 {
  color: var(--text);
  line-height: 1.3;
  margin: 24px 0 10px;
}
.message-content h1 {
  font-size: 22px;
}
.message-content h2 {
  font-size: 19px;
}
.message-content h3 {
  font-size: 16px;
}
.message-content ul,
.message-content ol {
  padding-left: 22px;
}
.message-content li {
  margin: 6px 0;
}
.message-content blockquote {
  margin: 15px 0;
  padding: 5px 15px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: rgba(139, 92, 246, 0.06);
}
.message-content a {
  color: #8eddf0;
}
.inline-code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  color: #d8cfff;
}
.code-block {
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background: #090c12;
}
.code-head {
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #121620;
  border-bottom: 1px solid var(--line);
  color: var(--subtle);
  font-size: 10px;
}
.copy-code {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  display: flex;
  gap: 5px;
  align-items: center;
  cursor: pointer;
}
.copy-code svg {
  width: 13px;
}
.code-block pre {
  margin: 0;
  padding: 15px;
  overflow-x: auto;
}
.code-block code {
  font:
    12px/1.7 "SFMono-Regular",
    Consolas,
    monospace;
  color: #d7dce6;
}
.message-actions {
  height: 28px;
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: 0.18s;
}
.message:hover .message-actions,
.message.streaming .message-actions {
  opacity: 1;
}
.message-actions button {
  height: 27px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  color: var(--subtle);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  font-size: 9px;
  cursor: pointer;
}
.message-actions button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.message-actions svg {
  width: 13px;
}
.message-meta {
  font-size: 9px;
  color: var(--subtle);
  margin-left: 5px;
}
.attachment-grid {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  justify-content: flex-end;
}
.attachment-card {
  max-width: 180px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 10px;
}
.attachment-card img {
  width: 31px;
  height: 31px;
  object-fit: cover;
  border-radius: 7px;
}
.attachment-card span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reasoning-box {
  border-left: 2px solid rgba(167, 139, 250, 0.35);
  padding-left: 12px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
}
.reasoning-box summary {
  cursor: pointer;
  color: #aaa3c5;
  font-size: 10px;
  font-weight: 750;
  margin-bottom: 7px;
}
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 8px 0;
}
.typing-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  animation: typing 1.2s infinite;
}
.typing-indicator i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing-indicator i:nth-child(3) {
  animation-delay: 0.3s;
}
.composer-zone {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px max(20px, calc((100% - 820px) / 2)) 15px;
  background: linear-gradient(
    transparent,
    rgba(8, 10, 15, 0.88) 20%,
    var(--bg) 50%
  );
  z-index: 8;
}
.composer {
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background: rgba(18, 22, 30, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: 0.2s;
}
.composer:focus-within {
  border-color: rgba(139, 92, 246, 0.48);
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.07),
    0 20px 60px rgba(0, 0, 0, 0.35);
}
.composer-main {
  min-height: 61px;
  display: flex;
  align-items: flex-end;
  padding: 9px;
}
.composer-tool {
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 11px;
  cursor: pointer;
}
.composer-tool:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.composer-tool svg {
  width: 18px;
}
.composer textarea {
  flex: 1;
  min-height: 41px;
  max-height: 180px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 9px;
  font-size: 14px;
  line-height: 1.5;
}
.composer textarea::placeholder {
  color: #626b7b;
}
.send-button,
.stop-button {
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  border: 0;
  border-radius: 12px;
  background: #edf0f5;
  color: #090b10;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.send-button:disabled {
  background: #353b48;
  color: #6f7888;
  cursor: not-allowed;
}
.send-button svg {
  width: 18px;
  stroke-width: 2.4;
}
.stop-button {
  background: #eceef3;
}
.stop-button span {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: #151820;
}
.composer-foot {
  height: 31px;
  padding: 0 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--subtle);
  font-size: 9px;
}
.composer-foot > div {
  display: flex;
}
.composer-foot button {
  height: 25px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 9px;
  cursor: pointer;
}
.composer-foot button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.composer-foot svg {
  width: 13px;
}
.composer-note {
  text-align: center;
  color: #4e5665;
  font-size: 8px;
  margin: 7px 0 0;
}
.upload-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 3px 7px;
}
.upload-chip {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #151922;
  border-radius: 11px;
  padding: 4px 8px;
  color: var(--text-soft);
  font-size: 9px;
}
.upload-chip img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: cover;
}
.upload-chip span {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.upload-chip.uploading {
  opacity: 0.55;
}
.edit-banner {
  max-width: 820px;
  height: 31px;
  padding: 0 12px;
  margin: 0 auto 6px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.07);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d8c789;
  font-size: 9px;
}
.edit-banner button {
  border: 0;
  background: transparent;
  color: #f5d97e;
  font-size: 9px;
  cursor: pointer;
}
/* Forms, modal, toast, auth */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 4, 8, 0.68);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  transition: 0.18s;
}
.modal-overlay.open {
  opacity: 1;
}
.modal {
  width: min(100%, 500px);
  max-height: min(86vh, 850px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: #11151e;
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.55);
  transform: translateY(12px) scale(0.98);
  transition: 0.18s;
  display: flex;
  flex-direction: column;
}
.modal-overlay.open .modal {
  transform: none;
}
.modal.wide {
  width: min(100%, 820px);
}
.modal-head {
  padding: 21px 23px 15px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  font-size: 20px;
  letter-spacing: -0.035em;
  margin: 5px 0 0;
}
.modal-close {
  width: 33px;
  height: 33px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}
.modal-body {
  padding: 21px 23px 24px;
  overflow-y: auto;
}
.modal label,
.auth-card label {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 14px;
}
.modal input,
.modal select,
.modal textarea,
.auth-card input,
.field-input {
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0b0e14;
  color: var(--text);
  padding: 11px 12px;
  outline: 0;
}
.modal textarea {
  min-height: 110px;
  resize: vertical;
}
.modal input:focus,
.modal select:focus,
.modal textarea:focus,
.auth-card input:focus {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.toggle-label {
  display: flex !important;
  align-items: center;
  gap: 9px;
}
.toggle-label input {
  width: 17px !important;
  margin: 0 !important;
  accent-color: var(--accent);
}
.toast-root {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  min-width: 250px;
  max-width: 390px;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  background: rgba(22, 26, 36, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 13px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateX(15px);
  transition: 0.22s;
}
.toast.show {
  opacity: 1;
  transform: none;
}
.toast > span {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 900;
}
.toast.success > span {
  background: rgba(52, 211, 153, 0.14);
  color: var(--success);
}
.toast.error > span {
  background: rgba(251, 113, 133, 0.14);
  color: var(--danger);
}
.toast p {
  margin: 0;
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.5;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(
      circle at 50% 5%,
      rgba(139, 92, 246, 0.16),
      transparent 35%
    ),
    var(--bg);
}
.auth-card {
  width: min(100%, 430px);
  border: 1px solid var(--line-strong);
  border-radius: 25px;
  background: rgba(17, 20, 28, 0.9);
  padding: 36px;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.45);
}
.auth-brand {
  margin-bottom: 42px;
}
.auth-card h1 {
  font-size: 36px;
  letter-spacing: -0.05em;
  margin: 10px 0 8px;
}
.auth-card > .muted {
  font-size: 12px;
  margin: 0 0 28px;
}
.auth-card form {
  margin-top: 22px;
}
.form-error {
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(251, 113, 133, 0.09);
  border: 1px solid rgba(251, 113, 133, 0.2);
  color: #fecdd3;
  font-size: 11px;
}
.auth-divider {
  height: 45px;
  display: flex;
  align-items: center;
  color: var(--subtle);
  font-size: 9px;
}
.auth-divider:before,
.auth-divider:after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.auth-divider span {
  padding: 0 12px;
}
.auth-help {
  font-size: 9px !important;
  color: var(--subtle) !important;
  text-align: center;
  margin: 20px 0 0 !important;
  line-height: 1.6;
}
.auth-help code {
  color: #aaa3c5;
}
.auth-card-wide {
  width: min(100%, 520px);
}
.auth-card label small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.55;
}
.auth-form-links {
  display: flex;
  justify-content: flex-end;
  margin: -3px 0 14px;
}
.auth-form-links-bottom {
  justify-content: center;
  margin: 18px 0 0;
}
.auth-form-links a {
  color: var(--accent-bright);
  font-size: 11px;
  text-decoration: none;
}
.auth-form-links a:hover {
  text-decoration: underline;
}
.auth-admin-fallback {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.auth-admin-fallback summary {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  list-style-position: inside;
}
.auth-admin-fallback > p {
  margin: 10px 0 0;
  color: var(--subtle);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}
.auth-admin-fallback form {
  margin-top: 16px;
}
.form-success {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid rgba(21, 147, 109, 0.24);
  border-radius: 12px;
  background: rgba(21, 147, 109, 0.08);
  color: var(--success);
  font-size: 12px;
  line-height: 1.55;
}
.form-success span {
  color: var(--text-soft);
}
.auth-risk-note {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 17px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  font-size: 11px;
  line-height: 1.6;
}
.auth-risk-note span {
  color: var(--muted);
}
.auth-actions {
  display: grid;
  gap: 8px;
  margin-top: 17px;
}
.conversation-menu {
  position: fixed;
  z-index: 80;
  width: 150px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #171b24;
  padding: 5px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.conversation-menu button {
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  font-size: 10px;
  cursor: pointer;
}
.conversation-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}
.conversation-menu button.danger {
  color: #fda4af;
}
.conversation-menu svg {
  width: 14px;
}
.picker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.picker-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  padding: 11px;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 11px;
  cursor: pointer;
}
.picker-item:hover,
.picker-item.active {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line);
}
.picker-item .picker-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.13);
  color: #c4b5fd;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 850;
}
.picker-item > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.picker-item strong {
  font-size: 11px;
}
.picker-item small {
  font-size: 9px;
  color: var(--subtle);
  margin-top: 3px;
}
.picker-item .price {
  font-size: 8px;
  color: var(--subtle);
}
.account-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.account-summary > div {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
}
.account-summary small {
  display: block;
  color: var(--subtle);
  font-size: 9px;
}
.account-summary strong {
  display: block;
  font-size: 19px;
  margin-top: 6px;
}
.account-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}
.account-links .button {
  flex: 1;
  font-size: 10px;
}
.account-logout {
  margin-top: 14px;
}
.account-logout form {
  margin: 0;
}
.account-logout button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 10px;
  cursor: pointer;
  padding: 8px;
}
@keyframes skeleton {
  to {
    background-position: -200% 0;
  }
}
@keyframes pulse {
  50% {
    transform: scale(1.13);
    opacity: 0.35;
  }
}
@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
@media (max-width: 900px) {
  .landing-main {
    grid-template-columns: 1fr;
    padding-top: 5vh;
  }
  .landing-copy {
    text-align: center;
  }
  .landing-copy > p {
    margin-left: auto;
    margin-right: auto;
  }
  .landing-actions,
  .landing-trust {
    justify-content: center;
  }
  .landing-visual {
    min-height: 480px;
  }
  .ai-layout {
    display: block;
  }
  .mobile-only {
    display: grid !important;
  }
  .chat-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(88vw, 310px);
    transform: translateX(-105%);
    transition: 0.25s;
    box-shadow: 20px 0 70px rgba(0, 0, 0, 0.5);
  }
  .chat-sidebar.open {
    transform: none;
  }
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 15;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
  }
  .sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }
  .chat-main {
    width: 100%;
    grid-template-rows: 60px 1fr auto;
  }
  .chat-topbar {
    height: 60px;
    padding: 0 10px;
    grid-template-columns: 1fr auto 1fr;
  }
  .topbar-left {
    min-width: 0;
  }
  .conversation-title-button {
    max-width: 150px;
  }
  .model-picker small {
    display: none;
  }
  .topbar-actions .icon-button:first-child {
    display: none;
  }
  .message-list {
    padding-left: 16px;
    padding-right: 16px;
  }
  .composer-zone {
    padding-left: 12px;
    padding-right: 12px;
  }
  .composer-foot > span {
    display: none;
  }
}
@media (max-width: 650px) {
  .landing-nav {
    height: 70px;
    padding: 0 18px;
  }
  .landing-main {
    padding: 55px 18px 20px;
  }
  .landing-copy h1 {
    font-size: 53px;
  }
  .landing-copy > p:not(.eyebrow) {
    font-size: 15px;
  }
  .landing-actions {
    flex-direction: column;
  }
  .landing-actions .button {
    width: 100%;
  }
  .landing-trust {
    gap: 12px;
    font-size: 10px;
  }
  .landing-visual {
    min-height: 370px;
  }
  .preview-window {
    transform: none;
  }
  .preview-body {
    grid-template-columns: 72px 1fr;
  }
  .preview-side {
    padding: 12px 7px;
  }
  .preview-chat {
    padding: 22px 15px;
  }
  .welcome-view {
    padding: 55px 15px 160px;
  }
  .welcome-view h1 {
    font-size: 36px;
  }
  .assistant-row {
    overflow-x: auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 0 4px;
  }
  .assistant-chip {
    white-space: nowrap;
  }
  .suggestion-grid {
    grid-template-columns: 1fr;
  }
  .suggestion-grid button {
    min-height: 70px;
  }
  .message {
    grid-template-columns: 30px 1fr;
    gap: 9px;
  }
  .message-avatar {
    width: 28px;
    height: 28px;
  }
  .message.user .message-body {
    max-width: 90%;
  }
  .message-content {
    font-size: 13px;
  }
  .message-actions {
    opacity: 1;
  }
  .composer-zone {
    padding-bottom: max(9px, env(safe-area-inset-bottom));
  }
  .composer-foot {
    display: none;
  }
  .composer-main {
    min-height: 57px;
  }
  .composer textarea {
    font-size: 16px;
  }
  .composer-note {
    display: none;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .modal-overlay {
    padding: 8px;
    align-items: end;
  }
  .modal {
    max-height: 90vh;
    border-radius: 20px 20px 12px 12px;
  }
  .toast-root {
    left: 12px;
    right: 12px;
    top: 12px;
  }
  .toast {
    min-width: 0;
    max-width: none;
  }
  .auth-card {
    padding: 27px 21px;
  }
  .account-summary {
    grid-template-columns: 1fr;
  }
}
