:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-2: #f2f4f1;
  --surface-3: #ebeeea;
  --sidebar: #171b18;
  --sidebar-2: #1d221e;
  --text: #171b18;
  --muted: #727a74;
  --faint: #9da39e;
  --border: #e3e6e2;
  --purple: #741054;
  --purple-2: #94196f;
  --purple-soft: #f7edf4;
  --green: #24a270;
  --shadow-sm: 0 1px 2px rgba(21, 30, 23, .04), 0 5px 18px rgba(21, 30, 23, .04);
  --shadow-md: 0 18px 55px rgba(21, 30, 23, .13), 0 3px 12px rgba(21, 30, 23, .06);
  --sidebar-w: 286px;
  --topbar-h: 68px;
  --radius: 16px;
  --font: "Vazirmatn", Tahoma, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

body.dark {
  --bg: #101310;
  --surface: #171b18;
  --surface-2: #1d221e;
  --surface-3: #262c27;
  --text: #f4f6f3;
  --muted: #a6aea8;
  --faint: #7d857f;
  --border: #2d332e;
  --purple-soft: rgba(148, 25, 111, .18);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2);
  --shadow-md: 0 24px 60px rgba(0, 0, 0, .4);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { background: var(--sidebar); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  direction: rtl;
  display: flex;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
::selection { color: #fff; background: rgba(116, 16, 84, .8); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(121, 130, 123, .28); border-radius: 10px; }

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100dvh;
  padding: 0 12px 14px;
  background:
    radial-gradient(circle at 40% 0, rgba(116,16,84,.14), transparent 28%),
    var(--sidebar);
  color: #edf1ed;
  border-left: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 50;
}
.brand-row { height: var(--topbar-h); padding: 0 8px; display: flex; align-items: center; justify-content: space-between; flex: none; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; direction: ltr; }
.brand img { width: 36px; height: 36px; border-radius: 11px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.09), 0 7px 22px rgba(0,0,0,.3); }
.brand-copy { display: grid; text-align: left; line-height: 1.1; }
.brand-copy b { font-size: 17px; letter-spacing: .25px; }
.brand-copy small { margin-top: 5px; color: #879088; font-size: 9.5px; direction: rtl; }
.icon-btn { border: 0; background: transparent; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; cursor: pointer; transition: .18s ease; position: relative; }
.icon-btn:hover { background: var(--surface-2); }
.sidebar .icon-btn:hover { background: rgba(255,255,255,.07); }
.sidebar-close { display: none; color: #98a19a; }

.new-chat { width: 100%; height: 48px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; color: #f7f9f7; background: rgba(255,255,255,.045); padding: 0 11px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: .2s ease; font-weight: 600; }
.new-chat:hover { background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.16); transform: translateY(-1px); }
.new-chat-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: var(--purple); color: #fff; box-shadow: 0 5px 15px rgba(116,16,84,.35); }
.new-chat-icon svg { width: 17px; height: 17px; stroke-width: 2.2; }
.new-chat > span:nth-child(2) { flex: 1; text-align: right; font-size: 13px; }
.new-chat kbd { font-family: inherit; font-size: 9px; color: #7f8881; border: 1px solid rgba(255,255,255,.1); border-radius: 5px; padding: 2px 5px; direction: ltr; }

.side-search { height: 39px; margin: 14px 3px 10px; padding: 0 10px; display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.16); border: 1px solid transparent; border-radius: 11px; color: #778079; transition: .2s; }
.side-search:focus-within { border-color: rgba(255,255,255,.12); color: #aab2ac; }
.side-search svg { width: 16px; height: 16px; }
.side-search input { min-width: 0; flex: 1; outline: 0; border: 0; background: transparent; color: #e8ebe8; font-size: 11.5px; }
.side-search input::placeholder { color: #727b74; }
.side-search > span { font-size: 9px; border: 1px solid rgba(255,255,255,.08); padding: 1px 4px; border-radius: 4px; }

.history { flex: 1; overflow: auto; margin: 0 -2px; padding: 0 2px; }
.history-group { margin: 14px 0 20px; }
.history-group > p { margin: 0 12px 7px; color: #687169; font-size: 10px; font-weight: 500; }
.history-item { width: 100%; height: 39px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: #aab1ab; display: flex; align-items: center; gap: 9px; cursor: pointer; text-align: right; transition: .16s ease; }
.history-item svg { width: 15px; height: 15px; flex: none; opacity: .7; }
.history-item span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11.5px; }
.history-item i { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.history-item:hover { color: #e6eae6; background: rgba(255,255,255,.045); }
.history-item.active { color: #fff; background: rgba(255,255,255,.075); }
.history-item.active i { background: #b63b90; box-shadow: 0 0 0 4px rgba(182,59,144,.1); }
.empty-history { color: #747d76; text-align: center; font-size: 11px; margin-top: 30px; }

.side-footer { padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); }
.plan-card { min-height: 54px; padding: 8px 9px; border-radius: 12px; display: flex; gap: 9px; align-items: center; background: linear-gradient(115deg, rgba(116,16,84,.23), rgba(116,16,84,.05)); border: 1px solid rgba(181,55,143,.16); margin-bottom: 7px; }
.plan-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #d37fbc; background: rgba(116,16,84,.25); font-size: 15px; }
.plan-card > span:nth-child(2) { display: grid; flex: 1; }
.plan-card b { font-size: 11px; }
.plan-card small { color: #8e978f; font-size: 9px; margin-top: 3px; }
.plan-card small em { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #40b684; }
.plan-card svg { width: 14px; height: 14px; color: #737c74; }
.profile { width: 100%; min-height: 52px; border: 0; background: transparent; border-radius: 12px; color: #f0f3f0; padding: 7px 8px; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.profile:hover { background: rgba(255,255,255,.045); }
.avatar { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(145deg, #962372, #5b0e43); font-size: 12px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.profile > span:nth-child(2) { display: grid; min-width: 0; flex: 1; text-align: right; }
.profile b { font-size: 10.5px; font-weight: 600; }
.profile small { color: #747d76; font-size: 8.5px; direction: ltr; text-align: right; margin-top: 2px; }
.profile svg { width: 17px; color: #737c74; }

.app-shell { flex: 1; min-width: 0; height: 100dvh; background: var(--bg); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.app-shell::before { content: ""; position: absolute; inset: var(--topbar-h) 0 0; pointer-events: none; background-image: radial-gradient(rgba(116,16,84,.12) .6px, transparent .6px); background-size: 20px 20px; opacity: .12; mask-image: linear-gradient(to bottom, black, transparent 38%); }
.topbar { height: var(--topbar-h); flex: none; padding: 0 20px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; position: relative; z-index: 30; }
.topbar-side { display: flex; align-items: center; gap: 5px; }
.topbar-start { justify-content: flex-start; }
.topbar-end { justify-content: flex-start; direction: ltr; }
.menu-btn { display: none; }
.model-picker-wrap { position: relative; }
.model-trigger { min-width: 206px; height: 45px; padding: 0 9px; display: flex; align-items: center; gap: 9px; color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 13px; cursor: pointer; transition: .18s; text-align: right; }
.model-trigger:hover, .model-trigger[aria-expanded="true"] { background: var(--surface-2); border-color: var(--border); }
.model-mark { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; flex: none; font-family: Arial, sans-serif; font-weight: 700; font-size: 15px; }
.openai-mark { color: #116a55; background: #e6f5f0; }
.claude-mark { color: #9c4d37; background: #f9e9e3; }
.gemini-mark { color: #386fbd; background: #e7effc; }
.deepseek-mark { color: #325fc7; background: #e8efff; }
body.dark .openai-mark { background: rgba(17,106,85,.22); color: #6fd0b6; }
body.dark .claude-mark { background: rgba(156,77,55,.22); color: #e59a83; }
body.dark .gemini-mark, body.dark .deepseek-mark { background: rgba(50,95,199,.2); color: #8ab1ff; }
.model-trigger-copy { display: grid; min-width: 0; flex: 1; line-height: 1.15; }
.model-trigger-copy b { font-size: 12.5px; direction: ltr; text-align: right; }
.model-trigger-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.chevron { width: 15px; height: 15px; color: var(--faint); transition: .2s; }
.model-trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.conversation-title { display: grid; justify-items: center; line-height: 1.2; }
.conversation-title span { font-size: 11.5px; font-weight: 600; }
.conversation-title i { font-size: 8px; color: var(--faint); font-style: normal; margin-top: 4px; }
.conversation-title i::before { content: ""; width: 4px; height: 4px; margin-left: 5px; display: inline-block; border-radius: 50%; background: #36ad79; vertical-align: 1px; }
.topbar .icon-btn { color: var(--muted); }
.topbar .icon-btn svg { width: 17px; height: 17px; }
.sun-icon { display: none; }
body.dark .moon-icon { display: none; }
body.dark .sun-icon { display: block; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; top: calc(100% + 7px); left: 50%; transform: translate(-50%, -3px); color: #fff; background: #242824; padding: 5px 8px; border-radius: 6px; font-size: 9px; white-space: nowrap; opacity: 0; pointer-events: none; transition: .15s; }
[data-tooltip]:hover::after { opacity: 1; transform: translate(-50%, 0); }

.model-popover { position: absolute; top: calc(100% + 9px); right: 0; width: 400px; max-height: calc(100vh - 100px); overflow: auto; padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-md); animation: pop .2s var(--ease); z-index: 100; }
@keyframes pop { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: none; } }
.popover-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 3px 12px; }
.popover-head > div { display: grid; }
.popover-head b { font-size: 13px; }
.popover-head small { font-size: 9px; color: var(--muted); margin-top: 3px; }
.live-badge { font-size: 8px; color: var(--muted); padding: 5px 8px; border-radius: 20px; background: var(--surface-2); }
.live-badge i { width: 5px; height: 5px; display: inline-block; border-radius: 50%; background: #31a976; margin-left: 3px; box-shadow: 0 0 0 3px rgba(49,169,118,.11); }
.model-search { height: 39px; border-radius: 10px; padding: 0 10px; display: flex; align-items: center; gap: 7px; background: var(--surface-2); border: 1px solid transparent; }
.model-search:focus-within { border-color: rgba(116,16,84,.22); }
.model-search svg { width: 15px; color: var(--faint); }
.model-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 10.5px; }
.model-section-title { font-size: 8.5px; color: var(--faint); margin: 14px 5px 7px; }
.model-list { display: grid; gap: 3px; }
.model-option { min-height: 57px; padding: 7px; border-radius: 12px; border: 1px solid transparent; background: transparent; display: flex; align-items: center; gap: 9px; cursor: pointer; text-align: right; }
.model-option:hover { background: var(--surface-2); }
.model-option.selected { background: var(--purple-soft); border-color: rgba(116,16,84,.1); }
.model-option > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.model-option b { font-size: 10.5px; direction: ltr; text-align: right; }
.model-option small { color: var(--muted); font-size: 8.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-option em, .model-option > i { font-size: 7.5px; font-style: normal; color: var(--purple); background: var(--purple-soft); border-radius: 10px; padding: 3px 6px; }
.model-option > i { color: var(--muted); background: var(--surface-2); }
.model-option > svg { width: 15px; color: var(--purple); opacity: 0; }
.model-option.selected > svg { opacity: 1; }
.all-models { height: 37px; margin-top: 9px; padding: 0 5px; display: flex; align-items: center; justify-content: center; gap: 6px; border-top: 1px solid var(--border); color: var(--muted); font-size: 9.5px; }
.all-models svg { width: 13px; }

.chat-stage { flex: 1; min-height: 0; overflow-y: auto; position: relative; z-index: 2; scroll-behavior: smooth; }
.welcome { width: min(780px, calc(100% - 36px)); min-height: 100%; margin: 0 auto; padding: 7vh 0 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.welcome-orbit { width: 164px; height: 164px; position: relative; margin: 4px 0 27px; display: grid; place-items: center; isolation: isolate; }
.welcome-orbit::before { content: ""; position: absolute; inset: 34px; border-radius: 50%; background: rgba(116,16,84,.1); filter: blur(21px); z-index: -1; }
.orbit { position: absolute; border: 1px solid rgba(116,16,84,.15); border-radius: 50%; pointer-events: none; }
.orbit-1 { inset: 23px; }
.orbit-2 { inset: 3px; border-style: dashed; opacity: .62; animation: orbitRing 32s linear infinite; }
@keyframes orbitRing { to { transform: rotate(360deg); } }
.orbit-pulse { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 5px rgba(116,16,84,.08), 0 0 16px rgba(116,16,84,.38); }
.pulse-1 { top: 29px; right: 29px; }
.pulse-2 { bottom: 23px; left: 43px; width: 4px; height: 4px; opacity: .7; }
.mup-symbol { width: 88px; height: 88px; padding: 4px; display: grid; place-items: center; background: #0e120f; border-radius: 25px; box-shadow: 0 20px 42px rgba(19,25,20,.25), 0 0 0 1px rgba(116,16,84,.2), inset 0 0 0 1px rgba(255,255,255,.08); z-index: 3; overflow: hidden; }
.mup-symbol img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 21px; transform: scale(1.08); }
.model-runner { position: absolute; inset: 2px; border-radius: 50%; animation: modelOrbit 17s linear infinite; z-index: 4; pointer-events: none; }
.runner-2 { animation-delay: -5.66s; }
.runner-3 { animation-delay: -11.33s; }
@keyframes modelOrbit { to { transform: rotate(360deg); } }
.satellite { position: absolute; top: -14px; left: 50%; width: 32px; height: 32px; transform: translateX(-50%); display: grid; place-items: center; border: 3px solid var(--bg); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 22px rgba(23,30,24,.15); font-family: Arial, sans-serif; font-size: 12px; animation: modelCounterOrbit 17s linear infinite; }
.runner-2 .satellite { animation-delay: -5.66s; }
.runner-3 .satellite { animation-delay: -11.33s; }
@keyframes modelCounterOrbit { to { transform: translateX(-50%) rotate(-360deg); } }
.sat-1 { color: #b86249; background: #fff5f1; }
.sat-2 { color: #4285d4; background: #f2f7ff; }
.sat-3 { color: #16765f; background: #effaf6; }
body.dark .sat-1, body.dark .sat-2, body.dark .sat-3 { background: var(--surface); }
.eyebrow { margin: 0 0 11px; display: flex; align-items: center; gap: 7px; color: var(--purple); font-size: 10.5px; font-weight: 600; }
.eyebrow i { width: 5px; height: 5px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 4px rgba(116,16,84,.08); }
.welcome h1 { margin: 0; font-size: clamp(32px, 3.7vw, 50px); line-height: 1.3; letter-spacing: -1.6px; font-weight: 400; }
.welcome h1 span { font-weight: 750; color: var(--purple); }
.welcome-desc { margin: 17px 0 28px; color: var(--muted); font-size: 12px; line-height: 2; }
.suggestion-grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.suggestion { min-height: 70px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 15px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 10px; text-align: right; cursor: pointer; transition: .2s var(--ease); }
.suggestion:hover { border-color: rgba(116,16,84,.25); box-shadow: 0 10px 25px rgba(27,34,29,.07); transform: translateY(-2px); }
.suggestion-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 11px; }
.suggestion-icon svg { width: 18px; height: 18px; }
.suggestion-icon.purple { color: #8d1c6b; background: #f7e9f2; }
.suggestion-icon.orange { color: #ad5a29; background: #fcf0e6; }
.suggestion-icon.blue { color: #376fac; background: #eaf2fb; }
.suggestion-icon.green { color: #26775a; background: #e8f4ef; }
body.dark .suggestion-icon { background: var(--surface-3); }
.suggestion > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.suggestion b { font-size: 10.5px; }
.suggestion small { margin-top: 5px; color: var(--muted); font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestion .go { width: 15px; color: var(--faint); opacity: .65; transform: translateX(3px); transition: .2s; }
.suggestion:hover .go { color: var(--purple); opacity: 1; transform: none; }

.messages { width: min(800px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 40px; display: grid; gap: 30px; }
.message { display: flex; align-items: flex-start; gap: 12px; animation: messageIn .3s var(--ease); }
@keyframes messageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.message.user { flex-direction: row-reverse; }
.message-avatar { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; font-size: 10px; font-weight: 700; }
.message.ai .message-avatar { color: white; background: linear-gradient(145deg, #2c332d, #111511); box-shadow: 0 6px 16px rgba(15,20,16,.15); }
.message.user .message-avatar { color: white; background: linear-gradient(145deg, #9b2878, #641048); }
.message-content { max-width: min(680px, calc(100% - 44px)); }
.message-meta { color: var(--faint); font-size: 8.5px; margin: 1px 2px 7px; display: flex; align-items: center; gap: 6px; }
.message.user .message-meta { justify-content: flex-end; }
.message-meta b { color: var(--text); font-size: 10px; }
.message-bubble { padding: 12px 15px; border-radius: 5px 16px 16px 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: 11.5px; line-height: 2; white-space: pre-wrap; }
.message.user .message-bubble { color: #fff; background: var(--purple); border-color: var(--purple); border-radius: 16px 5px 16px 16px; box-shadow: 0 6px 18px rgba(116,16,84,.15); }
.message-actions { display: flex; gap: 2px; margin-top: 6px; opacity: 0; transition: .15s; }
.message:hover .message-actions { opacity: 1; }
.message-action { width: 28px; height: 26px; border: 0; background: transparent; color: var(--faint); border-radius: 7px; cursor: pointer; display: grid; place-items: center; }
.message-action:hover { color: var(--text); background: var(--surface-2); }
.message-action svg { width: 13px; height: 13px; }
.typing { display: inline-flex; align-items: center; gap: 4px; min-width: 45px; height: 20px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: .14s; }.typing i:nth-child(3) { animation-delay: .28s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.composer-zone { flex: none; padding: 7px 20px max(12px, env(safe-area-inset-bottom)); position: relative; z-index: 20; background: linear-gradient(to top, var(--bg) 78%, transparent); }
.composer { width: min(820px, 100%); margin: 0 auto; min-height: 88px; padding: 13px 14px 9px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: 0 10px 35px rgba(25,32,27,.08), 0 1px 3px rgba(25,32,27,.05); transition: border .2s, box-shadow .2s; }
.composer:focus-within { border-color: rgba(116,16,84,.35); box-shadow: 0 12px 40px rgba(25,32,27,.09), 0 0 0 3px rgba(116,16,84,.04); }
.composer textarea { width: 100%; min-height: 33px; max-height: 150px; padding: 2px 3px 7px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11.5px; line-height: 1.8; overflow-y: auto; }
.composer textarea::placeholder { color: var(--faint); }
.composer-tools { min-height: 35px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tools-start, .tools-end { display: flex; align-items: center; gap: 3px; }
.tools-end { direction: ltr; }
.tool-btn { height: 31px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: 9px; transition: .16s; }
.tool-btn:hover { color: var(--text); background: var(--surface-2); }
.tool-btn svg { width: 16px; height: 16px; }
.tool-btn.compact { width: 31px; padding: 0; display: grid; place-items: center; }
.web-toggle.active { color: var(--purple); background: var(--purple-soft); }
.tools-divider { width: 1px; height: 18px; margin: 0 3px; background: var(--border); }
.char-count { font-size: 8px; color: var(--faint); min-width: 14px; text-align: center; }
.send-btn { width: 33px; height: 33px; border: 0; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--purple); box-shadow: 0 5px 14px rgba(116,16,84,.23); cursor: pointer; transition: .18s var(--ease); }
.send-btn:hover:not(:disabled) { background: var(--purple-2); transform: translateY(-1px); }
.send-btn:disabled { color: #a4aaa5; background: var(--surface-3); box-shadow: none; cursor: default; }
.send-btn svg { width: 16px; height: 16px; stroke-width: 2.2; }
.stop-icon { display: none; fill: currentColor; stroke: none !important; }
.send-btn.streaming .send-icon { display: none; }
.send-btn.streaming .stop-icon { display: block; }
.disclaimer { margin: 6px auto 0; text-align: center; color: var(--faint); font-size: 8px; }
.disclaimer a { text-decoration: underline; text-underline-offset: 2px; }
.attachment-list { width: min(820px,100%); margin: 0 auto 6px; display: flex; gap: 6px; overflow-x: auto; }
.file-chip { height: 37px; padding: 0 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); display: flex; align-items: center; gap: 7px; flex: none; box-shadow: var(--shadow-sm); }
.file-chip > span:first-child { width: 23px; height: 23px; display: grid; place-items: center; color: var(--purple); background: var(--purple-soft); border-radius: 6px; font-size: 8px; }
.file-chip b { max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 8.5px; font-weight: 500; }
.file-chip button { border: 0; background: transparent; color: var(--faint); cursor: pointer; padding: 0 2px; font-size: 14px; }

.toast-stack { position: fixed; left: 22px; bottom: 22px; z-index: 200; display: grid; gap: 8px; }
.toast { min-width: 230px; padding: 11px 13px; border-radius: 11px; color: #f5f7f5; background: #242a25; box-shadow: 0 12px 32px rgba(0,0,0,.18); font-size: 10px; animation: toastIn .3s var(--ease); }
.toast::before { content: "✓"; color: #74d4a9; margin-left: 7px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(8,12,9,.48); backdrop-filter: blur(3px); }

@media (max-height: 760px) and (min-width: 761px) {
  .welcome { padding-top: 20px; justify-content: flex-start; }
  .welcome-orbit { width: 126px; height: 126px; margin: 0 0 13px; }
  .mup-symbol { width: 70px; height: 70px; border-radius: 20px; }
  .model-runner { inset: 3px; }
  .satellite { width: 27px; height: 27px; top: -12px; }
  .welcome-desc { margin: 10px 0 18px; }
  .suggestion { min-height: 62px; }
}

@media (max-width: 920px) {
  .sidebar { position: fixed; right: 0; top: 0; transform: translateX(105%); box-shadow: -20px 0 60px rgba(0,0,0,.25); transition: transform .3s var(--ease); }
  body.sidebar-open .sidebar { transform: none; }
  .sidebar-close, .menu-btn { display: grid; }
  .topbar { padding: 0 12px; }
  .model-trigger { min-width: 175px; }
}

@media (max-width: 640px) {
  :root { --topbar-h: 61px; }
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-start { gap: 0; }
  .conversation-title { display: none; }
  .topbar-end .more-btn, .topbar-end #shareBtn { display: none; }
  .model-trigger { min-width: 0; max-width: 172px; height: 42px; padding: 0 6px; }
  .model-trigger-copy small { display: none; }
  .model-trigger-copy b { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .model-mark { width: 29px; height: 29px; border-radius: 9px; }
  .model-popover { position: fixed; top: 68px; right: 10px; left: 10px; width: auto; }
  .welcome { width: calc(100% - 28px); padding: 4vh 0 18px; justify-content: flex-start; }
  .welcome-orbit { width: 138px; height: 138px; margin: 9px 0 20px; }
  .mup-symbol { width: 76px; height: 76px; border-radius: 22px; }
  .model-runner { inset: 3px; }
  .satellite { width: 29px; height: 29px; top: -12px; border-width: 2px; }
  .welcome h1 { font-size: 31px; letter-spacing: -1px; }
  .welcome-desc { margin: 13px 0 22px; font-size: 10.5px; }
  .desktop-only { display: none; }
  .suggestion-grid { grid-template-columns: 1fr; gap: 7px; }
  .suggestion { min-height: 61px; border-radius: 13px; box-shadow: none; }
  .suggestion:nth-child(n+4) { display: none; }
  .suggestion-icon { width: 35px; height: 35px; }
  .messages { width: calc(100% - 24px); padding: 24px 0 25px; gap: 23px; }
  .message { gap: 8px; }
  .message-avatar { width: 27px; height: 27px; border-radius: 8px; }
  .message-bubble { padding: 10px 12px; font-size: 10.5px; }
  .composer-zone { padding: 6px 9px max(9px, env(safe-area-inset-bottom)); }
  .composer { padding: 10px 10px 7px; border-radius: 17px; min-height: 81px; }
  .composer textarea { font-size: 11px; }
  .web-toggle span, .char-count, .tools-divider, #slidersBtn { display: none; }
  .web-toggle { width: 31px; padding: 0; display: grid; place-items: center; }
  .disclaimer { font-size: 7px; }
  .toast-stack { left: 10px; right: 10px; bottom: 12px; }
  .toast { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .model-runner, .satellite { animation: none !important; }
  .runner-1 { transform: rotate(0deg); }
  .runner-2 { transform: rotate(120deg); }
  .runner-3 { transform: rotate(240deg); }
  .runner-1 .satellite { transform: translateX(-50%) rotate(0deg); }
  .runner-2 .satellite { transform: translateX(-50%) rotate(-120deg); }
  .runner-3 .satellite { transform: translateX(-50%) rotate(-240deg); }
}
