/* The ☰ menu as one window (18.11.2026). Wide: sections beside the content, like Claude's settings. Phones: list, then a full-screen section. */
.menu-shell{padding:0;border:0;margin:auto;width:min(1040px,calc(100vw - 48px));height:min(720px,calc(100dvh - 48px));max-width:none;max-height:none;border-radius:var(--r-dialog,22px);background:var(--bg);color:var(--text);font-family:Heebo,system-ui,sans-serif;overflow:hidden;box-shadow:0 18px 48px rgba(7,23,31,.28)}
.menu-shell[open]{display:flex;flex-direction:column}
.menu-shell::backdrop{background:rgba(7,23,31,.45)}
.menu-shell button{font:inherit}
.ms-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px 14px 20px;border-bottom:1px solid var(--line);flex:none}
html[dir=ltr] .ms-top{padding:14px 20px 14px 16px}
.ms-top h2,.ms-pane-head h2{margin:0;font-size:20px;font-weight:600;color:var(--text)}
.ms-x{width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:22px;background:var(--track);color:var(--text);display:grid;place-items:center;cursor:pointer}
.ms-x svg{width:18px;height:18px;stroke-width:2}
html[dir=ltr] .ms-back svg{transform:scaleX(-1)}
.ms-main{flex:1;min-height:0;display:grid;grid-template-columns:272px minmax(0,1fr)}
.ms-nav{min-height:0;overflow-y:auto;padding:14px 12px 16px;border-inline-end:1px solid var(--line);display:flex;flex-direction:column;gap:10px}
.ms-nav>*{flex-shrink:0}
.ms-panes{min-height:0;overflow-y:auto;background:var(--bg)}

/* profile card at the top of the list */
.ms-profile{display:flex;align-items:center;gap:12px;width:100%;min-height:60px;padding:8px 12px;border:0;border-radius:var(--r-card,16px);background:var(--panel);color:var(--text);text-align:start;cursor:pointer}
.ms-profile-text{display:flex;flex-direction:column;min-width:0;flex:1}
.ms-profile-name{font-size:16px;font-weight:600;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ms-profile-sub{font-size:13px;color:var(--muted)}
.ms-avatar{width:40px;height:40px;flex:none;border-radius:50%;background:var(--action);color:var(--on-action,#fff);display:grid;place-items:center;font-size:16px;font-weight:600;overflow:hidden}
.ms-avatar img{width:100%;height:100%;object-fit:cover}
.ms-avatar.is-guest{background:var(--track);color:var(--muted)}
.ms-avatar svg{width:22px;height:22px}
.ms-avatar.lg{width:52px;height:52px;font-size:19px}

/* the surf | swim switch (calm-mode.js puts it in #msMode) */
#msMode:empty{display:none}
#menuShell .menu-mode{margin:0;padding:12px 14px 14px;gap:10px;border:0;border-radius:var(--r-card,16px);background:var(--panel);display:flex;flex-direction:column}
#menuShell .menu-mode .menu-lang-title{font-size:13px;font-weight:600;color:var(--muted)}
#menuShell .menu-mode .menu-lang-seg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;padding:3px;border-radius:12px;background:var(--track)}
#menuShell .menu-mode .menu-lang-seg button{height:44px;min-height:44px;gap:8px;border:0;border-radius:10px;background:transparent;color:var(--text-2);font-size:15px;display:inline-flex;align-items:center;justify-content:center}
#menuShell .menu-mode .menu-lang-seg button[aria-pressed=true]{background:var(--panel);color:var(--text);font-weight:600;box-shadow:0 1px 3px rgba(15,34,48,.12)}
#menuShell .menu-mode .menu-lang-seg button[data-mode=surf] img{width:24px;height:24px}
#menuShell .menu-mode .menu-lang-seg button[data-mode=calm] img{width:30px;height:20px}
#menuShell .menu-mode-desc{font-size:13px;line-height:1.5;color:var(--muted)}

/* list rows */
.ms-group{display:flex;flex-direction:column;gap:2px}
.ms-group+.ms-group,#msMode+.ms-group{border-top:1px solid var(--line);padding-top:10px}
.ms-item{position:relative;display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:0 12px;border:0;border-radius:12px;background:transparent;color:var(--text);font-size:15px;text-align:start;cursor:pointer}
.ms-item:hover{background:var(--row-hover)}
.ms-item[aria-current=page]{background:var(--panel);font-weight:600}
.ms-item>svg{width:20px;height:20px;flex:none;color:var(--muted)}
.ms-label{flex:1;min-width:0}
.ms-chev{display:none;margin-inline-start:auto;color:var(--chev,var(--muted))}
.ms-chev svg{width:16px;height:16px;display:block}
html[dir=ltr] .ms-chev svg{transform:scaleX(-1)}
.ms-profile .ms-chev{display:block}
.ms-count{min-width:22px;height:22px;padding:0 6px;box-sizing:border-box;border-radius:11px;background:#E8893A;color:#fff;font-size:13px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.ms-foot{margin:auto 0 0;padding:8px 12px 0;font-size:12px;color:var(--muted)}

/* sections */
.ms-pane{display:none;padding:22px 28px 32px;max-width:760px}
.ms-pane.on{display:block}
.ms-pane-head{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.ms-pane-head h2{font-size:22px;flex:1;min-width:0}
.ms-pane-head .ms-x{display:none}
.ms-pane-body.drawer-page-body{padding:0;gap:12px}
.ms-pane-body>.drawer-page-body{padding:0}
.ms-pane[data-sec=help]{max-width:none}
.ms-pane .ms-help .help-main{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;align-items:start}
.ms-pane .set-v3>h3:first-child,.ms-pane .set-v3>div:first-child>h3:first-child{margin-top:0}
.ms-pane .set-v3-units .urow:first-child{border-top:0;padding-top:0}
.ms-pane #drawerSettingsStatus{margin:0;font-size:13px;color:var(--muted);min-height:18px}
.ms-error{color:#B3261E}
body:not(.light) .ms-error{color:#FF8A80}

/* account and privacy */
.ms-card{background:var(--panel);border-radius:var(--r-card,16px);padding:16px}
.ms-account-head{display:flex;align-items:center;gap:14px}
.ms-account-head>div{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
.ms-account-name{font-size:18px;font-weight:600}
.ms-chip{font-size:12px;font-weight:600;border-radius:var(--r-chip,8px);padding:2px 8px;background:color-mix(in srgb,var(--action) 14%,var(--panel));color:var(--text)}
.ms-chip-pending{background:color-mix(in srgb,#E9B872 30%,var(--panel))}
.ms-chip-rejected{background:color-mix(in srgb,#E57B62 26%,var(--panel))}
.ms-note{margin:12px 0 0;font-size:14px;line-height:1.55;color:var(--text-2)}
.ms-note a{color:var(--accent)}
.ms-signin{margin-top:14px;min-height:48px;width:100%;border-radius:var(--r-ctl,12px)}
.ms-rows{padding:0 16px}
.ms-row{border-radius:0!important;box-shadow:none!important;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;width:100%;min-height:56px;padding:8px 0;border:0;background:transparent;color:var(--text);font-size:15px;text-align:start;cursor:pointer}
div.ms-row{cursor:default}
.ms-row+.ms-row{border-top:1px solid var(--line)}
.ms-row>svg{width:20px;height:20px;color:var(--muted)}
.ms-row .ms-chev{display:block}
.ms-row-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.ms-sub{font-size:13px;color:var(--muted)}
.ms-row input{min-height:44px;margin-top:4px;padding:0 12px;border:1px solid var(--line);border-radius:var(--r-ctl,12px);background:var(--bg);color:var(--text);font:inherit;font-size:15px}
.ms-link{min-height:44px;padding:0 4px;border:0;background:transparent;color:var(--accent);font-size:14px;font-weight:600;cursor:pointer}
.ms-status{flex-basis:100%;margin:0;font-size:13px;color:var(--muted)}
.ms-status:empty{display:none}
.ms-delete{padding:18px 4px 0}
.ms-delete-btn{min-height:44px;padding:0 4px;border:0;background:transparent;color:#B3261E;font-size:15px;font-weight:600;cursor:pointer}
body:not(.light) .ms-delete-btn{color:#FF8A80}
.ms-delete .ms-note{margin-top:0;font-size:13px;color:var(--muted)}
.ms-contact{margin-top:14px}
.ms-doc-back,.ms-link,.ms-delete-btn{background:transparent!important;border:0!important;box-shadow:none!important;width:auto!important}
.ms-doc-back{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0;border:0;background:transparent;color:var(--accent);font-size:14px;font-weight:600;cursor:pointer;align-self:flex-start}
.ms-doc-back svg{width:18px;height:18px}
html[dir=ltr] .ms-doc-back svg{transform:scaleX(-1)}
.ms-doc-title{margin:0;font-size:17px;font-weight:600}
.ms-doc{width:100%;height:calc(min(720px,100dvh - 48px) - 230px);min-height:360px;border:1px solid var(--line);border-radius:var(--r-card,16px);background:#fff}

/* phones and narrow windows: list first, then the section full screen */
@media(max-width:900px){
 .menu-shell{width:100vw!important;height:100dvh!important;max-width:none!important;max-height:100dvh!important;margin:0!important;border-radius:0!important;box-shadow:none}
 .ms-top{padding:10px 14px 10px 14px;border-bottom:0}
 .ms-main{display:block;position:relative;min-height:0;flex:1}
 .ms-nav{height:100%;box-sizing:border-box;border:0;padding:4px 14px max(20px,env(safe-area-inset-bottom));gap:12px}
 .menu-shell[data-view=pane] .ms-top,.menu-shell[data-view=pane] .ms-nav{display:none}
 .menu-shell:not([data-view=pane]) .ms-panes{display:none}
 .ms-panes{height:100%}
 .ms-pane{padding:0 14px max(28px,env(safe-area-inset-bottom));max-width:none}
 .ms-pane-head{position:sticky;top:0;z-index:2;margin:0 -14px 8px;padding:10px 14px;background:var(--bg)}
 .ms-pane-head .ms-x{display:grid}
 .ms-pane-head h2{font-size:20px}
 .ms-group{gap:0;padding:0;border-radius:var(--r-card,16px);background:var(--panel);overflow:hidden}
 .ms-group+.ms-group,#msMode+.ms-group{border-top:0;padding-top:0}
 .ms-item{min-height:52px;padding:0 16px;border-radius:0;font-size:16px}
 .ms-item+.ms-item::before{content:'';position:absolute;top:0;inset-inline:52px 0;border-top:1px solid var(--line)}
 .ms-item .ms-chev{display:block}
 .ms-item:hover{background:var(--row-hover)}
 .ms-foot{text-align:center;padding:4px 0 0}
 .ms-pane .ms-help .help-main{grid-template-columns:minmax(0,1fr)}
 .ms-doc{height:calc(100dvh - 190px)}
}

/* admin sections (stage 2) */
.ms-group-title{margin:0;padding:4px 12px 2px;font-size:13px;font-weight:600;color:var(--muted)}
.ms-item .ms-count{margin-inline-start:auto}
.ms-item .ms-count+.ms-chev{margin-inline-start:8px}
.ms-sub-title{margin:10px 0 0;font-size:17px;font-weight:600;color:var(--text)}
.ms-embed{width:auto!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;position:static!important;overflow:visible!important;display:block}
.ms-embed.admin-report{background:var(--panel)!important;border-radius:var(--r-card,16px)!important;padding:14px 16px!important}
.ms-all-reports{display:flex;flex-direction:column;gap:10px}
.dd-retired{display:none!important}
@media(max-width:900px){.ms-group-title{padding:12px 16px 4px}.ms-group-title+.ms-item::before{display:none}}
