/* Reference-measured desktop composition. Nothing below 1000px changes. */
.desktop-context,.desktop-new,.desktop-foot{display:none}
@media(min-width:1000px){
:root{
 --edge:5vw;--nav:16.484375vw;--context:22.34375vw;
 --panel-top:11.575179dvh;--panel-height:76.849642dvh;
 --chat-left:19.21875vw;--context-overlap:10vw;
 --content-left:4.6875vw;--content-right:13.359375vw;
 --nav-offset:3.818616dvh;--context-offset:3.221957dvh;
 --muted:#526775;--bubble:#eff2f7;--mine:#cbeafe;
}
body{background:#c6eafa}
#app{
 position:fixed;inset:auto;left:var(--chat-left);right:17.34375vw;
 top:var(--panel-top);height:var(--panel-height);
 padding-left:var(--content-left);padding-right:var(--content-right);
 border:1px solid #ffffff65;border-radius:28px;
 background:linear-gradient(145deg,#e7f3f9b8,#e6eef5d0);
 box-shadow:0 18px 42px #527d9312,inset 0 1px 0 #ffffff40;
}
#app::before{
 box-sizing:border-box;position:fixed;inset:auto;top:calc(var(--panel-top) + var(--nav-offset));
 left:var(--edge);width:var(--nav);height:68.49642dvh;
 border:1px solid #ffffff85;border-radius:24px;
 background:linear-gradient(150deg,#edf7fbdc,#ebf4f9ed);
 box-shadow:0 17px 36px #527d931b,inset 0 1px 0 #ffffff66;
 z-index:4;pointer-events:none;
}
.desktop-brand{z-index:5;left:calc(var(--edge) + 20px);top:calc(var(--panel-top) + var(--nav-offset) + 20px);gap:5px}
.desktop-brand b{font-size:clamp(16px,1.328125vw,20px);letter-spacing:-.04em;font-weight:600}
.desktop-brand span{font-size:11px;letter-spacing:.02em}
.desktop-label{font-size:13px}
.top{
 z-index:6;left:var(--content-left);right:var(--content-right);width:auto;
 max-width:none;margin:0;padding:20px 0 0;grid-template-columns:1fr auto 1fr;
}
.top::before{inset:0 -12px -20px;border-radius:20px;background:linear-gradient(#e5f2f9e8,#e5f2f9b0 65%,#e5f2f900)}
.identity .halo{width:58px;height:58px;background:none;box-shadow:none}
.identity .pet{width:54px;height:54px}
.identity:has(.pet[data-skin=tower]){padding-top:0}
.identity:has(.pet[data-skin=tower]) .halo,.identity .pet[data-skin=tower]{width:49px;height:62px}
.identity .name-pill,.identity:has(.pet[data-skin=tower]) .name-pill{margin-top:2px;padding:0 4px;background:none;border:0;box-shadow:none;border-radius:0}
.identity .name-pill b{font-size:15px;font-weight:500}
.top .capsule{margin-top:0;height:30px;padding:0;border:0;background:transparent!important;box-shadow:none;backdrop-filter:none}
.capsule>button{height:30px;min-width:30px;padding:0 5px}
.capsule svg{width:17px;height:17px}
.capsule>.optical-lens{display:none}
#history,.desktop-new{
 position:fixed;z-index:5;left:calc(var(--edge) + 12px);width:calc(var(--nav) - 24px);
 height:34px;margin:0;display:flex;align-items:center;justify-content:flex-start;
 gap:10px;padding:0 10px;border:0;border-radius:11px;background:transparent;box-shadow:none;
}
#history{top:calc(var(--panel-top) + var(--nav-offset) + 130px)}
.desktop-new{top:calc(var(--panel-top) + var(--nav-offset) + 94px);font-size:13px;font-weight:400}
#history svg,.desktop-new svg{width:18px;height:18px;stroke-width:1.4}
#app .tabs{
 position:fixed!important;z-index:5;top:calc(var(--panel-top) + var(--nav-offset) + 174px);
 left:calc(var(--edge) + 12px);width:calc(var(--nav) - 24px);grid-auto-rows:34px;gap:3px;
}
#app .tabs button{gap:10px;padding-inline:10px;color:#243943}
#app .tabs button[aria-pressed=true]{background:#ffffffdb;color:#162d3c;box-shadow:none}
#app .tabs button:hover,#history:hover,.desktop-new:hover{background:#ffffffa6}
.tabs svg{width:18px;height:18px;stroke-width:1.4}
.tabs button[data-tab=settings]{margin-top:12px!important;height:34px}
.desktop-foot{
 display:flex;position:fixed;z-index:5;left:calc(var(--edge) + 20px);
 top:calc(var(--panel-top) + var(--nav-offset) + 68.49642dvh - 54px);
 gap:10px;align-items:center;color:#304854;font-size:12px;
}
.desktop-foot img{width:29px;height:29px;object-fit:contain}
.desktop-foot small{display:block;font-size:10px;color:var(--muted);margin-top:3px}
.dock{width:100%;max-width:none;padding:12px 0 32px;gap:0}
#composer{min-height:52px;border-radius:28px;background:#ffffffed!important;border:1px solid #fff9;box-shadow:0 1px 4px #527d9309;align-items:center}
#composer>.optical-lens{display:none}
#draft::placeholder{color:#425c68}
#messages{width:100%;max-width:none;padding:153px 0 24px;gap:12px;justify-content:flex-start}
#messages:has(.empty){justify-content:center;padding-top:144px;padding-bottom:24px;gap:24px}
.empty{margin:0;max-width:100%}.empty b{font-size:26px;letter-spacing:-.035em;font-weight:500}.empty span{font-size:14px}
.starters{width:100%;max-width:540px;gap:10px;margin:0 auto}
.starters button{min-height:82px;padding:12px;background:#f8fbfca8;border:1px solid #ffffff88;border-radius:16px}
.starters b{font-size:13px}
.message{max-width:96%;border-radius:18px;font-size:17px;line-height:1.5;padding:13px 18px;letter-spacing:-.015em}
.message.user{min-width:min(307px,80%);font-size:16px;padding-block:13px;margin-right:11px}
.message.assistant{max-width:calc(100% - 20px);border:0;background:#eff2f7e8;font-size:18px}
.message.user+.message.assistant,.message.user+.message.typing{margin-top:45px}
.attach{background:#f8fafde8;border-color:#ffffff60}
.page{padding:144px 0 28px;border-radius:24px}.page>*{max-width:100%}.page h2{font-size:26px;padding-inline:0}
#library{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 14px;padding-inline:0}
.desktop-context{
 display:flex;flex-direction:column;position:fixed;z-index:2;
 top:calc(var(--panel-top) + var(--context-offset));right:var(--edge);
 width:var(--context);height:72.553699dvh;padding:0 18px 18px;
 border:1px solid #ffffff90;border-radius:24px;
 background:linear-gradient(145deg,#eff7fce8,#eef5fbf0);
 box-shadow:0 17px 36px #527d931b,inset 0 1px 0 #ffffff66;
 backdrop-filter:blur(20px);overflow:auto;scrollbar-width:thin;
}
.context-head{display:flex;align-items:center;justify-content:space-between;min-height:51px;border-bottom:1px solid #7892aa21;margin:0 -18px 18px;padding:0 18px}
.context-head b{font-size:12px;font-weight:500}.context-head svg{width:18px;height:18px;color:#567085}
.desktop-context h2{font-size:13px;margin:0;font-weight:550}
.desktop-context p{color:var(--muted);font-size:12px;line-height:1.5;margin:12px 0}
.context-link{color:#31576e;font-size:12px;padding:7px 0;text-align:left}
.context-guide{display:flex;align-items:center;gap:10px;width:100%;text-align:left;font-size:12px;padding:10px 0}
.context-guide svg{width:18px;height:18px;color:#64819b;stroke-width:1.4}
.context-section{margin-bottom:18px}
.context-section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.context-section-title button{display:grid;place-items:center;width:32px;height:32px;border-radius:50%}
.context-section-title svg{width:17px;height:17px}
.context-chat{display:flex;gap:10px;padding:12px 4px;border-radius:10px;width:100%;text-align:left}
.context-chat[aria-current=true]{background:#ffffff70}
.context-chat svg{width:18px;height:18px;flex:none;margin-top:2px;color:#647f94}
.context-chat span{min-width:0}.context-chat b,.context-chat small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.context-chat b{font-size:12px;font-weight:500}.context-chat small{font-size:11px;color:var(--muted);margin-top:5px}
.context-guide:hover,.context-chat:hover,.context-section-title button:hover{background:#fff9}
}
/* A single readable pane on compact desktops; genuine sections remain in nav. */
@media(min-width:1000px) and (max-width:1199px){
 :root{--nav:190px;--chat-left:calc(var(--edge) + 166px);--content-left:40px;--content-right:40px}
 #app{right:var(--edge)}.desktop-context{display:none}
}
@media(min-width:1000px) and (max-height:720px){
 :root{--panel-top:5dvh;--panel-height:90dvh;--nav-offset:3dvh;--context-offset:2.5dvh}
 #app::before{height:84dvh}.desktop-context{height:85dvh}.desktop-foot{display:none}
 #messages:has(.empty){gap:16px;padding-top:114px;padding-bottom:16px}
 .starters button{min-height:72px;padding:10px}.dock{padding-bottom:22px}
}
@media(min-width:1000px) and (prefers-reduced-transparency:reduce){
 #app{background:#e1eef6;backdrop-filter:none}#app::before{background:#ebf4f9}.desktop-context{background:#eef5fb;backdrop-filter:none}
}
