:root {
  --bg: #090708;
  --bg-2: #0d090a;
  --panel: rgba(18, 13, 14, .74);
  --panel-solid: #120d0e;
  --panel-2: #191113;
  --border: rgba(255,255,255,.085);
  --border-strong: rgba(255,255,255,.14);
  --text: #f6f7fb;
  --muted: #9394a4;
  --muted-2: #6c6d7a;
  --purple: #bd302e;
  --violet: #e0524f;
  --cyan: #e8ddd7;
  --pink: #d98986;
  --orange: #d8b8a5;
  --green: #34d399;
  --danger: #fb7185;
  --sidebar: 286px;
  --topbar: 64px;
  --composer-max: 860px;
  --radius: 18px;
  --shadow: 0 22px 80px rgba(0,0,0,.42);
}
* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; background: var(--bg); color: var(--text); }
html { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { overflow: hidden; }
button, textarea, input { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb { position: absolute; width: 40vw; height: 40vw; border-radius: 50%; filter: blur(110px); opacity: .12; animation: drift 16s ease-in-out infinite alternate; }
.orb-a { background: #b52d2a; left: 17%; top: -18%; }
.orb-b { background: #f3e7df; right: -12%; top: 20%; animation-delay: -6s; opacity: .055; }
.orb-c { background: #7f1d1d; left: 35%; bottom: -30%; animation-delay: -11s; opacity: .1; }
.noise { position: absolute; inset: 0; opacity: .022; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); }
@keyframes drift { from { transform: translate3d(-3%, -3%, 0) scale(.95); } to { transform: translate3d(6%, 5%, 0) scale(1.12); } }

.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); height: 100dvh; }
.sidebar { display: flex; flex-direction: column; min-width: 0; background: rgba(10,10,14,.8); border-right: 1px solid var(--border); backdrop-filter: blur(24px) saturate(130%); z-index: 20; transition: transform .28s cubic-bezier(.2,.8,.2,1), width .28s; }
.sidebar-top { height: var(--topbar); padding: 12px 12px 8px 16px; display: flex; align-items: center; justify-content: space-between; }
.brand { border: 0; background: transparent; padding: 0; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-mark { width: 38px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; filter: drop-shadow(0 7px 12px rgba(0,0,0,.42)); }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-copy { display: flex; align-items: baseline; gap: 6px; }
.brand-copy strong { font-size: 16px; letter-spacing: -.025em; }
.brand-copy small { font-size: 9px; letter-spacing: .16em; font-weight: 850; color: #d06561; }
.icon-btn { width: 38px; height: 38px; border: 1px solid transparent; background: transparent; border-radius: 11px; display: grid; place-items: center; cursor: pointer; color: #a8a9b6; transition: .18s ease; }
.icon-btn:hover { background: rgba(255,255,255,.055); color: white; border-color: var(--border); }
.sidebar-close { display: none; }
.new-chat { margin: 8px 12px 14px; height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); background: linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.025)); border-radius: 13px; display: flex; align-items: center; gap: 9px; cursor: pointer; box-shadow: inset 0 1px rgba(255,255,255,.04); transition: .18s ease; }
.new-chat:hover { border-color: rgba(189,48,46,.48); background: rgba(189,48,46,.09); transform: translateY(-1px); }
.new-chat svg { width: 17px; height: 17px; }
.new-chat span { font-size: 13px; font-weight: 650; flex: 1; text-align: left; }
kbd { font: 10px/1 ui-monospace,SFMono-Regular,Consolas,monospace; color: var(--muted-2); background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 5px; padding: 4px 5px; }
.search-wrap { margin: 0 12px 16px; position: relative; }
.search-wrap svg { position: absolute; width: 15px; height: 15px; left: 11px; top: 50%; transform: translateY(-50%); color: #717280; pointer-events: none; }
.search-wrap input { width: 100%; height: 36px; border: 1px solid transparent; background: rgba(255,255,255,.035); color: var(--text); border-radius: 10px; outline: 0; padding: 0 10px 0 34px; font-size: 12px; }
.search-wrap input:focus { background: rgba(255,255,255,.055); border-color: var(--border-strong); }
.search-wrap input::placeholder { color: #646573; }
.history-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 7px; color: #686976; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.history-count { min-width: 20px; text-align: right; }
.history { overflow-y: auto; overflow-x: hidden; padding: 0 8px 12px; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent; }
.history-item { position: relative; display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 6px 34px 6px 10px; color: #a5a6b3; border: 1px solid transparent; background: transparent; border-radius: 10px; cursor: pointer; text-align: left; transition: .16s ease; }
.history-item:hover { color: #e7e7ec; background: rgba(255,255,255,.035); }
.history-item.active { color: #fff; background: rgba(189,48,46,.1); border-color: rgba(189,48,46,.16); }
.history-item > svg { width: 15px; height: 15px; flex: 0 0 auto; opacity: .7; }
.history-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.history-delete { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; opacity: 0; border: 0; background: rgba(0,0,0,.18); color: #8e8f9b; border-radius: 7px; cursor: pointer; display: grid; place-items: center; }
.history-delete svg { width: 14px; height: 14px; }
.history-item:hover .history-delete { opacity: 1; }
.history-delete:hover { color: var(--danger); background: rgba(251,113,133,.08); }
.empty-history { padding: 10px 12px; color: #5f606b; font-size: 12px; line-height: 1.5; }
.sidebar-bottom { padding: 10px 10px 12px; border-top: 1px solid var(--border); }
.model-pill { display: flex; align-items: center; gap: 9px; padding: 8px 9px 10px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(52,211,153,.08),0 0 18px rgba(52,211,153,.35); }
.model-pill div { display: grid; gap: 2px; }
.model-pill strong { font-size: 11px; color: #c4c5cf; font-weight: 700; }
.model-pill small { color: #62636e; font-size: 9px; }
.settings-row { width: 100%; border: 0; background: transparent; min-height: 40px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; border-radius: 10px; cursor: pointer; color: #aaaab5; text-align: left; }
.settings-row:hover { background: rgba(255,255,255,.04); color: #fff; }
.settings-icon { display: grid; place-items: center; }
.settings-icon svg { width: 16px; height: 16px; }
.settings-row > span:nth-child(2) { font-size: 12px; }
.chev { color: #565762; padding-right: 7px; }
.sidebar-scrim { display: none; }

.main { min-width: 0; position: relative; display: grid; grid-template-rows: var(--topbar) minmax(0,1fr) auto; height: 100dvh; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 18px 0 22px; border-bottom: 1px solid rgba(255,255,255,.035); background: linear-gradient(180deg,rgba(7,7,10,.86),rgba(7,7,10,.35)); backdrop-filter: blur(14px); z-index: 8; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 5px; min-width: 0; }
.menu-btn { display: none; }
.chat-title { max-width: min(48vw, 480px); border: 0; background: transparent; display: flex; align-items: center; gap: 7px; color: #dedfe7; padding: 8px 7px; border-radius: 9px; cursor: pointer; min-width: 0; }
.chat-title:hover { background: rgba(255,255,255,.035); }
.chat-title span { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title svg { width: 13px; height: 13px; opacity: 0; color: #747582; transition: opacity .16s; }
.chat-title:hover svg { opacity: 1; }
.mode-btn { position: relative; height: 34px; border: 1px solid var(--border); background: rgba(255,255,255,.025); color: #a2a3af; border-radius: 10px; display: flex; align-items: center; gap: 7px; padding: 0 11px; cursor: pointer; overflow: hidden; transition: .18s ease; }
.mode-btn svg { width: 15px; height: 15px; }
.mode-btn span:last-child { font-size: 11px; font-weight: 700; }
.mode-btn:hover { border-color: rgba(189,48,46,.38); color: white; }
.mode-btn.deep { color: #ffe5e3; border-color: rgba(189,48,46,.38); background: rgba(154,35,34,.12); }
.mode-glow { position: absolute; inset: -40%; background: radial-gradient(circle,rgba(189,48,46,.25),transparent 50%); opacity: 0; transition: opacity .2s; }
.mode-btn.deep .mode-glow { opacity: 1; }

.conversation { min-height: 0; overflow-y: auto; overflow-x: hidden; position: relative; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent; }
.welcome { width: min(880px, calc(100% - 40px)); min-height: 100%; margin: 0 auto; padding: clamp(38px,7vh,76px) 0 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; animation: fadeUp .55s cubic-bezier(.2,.8,.2,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.glenwood-hero { position: relative; width: 126px; height: 126px; display: grid; place-items: center; margin-bottom: 18px; }
.hero-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(189,48,46,.19); animation: spin 12s linear infinite; }
.ring-1::before { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #cf4541; top: 13px; left: 17px; box-shadow: 0 0 18px #bd302e; }
.ring-2 { inset: 11px; border-color: rgba(245,235,230,.11); animation-direction: reverse; animation-duration: 9s; }
.ring-2::before { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #eadbd4; bottom: 7px; right: 21px; box-shadow: 0 0 14px rgba(245,235,230,.65); }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-core { width: 86px; height: 104px; display: grid; place-items: center; border-radius: 24px; background: radial-gradient(circle at 50% 25%,rgba(189,48,46,.22),rgba(28,17,18,.9) 68%); border: 1px solid rgba(255,255,255,.09); box-shadow: 0 24px 70px rgba(116,24,24,.3),inset 0 1px rgba(255,255,255,.12); }
.hero-core img { width: 70px; height: 88px; object-fit: contain; filter: drop-shadow(0 10px 16px rgba(0,0,0,.42)); }
.eyebrow { margin: 0 0 8px; font-size: 10px; font-weight: 850; letter-spacing: .22em; color: #d66662; }
.welcome h1 { margin: 0; font-size: clamp(34px,5vw,60px); line-height: 1.02; letter-spacing: -.055em; font-weight: 720; }
.welcome h1 span { background: linear-gradient(100deg,#f0d8d2,#e0645f 48%,#b82d2b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome-sub { width: min(620px,100%); margin: 16px 0 30px; color: #8d8e9c; font-size: 14px; line-height: 1.65; }
.suggestions { width: min(760px,100%); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.suggestion { min-width: 0; min-height: 84px; padding: 13px 14px; border: 1px solid var(--border); background: linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.014)); color: #dddde5; border-radius: 15px; display: grid; grid-template-columns: 38px minmax(0,1fr) 20px; gap: 11px; align-items: center; text-align: left; cursor: pointer; transition: .2s cubic-bezier(.2,.8,.2,1); box-shadow: inset 0 1px rgba(255,255,255,.025); }
.suggestion:hover { transform: translateY(-3px); border-color: rgba(189,48,46,.3); background: rgba(189,48,46,.065); box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.suggestion-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; }
.suggestion-icon svg { width: 18px; height: 18px; }
.suggestion-icon.purple { color: #f1a19d; background: rgba(189,48,46,.13); }
.suggestion-icon.cyan { color: #eee4df; background: rgba(238,228,223,.075); }
.suggestion-icon.orange { color: #debda8; background: rgba(222,189,168,.09); }
.suggestion-icon.pink { color: #d87b77; background: rgba(181,45,42,.1); }
.suggestion strong { display: block; font-size: 12px; margin-bottom: 4px; }
.suggestion small { display: block; color: #777885; font-size: 10.5px; line-height: 1.35; }
.suggestion .arrow { color: #575865; font-size: 16px; transition: .2s; }
.suggestion:hover .arrow { color: #ee8b87; transform: translate(2px,-2px); }

.messages { width: min(860px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 56px; display: none; }
.messages.active { display: block; }
.message { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 13px; margin-bottom: 30px; animation: messageIn .28s ease-out; }
@keyframes messageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; margin-top: 2px; }
.avatar.user { background: #1c1c25; border: 1px solid var(--border); color: #b8b9c4; font-size: 10px; font-weight: 800; }
.avatar.ai { background: linear-gradient(145deg,#261719,#120d0e); border: 1px solid rgba(189,48,46,.25); color: white; box-shadow: 0 8px 26px rgba(116,24,24,.18); overflow: hidden; }
.avatar.ai img { width: 25px; height: 29px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,.45)); }
.message-main { min-width: 0; }
.message-meta { display: flex; align-items: center; gap: 8px; min-height: 22px; margin-bottom: 5px; }
.message-meta strong { font-size: 12px; }
.message-meta .tag { font-size: 9px; color: #777885; padding: 3px 6px; border-radius: 5px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.045); }
.message-content { color: #dfe0e7; font-size: 14px; line-height: 1.72; overflow-wrap: anywhere; }
.message.user .message-content { color: #e9e9ee; }
.message-content p { margin: 0 0 12px; }
.message-content p:last-child { margin-bottom: 0; }
.message-content h1,.message-content h2,.message-content h3 { margin: 20px 0 9px; color: #fff; line-height: 1.25; letter-spacing: -.02em; }
.message-content h1 { font-size: 20px; }.message-content h2 { font-size: 17px; }.message-content h3 { font-size: 15px; }
.message-content ul,.message-content ol { margin: 8px 0 14px; padding-left: 22px; }
.message-content li { margin: 5px 0; }
.message-content strong { color: #fff; font-weight: 720; }
.message-content em { color: #cacbd5; }
.message-content a { color: #ee8b87; text-decoration: none; border-bottom: 1px solid rgba(238,139,135,.28); }
.message-content blockquote { margin: 12px 0; padding: 2px 0 2px 14px; border-left: 2px solid #a73331; color: #a8a9b7; }
.message-content code:not(pre code) { padding: 2px 5px; border: 1px solid var(--border); border-radius: 5px; background: rgba(255,255,255,.045); color: #f0c4c1; font: 12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; }
.code-wrap { margin: 14px 0; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; background: #09090d; box-shadow: 0 12px 35px rgba(0,0,0,.18); }
.code-head { height: 35px; padding: 0 10px 0 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: #101016; }
.code-head span { color: #747582; font: 10px ui-monospace,SFMono-Regular,Consolas,monospace; text-transform: lowercase; }
.copy-code { height: 25px; border: 0; background: transparent; color: #858693; font-size: 10px; cursor: pointer; border-radius: 6px; padding: 0 7px; }
.copy-code:hover { color: #fff; background: rgba(255,255,255,.05); }
.code-wrap pre { margin: 0; padding: 14px 15px; overflow-x: auto; color: #d7d7df; font: 12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace; tab-size: 2; }
.message-actions { display: flex; gap: 4px; margin-top: 9px; opacity: .45; transition: opacity .18s; }
.message:hover .message-actions { opacity: 1; }
.msg-action { height: 28px; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid transparent; background: transparent; color: #777885; border-radius: 7px; cursor: pointer; font-size: 10px; }
.msg-action:hover { color: #dddde5; background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.04); }
.msg-action svg { width: 13px; height: 13px; }
.typing { display: inline-flex; gap: 4px; align-items: center; height: 24px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: #cf4541; animation: bounce 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .14s; }.typing i:nth-child(3) { animation-delay: .28s; }
@keyframes bounce { 0%,70%,100% { transform: translateY(0); opacity: .35; } 35% { transform: translateY(-4px); opacity: 1; } }
.scroll-anchor { height: 1px; }
.jump-bottom { position: absolute; z-index: 7; left: 50%; bottom: 142px; transform: translateX(-50%) translateY(8px); width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-strong); background: rgba(16,16,22,.88); backdrop-filter: blur(10px); color: #aaaab6; display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none; transition: .2s; box-shadow: var(--shadow); }
.jump-bottom.show { opacity: 1; pointer-events: auto; transform: translateX(-50%); }
.jump-bottom svg { width: 16px; height: 16px; }

.composer-zone { position: relative; z-index: 6; padding: 10px 20px max(13px,env(safe-area-inset-bottom)); background: linear-gradient(180deg,rgba(7,7,10,0),rgba(7,7,10,.92) 24%,#07070a 60%); }
.composer { width: min(var(--composer-max),100%); margin: 0 auto; min-height: 74px; border: 1px solid rgba(255,255,255,.12); background: rgba(18,18,24,.88); border-radius: 20px; box-shadow: 0 16px 60px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.035); backdrop-filter: blur(22px); padding: 13px 13px 9px 16px; transition: border-color .18s,box-shadow .18s; }
.composer:focus-within { border-color: rgba(189,48,46,.38); box-shadow: 0 18px 65px rgba(0,0,0,.3),0 0 0 3px rgba(189,48,46,.045),inset 0 1px rgba(255,255,255,.04); }
#promptInput { width: 100%; max-height: 160px; min-height: 26px; resize: none; overflow-y: auto; border: 0; outline: 0; background: transparent; color: #f3f3f7; font-size: 14px; line-height: 1.55; padding: 1px 2px 4px; }
#promptInput::placeholder { color: #656672; }
.composer-tools { min-height: 34px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.composer-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tool-btn { height: 28px; border: 0; padding: 0 8px; background: transparent; color: #6f707d; border-radius: 8px; display: flex; align-items: center; gap: 6px; cursor: pointer; transition: .15s; }
.tool-btn:hover { color: #eca09c; background: rgba(189,48,46,.07); }
.tool-btn svg { width: 14px; height: 14px; }.tool-btn span { font-size: 10px; font-weight: 650; }
.char-count { color: #555661; font-size: 9px; opacity: 0; transition: opacity .15s; }
.char-count.show { opacity: 1; }
.send-btn { width: 34px; height: 34px; flex: 0 0 auto; border: 0; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(145deg,#a52322,#d94743); color: #fff; cursor: pointer; box-shadow: 0 8px 24px rgba(148,31,30,.28); transition: .17s ease; }
.send-btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.send-btn:disabled { cursor: default; opacity: .38; transform: none; filter: none; }
.send-btn svg { width: 17px; height: 17px; stroke-width: 2; }
.stop-icon { display: none; }
.send-btn.generating .send-icon { display: none; }.send-btn.generating .stop-icon { display: block; }
.disclaimer { width: min(var(--composer-max),100%); margin: 8px auto 0; color: #4f505b; font-size: 9.5px; text-align: center; }
.disclaimer span { color: #5d5e6a; }

.toast-stack { position: fixed; z-index: 100; right: 18px; bottom: 20px; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 210px; max-width: 360px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 11px; background: rgba(18,18,24,.94); backdrop-filter: blur(18px); color: #d7d8df; font-size: 11px; box-shadow: var(--shadow); animation: toastIn .25s ease-out; }
.toast.error { border-color: rgba(251,113,133,.25); color: #fecdd3; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

dialog { border: 0; padding: 0; background: transparent; color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(8px); }
.modal-card { width: min(520px,calc(100vw - 28px)); border: 1px solid var(--border-strong); background: rgba(16,16,22,.96); border-radius: 20px; box-shadow: 0 28px 100px rgba(0,0,0,.55); padding: 20px; backdrop-filter: blur(24px); animation: modalIn .2s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.modal-head h2 { margin: 3px 0 0; font-size: 22px; letter-spacing: -.03em; }
.setting-group { padding: 14px 0; border-top: 1px solid var(--border); }
.setting-group label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; }.setting-group label span { color: #6d6e79; font-weight: 500; }
.setting-group > input { width: 100%; height: 42px; border: 1px solid var(--border); background: #0b0b10; color: white; border-radius: 10px; outline: 0; padding: 0 12px; }
.setting-group > input:focus { border-color: rgba(189,48,46,.4); }
.setting-group p { margin: 7px 0 0; color: #6f707c; font-size: 10.5px; line-height: 1.5; }
.setting-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; }.setting-line strong,.danger-zone strong { font-size: 12px; }
.switch { width: 40px; height: 23px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 999px; background: #22222b; cursor: pointer; transition: .2s; flex: 0 0 auto; }
.switch span { display: block; width: 17px; height: 17px; border-radius: 50%; background: #858693; transition: .2s; }
.switch.on { background: rgba(174,39,37,.62); border-color: rgba(221,94,89,.42); }.switch.on span { transform: translateX(17px); background: white; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.danger-btn { border: 1px solid rgba(251,113,133,.18); color: #fda4af; background: rgba(251,113,133,.06); border-radius: 9px; padding: 8px 10px; font-size: 10px; cursor: pointer; }.danger-btn:hover { background: rgba(251,113,133,.11); }
.save-settings { width: 100%; height: 42px; margin-top: 4px; border: 0; border-radius: 11px; color: white; font-weight: 750; font-size: 12px; background: linear-gradient(120deg,#9f2321,#d34844); cursor: pointer; box-shadow: 0 12px 30px rgba(148,31,30,.2); }

@media (max-width: 900px) {
  :root { --sidebar: 278px; }
  .app { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); transform: translateX(-102%); box-shadow: 20px 0 70px rgba(0,0,0,.4); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-close,.menu-btn { display: grid; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: .22s; }
  body.sidebar-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .main { width: 100%; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 9px; }
  .chat-title { max-width: 43vw; }
  .mode-btn span:last-child { display: none; }.mode-btn { width: 36px; padding: 0; justify-content: center; }
  .welcome { width: min(100% - 28px,880px); padding-top: 28px; justify-content: flex-start; }
  .glenwood-hero { width: 108px; height: 108px; margin-top: 2vh; }.hero-core { width: 72px; height: 88px; border-radius: 20px; }.hero-core img { width: 59px; height: 74px; }
  .welcome h1 { font-size: clamp(32px,10vw,44px); }
  .welcome-sub { font-size: 12px; margin-top: 13px; }
  .suggestions { grid-template-columns: 1fr; gap: 8px; }.suggestion { min-height: 72px; }
  .suggestion:nth-child(n+4) { display: none; }
  .messages { width: calc(100% - 28px); padding-top: 24px; }
  .message { grid-template-columns: 30px minmax(0,1fr); gap: 10px; margin-bottom: 25px; }.avatar { width: 29px; height: 29px; border-radius: 9px; }
  .message-content { font-size: 13.5px; }
  .composer-zone { padding: 8px 10px max(10px,env(safe-area-inset-bottom)); }
  .composer { border-radius: 17px; padding: 11px 10px 8px 13px; }.disclaimer span { display: none; }
  .jump-bottom { bottom: 132px; }
  .toast-stack { left: 10px; right: 10px; bottom: 12px; }.toast { max-width: none; 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; }
}
