/* Faymoo navigation 2: final presentation layer, after legacy styles. */
body.fmPremium{--fm-nav-height:72px;--fm-radius:18px}
.fmPremium *, .fmNavigationDialog *{box-sizing:border-box}
.fmLegacyTools[hidden],.fmHubRow[hidden],.fmHubSection[hidden],.fmNoResults[hidden],.fmSettingsPanel[hidden],.fmSettingsCategories[hidden],.fmSettingsProfileCard[hidden],.fmHubSearch[hidden]{display:none!important}
.fmPremium svg,.fmNavigationDialog svg{flex-shrink:0}
body.fmPremium.liveMode .app{grid-template-columns:110px 366px minmax(0,1fr);height:var(--visible-height,100dvh);padding:0}
body.fmPremium.liveMode .rail{display:flex;padding:24px 10px;background:var(--paper);border-right:1px solid var(--line)}
body.fmPremium.liveMode .rail #railNav{display:flex;flex-direction:column;gap:8px;margin-top:24px}
body.fmPremium.liveMode .rail .fmDestination{min-height:72px;display:flex;flex-direction:column;justify-content:center;gap:7px;font-size:12px;border-radius:18px;padding:12px 4px}
body.fmPremium.liveMode .rail .fmDestination svg{width:23px;height:23px}
body.fmPremium.liveMode #mobileNav{display:none}
body.fmPremium.liveMode .listHeader{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;padding:24px 18px 18px;min-width:0;background:var(--paper)}
body.fmPremium.liveMode .fmInboxBrand{font-size:28px;letter-spacing:-1px;margin-right:auto;line-height:1.1;flex-shrink:0}
body.fmPremium.liveMode .listHeader .fmToolsButton,body.fmSocialShell .fmToolsButton{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;width:auto;height:42px;min-height:42px;padding:9px 12px;border:1px solid var(--line);border-radius:14px;background:var(--paper);color:var(--ink);font-size:13px;font-weight:600;box-shadow:none}
.fmToolsButton svg{width:19px;height:19px}
body.fmPremium.liveMode #fmInboxCamera{display:none}
body.fmPremium.liveMode #newButton{display:flex;align-items:center;justify-content:center;gap:6px;width:42px;min-width:42px;height:42px;min-height:42px;border-radius:14px;padding:10px;margin:0;background:var(--accent);color:#fff;border:0;box-shadow:none}
body.fmPremium.liveMode #newButton svg{width:22px;height:22px}
body.fmPremium.liveMode #newButton span{display:none}
body.fmPremium.liveMode .searchBox{margin:0 18px 14px;padding:0;background:var(--bg);border:1px solid transparent;border-radius:14px;min-height:46px}
body.fmPremium.liveMode .searchBox input{min-height:46px;font-size:15px;padding-top:10px;padding-bottom:10px}
body.fmPremium.liveMode .fmFilters{display:flex;gap:7px;overflow-x:auto;padding:0 18px 16px;scrollbar-width:none;max-width:100%;margin:0}
body.fmPremium.liveMode .fmFilters button{white-space:nowrap;flex:0 0 auto;min-height:34px;padding:7px 13px;font-size:13px;border-radius:20px}
body.fmPremium.liveMode .thread{padding:16px 18px;gap:12px;min-height:84px;border-bottom:1px solid var(--line);border-radius:0}
body.fmPremium.liveMode .thread .avatar{width:50px;height:50px;min-width:50px;font-size:16px}
body.fmPremium.liveMode .threadText{min-width:0;flex:1;border:0;padding:0}
body.fmPremium.liveMode .threadText strong{font-size:15px;font-weight:650;line-height:1.4;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.fmPremium.liveMode .threadText p{font-size:14px;margin:4px 0 0;line-height:1.4;min-width:0}
body.fmPremium.liveMode .fmThreadMeta{font-size:11px;min-width:36px}
body.fmPremium.liveMode .fmConversationWelcome{max-width:430px;padding:32px;text-align:center}
body.fmPremium.liveMode .fmConversationWelcome h1{font-size:28px;letter-spacing:-.8px}
body.fmPremium.liveMode .fmConversationWelcome p{font-size:15px;line-height:1.6}
body.fmPremium.liveMode #listContent{min-width:0;overflow-x:hidden}
/* Primary navigation stays in the same place across every workspace. */
body.fmSocialShell{padding:92px 28px 28px 220px}
body.fmSocialShell>.fmSocialHeader{height:72px;min-height:72px;padding:14px 28px;gap:14px;background:var(--paper);border-bottom:1px solid var(--line)}
body.fmSocialShell .fmShellBrand{font-size:28px;margin-right:auto;letter-spacing:-1px}
body.fmSocialShell .fmShellSearch{width:42px;height:42px;min-height:42px;padding:10px;margin:0;border-radius:14px;background:var(--bg)}
body.fmSocialShell .fmAppRail{inset:72px auto 0 0;width:192px;padding:20px 12px;background:var(--paper);border-right:1px solid var(--line);border-radius:0;box-shadow:none;height:auto}
body.fmSocialShell .fmPrimaryNav{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;position:static;height:auto}
body.fmSocialShell .fmAppRail .fmDestination{display:flex;flex-direction:row;justify-content:flex-start;gap:12px;min-height:52px;padding:14px;font-size:14px;border:0;border-radius:14px}
body.fmSocialShell .fmDestination svg{width:22px;height:22px}
body.fmSocialShell .fmAppRail .fmDestination[aria-current]{background:var(--accentSoft);color:var(--accent)}
/* Dialogs are viewport bounded; no anchored mega-menus. */
.fmNavigationDialog,body.fmPremium #modal{box-sizing:border-box;width:min(580px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 48px);margin:auto;padding:28px;border:1px solid var(--line,#ebdfe8);border-radius:24px;background:var(--paper,#fff);color:var(--ink,#32232e);box-shadow:0 24px 80px #26102028;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.fmNavigationDialog::backdrop,body.fmPremium #modal::backdrop{background:#21131e66;backdrop-filter:blur(4px)}
body.fmPremium #modal #closeModal,.fmHubClose{position:absolute;top:18px;right:18px;display:grid;place-items:center;width:36px;height:36px;min-height:36px;border:0;border-radius:50%;background:var(--bg,#f7f3f6);color:var(--muted,#7c6c78);font-size:25px;line-height:1;padding:0;z-index:2}
body.fmPremium #modalBody{min-width:0;max-width:100%;overflow-wrap:anywhere}
body.fmPremium #modalBody h2,.fmHubHeader h2{font-size:27px;letter-spacing:-.7px;line-height:1.2;margin:0 36px 10px 0}
body.fmPremium #modalBody>p{font-size:14px;line-height:1.6}
.fmHubHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:22px}
.fmHubHeader p:not(.fmEyebrow){font-size:14px;line-height:1.5;color:var(--muted,#7c6c78);margin:8px 0 0}
.fmHubHeader .fmEyebrow{font-size:10px;font-weight:750;letter-spacing:1.6px;color:var(--accent,#7a1d5e);margin:0 0 10px}
.fmHubSearch{display:flex!important;align-items:center;gap:10px;min-width:0;min-height:48px;margin:0 0 24px!important;padding:0 14px;border:1px solid var(--line,#ebdfe8);border-radius:14px;background:var(--bg,#f7f3f6);color:var(--muted,#7c6c78)}
.fmHubSearch svg{width:19px;height:19px}
.fmHubSearch input{min-width:0;width:100%;min-height:46px;height:46px;margin:0!important;padding:10px 0!important;border:0!important;outline-offset:3px;background:transparent!important;color:var(--ink,#32232e);font:inherit;font-size:15px!important;box-shadow:none!important}
.fmHubSection{margin:0 0 22px}
.fmHubSection h3,.fmSettingsPanel>h3{font-size:12px!important;font-weight:700;letter-spacing:.5px;margin:0 0 10px;color:var(--muted,#7c6c78)}
.fmHubList,.fmSettingsCategories{display:flex;flex-direction:column;gap:0;background:var(--paper,#fff);border:1px solid var(--line,#ebdfe8);border-radius:16px;overflow:hidden}
.fmNavigationDialog .fmHubRow,body.fmPremium #modal .fmHubRow{display:flex;align-items:center;gap:12px;min-width:0;width:100%;min-height:66px;margin:0;padding:13px 15px;text-align:left;text-decoration:none;border:0;border-bottom:1px solid var(--line,#ebdfe8);border-radius:0;box-shadow:none;background:transparent;color:var(--ink,#32232e);white-space:normal;font:inherit}
.fmHubRow:last-child{border-bottom:0!important}
.fmHubRow>svg,.fmSettingsProfileCard>svg{width:22px;height:22px;color:var(--accent,#7a1d5e)}
.fmHubRow>span:not(.fmRowChevron){flex:1;min-width:0}
.fmHubRow strong{display:block;font-size:14px;font-weight:600;line-height:1.4}
.fmHubRow small,.fmSettingsProfileCard small{display:block;font-size:12px;color:var(--muted,#7c6c78);line-height:1.5;margin-top:3px}
.fmRowChevron{font-size:22px;color:var(--muted,#7c6c78);margin-left:auto}
.fmHubRow:hover,.fmHubRow:focus-visible{background:var(--accentSoft,#f7e9f3)!important}
.fmSettingsProfileCard{display:flex;align-items:center;gap:14px;width:100%;padding:18px;margin:0 0 22px!important;border:1px solid var(--line);border-radius:17px;background:var(--accentSoft);color:var(--ink);text-align:left;min-height:80px}
.fmSettingsProfileCard>span:not(.avatar):not([aria-hidden]){flex:1;min-width:0}
.fmSettingsProfileCard>.avatar{flex:0 0 46px;width:46px;height:46px;min-width:46px}
.fmSettingsProfileCard strong{font-size:15px;font-weight:650}
.fmSettingsBack{display:inline-flex;align-items:center;min-height:40px;margin:0 0 16px;padding:6px 0;border:0;background:transparent;color:var(--accent);font-size:14px;font-weight:600;box-shadow:none}
.fmSettingsPanel .fmHubList form,.fmSettingsPanel .fmHubList>.fmCheck,.fmSettingsPanel .fmHubList>p{margin:0;padding:18px}
body.fmPremium #modal .fmForm{display:grid;gap:16px}
body.fmPremium #modal .fmForm label:not(.fmCheck){display:grid;gap:7px;margin:0;font-size:13px;line-height:1.5;color:var(--muted)}
body.fmPremium #modal .fmForm select,body.fmPremium #modal .fmForm input:not([type=checkbox]):not([type=radio]),body.fmPremium #modal .fmForm textarea{box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:46px;padding:11px 13px;margin:0;font-size:15px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink)}
body.fmPremium #modal .fmCheck{display:flex!important;align-items:center;gap:12px;font-size:14px;line-height:1.5;margin:0;min-height:44px;color:var(--ink)}
body.fmPremium #modal input[type=checkbox],body.fmPremium #modal input[type=radio]{width:20px!important;height:20px!important;min-height:20px!important;flex:0 0 20px;margin:0!important;accent-color:var(--accent)}
body.fmPremium #modal .fmActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
body.fmPremium #modal .fmActions>*{min-width:0;white-space:normal;overflow-wrap:anywhere;font-size:14px;min-height:44px;padding:10px 12px;border-radius:12px}
body.fmPremium #modal .primary{min-height:46px;font-size:14px;border-radius:12px;padding:12px 18px}
.fmPremium :is(button,a,input,select,textarea):focus-visible,.fmNavigationDialog :is(button,a,input):focus-visible{outline:2px solid var(--accent,#7a1d5e);outline-offset:3px}
@media(max-width:760px){
 body.fmPremium.liveMode .app{display:block;height:var(--visible-height,100dvh);padding:0 0 calc(var(--fm-nav-height) + env(safe-area-inset-bottom))}
 body.fmPremium.liveMode .rail{display:none}
 body.fmPremium.liveMode .sidebar{height:100%;max-height:100%;width:100%;min-width:0;padding-top:0}
 body.fmPremium.liveMode #mobileNav,body.fmSocialShell .fmAppRail{position:fixed;inset:auto 0 0;display:flex;width:100%;height:calc(var(--fm-nav-height) + env(safe-area-inset-bottom));min-height:var(--fm-nav-height);padding:6px 10px calc(6px + env(safe-area-inset-bottom));background:var(--paper);border:0;border-top:1px solid var(--line);box-shadow:0 -4px 24px #24102004;gap:4px;z-index:30;border-radius:0}
 body.fmPremium.liveMode #mobileNav .fmDestination,body.fmSocialShell .fmAppRail .fmDestination{display:flex;flex:1;min-width:0;min-height:58px;flex-direction:column;justify-content:center;gap:5px;padding:7px 2px;border:0;border-radius:14px;font-size:11px;line-height:1.3;color:var(--muted);background:transparent;white-space:normal;text-align:center}
 body.fmPremium.liveMode #mobileNav .fmDestination[aria-current],body.fmSocialShell .fmAppRail .fmDestination[aria-current]{color:var(--accent);background:var(--accentSoft)}
 body.fmPremium.liveMode #mobileNav svg,body.fmSocialShell .fmAppRail svg{width:23px;height:23px}
 body.fmPremium.liveMode.chatOpen #mobileNav{display:none}
 body.fmPremium.liveMode.chatOpen .app{padding:0 0 env(safe-area-inset-bottom)}
 body.fmPremium.liveMode .listHeader{padding:20px 18px 16px}
 body.fmPremium.liveMode .fmInboxBrand{font-size:29px}
 body.fmSocialShell{padding:86px 14px calc(90px + env(safe-area-inset-bottom))}
 body.fmSocialShell>.fmSocialHeader{height:68px;min-height:68px;padding:12px 18px;gap:10px}
 body.fmSocialShell .fmPrimaryNav{display:flex;flex-direction:row;gap:4px;width:100%;height:100%;margin:0;padding:0}
 body.fmSocialShell .fmShellBrand{font-size:28px}
 body.fmSocialShell #app{min-width:0;max-width:100%;margin-top:0}
 .fmNavigationDialog,body.fmPremium #modal{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:24px 18px;border-radius:22px;margin:auto}
 .fmHubHeader{margin-bottom:20px}
 body.fmPremium #modalBody h2,.fmHubHeader h2{font-size:25px}
 .fmNavigationDialog .fmHubRow,body.fmPremium #modal .fmHubRow{min-height:66px;padding:14px 12px;gap:11px}
 .fmHubSearch{margin-bottom:20px!important}
}
@media(prefers-reduced-motion:reduce){.fmPremium *{scroll-behavior:auto!important;transition:none!important}}

/* Remove legacy top-tab offsets on workspace screens. */
body.fmPremium.fmSocialShell>.fmSocialHeader{position:fixed;inset:0 0 auto;margin:0;width:auto}
body.fmPremium.fmSocialShell{padding-top:92px;padding-bottom:28px}
body.fmSocialHome.fmPremium.fmSocialShell .fmFeedMediaGrid{width:100%;max-width:100%;margin-left:0;margin-right:0}
@media(max-width:760px){
 body.fmPremium.fmSocialShell{padding-top:86px;padding-bottom:calc(90px + env(safe-area-inset-bottom))}
 body.fmSocialHome.fmPremium.fmSocialShell{padding:78px 0 calc(90px + env(safe-area-inset-bottom))}
}

body.fmPremium #modal .fmForm label:has(>input[type=checkbox]),body.fmPremium #modal .fmForm label:has(>input[type=radio]){display:flex;align-items:center;gap:12px;color:var(--ink);min-height:44px}
@media(max-width:760px){body.fmSocialHome.fmPremium.fmSocialShell .fmHubNav{margin:8px 0 12px;padding-top:7px;padding-bottom:7px}}
