/* Persistent application chrome shared by all three spaces. */
:root{--shell-top:150px;--shell-bottom:96px}
.topbar{z-index:90}
#cosmos-launch{gap:8px;align-items:center}
#cosmos-launch>button[aria-pressed=true]{background:#c7d9dc;color:#14202a;border-color:#b5ced4}
.shell-location{color:#b1c2ce;font-size:12px;margin:0 auto 0 8px;overflow-wrap:anywhere}
.shell-entity{display:flex;align-items:center;gap:8px;color:#a8bac8;font-size:12px;min-width:0}
.shell-entity select{width:230px;max-width:34vw;background:#15212d;color:#d5dfe7;border:1px solid #34444f;border-radius:7px;padding:8px;font:inherit}
.shell-utilities{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.shell-utilities{margin-left:auto}
.shell-utilities .cos-sound{white-space:nowrap}
.prefs{top:var(--shell-top);z-index:95}
#shell-status{position:relative}
#shell-status summary{padding:8px 12px;border:1px solid #34444f;border-radius:8px;background:#15212d;color:#d5dfe7;cursor:pointer;font-size:12px}
#shell-status #chips{position:absolute;top:100%;right:0;left:auto;transform:none;width:min(620px,85vw);max-width:none;padding:12px;background:#101923;border:1px solid #34444f;border-radius:10px;justify-content:flex-start;z-index:96}
#shell-status[open] #chips{display:flex!important}
.mode-contemplation #shell-status{display:none}
#cosmos-room{top:var(--shell-top);left:16px;right:16px;bottom:var(--shell-bottom);z-index:15;border:1px solid #34444f;border-radius:12px;grid-template-rows:minmax(0,1fr);overflow:hidden}
#cosmos-room>header{display:none}
#cosmos-room>main{grid-template-columns:minmax(0,1fr) 300px}
#cosmos-room aside{background:#101923;border-color:#34444f}
#cosmos-room aside .cos-couplings{margin:16px 0}
#cosmos-room aside .cos-couplings label{display:flex;gap:8px;align-items:center;margin:10px 0;color:#c3d3dd;font-size:12px}
#cosmos-room aside .cos-couplings input{accent-color:#a1c8b5}
body.cosmos-active #stage,body.cosmos-active #center-ya{visibility:hidden;pointer-events:none}
body[data-cosmos-space=tree] #cosmos-room>main{grid-template-columns:minmax(0,1fr)}
body[data-cosmos-space=tree] #cosmos-room>main>aside{display:none}
body.cosmos-active #panels .panel{background:#101923f5;border-color:#34444f}
body.center-on.cosmos-active #panels{display:block!important}
body.cosmos-active .prefs{z-index:95}
body.cosmos-active .modal{z-index:100}
@media(max-width:1400px){.shell-location{display:none}.shell-entity select{width:210px}}
@media(max-width:1100px){.shell-utilities{margin-left:0}.shell-entity select{max-width:45vw}}
@media(max-width:700px){#cosmos-room{left:8px;right:8px}#cosmos-room>main{grid-template-columns:minmax(0,1fr) 220px}.shell-entity{flex:1}.shell-entity select{width:100%;max-width:none}.shell-location{margin-left:0}.shell-utilities .btn{padding:6px 8px}}
@media(max-width:480px){#cosmos-room>main{grid-template-columns:1fr;overflow:auto}.shell-location{display:none}#cosmos-room .cos-stage{height:400px}body[data-cosmos-space=tree] #cosmos-room .cos-stage{height:100%}}

/* Readable relations at every camera scale; draft context stays dashed. */
#map .branch, #map .ray:not([filter]), #map .link { vector-effect: non-scaling-stroke; }
#map .branch { stroke-width: 1.25; }
#map .link { stroke: rgba(146, 203, 211, .48); stroke-width: 1.25; }
#map .link.draft { stroke: rgba(210, 188, 148, .34); stroke-dasharray: 2 6; }
#map .link.hot { stroke: #b4e0e4; stroke-width: 2; }

.map-structure-tools{display:flex;gap:6px;width:100%;justify-content:flex-end;border-top:1px solid #29343e;padding-top:6px}.map-structure-tools .icon-btn{width:auto;padding:6px 12px;font-size:12px}body.cosmos-active .map-structure-tools{display:none}
