/* ST4R Universe V2 Portal — Profile + Shop */
.portal-section{position:relative;padding-top:72px;padding-bottom:72px;scroll-margin-top:95px}
.portal-head{display:flex;align-items:end;justify-content:space-between;gap:28px;margin-bottom:24px}
.portal-head h2{margin:7px 0 0;font-size:clamp(34px,4vw,52px);line-height:1;letter-spacing:-.04em}
.portal-head p{margin:0;max-width:620px;color:#8f9ab5;line-height:1.65;font-size:14px}
.portal-glass{background:linear-gradient(145deg,rgba(14,20,43,.88),rgba(6,10,23,.76));border:1px solid rgba(139,167,255,.16);box-shadow:0 25px 90px rgba(0,0,0,.28);backdrop-filter:blur(16px)}

/* PROFILE */
.profile-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);gap:18px}
.profile-main{min-height:330px;border-radius:28px;padding:26px;position:relative;overflow:hidden}
.profile-main:before{content:"";position:absolute;width:420px;height:420px;border-radius:50%;right:-190px;top:-240px;background:radial-gradient(circle,rgba(90,83,255,.30),rgba(40,95,255,.10) 42%,transparent 70%);pointer-events:none}
.profile-top{display:flex;align-items:center;gap:18px;position:relative;z-index:1}
.profile-avatar{width:82px;height:82px;border-radius:24px;background:linear-gradient(145deg,#513eff,#36a6ff);padding:2px;box-shadow:0 0 38px rgba(72,104,255,.28);flex:0 0 auto}
.profile-avatar img,.profile-avatar span{width:100%;height:100%;border-radius:22px;display:grid;place-items:center;object-fit:cover;background:#0b1022;font-size:28px;font-weight:900}
.profile-ident{min-width:0}.profile-ident small{display:block;color:#7885a6;font-size:10px;font-weight:800;letter-spacing:.12em;margin-bottom:5px}.profile-ident h3{margin:0;font-size:26px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-badges{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.profile-badge{padding:5px 9px;border:1px solid rgba(133,165,255,.16);background:rgba(255,255,255,.035);border-radius:999px;font-size:9px;font-weight:850;letter-spacing:.08em;color:#b7c2df}.profile-badge.live{color:#8effc7;border-color:rgba(85,242,174,.23);background:rgba(85,242,174,.07)}.profile-badge.owner{color:#ffe699;border-color:rgba(255,214,86,.25);background:rgba(255,214,86,.07)}
.profile-metrics-v2{position:relative;z-index:1;display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:24px}.profile-metric{padding:15px;border-radius:15px;border:1px solid rgba(142,171,255,.11);background:rgba(255,255,255,.025)}.profile-metric small{display:block;color:#697794;font-size:8px;font-weight:800;letter-spacing:.10em}.profile-metric strong{display:block;margin-top:5px;font-size:20px}.profile-metric span{display:block;color:#8692ae;font-size:9px;margin-top:2px}
.profile-actions{position:relative;z-index:1;display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.profile-actions .btn{min-width:145px}
.profile-side{display:grid;gap:14px}.profile-status-card,.profile-next-card{border-radius:22px;padding:20px}.profile-card-label{display:flex;align-items:center;justify-content:space-between;gap:12px}.profile-card-label span:first-child{color:#7f8baa;font-size:9px;font-weight:900;letter-spacing:.12em}.profile-state{font-size:9px;font-weight:900;padding:5px 8px;border-radius:999px;color:#8effc7;background:rgba(85,242,174,.08);border:1px solid rgba(85,242,174,.18)}.profile-status-card h3,.profile-next-card h3{margin:12px 0 5px;font-size:19px}.profile-status-card p,.profile-next-card p{margin:0;color:#8591ad;font-size:12px;line-height:1.6}.profile-next-time{font-size:30px;font-weight:900;letter-spacing:-.04em;margin:13px 0 2px}.profile-progress{height:6px;border-radius:999px;background:rgba(255,255,255,.05);overflow:hidden;margin-top:15px}.profile-progress i{display:block;height:100%;width:0;background:linear-gradient(90deg,#7657ff,#39b9ff);border-radius:inherit;transition:width .4s ease}
.profile-loggedout{display:none;position:relative;z-index:1;padding:20px 0 4px}.profile-loggedout h3{font-size:26px;margin:0 0 8px}.profile-loggedout p{color:#8c98b5;max-width:650px;line-height:1.65}.profile-section.is-loggedout .profile-top,.profile-section.is-loggedout .profile-metrics-v2,.profile-section.is-loggedout .profile-actions{display:none}.profile-section.is-loggedout .profile-loggedout{display:block}

/* SHOP */
.shop-shell{border-radius:30px;padding:22px;position:relative;overflow:hidden}.shop-shell:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 90% 0%,rgba(91,70,255,.16),transparent 32%),radial-gradient(circle at 12% 100%,rgba(44,169,255,.10),transparent 28%);pointer-events:none}.shop-toolbar{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.shop-search{position:relative;width:min(390px,100%)}.shop-search input{width:100%;height:46px;border-radius:14px;border:1px solid rgba(137,165,255,.15);background:rgba(4,8,20,.72);color:#fff;padding:0 42px 0 15px;outline:none;font:inherit}.shop-search input:focus{border-color:rgba(102,117,255,.55);box-shadow:0 0 0 3px rgba(83,91,255,.09)}.shop-search span{position:absolute;right:14px;top:50%;transform:translateY(-50%);color:#687694}.shop-count{font-size:11px;color:#8793af}.shop-count b{color:#fff}
.shop-filters{position:relative;z-index:1;display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.shop-filter{border:1px solid rgba(129,156,244,.14);background:rgba(255,255,255,.025);color:#8995b1;border-radius:999px;padding:8px 12px;font-size:10px;font-weight:800;cursor:pointer}.shop-filter:hover,.shop-filter.active{color:#fff;border-color:rgba(113,112,255,.42);background:linear-gradient(135deg,rgba(101,75,255,.25),rgba(51,135,255,.15))}
.portal-shop-grid{position:relative;z-index:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.portal-product{min-width:0;border:1px solid rgba(138,168,255,.13);background:rgba(8,13,28,.76);border-radius:20px;overflow:hidden;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}.portal-product:hover{transform:translateY(-4px);border-color:rgba(112,128,255,.34);box-shadow:0 18px 50px rgba(0,0,0,.24)}.portal-product-media{height:135px;background:linear-gradient(145deg,#101a3b,#090d1e);position:relative;overflow:hidden}.portal-product-media img{width:100%;height:100%;object-fit:cover;display:block}.portal-product-media:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 48%,rgba(4,7,16,.82))}.portal-stock{position:absolute;z-index:2;top:10px;right:10px;padding:5px 8px;border-radius:999px;background:rgba(7,11,23,.82);border:1px solid rgba(255,255,255,.10);font-size:8px;font-weight:900;color:#b5c0db;backdrop-filter:blur(8px)}.portal-product-body{padding:15px}.portal-product-type{color:#777eff;font-size:8px;letter-spacing:.11em;font-weight:900}.portal-product h3{font-size:14px;margin:7px 0 13px;line-height:1.35;min-height:38px}.portal-product-foot{display:flex;align-items:center;justify-content:space-between;gap:8px}.portal-price strong{font-size:16px}.portal-price span{display:block;font-size:8px;color:#687590}.portal-redeem{border:1px solid rgba(107,132,255,.22);background:linear-gradient(135deg,rgba(93,67,255,.25),rgba(36,132,255,.18));color:#fff;text-decoration:none;border-radius:11px;padding:9px 10px;font-size:9px;font-weight:900;white-space:nowrap}.portal-redeem:hover{border-color:rgba(113,138,255,.48)}.shop-empty{grid-column:1/-1;text-align:center;padding:50px;color:#7e8aa7}.shop-bottom{position:relative;z-index:1;margin-top:16px;border-radius:16px;border:1px solid rgba(129,156,244,.10);background:rgba(255,255,255,.02);padding:14px 15px;display:flex;align-items:center;justify-content:space-between;gap:12px}.shop-bottom p{margin:0;color:#8591ad;font-size:11px;line-height:1.5}.shop-bottom b{color:#fff}.shop-bottom span{font-size:9px;color:#9da7c0;white-space:nowrap}

/* UNIVERSE MODULES */
.module-grid-v2{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.module-card-v2{border-radius:21px;padding:19px;min-height:170px;position:relative;overflow:hidden}.module-card-v2 .module-icon{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;font-size:18px;background:linear-gradient(145deg,rgba(105,79,255,.24),rgba(35,155,255,.14));border:1px solid rgba(124,153,255,.16)}.module-card-v2 h3{margin:15px 0 7px;font-size:17px}.module-card-v2 p{margin:0;color:#8390ad;font-size:11px;line-height:1.6}.module-card-v2 small{position:absolute;right:14px;top:14px;font-size:8px;font-weight:900;letter-spacing:.09em;color:#8794b3}.module-card-v2.live small{color:#72efb2}

@media(max-width:1050px){.profile-layout{grid-template-columns:1fr}.portal-shop-grid{grid-template-columns:repeat(2,1fr)}.module-grid-v2{grid-template-columns:repeat(2,1fr)}.portal-head{align-items:flex-start;flex-direction:column}}
@media(max-width:680px){.portal-section{padding-top:48px;padding-bottom:48px}.profile-main{padding:18px;border-radius:22px}.profile-top{align-items:flex-start}.profile-avatar{width:64px;height:64px;border-radius:19px}.profile-avatar img,.profile-avatar span{border-radius:17px}.profile-ident h3{font-size:21px}.profile-metrics-v2{grid-template-columns:repeat(2,1fr)}.profile-actions .btn{width:100%}.shop-shell{padding:14px;border-radius:22px}.shop-toolbar{align-items:stretch;flex-direction:column}.shop-search{width:100%}.portal-shop-grid{grid-template-columns:1fr}.portal-product-media{height:175px}.shop-bottom{align-items:flex-start;flex-direction:column}.module-grid-v2{grid-template-columns:1fr}.portal-head h2{font-size:34px}}


/* HEADER PROFILE CHIP */
.nav-profile-chip{height:44px;min-width:148px;max-width:190px;display:inline-flex;align-items:center;gap:9px;padding:5px 10px 5px 6px;border-radius:14px;border:1px solid rgba(123,153,255,.18);background:linear-gradient(145deg,rgba(16,23,48,.90),rgba(7,12,27,.88));box-shadow:0 8px 28px rgba(0,0,0,.18);text-decoration:none;color:#fff;transition:transform .18s ease,border-color .18s ease,background .18s ease;overflow:hidden}
.nav-profile-chip:hover{transform:translateY(-1px);border-color:rgba(108,126,255,.42);background:linear-gradient(145deg,rgba(22,30,61,.96),rgba(8,14,31,.94))}
.nav-profile-avatar{width:32px;height:32px;border-radius:10px;flex:0 0 32px;padding:1px;background:linear-gradient(145deg,#6550ff,#38b5ff);box-shadow:0 0 18px rgba(83,105,255,.20)}
.nav-profile-avatar img,.nav-profile-avatar>span{width:100%;height:100%;display:grid;place-items:center;object-fit:cover;border-radius:9px;background:#0a1022;font-size:12px;font-weight:900;color:#fff}
.nav-profile-meta{display:flex;min-width:0;flex-direction:column;line-height:1.05}.nav-profile-meta strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nav-profile-meta small{margin-top:4px;color:#8290ad;font-size:8px;font-weight:700;letter-spacing:.03em}.nav-profile-meta small b{color:#8eeec4;font-size:9px}
.nav-profile-chip[hidden]{display:none!important}

/* make the desktop header breathe with the new profile chip */
@media (min-width:1051px) and (max-width:1320px){.v2-nav{gap:14px}.nav-links{gap:17px}.nav-actions{gap:7px}.nav-profile-chip{min-width:116px;max-width:132px}.nav-profile-meta small{display:none}.nav-actions .btn{padding-left:12px;padding-right:12px}.live-pill{padding-left:10px;padding-right:10px}}
@media (max-width:1180px) and (min-width:1051px){.nav-profile-chip{min-width:42px;width:42px;padding:5px}.nav-profile-meta{display:none}.nav-profile-avatar{margin:auto}}
@media(max-width:1050px){.nav-profile-chip{min-width:42px;width:42px;padding:5px}.nav-profile-meta{display:none}.nav-profile-avatar{margin:auto}.nav-actions{gap:7px}}
@media(max-width:680px){.nav-profile-chip{height:40px;min-width:40px;width:40px;border-radius:12px;padding:4px}.nav-profile-avatar{width:30px;height:30px;flex-basis:30px}.nav-actions .btn-owner{padding:0 10px;height:40px}.nav-actions{gap:6px}}

/* PROFILE MODAL — profile only appears when the header chip is opened */
.nav-profile-chip{font:inherit;cursor:pointer;text-align:left}
.profile-modal[hidden]{display:none!important}
.profile-modal{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:24px;isolation:isolate}
.profile-modal-backdrop{position:absolute;inset:0;background:rgba(2,5,14,.78);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.profile-modal-panel{position:relative;z-index:1;width:min(1120px,calc(100vw - 40px));max-height:min(860px,calc(100vh - 40px));overflow:auto;border-radius:30px;padding:26px;background:linear-gradient(145deg,rgba(12,18,39,.98),rgba(4,8,20,.98));border:1px solid rgba(135,164,255,.20);box-shadow:0 35px 120px rgba(0,0,0,.62),0 0 80px rgba(72,86,255,.10);animation:st4rProfileIn .18s ease-out}
.profile-modal-panel:before{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:radial-gradient(circle at 12% 0%,rgba(88,74,255,.14),transparent 30%),radial-gradient(circle at 88% 18%,rgba(45,158,255,.10),transparent 28%)}
.profile-modal-close{position:sticky;z-index:5;float:right;top:0;width:42px;height:42px;border-radius:13px;border:1px solid rgba(143,170,255,.16);background:rgba(7,12,27,.92);color:#dce5ff;font-size:25px;line-height:1;cursor:pointer;display:grid;place-items:center;box-shadow:0 10px 28px rgba(0,0,0,.25)}
.profile-modal-close:hover{border-color:rgba(120,141,255,.45);background:rgba(20,28,58,.96)}
.profile-modal-heading{position:relative;z-index:2;display:flex;align-items:flex-end;justify-content:space-between;gap:28px;padding:4px 58px 22px 2px}
.profile-modal-heading h2{margin:7px 0 0;font-size:clamp(32px,4vw,50px);line-height:1;letter-spacing:-.045em}
.profile-modal-heading p{margin:0;max-width:520px;color:#8995b2;font-size:13px;line-height:1.6}
.profile-modal-content{position:relative;z-index:2}
.profile-layout-modal{grid-template-columns:minmax(0,1.08fr) minmax(340px,.92fr)}
.profile-modal .profile-main{min-height:0}
.profile-modal .profile-side{align-content:stretch}
.profile-modal .profile-next-card,.profile-modal .profile-status-card{min-height:148px}
.profile-modal-content.is-loggedout .profile-top,.profile-modal-content.is-loggedout .profile-metrics-v2,.profile-modal-content.is-loggedout .profile-actions{display:none}
.profile-modal-content.is-loggedout .profile-loggedout{display:block}
body.profile-modal-open{overflow:hidden}
@keyframes st4rProfileIn{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
@media(max-width:900px){.profile-modal{padding:14px}.profile-modal-panel{width:min(100%,calc(100vw - 20px));max-height:calc(100vh - 20px);padding:18px;border-radius:24px}.profile-modal-heading{align-items:flex-start;flex-direction:column;gap:10px;padding-right:52px}.profile-layout-modal{grid-template-columns:1fr}.profile-modal-heading h2{font-size:36px}}
@media(max-width:560px){.profile-modal{padding:6px}.profile-modal-panel{width:calc(100vw - 10px);max-height:calc(100vh - 10px);padding:14px;border-radius:20px}.profile-modal-heading h2{font-size:30px}.profile-modal-heading p{font-size:11px}.profile-modal-close{width:38px;height:38px}.profile-modal .profile-main{padding:16px}.profile-modal .profile-metrics-v2{grid-template-columns:repeat(2,1fr)}}

.profile-owner-actions{margin-top:18px;display:flex;justify-content:flex-end}.profile-owner-actions[hidden]{display:none!important}.profile-owner-actions .btn{min-width:150px}
