:root {
  --bg: #090d13;
  --panel: #111822;
  --panel-2: #161f2b;
  --line: rgba(182, 198, 218, .14);
  --line-strong: rgba(182, 198, 218, .25);
  --text: #eef3f8;
  --muted: #8f9bad;
  --gold: #e7bb60;
  --green: #76d0bd;
  --rose: #d88484;
  --user: #243344;
  --shadow: 0 24px 80px rgba(0, 0, 0, .32);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow: hidden;
}
button, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  opacity: .13;
  pointer-events: none;
}
.ambient-a { width: 520px; height: 520px; top: -260px; left: 10%; background: #dcad4c; }
.ambient-b { width: 440px; height: 440px; right: -160px; bottom: -220px; background: #2f958b; }
.app { display: grid; grid-template-columns: 282px minmax(0, 1fr); height: 100dvh; position: relative; }
.sidebar {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 25px 18px 20px;
  border-right: 1px solid var(--line);
  background: rgba(10, 15, 22, .74);
  backdrop-filter: blur(24px);
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 23px; }
.brand strong { display: block; font-size: 22px; letter-spacing: -.04em; }
.brand span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.flower-mark { position: relative; width: 32px; height: 32px; flex: 0 0 auto; }
.flower-mark i {
  position: absolute; left: 12px; top: 2px; width: 9px; height: 13px;
  border-radius: 50%; transform-origin: 4.5px 14px; background: linear-gradient(#f4d98e, #d49b39);
  box-shadow: inset 0 0 2px rgba(255,255,255,.4);
}
.flower-mark i:nth-child(2) { transform: rotate(72deg); }
.flower-mark i:nth-child(3) { transform: rotate(144deg); }
.flower-mark i:nth-child(4) { transform: rotate(216deg); }
.flower-mark i:nth-child(5) { transform: rotate(288deg); }
.flower-mark b { position: absolute; width: 10px; height: 10px; border-radius: 50%; left: 11px; top: 11px; background: #fff0bd; box-shadow: 0 0 10px rgba(255,220,130,.75); }
.flower-mark.large { width: 68px; height: 68px; transform: scale(1.55); }
.new-chat {
  width: 100%; display: flex; align-items: center; gap: 9px;
  color: var(--text); background: rgba(231,187,96,.08);
  border: 1px solid rgba(231,187,96,.28); border-radius: 12px; padding: 12px 14px;
  font-size: 14px; font-weight: 600;
}
.new-chat:hover { background: rgba(231,187,96,.14); }
.new-chat span { font-size: 19px; color: var(--gold); }
.side-section { margin-top: 27px; }
.side-label { margin: 0 10px 9px; color: #677486; font-size: 10px; letter-spacing: .14em; }
.side-prompt, .side-link {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  border: 0; border-radius: 9px; padding: 9px 10px; color: #afbbc9;
  background: transparent; text-align: left; font-size: 12.5px; line-height: 1.45;
}
.side-prompt:hover, .side-link:hover { color: var(--text); background: rgba(255,255,255,.045); }
.side-link span { color: #657285; }
.side-foot { margin-top: auto; padding: 25px 9px 0; }
.status { display: flex; align-items: center; gap: 8px; color: #a9b7c7; font-size: 11px; }
.status i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #62c7ad; box-shadow: 0 0 0 4px rgba(98,199,173,.09); }
.side-foot p { margin: 11px 0 0; color: #626f80; font-size: 10.5px; line-height: 1.7; }
.chat-shell { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; height: 100dvh; position: relative; }
.chat-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 34px 18px; border-bottom: 1px solid var(--line);
  background: rgba(9,13,19,.68); backdrop-filter: blur(18px);
}
.chat-header h1 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.chat-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.header-actions { display: flex; gap: 8px; }
.model-select {
  max-width: 224px;
  color: #d7dee8;
  background: #141c26;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 30px 6px 9px;
  font-size: 10.5px;
  outline: none;
}
.model-select:focus { border-color: rgba(231,187,96,.5); }
.header-actions button {
  color: #aab7c7; background: rgba(255,255,255,.025); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 11px; font-size: 11px;
}
.header-actions button:hover { color: var(--text); border-color: var(--line-strong); }
.mobile-menu { display: none; }
.messages { overflow-y: auto; padding: 30px max(24px, calc((100% - 880px) / 2)) 16px; scrollbar-width: thin; scrollbar-color: #303d4d transparent; }
.welcome { max-width: 780px; margin: 5vh auto 0; text-align: center; animation: rise .7s ease both; }
.welcome-mark { display: flex; justify-content: center; height: 80px; align-items: center; }
.eyebrow { margin: 14px 0 8px; color: var(--gold); font-size: 10px; letter-spacing: .19em; }
.welcome h2 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: clamp(38px, 6vw, 66px); letter-spacing: -.06em; font-weight: 600; }
.welcome-copy { max-width: 660px; margin: 18px auto 0; color: #9ba9ba; font-size: 14px; line-height: 1.9; }
.starter-grid { margin-top: 38px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.starter-grid button {
  min-height: 92px; padding: 17px 18px; color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; background: rgba(18,26,37,.68);
  text-align: left; transition: .2s ease;
}
.starter-grid button:hover { transform: translateY(-2px); border-color: rgba(231,187,96,.34); background: rgba(25,34,46,.82); }
.starter-grid span { display: block; color: #5e6b7d; font-size: 10px; font-variant-numeric: tabular-nums; }
.starter-grid b { display: block; margin-top: 8px; font-size: 14px; }
.starter-grid small { display: block; margin-top: 5px; color: #778596; font-size: 11px; line-height: 1.45; }
.message { max-width: 880px; margin: 0 auto 24px; animation: rise .35s ease both; }
.message.user { display: flex; justify-content: flex-end; }
.user-bubble { max-width: 72%; background: var(--user); padding: 12px 16px; border-radius: 18px 18px 4px 18px; line-height: 1.65; font-size: 14px; }
.user-bubble span { display: block; }
.user-bubble img { display: block; width: min(100%, 430px); max-height: 320px; margin-top: 9px; border-radius: 10px; object-fit: contain; background: #080b0f; }
.assistant-line { display: flex; align-items: flex-start; gap: 12px; }
.avatar { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid rgba(231,187,96,.25); border-radius: 50%; display: grid; place-items: center; background: #171c22; }
.avatar .flower-mark { transform: scale(.6); }
.response-card { flex: 1; min-width: 0; }
.answer {
  padding: 3px 0 0; color: #dde5ee; font-size: 14px; line-height: 1.9;
}
.answer p { margin: 0 0 12px; }
.answer strong { color: #f5d68d; font-weight: 650; }
.answer ul { margin: 8px 0 14px; padding-left: 20px; }
.answer li { margin: 7px 0; padding-left: 2px; }
.answer .lead { color: #f2f5f8; font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.answer .note { border-left: 2px solid rgba(231,187,96,.58); padding: 2px 0 2px 13px; color: #aebac8; }
.answer .warning { color: #c9a18b; }
.model-meta { margin-top: 10px; color: #627083; font-size: 9.5px; letter-spacing: .03em; }
.thinking { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; padding: 9px 0 2px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); animation: pulse 1.1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
.citations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.citation {
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
  color: #9facbd; border: 1px solid var(--line); background: rgba(255,255,255,.018);
  border-radius: 10px; padding: 10px 11px; font-size: 11px;
}
.citation:hover { color: var(--text); border-color: var(--line-strong); }
.citation b { color: #cbd5df; font-size: 11.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citation span { color: #6f7d8f; }
.evidence { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.evidence figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #06080c; cursor: zoom-in; }
.evidence img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: contain; }
.evidence figcaption { padding: 7px 9px; color: #6f7d8f; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.followups { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.followups button {
  color: #aeb9c7; background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 10px; font-size: 11px;
}
.followups button:hover { color: var(--gold); border-color: rgba(231,187,96,.35); }
.composer { padding: 12px max(24px, calc((100% - 880px) / 2)) 18px; background: linear-gradient(transparent, rgba(9,13,19,.95) 20%); }
.attachment-preview {
  display: flex; align-items: center; gap: 10px; max-width: 390px;
  margin: 0 0 8px; padding: 7px 9px; background: #121923;
  border: 1px solid var(--line); border-radius: 12px;
}
.attachment-preview[hidden] { display: none; }
.attachment-preview img { width: 46px; height: 40px; object-fit: cover; border-radius: 7px; background: #06080b; }
.attachment-preview div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.attachment-preview b { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-preview small { color: var(--muted); font-size: 9px; }
.attachment-preview button { margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.composer-box {
  display: flex; align-items: flex-end; gap: 10px; padding: 10px 10px 10px 17px;
  border: 1px solid rgba(182,198,218,.22); border-radius: 17px;
  background: #121923; box-shadow: var(--shadow);
}
.composer-box:focus-within { border-color: rgba(231,187,96,.48); box-shadow: 0 0 0 3px rgba(231,187,96,.06), var(--shadow); }
.composer textarea {
  width: 100%; resize: none; max-height: 150px; padding: 5px 0; color: var(--text);
  background: transparent; border: 0; outline: none; line-height: 1.75; font-size: 14px;
}
.composer textarea::placeholder { color: #687587; }
.attach {
  width: 34px; height: 39px; flex: 0 0 auto; border: 0; border-radius: 9px;
  color: #8593a5; background: transparent; display: grid; place-items: center;
}
.attach:hover { color: var(--gold); background: rgba(231,187,96,.08); }
.attach svg { width: 19px; height: 19px; }
.send { width: 39px; height: 39px; flex: 0 0 auto; border: 0; border-radius: 11px; color: #171208; background: var(--gold); display: grid; place-items: center; }
.send:disabled { opacity: .4; cursor: default; }
.send svg { width: 18px; height: 18px; }
.composer-note { display: flex; justify-content: space-between; gap: 15px; padding: 8px 4px 0; color: #566273; font-size: 9.5px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 9px 13px; border-radius: 9px; color: #dbe4ee; background: #1d2733; border: 1px solid var(--line-strong); font-size: 12px; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pulse { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
@media (max-width: 820px) {
  body { overflow: auto; }
  .app { display: block; height: 100dvh; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw, 310px); transform: translateX(-102%); transition: transform .25s ease; box-shadow: 20px 0 60px #000; }
  .sidebar.open { transform: translateX(0); }
  .chat-shell { height: 100dvh; }
  .chat-header { padding: 16px 17px 14px; flex-wrap: wrap; row-gap: 9px; }
  .mobile-menu { display: block; color: var(--text); background: transparent; border: 0; font-size: 19px; }
  .chat-header p { display: none; }
  .header-actions button:first-child { display: none; }
  .header-actions { width: 100%; justify-content: flex-end; }
  .model-select { width: 220px; max-width: 72vw; font-size: 10px; }
  .messages { padding: 22px 15px 10px; }
  .welcome { margin-top: 16px; }
  .welcome h2 { font-size: 42px; }
  .welcome-copy { font-size: 13px; line-height: 1.8; }
  .starter-grid { grid-template-columns: 1fr; margin-top: 27px; }
  .starter-grid button { min-height: auto; }
  .user-bubble { max-width: 85%; }
  .citations, .evidence { grid-template-columns: 1fr; }
  .composer { padding: 10px 12px 12px; }
  .composer-note span:last-child { display: none; }
}
