@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #1d2340;
  --muted: #8d91a6;
  --line: #e8e9f0;
  --panel: #ffffff;
  --canvas: #f6f7fb;
  --purple: #6559e8;
  --purple-dark: #5145d2;
  --purple-soft: #efedff;
  --peach: #fff1e8;
  --shadow: 0 24px 60px rgba(43, 39, 100, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: 'Noto Sans SC', 'Manrope', sans-serif;
}

button, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: relative;
  display: flex;
  width: 250px;
  min-height: 100vh;
  flex-direction: column;
  padding: 30px 20px 22px;
  background: #fbfbfd;
  border-right: 1px solid var(--line);
}

.brand-row, .mobile-brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; color: white; border-radius: 11px; background: linear-gradient(145deg, #8176f2, #5045d1); box-shadow: 0 8px 20px rgba(101, 89, 232, .28); font-weight: 800; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: .04em; }
.brand-subtitle, .eyebrow, .section-label { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .13em; }
.brand-subtitle { margin-top: 1px; font-size: 7px; letter-spacing: .08em; }

.new-trip-button { display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 46px; padding: 12px 13px; color: white; border: 0; border-radius: 10px; background: var(--purple); box-shadow: 0 9px 20px rgba(101, 89, 232, .18); font-size: 12px; font-weight: 700; transition: transform .2s, background .2s; }
.new-trip-button:hover { transform: translateY(-1px); background: var(--purple-dark); }
.new-trip-button span { font-size: 19px; line-height: 12px; font-weight: 400; }
.sidebar-section { margin-top: 37px; }
.section-label { padding: 0 8px 12px; font-size: 9px; }
.conversation-item { display: flex; align-items: center; gap: 9px; padding: 10px 9px; color: #555a72; border-radius: 9px; font-size: 11px; }
.conversation-item.active { color: var(--ink); background: #efeff8; font-weight: 600; }
.conversation-icon { color: var(--purple); font-size: 15px; }
.conversation-dot { width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: #ff9e7b; }
.guide-section { margin-top: 29px; }
.guide-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; color: #81869b; border: 0; background: transparent; text-align: left; font-size: 11px; transition: color .2s, transform .2s; }
.guide-item:hover { color: var(--purple); transform: translateX(2px); }
.guide-item span { width: 14px; color: #aaa5e9; font-size: 16px; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 20px 8px 0; border-top: 1px solid var(--line); }
.model-badge { display: flex; align-items: center; gap: 7px; color: #666b83; font-family: 'DM Mono', monospace; font-size: 9px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #59c99d; box-shadow: 0 0 0 3px rgba(89, 201, 157, .12); }
.footer-copy { margin-top: 14px; color: #a2a5b6; font-size: 10px; line-height: 1.75; }

.main-panel { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 104px; padding: 0 42px; background: rgba(255, 255, 255, .58); border-bottom: 1px solid var(--line); }
.topbar-title .eyebrow { margin-bottom: 5px; }
.topbar h1 { margin: 0; font-size: 21px; letter-spacing: -.04em; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.thinking-pill { display: flex; align-items: center; gap: 8px; padding: 8px 11px; color: #797d94; border: 1px solid var(--line); border-radius: 20px; font-family: 'DM Mono', monospace; font-size: 9px; }
.icon-button, .more-button { display: grid; place-items: center; width: 32px; height: 32px; color: #8b8fa5; border: 0; border-radius: 9px; background: transparent; font-size: 20px; }
.icon-button:hover, .more-button:hover { background: var(--purple-soft); color: var(--purple); }
.mobile-brand { display: none; }

.chat-layout { display: flex; min-height: 0; flex: 1; gap: 38px; padding: 37px 42px 28px; }
.chat-column { display: flex; min-width: 0; flex: 1; flex-direction: column; max-width: 810px; margin: 0 auto; }
.chat-scroller { min-height: 0; flex: 1; overflow-y: auto; padding: 0 10px 30px 4px; }
.date-divider { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 3px 0 31px; color: #b1b4c3; font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .12em; }
.date-divider span { width: 46px; height: 1px; background: #e3e4ec; }
.message { display: flex; gap: 13px; margin-bottom: 27px; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 31px; height: 31px; border-radius: 10px; font-size: 13px; font-weight: 800; }
.assistant-avatar { color: white; background: linear-gradient(145deg, #8176f2, #5145d2); box-shadow: 0 7px 18px rgba(101, 89, 232, .2); }
.user-avatar { color: #a76345; background: #ffddcc; }
.message-content { min-width: 0; max-width: 610px; }
.message-meta { display: flex; align-items: baseline; gap: 9px; margin: 1px 0 8px; color: #777b91; font-size: 11px; font-weight: 700; }
.meta-time { color: #b1b3c1; font-family: 'DM Mono', monospace; font-size: 8px; font-weight: 400; }
.bubble { padding: 17px 19px; border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; background: white; box-shadow: 0 8px 23px rgba(47, 45, 93, .03); color: #54596e; font-size: 13px; line-height: 1.85; }
.bubble p { margin: 0; }
.bubble p + p { margin-top: 10px; }
.tool-note { margin-top: 8px; color: #9a9db1; font-family: 'DM Mono', monospace; font-size: 8px; }.tool-check { display: inline-grid; place-items: center; width: 13px; height: 13px; margin-right: 4px; color: #4aab83; border-radius: 50%; background: #e3f7ef; }
.welcome-bubble { border-color: #e4e0ff; background: linear-gradient(130deg, #fbfaff, #f8f7ff); }
.quick-prompts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.quick-prompts button { padding: 8px 11px; color: #7770d9; border: 1px solid #dedbff; border-radius: 7px; background: #faf9ff; font-size: 10px; transition: border .2s, background .2s; }
.quick-prompts button:hover { border-color: #aaa2ff; background: #f2f0ff; }
.user-message { justify-content: flex-end; }
.user-message .message-content { order: 1; }
.user-message .avatar { order: 2; }
.user-message .message-meta { justify-content: flex-end; }
.user-message .bubble { border-color: #e6ddff; border-radius: 16px 4px 16px 16px; background: #eeeaff; color: #5e598b; }
.typing-bubble { display: flex; align-items: center; gap: 4px; width: fit-content; padding: 16px 18px; }
.typing-bubble i { width: 5px; height: 5px; border-radius: 50%; background: #a29ceb; animation: pulse 1.1s infinite ease-in-out; }
.typing-bubble i:nth-child(2) { animation-delay: .15s; }.typing-bubble i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.composer-wrap { padding: 0 0 2px; }
.composer { padding: 14px 14px 10px 18px; border: 1px solid #dedfea; border-radius: 16px; background: white; box-shadow: var(--shadow); }
.composer textarea { display: block; width: 100%; max-height: 120px; min-height: 27px; resize: none; padding: 0; color: var(--ink); border: 0; outline: 0; background: transparent; font-size: 13px; line-height: 1.65; }
.composer textarea::placeholder { color: #b2b5c4; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.composer-hint { color: #b0b2c0; font-family: 'DM Mono', monospace; font-size: 8px; }.composer-hint span { color: #8c91ab; }
.send-button { display: grid; place-items: center; width: 31px; height: 31px; color: white; border: 0; border-radius: 9px; background: var(--purple); font-size: 20px; line-height: 1; transition: background .2s, transform .2s; }
.send-button:hover { background: var(--purple-dark); transform: translateY(-1px); }.send-button:disabled { opacity: .5; cursor: wait; transform: none; }
.trip-draft-panel { width: 275px; flex: 0 0 275px; padding: 2px 0 0; }
.draft-header { display: flex; align-items: flex-start; justify-content: space-between; }.draft-header h2 { margin: 7px 0 0; font-size: 19px; letter-spacing: -.04em; }.draft-actions { position: relative; }.more-button { margin-top: -4px; font-size: 15px; }
.draft-menu { position: absolute; z-index: 5; top: 31px; right: 0; width: 154px; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 15px 30px rgba(43, 39, 100, .13); }.draft-menu[hidden] { display: none; }.draft-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 8px; color: #686d83; border: 0; border-radius: 7px; background: transparent; text-align: left; font-size: 10px; }.draft-menu button:hover { color: var(--purple); background: var(--purple-soft); }.draft-menu button span { width: 15px; color: #8c85e6; font-size: 16px; text-align: center; }
.draft-cover { position: relative; height: 150px; margin-top: 22px; overflow: hidden; border-radius: 14px; background: linear-gradient(140deg, #c8c2ff 0%, #8781e7 41%, #6258cf 100%); }
.draft-cover::before, .draft-cover::after { position: absolute; content: ''; border-radius: 50%; filter: blur(1px); }.draft-cover::before { width: 190px; height: 190px; right: -43px; bottom: -110px; background: rgba(255,255,255,.22); }.draft-cover::after { width: 120px; height: 120px; left: -40px; top: -68px; background: rgba(255,255,255,.15); }
.cover-orbit { position: absolute; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; transform: rotate(-22deg); }.orbit-one { width: 250px; height: 80px; top: 12px; right: -47px; }.orbit-two { width: 270px; height: 90px; top: 31px; right: -56px; }.cover-sun { position: absolute; top: 31px; right: 37px; color: #fff5cf; font-size: 30px; }.cover-copy { position: absolute; left: 19px; bottom: 18px; color: rgba(255,255,255,.9); }.cover-copy span { display: block; font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: .2em; }.cover-copy strong { display: block; margin-top: 2px; font-size: 20px; letter-spacing: .05em; }.cover-stamp { position: absolute; right: 17px; bottom: 17px; display: grid; place-items: center; width: 38px; height: 38px; color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.5); border-radius: 50%; font-size: 9px; line-height: 1.15; transform: rotate(12deg); }
.draft-title { margin-top: 17px; color: #41465f; font-size: 13px; font-weight: 700; }.draft-subtitle { margin-top: 5px; color: #a3a6b7; font-size: 10px; line-height: 1.6; }
.draft-details { margin-top: 23px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.draft-detail { display: flex; align-items: center; gap: 12px; margin: 13px 0; }.detail-icon { display: grid; place-items: center; width: 28px; height: 28px; color: #8d84e4; border-radius: 9px; background: var(--purple-soft); font-size: 16px; }.draft-detail span { display: block; margin-bottom: 3px; color: #aaaebe; font-family: 'DM Mono', monospace; font-size: 8px; }.draft-detail strong { display: block; color: #5d6279; font-size: 11px; font-weight: 600; }
.draft-progress { padding-top: 20px; }.progress-label { display: flex; justify-content: space-between; color: #777c94; font-family: 'DM Mono', monospace; font-size: 9px; }.progress-track { height: 5px; margin-top: 10px; overflow: hidden; border-radius: 8px; background: #ebebf3; }.progress-value { width: 0; height: 100%; border-radius: inherit; background: var(--purple); transition: width .4s ease; }.draft-progress p { margin: 12px 0 0; color: #a0a4b4; font-size: 10px; line-height: 1.6; }

@media (max-width: 1080px) { .chat-layout { gap: 24px; padding-left: 28px; padding-right: 28px; }.topbar { padding: 0 28px; }.trip-draft-panel { width: 245px; flex-basis: 245px; } }
@media (max-width: 820px) { .sidebar { display: none; }.mobile-brand { display: flex; font-size: 17px; font-weight: 800; }.topbar { min-height: 76px; padding: 0 18px; }.topbar-title { display: none; }.thinking-pill { display: none; }.chat-layout { display: block; padding: 23px 16px 18px; }.chat-column { max-width: none; height: calc(100vh - 117px); }.trip-draft-panel { display: none; }.chat-scroller { padding-right: 2px; } }
@media (max-width: 480px) { .topbar-actions { gap: 4px; }.message-content { max-width: calc(100vw - 83px); }.bubble { padding: 14px 15px; font-size: 12px; }.quick-prompts button { font-size: 9px; }.composer { border-radius: 13px; }.composer-hint { font-size: 7px; } }
