/* Account uses the RU homepage palette, typography and header metrics. */
:root{--color-canvas:#faf7fd;--color-surface:#fff;--color-ink:#211d28;--color-muted:#77717f;--color-border:#e5ddec;--color-accent:#7954bd;--color-accent-soft:#f1e9f8;--page-inset:24px;--ink:var(--color-ink);--muted:var(--color-muted);--purple:var(--color-accent);--line:var(--color-border);--paper:var(--color-canvas);--account-radius:14px;--account-gap:24px}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:var(--paper);background-image:radial-gradient(#8764ad26 1px,transparent 1.2px);background-size:24px 24px;color:var(--ink)}
header{height:80px;padding:0 max(24px,calc((100vw - 1200px)/2));background:#fcfaffed;backdrop-filter:blur(16px);border-bottom:1px solid var(--line)}
header .brand{display:inline-flex;gap:11px;align-items:center;text-decoration:none;letter-spacing:0}header .brand img{width:34px;height:34px;margin:0;border-radius:0}header .brand-wordmark{font-family:'Trebuchet MS',Verdana,sans-serif;color:#604582;font-size:19px;font-weight:700;letter-spacing:-.8px}header .brand-wordmark-accent{color:#8a66b4}header .brand-wordmark-bot{color:#786987;font-weight:400;letter-spacing:-.6px}
.layout{max-width:1200px;min-height:calc(100vh - 80px);grid-template-columns:220px minmax(0,1fr)}aside{background:#faf7fdba}main{padding:32px}.settings-card,.archive-panel,#empty,.auth{border-radius:var(--account-radius);box-shadow:0 12px 36px #40265006}h1,h2,h3{letter-spacing:0}.profiles-heading h1{font-size:28px}.primary{background:var(--purple);border-radius:10px;font-weight:600;min-height:46px}.profile{border-radius:10px}.account-story-search{margin:24px 0;padding:24px;background:var(--color-surface);border:1px solid var(--line);border-radius:var(--account-radius)}.account-search-form label{font-size:14px;font-weight:600;margin:0 0 12px}.account-search-row{display:flex;gap:12px;align-items:center}.account-search-row input{flex:1;min-height:46px;font-size:16px}.account-search-row .primary{width:auto;margin:0;white-space:nowrap}.copy-note{font-size:13px;margin-top:12px}.story-results{width:100%;margin:24px 0}.story-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.story-tracking-invite{display:none}.story-search-progress{margin-bottom:0}.profile-detail{margin-top:24px}.profile-detail .primary{margin-top:16px}#empty{margin-bottom:24px}.story-icon{width:20px;height:20px}
@media(max-width:850px){header{height:68px;padding:0 20px}.layout{display:block}main{padding:24px 18px}.profiles-heading h1{font-size:24px}.account-menu-toggle{border-radius:8px;background:white;width:44px;height:44px}.account-story-search{padding:18px}.account-search-row{flex-direction:column;align-items:stretch}.account-search-row input{width:100%}.story-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.profile-picker #profiles{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;overflow:visible}.profile-slot{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:22px 8px;min-width:0;min-height:160px;border:1px solid var(--line);background:white;border-radius:var(--account-radius);font-size:12px}.profile-slot strong{max-width:100%;overflow:hidden;text-overflow:ellipsis}.profile-slot[aria-pressed=true]{border-color:var(--purple);background:#f4effa}.empty-slot{border-style:dashed;color:var(--muted)}.slot-avatar{display:grid;place-items:center;flex:none;width:56px;height:56px;border-radius:50%;background:#f0eaf7;color:#a390b6}.slot-avatar svg{width:30px;height:30px}.slot-plus{position:absolute;top:61px;left:calc(50% + 12px);width:24px;height:24px;border-radius:50%;background:var(--purple);color:white;font-size:22px;line-height:22px;border:2px solid white}.slot-identity{display:flex;align-items:center;gap:16px}.slot-stats{display:flex;gap:32px;margin-top:20px}.slot-stats div{display:grid;gap:4px}.slot-stats b{font-size:22px}.slot-stats span{color:var(--muted);font-size:13px}#search-profile-card:not(:empty){padding:24px;border:1px solid var(--line);border-radius:var(--account-radius);background:white;margin-top:24px}#search-panel h1{font-size:28px;margin-bottom:12px}#add-profile-dialog input{width:100%}#add-profile-error{color:#963d45}@media(max-width:850px){.profile-picker #profiles{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.profile-slot{min-height:140px;font-size:11px;padding:18px 6px}.slot-avatar{width:48px;height:48px}.slot-plus{top:53px}.slot-identity h2{font-size:21px}}

/* Archive media preserves original proportions. */
.account-story-archive{margin-top:24px;padding-top:20px;border-top:1px solid var(--line);min-width:0}
.account-story-archive h3{font-size:20px;margin:0 0 16px;letter-spacing:0}
.account-story-archive h4{font-size:16px;margin:20px 0 12px;letter-spacing:0}
.account-story-archive [role=status]:empty{display:none}
.archive-story-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.archive-story-item{margin:0;min-width:0}
.archive-story-item video,.archive-story-item img{display:block;width:100%;height:auto;aspect-ratio:9/16;object-fit:contain;background:#181818;border-radius:8px}
.archive-story-item figcaption{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:13px;padding:8px 0;letter-spacing:0}
.archive-story-item button{font-size:12px;max-width:100%;white-space:normal}
.account-story-archive>button{margin-top:16px}
@media(max-width:600px){.archive-story-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
@media(max-width:360px){.archive-story-grid{grid-template-columns:minmax(0,1fr)}}
/* Compact profile slots and account details. */
.profile-slot{min-height:120px;padding:14px 8px;gap:10px}.slot-avatar{position:relative;width:44px;height:44px}.slot-avatar>svg{width:26px;height:26px}.slot-plus{display:grid;place-items:center;top:auto;left:auto;right:-4px;bottom:-2px;width:22px;height:22px;box-sizing:border-box;line-height:1}.slot-plus svg{width:14px;height:14px}.account-facts{margin:24px 0;display:grid;gap:16px}.account-facts div{display:grid;gap:5px}.account-facts dt{font-size:13px;color:var(--muted)}.account-facts dd{margin:0;overflow-wrap:anywhere}#subscription{margin:12px 0 24px}@media(max-width:850px){.profile-slot{min-height:116px;padding:12px 6px}}
/* Cabinet shares the compact homepage header and illustrated background. */
body{background:#fcfaff;background-image:linear-gradient(#fcfaffa8,#fcfaffa8),url('/assets/hero-doodles-organic.svg');background-size:auto,1440px 800px;background-position:center top;background-attachment:fixed}
header{height:57px;padding-inline:max(24px,calc((100vw - 1180px)/2))}.layout{max-width:1180px;grid-template-columns:240px minmax(0,1fr);min-height:calc(100vh - 57px)}aside{padding:28px 16px;background:#fcfaffb8}aside>.eyebrow{padding-left:12px;text-align:left}aside nav button{width:100%;justify-content:flex-start;text-align:left;white-space:nowrap;padding:12px;gap:10px}aside nav button #count{padding:2px 4px;font-size:10px}main{padding:28px 24px}.profiles-heading{justify-content:flex-end;margin-bottom:8px}.account-story-search{margin-top:0}.slot-identity{align-items:center}.slot-identity>.slot-avatar{width:64px;height:64px}.slot-avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover}.slot-identity h2{font-size:21px;margin:0 0 10px}.slot-stats{margin-top:0;gap:24px}.slot-stats div{display:flex;gap:6px;align-items:baseline}.slot-stats b{font-size:16px}.slot-stats span{font-size:12px}#search-profile-card:not(:empty),.profile-detail{padding:18px 20px;margin:16px 0}.slot-identity+p{font-size:13px;margin:10px 0 0}.settings-card{margin-top:0}.profile-detail>.primary{font-size:13px;min-height:40px;margin-top:12px}
@media(max-width:850px){header{height:50px}.layout{display:block}main{padding:20px 16px}.slot-identity>.slot-avatar{width:52px;height:52px}.slot-stats{gap:12px;flex-wrap:wrap}.slot-stats div{display:grid;gap:2px}.slot-identity h2{font-size:19px}}
/* Keep desktop navigation near the viewport edge, freeing space for profiles. */
@media(min-width:851px){.layout{width:calc(100% - 48px);max-width:none;margin-inline:24px;grid-template-columns:240px minmax(0,1fr)}}

.remove-profile{margin:12px 0 0 12px;color:#963d45;background:white;border:1px solid var(--line);min-height:44px}#remove-profile-error{color:#963d45}@media(max-width:600px){.remove-profile{margin-left:0;display:block}}

/* Shared navigation and application layout metrics. */
:root{--sidebar-width:224px;--shell-inset:24px;--content-width:1080px}
header{height:auto;min-height:64px;padding:10px var(--shell-inset);gap:24px;flex-wrap:wrap}header .brand{margin:0!important}.site-navigation{display:flex;align-items:center;gap:22px;margin-left:auto;font-size:14px}.site-navigation a{white-space:nowrap;color:var(--ink)}.site-navigation a[aria-current]{color:var(--purple);font-weight:600}.site-navigation a:last-child{padding:10px 14px;background:var(--color-accent-soft);border-radius:10px}.account-logout{margin-left:0}
#account.layout{width:100%;max-width:none;margin:0;grid-template-columns:var(--sidebar-width) minmax(0,1fr)}#account>aside{padding:24px 12px 24px var(--shell-inset);gap:20px}#account>main{padding:24px;max-width:calc(var(--content-width) + 48px);width:100%}.profiles-heading{justify-content:flex-start;flex-wrap:wrap}.profiles-heading .primary{margin-left:auto}.profile-slot small{font-size:11px;color:var(--muted)}.slot-stats div{display:grid;gap:2px}.slot-stats span{font-size:12px}.profile-detail>button{margin-right:8px}.auth-tabs{margin:0 0 22px}.auth-tabs [aria-pressed=true]{background:white;color:var(--purple);font-weight:600}.auth .switch{display:none}.auth-wrapper{padding:32px 16px}.auth #show-password{min-height:40px}.settings-card li{margin:8px 0}.site-navigation~.account-menu-toggle{margin-left:auto}#account-mobile-menu a{display:block}
@media(max-width:850px){header{gap:12px}.site-navigation{order:3;width:100%;overflow-x:auto;padding-bottom:3px;gap:18px;font-size:12px}.site-navigation a{min-height:36px;display:flex;align-items:center}.site-navigation a:last-child{padding:6px 10px}#account.layout{display:block}#account>main{padding:20px 16px}.profiles-heading h1{font-size:22px}.profiles-heading .primary{font-size:12px}#account-mobile-menu{top:60px!important}.auth-wrapper{padding-top:24px}}
.auth{margin:0 auto;padding:20px}.auth-tabs button{margin:0;min-height:40px;padding:8px}.auth #show-password{width:auto;min-height:32px;margin:0;padding:4px 0;font-size:12px}.auth label{margin-top:12px}.auth .notice{line-height:1.45}.auth h2{font-size:22px}.auth-wrapper:has(#login[hidden]){display:none}#logout{margin-left:0}#account>aside nav button{font-size:13px}.profile-detail>button:not(.primary){font-size:13px}

/* Phone layout: complete navigation, readable forms and comfortable touch targets. */
@media(max-width:850px){
 header{position:relative;padding:10px 16px;gap:8px}
 .site-navigation{overflow:visible;flex-wrap:wrap;gap:0 16px;padding:0;margin:0;font-size:13px}
 .site-navigation a{min-height:44px}
 #account-mobile-menu:not([hidden]){top:100%!important;right:16px;width:min(288px,calc(100vw - 32px));max-height:calc(100dvh - 150px);overflow-y:auto;z-index:50}
 #account-mobile-menu button{min-height:44px;font-size:14px;margin:0}
 #account>main{padding:16px}
 .settings-card{padding:20px;border-radius:var(--account-radius)}
 .settings-card h1{font-size:24px}.settings-card h2{font-size:21px}
 .settings-card ul{padding-left:20px}
 .settings-card .primary,.settings-card .button{max-width:100%;white-space:normal;text-align:center;min-height:44px}
 #telegram-pending button,#telegram-pending a{display:flex;width:100%;justify-content:center;margin:8px 0;min-height:44px}
 .auth-wrapper{padding:16px}.auth{padding:20px;max-width:100%}
 .auth input,dialog input{font-size:16px;min-height:46px}
 .auth-tabs button,.auth #show-password{min-height:44px}
 .auth-tabs{margin:0 0 18px}
 .account-story-search{padding:16px;margin-bottom:16px}
 .account-search-row{gap:10px}.account-search-row .primary{margin:0;min-height:46px}
 #search-profile-card:not(:empty),.profile-detail{padding:16px}
 .slot-identity{gap:12px}.slot-identity>div:last-child{min-width:0}
 .slot-identity h2{font-size:18px;overflow-wrap:anywhere}
 .slot-stats{gap:12px}.slot-stats span{font-size:12px}
 .profile-detail>button{min-height:44px;margin:10px 0 0;width:100%}
 dialog{padding:24px 20px;max-height:calc(100dvh - 32px);overflow-y:auto;border-radius:16px}
 dialog h2{font-size:23px;margin-right:20px;overflow-wrap:anywhere}
 dialog .close{width:44px;height:44px;right:4px;top:4px}
 dialog .subscription-actions{display:flex;flex-direction:column;gap:8px}
 dialog .subscription-actions button{width:100%;margin:0;min-height:44px}
 #empty{padding:24px 16px}#empty h2{font-size:22px}
}
@media(max-width:420px){
 .profile-picker #profiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .profile-slot{min-height:112px;font-size:12px;gap:8px}
 .profiles-heading{gap:8px}.profiles-heading h1{font-size:22px}
 .profiles-heading .primary{width:100%;margin:4px 0 8px;font-size:14px}
 .auth{padding:18px}.settings-card{padding:18px}
}

.subscription-actions button.primary{color:#fff}
dialog p{overflow-wrap:anywhere}

/* Mobile header keeps all destinations in the top-right menu. */
@media(max-width:850px){
 header .site-navigation{display:none}
 body:not(.signed-in) .account-menu-toggle{display:flex}
 body:not(.signed-in) #account-mobile-menu>[data-view],body:not(.signed-in) #mobile-logout{display:none}
 #account-mobile-menu .mobile-site-links{display:grid;gap:3px}
 #account-mobile-menu .mobile-site-links a{border:0;border-radius:10px;margin:0;min-height:44px;color:var(--ink)}
 body.signed-in #account-mobile-menu .mobile-site-links{padding-bottom:8px;margin-bottom:5px;border-bottom:1px solid var(--line)}
 #account-mobile-menu:not([hidden]){max-height:calc(100dvh - 80px)}
}

/* Compact cabinet surfaces. */
.account-shortcut{display:none}
@media(min-width:851px){.account-story-search{max-width:600px;padding:18px;margin:0 0 20px}.account-search-row{gap:10px}.account-search-form label{margin-bottom:8px}.account-story-search .copy-note{margin-top:8px}}
@media(max-width:850px){
 .account-shortcut{display:grid;place-items:center;width:36px;height:36px;margin-left:auto;color:var(--purple);border:1px solid var(--line);border-radius:9px;background:#fff}
 header .account-menu-toggle{margin-left:0;width:36px;height:36px;min-width:36px;border-radius:9px}
 #account-mobile-menu:not([hidden]){width:min(248px,calc(100vw - 32px));padding:6px;border-radius:12px}
 #account-mobile-menu button,#account-mobile-menu .mobile-site-links a{font-size:13px;min-height:40px;padding:8px 10px;gap:10px}
 .mobile-site-links svg{flex:none;color:var(--purple)}
 .auth-wrapper{padding:12px}.auth{max-width:300px;padding:14px;border-radius:12px}
 .auth-tabs{margin:0 0 10px;padding:3px}.auth-tabs button{min-height:36px;font-size:13px;padding:6px}
 .auth label{margin:8px 0 5px;font-size:12px}.auth input{min-height:40px;padding:8px 10px}
 .auth #show-password{min-height:32px;font-size:11px}.auth .primary{min-height:40px;padding:8px 12px;font-size:13px;margin-top:8px}
 .auth .notice{font-size:10px;line-height:1.4}.auth p{margin:6px 0}
}

@media(max-width:850px){header .site-navigation~.account-menu-toggle{margin-left:0}}

@media(max-width:850px){
 .account-shortcut{display:none!important}header .site-navigation~.account-menu-toggle{margin-left:auto}
 #account-mobile-menu:not([hidden]){width:min(200px,calc(100vw - 32px))}
 #account-mobile-menu .mobile-site-links a{display:flex;align-items:center;gap:10px;text-align:left;line-height:1.3}
 #account-mobile-menu .mobile-site-links svg{position:static!important;display:block;width:20px;height:20px;flex:0 0 20px;margin:0;transform:none}
}

/* Cabinet navigation: persistent search and a separate mobile account tab row. */
.cabinet-tabs{display:none}.signed-in #account-mobile-menu a[href="/account/"]{display:none!important}
#account .account-story-search{max-width:680px;margin:0 0 24px;padding:0;background:transparent;border:0;box-shadow:none}
#account .account-story-search label,#account .account-story-search>.copy-note{display:none}
#account .account-search-row{display:flex;gap:8px;align-items:center}#account .account-search-row input{flex:1;min-width:0;margin:0}#account .account-search-row button{width:auto;flex:none;margin:0;white-space:nowrap}
#profiles.profiles{grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:12px}
#profiles .profile-slot:not(.empty-slot){display:grid;grid-template-columns:54px minmax(0,1fr);gap:4px 14px;text-align:left;padding:18px;min-height:135px;align-content:center}
#profiles .profile-slot:not(.empty-slot)>.slot-avatar{grid-column:1;grid-row:1/5;margin:0;align-self:center;width:54px;height:54px}
#profiles .profile-slot .slot-name,#profiles .profile-slot .slot-handle,#profiles .profile-slot .slot-counts,#profiles .profile-slot small{grid-column:2;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#profiles .slot-name{font-size:14px}#profiles .slot-handle{font-size:12px;color:var(--muted)}#profiles .slot-counts{font-size:11px;color:var(--muted)}#profiles .empty-slot{min-height:135px}
@media(max-width:850px){.signed-in .cabinet-tabs{display:flex;gap:4px;overflow-x:auto;margin:0 0 20px;padding:3px;background:#eee7f5;border-radius:12px}.cabinet-tabs button{flex:1;justify-content:center;white-space:nowrap;padding:10px 7px;min-height:42px;font-size:11px;border:0;border-radius:9px}.cabinet-tabs button.selected{background:#fff;color:var(--purple)}#account-mobile-menu .mobile-site-links{border:0;padding:0;margin:0}#account .account-search-row button{font-size:12px;padding:12px}#account .account-story-search{margin-bottom:14px}#profiles.profiles{grid-template-columns:1fr 1fr}#profiles .profile-slot:not(.empty-slot){grid-template-columns:40px minmax(0,1fr);gap:3px 8px;padding:12px}#profiles .profile-slot:not(.empty-slot)>.slot-avatar{width:40px;height:40px}#profiles .slot-counts{white-space:normal;font-size:10px}#profiles .slot-name{font-size:12px}#profiles .profile-slot small{font-size:10px}}
@media(max-width:430px){#profiles.profiles{grid-template-columns:1fr}#profiles .empty-slot{min-height:80px}.cabinet-tabs button{font-size:10px;padding-inline:5px}}
#account .account-search-row{flex-direction:row;flex-wrap:nowrap}#account .account-search-row input{width:0;flex:1 1 0}#account .account-search-row button{flex:0 0 auto;max-width:none}#account .cabinet-tabs button{min-height:44px}
.account-search-icon,.search-button-arrow{display:none}
@media(max-width:850px){
 body{background:#f5f0fa!important;background-image:radial-gradient(#ded4e9 1px,transparent 1px)!important;background-size:24px 24px!important}
 body::before,body::after,.layout::before,.layout::after{display:none!important}
 #account, #account>main{background:transparent!important;background-image:none!important}
 #account .account-search-row{background:#fff;border:1px solid #cdb5e6;border-radius:17px;padding:5px;gap:8px;box-shadow:0 5px 16px #7954bd08}
 #account .account-search-row .account-search-icon{display:block;width:22px;height:22px;flex:0 0 22px;margin-left:8px;color:var(--ink)}
 #account .account-search-row input{border:0;background:transparent;box-shadow:none;border-radius:0;padding:10px 0;font-size:16px;min-height:44px}
 #account .account-search-row button{display:grid;place-items:center;width:44px;height:44px;min-height:44px;border-radius:12px;padding:10px;background:var(--purple)}
 .search-button-label{display:none}.search-button-arrow{display:block;width:24px;height:24px}
 #account-mobile-menu .mobile-cabinet-sections{border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;margin:4px 0 0;padding:0}
 .mobile-cabinet-sections summary{font-size:13px;padding:12px 10px;cursor:pointer;color:var(--purple)}
 .signed-in #account-mobile-menu .cabinet-tabs{display:flex;flex-direction:column;margin:0;padding:0;background:transparent;gap:2px}
 #account-mobile-menu .cabinet-tabs button{justify-content:flex-start;font-size:13px;min-height:40px}
 body:not(.signed-in) .mobile-cabinet-sections{display:none}
}
/* Match public mobile header and remove stacked menu separators. */
@media(max-width:850px){
 body>header{height:51px;min-height:51px;padding:0 20px;background:rgba(252,250,255,.93);border-bottom:1px solid #e4dcee;gap:12px}
 body>header .brand{font-size:16px;line-height:1;letter-spacing:-.5px}body>header .brand img{width:31px;height:31px;margin-right:8px}
 body>header .account-menu-toggle{position:relative;width:31px;height:31px;min-width:31px;min-height:31px;padding:6px;border-radius:7px;border:1px solid #e4dcee;background:#fff;color:#726780}
 .account-menu-toggle svg{width:18px;height:18px}.account-menu-toggle[aria-expanded="true"] svg{visibility:hidden}
 .account-menu-toggle[aria-expanded="true"]::before,.account-menu-toggle[aria-expanded="true"]::after{content:'';position:absolute;width:16px;height:1.5px;left:50%;top:50%;background:currentColor;transform:translate(-50%,-50%) rotate(45deg)}.account-menu-toggle[aria-expanded="true"]::after{transform:translate(-50%,-50%) rotate(-45deg)}
 body.signed-in #account-mobile-menu .mobile-site-links{border:0;padding:0;margin:0}
 #account-mobile-menu .mobile-cabinet-sections{border:0;margin:0;padding:0}#account-mobile-menu .mobile-cabinet-sections::before,#account-mobile-menu .mobile-cabinet-sections::after{display:none}
 #account-mobile-menu .cabinet-tabs{border:0;box-shadow:none}
 #account .account-search-row{padding:3px;min-height:38px;border-radius:13px;gap:7px}
 #account .account-search-row input{min-height:30px;height:30px;padding:3px 0;line-height:24px;font-size:16px}
 #account .account-search-row button{width:30px;height:30px;min-height:30px;padding:6px;border-radius:9px}
 #account .account-search-row .account-search-icon{width:19px;height:19px;flex-basis:19px;margin-left:7px}.search-button-arrow{width:18px;height:18px}
}
.profile-feedback{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:16px;margin:12px 0;background:#f4eff9;border:1px solid var(--line);border-radius:14px;color:var(--muted);font-size:13px;line-height:1.5}
.profile-feedback strong{font-size:15px;color:var(--ink)}.profile-feedback .profile-retry{margin:4px 0 0;padding:9px 14px;min-height:40px;font-size:13px;background:#fff;color:var(--purple)}
.profile-actions{display:flex;gap:10px;margin-top:16px}.profile-actions .primary{width:auto;min-height:40px;margin:0;padding:9px 16px;font-size:13px}
#search-profile-card:has(.profile-feedback){padding:0;border:0;background:transparent;box-shadow:none}#search-profile-card .profile-feedback{margin:12px 0}
#search-panel:has(.profile-feedback) .story-results:has(.story-grid:empty){display:none}
#search-panel .story-results-title{font-size:16px;line-height:1.5;font-weight:500}
/* Compact profile picker and expanded card based on the approved account-preview. */
#profiles.profiles{display:flex;gap:8px;overflow-x:auto;padding:3px 2px 8px;scroll-snap-type:x proximity}
#profiles .profile-slot:not(.empty-slot){flex:0 0 174px;min-width:0;min-height:66px;padding:10px;grid-template-columns:32px minmax(0,1fr);gap:4px 9px;align-content:center;border-radius:13px;scroll-snap-align:start}
#profiles .profile-slot:not(.empty-slot)>.slot-avatar{width:32px;height:32px;grid-row:1/3}
#profiles .profile-slot .slot-name,#profiles .profile-slot .slot-counts{display:none}
#profiles .profile-slot .slot-handle{font-size:12px;font-weight:600;color:var(--ink)}#profiles .profile-slot small{font-size:10px}
#profiles .profile-slot[aria-pressed="true"]{background:#fff;border-color:#aa91c4;box-shadow:0 0 0 2px #7852b512}
#profiles .empty-slot{flex:0 0 112px;margin-left:auto;min-height:66px;padding:8px;gap:4px;border-radius:13px;font-size:10px}
#profiles .empty-slot .slot-avatar{width:20px;height:20px;margin:0;background:none}#profiles .empty-slot .slot-avatar>svg{display:none}#profiles .empty-slot .slot-plus{position:static;width:20px;height:20px;background:transparent;color:var(--purple);border:0}
#profile-detail{margin-top:20px;background:#fff;border:1px solid var(--line);border-radius:24px;padding:24px;overflow:hidden}
.detail-tracking-state{display:block;color:#588675;font-size:12px;margin-bottom:16px}.detail-display-name{display:block;font-size:20px;line-height:1.3;margin-bottom:4px}
#profile-detail .slot-identity{align-items:center;gap:15px}#profile-detail .slot-identity>.slot-avatar{width:56px;height:56px;flex:0 0 56px}
#profile-detail .slot-identity h2{font-size:15px;color:var(--muted);margin:0 0 9px;text-align:left}
#profile-detail .slot-stats{display:flex;gap:20px;font-size:12px}#profile-detail .slot-stats>div{display:flex;gap:5px;align-items:baseline}
.detail-story-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:24px;padding:18px 0;border-top:1px solid var(--line)}.detail-story-toolbar h3{font-size:16px;margin:0}.detail-story-toolbar button{font-size:13px;margin:0;padding:10px 16px}
.detail-profile-footer{display:flex;align-items:center;flex-wrap:wrap;gap:10px;border-top:1px solid var(--line);padding-top:16px}.detail-profile-footer .copy-note{flex:1 0 100%;margin:0 0 4px;font-size:12px}.detail-profile-footer button{font-size:12px;margin:0;padding:9px 12px}.detail-profile-footer .remove-profile{margin-left:auto}
@media(max-width:850px){#profile-detail{padding:18px;border-radius:20px}#profile-detail .slot-stats{gap:12px;font-size:11px}.detail-display-name{font-size:18px}.detail-story-toolbar{margin-top:18px}.detail-story-toolbar h3{font-size:14px}.detail-story-toolbar button{font-size:12px;padding:9px 12px}.detail-profile-footer{align-items:stretch}.detail-profile-footer button{flex:1;white-space:normal;font-size:11px}}

#paused-profiles{margin:0 0 20px;color:var(--muted);font-size:13px}
#paused-profiles summary{cursor:pointer;padding:10px 0;min-height:40px}
#paused-profiles .profiles{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 8px}
#paused-profiles .profile-slot{flex:0 0 174px;min-height:66px;padding:10px;gap:4px 9px;grid-template-columns:32px minmax(0,1fr)}
#paused-profiles .slot-avatar{width:32px;height:32px;grid-row:1/3}
#paused-profiles .slot-name,#paused-profiles .slot-counts{display:none}
#paused-profiles .slot-handle{font-size:12px;overflow-wrap:anywhere}
#paused-profiles small{font-size:10px}
/* Desktop cabinet uses the homepage hero palette and contextual search. */
@media(min-width:851px){
 body{background:radial-gradient(circle,#ded8e8 1.1px,transparent 1.25px),radial-gradient(ellipse at 79% 45%,#e5d5f5 0,transparent 57%),radial-gradient(ellipse at 20% 35%,#fbf8ff 0,transparent 65%),#eee4f8;background-size:28px 28px,auto,auto;background-position:center top;background-attachment:fixed}
 #account>aside,#account>main{background:transparent}
 #account>aside [data-view="search"],#mobile-logout{display:none}
 #account:is([data-panel="subscription"],[data-panel="settings"],[data-panel="account"]) .account-story-search{display:none}
}

/* Shared active/archive browsing. Tiles stay compact even with a single story. */
#account .story-grid,#account .archive-story-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(130px,160px))!important;gap:12px!important;justify-content:start}
#account .story-card{width:100%;min-width:0}
.account-story-tabs{display:flex;gap:6px;padding:5px;margin-top:22px;background:var(--color-accent-soft);border-radius:12px}
.account-story-tabs button{flex:1;min-width:0;min-height:44px;margin:0;padding:10px 8px;border:0;background:transparent;color:var(--muted);font-size:14px;white-space:nowrap}
.account-story-tabs button[aria-selected=true]{background:white;color:var(--purple);box-shadow:0 2px 8px #3521450a}
#active-stories-panel[hidden],#archive-stories-panel[hidden]{display:none!important}
#active-stories-panel .detail-story-toolbar{margin-top:12px;padding-top:0;border:0}
#archive-stories-panel{margin-top:14px;padding-top:0;border:0;min-width:0}
.archive-date-strip{display:flex;flex-wrap:nowrap;gap:7px;overflow-x:auto;padding:2px 0 10px;scrollbar-width:thin}
.archive-date-strip button{flex:0 0 auto;white-space:nowrap;min-height:44px;padding:9px 12px;margin:0;font-size:13px;background:white;border:1px solid var(--line);border-radius:10px;color:var(--muted)}
.archive-date-strip button.has-stories{color:var(--ink)}
.archive-date-strip button[aria-pressed=true]{background:var(--purple);border-color:var(--purple);color:white}
#account .archive-story-open{display:block;position:relative;width:100%;padding:0;margin:0;border:0;overflow:hidden;border-radius:12px;background:#211d28}
#account .archive-story-open video,#account .archive-story-open img{aspect-ratio:9/16;width:100%;height:auto;object-fit:cover;display:block}
.archive-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#211d2870;color:white;pointer-events:none}
#account .archive-story-item figcaption{font-size:11px;padding:5px 0;white-space:nowrap}
.account-archive-viewer{padding:0;border:0;border-radius:16px;background:#17141c;color:white;width:min(390px,calc(100vw - 24px));max-height:94dvh;overflow:auto}
.account-archive-viewer::backdrop{background:#15111ae0}
.account-archive-viewer>video,.account-archive-viewer>img{display:block;width:100%;max-height:82dvh;object-fit:contain}
.account-archive-viewer>p{margin:0;padding:10px 14px;font-size:12px;color:white}
.account-archive-viewer .archive-viewer-close{position:absolute;right:8px;top:8px;z-index:2;width:36px;height:36px;min-height:36px;margin:0;padding:0;border:0;border-radius:50%;background:#211d2870;color:white;font-size:26px}
@media(max-width:600px){#account .story-grid,#account .archive-story-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.account-story-tabs button{font-size:12px;padding-inline:4px}.archive-date-strip button{font-size:12px;padding-inline:10px}}

/* Compact archive navigation shares one row on desktop and two on phones. */
.account-archive-navigation{--archive-control-size:44px;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:22px;flex-wrap:wrap}
.account-archive-navigation .account-story-tabs{flex:0 0 auto;margin:0;padding:4px;gap:4px}
.account-archive-navigation .account-story-tabs button{flex:0 0 auto;padding:10px 14px;font-size:13px}
.account-archive-navigation .archive-date-strip{display:flex;gap:6px;padding:0;overflow:visible;margin-left:auto;align-items:center}
.account-archive-navigation .archive-date-strip[hidden]{display:none}
.account-archive-navigation .archive-date-strip button{font-size:12px;padding:8px 10px}
.archive-calendar{display:grid;place-items:center;position:relative;flex:0 0 var(--archive-control-size);width:var(--archive-control-size);height:var(--archive-control-size);border:1px solid var(--line);border-radius:10px;background:white;color:var(--purple);overflow:hidden}
.archive-calendar input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;padding:0;margin:0;border:0}
.archive-calendar input::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:auto;height:auto;cursor:pointer}
.archive-calendar:focus-within{outline:3px solid var(--color-accent-soft);outline-offset:2px}
#archive-stories-panel h4{margin:20px 0 12px;font-size:14px}
@media(max-width:850px){.account-archive-navigation{gap:10px}.account-archive-navigation .account-story-tabs{width:100%}.account-archive-navigation .account-story-tabs button{flex:1;padding:8px 6px;font-size:12px}.account-archive-navigation .archive-date-strip{width:100%;margin:0;gap:4px}.account-archive-navigation .archive-date-strip button{flex:1;min-width:0;padding:8px 4px;font-size:11px}.archive-calendar{flex-basis:40px;width:40px}}

.archive-calendar-dialog{width:min(360px,calc(100vw - 24px));padding:44px 16px 20px;border:1px solid var(--line);border-radius:20px;background:var(--color-surface);color:var(--ink)}
.archive-calendar-dialog .calendar-close{position:absolute;top:4px;right:8px;width:36px;height:36px;padding:0;margin:0;border:0;font-size:24px;background:transparent}
.archive-calendar-dialog .calendar-month{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.archive-calendar-dialog .calendar-month button{width:44px;height:44px;margin:0;padding:0;font-size:24px;background:var(--color-accent-soft);border:0}
.archive-calendar-dialog .calendar-month strong{font-size:14px;text-transform:capitalize}
.archive-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;text-align:center}
.archive-calendar-grid>span{font-size:11px;color:var(--muted);padding:4px 0}
.archive-calendar-grid button{position:relative;min-width:0;min-height:40px;margin:0;padding:6px 0;font-size:13px;background:transparent;border:0;border-radius:10px}
.archive-calendar-grid button:disabled{opacity:.3;cursor:default}
.archive-calendar-grid button[aria-pressed=true]{background:var(--purple);color:white}
.archive-calendar-grid button.has-stories::after{content:'';position:absolute;bottom:4px;left:calc(50% - 2px);width:4px;height:4px;background:currentColor;border-radius:50%}
