/* Approved HP / LP / MP / RP / BP placement; content renderers retain their own palette. */
/* Keep the server template unpainted until the existing shell mount completes.
   Opacity preserves the geometry needed by initial panel measurements. */
body:not(.atlas-shell-ready)>:is(#atlas-header,.workspace-shell){opacity:0;pointer-events:none}
/* UI Pack controls keep a Core-owned, readable recovery surface. No existing selector changed. */
#ui-pack-settings{margin:10px 0}
#ui-pack-dialog{box-sizing:border-box;width:min(560px,94vw);max-height:88dvh;overflow:auto;padding:16px;background:#121620;color:#e6edf5;border:1px solid #98a6b8;border-radius:8px;font:13px/1.5 Inter,"Noto Sans JP",system-ui,sans-serif}
#ui-pack-dialog .ui-pack-heading{display:flex;align-items:center;gap:12px;margin-bottom:12px}
#ui-pack-dialog h2{margin:0 auto 0 0;font:400 22px/1.3 "Caudex",serif}
#ui-pack-dialog button{font:12px/1.5 Inter,system-ui,sans-serif;color:#e6edf5;background:#1c2230;border:1px solid #68758a;border-radius:6px;padding:5px 9px;min-height:28px;cursor:pointer}
#ui-pack-dialog button:disabled{opacity:.45;cursor:default}
#ui-pack-dialog .ui-pack-heading button{margin-left:auto;min-width:28px}
#ui-pack-dialog .ui-pack-selections{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#ui-pack-dialog label{display:grid;gap:4px}
#ui-pack-dialog :is(select,textarea,input){font:12px/1.5 Inter,system-ui,sans-serif;color:#e6edf5;background:#1c2230;border:1px solid #68758a;border-radius:5px;padding:5px;width:100%;min-width:0}
#ui-pack-dialog textarea{resize:vertical;margin:8px 0}
#ui-pack-dialog .ui-pack-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}
#ui-pack-dialog #ui-pack-status{min-height:20px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
#ui-pack-dialog details{border-top:1px solid #68758a;padding-top:9px}
#ui-pack-dialog details>button{margin:5px 5px 0 0}
#ui-pack-dialog summary{cursor:pointer;margin-bottom:8px}
#ui-pack-dialog .ui-pack-info{font:11px/1.6 Inter,system-ui,sans-serif;white-space:pre-wrap;overflow-wrap:anywhere}
#ui-pack-dialog :focus-visible{outline:2px solid #e6edf5;outline-offset:2px}
#ui-pack-preview-bar{position:fixed;bottom:10px;left:50%;transform:translateX(-50%);z-index:1000;display:flex;flex-wrap:wrap;align-items:center;gap:7px;max-width:94vw;padding:9px;background:#121620;color:#e6edf5;border:1px solid #98a6b8;border-radius:8px;font:12px/1.5 system-ui,sans-serif;box-shadow:0 4px 24px #0008}
#ui-pack-preview-bar[hidden]{display:none}
#ui-pack-preview-bar button{min-height:28px;padding:4px 8px;color:#e6edf5;background:#1c2230;border:1px solid #98a6b8;font:12px/1.5 system-ui,sans-serif}
#ui-pack-preview-bar button:focus-visible{outline:2px solid #e6edf5;outline-offset:2px}
:root{--atlas-font-display:"Caudex","Noto Sans JP","Yu Gothic","Meiryo",sans-serif}
body{--shell-header:82px;background:var(--atlas-bg)}
body>header#atlas-header,body.left-closed>header#atlas-header{display:block;height:auto;min-height:0;padding:4px 0 0;background:var(--atlas-bg);border-bottom:1px solid var(--atlas-border);z-index:95}
#atlas-header .hp-row{display:grid;grid-template-columns:max(230px,calc(var(--left) + 6px)) minmax(0,1fr) max(260px,calc(var(--right) + 6px));align-items:center;min-width:0}
#atlas-header .brand-controls{display:flex;align-items:center;padding:6px 12px 3px 20px;gap:10px;min-width:0}
#atlas-header .header-home{font:400 clamp(19px,1.6vw,26px)/1.3 var(--atlas-font-display);white-space:nowrap;padding:0;flex:1;letter-spacing:0}
#atlas-header .brand-controls #toggle-left{width:30px;height:30px;padding:2px;flex:0 0 30px;font-size:19px;border-color:var(--atlas-border)}
#atlas-header .header-center,#atlas-header .header-right,#atlas-header .header-navigation{display:block;min-width:0;padding:3px 10px;border:0;grid-column:auto;grid-row:auto}
#atlas-header #header-shortcuts{display:flex;align-items:center;gap:14px;min-height:32px;overflow:auto;font:11px/1.5 var(--atlas-font);color:var(--atlas-text-muted);white-space:nowrap}
#atlas-header .top-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:0;margin:0;flex-wrap:wrap;min-width:0}
#atlas-header .top-actions>button{width:30px;min-width:30px;height:30px;padding:3px;border-color:var(--atlas-border);color:var(--atlas-text);background:transparent}
#language,#work-panel-language{font:12px/1.4 var(--atlas-font);padding:5px 7px;border:1px solid var(--atlas-border);border-radius:var(--atlas-control-radius);background:var(--atlas-panel);color:var(--atlas-text);min-width:94px}
#atlas-header .header-categories{padding:0 16px;min-width:0;align-self:stretch;display:flex;align-items:flex-end}
#atlas-header .hp-navigation>.header-navigation{padding-block:0;align-self:start}
#atlas-header #atlas-category-nav{display:flex;align-items:flex-end;gap:8px;overflow-x:auto;overflow-y:hidden;padding:0;margin:0 0 -1px;border:0;white-space:nowrap;font:10px/1.4 var(--atlas-font);position:relative;z-index:1}
#atlas-category-nav a{position:relative;padding:4px 6px;border:1px solid var(--atlas-border);border-radius:6px 6px 0 0;color:var(--atlas-text-muted);text-decoration:none}
#atlas-category-nav a[aria-current=true]{background:var(--atlas-bg);color:var(--atlas-text)}
#atlas-header #atlas-category-nav a[aria-current=true]::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background:var(--atlas-bg)}
#browser-navigation-host,#browser-tabs-host{min-width:0;display:flex;align-items:center;overflow:hidden}
#browser-tabs-host{padding:2px 8px}
#browser-navigation-host .ab-navigation{gap:5px;width:100%;flex-wrap:nowrap}
#browser-navigation-host .ab-toolbar{gap:3px;flex-wrap:nowrap}
#browser-navigation-host .ab-toolbar button{padding:4px 6px}
#browser-navigation-host .ab-address{min-width:0;gap:4px;grid-template-columns:minmax(0,1fr) auto}
#browser-navigation-host .ab-address label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#browser-navigation-host .ab-address :is(input,button){padding:4px 6px}
.world-navigation{display:flex;align-items:center;gap:5px;min-height:30px;padding:0;color:var(--atlas-text-muted);font:11px/1.5 var(--atlas-font)}
.world-navigation>button{font-size:17px;padding:2px 6px;border:0;border-radius:4px}
.world-navigation #header-trail{min-width:0;overflow:auto;background:var(--atlas-panel);border-radius:6px;padding:4px 9px;margin:0}
body:not(.atlas-browser-open) #browser-navigation-host{display:none}
body.atlas-browser-open .world-navigation{display:none}
.workspace-shell>main{padding:0 12px 6px!important;min-width:0;background:var(--atlas-bg)}
.workspace-shell>main.earth-exploration-open>.real-exploration-nav{order:10;margin-top:auto;border-bottom:0;border-top:1px solid var(--atlas-border);padding:8px 0;flex-shrink:0}
.workspace-shell>main>#central-world.atlas-hub{overflow:auto}
/* LP keeps fixed main entrances, a scrollable INDEX, Quick Access, and management. */
#workspace-left{padding:16px 14px 8px;background:var(--atlas-bg);color:var(--atlas-text);overflow:hidden;gap:4px}
#workspace-left .atlas-local-badge{order:0;margin:0 0 7px;font:9px/1.4 var(--atlas-font);color:var(--atlas-text-muted)}
#atlas-primary-index{flex:0 0 auto}
#atlas-primary-index>h2{font:400 16px/1.4 "Noto Sans JP",sans-serif;letter-spacing:.14em;margin:3px 7px 6px;color:var(--atlas-text)}
#workspace-left #atlas-primary-index>nav{display:flex;gap:6px;margin:0 0 4px;flex-wrap:wrap}
#workspace-left #atlas-primary-index a{padding:5px 7px;font-size:11px;color:var(--atlas-text-muted)}
#workspace-left #left-desk{display:none}
#index-scroll-frame{display:flex;flex:1;min-height:150px;gap:7px;position:relative;overflow:hidden}
#workspace-left #workspace-index{flex:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;margin:0;border:0;padding:0 3px 0 0}
#workspace-index::-webkit-scrollbar{display:none}
#index-indicator{flex:0 0 18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:0;overflow:hidden;margin:0;padding:4px 0}
#index-indicator button{flex:0 1 13px;min-height:3px;width:18px;padding:0;border:0;background:transparent;display:grid;place-items:center;cursor:pointer}
#index-indicator button::after{content:"";height:2px;width:5px;background:var(--atlas-text-muted);opacity:.4}
#index-indicator button[data-current=true]::after{width:5px}
#index-indicator button[data-visible=true]::after{opacity:.85}
#index-indicator button:focus-visible{outline:1px solid var(--atlas-accent-cyan);outline-offset:1px}
#workspace-index .index-location{display:none}
/* Keep labels closer to disclosure arrows without shrinking the toggle target. */
#workspace-index .index-row{gap:0}
#workspace-left #workspace-index a{padding-left:2px}
#workspace-index .index-leaf,#workspace-index .index-action{padding-left:22px}
#workspace-index .index-action button{padding-left:2px}
#workspace-index [data-place=wikiatlas]>.index-row{display:none}
#workspace-index [data-place=wikiatlas]>ul{padding-left:0}
#workspace-left #atlas-quick-access{flex:0 0 auto;gap:5px;padding-top:10px;margin:8px 0 4px;max-height:25%;overflow:auto;scrollbar-width:thin}
#workspace-left #atlas-quick-access>a{padding:7px 22px 7px 9px;gap:1px}
#workspace-left #atlas-quick-access strong{font-size:11px}
#atlas-settings{flex:0 0 auto;max-height:25%;overflow:auto;scrollbar-width:thin;border-top:1px solid var(--atlas-border)}
#workspace-left #atlas-settings details{padding:7px 0;border:0}
#workspace-left #atlas-settings #local-user{margin:0}
#workspace-left .local-updates{flex:0 0 auto;margin:0;padding:4px 2px;font-size:9px}
#workspace-left .local-updates #workspace-save-status{margin:0}
/* RP: Tools, AI, Reference, Memo remain independent retained regions. */
body.atlas-shell-ready #workspace-right{background:var(--atlas-bg);border-left:1px solid var(--atlas-border);min-height:0}
body.atlas-shell-ready #system-tools{padding:9px 10px;gap:5px}
#system-tools>button#system-browser{width:36px;height:36px;padding:3px}
#system-tools #system-browser svg{width:28px;height:28px;display:block}
#atlas-ai{padding:10px}
body.atlas-shell-ready #workspace-right>.reader{padding:10px;gap:5px}
.reference-heading{display:flex;flex-direction:column;gap:5px;flex:0 0 auto}
.reference-heading h2{font:400 18px/1.4 var(--atlas-font-display);margin:0}
.reference-controls{display:flex;align-items:center;justify-content:flex-end;gap:4px;flex-wrap:wrap}
.reference-controls>button{font:11px/1.4 var(--atlas-font);padding:4px 6px;border-color:var(--atlas-border)}
.reference-controls #expand-reader{margin-left:auto}
#reference-viewer{flex:1;min-height:0;overflow:auto}
.reader:has(#reference-viewer:not(:empty)) #source-view{flex:0 1 auto;max-height:35%}
body.atlas-shell-ready #workspace-right .workspace-modes{flex:0 0 auto;flex-wrap:wrap;gap:4px}
body.atlas-shell-ready #workspace-right .workspace-modes button{font:10px/1.4 var(--atlas-font);padding:4px 5px;background:transparent;color:var(--atlas-text-muted);border-color:var(--atlas-border)}
#atlas-work-title,#atlas-desk-title,.atlas-hub>h1,.reference-heading h2{font-family:var(--atlas-font-display);font-weight:400}
/* Desk is a stable BP child, never a right-reader overlay. */
#atlas-work-panel>#atlas-desk{position:relative;flex:1;min-height:0;overflow:auto;grid-column:auto;grid-row:auto;z-index:auto;border:0;background:transparent;padding:18px 4px;animation:none}
#atlas-desk .atlas-desk-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));max-width:900px}
#atlas-desk .atlas-desk-grid>button{border-radius:var(--atlas-radius);min-height:110px}
#atlas-desk .atlas-support-heading{max-width:900px}
#atlas-desk .atlas-support-heading h2{font-size:22px}
#atlas-work-panel[hidden],#atlas-browser[hidden]{display:none!important}
#atlas-browser{position:fixed;inset:var(--shell-header) 0 0;height:auto;z-index:90;min-width:0;min-height:0;background:var(--atlas-bg);color:var(--atlas-text);animation:atlas-open-right var(--atlas-shell-motion) ease-out}
#workspace-left #atlas-related{flex:0 0 auto;max-height:120px;overflow:auto;margin:4px 0;padding:5px 0;border:0;font-size:11px}
#atlas-related>summary{color:var(--atlas-text-muted);cursor:pointer;letter-spacing:.06em}
#atlas-related>a{display:block;margin:4px 0;padding:5px 7px;color:var(--atlas-text-muted);border:1px solid var(--atlas-border);border-radius:5px}
@media(prefers-reduced-motion:reduce){#atlas-browser{animation:none}}

body.atlas-work-expanded #atlas-work-panel{z-index:150}
#title,.workspace-shell>main h1,.workspace-shell>main h2{font-family:var(--atlas-font-display);font-weight:400}
/* An explicitly retained hidden LIVE instance remains visible in HP status. */
#hidden-live-status{font:9px/1.35 var(--atlas-font);color:var(--atlas-text-muted);max-width:140px;min-width:0;white-space:normal;overflow-wrap:anywhere}
#hidden-live-status[hidden]{display:none}
.reference-reopen{display:flex;align-items:center;gap:6px;flex:0 0 auto;font:10px/1.4 var(--atlas-font)}
.reference-reopen button{padding:4px 7px;font:inherit;border-color:var(--atlas-border)}
#reference-live-status{color:var(--atlas-text-muted)}
body:is(.research-active,.observations-active,.places-active) #reference-viewer{display:none}
@media(max-width:1000px){
 #atlas-header .hp-row{grid-template-columns:230px minmax(0,1fr)}
 #atlas-header .hp-top .header-right{grid-column:2;grid-row:1}
 #atlas-header .hp-top .header-center{grid-column:1/-1;grid-row:2;padding-block:0}
 #atlas-header #header-shortcuts{min-height:24px}
 #browser-tabs-host{grid-column:1/-1}
 #browser-tabs-host:not(:has([role=tab]:not([hidden]),.ab-favorites:not([hidden]))){display:none}
}
@media(max-width:600px){
 #atlas-header .hp-row{grid-template-columns:minmax(0,1fr)}
 #atlas-header .hp-top .header-right{grid-column:1;grid-row:2}
 #atlas-header .hp-top .header-center{grid-column:1;grid-row:3}
 #atlas-header .header-home{font-size:21px}
 #atlas-header .brand-controls{padding:5px 14px 2px}
 #atlas-header .top-actions{justify-content:flex-start}
 #workspace-left{padding:8px 12px}
 .workspace-shell>main{padding:4px 10px!important}
}

/* Focused interaction polish. UI surfaces only; no persistence changes. */
body.atlas-shell-ready #workspace-left{padding-left:19px}
#index-indicator{touch-action:none}
#index-position-label{position:absolute;left:24px;z-index:5;max-width:calc(100% - 28px);padding:4px 8px;border:1px solid var(--atlas-border);border-radius:5px;background:var(--atlas-bg);color:var(--atlas-text);font:12px/1.5 var(--atlas-font);pointer-events:none}
#atlas-header .brand-controls #toggle-left{display:grid;place-items:center;align-self:center;line-height:1;margin:0;transform:none}
#atlas-header #header-shortcuts{gap:20px}
#header-shortcuts>.eyebrow{margin:0 10px 0 0;flex-shrink:0}
#atlas-header .header-right{display:block!important;overflow:visible}
#atlas-header .top-actions{gap:5px}
#atlas-header #toggle-right{font-size:0;position:relative}
#atlas-header #atlas-login{display:inline-grid;place-items:center;text-align:center;line-height:1.2;padding-block:3px}
#atlas-header #toggle-right::after{content:'';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:18px;height:14px;box-sizing:border-box;border:1.5px solid currentColor;border-radius:3px;background:linear-gradient(currentColor,currentColor) 65% 0/1.5px 100% no-repeat}
#atlas-header #toggle-right[aria-expanded="true"]::after{background:linear-gradient(to right,transparent 60%,currentColor 60%)}
#atlas-header .hp-top{grid-template-columns:max(230px,calc(var(--left) + 6px)) minmax(0,1fr) max(340px,calc(var(--right) + 6px))}
body.atlas-shell-ready #system-tools #tool-pdf{--atlas-tool-color:#f45a54}
body.atlas-shell-ready #system-tools #tool-document{--atlas-tool-color:#679cf5}
body.atlas-shell-ready #system-tools #tool-spreadsheet{--atlas-tool-color:#80b94d}
body.atlas-shell-ready #system-tools #tool-image{--atlas-tool-color:#668dff}
body.atlas-shell-ready #system-tools #tool-design{--atlas-tool-color:#ee734a}
body.atlas-shell-ready #system-tools #tool-lab{--atlas-tool-color:#67c4d5}
#reference-viewer:not([hidden]){position:fixed;right:8px;bottom:52px;width:clamp(300px,var(--right),600px);height:min(65dvh,720px);z-index:98;display:flex;flex-direction:column;background:var(--atlas-bg);border:1px solid var(--atlas-border);border-radius:10px;box-shadow:0 8px 30px #0004;padding:8px;animation:atlas-reference-rise .2s ease-out}
#reference-viewer .ab-heading{cursor:default;flex-wrap:wrap;gap:5px}
#reference-viewer .ab-heading h1{font-size:15px;margin:0 auto 0 0}
#reference-viewer .ab-heading button{padding:3px 6px;font-size:11px}
#reference-viewer .ab-tabs{flex-shrink:0}
#reference-viewer .ab-history-help{display:none}
#reference-viewer .ab-feedback:empty{display:none}
#reference-viewer .ab-feedback{font-size:11px;margin:3px 0}
#reference-viewer .ab-content{flex:1;min-height:0;overflow:auto}
#reference-viewer .ab-view:not([hidden]){display:flex;flex-direction:column;min-height:100%}
#reference-viewer .ab-frame{min-height:240px;height:36dvh;flex:1;background:#070b10}
#reference-viewer .ab-frame iframe{width:100%;height:100%;min-height:240px}
#reference-viewer .ab-source-actions{gap:4px;margin:4px 0}
#reference-viewer .ab-source-actions>*{font-size:10px;padding:3px 5px}
#reference-viewer .ab-details{font-size:12px;margin-top:5px}
#reference-viewer.reference-floating:not([hidden]){right:auto;bottom:auto;left:25vw;top:20dvh;width:min(650px,85vw);height:65dvh;resize:both;overflow:auto;max-width:96vw;max-height:90dvh;min-width:280px;min-height:240px}
#reference-viewer.reference-floating .ab-heading{cursor:move;touch-action:none}
#reference-viewer.reference-maximized:not([hidden]){inset:var(--shell-header) 5px 5px!important;width:auto!important;height:auto!important;max-width:none;max-height:none;resize:none}
.reference-dragging iframe{pointer-events:none}
#workspace-right .conversation-tabs{display:flex;gap:6px;flex-wrap:wrap}
#notes-pane:not([hidden]){animation:atlas-reference-rise .2s ease-out}
@keyframes atlas-reference-rise{from{transform:translateY(28px);opacity:.3}to{transform:translateY(0);opacity:1}}
@media(max-width:1000px){#atlas-header .hp-top{grid-template-columns:230px minmax(0,1fr)}}
@media(max-width:600px){#atlas-header .hp-top{grid-template-columns:minmax(0,1fr)}#reference-viewer:not([hidden]){width:calc(100vw - 16px)}}
@media(prefers-reduced-motion:reduce){#reference-viewer:not([hidden]),#notes-pane:not([hidden]){animation:none}}

#atlas-header .header-home{flex:0 1 auto;min-width:0;font-size:clamp(17px,1.4vw,23px)}
#atlas-header .brand-controls{padding-left:14px;gap:16px}
#reference-viewer{gap:5px}
#reference-viewer .ab-navigation{gap:4px}
#reference-viewer .ab-navigation :is(button,input){padding:3px 5px;font-size:11px}
#reference-viewer .ab-address label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body.conversation-open #reference-viewer:not(.reference-floating):not([hidden]){bottom:calc(34dvh + 12px);height:45dvh}

body.atlas-browser-open #reference-viewer{visibility:hidden}
#reference-viewer .ab-view{padding:4px;gap:5px}
#reference-viewer .ab-frame[data-paper]:not([data-paper='']){height:auto;min-height:0;flex:none}
#reference-viewer .ab-frame[data-paper]:not([data-paper='']) iframe{min-height:0}

#workspace-left #index-indicator{display:flex;flex-direction:column;gap:2px;margin:0;padding:4px 0;justify-content:center}

/* Video-reference INDEX: neighbouring ticks swell; preview stays outside LP clipping. */
#workspace-left #index-indicator{flex-basis:34px;align-items:stretch;justify-content:stretch;overflow:hidden;gap:0}
#workspace-left #index-indicator button{flex:1 1 0;width:34px;min-height:3px;max-height:none;display:flex;align-items:center;justify-content:flex-start;padding:0;border-radius:0}
#index-indicator button::after{width:var(--index-tick-width,5px);transition:width 90ms ease-out,height 90ms ease-out,opacity 90ms ease-out}
#index-position-label{position:fixed;z-index:99;left:auto;top:auto;width:min(320px,calc(100vw - 16px));max-width:calc(100vw - 16px);padding:13px 15px;border-radius:14px;box-shadow:0 8px 24px #0003;background:var(--atlas-panel);backdrop-filter:blur(8px);display:flex;flex-direction:column;gap:7px;font:12px/1.6 var(--atlas-font);overflow-wrap:anywhere}
#index-position-label[hidden],body.atlas-work-expanded #index-position-label,body.atlas-browser-open #index-position-label,body.left-closed #index-position-label{display:none}
.index-preview-title{font-weight:600;font-size:13px;color:var(--atlas-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.index-preview-path,.index-preview-detail{color:var(--atlas-text-muted);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
@media(prefers-reduced-motion:reduce){#index-indicator button::after{transition:none}}
/* Browser / Notes: persistent navigation, independent windows opening above it. */
body.atlas-shell-ready #workspace-right,body.atlas-shell-ready.conversation-open #workspace-right{grid-template-rows:auto auto minmax(0,1fr) 44px}
body.atlas-shell-ready #workspace-right>.conversation{height:44px;padding:0;border:0;overflow:visible}
#workspace-right .conversation-tabs{position:fixed;bottom:0;right:0;z-index:99;height:44px;box-sizing:border-box;width:var(--right);max-width:100vw;padding:5px 10px;display:flex;align-items:center;justify-content:flex-start;gap:8px;flex-wrap:nowrap;background:transparent;border-top:0}
#workspace-right .conversation-tabs>button{height:32px;min-width:82px;margin:0;padding:4px 12px;background:var(--atlas-bg)}
#workspace-right .conversation-tabs>button[aria-expanded=true]{border-color:var(--atlas-hover-border);background:var(--atlas-panel)}
#notes-pane:not([hidden]){position:fixed;right:8px;bottom:52px;z-index:98;width:min(calc(var(--right) - 16px),calc(100vw - 16px));height:min(440px,calc(100dvh - var(--shell-header) - 65px));min-height:220px;max-height:calc(100dvh - 60px);padding:10px;box-sizing:border-box;border:1px solid var(--atlas-border);border-radius:12px;background:var(--atlas-bg);box-shadow:0 8px 24px #0004;resize:both;overflow:auto;animation:atlas-reference-rise .18s ease-out}
.notes-window-header{display:flex;gap:6px;align-items:center;flex-shrink:0;touch-action:none}
.notes-window-header>strong{margin-right:auto;font:400 18px/1.4 var(--atlas-font-display)}
.notes-window-header button{padding:4px 7px;font-size:11px}
#notes-pane .browser-size-handle{align-self:flex-end}
#notes-pane #local-messages{min-height:0;flex:1;overflow:auto}
#notes-pane.notes-floating:not([hidden]){right:auto;bottom:auto;left:20vw;top:25dvh;max-width:calc(100vw - 16px)}
.notes-floating .notes-window-header{cursor:move}
body.atlas-shell-ready #reference-viewer:not([hidden]),body.atlas-shell-ready.conversation-open #reference-viewer:not(.reference-floating):not([hidden]){--browser-start-width:min(calc(var(--right) - 16px),calc(100vw - 16px));width:var(--browser-start-width);height:auto;right:8px;bottom:52px;min-width:min(280px,calc(100vw - 16px));min-height:200px;max-width:calc(100vw - 16px);max-height:calc(100dvh - var(--shell-header) - 64px);padding:8px;gap:4px;box-sizing:border-box;border-radius:12px;resize:both;overflow:auto}
body.atlas-shell-ready #reference-viewer.reference-floating:not([hidden]){right:auto;bottom:auto;left:25vw;top:20dvh}
#reference-viewer .ab-content{min-height:0;overflow:hidden;flex:1}
#reference-viewer .ab-view:not([hidden]){min-height:0;height:100%;gap:4px;padding:0;border:0;background:transparent}
#reference-viewer .ab-frame{position:relative;min-height:0;height:auto;flex:1;border-radius:8px}
#reference-viewer:not([style*="height"]):not(.reference-maximized) .ab-frame{aspect-ratio:16/9;flex:none}
#reference-viewer .ab-frame :is(iframe,video){position:absolute;inset:0;width:100%;height:100%;min-height:0;border:0;background:#070b10;object-fit:contain}
#reference-viewer .ab-empty{aspect-ratio:16/9;display:grid;place-items:center;margin:0;color:var(--atlas-text-muted)}
#reference-viewer.reference-maximized:not([hidden]){min-height:0;max-height:none}
#reference-viewer.reference-maximized .ab-content{flex:1;min-height:0}
#reference-viewer.reference-maximized .ab-frame{flex:1;aspect-ratio:auto}
.browser-compact .ab-heading{align-items:center;gap:5px;position:relative;flex:0 0 auto}
.browser-compact .ab-heading>h1{font:400 18px/1.4 var(--atlas-font-display);margin:0 auto 0 0}
.browser-compact .ab-heading>button{display:grid;place-items:center;height:28px;min-width:28px;padding:2px 6px;line-height:1}
.browser-compact .ab-navigation{display:flex;flex-wrap:nowrap;align-items:center;gap:4px;flex:0 0 auto}
.browser-compact .ab-toolbar{display:flex;flex-wrap:nowrap;gap:3px}
.browser-compact .ab-toolbar>button{width:27px;min-width:27px;height:28px;padding:0;display:grid;place-items:center;font-size:17px}
.browser-compact .ab-address{flex:1;display:flex;min-width:0;gap:3px}
.browser-compact .ab-address>input{width:0;flex:1;min-width:0}
.browser-compact .ab-address>label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.browser-compact .ab-address>button{min-width:28px;font-size:18px}
.browser-compact .ab-tabs{max-height:35px;flex:0 0 auto;overflow-x:auto;flex-wrap:nowrap;gap:4px}
.browser-compact .ab-tab{min-width:0;max-width:180px}
.browser-compact .ab-tab>button{padding:3px 6px;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.browser-compact .ab-source-actions{flex:0 0 auto;margin:0;gap:4px}
.browser-compact .ab-source-actions>*{font-size:11px;padding:2px 5px}
.browser-compact .ab-details{margin:0;font-size:10px}
.browser-compact .ab-feedback{flex:0 0 auto;margin:0;font-size:11px}
.browser-compact .ab-feedback:empty{display:none}
.browser-compact .ab-history-help{font-size:11px!important;display:block!important;max-width:300px;white-space:normal}
.ab-help,.ab-favorites{font-size:10px;position:relative}
.ab-help>summary,.ab-favorites>summary{list-style:none;cursor:pointer;padding:3px}
.ab-help>div,.ab-favorites>div{position:absolute;right:0;top:26px;z-index:4;width:min(260px,65vw);max-height:240px;overflow:auto;padding:10px;border:1px solid var(--atlas-border);border-radius:10px;background:var(--atlas-bg);box-shadow:0 8px 20px #0005}
.ab-favorites button{display:block;width:100%;text-align:left;overflow-wrap:anywhere;font-size:11px;margin-bottom:4px}
.ab-home-settings{display:grid;gap:5px;border-top:1px solid var(--atlas-border);margin-top:8px;padding-top:8px}
.ab-home-settings input{box-sizing:border-box;width:100%;min-width:0;font-size:12px}
#browser-tabs-host .ab-favorites{position:relative;flex:0 0 auto;margin-left:auto}
#atlas-header .header-center>#browser-tabs-host:has(.ab-favorites){overflow:visible}
.browser-size-handle{flex:0 0 auto;align-self:flex-end;padding:0 4px!important;font-size:10px!important;line-height:1.2}
body.atlas-shell-ready #atlas-header .top-actions>button{display:grid;place-items:center;line-height:1;align-self:center;margin:0;flex:0 0 30px}
body.atlas-shell-ready #atlas-header .top-actions>button[hidden]{display:none}
#atlas-header .top-actions #hp-reference-full,#atlas-header .top-actions #hp-reference-close{font-family:Arial,sans-serif;font-size:20px}

@media(max-width:600px){.ab-favorites>summary{font-size:0}.ab-favorites>summary::after{content:'★';font-size:13px}.browser-compact .ab-toolbar>button{width:24px;min-width:24px}}
@media(prefers-reduced-motion:reduce){#notes-pane:not([hidden]){animation:none}}

#atlas-header .top-actions>button>svg{width:18px;height:18px;display:block}

.browser-size-handle{cursor:nwse-resize;touch-action:none}.reference-maximized .browser-size-handle{display:none}.browser-compact .ab-address>button{display:grid;place-items:center}

.browser-compact .ab-frame>video{width:100%;height:100%;object-fit:contain;background:#070b10}

/* Docked windows share RP; navigation brings the requested window forward. */
body[data-rp-window="browser"] #notes-pane:not(.notes-floating){z-index:97}
body[data-rp-window="notes"] #reference-viewer:not(.reference-floating){z-index:97}
#reference-viewer .ab-frame{overflow:hidden;flex-shrink:0}
#reference-viewer .ab-frame iframe[data-desktop-fit]{transform-origin:top left;max-width:none;max-height:none}

/* Compact Browser controls and a small permanent outer gutter. */
body.atlas-shell-ready{padding-left:5px;box-sizing:border-box}
body.atlas-shell-ready #workspace-left{padding-left:10px}
#workspace-left #index-scroll-frame{gap:2px}
#workspace-left #index-indicator{flex-basis:12px;overflow:visible}
#workspace-left #index-indicator button{width:12px}
#workspace-left #index-indicator button::after{max-width:12px}
#index-position-label{font-size:10px;gap:5px;padding:10px 12px}
#index-position-label .index-preview-title{font-size:11px}
.browser-compact .ab-heading{justify-content:flex-end}
.browser-compact .ab-heading>h1{display:none}
.browser-compact .ab-heading>button{margin:0}
.browser-compact .ab-source-actions{display:flex;align-items:center;gap:7px}
.browser-compact .ab-source-actions .ab-help>summary{padding:2px 5px}
.browser-compact .ab-source-actions .ab-help>div{top:auto;bottom:26px}
.browser-compact .ab-details{flex:0 0 auto;order:3}
#atlas-browser.browser-compact .ab-view:not([hidden]){display:flex;flex-direction:column}
#atlas-browser.browser-compact .ab-frame{order:0;min-height:50dvh;flex:1}
#atlas-browser.browser-compact .ab-source-actions{order:1}
#atlas-browser.browser-compact .ab-pdf-controls{order:2}
/* Map documents need scrolling even when entered from a planet view. */
body.planet-open .workspace-shell>main:has(#central-world.earth-map-page){overflow-y:auto;overflow-x:hidden}
.yakushima-navigation{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:4px;margin-bottom:12px}
.yakushima-navigation .earth-map-toolbar{justify-content:flex-end;margin:4px 0}
.yakushima-navigation h1,.yakushima-navigation p{margin:3px 0}
@media(max-width:600px){body.atlas-shell-ready #workspace-left{left:5px}}

/* RP controls belong to RP; Browser owns its separate window controls. */
body.atlas-shell-ready #atlas-header .top-actions>button[id^="hp-reference-"]{display:none}
body.atlas-browser-open #header-shortcuts{display:none!important}
body.atlas-browser-open #atlas-header .header-navigation{display:none}
body.atlas-browser-open #browser-navigation-host{display:flex;width:100%;max-width:640px;margin-inline:auto;padding:3px 0}
body.atlas-browser-open #browser-tabs-host{grid-column:2 / -1;width:100%;overflow:visible;padding:3px 12px}
#browser-tabs-host .ab-tabs{width:100%;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;min-height:34px;max-height:none}
#browser-tabs-host .ab-tab{flex:0 0 180px;max-width:180px;display:flex;min-width:0}
#browser-tabs-host .ab-tab>[role="tab"]{flex:1;min-width:0}
#browser-tabs-host .ab-tab-close{flex:0 0 28px;min-width:28px}
#atlas-browser .ab-heading{flex:0 0 auto;padding:8px 8px 4px;min-height:40px}
#atlas-browser.browser-compact .ab-frame:not([data-paper="portrait"]):not([data-paper="landscape"]){position:relative;aspect-ratio:16/9;min-height:0;height:auto;flex:none;width:100%}
#atlas-browser.browser-compact .ab-frame:not([data-paper="portrait"]):not([data-paper="landscape"])> :is(iframe,video){position:absolute;inset:0;width:100%;height:100%;min-height:0;object-fit:contain}
/* The world shell is inert beneath full Browser. Do not expose dead controls. */
body.atlas-browser-open #workspace-right>.conversation,body.atlas-browser-open #notes-pane{visibility:hidden;pointer-events:none}
body.atlas-shell-ready.reader-fullscreen #workspace-right{top:var(--shell-header);height:calc(100dvh - var(--shell-header));z-index:80}
/* Browser design restoration and separate Reference records drawer. */
body.atlas-browser-open #header-shortcuts{display:flex!important}
.browser-command-row{display:none!important}
body.atlas-browser-open #atlas-header .browser-command-row{display:grid!important;gap:0;padding-block:4px}
#browser-actions-host{min-width:0;padding:0 10px}
#browser-actions-host .ab-source-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:11px}
#browser-actions-host .ab-source-actions>*{font-size:11px;padding:3px}
#browser-actions-host .ab-help>div{top:26px;bottom:auto}
#browser-window-host .ab-heading{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:0 12px}
#browser-window-host h1{display:none}
#browser-window-host button{padding:4px 8px}
#browser-window-host [hidden]{display:none!important}
#reference-viewer .ab-heading>h1{display:block;margin:0 auto 0 0;font:400 18px/1.4 var(--atlas-font-display)}
#reference-viewer .ab-heading>[hidden]{display:none!important}
#reference-viewer .ab-tabs{overflow-x:auto;min-width:0}
#reference-viewer .ab-tab{flex:0 0 140px;max-width:140px;display:flex;min-width:0}
#reference-viewer .ab-tab>[role=tab]{flex:1;min-width:0}
#reference-viewer .ab-tab-close{flex:0 0 24px;min-width:24px}
.ab-resting{position:absolute;inset:0;display:grid;place-items:center;color:var(--atlas-text-muted);font:400 20px/1.5 var(--atlas-font-display)}
.ab-resting[hidden]{display:none}
#reference-records:not([hidden]){position:fixed;right:8px;bottom:52px;z-index:98;width:min(calc(var(--right) - 16px),calc(100vw - 16px));height:min(500px,70dvh);overflow:auto;resize:both;padding:12px;border:1px solid var(--atlas-border);border-radius:12px;background:var(--atlas-bg);box-sizing:border-box;animation:atlas-reference-rise .18s ease-out}
#reference-records .reference-heading{display:flex;align-items:center;justify-content:space-between}
#reference-records #source-view{max-height:none}
#reference-records #source-view textarea{width:100%;min-height:90px;box-sizing:border-box}
#reference-record-list{display:grid;gap:5px;margin-top:10px}
#reference-record-list button{text-align:left;overflow-wrap:anywhere}
#reference-records #encyclopedia-dock{margin-bottom:12px}
body[data-rp-window=records] #reference-viewer:not(.reference-floating),body[data-rp-window=records] #notes-pane:not(.notes-floating){z-index:97}
body:not([data-rp-window=records]) #reference-records{z-index:96}
body.atlas-browser-open #reference-records{visibility:hidden;pointer-events:none}
body.atlas-shell-ready #workspace-right>.reader{padding:0;gap:0}
body.atlas-shell-ready #workspace-right{grid-template-rows:auto minmax(100px,1fr) 0 44px}

/* 2026-10-02: compact RP and consistent Viewer / Notes / Reference chrome. */
body.atlas-shell-ready #system-tools{display:flex;flex-wrap:nowrap;gap:3px;padding:8px 9px;overflow-x:auto;scrollbar-width:thin}
body.atlas-shell-ready #system-tools>span{display:none}
body.atlas-shell-ready #system-tools>button,body.atlas-shell-ready #system-tools>button[data-work-tool],body.atlas-shell-ready #system-tools>button#system-browser{flex:0 0 28px;width:28px;height:30px;min-height:30px;max-height:30px;min-width:0;margin:0;padding:3px;box-sizing:border-box;align-self:center;line-height:1}
body.atlas-shell-ready #system-tools>button[hidden]{display:none}
body.atlas-shell-ready #system-tools button svg,body.atlas-shell-ready #system-tools #system-browser svg{display:block;flex:none;width:22px;height:22px;aspect-ratio:1;overflow:visible}
body.atlas-shell-ready #system-tools #tool-sandbox{--atlas-tool-color:var(--atlas-accent-pink)}
body.atlas-shell-ready #system-tools #system-browser{--atlas-tool-color:var(--atlas-accent-cyan)}
body.atlas-shell-ready #system-tools #toggle-atlas-desk{--atlas-tool-color:#9ca3af}
#workspace-right .conversation-tabs{gap:5px;padding:5px 8px}
#workspace-right .conversation-tabs>button{min-width:0;flex:1;padding:4px 6px;font-size:11px}
#reference-records:not([hidden]),#notes-pane:not([hidden]),body.atlas-shell-ready #reference-viewer:not([hidden]){padding:10px}
#notes-pane .notes-window-header,#reference-records .reference-heading,#reference-viewer .ab-heading{position:sticky;top:-10px;z-index:6;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:6px;min-height:32px;margin:0 0 6px;padding:0;background:var(--atlas-bg);flex-shrink:0;text-align:left}
#notes-pane .notes-window-header>strong,#reference-records .reference-heading>h2,#reference-viewer .ab-heading>h1{margin:0 auto 0 0;font:400 18px/1.4 var(--atlas-font-display);text-align:left;min-width:0}
#close-conversation,#close-reader,#reference-close{order:99;flex:0 0 28px;width:28px;height:28px;min-width:28px;margin:0;padding:0;display:grid;place-items:center;font:18px/1 var(--atlas-font);box-sizing:border-box}
#reference-records .reference-controls{justify-content:flex-start;margin:0 0 8px;gap:4px}
#reference-records .reference-controls #expand-reader{margin-left:0}
#reference-records #encyclopedia-dock{margin:16px 0 0;border-top:1px solid var(--atlas-border);border-bottom:0;padding-top:10px}
#notes-pane #add-note{margin:0 0 8px;flex-shrink:0}
#notes-pane #note-draft{min-height:108px;width:100%;resize:vertical;box-sizing:border-box;font:12px/1.6 var(--atlas-font)}
#notes-pane #local-messages{flex:1 0 60px}
#notes-pane #export-notebook{font-size:10px;margin-top:8px}
#notes-pane #notebook-references{order:8;font-size:10px;margin-top:10px}
#notes-pane #export-notebook{order:9}
/* Hover forms a pale silver-to-pink hill; all resting ticks share one length. */
#index-indicator button[data-current=true]{--index-rest-pink:24%}
#workspace-left #index-indicator button::after{width:var(--index-tick-width,5px);height:var(--index-tick-height,2px);opacity:var(--index-tick-opacity,.45);background:linear-gradient(90deg,color-mix(in srgb,var(--atlas-accent-pink) var(--index-tick-pink,var(--index-rest-pink,0%)),var(--atlas-text)),var(--atlas-text))}
#workspace-left #index-indicator button{position:relative}
#index-indicator .index-bookmark-mark{position:absolute;right:-3px;top:50%;transform:translateY(-50%);width:6px;height:8px;background:var(--atlas-accent-cyan);clip-path:polygon(0 0,100% 0,100% 100%,50% 65%,0 100%);pointer-events:none}
#index-indicator .index-bookmark-mark[hidden]{display:none}
#workspace-left #index-indicator button[data-bookmarked=true]::after{max-width:6px}
#index-position-label{pointer-events:auto;width:min(240px,calc(100vw - 24px));box-sizing:border-box}
#index-position-label .index-preview-link{color:var(--atlas-text);text-decoration:none;padding:3px 30px 3px 0}
#index-position-label .index-preview-link:hover{text-decoration:underline}
#index-position-label .index-preview-bookmark{position:absolute;top:7px;right:7px;display:grid;place-items:center;width:26px;height:26px;padding:0;margin:0;border:0;background:transparent;box-shadow:none;cursor:pointer}
#index-position-label .index-bookmark-symbol{display:inline-block;flex:none;width:9px;height:12px;background:var(--atlas-text-muted);clip-path:polygon(0 0,100% 0,100% 100%,50% 65%,0 100%)}
#index-position-label .index-preview-bookmark[aria-pressed=true] .index-bookmark-symbol{background:var(--atlas-accent-cyan)}
#index-position-label .index-preview-bookmark[hidden]{display:none}
/* Top-edge resizing complements the retained native bottom-right handle. */
#reference-viewer .ab-heading>button.window-float-button,#notes-pane .notes-window-header>button.window-float-button{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;margin:0;padding:0;border:0;background:transparent;box-shadow:none;box-sizing:border-box}
.window-float-button svg{display:block;width:20px;height:20px;margin:0;justify-self:center;align-self:center;pointer-events:none}
#notes-pane .notes-window-header,#reference-records .reference-heading,#reference-viewer .ab-heading{top:0}
#workspace-right .window-top-resizer{position:absolute;top:-10px;left:-9px;right:-9px;height:10px;z-index:8;display:grid;place-items:center;cursor:ns-resize;touch-action:none;user-select:none}
.window-top-resizer::after{content:'';width:36px;height:2px;border-radius:2px;background:var(--atlas-text-muted);opacity:.5}
.window-top-resizer:hover::after,.window-top-resizer:focus-visible::after{background:var(--atlas-accent-cyan);opacity:1}
.window-top-resizer:focus-visible{outline:1px solid var(--atlas-accent-cyan);outline-offset:-1px}
#workspace-right :is(.desk-docked,.reference-maximized) .window-top-resizer{display:none}
/* Yakushima: left title, right navigation, terrain before secondary details. */
.yakushima-navigation{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;text-align:left;flex-wrap:wrap}
.yakushima-title{flex:0 1 auto;min-width:0}
.yakushima-title>a{font-size:10px}
.yakushima-title h1{margin:3px 0;font-size:clamp(23px,2vw,30px)}
.yakushima-page-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:wrap;margin:0 0 0 auto}
.yakushima-page-actions :is(button,a){font-size:11px;padding:6px 8px;white-space:normal}
.yakushima-secondary-actions{margin-top:12px;font-size:11px}
.yakushima-description{font-size:11px;color:var(--atlas-text-muted)}
/* Desk has two columns. Existing windows are visually projected, never moved. */
#atlas-work-panel>#atlas-desk:not([hidden]){display:grid;grid-template-columns:minmax(280px,38%) minmax(0,1fr);gap:18px;overflow:hidden;padding:10px 0;min-height:0}
.desk-reference-column{display:flex;flex-direction:column;min-height:0;min-width:0}
.desk-reference-tabs{display:flex;gap:5px;flex-shrink:0;padding:0 0 8px}
.desk-reference-tabs>button{font-size:11px;padding:5px 9px}
.desk-reference-tabs>button[aria-pressed=true]{border-color:var(--atlas-accent-pink)}
#desk-reference-slot{flex:1;min-height:100px;min-width:0;border:1px solid var(--atlas-border);border-radius:12px}
.desk-main-column{min-width:0;overflow:auto;padding:2px 10px}
#atlas-desk .atlas-desk-grid>button{min-height:78px;font-size:11px;padding:10px}
/* Static positioning removes RP's sticky stacking context while Desk is open. */
body.atlas-desk-open #workspace-right{position:static!important;overflow:visible!important;z-index:auto!important}
body.atlas-desk-open #workspace-right>.reader,body.atlas-desk-open #workspace-right>.conversation{overflow:visible}
body.atlas-desk-open #workspace-right .desk-muted{visibility:hidden;pointer-events:none}
body.atlas-desk-open #workspace-right .desk-docked:not([hidden]){position:fixed!important;left:var(--desk-reference-left)!important;top:var(--desk-reference-top)!important;right:auto!important;bottom:auto!important;width:var(--desk-reference-width)!important;height:var(--desk-reference-height)!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;z-index:151!important;resize:none;animation:none;visibility:visible;pointer-events:auto;box-sizing:border-box;overflow:auto}
body.atlas-desk-open #workspace-right :is(.notes-floating,.reference-floating):not(.desk-docked):not(.desk-muted){z-index:152!important}
@media(max-width:640px){#atlas-work-panel>#atlas-desk:not([hidden]){grid-template-columns:minmax(0,1fr) minmax(140px,.65fr);gap:8px}.desk-reference-tabs{gap:2px}.desk-reference-tabs>button{font-size:10px;padding:4px}.desk-main-column{padding:2px}#atlas-desk .atlas-desk-grid{grid-template-columns:1fr}}

body.atlas-shell-ready:has(#central-world.atlas-hub.atlas-design-preview) #system-tools{padding:8px 9px;gap:3px}
body.atlas-desk-open.right-closed #workspace-right{display:grid!important}
body.atlas-desk-open.right-closed #workspace-right>:is(#system-tools,#atlas-ai),body.atlas-desk-open.right-closed #workspace-right .conversation-tabs{visibility:hidden}

/* Desktop keeps the saved columns; phone drawers never consume MP width.
   atlas-compact is the transient <=760px mode in workspace.js. */
body.atlas-shell-ready:not(.atlas-compact) .workspace-shell{display:grid;grid-template-columns:var(--left) 6px minmax(0,1fr) 6px var(--right)}
body.atlas-shell-ready:not(.atlas-compact):not(.reader-fullscreen) #workspace-right{position:relative;inset:auto;width:auto;height:100%;box-shadow:none}
body.atlas-shell-ready:not(.atlas-compact) #right-resizer{position:relative;inset:auto;width:auto;height:100%}
#compact-panel-backdrop{position:fixed;inset:var(--shell-header) 0 0;z-index:70;width:auto;height:auto;border:0;border-radius:0;margin:0;padding:0;background:rgba(4,8,16,.35);cursor:default}
#compact-panel-backdrop[hidden],body.atlas-browser-open #compact-panel-backdrop,body.atlas-work-open #compact-panel-backdrop{display:none}
body.atlas-compact .workspace-shell{display:block;min-width:0;width:100%}
body.atlas-compact .workspace-shell>main{width:100%;height:100%;min-width:0;box-sizing:border-box}
body.atlas-compact .width-resizer{display:none}
body.atlas-shell-ready.atlas-compact #workspace-left,body.atlas-shell-ready.atlas-compact #workspace-right{position:fixed;top:var(--shell-header);bottom:0;height:calc(100dvh - var(--shell-header));min-height:0;max-width:calc(100vw - 10px);box-sizing:border-box;z-index:80;box-shadow:0 8px 30px #0005}
body.atlas-shell-ready.atlas-compact #workspace-left{left:5px;right:auto;width:min(290px,calc(100vw - 10px));overflow-y:auto}
body.atlas-shell-ready.atlas-compact #workspace-right{left:auto;right:5px;width:min(320px,calc(100vw - 10px))}
body.atlas-shell-ready.atlas-compact.left-closed #workspace-left{display:none}
body.atlas-shell-ready.atlas-compact.reader-fullscreen #workspace-right{left:5px;right:5px;width:calc(100vw - 10px)}
body.atlas-compact #workspace-right .conversation-tabs{right:5px;width:min(320px,calc(100vw - 10px));max-width:calc(100vw - 10px)}
body.atlas-compact #index-scroll-frame{min-height:100px}
body.atlas-compact #atlas-header .hp-row{grid-template-columns:minmax(0,1fr)}
body.atlas-compact #atlas-header .hp-top{grid-template-columns:minmax(0,1fr) auto}
body.atlas-compact #atlas-header .hp-top>.brand-controls{grid-column:1;grid-row:1;gap:6px;padding:6px 4px 6px 8px}
body.atlas-compact #atlas-header .brand-controls #toggle-left{order:-1}
body.atlas-compact #atlas-header .hp-top>.header-right{grid-column:2;grid-row:1;padding:0 8px 0 4px}
body.atlas-compact #atlas-header .hp-top>.header-center,body.atlas-compact #atlas-header .header-navigation{display:none}
body.atlas-compact #atlas-header .top-actions{justify-content:flex-end;flex-wrap:nowrap;gap:4px}
body.atlas-compact #atlas-header .top-actions>button:not(#toggle-right){display:none}
body.atlas-compact #atlas-header #language{width:52px;min-width:0;height:30px;padding:4px 2px;font-size:11px}
body.atlas-compact #atlas-header .header-home{font-size:clamp(16px,5vw,20px);overflow:hidden;text-overflow:ellipsis}
body.atlas-compact #atlas-header .header-categories{padding:3px 10px}
body.atlas-compact.atlas-browser-open #atlas-header .browser-command-row{grid-template-columns:minmax(0,1fr) auto}
body.atlas-compact #browser-actions-host{grid-column:1;grid-row:1}
body.atlas-compact #browser-window-host{grid-column:2;grid-row:1}
body.atlas-compact #browser-navigation-host{grid-column:1/-1;grid-row:2;box-sizing:border-box;padding:3px 8px}
body.atlas-compact.atlas-browser-open #browser-tabs-host{grid-column:1;min-width:0;padding:3px 8px;box-sizing:border-box}
body.atlas-compact #notes-pane:not([hidden]),body.atlas-compact #reference-records:not([hidden]),body.atlas-shell-ready.atlas-compact #reference-viewer:not([hidden]){max-width:calc(100vw - 16px);min-width:0;min-height:min(220px,calc(100dvh - var(--shell-header) - 64px))}
body.atlas-compact #notes-pane.notes-floating:not([hidden]),body.atlas-shell-ready.atlas-compact #reference-viewer.reference-floating:not([hidden]){left:8px;top:calc(var(--shell-header) + 8px)}
body.atlas-compact #atlas-work-panel>#atlas-desk:not([hidden]){grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(180px,1fr) minmax(80px,.65fr);overflow:auto}

/* Unified language presentation, including lazily mounted apps. */
.atlas-language-control{position:relative;display:inline-flex;flex:0 0 56px;width:56px;vertical-align:middle;color:var(--atlas-text)}
.atlas-language-control[hidden]{display:none!important}
.atlas-language-control>select:is(#language,#work-panel-language,#mw-language,select){box-sizing:border-box;width:56px!important;min-width:56px!important;max-width:56px;height:30px;font:12px/1.4 var(--atlas-font);padding:4px;border:1px solid var(--atlas-border);border-radius:6px;background:var(--atlas-panel);color:transparent!important;cursor:pointer;appearance:none}
.atlas-language-control>select option{color:var(--atlas-text,#e6eef3);background:var(--atlas-panel,#1a202c)}

/* Rulebook: reuse the Atlas surfaces for controls; imagery/data keep their colors. */
body.atlas-shell-ready{--accent:var(--atlas-text);--line:var(--atlas-border);--atlas-hover-border:rgba(220,228,240,.35)}
body.atlas-shell-ready :is(#workspace-index,#header-shortcuts,.workspace-modes,.conversation-tabs,.earth-map-controls,.observation-controls) :is(a,button)[aria-current=page],
body.atlas-shell-ready :is(#workspace-index,.workspace-modes,.conversation-tabs,.earth-map-controls,.observation-controls) button[aria-pressed=true]{background:var(--atlas-panel);border-color:var(--atlas-border);color:var(--atlas-text)}
body.atlas-shell-ready .mk-real-bridge{background:var(--atlas-bg);border-color:var(--atlas-border);color:var(--atlas-text)}
body.atlas-shell-ready .mk-real-bridge a{color:#d1b798;background:transparent}
body.atlas-shell-ready :is(.map-controls,.observation-controls) :is(button,select,input){background:var(--atlas-panel);border-color:var(--atlas-border);color:var(--atlas-text)}
body.atlas-shell-ready :is(.map-controls,.observation-controls) button[aria-pressed=true]{border-color:#d1b798;color:#d1b798}
.atlas-language-code{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;font:12px/1.4 var(--atlas-font);color:var(--atlas-text)}
.atlas-language-code::after{content:none}
.atlas-language-control:focus-within{outline:2px solid var(--atlas-accent-cyan);outline-offset:2px;border-radius:6px}
#atlas-header #hp-apps{grid-column:3;grid-row:1;min-width:0;padding:0 8px}
body.atlas-shell-ready #atlas-header #system-tools{display:flex;flex-wrap:nowrap;gap:2px;padding:2px 0;border:0;overflow-x:auto;justify-content:flex-end}
/* Keep the HP app rail height independent of the page-specific preview styles. */
body.atlas-shell-ready #atlas-header #hp-apps #system-tools{padding-block:2px}
body.atlas-shell-ready #atlas-header #system-tools>button{flex:0 0 25px;width:25px;height:27px;min-height:27px;max-height:27px;padding:3px}
body.atlas-shell-ready #atlas-header #system-tools button svg,body.atlas-shell-ready #atlas-header #system-tools #system-browser svg{width:19px;height:19px}
#system-tools #app-settings{font-size:18px;color:var(--atlas-text-muted);margin-left:auto!important}
#atlas-header .hp-navigation>#browser-tabs-host{grid-column:1/-1;grid-row:2}
#atlas-header .hp-navigation>#browser-tabs-host:empty{display:none}
/* The expand/close controls share one silhouette and muted resting color. */
:is(#hp-right-expand,#hp-reference-full,#expand-work-panel,#mw-expand,.atlas-panel-expand){color:var(--atlas-text-muted,#9ca3af)!important;font-size:0!important}
:is(#hp-right-expand,#hp-reference-full,#expand-work-panel,#mw-expand,.atlas-panel-expand)>svg{display:none!important}
:is(#hp-right-expand,#hp-reference-full,#expand-work-panel,#mw-expand,.atlas-panel-expand)::before{content:'';display:block;width:18px;height:18px;margin:auto;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5'/%3E%3C/svg%3E") center/contain no-repeat}
:is(#hp-right-expand,#hp-reference-full,#expand-work-panel,#mw-expand,.atlas-panel-expand)[aria-pressed=true]::before{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M3 9h6V3M15 3v6h6M21 15h-6v6M9 21v-6H3'/%3E%3C/svg%3E")}
:is(#hp-right-close,#hp-reference-close,#close-work-panel,#close-atlas-desk,#reference-close,#close-reader,#close-notes,#close-conversation,#browser-close,#mw-close){font-size:0!important;color:var(--atlas-text-muted,#9ca3af)!important}
:is(#hp-right-close,#hp-reference-close,#close-work-panel,#close-atlas-desk,#reference-close,#close-reader,#close-notes,#close-conversation,#browser-close,#mw-close)>svg{display:none!important}
:is(#hp-right-close,#hp-reference-close,#close-work-panel,#close-atlas-desk,#reference-close,#close-reader,#close-notes,#close-conversation,#browser-close,#mw-close)::before{content:'×';display:block;font:22px/1 Arial,sans-serif}
/* Desk opens on the right; its existing expand action unfolds the full workspace. */
body.atlas-desk-open:not(.atlas-work-expanded) #atlas-work-panel{left:auto;right:0;top:var(--shell-header);bottom:0;width:min(520px,calc(100vw - 12px));height:auto;box-sizing:border-box;border-radius:8px 0 0 8px}
body.atlas-desk-open:not(.atlas-work-expanded) #atlas-work-panel>#atlas-desk:not([hidden]){grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(160px,1fr) auto;overflow:auto}
body.atlas-desk-open:not(.atlas-work-expanded) #work-panel-resizer{display:none}
body.atlas-desk-open:not(.atlas-work-expanded) #atlas-desk .atlas-desk-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
body.atlas-desk-open:not(.atlas-work-expanded) #atlas-desk .atlas-desk-grid>button{min-height:50px}
body[data-atlas-tool=sandbox]:not(.atlas-work-expanded) #atlas-work-panel,body[data-atlas-tool=lab]:not(.atlas-work-expanded) #atlas-work-panel{left:auto;right:0;top:var(--shell-header);width:min(600px,calc(100vw - 12px));height:auto;box-sizing:border-box;border-radius:8px 0 0 8px}
@media(max-width:760px){
 #atlas-header #hp-apps{grid-column:1;grid-row:2;padding:2px 8px}
 body.atlas-shell-ready #atlas-header #system-tools{justify-content:flex-start}
 #atlas-header .hp-navigation>#browser-tabs-host{grid-row:3}
}

#atlas-authoring-host .atlas-language-control:has(>#mw-language){display:none}

:is(#tab-reference,[data-desk-window=viewer])::before{content:'';display:inline-block;width:14px;height:14px;vertical-align:-3px;margin-right:5px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M3 5h18v14H3zM8 9h8v6H8z'/%3E%3C/svg%3E") center/contain no-repeat}
:is(#tab-notes,[data-desk-window=notes])::before{content:'';display:inline-block;width:14px;height:14px;vertical-align:-3px;margin-right:5px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M5 3h14v18H5zM8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E") center/contain no-repeat}
:is(#tab-records,[data-desk-window=records])::before{content:'';display:inline-block;width:14px;height:14px;vertical-align:-3px;margin-right:5px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M4 4h6v16H4zM14 4h6v16h-6zM7 7v1M17 7v1'/%3E%3C/svg%3E") center/contain no-repeat}
body.atlas-work-open:not(.atlas-work-expanded):is(.atlas-desk-open,[data-atlas-tool=sandbox],[data-atlas-tool=lab]){--drawer-height:0px}
body.atlas-work-open:not(.atlas-work-expanded):is(.atlas-desk-open,[data-atlas-tool=sandbox],[data-atlas-tool=lab]) #atlas-work-panel{animation:atlas-open-right var(--atlas-shell-motion) ease-out}
@keyframes atlas-open-right{from{transform:translateX(24px);opacity:0}to{transform:translateX(0);opacity:1}}
@media(prefers-reduced-motion:reduce){body.atlas-work-open #atlas-work-panel{animation:none!important}}

#reference-float,#notes-float{color:var(--atlas-text-muted,#9ca3af)!important}

/* My Desk is the RP top app, independent from the work/editor lifecycle. */
body.atlas-shell-ready #workspace-right{grid-template-rows:auto 0 minmax(0,1fr) auto}
#workspace-right>#atlas-desk:not([hidden]){position:relative;inset:auto;display:block;grid-row:1;grid-column:1;width:auto;height:auto;min-height:0;max-height:45dvh;overflow:auto;padding:12px 10px;margin:0;border:0;border-bottom:1px solid var(--atlas-border);border-radius:0;background:var(--atlas-bg);z-index:auto;box-sizing:border-box;animation:none}
#workspace-right>#atlas-desk .desk-main-column{padding:0;overflow:visible}
#workspace-right>#atlas-desk .atlas-support-heading{margin:0 0 8px}
#workspace-right>#atlas-desk h2{font:400 19px/1.3 var(--atlas-font-display);margin:0;letter-spacing:.035em}
#workspace-right>#atlas-desk .desk-main-column>p{font-size:11px;margin:6px 0 10px;color:var(--atlas-text-muted)}
#workspace-right>#atlas-desk .atlas-desk-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#workspace-right>#atlas-desk .atlas-desk-grid>button{display:flex;flex-direction:column;align-items:flex-start;gap:9px;min-height:70px;padding:10px;font-size:11px}
#workspace-right>#atlas-desk .atlas-desk-home{display:inline-block;margin-top:8px;font-size:11px}
#workspace-right>#atlas-desk #wiki-desk-entry{display:none}
/* Browser stays within MP and leaves both side panels usable. */
body.atlas-browser-open #atlas-browser{left:var(--browser-mp-left,0px);right:auto;top:var(--shell-header);bottom:0;width:var(--browser-mp-width,100%);height:auto;box-sizing:border-box;overflow:auto;animation:none}
body.atlas-browser-open #atlas-header .browser-command-row{display:none!important}
body.atlas-browser-open #atlas-header #header-shortcuts{display:none!important}
body.atlas-browser-open #atlas-header .header-navigation{display:block}
#atlas-header .header-center>#browser-tabs-host{padding:0;width:auto;min-width:0;overflow:auto}
body.atlas-browser-open #browser-tabs-host .ab-tabs{align-items:center;min-height:28px;gap:5px}
body.atlas-browser-open #browser-tabs-host .ab-tab{flex:0 1 180px;border:1px solid var(--atlas-border);border-radius:5px;background:transparent;overflow:hidden}
body.atlas-browser-open #browser-tabs-host .ab-tab>button{height:26px;min-height:0;padding:3px 8px;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--atlas-text-muted);font:400 12px/1.4 var(--atlas-font)}
body.atlas-browser-open #browser-tabs-host .ab-tab>[aria-selected=true]{background:var(--atlas-panel);color:var(--atlas-text)}
body.atlas-browser-open #browser-tabs-host .ab-tab>.ab-tab-close{flex-basis:24px;min-width:24px;padding:3px 4px;font-size:13px}
body.atlas-browser-open #browser-tabs-host .ab-tab>button:hover{background:var(--atlas-active-surface);color:var(--atlas-text)}
body.atlas-browser-open #browser-navigation-host .ab-address input{font:400 12px/1.5 var(--atlas-font)}
body:not(.atlas-browser-open) #browser-tabs-host,body:not(.atlas-browser-open) #browser-window-host{display:none}
body.atlas-browser-open #browser-navigation-host{display:flex;max-width:none;margin:0;padding:0}
#browser-window-host .ab-heading{padding:0;gap:4px}
#browser-window-host #browser-world,#browser-window-host #browser-open-records{display:none}
body.atlas-browser-open #hp-right-expand,body.atlas-browser-open #hp-right-close{display:none}
body.atlas-browser-open #reference-viewer,body.atlas-browser-open #reference-records,body.atlas-browser-open #workspace-right>.conversation,body.atlas-browser-open #notes-pane{visibility:visible;pointer-events:auto}
#atlas-browser #browser-actions-host{flex:none;padding:0}
#atlas-browser.browser-compact .ab-frame:not([data-paper=portrait]):not([data-paper=landscape]){width:100%;aspect-ratio:16/9;height:auto;min-height:0;flex:none}
#atlas-browser .ab-views{overflow:visible;flex:none}
#atlas-browser .ab-view:not([hidden]){height:auto;min-height:0}
@media(max-width:760px){
 body.atlas-compact.atlas-browser-open #atlas-header .hp-top>.header-center{display:block;grid-column:1/-1;grid-row:2;padding:3px 8px}
 body.atlas-compact.atlas-browser-open #atlas-header .header-navigation{display:block;grid-column:1;grid-row:2}
 body.atlas-compact.atlas-browser-open #atlas-header #hp-apps{grid-row:3}
}

#workspace-right>#atlas-desk .atlas-support-heading{display:flex;align-items:center;justify-content:space-between}
body.atlas-shell-ready:not(.conversation-open) #reference-viewer:not(.reference-floating):not(.reference-maximized):not([style*="height"]):not([hidden]){top:var(--rp-desk-bottom,calc(var(--shell-header) + 12px));bottom:52px;height:auto;min-height:180px;max-height:none}
body.atlas-shell-ready #workspace-right>.reader{background:var(--atlas-bg)}

body.atlas-browser-open #atlas-header .top-actions>button{display:none!important}
body.atlas-browser-open.atlas-compact #atlas-header .top-actions>#toggle-right{display:block!important}

/* Settings shares the RP top slot with Desk; LP settings remain intact. */
#workspace-right>#rp-settings:not([hidden]){grid-column:1;grid-row:1;min-width:0;max-height:45dvh;overflow:auto;padding:12px 10px;border-bottom:1px solid var(--atlas-border);background:var(--atlas-bg);box-sizing:border-box}
#rp-settings[hidden]{display:none!important}
#rp-settings .atlas-support-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
#rp-settings h2{margin:0;font:400 20px/1.3 var(--atlas-font-display)}
#rp-settings .atlas-support-heading>button{color:var(--atlas-text-muted);font-size:20px;padding:2px 7px}
#rp-settings :is(p,summary,label,button){font-size:11px;overflow-wrap:anywhere}
#rp-settings details{padding:10px 0;border-bottom:1px solid var(--atlas-border)}
#rp-settings input{max-width:100%;font-size:10px}
/* Fit the desktop page width and use all remaining monitor height. */
body.atlas-browser-open #atlas-browser{overflow:hidden}
:is(#atlas-browser,#reference-viewer).browser-compact .ab-content{container-type:size;overflow:hidden!important;min-height:0;flex:1;width:100%;position:relative}
:is(#atlas-browser,#reference-viewer).browser-compact .ab-view:not([hidden]){position:relative;height:100%!important;min-height:0!important;max-height:100%;overflow:hidden;box-sizing:border-box;padding-bottom:30px}
:is(#atlas-browser,#reference-viewer).browser-compact .ab-frame{position:relative;flex:1 1 0!important;aspect-ratio:auto!important;height:auto!important;min-height:0!important;max-height:none!important;width:100%!important;border:0;outline:1px solid var(--atlas-border);align-self:center}
:is(#atlas-browser,#reference-viewer) .ab-frame iframe[data-desktop-fit]{transform-origin:top left;max-width:none;max-height:none;color-scheme:dark}
:is(#atlas-browser,#reference-viewer) .ab-frame :is(video,iframe):not([data-desktop-fit]){position:absolute;inset:0;width:100%;height:100%;min-height:0}
.browser-compact .ab-details{position:absolute;left:0;right:0;bottom:0;z-index:3;margin:0!important;padding:5px 8px;background:var(--atlas-bg);border-top:1px solid var(--atlas-border);box-sizing:border-box}
.browser-compact .ab-details>summary{cursor:pointer;color:var(--atlas-text-muted)}
.browser-compact .ab-details[open]{max-height:calc(100% - 12px);overflow:auto;box-shadow:0 -8px 24px #0004;border-radius:8px 8px 0 0}
.browser-compact .ab-details[open]>summary{position:sticky;top:-5px;background:var(--atlas-bg);padding:5px 0}

/* The monitor and its compact footer fill the existing window. */
:is(#atlas-browser,#reference-viewer).browser-compact .ab-view:not([hidden]){background:transparent;border:0;padding:0;gap:4px}
.browser-compact .ab-details:not([open]){position:relative;left:auto;right:auto;bottom:auto;width:100%;flex:none}

/* Match the rail to the Atlas surface so it does not form a visible strip.
   Set the standard track color too: Chromium may prefer it over WebKit rules. */
html,body,body :where(*){scrollbar-width:thin;scrollbar-color:rgba(125,139,160,.28) var(--atlas-bg,#121620)}
::-webkit-scrollbar{width:5px;height:5px;background:var(--atlas-bg,#121620)}
::-webkit-scrollbar-track,::-webkit-scrollbar-track-piece,::-webkit-scrollbar-corner{background:var(--atlas-bg,#121620);border:0;box-shadow:none}
body ::-webkit-scrollbar-thumb{background:rgba(125,139,160,.28);border-radius:8px}
:is(#atlas-browser,#reference-viewer,#rp-settings,#workspace-right,#workspace-left,.ab-details)::-webkit-scrollbar-thumb{background:rgba(125,139,160,.28)}
body ::-webkit-scrollbar-thumb:hover{background:rgba(125,139,160,.45)}

/* Leave external scrollbar tracks and thumbs visible and interactive. */

/* Isolated Information Real / Virtual Real observatory. */
body.planet-open .workspace-shell>main:has(#central-world.space-watch-page){overflow:hidden}
#central-world.space-watch-page{height:100%;min-height:480px;padding:0;overflow:hidden}
#central-world.space-watch-page>iframe{display:block;border:0;width:100%;height:100%;min-height:480px}

/* Right-edge expansion, shared by Lab, Sandbox, My Desk and Settings. */
#hp-right-expand{display:none!important}
body.atlas-side-work{--drawer-height:0px!important}
body.atlas-side-work #atlas-work-panel.atlas-side-panel:not([hidden]),
body.atlas-shell-ready #workspace-right>:is(#atlas-desk,#rp-settings).atlas-side-expanded:not([hidden]){
 position:fixed;left:auto!important;right:0;top:var(--shell-header);bottom:0;width:min(var(--atlas-side-width,600px),calc(100vw - 12px));height:auto!important;max-height:none!important;min-height:0;box-sizing:border-box;z-index:150;border:1px solid var(--atlas-border);border-right:0;border-radius:8px 0 0 8px;animation:atlas-open-right var(--atlas-shell-motion) ease-out;
}
body.atlas-side-work #atlas-work-panel.atlas-side-panel{padding-left:18px}
body.atlas-side-work #work-panel-resizer.atlas-side-resizer,
#workspace-right>:is(#atlas-desk,#rp-settings)>.atlas-side-resizer{
 position:absolute;left:0;top:0;bottom:0;width:8px;height:auto;min-height:0;margin:0;padding:0;display:grid;place-items:center;cursor:ew-resize;touch-action:none;z-index:2;
}
body.atlas-side-work #work-panel-resizer::after,#workspace-right .atlas-side-resizer::after{content:'';width:3px;height:56px;background:var(--atlas-text-muted);opacity:.6;border-radius:3px}
#workspace-right>:is(#atlas-desk,#rp-settings):not(.atlas-side-expanded)>.atlas-side-resizer{display:none}
.atlas-side-resizing{user-select:none}
.atlas-side-resizing::after{content:'';position:absolute;inset:0;z-index:1;cursor:ew-resize}
.atlas-side-resizer:focus-visible{outline:2px solid var(--atlas-accent-cyan);outline-offset:-2px}
.atlas-support-heading>.atlas-panel-expand{margin-left:auto}
@media(prefers-reduced-motion:reduce){.atlas-side-expanded{animation:none!important}}

/* Foreground order only: preserve every window and navigation rectangle. */
body.atlas-shell-ready #workspace-right,
body.atlas-shell-ready #workspace-right>.reader,
body.atlas-shell-ready #workspace-right>.conversation{z-index:auto}
body.atlas-shell-ready #workspace-right .conversation-tabs{z-index:174}
body.atlas-shell-ready #workspace-right :is(#reference-viewer,#notes-pane,#reference-records):not([hidden]){z-index:171}
body.atlas-shell-ready #workspace-right :is(.notes-floating,.reference-floating):not([hidden]){z-index:172!important}
body.atlas-shell-ready[data-rp-window=browser] #workspace-right #reference-viewer:not([hidden]),
body.atlas-shell-ready[data-rp-window=notes] #workspace-right #notes-pane:not([hidden]),
body.atlas-shell-ready[data-rp-window=records] #workspace-right #reference-records:not([hidden]){z-index:173!important}

/* 2026-10-08: compact full-name language control, navy turning faces. */
.atlas-language-control{width:78px;flex:0 0 78px;perspective:400px}
.atlas-language-control>select:is(#language,#work-panel-language,#mw-language,select){width:78px!important;min-width:78px!important;max-width:78px;height:24px!important;min-height:24px!important;padding:2px!important;margin:0;background:#182337;border-color:#35425a;border-radius:4px}
.atlas-language-code{font:10px/24px var(--atlas-font,system-ui)!important;justify-content:center;padding:0!important;background:#182337;border-radius:4px;transform-style:preserve-3d;transform-origin:center center -12px;transition:transform .4s;box-shadow:inset 0 1px 0 #ffffff18}
.atlas-language-code::after{content:attr(data-text)!important;position:absolute;inset:0;display:grid;place-items:center;background:#23324b;color:inherit;border-radius:4px;transform-origin:bottom;transform:translateY(-100%) rotateX(90deg);backface-visibility:hidden}
.atlas-language-control:hover .atlas-language-code,.atlas-language-control:focus-within .atlas-language-code{transform:rotateX(-90deg)}
.atlas-language-control.language-direct>select{display:none}
.atlas-language-control>.atlas-language-toggle{position:relative;box-sizing:border-box;width:78px;height:24px;min-height:24px;padding:2px;margin:0;border:1px solid #35425a;border-radius:4px;background:#182337;color:var(--atlas-text)}
.atlas-language-control.language-direct>.atlas-language-code{z-index:1}
.atlas-language-control.language-committed>.atlas-language-code{transform:none}
.atlas-language-control>.atlas-language-toggle:not(:disabled),#mini-language-toggle:not(:disabled){cursor:pointer}
#atlas-header .atlas-language-control>.atlas-language-toggle{width:100%;min-width:100%;max-width:none;flex:0 0 100%}
@media(prefers-reduced-motion:reduce){.atlas-language-control .atlas-language-code{transition:none;transform:none}}

/* Reference controls stay in the title row; the monitor has a quiet outline. */
#reference-records .reference-heading>button{height:28px;min-width:28px;padding:2px 6px;line-height:1}
#reference-records #new-source{display:none!important}
#reference-records #expand-reader{width:28px;height:28px;min-width:28px;flex:0 0 28px;box-sizing:border-box;padding:0!important;display:grid;place-items:center}
#reference-records #expand-reader>svg{width:20px;height:20px;display:block;margin:0}
#reference-records .reference-heading #wiki-reference-entry{display:flex;flex:0 0 auto;margin:0;padding:0;border:0}
#reference-records .reference-heading #wiki-reference-entry[hidden]{display:none!important}
#wiki-reference-entry>button{display:grid;place-items:center;width:28px;height:28px;min-width:28px;padding:0;line-height:1}
#wiki-reference-entry>button>svg{width:18px;height:18px}
#reference-viewer .ab-empty{flex:0 0 auto;width:100%;box-sizing:border-box;outline:1px solid color-mix(in srgb,var(--atlas-border) 55%,transparent);background:transparent}
#reference-viewer.browser-compact .ab-frame{outline-color:color-mix(in srgb,var(--atlas-border) 55%,transparent)}

/* Center the existing close glyph independently of the hidden text node. */
:is(#close-reader,#close-conversation){position:relative;padding:0!important}
:is(#close-reader,#close-conversation)::before{position:absolute;inset:0;display:grid;place-items:center}

/* A shallow raised surface for the three reference navigation buttons only. */
/* Keep each button opaque even when shared hover/active styles use alpha. */
#workspace-right .conversation-tabs>button{background-color:var(--atlas-bg)!important;box-shadow:inset 0 1px 0 #ffffff0c,0 2px 3px #0005;transition:box-shadow 100ms ease}
#workspace-right .conversation-tabs>button:active{box-shadow:inset 0 1px 3px #0005,0 1px 1px #0003}
@media(prefers-reduced-motion:reduce){#workspace-right .conversation-tabs>button{transition:none}}

/* Shared destinations below the tab-filtered INDEX. */
#atlas-header .header-categories{padding-inline:8px}
#atlas-header #atlas-category-nav{gap:4px}
#atlas-header #atlas-category-nav a{padding-inline:3px}
#workspace-index .atlas-top-index>li[hidden]{display:none}
#atlas-outside{flex:0 0 auto;padding:6px 0;border-top:1px solid var(--atlas-border);font:11px/1.7 var(--atlas-font)}
#atlas-outside h2{font:400 10px/1.5 var(--atlas-font);letter-spacing:.1em;margin:0 0 4px;color:var(--atlas-text-muted)}
#atlas-outside ul{list-style:none;margin:0;padding:0}
#atlas-outside .index-row a,#atlas-outside .index-action button{display:block;font:inherit;text-align:left;color:var(--atlas-text-muted);padding:3px 7px;border:0;background:transparent}

/* External scrollbar colors remain unobscured. */
#reference-viewer .ab-details[open]{scrollbar-width:auto;scrollbar-color:#8c98ab var(--atlas-bg)}
#hidden-live-status,#reference-live-status{display:none}

/* Radio-like keys: stable slots, including Sleep/Open and the external link. */
:root{--atlas-nav-key-size:30px;--atlas-action-key-width:42px;--atlas-key-gap:3px}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions{--atlas-nav-key-size:22px;--atlas-action-key-width:24px;--atlas-key-gap:2px}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions{position:relative;display:flex;flex-wrap:nowrap;gap:var(--atlas-key-gap);width:max-content;max-width:100%;margin:0;align-items:stretch}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>:is(button,a,.ab-help,.ab-details),
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>:is(.ab-help,.ab-details)>summary{box-sizing:border-box;flex:0 0 var(--atlas-action-key-width);width:var(--atlas-action-key-width);min-width:0;height:var(--atlas-nav-key-size);min-height:var(--atlas-nav-key-size);margin:0;padding:0;display:grid;place-items:center;border:1px solid var(--atlas-border);border-radius:4px;background:var(--atlas-panel);color:var(--atlas-text);font:9px/1 var(--atlas-font);text-decoration:none;box-shadow:inset 0 1px 0 #ffffff0a,0 2px 0 #0003;cursor:pointer}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>:is(.ab-help,.ab-details){position:static;left:auto;right:auto;bottom:auto;max-height:none;overflow:visible;border:0;box-shadow:none;background:transparent;display:block}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>:is(.ab-help,.ab-details)>summary::-webkit-details-marker{display:none}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>.ab-help>div{bottom:calc(var(--atlas-nav-key-size) + 4px);top:auto}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>.ab-promote svg{display:block;width:14px;height:14px;color:var(--atlas-accent-cyan)}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>:is(button,a):hover:not(:disabled),
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>:is(.ab-help,.ab-details)>summary:hover{border-color:var(--atlas-hover-border)}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>:is(button,a):active:not(:disabled),
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>:is(.ab-help,.ab-details)>summary:active{background:var(--atlas-active-surface);box-shadow:inset 0 2px 3px #0005}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>:is(.ab-help,.ab-details)>summary:focus-visible{outline:2px solid var(--atlas-text-muted);outline-offset:2px}

/* Tree and Viewer share the same navigation key dimensions and states. */
:is(#reference-viewer,#atlas-browser,#browser-navigation-host) .ab-toolbar>button,
#workspace-right #atlas-social .social-thread-navigation>button{box-sizing:border-box;flex:0 0 var(--atlas-nav-key-size);width:var(--atlas-nav-key-size);height:var(--atlas-nav-key-size);min-height:var(--atlas-nav-key-size);margin:0;padding:0;border:1px solid var(--atlas-border);border-radius:5px;background:var(--atlas-panel);color:var(--atlas-text);font:14px/1 var(--atlas-font);box-shadow:inset 0 1px 0 #ffffff0a,0 2px 0 #0003}
#workspace-right #atlas-social .social-thread-navigation{gap:var(--atlas-key-gap)}
:is(#reference-viewer,#atlas-browser,#browser-navigation-host) .ab-toolbar>button:disabled,
#workspace-right #atlas-social .social-thread-navigation>button:disabled{opacity:.4;cursor:default}
:is(#reference-viewer,#atlas-browser,#browser-navigation-host) .ab-toolbar>button:active:not(:disabled),
#workspace-right #atlas-social .social-thread-navigation>button:active:not(:disabled){background:var(--atlas-active-surface);box-shadow:inset 0 2px 3px #0005}
#workspace-right #atlas-social .social-thread-navigation>button:hover:not(:disabled){border-color:var(--atlas-hover-border)}
#workspace-right #atlas-social .social-thread-navigation>button:focus-visible{outline:2px solid var(--atlas-text-muted);outline-offset:2px}

/* Use the spare space beside Browser tabs, leaving the monitor unobstructed. */
body.atlas-browser-open #atlas-header .hp-top>.header-center{display:flex;flex-direction:row;align-items:center;gap:10px;overflow:visible}
#atlas-header .header-center>#browser-tabs-host{flex:1 1 0;min-width:0}
#atlas-header .header-center>#browser-actions-host{flex:0 0 auto;width:auto;min-width:0;padding:0;margin-left:auto}
#browser-actions-host [hidden]{display:none!important}
body:not(.atlas-browser-open) #browser-actions-host{display:none}
#browser-actions-host .ab-source-actions>.ab-help>div{top:calc(var(--atlas-nav-key-size) + 4px);bottom:auto;z-index:200}

/* Shared compact action row; the percentage is one value between minus and plus. */
:is(#reference-viewer,#atlas-browser,#browser-tabs-host) .ab-tab-row{display:flex;align-items:center;gap:6px;flex:0 0 auto;min-width:0;width:100%}
:is(#reference-viewer,#atlas-browser,#browser-tabs-host) .ab-tab-row>.ab-tabs{flex:1 1 0;min-width:0;width:auto}
:is(#reference-viewer,#atlas-browser,#browser-tabs-host,#browser-actions-host) .ab-zoom{display:grid;grid-template-columns:16px 32px 16px;align-items:center;flex:0 0 66px;box-sizing:border-box;width:66px;height:22px;margin:0;padding:0;border:1px solid var(--atlas-border);border-radius:4px;background:var(--atlas-panel);color:var(--atlas-text);box-shadow:inset 0 1px 0 #ffffff0a,0 2px 0 #0003}
:is(#reference-viewer,#atlas-browser,#browser-tabs-host,#browser-actions-host) .ab-zoom>button{display:grid;place-items:center;box-sizing:border-box;min-width:0;width:100%;height:20px;margin:0;padding:0;border:0;border-radius:3px;background:transparent;color:inherit;font:9px/1 var(--atlas-font);font-variant-numeric:tabular-nums;white-space:nowrap;cursor:pointer}
:is(#reference-viewer,#atlas-browser,#browser-tabs-host,#browser-actions-host) .ab-zoom>button:is(:first-child,:last-child){font-size:12px}
:is(#reference-viewer,#atlas-browser,#browser-tabs-host,#browser-actions-host) .ab-zoom>button:hover:not(:disabled){background:var(--atlas-active-surface)}
:is(#reference-viewer,#atlas-browser,#browser-tabs-host,#browser-actions-host) .ab-zoom>button:disabled{opacity:.4;cursor:default}
:is(#reference-viewer,#atlas-browser,#browser-tabs-host,#browser-actions-host) .ab-zoom>button:focus-visible{outline:1px solid var(--atlas-text-muted);outline-offset:-1px}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>.ab-details{order:0;margin:0!important;padding:0;flex:0 0 var(--atlas-action-key-width);width:var(--atlas-action-key-width);font:10px/1.3 var(--atlas-font)}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>.ab-details>summary{position:static;top:auto;margin:0;padding:0;list-style:none;cursor:pointer}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>.ab-details>summary::before,
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions>.ab-details>summary::after{content:none}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-details>summary>svg{display:block;width:14px;height:14px}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-details-body{position:absolute;left:0;bottom:calc(var(--atlas-nav-key-size) + 4px);z-index:200;box-sizing:border-box;width:min(320px,100cqw);max-height:calc(100cqh - 30px);overflow:auto;padding:10px;border:1px solid var(--atlas-border);border-radius:8px;background:var(--atlas-bg);box-shadow:0 8px 20px #0005;overflow-wrap:anywhere}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-source-actions .ab-details:not([open])>.ab-details-body{display:none}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-details-body h2{margin:0 0 8px;font:400 16px/1.3 var(--atlas-font-display)}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-details-body .ab-note{display:block}
:is(#reference-viewer,#atlas-browser,#browser-actions-host) .ab-details-body textarea{box-sizing:border-box;width:100%;max-width:100%;min-height:72px;font:11px/1.5 var(--atlas-font)}
#browser-actions-host .ab-header-tools{display:flex;align-items:center;min-width:0}
#browser-actions-host .ab-source-actions{flex:none}
#browser-actions-host .ab-details-body{left:auto;right:0;top:calc(100% + 4px);bottom:auto;width:min(320px,80vw);max-height:60dvh}
#reference-viewer .ab-source-actions>.ab-help>div{right:0;width:min(260px,100cqw);max-height:calc(100cqh - 30px)}
#workspace-right #reference-viewer.browser-compact:not(.reference-floating):not(.reference-maximized){min-height:min(calc((var(--right,300px) - 44px)*9/16 + 204px),calc(100dvh - var(--shell-header) - 218px))!important}

/* Fixed Tree base; shared Lab/Sandbox frame retains its mode switching. */
#right-resizer{display:none!important}
body.atlas-shell-ready[data-atlas-tool=lab] #atlas-work-panel.atlas-side-panel{z-index:150}
body.atlas-shell-ready[data-atlas-tool=sandbox] #atlas-work-panel.atlas-side-panel{z-index:151}

/* RP utility apps overlay the permanent Tree without hiding it. */
body.atlas-shell-ready #workspace-right>:is(#atlas-desk,#rp-settings):not(.atlas-side-expanded):not([hidden]){
 position:fixed;top:var(--shell-header);right:0;left:auto;bottom:auto;width:var(--right);max-height:min(45dvh,calc(100dvh - var(--shell-header) - 52px));z-index:130;
}
body.atlas-shell-ready.atlas-compact #workspace-right>:is(#atlas-desk,#rp-settings):not(.atlas-side-expanded):not([hidden]){right:5px;width:min(320px,calc(100vw - 10px))}

/* My Desk has a fixed bottom grip and independently scrolling contents. */
body.atlas-shell-ready #workspace-right>#atlas-desk:not(.atlas-side-expanded):not([hidden]){display:flex;flex-direction:column;height:var(--desk-height,auto);max-height:calc(100dvh - var(--shell-header) - 52px);overflow:hidden;padding-bottom:0}
#workspace-right>#atlas-desk:not(.atlas-side-expanded)>.desk-main-column{flex:1 1 auto;min-height:0;overflow:auto;padding-bottom:8px}
#atlas-desk>.desk-bottom-resizer{flex:0 0 10px;min-height:10px;display:grid;place-items:center;cursor:ns-resize;touch-action:none;user-select:none}
#atlas-desk>.desk-bottom-resizer::after{content:'';width:36px;height:2px;background:var(--atlas-text-muted);border-radius:2px}
#atlas-desk>.desk-bottom-resizer:focus-visible{outline:1px solid var(--atlas-text-muted);outline-offset:-1px}
#atlas-desk.atlas-side-expanded>.desk-bottom-resizer{display:none}
#atlas-desk.desk-height-resizing{user-select:none}

#workspace-left.atlas-index-split>#index-scroll-frame{flex:0 0 var(--atlas-index-height);height:var(--atlas-index-height);min-height:0}
.atlas-index-lower{flex:1 1 0;min-height:0;overflow:auto;scrollbar-width:thin}
.atlas-index-splitter{height:12px;flex:0 0 12px;cursor:row-resize;touch-action:none;display:flex;align-items:center;justify-content:center;user-select:none}
.atlas-index-splitter::after{content:'';width:36px;height:3px;border-radius:2px;background:var(--atlas-text-muted);opacity:.5}
.atlas-index-splitter:hover::after{opacity:1}
.atlas-index-splitter:focus-visible{outline:1px solid var(--atlas-text-muted)}

#browser-navigation-host .ab-address>button,#reference-viewer .ab-address>button{display:grid;place-items:center;padding:0;line-height:1}
#browser-navigation-host .ab-address>button>svg,#reference-viewer .ab-address>button>svg{display:block;margin:0;width:16px;height:16px}
#browser-navigation-host .ab-address,#reference-viewer .ab-address{position:relative;display:flex;gap:0}
#browser-navigation-host .ab-address>input,#reference-viewer .ab-address>input{flex:1;min-width:0;width:100%;box-sizing:border-box;padding-right:34px}
#atlas-header #browser-navigation-host .ab-address>button,#reference-viewer .ab-address>button{position:absolute;right:1px;top:1px;bottom:1px;display:grid;place-items:center;width:30px;min-width:30px;height:auto;min-height:0;margin:0;padding:0;border:0;background:transparent;box-shadow:none;cursor:pointer}

/* Tweet Tree scope uses the same quiet picker palette as chart actions. */
#atlas-social select[aria-label="Feed scope"]{color-scheme:dark}
#atlas-social select[aria-label="Feed scope"]:focus-visible{outline:1px solid #697386;outline-offset:1px}
#atlas-social select[aria-label="Feed scope"] option{background:#11151e;color:#d1d5de}
@supports (appearance:base-select){
 #atlas-social select[aria-label="Feed scope"],#atlas-social select[aria-label="Feed scope"]::picker(select){appearance:base-select}
 #atlas-social select[aria-label="Feed scope"]::picker(select){background:#11151e;color:#d1d5de;border:1px solid #373f4e;border-radius:6px;padding:3px;box-shadow:0 6px 16px #0005}
 #atlas-social select[aria-label="Feed scope"] option{padding:6px 9px;border-radius:3px}
 #atlas-social select[aria-label="Feed scope"] option:checked{background:#252d3b;color:#eef0f4}
 #atlas-social select[aria-label="Feed scope"] option:is(:hover,:focus){background:#303a4b;color:#eef0f4;outline:none}
}

/* Shared approved five-pixel heading clearance. */
body.atlas-shell-ready #atlas-primary-index{padding-top:5px}
body.atlas-shell-ready #reference-viewer:not(.reference-floating):not(.reference-maximized) .ab-heading{padding-top:5px}
/* Keep category tabs on the header baseline, without negative overflow. */
#atlas-header .hp-navigation>.header-categories{min-height:0;height:auto;box-sizing:border-box;margin:0;align-self:stretch}
#atlas-header #atlas-category-nav{padding-bottom:1px;margin:0 0 -1px}

#atlas-header #atlas-category-nav a[aria-current=true]{border-bottom-color:transparent}
#atlas-header #atlas-category-nav a[aria-current=true]::after{bottom:-2px;height:3px}
