:root{--portal-bg:#030817;--portal-panel:#091528;--portal-panel-2:#0d1c34;--portal-line:#213b60;--portal-text:#f5f7ff;--portal-muted:#92a5c4;--portal-cyan:#25d9f8;--portal-purple:#a72dff;--portal-danger:#ff5277;color-scheme:dark}
html[data-theme=light]{--portal-bg:#edf4ff;--portal-panel:#fff;--portal-panel-2:#f5f8ff;--portal-line:#bfd0e8;--portal-text:#101b32;--portal-muted:#52627d;color-scheme:light}
html[data-theme=light] body,html[data-theme=light] .admin-body{background:linear-gradient(135deg,#f5f9ff,#ebf1ff);color:var(--portal-text)}
html[data-theme=light] .site-header,html[data-theme=light] .admin-sidebar,html[data-theme=light] .admin-topbar,html[data-theme=light] .admin-card,html[data-theme=light] .card,html[data-theme=light] .site-nav.open,html[data-theme=light] .public-account-menu nav,html[data-theme=light] .account-menu nav{background:rgba(255,255,255,.96)!important;color:#101b32;border-color:var(--portal-line)}
html[data-theme=light] input,html[data-theme=light] select,html[data-theme=light] textarea{background:#fff!important;color:#101b32!important;border-color:#aebfda!important}
html[data-theme=light] .admin-nav a,html[data-theme=light] .site-nav a,html[data-theme=light] .account-menu a,html[data-theme=light] .public-account-menu a{color:#263653}
html[data-theme=light] .admin-nav a.active,html[data-theme=light] .site-nav a.active{color:#056cc8}

.theme-menu-action{display:flex;align-items:center;gap:8px;background:transparent;border:1px solid var(--portal-line);border-radius:10px;color:inherit;padding:9px 12px;font:inherit;cursor:pointer;white-space:nowrap}.theme-menu-action:hover{border-color:var(--portal-cyan);color:var(--portal-cyan)}
.site-nav>a{position:relative}.site-nav>a.active{color:#fff}.site-nav>a.active:after{content:"";position:absolute;left:16%;right:16%;bottom:-11px;height:2px;border-radius:2px;background:linear-gradient(90deg,var(--portal-cyan),var(--portal-purple));box-shadow:0 0 10px var(--portal-cyan)}
.header-alert-button{position:relative;display:grid!important;place-items:center;min-width:40px;height:40px;padding:0!important;border:1px solid var(--portal-line);border-radius:10px}.header-alert-button span,.mobile-account-alerts span{position:absolute;right:-5px;top:-7px;display:grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:20px;background:#8d2cff;color:white;font-size:11px;font-weight:800}
.public-account-menu,.account-menu{position:relative}.public-account-menu nav,.account-menu nav{display:grid;position:absolute;right:0;top:calc(100% + 10px);z-index:150;min-width:230px;padding:9px;background:#07111f;border:1px solid var(--portal-line);border-radius:14px;box-shadow:0 22px 60px #0009;transform-origin:top right;animation:menu-in .18s ease}.public-account-menu nav a,.public-account-menu nav button,.account-menu nav a,.account-menu nav button{width:100%;box-sizing:border-box;text-align:left;text-decoration:none}.public-account-menu summary,.account-menu summary{cursor:pointer}.public-account-menu summary::-webkit-details-marker,.account-menu summary::-webkit-details-marker{display:none}@keyframes menu-in{from{opacity:0;transform:translateY(-8px) scale(.98)}to{opacity:1;transform:none}}
.account-site-header{position:sticky;top:0;z-index:130;margin:0}.account-site-header+.admin-shell{min-height:calc(100vh - 82px)}.mobile-account-alerts{display:none;gap:8px}.mobile-account-alerts a{position:relative;display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--portal-line);border-radius:10px;text-decoration:none}

.auth-shell{min-height:calc(100vh - 170px);display:grid;place-items:center;padding:42px 16px;background:radial-gradient(circle at 70% 20%,#7115a833,transparent 38%)}.auth-card{width:min(100%,470px);box-sizing:border-box;padding:32px;border:1px solid var(--portal-line);border-radius:24px;background:linear-gradient(145deg,#0d1c34ee,#07111fee);box-shadow:0 28px 80px #0008}.auth-card.auth-register{width:min(100%,690px)}.auth-brand{display:flex;align-items:center;gap:12px;color:var(--portal-text);font-size:20px;font-weight:800;text-decoration:none;margin-bottom:24px}.auth-brand img{width:46px;height:46px;border-radius:12px}.auth-card form{display:grid;gap:14px}.auth-card label:not(.avatar-option){display:grid;gap:7px;color:var(--portal-muted)}.auth-card input{box-sizing:border-box;width:100%;min-height:46px;padding:10px 13px;border:1px solid var(--portal-line);border-radius:11px;background:#07111f;color:#fff}.remember-login{grid-template-columns:22px 1fr!important;align-items:center}.remember-login input{width:20px!important;min-height:20px!important;accent-color:#8d2cff}.auth-submit{width:100%;justify-content:center}.smart-captcha{min-height:100px}.auth-card .oauth-buttons,.social-register{margin-top:20px}.auth-card .error{padding:10px 12px;border:1px solid #ff527766;border-radius:10px;background:#ff527719;color:#ff9caf}

.admin-user-combobox{position:relative}.admin-user-results{display:none;position:absolute;z-index:50;left:0;right:0;top:calc(100% + 5px);max-height:260px;overflow:auto;padding:6px;background:#07111f;border:1px solid var(--portal-line);border-radius:12px;box-shadow:0 18px 45px #000b}.admin-user-results.open{display:grid}.admin-user-results button{display:flex;align-items:center;gap:8px;text-align:left;border:0;border-radius:8px;background:transparent;color:#fff;padding:9px;cursor:pointer}.admin-user-results button:hover{background:#132849}.admin-user-results button small{margin-left:auto;color:var(--portal-muted)}.admin-user-results button em{font-style:normal;color:#ffcf5c}.admin-user-combobox.compact{min-width:240px}.premium-action{color:#ffcf5c!important}.release-upload-progress{height:38px;position:relative;overflow:hidden;border:1px solid var(--portal-line);border-radius:10px;background:#07111f}.release-upload-progress i{position:absolute;inset:0 auto 0 0;width:2%;background:linear-gradient(90deg,var(--portal-cyan),var(--portal-purple));transition:width .2s}.release-upload-progress span{position:relative;z-index:1;display:grid;place-items:center;height:100%;font-size:12px}.admin-toast{position:fixed;right:24px;bottom:24px;z-index:1000;max-width:420px;padding:14px 18px;border:1px solid var(--portal-cyan);border-radius:12px;background:#071528;color:#fff;box-shadow:0 15px 50px #000b}

.friends-hero{padding:28px;border:1px solid var(--portal-line);border-radius:20px;background:linear-gradient(110deg,#0b1930 45%,#3a075b99),url('/assets/brand/hero-voxel-v1.jpg') center/cover}.friends-hero h1{font-size:clamp(30px,4vw,48px);margin:8px 0}.friends-stats{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:12px;margin-top:24px}.friends-stats article{padding:15px;border:1px solid #41558488;border-radius:14px;background:#07111fbb}.friends-stats strong{display:block;font-size:26px}.friends-stats span{color:var(--portal-muted)}.friends-tabs{display:flex;gap:8px;margin:14px 0;padding:8px;border:1px solid var(--portal-line);border-radius:14px;overflow:auto}.friends-tabs a{display:flex;gap:8px;padding:9px 14px;border-radius:10px;color:var(--portal-muted);text-decoration:none;white-space:nowrap}.friends-tabs a:hover{background:#6921c855;color:white}.friends-tabs b{color:var(--portal-cyan)}.friends-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:14px}.friends-layout main{display:grid;gap:14px}.friend-section{padding:18px;border:1px solid var(--portal-line);border-radius:16px;background:#091528}.friend-section-head{display:flex;justify-content:space-between;align-items:center}.friend-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.friend-card{position:relative;padding:13px;border:1px solid var(--portal-line);border-radius:13px;background:#0d1c34}.friend-card-user{display:flex;gap:10px;align-items:center;color:inherit;text-decoration:none}.friend-card-user img,.friend-request img{width:52px;height:52px;object-fit:cover;border-radius:13px}.friend-card-user span{display:grid;gap:4px}.friend-presence{font-size:12px;color:#29e596}.friend-presence.offline{color:var(--portal-muted)}.friend-card-actions{display:flex;gap:6px;margin-top:11px}.friend-card-actions a,.friend-card details button{padding:7px 10px;border:1px solid var(--portal-line);border-radius:8px;background:transparent;color:inherit;text-decoration:none;font-size:12px}.friend-card-actions a.primary{background:linear-gradient(90deg,#168fe9,#9d20f7);color:white}.friend-card details{position:absolute;right:10px;top:8px}.friend-card details summary{cursor:pointer}.friend-card details form{position:absolute;right:0;top:24px;display:grid;gap:5px;padding:7px;background:#07111f;border:1px solid var(--portal-line);border-radius:9px;z-index:5}.friend-requests{height:max-content}.friend-request{display:grid;gap:8px;padding:10px 0;border-bottom:1px solid var(--portal-line)}.friend-request>a{display:flex;align-items:center;gap:8px;color:inherit;text-decoration:none}.friend-request form{display:flex;gap:7px}.friend-request button{flex:1;padding:7px;border:1px solid #1ca86e;border-radius:8px;background:#0c422f;color:#8ff5c8}.friend-request button.danger{border-color:#8c2940;background:#401624;color:#ff9caf}

.profile-hero{position:relative;overflow:hidden;padding:30px!important;border-radius:22px!important;background:linear-gradient(90deg,#071528 45%,#3e0755aa),url('/assets/brand/hero-voxel-v1.jpg') center/cover!important}.profile-hero>img{width:136px!important;height:136px!important;border:3px solid #39dbff!important;box-shadow:0 0 28px #852bff}.profile-hero h1{font-size:clamp(34px,5vw,58px);margin:8px 0}.premium-user-badge{font-size:14px;padding:7px 12px;border:1px solid #d552ff;border-radius:9px;background:#66198566;color:#ffd366}.profile-grid{grid-template-columns:1.2fr .75fr .75fr!important}.premium-nickname{background:linear-gradient(90deg,#fff,#ffd664,#e16cff);-webkit-background-clip:text;color:transparent}
.conversation-list{display:grid;gap:8px;padding:10px}.conversation-row{border:1px solid var(--portal-line);border-radius:13px;background:#0b182c;transition:.18s}.conversation-row:hover{transform:translateX(3px);border-color:#8050e7}.conversation-avatar img{width:48px;height:48px;border-radius:13px;object-fit:cover}.conversation-main em{display:grid;place-items:center;min-width:22px;height:22px;border-radius:50%;background:#8f2df4;color:#fff;font-style:normal}.private-thread{min-height:380px;display:flex;flex-direction:column;gap:10px;background:radial-gradient(circle at 60% 0,#52247133,transparent 45%)}.private-message{max-width:min(75%,650px);padding:12px 15px!important;border:1px solid var(--portal-line);border-radius:15px!important;background:#10213b!important}.private-message.mine{align-self:flex-end;background:linear-gradient(135deg,#34205f,#5d278a)!important}.private-message.theirs{align-self:flex-start}.private-compose{display:grid;grid-template-columns:1fr auto;gap:10px}.private-compose textarea{min-height:82px}.private-compose button{align-self:stretch}

.donation-page .hero{background:linear-gradient(105deg,#08172d 45%,#3a075daa),url('/assets/brand/hero-voxel-v1.jpg') center/cover}.donation-goals{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.donation-goal{padding:18px;border:1px solid var(--portal-line);border-radius:14px;background:#091528}.donation-goal progress{width:100%;accent-color:#a72dff}.donation-feed{display:grid;gap:10px}

@media(max-width:1050px){.account-site-header .site-nav>a:not(.header-alert-button){display:none}.friends-layout{grid-template-columns:1fr}.friend-requests{order:-1}.profile-grid{grid-template-columns:1fr 1fr!important}}
@media(max-width:760px){.account-site-header{display:none}.mobile-account-alerts{display:flex}.friends-stats{grid-template-columns:repeat(2,1fr)}.friend-card-grid,.donation-goals,.profile-grid{grid-template-columns:1fr!important}.auth-card{padding:22px}.admin-user-results button{display:grid}.admin-user-results button small{margin:0}.site-nav>a.active:after{display:none}.header-alert-button{display:grid!important}.admin-toast{left:12px;right:12px;bottom:12px}.friends-hero{padding:20px}.profile-hero{display:grid!important;text-align:center}.profile-hero>img{margin:auto}.private-message{max-width:90%}.private-compose{grid-template-columns:1fr}}

/* One account identity in the header: counters live on the avatar and inside its menu. */
.account-avatar-wrap{position:relative;display:grid;place-items:center;flex:0 0 auto}.account-avatar-wrap img{display:block;width:42px!important;height:42px!important;max-width:none;aspect-ratio:1;border-radius:50%!important;object-fit:cover;object-position:center;border:2px solid #6435d8;box-shadow:0 0 0 2px #22d9f822}.account-avatar-wrap>em{position:absolute;right:-6px;top:-7px;display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border:2px solid #07111f;border-radius:999px;background:linear-gradient(135deg,#ff3b8d,#922eff);color:#fff;font-size:11px;font-style:normal;font-weight:900;line-height:1}.menu-badge-link{display:flex!important;align-items:center;justify-content:space-between;gap:16px}.menu-badge-link>span{display:grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#8629eb;color:#fff;font-size:11px;font-weight:900}.public-account-menu summary{display:flex;align-items:center;gap:9px;list-style:none}.public-account-menu summary>b{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-topbar{min-height:58px}.account-topbar .desktop-page-title{display:grid;gap:2px}.account-topbar .desktop-page-title>span:empty{display:none}
@media(max-width:760px){.account-site-header{display:block;padding:0}.account-site-header .nav-shell{min-height:64px;padding:7px 12px}.account-site-header .site-brand span,.account-site-header .menu-toggle,.account-site-header .site-nav>a{display:none!important}.account-site-header .site-nav{display:flex!important;position:static!important;margin-left:auto;padding:0!important;border:0!important;background:transparent!important}.account-site-header .public-account-menu{display:block;margin-left:auto}.account-site-header .public-account-menu summary>b{display:none}.account-site-header .public-account-menu nav{position:fixed;right:12px;top:70px;left:12px;min-width:0}.account-site-header .brand-logo{width:42px;height:42px}.account-topbar{position:sticky;top:64px;z-index:90}.mobile-account-alerts{display:none!important}.account-avatar-wrap img{width:44px!important;height:44px!important}}

/* 2026-08-15: public/profile navigation and notification manager */
.site-nav>a:not(.active):after{display:none!important}
.account-site-header{width:min(1400px,calc(100% - 44px));margin:12px auto 0}
.account-site-header .nav-shell{width:100%;justify-content:center}
.account-site-header .site-brand{margin-right:auto}
.account-site-header .site-nav{margin-left:auto}
.account-premium-mark,.premium-user-badge{display:inline-flex!important;align-items:center;gap:7px;border:1px solid #f2b83f!important;border-radius:10px!important;background:linear-gradient(135deg,#3d220dcc,#6e2d2377)!important;color:#ffd75b!important;box-shadow:0 0 18px #ffb52c33!important;font-weight:850!important;letter-spacing:.02em!important;text-transform:none!important}
@media(max-width:760px){.account-site-header{width:calc(100% - 16px);margin:8px auto 0}.account-site-header .nav-shell{justify-content:flex-start}}
