/* Refined conversational layout: warm neutrals, quiet navigation, clear hierarchy. */
:root,:root[data-theme="light"] {--bg:#faf9f5;--bg-deep:#f0eee6;--surface:#fffefa;--surface-2:#f0eee6;--surface-3:#e7e5dc;--ink:#30302e;--ink-2:#625f58;--ink-3:#807c72;--line:#d7d4ca;--line-soft:#e7e4dc;--chat-width:760px;--sidebar-w:256px;}
:root[data-theme="dark"] {--bg:#262624;--bg-deep:#1f1f1d;--surface:#30302e;--surface-2:#353532;--surface-3:#41413c;--ink:#eeeae2;--ink-2:#c1bdb3;--ink-3:#a6a298;--line:#4a4943;--line-soft:#363631;}
.app .sidebar {background:var(--bg-deep);padding:8px;}
.app .sidebar .sb-head {padding:12px 9px 20px;gap:6px;}
.app .sidebar .brand {gap:7px;}
.app .sidebar .brand-name {font-size:20px;font-weight:600;letter-spacing:-.8px;}
.app .sidebar .brand img {width:27px;height:27px;}
.app .sidebar .sb-head>.btn {width:28px;min-width:28px;}
.app .sidebar .desktop-new {padding:0 5px 4px;}
.app .sidebar .desktop-new .sb-link {font-size:14px;font-weight:400;padding:8px;gap:9px;}
.app .sidebar .desktop-new .sb-link>.ic {background:#c5785a;border-radius:50%;width:21px;height:21px;padding:3px;}
.app .sidebar .sb-search {margin:2px 6px 8px;padding-left:8px;}
.app .sidebar .sb-nav {padding:0 5px 14px;gap:0;}
.app .sidebar .sb-link {font-size:14px;font-weight:400;padding:8px;border-radius:6px;min-height:34px;}
.app .sidebar .sb-link>.ic {width:18px;height:18px;}
.app .sidebar .sb-more-nav {display:block;}
.app .sidebar .sb-more-nav>summary {list-style:none;display:flex;align-items:center;gap:9px;cursor:pointer;color:var(--ink-2);}
.app .sidebar .sb-more-nav>summary::-webkit-details-marker {display:none;}
.app .sidebar .sb-more-nav>summary:after {content:'⌄';margin-left:auto;color:var(--ink-3);}
.app .sidebar .sb-more-nav[open]>summary:after {transform:rotate(180deg);}
.app .sidebar .sb-more-nav>div {padding:2px 0 2px 10px;}
.app .sidebar .sb-list {padding-inline:5px;}
.app .sidebar .desktop-recent {padding:12px 8px 8px;font-size:12px;font-weight:400;}
.app .sidebar .sb-section {padding:8px 8px 3px;opacity:.65;font-size:10px;}
.app .sidebar .conv-item>a {font-size:13px;line-height:1.45;padding:7px 8px;}
.app .sidebar .sb-foot {padding:10px 5px 4px;border-top:0;}
.app .sidebar .user-chip {padding:8px 6px;}
.app .sidebar .avatar {background:#dfd4c3;color:#4b4437;}
.app .unified-chat .chat-mode-bar {min-height:52px;padding:10px 24px;gap:3px;background:var(--bg);}
.app .chat-mode-bar .btn {font-size:13px;min-height:30px;padding:4px 10px;border-radius:7px;font-weight:400;}
.app .chat-mode-bar .btn.primary {background:var(--surface-2);color:var(--ink);border-color:transparent;}
.app .chat .topbar {min-height:34px;background:var(--bg);padding:0 24px;border:0;}
.app .chat .topbar>a {font-size:11px;color:var(--ink-3);}
.app .chat-empty .welcome {display:flex;flex-direction:column;align-items:center;justify-content:flex-end;flex:0 0 auto;gap:0;padding:clamp(32px,10vh,110px) 24px 28px;margin:0 auto;width:100%;min-height:0;max-width:850px;}
.app .chat-empty .welcome-plan {font-size:11px;line-height:1.5;margin-bottom:28px;padding:5px 11px;border:1px solid var(--line-soft);border-radius:30px;background:transparent;color:var(--ink-3);}
.app .chat-empty .welcome-plan a {color:var(--ink-2);text-decoration:none;}
.app .welcome-heading {display:flex;align-items:center;justify-content:center;gap:15px;width:100%;}
.app .chat-empty .welcome-symbol {display:flex;align-items:center;justify-content:center;flex:0 0 39px;width:39px;height:39px;margin:0;color:#c5785a;background:none;}
.app .chat-empty .welcome-symbol .ic {width:38px;height:38px;}
.app .chat-empty .welcome h1 {font:400 clamp(30px,3vw,42px)/1.2 Georgia,'Times New Roman',serif;letter-spacing:-1.4px;max-width:none;margin:0;text-align:left;}
.app .chat-empty>.welcome+div {width:100%;max-width:760px;margin:0 auto;}
.app .chat .composer-wrap {width:100%;max-width:760px;margin-inline:auto;padding:8px 24px;}
.app .chat .composer {background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:0 3px 12px #00000008;}
.app .chat .composer:focus-within {border-color:var(--ink-3);box-shadow:0 3px 12px #0000000c;}
.app .chat .composer textarea {padding:17px 19px 6px;min-height:74px;font-size:16px;line-height:1.6;}
.app .chat .composer textarea::placeholder {color:var(--ink-3);opacity:1;}
.app .chat .composer-bar {padding:5px 11px 11px;gap:5px;}
.app .chat .composer-bar .tools {display:flex;align-items:center;gap:2px;flex:1;}
.app .chat .composer-bar .pill-btn {height:30px;font-size:12px;font-weight:400;padding:0 8px;border:0;background:transparent;}
.app .chat .composer-bar .composer-model {margin-left:auto;}
.app .chat .composer-bar .send-btn {background:#c5785a!important;color:#fff;width:32px;height:32px;min-width:32px;min-height:32px;border-radius:8px;}
.app .chat .composer-bar .send-btn:disabled {background:var(--surface-3)!important;color:var(--ink-3);opacity:1;}
.app .chat .composer-hint {font-size:10px;justify-content:center;color:var(--ink-3);padding-top:8px;}
.app .chat-empty .starters {display:flex;flex-wrap:wrap;justify-content:center;gap:7px;max-width:710px;margin:13px auto 28px;padding:0 22px;}
.app .chat-empty .starters .chip {border:1px solid var(--line);border-radius:8px;background:transparent;box-shadow:none;min-height:34px;padding:7px 10px;gap:6px;font-size:11px;font-weight:400;}
.app .chat-empty .starters .chip .ic {width:14px;height:14px;}
.app .chat .thread-inner {max-width:760px;margin-inline:auto;padding:24px 28px 38px;}
.app .chat .msg.ai .prose {font:400 17px/1.8 Georgia,serif;}
.app .chat .msg.user .bubble {background:var(--surface-2);border:0;border-radius:15px;}
@media(max-width:900px) {
 .app .unified-chat .chat-mode-bar {padding:8px 12px;min-height:48px;gap:1px;}
 .app .chat-mode-bar .btn {font-size:12px;padding-inline:8px;min-height:36px;}
 .app .chat-empty .welcome {padding:clamp(35px,9vh,75px) 20px 24px;}
 .app .chat-empty .welcome-plan {margin-bottom:23px;}
 .app .welcome-heading {gap:10px;max-width:360px;}
 .app .chat-empty .welcome h1 {font-size:31px;letter-spacing:-1px;}
 .app .chat-empty .welcome-symbol {flex-basis:30px;width:30px;height:30px;}
 .app .chat-empty .welcome-symbol .ic {width:30px;height:30px;}
 .app .chat .composer-wrap {padding:8px 12px;}
 .app .chat .composer textarea {font-size:16px;min-height:76px;}
 .app .chat .composer-bar .btn.icon,.app .chat .composer-bar .pill-btn,.app .chat .composer-bar .send-btn {min-height:44px;}
 .app .chat .composer-bar .send-btn {min-width:40px;width:40px;}
 .app .chat-empty .starters {padding:0 16px;gap:7px;}
 .app .chat-empty .starters .chip {min-height:40px;padding:8px 10px;}
}
@media(max-height:650px) {.app .chat-empty .welcome {padding-top:20px;}.app .chat-empty .welcome-plan {margin-bottom:16px;}}
/* Keep the illustrated authentication requested earlier; use a quieter neutral canvas. */
.auth-page.auth-editorial.auth-animated {background:#faf9f5;}
.auth-animated .auth-story h2 {color:#30302e;}
.auth-animated .auth-story h2 em {color:#757064;}
.auth-animated .auth-story-description {color:#807c72;}

/* Hide suggestion shortcuts on phones to free vertical space. */
@media(max-width:900px) { .app .chat-empty .starters { display:none!important; } }

/* Compact mobile drawer: preserve navigation and give chat history the remaining height. */
@media(max-width:900px) {
 .app .sidebar {
  width:min(92vw,380px)!important;max-width:calc(100vw - 20px);
  height:var(--suvi-visible-h,100dvh);max-height:var(--suvi-visible-h,100dvh);
  display:flex;flex-direction:column;gap:0;
  padding:env(safe-area-inset-top,0px) 10px max(8px,env(safe-area-inset-bottom,0px));
  background:var(--bg-deep);border:0;box-shadow:8px 0 32px #00000018;overflow:hidden;
 }
 .app .sidebar .sb-head {
  flex:0 0 auto;position:static;min-height:56px;height:56px;margin:0;
  padding:6px 6px 6px 9px;gap:8px;background:transparent;border:0;box-shadow:none;
 }
 .app .sidebar .sb-head::before,.app .sidebar .sb-head::after {display:none;}
 .app .sidebar .brand {min-width:0;gap:9px;}
 .app .sidebar .brand-name {font:600 20px/1.2 Arial,Helvetica,sans-serif;letter-spacing:-.6px;}
 .app .sidebar .brand img {width:26px;height:26px;max-width:26px;max-height:26px;}
 .app .sidebar .sb-head .btn.mobile-only {width:44px;min-width:44px;height:44px;min-height:44px;padding:11px;background:transparent;}
 .app .sidebar .sb-search {
  flex:0 0 auto;min-height:40px;height:40px;margin:1px 3px 7px;padding:0 8px;
  border:0;background:transparent;box-shadow:none;border-radius:7px;gap:10px;
 }
 .app .sidebar .sb-search .input {min-height:40px;height:40px;font-size:14px;padding:8px 0;border:0;background:transparent;box-shadow:none;}
 .app .sidebar .sb-search>.ic {width:18px;height:18px;flex-shrink:0;}
 .app .sidebar .sb-nav {flex:0 0 auto;margin:0 3px;padding:0 0 10px;gap:0;border:0;}
 .app .sidebar .sb-nav .sb-link {min-height:40px;height:40px;padding:8px;gap:10px;font-size:14px;font-weight:400;line-height:1.4;border-radius:6px;}
 .app .sidebar .sb-nav .sb-link .ic {width:18px;height:18px;}
 .app .sidebar .sb-list {
  position:relative;flex:1 1 0%;min-height:0;overflow-y:auto;overflow-x:hidden;
  margin:0 3px;padding:0 0 8px;overscroll-behavior:contain;scrollbar-width:thin;
  border-top:1px solid var(--line-soft);scroll-padding-top:8px;
 }
 .app .sidebar .sb-mobile-recent {position:static;display:block;padding:14px 8px 6px;margin:0;font-size:11px;font-weight:400;color:var(--ink-3);line-height:1.4;}
 .app .sidebar .sb-section {position:static;padding:6px 8px 4px;margin:0;font-size:10px;font-weight:400;line-height:1.4;color:var(--ink-3);opacity:.75;}
 .app .sidebar .conv-item {min-height:40px;height:40px;margin:0 0 2px;border-radius:6px;}
 .app .sidebar .conv-item>a {display:flex;align-items:center;min-height:40px;height:40px;width:100%;min-width:0;padding:8px 36px 8px 8px;font-size:13px;line-height:1.4;font-weight:400;}
 .app .sidebar .conv-item .more {width:36px;min-width:36px;min-height:40px;height:40px;right:0;top:0;opacity:1;}
 .app .sidebar .sb-foot {flex:0 0 auto;margin:0;padding:6px 3px 0;border-top:1px solid var(--line-soft);background:var(--bg-deep);}
 .app .sidebar .sb-settings-link {min-height:38px;height:38px;padding:7px 8px;margin:0;font-size:13px;gap:10px;}
 .app .sidebar .user-chip {min-height:52px;height:52px;padding:7px 8px;gap:9px;border:0;background:transparent;border-radius:7px;}
 .app .sidebar .user-chip .avatar {width:30px;height:30px;flex:0 0 30px;font-size:12px;}
 .app .sidebar .user-chip .grow .ellipsis {font-size:13px!important;font-weight:500!important;line-height:1.4;}
 .app .sidebar .user-chip .credit-line {font-size:10px!important;line-height:1.5;}
 .app .sidebar .sb-new-bottom {min-height:40px;margin-top:5px;font-size:13px;}
 .app .sidebar .desktop-only {display:none!important;}
}

/* Keep search icon in the layout instead of overlapping the input. */
@media(max-width:900px) {
 .app .sidebar .sb-head {background:transparent!important;box-shadow:none!important;flex-shrink:0;padding:6px 4px 6px 8px;margin:0;}
 .app .sidebar .sb-head .brand {display:flex;align-items:center;gap:9px;min-width:0;line-height:1;}
 .app .sidebar .sb-head .brand img {display:block;flex:0 0 26px;object-fit:contain;}
 .app .sidebar .sb-head .brand-name {display:block;line-height:1.2;margin:0;padding:0;}
 .app .sidebar .sb-search {display:flex;align-items:center;gap:10px;position:relative;flex:0 0 44px;min-height:44px;height:44px;margin:4px 0 8px;padding:0 8px;background:transparent;border:0;}
 .app .sidebar .sb-search>.ic {position:static;left:auto;top:auto;transform:none;display:block;width:20px;height:20px;flex:0 0 20px;margin:0 3px;pointer-events:none;}
 .app .sidebar .sb-search>.input {display:block;flex:1 1 0%;width:0;min-width:0;height:44px;min-height:44px;margin:0;padding:10px 0;font-size:16px;line-height:24px;border:0;background:transparent;box-shadow:none;}
 .app .sidebar .sb-search>.input:focus {outline:none;box-shadow:none;}
 .app .sidebar .sb-search:focus-within {outline:1px solid var(--line);outline-offset:-1px;border-radius:7px;}
}
:root[data-theme="dark"] .sidebar .sb-head .brand img {filter:brightness(0) invert(.85);}
