/* The same app navigation frames both garden views. World tools stay local. */
.gsf-world-shell {
    display:flex;
    flex-direction:column;
    height:var(--gsf-world-height,100dvh);
    min-height:0;
    background:var(--gsf-book-bg);
}
.gsf-world-shell > .gsf-topbar { flex:none; }
/* Account zone lives in shared navigation; guests keep their preview picker. */
.gsf-world-shell:has(.gsf-garden-views__zone) .gw-host .gw-zone-launch { display:none; }
/* The shared section bar is the single navigation for these records. */
.gsf-world-shell .gw-host .gw-connected-tabs,
.gsf-world-shell .gw-connected-body > .gw-connected-field { display:none; }
.gsf-world-shell .gw-host .gw-connected { z-index:50; top:12px; bottom:12px; }
.gsf-world-shell .gw-connected-heading { flex:none; }
.gsf-world-shell .gw-connected-heading > div { min-width:0; }
.gsf-world-shell .gw-connected-heading .gw-eyebrow { overflow-wrap:anywhere; }
.gsf-world-shell .gw-connected-heading > button { flex:none; min-width:44px; min-height:44px; }
.gsf-world-shell .gw-connected-body { min-height:0; overscroll-behavior:contain; }
.gsf-world-shell .gw-connected-footer { flex:none; }
@media(max-width:800px) {
    .gsf-world-shell .gw-host .gw-connected { inset:8px; width:auto; max-width:none; border-radius:12px; }
    .gsf-world-shell .gw-host .gw-connected-heading { padding:12px 16px; }
    .gsf-world-shell .gw-host .gw-connected-body { padding:16px; }
}
/* Page dialogs are siblings of the canvas and must share the app's stacking
   context. Isolating this stage traps even fullscreen modals below the topbar.
   The canvas remains contained by its own z-index below. */
.gsf-world-stage { position:relative; flex:1; min-height:0; }
.gsf-world-shell .gw-host {
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    z-index:0;
    --gw-shell-height:0px;
}
.gsf-world-shell .gw-host .gw-immersive .gw-main { top:0; }
.gsf-world-shell .gw-host .gw-immersive .gw-header {
    inset:18px 20px auto auto;
    width:auto;
    height:40px;
    padding:0;
    gap:6px;
    border:0;
    background:transparent;
    color:#eeeede;
}
.gsf-world-shell .gw-host .gw-immersive .gw-header-name { display:none; }
.gsf-world-shell .gw-host .gw-immersive .gw-header:has(.gw-world-settings[open]) { z-index:45; }
.gsf-world-shell .gw-host .gw-immersive .gw-header-actions { width:auto; margin:0; gap:0; }
.gsf-world-shell .gw-host .gw-header :is(.gw-zone-launch,.gw-save-launch),
.gsf-world-shell .gw-world-settings > summary {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    min-height:40px;
    margin:0;
    padding:8px 10px;
    border:1px solid #8aab7359;
    border-radius:8px;
    background:#203e2d;
    color:#eeeede;
    font:500 12px/1.3 Inter,"Segoe UI",sans-serif !important;
    white-space:nowrap;
}
.gsf-world-shell .gw-world-settings { position:relative; }
.gsf-world-shell .gw-world-settings > summary { list-style:none; cursor:pointer; }
.gsf-world-shell .gw-world-settings > summary::-webkit-details-marker { display:none; }
.gsf-world-shell .gw-world-settings > summary svg { width:16px; height:16px; }
.gsf-world-shell .gw-host :is(.gw-zone-launch,.gw-save-launch):hover,
.gsf-world-shell .gw-world-settings > summary:hover { background:#345139; }
.gsf-world-shell .gw-host .gw-world-settings .gw-world-toolstrip {
    position:absolute;
    inset:calc(100% + 8px) 0 auto auto;
    display:grid;
    width:210px;
    padding:7px;
    gap:2px;
    border:1px solid #526847;
    border-radius:10px;
    background:#243629;
    box-shadow:0 12px 30px #14251d40;
}
.gsf-world-shell .gw-host .gw-world-settings:not([open]) .gw-world-toolstrip { display:none; }
.gsf-world-shell .gw-host .gw-world-settings .gw-button {
    display:flex;
    flex-direction:row;
    justify-content:flex-start;
    min-height:42px;
    width:100%;
    padding:9px 12px;
    border:0;
    background:transparent;
    color:#eeeede;
}
.gsf-world-shell .gw-host .gw-world-settings .gw-button:hover { background:#3b5036; }
.gsf-world-shell .gw-host .gw-world-settings .gw-button > span { display:inline; font-size:13px; }
/* Area editing retains its own toolbar below the shared navigation. */
.gsf-world-shell .gw-host.gw-has-focus .gw-immersive .gw-header {
    inset:0 0 auto;
    height:54px;
    padding:7px 16px;
    justify-content:flex-end;
    background:#172b22;
}
.gsf-world-shell .gw-host.gw-has-focus .gw-immersive .gw-main { top:54px; }
@media(max-width:1100px) {
    .gsf-world-shell .gw-host .gw-immersive .gw-header { top:12px; right:12px; }
    .gsf-world-shell .gw-host:not(.gw-has-focus) .gw-garden-shortcuts { top:64px; left:12px; }
    .gsf-world-shell .gw-host:not(.gw-has-focus) .gw-immersive .gw-view-switch { top:12px; left:12px; transform:none; }
}
@media(max-width:900px) {
    .gsf-world-shell .gw-host .gw-immersive .gw-header { left:12px; justify-content:flex-end; }
    .gsf-world-shell .gw-host .gw-zone-launch { margin-right:auto; }
    .gsf-world-shell .gw-host:not(.gw-has-focus) .gw-view-menu-toggle { top:64px; right:12px; }
    .gsf-world-shell .gw-host:not(.gw-has-focus) .gw-view-panel { top:114px; }
    .gsf-world-shell .gw-host:not(.gw-has-focus) .gw-view-panel .gw-view-switch { position:static; transform:none; }
    .gsf-world-shell .gw-host.gw-has-focus .gw-immersive .gw-header { padding-inline:12px; }
}
@media(max-width:380px) {
    .gsf-world-shell .gw-world-settings > summary { font-size:11px !important; padding-inline:7px; }
    .gsf-world-shell .gw-world-settings > summary > svg:last-child { display:none; }
    .gsf-world-shell .gw-host .gw-zone-launch { max-width:124px; white-space:normal; text-align:left; }
    .gsf-world-shell .gw-host:not(.gw-has-focus,.gw-show-connected,.gw-show-library,.gw-show-details,.gw-show-guide,.gw-show-surroundings,.gw-is-survey,.gw-is-walking) .gw-garden-shortcuts { display:flex; }
}
@media(max-height:520px) and (max-width:1100px) {
    .gsf-world-shell .gw-host:not(.gw-has-focus) .gw-garden-shortcuts { top:64px; left:12px; }
    .gsf-world-shell .gw-host:not(.gw-has-focus) .gw-view-menu-toggle { top:64px; right:12px; }
    .gsf-world-shell .gw-host:not(.gw-has-focus) .gw-view-panel { top:114px; max-height:calc(100% - 126px); }
}
