/* v6.39.2: one navigational contract; never split names inside words. */
#sidebar #mainNav{flex:1 1 auto;min-height:0;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;scrollbar-width:thin;padding-right:2px;}
#mainNav .nav-area-group{min-width:0;display:grid;gap:0;}
#mainNav .nav-area-group[hidden]{display:none!important;}
#mainNav .nav-area-heading{min-width:0;display:flex;align-items:center;gap:2px;}
#mainNav .nav-area-link{min-width:0;min-height:46px;flex:1 1 auto;display:flex;align-items:center;gap:11px;padding:7px 4px 7px 11px;}
#mainNav .nav-area-link>.nav-icon{width:22px;min-width:22px;flex:none;}
#mainNav .nav-area-copy{display:flex;flex:1 1 auto;flex-direction:column;gap:3px;min-width:0;overflow:hidden;}
#mainNav .nav-area-label{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:normal;word-break:normal;font-size:12.5px;font-weight:600;line-height:1.3;}
#mainNav .nav-area-single{display:block;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--muted-2);line-height:1.3;}
#mainNav .nav-area-single[hidden],#mainNav .nav-area-toggle[hidden],#mainNav .nav-child[hidden]{display:none!important;}
#mainNav .nav-area-group[data-single=true] .nav-area-link{min-height:55px;}
#mainNav .nav-area-toggle{display:grid;place-items:center;flex:0 0 32px;width:32px;height:36px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--muted);cursor:pointer;transition:background-color .17s ease,color .17s ease,border-color .17s ease;}
#mainNav .nav-area-toggle:hover{background:var(--surface-2);border-color:var(--border-soft);color:var(--text);}
#mainNav .nav-area-toggle .nav-chevron{display:block;width:17px;height:17px;transform:rotate(-90deg);transition:transform .26s cubic-bezier(.2,.7,.2,1);}
#mainNav .nav-area-toggle[aria-expanded=true] .nav-chevron{transform:rotate(0deg);}
/* CSS transition instead of changing display:none: closed links become inert in JS. */
#mainNav .nav-area-children{min-width:0;box-sizing:border-box;display:grid;gap:2px;max-height:0;opacity:0;visibility:hidden;overflow:hidden;pointer-events:none;transform:translateY(-5px);margin:0 0 0 26px;padding:0 0 0 10px;border-left:1px solid transparent;transition:max-height .28s cubic-bezier(.2,.7,.2,1),opacity .2s ease,transform .25s ease,visibility 0s linear .28s,border-color .2s ease;}
#mainNav .nav-area-group.is-expanded .nav-area-children{max-height:240px;opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0);margin-bottom:5px;padding-bottom:5px;border-left-color:var(--border-soft);transition:max-height .28s cubic-bezier(.2,.7,.2,1),opacity .2s ease,transform .25s ease,visibility 0s,border-color .2s ease;}
#mainNav .nav-child{min-width:0;display:flex;align-items:center;gap:9px;min-height:35px;padding:7px 9px;border-radius:9px;color:var(--muted);font-size:12px;text-decoration:none;line-height:1.35;transition:background-color .17s ease,color .17s ease;}
#mainNav .nav-child:hover{background:var(--surface-2);color:var(--text);}
#mainNav .nav-child.active{background:var(--accent-soft);color:var(--text);font-weight:700;}
#mainNav .nav-child-dot{width:5px;height:5px;border-radius:50%;background:var(--border);flex:none;}
#mainNav .nav-child.active .nav-child-dot{background:var(--accent);}
#mainNav .nav-item.customize-link{margin-top:7px;border:1px dashed var(--border-soft);}
#mainNav :is(.nav-child,.nav-area-toggle,.nav-area-link):focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
/* Catalog: five actual groups rather than nine unrelated switches. */
.space-setup-layout{max-width:850px;margin:auto;display:grid;gap:16px;}
.space-setup-groups{display:grid;gap:12px;}
.space-setup-group{background:var(--surface);border:1px solid var(--border-soft);border-radius:17px;overflow:hidden;}
.space-setup-group[open]{border-color:var(--border);}
.space-setup-group summary{list-style:none;display:flex;align-items:center;gap:13px;padding:17px 19px;cursor:pointer;min-height:76px;}
.space-setup-group summary::-webkit-details-marker{display:none;}
.space-setup-group summary:focus-visible{outline:3px solid var(--accent);outline-offset:-3px;}
.space-setup-symbol{display:grid;place-items:center;flex:none;width:41px;height:41px;border-radius:12px;color:var(--accent);background:var(--accent-soft);font-size:22px;}
.space-setup-heading{display:grid;gap:4px;flex:1;min-width:0;}
.space-setup-heading b{font-size:15px;}
.space-setup-heading small{font-size:12px;color:var(--muted);}
.space-setup-chevron{display:block;flex:none;width:20px;height:20px;color:var(--muted);transform:rotate(0deg);transition:transform .26s cubic-bezier(.2,.7,.2,1);}
.space-setup-group[open] .space-setup-chevron{transform:rotate(180deg);}
.space-setup-options{padding:4px 14px 14px;border-top:1px solid var(--border-soft);display:grid;gap:6px;}
.space-setup-option{display:flex;align-items:center;gap:12px;min-height:67px;padding:10px 8px;border-radius:12px;cursor:pointer;}
.space-setup-option:hover{background:var(--surface-2);}
.space-setup-option>input{position:absolute;width:1px;height:1px;opacity:0;}
.space-setup-option:focus-within{outline:2px solid var(--accent);outline-offset:-2px;}
.space-setup-option-icon{width:34px;height:34px;flex:none;display:grid;place-items:center;background:var(--surface-2);border-radius:10px;color:var(--accent);font-size:19px;}
.space-setup-option-copy{flex:1;min-width:0;display:grid;gap:3px;}
.space-setup-option-copy b{font-size:13px;}
.space-setup-option-copy small{font-size:11px;color:var(--muted);line-height:1.4;}
.space-setup-option .module-switch{flex:none;}
.space-setup-option.selected .module-switch{background:var(--accent);border-color:var(--accent);}
.space-setup-option.selected .module-switch span{background:white;transform:translateX(19px);}
.space-setup-actions{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;}
@media(max-width:900px){
  /* Sections is an app screen with plainly visible destination names. */
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav{display:flex;flex-direction:column;gap:8px;overflow-y:auto;padding:5px 1px 12px;}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav>.nav-item:not([hidden]){min-height:43px;padding:10px 14px;flex-direction:row;gap:11px;justify-content:flex-start;text-align:left;font-size:13px;border-radius:13px;}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav>.nav-item .nav-icon{height:23px;width:25px;font-size:20px;}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav .nav-area-group:not([hidden]){display:block;border:1px solid var(--border-soft);border-radius:17px;background:var(--surface);padding:4px 7px 8px;}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav .nav-area-heading{min-height:52px;}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav .nav-area-link{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;min-height:50px;padding:9px 6px 9px 9px;background:transparent;border:0;border-radius:12px;text-align:left;gap:10px;flex:1;font-size:14px;}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav .nav-area-link .nav-icon{width:28px;height:28px;font-size:21px;}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav .nav-area-single{font-size:11px;white-space:nowrap;}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav .nav-area-toggle{width:42px;height:42px;}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav .nav-area-children{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;border:0;margin:0;padding:0;max-height:0;}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav .nav-area-group.is-expanded .nav-area-children{max-height:320px;margin:3px 0 0;padding:0 0 2px;}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav .nav-child:not([hidden]){display:flex;min-width:0;min-height:44px;background:var(--surface-2);border:1px solid var(--border-soft);border-radius:11px;justify-content:center;padding:9px;gap:7px;text-align:center;font-size:12px;}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav .nav-child.active{background:var(--accent-soft);border-color:rgba(var(--accent-rgb),.28);}
  body:not(.public-mode):not(.auth-mode) .sidebar #mainNav .nav-child span:last-child{overflow-wrap:anywhere;}
  .space-setup-group summary{padding:13px;min-height:66px;}
  .space-setup-options{padding:4px 10px 10px;}
  .space-setup-option{min-height:61px;}
  .space-setup-actions .btn{flex:1;min-height:44px;}
}
@media(prefers-reduced-motion:reduce){.space-setup-chevron,#mainNav .nav-area-toggle,#mainNav .nav-area-toggle .nav-chevron,#mainNav .nav-area-children,#mainNav .nav-child{transition:none!important;}#mainNav .nav-area-children{transform:none!important;}}

/* v6.40.1 — one reliable scroll container for iPhone/Android sections.
   styles.css historically sets .nav {overflow:visible!important}; without an
   important override, the entire launcher runs behind the fixed account card. */
@media (max-width:900px) {
  body:not(.public-mode):not(.auth-mode) #sidebar {
    box-sizing:border-box; display:flex; flex-direction:column;
    height:100dvh; max-height:100dvh; min-height:0; overflow:hidden;
  }
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav {
    display:flex;flex-direction:column;flex:1 1 0%;
    min-height:0;min-width:0;width:100%;
    overflow-x:hidden!important;overflow-y:auto!important;
    overscroll-behavior-y:contain;touch-action:pan-y;
    -webkit-overflow-scrolling:touch;scrollbar-width:thin;
    gap:9px!important;padding:4px 2px 20px;
  }
  /* Every top-level destination and sphere has the same full-width row. */
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav > .nav-item:not([hidden]),
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav > .nav-area-group:not([hidden]) {
    box-sizing:border-box;flex:0 0 auto;width:100%;min-width:0;margin:0;
    border:1px solid var(--border-soft);border-radius:17px;background:var(--surface);
    box-shadow:none;
  }
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav > .nav-item:not([hidden]) {
    min-height:58px;padding:12px 16px;display:flex;flex-direction:row;
    align-items:center;justify-content:flex-start;text-align:left;gap:13px;
    font-size:14px;font-weight:650;line-height:1.3;
  }
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav > .nav-item:not([hidden]) .nav-icon {
    width:28px;height:28px;font-size:21px;flex:none;
  }
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav > .nav-area-group:not([hidden]) {padding:3px 7px 4px;}
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-heading {
    min-height:54px;align-items:center;gap:2px;
  }
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-link {
    flex:1 1 auto;min-width:0;min-height:54px;padding:9px 8px;
    text-align:left;align-items:center;gap:12px;font-size:14px;
  }
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-copy {min-width:0;overflow:hidden;}
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-label {
    font-size:14px;font-weight:700;white-space:normal;overflow-wrap:normal;word-break:normal;
  }
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-toggle {
    flex:0 0 44px;width:44px;height:44px;border-radius:12px;
  }
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-children {
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;max-height:0;padding:0;margin:0;border:0;
  }
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-group.is-expanded .nav-area-children {
    max-height:330px;padding:2px 0 8px;margin:0;
  }
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-child:not([hidden]) {
    box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;
    min-height:47px;min-width:0;padding:9px 10px;gap:8px;
    text-align:left;font-size:12.5px;line-height:1.3;border-radius:11px;
    background:var(--surface-2);border:1px solid var(--border-soft);
  }
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-child span:last-child {word-break:normal;overflow-wrap:normal;}
  body:not(.public-mode):not(.auth-mode) #sidebar .sidebar-bottom {
    flex:0 0 auto;min-height:0;position:relative;margin:0;
    border-top:1px solid var(--border-soft);padding:10px 0 0;
    background:var(--bg);z-index:1;
  }
  body:not(.public-mode):not(.auth-mode) #sidebar .sidebar-account {min-height:60px;}
}
@media(max-width:350px){
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-children {grid-template-columns:1fr;}
}
@media(max-width:900px) and (max-height:610px){
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav > .nav-item:not([hidden]) {min-height:50px;padding:8px 12px;}
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-heading,
  body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-link {min-height:50px;}
  body:not(.public-mode):not(.auth-mode) #sidebar .brand {padding-bottom:6px;}
  body:not(.public-mode):not(.auth-mode) #sidebar .mobile-drawer-heading {padding-bottom:4px;}
}
@media(prefers-reduced-motion:reduce){.space-setup-chevron{transition:none!important;}}

/* v6.70 — calm list navigation, 44px mobile tap targets, less nested card chrome. */
#sidebar #navReorderButton{margin-top:7px;width:100%;text-align:left;background:none;color:var(--muted);border:1px solid var(--border-soft);font:inherit;cursor:pointer;}
#sidebar #navReorderButton:hover{color:var(--text);background:var(--surface-2)}
.nav-order-list{display:grid;gap:7px;margin:14px 0}
.nav-order-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;border:1px solid var(--border-soft);border-radius:12px;min-height:51px}
.nav-order-row>div{display:flex;gap:6px;flex:none}.nav-order-row button{min-width:38px;min-height:38px}
.nav-order-editor>p{color:var(--muted);font-size:13px;line-height:1.55}
@media(min-width:901px){
 #sidebar #mainNav{padding-top:8px;gap:2px}
 #sidebar #mainNav .nav-area-heading{min-height:42px}
 #sidebar #mainNav .nav-area-link{min-height:41px;padding:6px 6px 6px 10px}
 #sidebar #mainNav .nav-child{min-height:34px}
 #sidebar #mainNav .nav-area-group.is-expanded .nav-area-children{margin-bottom:2px}
}
@media(max-width:900px){
 body:not(.public-mode):not(.auth-mode) #sidebar #mainNav{gap:3px!important;padding:4px 0 14px!important}
 body:not(.public-mode):not(.auth-mode) #sidebar #mainNav>.nav-item:not([hidden]){min-height:44px;padding:8px 12px;border:0;border-radius:11px;font-size:13px}
 body:not(.public-mode):not(.auth-mode) #sidebar #mainNav>.nav-area-group:not([hidden]){border:0;background:transparent;border-radius:12px;padding:0 4px;box-shadow:none}
 body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-heading,
 body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-link{min-height:44px}
 body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-link{font-size:13px;padding:6px 7px;gap:8px}
 body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-label{font-size:13px}
 body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-link .nav-icon{width:24px;height:24px;font-size:19px}
 body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-children{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;max-height:0}
 body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-group.is-expanded .nav-area-children{padding:1px 0 5px;max-height:260px}
 body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-child:not([hidden]){min-height:44px;border:0;border-radius:9px;padding:6px 10px;font-size:12px;background:var(--surface-2);justify-content:flex-start}
 body:not(.public-mode):not(.auth-mode) #sidebar #mainNav .nav-area-toggle{width:44px;height:44px}
 body:not(.public-mode):not(.auth-mode) #sidebar #navReorderButton{display:none}
}

@media(min-width:901px){#sidebar #navReorderButton{flex:none;min-height:38px;border:1px dashed var(--border-soft);border-radius:11px;margin:0 2px 6px;padding:6px 11px;display:flex;gap:10px;align-items:center;font-size:12px}}
