#app { height: 100%; }
.app-shell { height: 100dvh; height: var(--viewport-height,100dvh); display: grid; grid-template-columns: 272px minmax(0,1fr); }
.sidebar { display: flex; flex-direction: column; background: var(--bg-raised); border-right: 1px solid var(--line); padding: 28px 18px 16px; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 32px; font-weight: 600; font-size: 17px; margin: 0 8px 26px; }
.brand-mark { display: inline-block; width: 23px; height: 22px; border-left: 1px solid var(--line-strong); border-bottom: 2px solid var(--accent); transform: skewY(-20deg); flex-shrink: 0; }
.sidebar .new-chat { width: 100%; justify-content: flex-start; margin-bottom: 16px; }
.search-wrap { position: relative; }
.search-wrap>.icon { position: absolute; left: 12px; top: 14px; color: var(--text-muted); width: 17px; height: 17px; pointer-events: none; }
.search-wrap input { padding-left: 38px; }
.sidebar .search-wrap input { border-color: transparent; background: transparent; font-size: 14px; }
.chat-nav { overflow-y: auto; flex: 1; padding-top: 20px; }
.nav-label { font-size: 12px; color: var(--text-muted); padding: 0 12px 10px; }
.chat-row { position: relative; border-left: 2px solid transparent; border-radius: 0 var(--radius-xs) var(--radius-xs) 0; display: flex; align-items: center; min-height: 52px; margin-bottom: 5px; }
.chat-row.active { border-left-color: var(--accent); background: var(--accent-08); }
.chat-row>a { color: var(--text-secondary); flex: 1; min-width: 0; padding: 8px 4px 8px 12px; text-decoration: none; }
.chat-row.active>a { color: var(--text); }
.chat-row time { font-size: 12px; color: var(--text-muted); display: block; }
.chat-row .icon-button { width: 36px; min-width: 36px; }
.sidebar-footer { border-top: 1px solid var(--line); padding-top: 12px; display: flex; gap: 6px; }
.sidebar-footer .button { border: none; }
.main { min-width: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.topbar { height: 64px; min-height: 64px; display: flex; align-items: center; padding: 0 30px; border-bottom: 1px solid var(--line-faint); gap: 12px; }
.topbar .model-trigger { text-align: left; position: relative; padding: 5px 8px; min-width: 0; max-width: 420px; display: flex; align-items: center; gap: 8px; min-height: 48px; }
.model-trigger strong { display: block; font-weight: 550; font-size: 14px; }
.model-trigger small { display: block; font-size: 12px; }
.topbar .persona-trigger { margin-left: auto; color: var(--text-secondary); font-size: 12px; padding: 10px 8px; min-height: 44px; max-width: 220px; }
.topbar .mobile-menu { display: none; }
#page { display: flex; flex: 1; min-height: 0; flex-direction: column; overflow: hidden; }
.auth-view { height: 100dvh; overflow-y: auto; display: grid; align-items: center; padding: 56px 24px; position: relative; }
.auth-view::before { content: ''; position: absolute; width: min(540px,100%); height: 380px; top: 12%; left: 50%; transform: translateX(-50%); pointer-events: none; background: radial-gradient(ellipse at center,var(--accent-04),transparent 65%); }
.auth-inner { width: min(100%,440px); margin: auto; position: relative; }
.auth-inner .brand { margin: 0 0 52px; }
.auth-inner h1 { margin-bottom: 12px; }
.auth-inner .auth-intro { color: var(--text-secondary); line-height: 1.8; margin-bottom: 34px; }
.auth-inner .button.primary { width: 100%; margin-top: 12px; }
.auth-note { margin-top: 34px; font-size: 12px; color: var(--text-muted); }
.setup-progress { height: 2px; display: flex; gap: 8px; margin-bottom: 32px; }
.setup-progress span { height: 1px; flex: 1; background: var(--line); }
.setup-progress span.active { background: var(--accent); }
.sidebar { padding-top: 25px; }
.sidebar .brand { margin-bottom: 30px; }
.sidebar .new-chat { background: var(--bg-hover); border-color: var(--line); min-height: 46px; font-size: 14px; }
.sidebar .new-chat>.icon { color: var(--accent); width: 18px; height: 18px; }
.chat-row { min-height: 46px; }
.chat-row>a { font-size: 13px; }
.chat-row.active .truncate { font-weight: 550; }
.nav-label { display: flex; align-items: center; justify-content: space-between; color: var(--text-muted); }
.sidebar .chat-list>.caption { padding: 8px 12px; }
.nav-group { padding: 17px 12px 7px; font-size: 12px; color: var(--text-muted); }
.sidebar-footer { margin-inline: 6px; }
.topbar { padding-inline: 28px; }
.topbar .model-trigger { gap: 14px; }
.topbar .model-trigger small { color: var(--text-muted); }
.topbar .persona-trigger { padding-right: 20px; border-right: 1px solid var(--line-faint); margin-right: 8px; }
