*{box-sizing:border-box}html{background:#070807;color:#eee8da;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}body{margin:0;background:radial-gradient(circle at 88% 10%,rgba(101,121,91,.12),transparent 28%),radial-gradient(circle at 14% 92%,rgba(127,52,57,.10),transparent 25%),linear-gradient(180deg,#080a08,#0d100e 54%,#080908);min-height:100vh}button,input{font:inherit}button{cursor:pointer}.app{display:grid;grid-template-columns:250px 1fr;min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;background:rgba(8,10,8,.96);border-right:1px solid #252a25;padding:18px 13px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;gap:11px;align-items:center;padding:8px 8px 22px;border-bottom:1px solid #242924}.brand .mini{width:38px;height:38px;border:1px solid rgba(197,165,93,.36);border-radius:12px;display:grid;place-items:center}.brand div:last-child{display:grid}.brand b{font-family:Georgia,serif;letter-spacing:.05em}.brand small{color:#758077;margin-top:3px}.sidebar nav{padding:20px 0;display:grid;gap:5px}.nav-btn{width:100%;border:0;background:transparent;color:#9ca59c;text-align:left;padding:11px 12px;border-radius:10px;display:flex;gap:11px;align-items:center}.nav-btn:hover,.nav-btn.active{background:linear-gradient(90deg,rgba(101,121,91,.16),rgba(197,165,93,.04));color:#efe5c9}.nav-btn.active{box-shadow:inset 2px 0 #c5a55d}.side-foot{margin-top:auto;padding:12px;border:1px solid rgba(101,121,91,.32);border-radius:12px;background:linear-gradient(135deg,rgba(101,121,91,.12),rgba(127,52,57,.07));display:flex;gap:10px;align-items:center}.side-foot>span{font-size:1.45rem;color:#92a57a}.side-foot div{display:grid}.side-foot small{color:#748075}.main{min-width:0}.topbar{height:64px;border-bottom:1px solid #252a25;background:rgba(8,10,8,.78);backdrop-filter:blur(12px);position:sticky;top:0;z-index:15;display:flex;align-items:center;padding:0 22px;gap:12px}.icon-btn{display:none;border:0;background:transparent;color:#ddd}.crumb{font-size:.9rem;color:#889188}.crumb span{margin:0 6px;color:#495149}.crumb b{color:#ddd4bd}.account-btn{margin-left:auto;border:1px solid #2c332c;background:#0e120f;color:#d8d0bc;border-radius:9px;padding:8px 11px}.account-btn:hover{border-color:rgba(197,165,93,.4)}#content{padding:28px;max-width:1500px;margin:auto}.stack{display:grid;gap:18px}.page-head .kicker,.kicker{font-size:.72rem;text-transform:uppercase;letter-spacing:.18em;font-weight:800;color:#d7c171}.page-head h1{font-family:Georgia,serif;font-size:clamp(2rem,4vw,3.1rem);margin:.2rem 0}.page-head>p:last-child{color:#8b958c;max-width:750px}.panel,.card{position:relative;border:1px solid rgba(197,165,93,.16);border-radius:16px;background:linear-gradient(145deg,rgba(19,23,20,.96),rgba(10,12,10,.97));box-shadow:0 20px 60px rgba(0,0,0,.2);padding:20px}.hero{min-height:310px;display:flex;align-items:center;justify-content:space-between;gap:20px;overflow:hidden;background:radial-gradient(circle at 80% 28%,rgba(197,165,93,.14),transparent 24%),radial-gradient(circle at 86% 78%,rgba(101,121,91,.14),transparent 30%),linear-gradient(125deg,#151a15,#0b0d0b 52%,#17110f)!important}.hero:before{content:"HUNTERZ";position:absolute;right:1%;bottom:-7%;font-size:clamp(4rem,12vw,10rem);font-weight:900;letter-spacing:.08em;color:rgba(255,255,255,.018);transform:rotate(-6deg)}.hero-copy{z-index:1;max-width:720px}.hero h1{font-family:Georgia,serif;font-size:clamp(2.6rem,7vw,5.5rem);margin:.2rem 0}.hero h1 span{color:#d6bf75}.hero p{color:#aeb6ad}.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}.sigil{width:220px;height:220px;flex:0 0 220px;border-radius:50%;display:grid;place-items:center;border:1px solid rgba(197,165,93,.35);background:radial-gradient(circle,rgba(197,165,93,.10),rgba(8,9,8,.20) 62%,rgba(101,121,91,.11));font-size:4.5rem;position:relative}.sigil:after{content:"1006  ☠︎  ❧";position:absolute;bottom:29px;font-size:.78rem;letter-spacing:.16em;color:#e5d5a5}.btn{border:1px solid #343b34;border-radius:9px;padding:10px 14px;background:#111511;color:#eae2cf}.btn:hover{filter:brightness(1.08)}.btn.gold{border:0;background:linear-gradient(135deg,#b78d40,#d2b96d);color:#12130f;font-weight:800}.btn.ghost{border-color:rgba(197,165,93,.3);background:transparent}.btn.danger{border-color:rgba(153,70,75,.5);color:#e1b5b7}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat{padding:17px;border:1px solid #252b25;border-radius:13px;background:#0c0f0d}.stat small{display:block;color:#6f7a70}.stat strong{display:block;margin:4px 0;font-size:1.55rem;color:#efe4c5}.stat span{color:#979f97}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px}.section-title{display:flex;justify-content:space-between;gap:12px;align-items:end;margin-bottom:14px}.section-title .kicker{margin:0}.section-title h2{margin:3px 0;font-family:Georgia,serif}.rank-list{display:grid}.rank-row{border:0;border-bottom:1px solid #232923;background:transparent;color:#cbc5b7;padding:12px 3px;display:grid;grid-template-columns:40px 62px 1fr 25px;gap:10px;align-items:center;text-align:left}.rank-row:hover{background:rgba(101,121,91,.07)}.rank-row .tag{border:1px solid rgba(197,165,93,.3);border-radius:8px;padding:6px;text-align:center;color:#d7bf75}.rank-row span:nth-child(3){display:grid}.rank-row small{color:#717b72}.event-art{height:90px;border:1px solid #293029;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,rgba(127,52,57,.12),rgba(101,121,91,.08));font-family:Georgia,serif;color:#d9c57e;font-size:1.3rem}.countdown{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px}.countdown div{padding:10px;border-radius:9px;background:#0b0e0b;text-align:center;border:1px solid #242a24}.countdown strong{display:block;color:#e8d8aa}.countdown span{font-size:.68rem;color:#727b72}.notice{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px solid rgba(101,121,91,.32);border-radius:11px;background:rgba(101,121,91,.08);color:#bdc7b9}.notice.error{border-color:rgba(127,52,57,.45);background:rgba(127,52,57,.1);color:#ddbbbd}.notice span{flex:1}.alliance-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between}.searchbox{display:flex;align-items:center;gap:8px;padding:0 11px;border:1px solid #293029;border-radius:10px;background:#0a0d0a;min-width:min(360px,100%)}.searchbox input{border:0;outline:0;background:transparent;color:#eee;padding:11px 0;width:100%}.alliance-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.alliance-card{overflow:hidden}.alliance-card:before{content:"";position:absolute;right:-45px;top:-45px;width:140px;height:140px;border-radius:50%;background:radial-gradient(circle,rgba(101,121,91,.15),transparent 68%)}.crest{width:65px;height:65px;border:1px solid rgba(197,165,93,.4);border-radius:16px;display:grid;place-items:center;font-family:Georgia,serif;color:#d8c078}.alliance-card h2{font-family:Georgia,serif;margin:.45rem 0}.alliance-meta{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #242a24;border-bottom:1px solid #242a24;margin:16px 0}.alliance-meta span{padding:10px 0;display:grid;color:#6f796f;font-size:.75rem}.alliance-meta strong{font-size:.95rem;color:#ded5be}.back{border:0;background:transparent;color:#d8c276;padding:0}.detail-hero{display:flex;align-items:center;gap:18px;overflow:hidden}.detail-crest,.avatar{width:86px;height:86px;flex:0 0 86px;border-radius:18px;border:1px solid rgba(197,165,93,.34);overflow:hidden;display:grid;place-items:center;background:#0b0e0b;font-size:2rem}.detail-crest img,.avatar img{width:100%;height:100%;object-fit:cover}.detail-hero h1{font-family:Georgia,serif;margin:.2rem 0}.detail-numbers{margin-left:auto;display:flex;gap:22px;text-align:right}.detail-numbers span{display:grid;color:#748076;font-size:.7rem;text-transform:uppercase}.detail-numbers strong{font-size:1.2rem;color:#e3d7b8}.roster-headbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.roster-scroll{overflow-x:auto;border:1px solid #252b25;border-radius:11px}.roster-row{min-width:820px;width:100%;display:grid;grid-template-columns:70px 2fr 1fr .7fr 1fr 1fr;gap:12px;align-items:center;padding:11px 13px;border:0;border-bottom:1px solid #212621;background:#0b0e0b;color:#aab3aa;text-align:left}.roster-row.header{font-size:.7rem;text-transform:uppercase;letter-spacing:.08em;color:#667067;background:#080a08}.roster-row:not(.header):hover{background:#121712}.roster-player{display:flex;gap:10px;align-items:center}.roster-player img,.tiny-avatar{width:36px;height:36px;border-radius:9px;object-fit:cover;background:#151a15;border:1px solid #2c332c;display:grid;place-items:center}.roster-player span{display:grid}.roster-player strong{color:#e7deca}.roster-player small{color:#69736a}.online{color:#8fb780!important}.profile-link{margin-left:auto}.profile-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.profile-pills span{font-size:.7rem;border:1px solid #293029;border-radius:999px;padding:5px 8px;color:#929c92}.player-stats{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}.player-stats .card{padding:15px}.player-stats small{display:block;color:#6c766d;text-transform:uppercase}.player-stats strong{display:block;margin-top:5px;color:#e8ddbf}.heroes,.gear{display:grid;gap:9px}.hero-item,.gear-item{display:flex;align-items:center;gap:11px;padding:9px;border:1px solid #242a24;border-radius:10px;background:#0a0d0a}.hero-item img,.gear-item img{width:48px;height:48px;border-radius:9px;object-fit:contain;background:#141914}.hero-item div,.gear-item div{display:grid}.hero-item span,.hero-item small,.gear-item span{color:#778177;font-size:.76rem}.leaderboard{display:grid}.leader-row{display:grid;grid-template-columns:55px 1fr 160px;gap:12px;padding:13px 2px;border-bottom:1px solid #242a24;align-items:center}.leader-row span{color:#d0b96f}.leader-row small{color:#6d776e}.leader-row em{text-align:right;font-style:normal;color:#ddd3b9}.podium{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;align-items:end}.podium .card{text-align:center}.podium .first{min-height:210px;border-color:rgba(197,165,93,.4)}.podium .ranknum{font-size:2rem;color:#d7c176}.events{display:grid;gap:10px}.event-row{display:grid;grid-template-columns:80px 1fr;gap:15px;align-items:center}.date{border:1px solid rgba(197,165,93,.25);border-radius:10px;text-align:center;padding:8px;color:#d6bd75}.date strong{display:block}.guide-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.guide h2{font-family:Georgia,serif}.guide p{color:#8e988e}.guide-detail{padding-top:12px;border-top:1px solid #293029;color:#bac2b7!important}.battle{display:grid;grid-template-columns:1fr 1fr;gap:18px}.battle fieldset{border:1px solid #273027;border-radius:11px;margin:10px 0;padding:12px;display:grid;grid-template-columns:1fr 1fr;gap:10px}.battle legend{color:#d8c37d}.battle label{display:grid;gap:5px;color:#79837a;font-size:.75rem}.battle input{background:#090c09;border:1px solid #293029;border-radius:8px;padding:9px;color:#eee}.split{display:grid;gap:12px}.bar{height:10px;background:#202620;border-radius:999px;overflow:hidden}.bar i{display:block;height:100%;background:linear-gradient(90deg,#7b8d68,#c0a258)}.transfer-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.transfer-grid .card span{font-family:Georgia,serif;color:#b49953}.auth-layout{display:grid;grid-template-columns:1.15fr .85fr;gap:18px}.tabs{display:flex;gap:8px;margin-bottom:12px}.tabs button.active{border-color:#c0a55b;color:#e6d6aa}.form{display:grid;gap:11px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.form label{display:grid;gap:5px;color:#7f897f;font-size:.75rem}.form input{background:#090c09;border:1px solid #293029;border-radius:8px;color:#eee;padding:10px}.profile-data{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px 0}.profile-data div{padding:11px;border:1px solid #262d26;border-radius:9px;display:grid}.profile-data span{color:#6d776e;font-size:.72rem}.admin-list{display:grid;gap:8px}.admin-item{display:flex;gap:10px;align-items:center;border:1px solid #262d26;border-radius:10px;padding:10px}.admin-item>div{flex:1;display:grid}.admin-item small{color:#747e75}.empty{color:#788279;padding:18px 0}.welcome{position:fixed;z-index:100;inset:0;background:radial-gradient(circle at 50% 36%,#172018,#0a0d0a 40%,#040504 78%);display:grid;place-items:center;align-content:center;text-align:center;padding:20px;transition:.5s ease}.welcome.hidden{opacity:0;visibility:hidden}.welcome-mark{width:190px;height:190px;border-radius:50%;border:1px solid rgba(197,165,93,.45);display:grid;place-items:center;position:relative;box-shadow:0 0 70px rgba(197,165,93,.11)}.welcome-mark .eagle{font-size:4.8rem}.welcome-mark .crown{position:absolute;top:11px;color:#c7a75c;font-size:1.8rem}.welcome-mark b{position:absolute;bottom:28px;letter-spacing:.17em}.welcome-mark span{position:absolute;bottom:8px;color:#8c9d78}.welcome h1{font-family:Georgia,serif;font-size:clamp(2.5rem,8vw,5rem);margin:.2rem}.welcome>p:not(.kicker){color:#9fa79f}.welcome .btn{margin-top:15px}footer{border-top:1px solid #252a25;padding:22px 28px;display:flex;justify-content:space-between;gap:12px;color:#788178}footer div{display:flex;gap:7px;align-items:center}footer span{color:#5f695f}footer a{color:#d2bc76}@media(max-width:1050px){.app{grid-template-columns:78px 1fr}.brand div:last-child,.side-foot div,.nav-btn span:last-child{display:none}.brand{justify-content:center}.side-foot{justify-content:center}.alliance-grid{grid-template-columns:repeat(2,1fr)}.player-stats{grid-template-columns:repeat(3,1fr)}.transfer-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.app{display:block}.sidebar{position:fixed;left:-270px;width:250px;transition:.25s ease}.sidebar.open{left:0}.brand div:last-child,.side-foot div,.nav-btn span:last-child{display:grid}.side-foot{justify-content:flex-start}.icon-btn{display:block}.topbar{padding:0 12px}.crumb{display:none}#content{padding:18px 12px}.hero{min-height:360px}.sigil{display:none}.stat-grid{grid-template-columns:repeat(2,1fr)}.grid2,.battle,.auth-layout{grid-template-columns:1fr}.alliance-grid,.guide-grid{grid-template-columns:1fr}.detail-hero{align-items:flex-start;flex-wrap:wrap}.detail-numbers,.profile-link{margin-left:0;width:100%;text-align:left}.player-stats{grid-template-columns:repeat(2,1fr)}.podium{grid-template-columns:1fr}.podium .first{min-height:0}.leader-row{grid-template-columns:50px 1fr}.leader-row em{grid-column:2;text-align:left}.roster-headbar,.alliance-toolbar{flex-direction:column;align-items:stretch}.searchbox{min-width:0}.form-row,.profile-data{grid-template-columns:1fr}.transfer-grid{grid-template-columns:1fr 1fr}footer{flex-direction:column}}@media(max-width:430px){.stat-grid,.player-stats,.transfer-grid{grid-template-columns:1fr}.countdown{grid-template-columns:repeat(2,1fr)}}

/* faithful Halloween concept pass */
:root{--gold:#f2a128;--orange:#ef7715;--cream:#f5ead6;--ink:#040504;--panel:#090b09}
body{background:#030403;color:#ddd3c3;padding-bottom:82px}
.topbar{height:86px;background:rgba(3,4,3,.97);border-bottom:1px solid rgba(239,119,21,.25);padding:0 22px}
.topbrand{display:flex;flex-direction:column;line-height:1.08;margin-right:auto;margin-left:12px}.topbrand b{font-family:Georgia,serif;color:#ef8b1c;letter-spacing:.06em;font-size:1.1rem}.topbrand small{font-size:.57rem;letter-spacing:.16em;color:#8d897f;margin-top:4px}.crumb{display:none}
.account-btn{border:1px solid rgba(239,119,21,.45);color:#e7d5b9;background:#070806}
main{background:radial-gradient(circle at 80% 0,rgba(239,119,21,.08),transparent 28%),#050605}
.panel,.card,.stat{border-color:rgba(239,119,21,.23)!important;background:linear-gradient(145deg,#0c0e0b,#060706)!important;box-shadow:inset 0 0 42px rgba(239,119,21,.015),0 14px 34px rgba(0,0,0,.28)}
.hero{position:relative;min-height:570px;overflow:hidden;background:#090806!important;padding:54px 44% 44px 40px!important;display:block!important;border-color:rgba(239,119,21,.34)!important}
.hero:before{content:""!important;position:absolute;inset:0 0 0 39%;background:linear-gradient(90deg,#090806 0%,rgba(9,8,6,.15) 28%,rgba(7,7,6,.02) 100%),url('/assets/halloween-castle-hero.jpg') center/cover no-repeat;opacity:.98;color:transparent!important;z-index:0}
.hero:after{content:"🕸";position:absolute;left:20px;top:15px;font-size:4rem;opacity:.16;color:#d87917}
.hero-copy{position:relative;z-index:2;max-width:520px}.hero .kicker{color:#ed8e22;letter-spacing:.28em;font-size:.75rem}.hero h1{font-family:Georgia,serif;font-size:clamp(3.5rem,8vw,6rem);line-height:.88;color:var(--cream);margin:18px 0 26px}.hero h1 span{display:block;color:#ee7b16;text-shadow:0 0 24px rgba(239,119,21,.15)}.hero-copy>p:not(.kicker){font-family:Georgia,serif;color:#c3b59f;font-size:1.22rem;line-height:1.5;max-width:420px}.hero-actions{display:flex;flex-direction:column;align-items:flex-start;gap:14px;margin-top:30px}.hero-actions .btn{min-width:310px;justify-content:center}.btn.gold{background:linear-gradient(180deg,#f7ad34,#e76f10);border-color:#f29c27;color:#120a03;box-shadow:0 0 28px rgba(239,119,21,.18)}.sigil{display:none!important}
.stat-grid{gap:16px}.stat{min-height:145px;position:relative;overflow:hidden;padding:26px 28px}.stat:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 45%,rgba(239,119,21,.055));pointer-events:none}.stat small{color:#9b907d}.stat strong{color:#ef8519;font-family:Georgia,serif;font-size:2.4rem}.stat span{color:#b7ac99}
.kicker{color:#e49a34}.panel h2,.panel h1,.card h2{font-family:Georgia,serif;color:#f0e3cf}
.mobile-dock{display:none}
footer{border-top:1px solid rgba(239,119,21,.18)}
@media(max-width:760px){
 body{padding-bottom:76px}.main{width:100%}.topbar{height:78px;padding:0 14px}.topbrand{margin-left:8px}.topbrand b{font-size:1rem}.topbrand small{font-size:.48rem}.account-btn{padding:11px 12px;font-size:.9rem}
 main{padding:14px!important}.hero{min-height:620px;padding:48px 24px 34px!important}.hero:before{inset:0;background:linear-gradient(180deg,rgba(5,6,5,.05),rgba(5,6,5,.2) 34%,#070806 68%,#070806 100%),url('/assets/halloween-castle-hero.jpg') top center/cover no-repeat;opacity:.78}.hero-copy{padding-top:250px}.hero .kicker{font-size:.66rem}.hero h1{font-size:3.9rem;margin:12px 0 22px}.hero-copy>p:not(.kicker){font-size:1.08rem}.hero-actions .btn{width:100%;min-width:0;font-size:.98rem}.stat-grid{grid-template-columns:1fr!important}.stat{min-height:128px}.grid2{grid-template-columns:1fr!important}
 .mobile-dock{position:fixed;display:grid;grid-template-columns:repeat(5,1fr);left:0;right:0;bottom:0;height:70px;z-index:80;background:rgba(3,4,3,.97);border-top:1px solid rgba(239,119,21,.28);box-shadow:0 -12px 30px rgba(0,0,0,.45)}.dock-btn{border:0;background:transparent;color:#817d75;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:1.15rem}.dock-btn small{font-size:.56rem;text-transform:uppercase;letter-spacing:.06em}.dock-btn.active{color:#f08a1d}.dock-btn.active span{text-shadow:0 0 12px rgba(239,119,21,.45)}
 footer{margin-bottom:8px}
}

/* Exact-preview mobile corrections */
.hero h1 .realm-number{display:flex!important;align-items:center;gap:13px;width:max-content;color:#f07918!important}
.realm-number i{font-family:Georgia,serif;font-size:.28em;font-style:normal;color:#d7a04b;opacity:.9}
.hero-ornament{width:130px;display:flex;align-items:center;gap:8px;color:#8c5724;margin:-14px 0 18px;font-size:.8rem}
.hero-ornament:before,.hero-ornament:after{content:"";height:1px;flex:1;background:linear-gradient(90deg,transparent,#75451f)}
.hero-ornament:after{background:linear-gradient(90deg,#75451f,transparent)}
.halloween-stats .stat{display:flex;align-items:center;gap:18px}
.stat-icon{width:72px;height:72px;flex:0 0 72px;border:1px solid rgba(239,119,21,.32);border-radius:18px;display:grid;place-items:center;font-family:Georgia,serif;font-size:2rem;color:#f18a1c;background:radial-gradient(circle,rgba(239,119,21,.13),rgba(4,5,4,.7) 68%);box-shadow:inset 0 0 25px rgba(239,119,21,.07)}
.stat-copy{display:grid;position:relative;z-index:2}.stat-copy strong{line-height:1}.stat-copy span{margin-top:8px}
@media(max-width:760px){
 .topbrand b{font-family:Georgia,"Times New Roman",serif;font-weight:800;letter-spacing:.09em;color:#f18a1d}.topbrand small{letter-spacing:.19em}
 .hero{min-height:650px!important}.hero-copy{padding-top:285px!important}.hero h1{font-family:Georgia,"Times New Roman",serif!important;font-weight:800;letter-spacing:-.035em;line-height:.84!important}.hero h1 .realm-number{gap:10px}
 .hero-ornament{margin-top:-8px}
 .halloween-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
 .halloween-stats .stat{min-height:148px!important;padding:17px 14px!important;gap:12px!important}
 .stat-icon{width:54px;height:54px;flex-basis:54px;border-radius:14px;font-size:1.45rem}.stat-copy small{font-size:.65rem}.stat-copy strong{font-size:2rem!important}.stat-copy span{font-size:.78rem}
}
@media(max-width:390px){.halloween-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.halloween-stats .stat{padding:14px 10px!important;gap:8px!important}.stat-icon{width:46px;height:46px;flex-basis:46px}.stat-copy strong{font-size:1.72rem!important}}


/* ===== KINGDOM 1006 CINEMATIC REALM INTRO ===== */
.legacy-welcome{display:none!important}
body.intro-lock{overflow:hidden;touch-action:none}
.realm-intro{
  position:fixed;inset:0;z-index:9999;overflow:hidden;
  background:#020302;color:#f1e5cc;
  isolation:isolate;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif
}
.realm-intro.intro-done{animation:introExit .85s cubic-bezier(.4,0,.2,1) forwards;pointer-events:none}
.realm-intro.intro-gone{display:none}
.intro-backdrop{
  position:absolute;inset:-4%;
  background:
    linear-gradient(180deg,rgba(1,2,1,.35),rgba(1,2,1,.08) 48%,rgba(1,2,1,.74)),
    url('/assets/realm-summon-bg.jpg') center/cover no-repeat;
  filter:saturate(.72) brightness(.44) contrast(1.1);
  transform:scale(1.07);
  animation:realmBreathe 7s ease-out both
}
.intro-backdrop:after{
  content:"";position:absolute;inset:0;
  background:radial-gradient(circle at 50% 47%,transparent 0 26%,rgba(0,0,0,.38) 63%,rgba(0,0,0,.82) 100%)
}
.intro-moon{
  position:absolute;width:min(50vw,520px);aspect-ratio:1;border-radius:50%;
  left:50%;top:7%;transform:translateX(-50%) scale(.72);
  background:radial-gradient(circle at 42% 38%,#f6d18b,#d39136 42%,#785021 66%,rgba(70,46,22,.15) 72%,transparent 74%);
  opacity:0;filter:blur(.2px);box-shadow:0 0 70px rgba(226,154,67,.2);
  animation:moonRise 1.5s 1.05s ease-out forwards
}
.summon-stage{position:absolute;inset:0;z-index:3}
.summon-reaper{
  position:absolute;left:50%;bottom:7%;width:min(64vw,820px);max-height:78vh;object-fit:contain;
  transform:translate(-50%,14%) scale(.84);opacity:0;filter:brightness(.7) contrast(1.18) drop-shadow(0 30px 38px #000);
  animation:reaperReveal 1.45s 1.45s cubic-bezier(.16,.8,.2,1) forwards,reaperHover 2.7s 2.9s ease-in-out infinite alternate
}
.summon-eagle{
  position:absolute;left:-5%;bottom:-18%;width:min(53vw,620px);max-height:58vh;object-fit:contain;
  opacity:0;transform:translate(-15%,48%) rotate(-7deg) scale(.72);
  filter:saturate(.9) contrast(1.05) drop-shadow(0 24px 24px #000);
  animation:eagleSummon 1.35s 3.15s cubic-bezier(.15,.82,.17,1.02) forwards,eagleFloat 2.5s 4.55s ease-in-out infinite alternate
}
.summon-mammoth{
  position:absolute;right:-5%;bottom:-20%;width:min(54vw,650px);max-height:60vh;object-fit:contain;
  opacity:0;transform:translate(15%,52%) scale(.7);
  filter:saturate(.9) contrast(1.05) drop-shadow(0 24px 24px #000);
  animation:mammothSummon 1.45s 3.35s cubic-bezier(.15,.82,.17,1.02) forwards,mammothBreathe 2.8s 4.8s ease-in-out infinite alternate
}
.necromancy-ring{
  position:absolute;left:50%;bottom:5%;width:min(72vw,800px);height:120px;border-radius:50%;
  transform:translateX(-50%) scale(.25);opacity:0;
  border:2px solid rgba(102,255,122,.1);
  box-shadow:0 0 20px rgba(69,255,103,.18),0 0 90px rgba(52,230,87,.12),inset 0 0 45px rgba(59,255,97,.12);
  animation:ringSummon 1.35s 2.55s ease-out forwards
}
.ring-two{width:min(58vw,620px);height:85px;animation-delay:2.82s;filter:blur(1px)}
.intro-summon-glow{
  position:absolute;bottom:-18%;width:58vw;height:55vh;border-radius:50%;z-index:2;opacity:0;filter:blur(55px);
  background:radial-gradient(circle,rgba(63,255,94,.40),rgba(41,220,70,.12) 42%,transparent 70%);
  animation:magicGlow 1.4s 2.65s ease-out forwards
}
.glow-left{left:-10%}.glow-right{right:-10%}
.smoke{
  position:absolute;bottom:-20%;width:42vw;height:46vh;border-radius:50%;
  opacity:0;filter:blur(28px);
  background:radial-gradient(circle at 50% 55%,rgba(96,255,119,.28),rgba(44,183,68,.14) 36%,rgba(15,55,22,.05) 63%,transparent 72%);
  mix-blend-mode:screen;
  animation:smokeRise 3.2s 2.45s ease-out forwards
}
.smoke-a{left:2%}.smoke-b{left:30%;animation-delay:2.7s}.smoke-c{right:1%;animation-delay:2.55s}
.embers{position:absolute;inset:0;pointer-events:none}
.embers i{
  position:absolute;bottom:-5%;width:4px;height:4px;border-radius:50%;background:#f69a24;
  box-shadow:0 0 8px #ff8b12;opacity:0;animation:emberFloat 3.2s 2.7s linear infinite
}
.embers i:nth-child(1){left:8%;animation-delay:2.6s}.embers i:nth-child(2){left:18%;animation-delay:3.15s}
.embers i:nth-child(3){left:27%;animation-delay:2.95s}.embers i:nth-child(4){left:39%;animation-delay:3.45s}
.embers i:nth-child(5){left:48%;animation-delay:2.72s}.embers i:nth-child(6){left:58%;animation-delay:3.25s}
.embers i:nth-child(7){left:67%;animation-delay:2.84s}.embers i:nth-child(8){left:76%;animation-delay:3.5s}
.embers i:nth-child(9){left:87%;animation-delay:3.05s}.embers i:nth-child(10){left:94%;animation-delay:2.74s}
.royal-curtain{
  position:absolute;top:0;bottom:0;width:51.5%;z-index:12;display:grid;place-content:center;text-align:center;
  background:
    repeating-linear-gradient(90deg,rgba(255,255,255,.018) 0 4%,rgba(0,0,0,.18) 7% 11%,rgba(255,255,255,.012) 14% 17%),
    radial-gradient(ellipse at 48% 40%,#14130f 0,#080907 55%,#020302 100%);
  box-shadow:inset 0 0 90px #000,0 0 60px rgba(0,0,0,.9);
  border-color:rgba(201,154,58,.36)
}
.royal-curtain:before{
  content:"";position:absolute;inset:0;
  background:linear-gradient(90deg,transparent,rgba(211,164,69,.05) 45%,rgba(255,214,124,.10) 50%,rgba(0,0,0,.3) 55%,transparent);
  opacity:.8
}
.curtain-left{left:0;border-right:2px solid rgba(204,151,48,.32);animation:curtainLeft 2.05s .72s cubic-bezier(.68,.01,.2,1) forwards}
.curtain-right{right:0;border-left:2px solid rgba(204,151,48,.32);animation:curtainRight 2.05s .72s cubic-bezier(.68,.01,.2,1) forwards}
.curtain-crown{font-size:clamp(2rem,7vw,4.5rem);color:#c79c49;text-shadow:0 0 24px rgba(212,165,73,.24);z-index:1}
.curtain-eagle{font-size:clamp(3rem,10vw,6.5rem);filter:grayscale(.35) sepia(.2);z-index:1;margin:.15em}
.curtain-1006{font-family:Georgia,serif;font-weight:800;font-size:clamp(1.6rem,5vw,3rem);letter-spacing:.16em;color:#d0ae67;z-index:1}
.curtain-valance{
  position:absolute;left:0;right:0;top:0;height:11vh;z-index:15;
  background:linear-gradient(180deg,#090a08,#12100c 65%,#050605);
  border-bottom:2px solid #8e672d;
  box-shadow:0 12px 34px rgba(0,0,0,.7);
  clip-path:polygon(0 0,100% 0,100% 70%,94% 100%,86% 68%,77% 100%,68% 68%,59% 100%,50% 68%,41% 100%,32% 68%,23% 100%,14% 68%,6% 100%,0 70%)
}
.intro-title{
  position:absolute;z-index:9;left:50%;bottom:11%;transform:translateX(-50%);width:min(92%,820px);text-align:center;
  opacity:0;animation:titleReveal .9s 4.35s ease-out forwards
}
.intro-title span{display:block;color:#e6972b;letter-spacing:.22em;font-size:clamp(.62rem,1.7vw,.82rem);font-weight:800}
.intro-title strong{display:block;font-family:Georgia,serif;font-size:clamp(2.2rem,8vw,5.4rem);line-height:.95;margin:.16em 0;color:#f1e4ce;text-shadow:0 4px 24px #000}
.intro-title strong b{color:#ef7f18}
.intro-title small{color:#cabda8;font-family:Georgia,serif;font-size:clamp(.82rem,2vw,1.08rem)}
.intro-skip{
  position:absolute;right:max(16px,env(safe-area-inset-right));top:max(16px,env(safe-area-inset-top));z-index:30;
  border:1px solid rgba(229,155,45,.52);background:rgba(3,4,3,.68);color:#e8b454;border-radius:999px;
  padding:8px 13px;font-size:.66rem;letter-spacing:.12em;backdrop-filter:blur(10px)
}
.intro-loading{
  position:absolute;left:50%;bottom:max(20px,env(safe-area-inset-bottom));transform:translateX(-50%);
  z-index:20;display:flex;align-items:center;gap:9px;color:#ba9e6d;font-size:.62rem;letter-spacing:.16em
}
.intro-loading span{width:7px;height:7px;border:1px solid #dfad54;border-radius:50%;box-shadow:0 0 11px rgba(223,173,84,.5);animation:loadingPulse .8s infinite alternate}
.intro-loading em{font-style:normal}
@keyframes curtainLeft{0%{transform:translateX(0)}100%{transform:translateX(-96%) skewX(-1.5deg)}}
@keyframes curtainRight{0%{transform:translateX(0)}100%{transform:translateX(96%) skewX(1.5deg)}}
@keyframes reaperReveal{0%{opacity:0;transform:translate(-50%,22%) scale(.78);filter:brightness(.3) blur(4px)}100%{opacity:1;transform:translate(-50%,8%) scale(1);filter:brightness(.78) contrast(1.18) blur(0) drop-shadow(0 30px 38px #000)}}
@keyframes reaperHover{to{transform:translate(-50%,5%) scale(1.015)}}
@keyframes eagleSummon{0%{opacity:0;transform:translate(-15%,55%) rotate(-9deg) scale(.68)}70%{opacity:1}100%{opacity:1;transform:translate(0,4%) rotate(-2deg) scale(1)}}
@keyframes mammothSummon{0%{opacity:0;transform:translate(15%,60%) scale(.68)}75%{opacity:1}100%{opacity:1;transform:translate(0,3%) scale(1)}}
@keyframes eagleFloat{to{transform:translate(1%,-1%) rotate(1deg) scale(1.015)}}
@keyframes mammothBreathe{to{transform:translate(-.5%,0) scale(1.018)}}
@keyframes ringSummon{0%{opacity:0;transform:translateX(-50%) scale(.2)}45%{opacity:.9}100%{opacity:.15;transform:translateX(-50%) scale(1.2)}}
@keyframes magicGlow{0%{opacity:0;transform:scale(.7)}50%{opacity:.85}100%{opacity:.5;transform:scale(1.05)}}
@keyframes smokeRise{0%{opacity:0;transform:translateY(35%) scale(.7)}30%{opacity:.9}100%{opacity:.18;transform:translateY(-55%) scale(1.35)}}
@keyframes emberFloat{0%{opacity:0;transform:translateY(0) scale(.5)}18%{opacity:.9}100%{opacity:0;transform:translateY(-75vh) translateX(28px) scale(1.3)}}
@keyframes moonRise{to{opacity:.38;transform:translateX(-50%) scale(1)}}
@keyframes titleReveal{0%{opacity:0;transform:translate(-50%,18px)}100%{opacity:1;transform:translate(-50%,0)}}
@keyframes realmBreathe{0%{transform:scale(1.10);filter:saturate(.55) brightness(.32)}100%{transform:scale(1.03);filter:saturate(.82) brightness(.48)}}
@keyframes loadingPulse{to{transform:scale(1.55);background:#dca43d}}
@keyframes introExit{to{opacity:0;visibility:hidden;filter:blur(3px);transform:scale(1.015)}}

@media (max-width:760px){
  .intro-moon{width:82vw;top:13%}
  .summon-reaper{width:96vw;bottom:15%;max-height:65vh}
  .summon-eagle{width:72vw;left:-18%;bottom:-5%;max-height:44vh}
  .summon-mammoth{width:75vw;right:-22%;bottom:-5%;max-height:45vh}
  .intro-title{bottom:13%}
  .intro-title strong{font-size:clamp(2.3rem,13vw,4.5rem)}
  .royal-curtain{width:52%}
  .curtain-valance{height:9vh}
}
@media (max-width:430px){
  .summon-reaper{width:112vw;bottom:17%}
  .summon-eagle{width:78vw;left:-24%;bottom:1%}
  .summon-mammoth{width:82vw;right:-28%;bottom:0}
  .intro-title{bottom:12%}
  .intro-title span{font-size:.55rem}
  .intro-title small{font-size:.78rem}
}
@media (prefers-reduced-motion:reduce){
  .realm-intro *{animation-duration:.01ms!important;animation-delay:.01ms!important}
}


/* ===== INTRO STAYS UNTIL ENTER THE REALM IS PRESSED ===== */
.intro-enter{
  display:block;
  margin:18px auto 0;
  min-width:min(86vw,340px);
  padding:15px 22px;
  border:1px solid #ef9b25;
  border-radius:10px;
  background:linear-gradient(180deg,#f3aa2d,#de7414);
  color:#130a03;
  font-weight:900;
  font-size:clamp(.88rem,3vw,1.05rem);
  letter-spacing:.04em;
  box-shadow:0 0 30px rgba(236,128,21,.28), inset 0 1px rgba(255,255,255,.25);
  opacity:0;
  transform:translateY(14px) scale(.98);
  pointer-events:none;
  transition:opacity .55s ease, transform .55s ease, box-shadow .2s ease;
}
.realm-intro.intro-ready .intro-enter{
  opacity:1;
  transform:translateY(0) scale(1);
  pointer-events:auto;
}
.realm-intro.intro-ready .intro-loading{
  opacity:0;
  pointer-events:none;
  transition:opacity .35s ease;
}
.realm-intro.intro-ready .intro-title{
  opacity:1!important;
  transform:translate(-50%,0)!important;
}
.intro-enter:active{transform:scale(.985)!important}
@media(max-width:430px){
  .intro-enter{margin-top:14px;padding:14px 18px}
}


/* =========================================================
   KINGDOM 1006 EXACT APPROVED CURTAIN -> REALM INTRO
   Uses the user's two approved images exactly.
   ========================================================= */
.legacy-welcome{display:none!important}
body.intro-lock{overflow:hidden!important;touch-action:none!important}

.exact-intro{
  position:fixed;
  inset:0;
  z-index:99999;
  overflow:hidden;
  background:#020202;
  isolation:isolate;
}
.exact-intro.exact-exit{
  animation:exactIntroExit .72s ease forwards;
  pointer-events:none;
}
.exact-intro.exact-gone{display:none!important}

/* Exact second approved image, visible behind the curtains. */
.realm-view{
  position:absolute;
  inset:0;
  z-index:1;
  background:#020202 url('/assets/intro-realm-exact.jpg') center center / 100% 100% no-repeat;
}

/* Exact first approved curtain image split into two moving halves. */
.curtain-piece{
  position:absolute;
  top:0;
  bottom:0;
  width:50.12%;
  z-index:10;
  background-image:url('/assets/intro-curtain-exact.jpg');
  background-repeat:no-repeat;
  background-size:200% 100%;
  will-change:transform;
  filter:saturate(1.02) contrast(1.02);
}
.curtain-piece-left{
  left:0;
  background-position:left center;
  animation:exactCurtainLeft 2.25s 3s cubic-bezier(.72,.02,.18,1) forwards;
}
.curtain-piece-right{
  right:0;
  background-position:right center;
  animation:exactCurtainRight 2.25s 3s cubic-bezier(.72,.02,.18,1) forwards;
}

/* Purple smoke is independent CSS, so it visibly rolls in a loop. */
.royal-fog{
  position:absolute;
  z-index:16;
  left:-18%;
  bottom:-8%;
  width:136%;
  height:31vh;
  min-height:180px;
  pointer-events:none;
  mix-blend-mode:screen;
  filter:blur(22px) saturate(1.2);
  opacity:.58;
  background:
    radial-gradient(ellipse at 8% 72%,rgba(168,70,255,.58) 0 13%,rgba(92,31,169,.30) 30%,transparent 55%),
    radial-gradient(ellipse at 33% 78%,rgba(120,46,220,.55) 0 16%,rgba(69,28,139,.26) 34%,transparent 58%),
    radial-gradient(ellipse at 60% 68%,rgba(191,83,255,.52) 0 13%,rgba(96,31,182,.24) 34%,transparent 57%),
    radial-gradient(ellipse at 84% 80%,rgba(73,227,153,.18) 0 10%,rgba(94,36,179,.28) 31%,transparent 56%);
  animation:fogDriftExact 8s ease-in-out infinite alternate;
}
.royal-fog:before,
.royal-fog:after{
  content:"";
  position:absolute;
  inset:5% -10% -10%;
  border-radius:50%;
  filter:blur(28px);
}
.royal-fog:before{
  background:
    radial-gradient(ellipse at 22% 62%,rgba(224,126,255,.38),transparent 34%),
    radial-gradient(ellipse at 65% 70%,rgba(132,52,240,.40),transparent 37%);
  animation:fogCloudExactA 6s linear infinite alternate;
}
.royal-fog:after{
  background:
    radial-gradient(ellipse at 39% 72%,rgba(55,217,148,.12),transparent 34%),
    radial-gradient(ellipse at 78% 59%,rgba(197,89,255,.35),transparent 38%);
  animation:fogCloudExactB 9s ease-in-out infinite alternate-reverse;
}
.fog-two{
  opacity:.38;
  bottom:-1%;
  filter:blur(34px);
  transform:scaleX(1.12);
  animation-duration:11s;
}
.fog-three{
  opacity:.26;
  bottom:-13%;
  filter:blur(42px);
  transform:scaleX(.94);
  animation-duration:14s;
}

/* Fog stays with the curtain and disappears as the curtain finishes opening. */
.exact-intro.intro-opening .royal-fog{
  animation:
    fogDriftExact 8s ease-in-out infinite alternate,
    fogFadeOut 1.5s 1.05s ease forwards;
}

/* Skip only skips the animation; it does NOT enter the website. */
.exact-skip{
  position:absolute;
  top:max(18px,env(safe-area-inset-top));
  right:max(18px,env(safe-area-inset-right));
  z-index:40;
  border:1px solid rgba(213,169,83,.72);
  color:#e9c778;
  background:rgba(3,3,3,.54);
  border-radius:999px;
  padding:10px 18px;
  font:700 .72rem/1 system-ui,-apple-system,sans-serif;
  letter-spacing:.13em;
  backdrop-filter:blur(8px);
}

/* Transparent button exactly over the ENTER THE REALM button in approved image. */
.realm-button-hotspot{
  position:absolute;
  z-index:35;
  left:32%;
  top:85.6%;
  width:36%;
  height:10.4%;
  border:0;
  background:transparent;
  cursor:pointer;
  opacity:0;
  pointer-events:none;
}
.exact-intro.realm-ready .realm-button-hotspot{
  opacity:1;
  pointer-events:auto;
}

/* Small hover/tap glow without altering the approved button artwork. */
.exact-intro.realm-ready .realm-button-hotspot:active{
  box-shadow:0 0 42px rgba(155,69,227,.42);
  border-radius:18px;
}

@keyframes exactCurtainLeft{
  0%{transform:translateX(0)}
  100%{transform:translateX(-101.5%)}
}
@keyframes exactCurtainRight{
  0%{transform:translateX(0)}
  100%{transform:translateX(101.5%)}
}
@keyframes fogDriftExact{
  0%{transform:translate3d(-4%,8%,0) scale(1.03)}
  35%{transform:translate3d(3%,-2%,0) scale(1.09)}
  72%{transform:translate3d(-1%,-8%,0) scale(1.13)}
  100%{transform:translate3d(5%,1%,0) scale(1.06)}
}
@keyframes fogCloudExactA{
  from{transform:translateX(-6%) scale(.96);opacity:.42}
  to{transform:translateX(7%) scale(1.1);opacity:.72}
}
@keyframes fogCloudExactB{
  from{transform:translate(-4%,4%) scale(1.06);opacity:.38}
  to{transform:translate(6%,-6%) scale(.97);opacity:.68}
}
@keyframes fogFadeOut{
  to{opacity:0;transform:translateY(20%) scale(1.08)}
}
@keyframes exactIntroExit{
  to{opacity:0;visibility:hidden;transform:scale(1.01)}
}

/* Phone layout: preserve the exact compositions rather than crop pieces away. */
@media(max-width:760px){
  .realm-view,
  .curtain-piece{
    background-size:100% 100%;
  }

  /* For split halves on mobile, each half needs the full-image scaling reference. */
  .curtain-piece{
    background-size:200% 100%;
  }

  .royal-fog{
    height:27vh;
    min-height:170px;
    bottom:-4%;
    opacity:.52;
  }

  .realm-button-hotspot{
    left:27%;
    width:46%;
    top:85%;
    height:11%;
  }
}


/* =========================================================
   SMOOTH INTRO FIX
   - Curtains open once
   - Only one final Kingdom 1006 image exists
   - Summoning is CSS-only to prevent image popping/glitching
   ========================================================= */

.exact-intro{
  position:fixed;inset:0;z-index:99999;overflow:hidden;
  background:#020202;isolation:isolate;
}
.exact-intro.exact-exit{
  animation:smoothIntroExit .72s ease forwards;
  pointer-events:none;
}
.exact-intro.exact-gone{display:none!important}

/* One and only final realm artwork. */
.realm-view{
  position:absolute;inset:0;z-index:1;
  background:#020202 url('/assets/intro-realm-exact.jpg') center center / 100% 100% no-repeat;
  opacity:1;
  transform:scale(1);
  filter:brightness(.58) saturate(.78);
  transition:filter 1.2s ease;
}
.exact-intro.summoning .realm-view{
  animation:realmSummonPulse 3.0s ease both;
}
.exact-intro.realm-ready .realm-view{
  filter:brightness(1) saturate(1);
}

/* Exact curtain artwork. No inherited animation. */
.exact-intro .curtain-piece{
  position:absolute;top:0;bottom:0;width:50.12%;z-index:30;
  background-image:url('/assets/intro-curtain-exact.jpg');
  background-repeat:no-repeat;background-size:200% 100%;
  animation:none!important;
  transition:none!important;
  will-change:transform;
}
.exact-intro .curtain-piece-left{
  left:0;background-position:left center;
  transform:translate3d(0,0,0);
}
.exact-intro .curtain-piece-right{
  right:0;background-position:right center;
  transform:translate3d(0,0,0);
}
.exact-intro.open-curtains .curtain-piece-left{
  animation:smoothCurtainLeft 2.15s cubic-bezier(.72,.02,.18,1) forwards!important;
}
.exact-intro.open-curtains .curtain-piece-right{
  animation:smoothCurtainRight 2.15s cubic-bezier(.72,.02,.18,1) forwards!important;
}

/* Curtain fog loops while closed, then fades as curtain opens. */
.royal-fog{
  position:absolute;z-index:34;left:-18%;bottom:-7%;
  width:136%;height:27vh;min-height:165px;
  pointer-events:none;mix-blend-mode:screen;
  filter:blur(25px) saturate(1.18);
  opacity:.46;
  background:
    radial-gradient(ellipse at 12% 72%,rgba(176,72,255,.46),transparent 43%),
    radial-gradient(ellipse at 36% 80%,rgba(123,48,220,.43),transparent 47%),
    radial-gradient(ellipse at 63% 70%,rgba(196,88,255,.40),transparent 46%),
    radial-gradient(ellipse at 87% 80%,rgba(77,225,151,.14),rgba(105,39,185,.23) 27%,transparent 50%);
  animation:curtainFogSmooth 8s ease-in-out infinite alternate;
}
.fog-two{opacity:.25;bottom:-1%;filter:blur(38px);animation-duration:12s}
.exact-intro.open-curtains .royal-fog{
  animation:curtainFogSmooth 8s ease-in-out infinite alternate,fogFadeSmooth 1.35s .7s ease forwards;
}

/* CSS-only summoning FX */
.summon-fx{
  position:absolute;inset:0;z-index:12;
  pointer-events:none;
  opacity:0;
}
.exact-intro.summoning .summon-fx{
  opacity:1;
}

.fx-glow{
  position:absolute;bottom:-14%;width:55vw;height:55vh;border-radius:50%;
  opacity:0;filter:blur(52px);mix-blend-mode:screen;
  background:radial-gradient(circle,rgba(149,63,255,.48),rgba(60,233,145,.19) 32%,rgba(80,28,145,.12) 51%,transparent 73%);
}
.fx-left{left:-8%}.fx-right{right:-8%}
.exact-intro.summoning .fx-glow{
  animation:fxGlowBloom 2.6s ease-out forwards;
}

.fx-ring{
  position:absolute;left:50%;bottom:8%;
  width:min(72vw,820px);height:120px;border-radius:50%;
  transform:translateX(-50%) scale(.24);
  opacity:0;
  border:2px solid rgba(134,255,186,.2);
  box-shadow:
    0 0 20px rgba(112,255,169,.28),
    0 0 68px rgba(154,67,255,.28),
    inset 0 0 36px rgba(128,255,178,.12);
}
.fx-ring-two{width:min(58vw,650px);height:86px}
.exact-intro.summoning .fx-ring-one{animation:ringSmooth 1.45s .25s ease-out forwards}
.exact-intro.summoning .fx-ring-two{animation:ringSmooth 1.45s .55s ease-out forwards}

.fx-fog{
  position:absolute;bottom:-18%;width:58vw;height:48vh;border-radius:50%;
  opacity:0;filter:blur(30px);mix-blend-mode:screen;
  background:radial-gradient(circle at 50% 55%,rgba(176,74,255,.38),rgba(58,220,143,.16) 32%,rgba(84,31,151,.08) 57%,transparent 73%);
}
.fx-fog-a{left:-5%}.fx-fog-b{right:-5%}
.exact-intro.summoning .fx-fog-a{animation:fxFogRise 2.8s .2s ease-out forwards}
.exact-intro.summoning .fx-fog-b{animation:fxFogRise 3.0s .38s ease-out forwards}

.fx-sparks i{
  position:absolute;bottom:-4%;width:4px;height:4px;border-radius:50%;
  background:#cf8aff;box-shadow:0 0 9px #78efab;opacity:0;
}
.fx-sparks i:nth-child(1){left:10%}.fx-sparks i:nth-child(2){left:21%}.fx-sparks i:nth-child(3){left:33%}
.fx-sparks i:nth-child(4){left:45%}.fx-sparks i:nth-child(5){left:57%}.fx-sparks i:nth-child(6){left:69%}
.fx-sparks i:nth-child(7){left:81%}.fx-sparks i:nth-child(8){left:92%}
.exact-intro.summoning .fx-sparks i{animation:fxSparkRise 2.9s .35s linear infinite}

/* After summon, fade FX only. Final image never disappears/reappears. */
.exact-intro.realm-ready .summon-fx{
  animation:fxLayerFade .9s ease forwards;
}

.realm-button-hotspot{
  position:absolute;z-index:50;
  left:31%;top:85.5%;width:38%;height:10.5%;
  border:0;background:transparent;
  opacity:0;pointer-events:none;
}
.exact-intro.realm-ready .realm-button-hotspot{
  opacity:1;pointer-events:auto;
}

@keyframes smoothCurtainLeft{
  from{transform:translate3d(0,0,0)}
  to{transform:translate3d(-101.5%,0,0)}
}
@keyframes smoothCurtainRight{
  from{transform:translate3d(0,0,0)}
  to{transform:translate3d(101.5%,0,0)}
}
@keyframes curtainFogSmooth{
  0%{transform:translate3d(-4%,7%,0) scale(1.02)}
  45%{transform:translate3d(3%,-3%,0) scale(1.08)}
  100%{transform:translate3d(5%,1%,0) scale(1.04)}
}
@keyframes fogFadeSmooth{
  to{opacity:0;transform:translateY(26%) scale(1.06)}
}
@keyframes realmSummonPulse{
  0%{filter:brightness(.58) saturate(.78);transform:scale(1.02)}
  28%{filter:brightness(.77) saturate(.98);transform:scale(1.01)}
  58%{filter:brightness(1.05) saturate(1.15);transform:scale(1)}
  100%{filter:brightness(1) saturate(1);transform:scale(1)}
}
@keyframes fxGlowBloom{
  0%{opacity:0;transform:scale(.62)}
  48%{opacity:.9}
  100%{opacity:.4;transform:scale(1.06)}
}
@keyframes ringSmooth{
  0%{opacity:0;transform:translateX(-50%) scale(.2)}
  48%{opacity:.92}
  100%{opacity:.1;transform:translateX(-50%) scale(1.2)}
}
@keyframes fxFogRise{
  0%{opacity:0;transform:translateY(40%) scale(.72)}
  36%{opacity:.72}
  100%{opacity:.16;transform:translateY(-52%) scale(1.34)}
}
@keyframes fxSparkRise{
  0%{opacity:0;transform:translateY(0)}
  20%{opacity:.9}
  100%{opacity:0;transform:translateY(-74vh) translateX(20px)}
}
@keyframes fxLayerFade{
  to{opacity:0}
}
@keyframes smoothIntroExit{
  to{opacity:0;visibility:hidden;transform:scale(1.01)}
}

@media(max-width:760px){
  .realm-view{background-size:100% 100%}
  .exact-intro .curtain-piece{background-size:200% 100%}
  .fx-ring{width:88vw}
  .realm-button-hotspot{left:26%;width:48%;top:85%;height:11%}
}


/* ===== FULL CHARACTER SUMMONING SEQUENCE ===== */
.summon-fx{position:absolute;inset:0;z-index:12;pointer-events:none;opacity:0}
.exact-intro.summoning .summon-fx{opacity:1}

.summon-char{
  position:absolute;
  object-fit:contain;
  opacity:0;
  will-change:transform,opacity,filter;
  mix-blend-mode:screen;
  filter:saturate(1.05) contrast(1.10) drop-shadow(0 24px 30px rgba(0,0,0,.75));
}
.summon-reaper-char{
  left:50%;bottom:9%;
  width:min(70vw,850px);
  max-height:78vh;
  transform:translate(-50%,24%) scale(.74);
}
.summon-eagle-char{
  left:-6%;bottom:-11%;
  width:min(54vw,640px);
  max-height:58vh;
  transform:translate(-10%,65%) rotate(-8deg) scale(.66);
}
.summon-mammoth-char{
  right:-7%;bottom:-12%;
  width:min(56vw,680px);
  max-height:60vh;
  transform:translate(10%,68%) scale(.66);
}

.exact-intro.summoning .summon-reaper-char{
  animation:
    reaperSummonIn 1.35s .15s cubic-bezier(.18,.82,.18,1) forwards,
    reaperSummonHover 2.5s 1.55s ease-in-out infinite alternate;
}
.exact-intro.summoning .summon-eagle-char{
  animation:
    eagleSummonRise 1.45s 1.05s cubic-bezier(.14,.84,.16,1) forwards,
    eagleSummonFloat 2.15s 2.55s ease-in-out infinite alternate;
}
.exact-intro.summoning .summon-mammoth-char{
  animation:
    mammothSummonRise 1.55s 1.30s cubic-bezier(.14,.84,.16,1) forwards,
    mammothSummonBreath 2.45s 2.90s ease-in-out infinite alternate;
}

.fx-center{left:23%;right:23%;width:auto}
.exact-intro.summoning .fx-glow{
  animation:fxGlowBloom 3s ease-out forwards
}
.exact-intro.summoning .fx-left{animation-delay:.7s}
.exact-intro.summoning .fx-center{animation-delay:.05s}
.exact-intro.summoning .fx-right{animation-delay:.95s}

.fx-ring-three{
  width:min(46vw,520px)!important;
  height:70px!important;
}
.exact-intro.summoning .fx-ring-one{animation:ringSmooth 1.55s .20s ease-out forwards}
.exact-intro.summoning .fx-ring-two{animation:ringSmooth 1.55s .48s ease-out forwards}
.exact-intro.summoning .fx-ring-three{animation:ringSmooth 1.55s .78s ease-out forwards}

.fx-fog-c{
  left:22%;
  width:56%;
}
.exact-intro.summoning .fx-fog-a{animation:fxFogRise 3.1s .65s ease-out forwards}
.exact-intro.summoning .fx-fog-b{animation:fxFogRise 3.2s .85s ease-out forwards}
.exact-intro.summoning .fx-fog-c{animation:fxFogRise 3.0s .18s ease-out forwards}

.fx-sparks i:nth-child(9){left:27%}
.fx-sparks i:nth-child(10){left:74%}
.exact-intro.summoning .fx-sparks i{animation:fxSparkRise 3.1s .4s linear infinite}

/* One smooth handoff to the final poster. */
.exact-intro.realm-ready .summon-char,
.exact-intro.realm-ready .fx-glow,
.exact-intro.realm-ready .fx-ring,
.exact-intro.realm-ready .fx-fog,
.exact-intro.realm-ready .fx-sparks{
  animation:characterFxFade .85s ease forwards!important;
}
.exact-intro.realm-ready .realm-view{
  animation:finalPosterSettle 1s ease forwards;
}

@keyframes reaperSummonIn{
  0%{
    opacity:0;
    transform:translate(-50%,27%) scale(.72);
    filter:saturate(.9) brightness(.35) blur(4px) drop-shadow(0 24px 30px rgba(0,0,0,.7));
  }
  62%{opacity:.98}
  100%{
    opacity:1;
    transform:translate(-50%,5%) scale(1);
    filter:saturate(1.05) brightness(.92) blur(0) drop-shadow(0 24px 30px rgba(0,0,0,.75));
  }
}
@keyframes reaperSummonHover{
  to{transform:translate(-50%,1.5%) scale(1.02)}
}
@keyframes eagleSummonRise{
  0%{opacity:0;transform:translate(-10%,68%) rotate(-9deg) scale(.64)}
  68%{opacity:1}
  100%{opacity:1;transform:translate(0,1%) rotate(-1deg) scale(1)}
}
@keyframes eagleSummonFloat{
  to{transform:translate(1%,-2.5%) rotate(1.5deg) scale(1.018)}
}
@keyframes mammothSummonRise{
  0%{opacity:0;transform:translate(10%,70%) scale(.64)}
  70%{opacity:1}
  100%{opacity:1;transform:translate(0,1%) scale(1)}
}
@keyframes mammothSummonBreath{
  to{transform:translate(-.5%,-1.5%) scale(1.02)}
}
@keyframes characterFxFade{
  to{opacity:0;filter:blur(1px)}
}
@keyframes finalPosterSettle{
  0%{filter:brightness(.7) saturate(.9);transform:scale(1.015)}
  100%{filter:brightness(1) saturate(1);transform:scale(1)}
}

@media(max-width:760px){
  .summon-reaper-char{width:110vw;bottom:17%;max-height:63vh}
  .summon-eagle-char{width:79vw;left:-25%;bottom:-2%;max-height:43vh}
  .summon-mammoth-char{width:84vw;right:-29%;bottom:-3%;max-height:45vh}
}


/* ===== FINAL INTRO HOLD FIX =====
   Keep the summoned Reaper, eagle and mammoth alive/hovering until ENTER THE REALM.
   Never fade the summoned character layer at realm-ready. */
.exact-intro.realm-ready .summon-fx{opacity:1!important;animation:none!important}
.exact-intro.realm-ready .summon-char{opacity:1!important}
.exact-intro.realm-ready .summon-reaper-char{
  animation:reaperSummonHover 2.5s ease-in-out infinite alternate!important;
  transform:translate(-50%,8%) scale(1)!important;
}
.exact-intro.realm-ready .summon-eagle-char{
  animation:eagleSummonFloat 2.15s ease-in-out infinite alternate!important;
  transform:translate(0,4%) rotate(-2deg) scale(1)!important;
}
.exact-intro.realm-ready .summon-mammoth-char{
  animation:mammothSummonBreath 2.45s ease-in-out infinite alternate!important;
  transform:translate(0,3%) scale(1)!important;
}
.exact-intro.realm-ready .fx-glow{opacity:.32!important;animation:fxGlowHold 4.5s ease-in-out infinite alternate!important}
.exact-intro.realm-ready .fx-ring{animation:ringHold 3.8s ease-in-out infinite!important}
.exact-intro.realm-ready .fx-fog{opacity:.20!important;animation:fxFogHold 6s ease-in-out infinite alternate!important}
.exact-intro.realm-ready .fx-sparks{opacity:1!important;animation:none!important}
.exact-intro.realm-ready .fx-sparks i{animation:fxSparkRise 3.1s linear infinite!important}
@keyframes fxGlowHold{from{transform:scale(.95);opacity:.24}to{transform:scale(1.08);opacity:.42}}
@keyframes ringHold{0%{opacity:.06;transform:translateX(-50%) scale(.86)}50%{opacity:.30;transform:translateX(-50%) scale(1.08)}100%{opacity:.06;transform:translateX(-50%) scale(.86)}}
@keyframes fxFogHold{from{transform:translateY(-20%) scale(1.08);opacity:.13}to{transform:translateY(-35%) scale(1.28);opacity:.27}}


/* =========================================================
   NO DUPLICATE FINAL POSTER
   Characters remain as the actual animated layers.
   ========================================================= */
.realm-view{display:none!important}

.realm-empty-bg{
  position:absolute;
  inset:0;
  z-index:1;
  background:
    linear-gradient(180deg,rgba(3,2,7,.18),rgba(2,2,4,.28)),
    url('/assets/realm-summon-bg.jpg') center/cover no-repeat;
  filter:brightness(.48) saturate(.82) hue-rotate(8deg);
  transform:scale(1.025);
}
.realm-empty-bg:after{
  content:"";
  position:absolute;inset:0;
  background:
    radial-gradient(circle at 50% 24%,rgba(168,96,255,.10),transparent 24%),
    radial-gradient(circle at 50% 80%,rgba(79,235,147,.08),transparent 30%),
    linear-gradient(180deg,rgba(0,0,0,.08),rgba(0,0,0,.36));
}

/* Keep the summoned layers forever until Enter Realm is clicked */
.exact-intro.realm-ready .summon-char,
.exact-intro.realm-ready .fx-glow,
.exact-intro.realm-ready .fx-ring,
.exact-intro.realm-ready .fx-fog,
.exact-intro.realm-ready .fx-sparks{
  animation-play-state:running!important;
  opacity:1;
}
.exact-intro.realm-ready .summon-fx{
  opacity:1!important;
  animation:none!important;
}
.exact-intro.realm-ready .summon-reaper-char{
  animation:reaperSummonHover 2.5s ease-in-out infinite alternate!important;
  opacity:1!important;
  transform:translate(-50%,5%) scale(1)!important;
}
.exact-intro.realm-ready .summon-eagle-char{
  animation:eagleSummonFloat 2.15s ease-in-out infinite alternate!important;
  opacity:1!important;
  transform:translate(0,1%) rotate(-1deg) scale(1)!important;
}
.exact-intro.realm-ready .summon-mammoth-char{
  animation:mammothSummonBreath 2.45s ease-in-out infinite alternate!important;
  opacity:1!important;
  transform:translate(0,1%) scale(1)!important;
}
.exact-intro.realm-ready .fx-ring-one{
  animation:ringLoopOne 2.8s ease-in-out infinite!important;
}
.exact-intro.realm-ready .fx-ring-two{
  animation:ringLoopTwo 3.4s .4s ease-in-out infinite!important;
}
.exact-intro.realm-ready .fx-ring-three{
  animation:ringLoopThree 4s .8s ease-in-out infinite!important;
}
.exact-intro.realm-ready .fx-glow{
  animation:glowLoop 2.6s ease-in-out infinite alternate!important;
}
.exact-intro.realm-ready .fx-fog-a{
  animation:fogLoopA 5.5s ease-in-out infinite alternate!important;
}
.exact-intro.realm-ready .fx-fog-b{
  animation:fogLoopB 6.2s ease-in-out infinite alternate-reverse!important;
}
.exact-intro.realm-ready .fx-fog-c{
  animation:fogLoopC 7s ease-in-out infinite alternate!important;
}
.exact-intro.realm-ready .fx-sparks i{
  animation:fxSparkRise 3.1s linear infinite!important;
}

.realm-copy{
  position:absolute;
  z-index:24;
  left:50%;
  bottom:5.5%;
  width:min(92%,760px);
  transform:translateX(-50%);
  text-align:center;
  opacity:0;
  pointer-events:none;
  transition:opacity .6s ease,transform .6s ease;
}
.exact-intro.realm-ready .realm-copy{
  opacity:1;
  pointer-events:auto;
  transform:translateX(-50%) translateY(0);
}
.realm-kicker{
  color:#d8b170;
  font-size:clamp(.62rem,1.8vw,.82rem);
  letter-spacing:.22em;
  font-weight:800;
}
.realm-title{
  margin-top:.18em;
  color:#eadcc2;
  font-family:Georgia,serif;
  font-weight:800;
  font-size:clamp(2.6rem,8vw,5.6rem);
  line-height:.92;
  text-shadow:0 5px 24px #000;
}
.realm-title span{
  display:block;
  color:#a95cf3;
  font-size:.88em;
}
.realm-tagline{
  color:#d0c3b0;
  font-family:Georgia,serif;
  font-size:clamp(.8rem,2vw,1rem);
  margin:10px auto 16px;
}
.realm-enter-real{
  border:1px solid #b6873c;
  background:linear-gradient(180deg,#28113a,#16081f);
  color:#e9c27e;
  padding:14px 26px;
  min-width:min(82vw,360px);
  border-radius:10px;
  font-family:Georgia,serif;
  font-weight:700;
  font-size:clamp(.9rem,2.5vw,1.05rem);
  box-shadow:
    0 0 0 2px rgba(70,25,101,.55) inset,
    0 0 24px rgba(139,74,208,.20);
}

/* Make sure older rules cannot fade the summoned characters */
@keyframes characterFxFade{to{opacity:1;filter:none}}
@keyframes fxLayerFade{to{opacity:1}}

@keyframes ringLoopOne{
  0%,100%{opacity:.15;transform:translateX(-50%) scale(.92)}
  50%{opacity:.75;transform:translateX(-50%) scale(1.10)}
}
@keyframes ringLoopTwo{
  0%,100%{opacity:.12;transform:translateX(-50%) scale(.84)}
  50%{opacity:.58;transform:translateX(-50%) scale(1.06)}
}
@keyframes ringLoopThree{
  0%,100%{opacity:.10;transform:translateX(-50%) scale(.78)}
  50%{opacity:.46;transform:translateX(-50%) scale(1.03)}
}
@keyframes glowLoop{
  from{opacity:.26;transform:scale(.95)}
  to{opacity:.62;transform:scale(1.08)}
}
@keyframes fogLoopA{
  from{opacity:.16;transform:translateY(4%) scale(1.02)}
  to{opacity:.36;transform:translateY(-18%) scale(1.18)}
}
@keyframes fogLoopB{
  from{opacity:.14;transform:translate(2%,5%) scale(1)}
  to{opacity:.32;transform:translate(-4%,-14%) scale(1.15)}
}
@keyframes fogLoopC{
  from{opacity:.12;transform:translateY(8%) scale(.96)}
  to{opacity:.28;transform:translateY(-10%) scale(1.12)}
}

@media(max-width:760px){
  .realm-copy{bottom:4.5%;width:94%}
  .realm-title{font-size:clamp(2.4rem,12vw,4.6rem)}
  .realm-enter-real{min-width:78vw}
}


/* =========================================================
   TRUE INFINITE HOVER
   Entrance and hover are on DIFFERENT DOM elements.
   This prevents Safari from stopping/replacing the hover
   animation when realm-ready is applied.
   ========================================================= */

/* Disable all legacy direct-character rules from prior versions. */
.summon-char,
.summon-reaper-char,
.summon-eagle-char,
.summon-mammoth-char{
  display:none!important;
}

/* OUTER slots handle only the one-time rise/summon. */
.summon-slot{
  position:absolute;
  z-index:8;
  opacity:0;
  pointer-events:none;
  will-change:transform,opacity;
}
.reaper-slot{
  left:50%;
  bottom:17%;
  width:min(110vw,850px);
  max-width:850px;
  transform:translate(-50%,28%);
}
.eagle-slot{
  left:-25%;
  bottom:-2%;
  width:min(79vw,640px);
  max-width:640px;
  transform:translate(-10%,72%) rotate(-8deg) scale(.68);
}
.mammoth-slot{
  right:-29%;
  bottom:-3%;
  width:min(84vw,680px);
  max-width:680px;
  transform:translate(10%,74%) scale(.68);
}

/* INNER images handle ONLY the endless subtle movement. */
.summon-hover{
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
  opacity:1;
  will-change:transform,filter;
  transform-origin:50% 55%;
  filter:saturate(1.06) contrast(1.08) drop-shadow(0 24px 30px rgba(0,0,0,.74));
}
.reaper-hover{
  animation:reaperFloatNeverStop 3.15s ease-in-out infinite alternate;
}
.eagle-hover{
  animation:eagleFloatNeverStop 2.65s ease-in-out infinite alternate;
}
.mammoth-hover{
  animation:mammothFloatNeverStop 3.55s ease-in-out infinite alternate;
}

/* One-time entrance. The wrapper keeps its final state with forwards. */
.exact-intro.summoning .reaper-slot{
  animation:reaperSlotRise 1.35s .15s cubic-bezier(.18,.82,.18,1) forwards!important;
}
.exact-intro.summoning .eagle-slot{
  animation:eagleSlotRise 1.45s 1.05s cubic-bezier(.14,.84,.16,1) forwards!important;
}
.exact-intro.summoning .mammoth-slot{
  animation:mammothSlotRise 1.55s 1.30s cubic-bezier(.14,.84,.16,1) forwards!important;
}

/* realm-ready MUST NOT replace or stop either set of animations. */
.exact-intro.realm-ready .summon-slot{
  opacity:1!important;
  animation-play-state:running!important;
}
.exact-intro.realm-ready .summon-hover{
  opacity:1!important;
  animation-play-state:running!important;
}

/* Explicitly neutralize old fade rules that targeted the summon layer. */
.exact-intro.realm-ready .summon-fx{
  opacity:1!important;
  animation:none!important;
}

/* Entrance keyframes */
@keyframes reaperSlotRise{
  0%{opacity:0;transform:translate(-50%,28%) scale(.76)}
  55%{opacity:1}
  100%{opacity:1;transform:translate(-50%,0) scale(1)}
}
@keyframes eagleSlotRise{
  0%{opacity:0;transform:translate(-10%,72%) rotate(-8deg) scale(.68)}
  65%{opacity:1}
  100%{opacity:1;transform:translate(0,0) rotate(-1deg) scale(1)}
}
@keyframes mammothSlotRise{
  0%{opacity:0;transform:translate(10%,74%) scale(.68)}
  68%{opacity:1}
  100%{opacity:1;transform:translate(0,0) scale(1)}
}

/* Endless hover keyframes. These are never swapped out. */
@keyframes reaperFloatNeverStop{
  0%{
    transform:translate3d(0,0,0) scale(1) rotate(-.18deg);
    filter:saturate(1.04) brightness(.98) drop-shadow(0 23px 29px rgba(0,0,0,.74));
  }
  50%{
    transform:translate3d(0,-8px,0) scale(1.009) rotate(.12deg);
    filter:saturate(1.08) brightness(1.025) drop-shadow(0 27px 33px rgba(0,0,0,.78));
  }
  100%{
    transform:translate3d(1px,-15px,0) scale(1.016) rotate(.25deg);
    filter:saturate(1.10) brightness(1.04) drop-shadow(0 30px 36px rgba(0,0,0,.80));
  }
}
@keyframes eagleFloatNeverStop{
  0%{transform:translate3d(0,0,0) rotate(-.8deg) scale(1)}
  50%{transform:translate3d(7px,-10px,0) rotate(.45deg) scale(1.012)}
  100%{transform:translate3d(-3px,-18px,0) rotate(1.35deg) scale(1.022)}
}
@keyframes mammothFloatNeverStop{
  0%{transform:translate3d(0,0,0) rotate(.10deg) scale(1)}
  50%{transform:translate3d(-5px,-8px,0) rotate(-.14deg) scale(1.008)}
  100%{transform:translate3d(3px,-14px,0) rotate(.20deg) scale(1.016)}
}

/* Make the continuing movement more obvious on phones without being jumpy. */
@media(min-width:761px){
  .reaper-slot{bottom:9%;width:min(70vw,850px)}
  .eagle-slot{left:-6%;bottom:-11%;width:min(54vw,640px)}
  .mammoth-slot{right:-7%;bottom:-12%;width:min(56vw,680px)}
}


/* =========================================================
   KINGDOM 1006 — EMERALD / PURPLE NECROMANCY SITE THEME
   Applies to the real site AFTER Enter the Realm.
   Intro animation rules remain untouched.
   ========================================================= */

:root{
  --k-bg:#050508;
  --k-bg-2:#08070d;
  --k-panel:#0b0911;
  --k-panel-2:#0d0a15;
  --k-purple:#7b2cbf;
  --k-purple-bright:#b056ff;
  --k-purple-soft:#4b1d69;
  --k-emerald:#13c878;
  --k-emerald-bright:#4cffae;
  --k-emerald-dark:#075f3a;
  --k-gold:#d6a84b;
  --k-gold-soft:#8a672c;
  --k-cream:#f0e5d2;
  --k-muted:#a89eaa;
  --k-line:rgba(132,62,184,.28);
}

/* Main website background */
body:not(.intro-lock){
  background:
    radial-gradient(circle at 78% 8%,rgba(92,32,143,.20),transparent 28%),
    radial-gradient(circle at 15% 64%,rgba(11,154,91,.12),transparent 30%),
    linear-gradient(180deg,#030306 0%,#09070f 48%,#050508 100%) !important;
  color:var(--k-cream);
}
body:not(.intro-lock)::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  pointer-events:none;
  background:
    radial-gradient(circle at 50% 0%,rgba(139,66,191,.08),transparent 38%),
    repeating-linear-gradient(115deg,transparent 0 84px,rgba(255,255,255,.006) 85px 86px);
}
body:not(.intro-lock)::after{
  content:"";
  position:fixed;
  left:-10%;
  right:-10%;
  bottom:-13vh;
  height:32vh;
  z-index:-1;
  pointer-events:none;
  opacity:.35;
  filter:blur(42px);
  background:
    radial-gradient(ellipse at 18% 55%,rgba(138,48,214,.38),transparent 38%),
    radial-gradient(ellipse at 52% 75%,rgba(29,192,116,.20),transparent 40%),
    radial-gradient(ellipse at 84% 60%,rgba(113,35,184,.34),transparent 40%);
  animation:siteFogDrift 10s ease-in-out infinite alternate;
}

/* Top navigation */
.topbar{
  background:rgba(4,4,8,.94)!important;
  border-bottom:1px solid rgba(64,224,142,.17)!important;
  box-shadow:0 8px 30px rgba(0,0,0,.34);
  backdrop-filter:blur(14px);
}
.brand b{
  color:#e7d7b9!important;
  text-shadow:0 0 18px rgba(176,86,255,.10);
}
.brand small{
  color:#8f8695!important;
  letter-spacing:.18em;
}
.account-btn{
  color:#e7decf!important;
  border-color:rgba(176,86,255,.40)!important;
  background:
    linear-gradient(180deg,rgba(31,18,42,.82),rgba(8,8,12,.94))!important;
  box-shadow:
    inset 0 0 18px rgba(35,204,126,.035),
    0 0 18px rgba(126,47,189,.08);
}
.account-btn:hover{
  border-color:rgba(76,255,174,.54)!important;
}

/* Sidebar */
.sidebar{
  background:
    radial-gradient(circle at 15% 12%,rgba(91,35,135,.18),transparent 24%),
    linear-gradient(180deg,rgba(6,5,10,.985),rgba(7,6,12,.99))!important;
  border-right:1px solid rgba(79,218,146,.16)!important;
}
.nav-btn{
  color:#aea6b2!important;
  border:1px solid transparent!important;
}
.nav-btn:hover{
  color:#eee3d1!important;
  background:rgba(113,47,165,.10)!important;
  border-color:rgba(135,64,190,.12)!important;
}
.nav-btn.active{
  color:#efe4d2!important;
  background:
    linear-gradient(90deg,rgba(93,37,141,.28),rgba(14,144,87,.08))!important;
  border-color:rgba(176,86,255,.20)!important;
  box-shadow:
    inset 3px 0 var(--k-emerald),
    0 0 24px rgba(119,48,176,.08)!important;
}
.nav-btn.active svg,
.nav-btn.active .icon{
  color:var(--k-emerald-bright)!important;
}

/* Hero after entering the site */
.hero{
  position:relative;
  overflow:hidden;
  border-color:rgba(134,54,188,.35)!important;
  background:
    radial-gradient(circle at 82% 17%,rgba(76,255,174,.11),transparent 19%),
    radial-gradient(circle at 75% 28%,rgba(158,70,225,.18),transparent 31%),
    linear-gradient(135deg,#0b0911 0%,#090710 54%,#0b0c0b 100%)!important;
  box-shadow:
    inset 0 0 55px rgba(124,45,183,.055),
    0 22px 60px rgba(0,0,0,.30)!important;
}
.hero::after{
  content:"✦  ◆  ☾";
  position:absolute;
  top:28px;
  right:34px;
  color:rgba(77,255,176,.44);
  font-size:clamp(1rem,3vw,1.8rem);
  letter-spacing:.34em;
  text-shadow:0 0 18px rgba(76,255,174,.18);
}
.hero h1{
  color:#eadcc2!important;
  text-shadow:0 4px 18px rgba(0,0,0,.62);
}
.hero h1 span{
  color:var(--k-purple-bright)!important;
  text-shadow:
    0 0 20px rgba(176,86,255,.22),
    0 0 34px rgba(36,218,130,.08)!important;
}
.kicker,.page-head .kicker{
  color:var(--k-emerald-bright)!important;
}
.hero-copy p{
  color:#c3b9c7!important;
}

/* Buttons */
.btn.gold{
  color:#f5ead8!important;
  background:
    linear-gradient(180deg,#4a1768 0%,#2b103e 55%,#190a26 100%)!important;
  border:1px solid rgba(76,255,174,.48)!important;
  box-shadow:
    inset 0 0 0 1px rgba(211,169,76,.38),
    0 0 24px rgba(128,49,192,.20),
    0 0 34px rgba(30,210,124,.07)!important;
}
.btn.gold:hover{
  background:
    linear-gradient(180deg,#5b1d7e 0%,#321348 60%,#1b0a28 100%)!important;
  box-shadow:
    inset 0 0 0 1px rgba(224,185,91,.46),
    0 0 30px rgba(173,75,244,.24),
    0 0 38px rgba(40,226,139,.11)!important;
}
.btn:not(.gold){
  color:#dfd3e4!important;
  border-color:rgba(138,64,192,.34)!important;
  background:rgba(8,7,12,.78)!important;
}
.btn:not(.gold):hover{
  border-color:rgba(76,255,174,.42)!important;
  background:rgba(23,13,31,.88)!important;
}

/* Panels / cards */
.panel,.card,.stat-card,.metric{
  background:
    radial-gradient(circle at 90% 5%,rgba(114,45,170,.08),transparent 30%),
    linear-gradient(145deg,rgba(12,10,17,.97),rgba(7,8,10,.985))!important;
  border-color:rgba(119,53,168,.32)!important;
  box-shadow:
    inset 0 0 28px rgba(66,212,137,.018),
    0 14px 35px rgba(0,0,0,.24)!important;
}
.panel:hover,.card:hover,.stat-card:hover{
  border-color:rgba(76,255,174,.28)!important;
}

/* Homepage stat cards */
.stat-card{
  position:relative;
  overflow:hidden;
}
.stat-card::before{
  content:"";
  position:absolute;
  width:80px;
  height:80px;
  right:-36px;
  top:-36px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(166,74,236,.18),transparent 70%);
  pointer-events:none;
}
.stat-card strong,
.metric strong,
.stat-card .value{
  color:#bd72ff!important;
  text-shadow:0 0 17px rgba(176,86,255,.14);
}
.stat-card .icon,
.stat-card svg{
  color:var(--k-emerald-bright)!important;
  filter:drop-shadow(0 0 7px rgba(76,255,174,.15));
}
.stat-card small,
.stat-card .label,
.metric .label{
  color:#aaa0ac!important;
}

/* Tables / alliance rosters */
table{
  border-color:rgba(108,51,153,.24)!important;
  background:#07080a!important;
}
thead{
  background:
    linear-gradient(90deg,rgba(59,25,80,.42),rgba(8,52,34,.18))!important;
}
th{
  color:#b9a9c2!important;
  border-color:rgba(90,49,119,.26)!important;
}
td{
  color:#d2c9d4!important;
  border-color:rgba(80,55,96,.22)!important;
}
tr:hover td{
  background:rgba(111,47,164,.08)!important;
}
.roster-row:hover{
  background:
    linear-gradient(90deg,rgba(105,43,159,.10),rgba(24,144,90,.04))!important;
}

/* Alliance / player profile accents */
.profile-card,.alliance-card{
  border-color:rgba(118,50,171,.34)!important;
}
.profile-card h1,.alliance-card h1,
.page-head h1,.section-title,h2,h3{
  color:#eadfce!important;
}
.badge,.pill,.chip{
  border-color:rgba(79,211,142,.30)!important;
  background:rgba(9,38,27,.28)!important;
  color:#c9ead8!important;
}
.online,.status-online{
  color:var(--k-emerald-bright)!important;
}

/* Search / form controls */
input,select,textarea{
  color:#e5dce7!important;
  background:#08070c!important;
  border-color:rgba(125,57,177,.32)!important;
}
input:focus,select:focus,textarea:focus{
  outline:none!important;
  border-color:rgba(76,255,174,.54)!important;
  box-shadow:0 0 0 3px rgba(30,196,119,.08)!important;
}
input::placeholder,textarea::placeholder{
  color:#777080!important;
}

/* Links */
a{
  color:#7ce9b2;
}
a:hover{
  color:#c493ff;
}

/* Footer */
footer{
  border-top:1px solid rgba(118,53,169,.22)!important;
  background:
    linear-gradient(180deg,rgba(5,5,8,.78),rgba(4,4,7,.96))!important;
  color:#8e8792!important;
}
footer strong{
  color:#d9cdbd!important;
}

/* Mobile bottom nav */
.bottom-nav{
  background:rgba(5,5,9,.96)!important;
  border-top:1px solid rgba(130,57,183,.24)!important;
  box-shadow:0 -12px 30px rgba(0,0,0,.34)!important;
  backdrop-filter:blur(14px);
}
.bottom-nav a,.bottom-nav button{
  color:#8f8793!important;
}
.bottom-nav .active,
.bottom-nav a.active,
.bottom-nav button.active{
  color:var(--k-emerald-bright)!important;
  text-shadow:0 0 12px rgba(76,255,174,.18);
}

/* Menu icon / misc gold -> emerald/purple balance */
.menu-btn{
  color:#d8cbdc!important;
}
.menu-btn:hover{
  color:var(--k-emerald-bright)!important;
}
hr{
  border-color:rgba(118,53,169,.22)!important;
}

/* Subtle animated site fog after entering realm */
@keyframes siteFogDrift{
  from{transform:translate3d(-3%,5%,0) scale(1)}
  to{transform:translate3d(4%,-4%,0) scale(1.08)}
}

@media(max-width:760px){
  .hero::after{top:18px;right:14px;opacity:.7}
  .stat-card{
    min-height:150px;
  }
}

/* ===== MOBILE INTRO COPY SAFE-CENTER FIX =====
   Keep the realm wording/button around the visible viewport center so
   Safari's dynamic bars cannot push ENTER THE REALM below the screen. */
@media (max-width:760px){
  .realm-copy{
    top:58%;
    bottom:auto!important;
    width:94%;
    transform:translate(-50%,-50%)!important;
  }
  .exact-intro.realm-ready .realm-copy{
    transform:translate(-50%,-50%)!important;
  }
}
@media (max-width:430px){
  .realm-copy{top:57%;}
}


/* ===== ENTER THE REALM PRESS FEEDBACK ===== */
.realm-enter-real{
  position:relative;
  overflow:hidden;
  transform:translateZ(0);
  transition:transform .16s ease,filter .16s ease,box-shadow .16s ease,border-color .16s ease;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.realm-enter-real::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:inherit;
  pointer-events:none;
  opacity:0;
  background:
    radial-gradient(circle at 50% 50%,rgba(76,255,174,.26),transparent 42%),
    radial-gradient(circle at 50% 50%,rgba(176,86,255,.28),transparent 68%);
  transform:scale(.78);
}
.realm-enter-real::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:18px;
  height:18px;
  border-radius:50%;
  pointer-events:none;
  opacity:0;
  transform:translate(-50%,-50%) scale(.3);
  border:2px solid rgba(234,194,126,.86);
  box-shadow:0 0 10px rgba(76,255,174,.55),0 0 24px rgba(176,86,255,.42);
}
.realm-enter-real:active,
.realm-enter-real.is-pressed{
  transform:scale(.965);
  filter:brightness(1.18) saturate(1.08);
  border-color:rgba(76,255,174,.88)!important;
  box-shadow:
    inset 0 0 18px rgba(76,255,174,.14),
    0 0 18px rgba(76,255,174,.30),
    0 0 34px rgba(176,86,255,.24)!important;
}
.realm-enter-real.is-pressed::before{animation:realmPressGlow .42s ease-out forwards}
.realm-enter-real.is-pressed::after{animation:realmPressRing .48s ease-out forwards}
.realm-enter-real.is-pressed{animation:realmButtonPulse .48s ease-out both}
@keyframes realmButtonPulse{
  0%{transform:scale(1)}
  28%{transform:scale(.955)}
  62%{transform:scale(1.025)}
  100%{transform:scale(1)}
}
@keyframes realmPressGlow{
  0%{opacity:0;transform:scale(.72)}
  45%{opacity:1}
  100%{opacity:0;transform:scale(1.16)}
}
@keyframes realmPressRing{
  0%{opacity:.95;transform:translate(-50%,-50%) scale(.35)}
  100%{opacity:0;transform:translate(-50%,-50%) scale(8)}
}


/* =========================================================
   ADMIN SITE BUILDER — MOBILE-SAFE CONTROLS
   ========================================================= */
.admin-builder{display:grid;gap:18px}
.admin-builder .builder-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.admin-builder .builder-head .actions{display:flex;gap:8px;flex-wrap:wrap}
.admin-builder .save-state{font-size:.86rem;color:#9f95a6;margin-top:4px}
.admin-builder .save-state.ok{color:#65e9a8}
.admin-builder .save-state.error{color:#ff8799}
.builder-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
.builder-card{
  background:linear-gradient(145deg,rgba(13,10,20,.98),rgba(6,8,10,.99));
  border:1px solid rgba(132,62,184,.34);border-radius:18px;padding:18px;min-width:0
}
.builder-card.wide{grid-column:1/-1}
.builder-card h3{margin:0 0 6px}.builder-card>p{margin:0 0 14px;color:#9f96a4}
.builder-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.builder-fields .full{grid-column:1/-1}
.builder-fields label{display:grid;gap:6px;color:#b9afbd;font-size:.82rem}
.builder-fields input,.builder-fields textarea,.builder-fields select{
  width:100%;box-sizing:border-box;border-radius:10px;padding:11px 12px;
  background:#07070b;color:#eee3ed;border:1px solid rgba(129,58,180,.35);font:inherit
}
.builder-fields textarea{min-height:92px;resize:vertical}
.builder-tabs{
  display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 16px;
  position:relative;z-index:12;pointer-events:auto!important
}
.builder-tab{
  appearance:none;-webkit-appearance:none;
  border:1px solid rgba(123,55,174,.5)!important;
  background:linear-gradient(180deg,#15101d,#0a090e)!important;
  color:#c8bccd!important;border-radius:999px!important;
  padding:10px 15px!important;font:inherit;font-weight:700!important;
  line-height:1.1;cursor:pointer;pointer-events:auto!important;
  touch-action:manipulation;-webkit-tap-highlight-color:rgba(76,255,174,.15)
}
.builder-tab.active{
  color:#f0e5d2!important;border-color:#4cffae!important;
  background:linear-gradient(180deg,rgba(74,23,104,.95),rgba(24,13,36,.98))!important;
  box-shadow:0 0 18px rgba(76,255,174,.09),inset 0 0 0 1px rgba(176,86,255,.18)
}
.builder-tab:active{transform:scale(.97);filter:brightness(1.15)}
.builder-pane{display:none!important}
.builder-pane.active{display:grid!important;gap:16px}
.sort-list{display:grid;gap:8px;margin-top:10px}
.sort-item{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;
  background:#08080d;border:1px solid rgba(121,54,170,.30);border-radius:12px;padding:10px
}
.drag-handle{font-size:1.25rem;color:#9a64bc;cursor:grab;user-select:none;padding:5px}
.sort-item .sort-main{display:grid;grid-template-columns:72px minmax(110px,1fr) 70px;gap:8px;min-width:0}
.sort-item .sort-main input{min-width:0;width:100%;box-sizing:border-box;background:#060609;color:#eee;border:1px solid rgba(121,54,170,.3);border-radius:8px;padding:9px}
.sort-controls{display:flex;gap:5px}
.sort-controls button{width:36px;height:36px;border-radius:9px;border:1px solid rgba(96,221,151,.25);background:#0a0c0b;color:#d9d0dc}
.sort-check{display:flex;align-items:center;gap:6px;font-size:.78rem;color:#9c94a0}
.sort-check input{width:18px;height:18px}
.json-editor{min-height:330px!important;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.78rem;line-height:1.45}
.admin-badge{display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(76,255,174,.35);color:#78f0b2;background:rgba(16,91,58,.16);border-radius:999px;padding:5px 9px;font-size:.72rem}
@media(max-width:760px){
  .builder-grid{grid-template-columns:1fr}
  .builder-card.wide{grid-column:auto}
  .builder-fields{grid-template-columns:1fr}
  .builder-fields .full{grid-column:auto}
  .builder-tabs{gap:7px}
  .builder-tab{font-size:.88rem!important;padding:10px 13px!important}
  .sort-item{grid-template-columns:auto minmax(0,1fr)}
  .sort-controls{grid-column:2;justify-content:flex-end}
  .sort-item .sort-main{grid-template-columns:58px minmax(0,1fr)}
  .sort-item .sort-main .nav-visible-wrap{grid-column:1/-1}
}


/* ===== FOOTER: DEAD MAN DISCORD CREDIT ===== */
.site-footer-credit{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.footer-sep{
  color:rgba(176,86,255,.55)!important;
}
.deadman-link{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#b76cff!important;
  font-weight:800;
  text-decoration:none;
  border-bottom:1px solid rgba(76,255,174,.35);
  padding:3px 2px;
  border-radius:5px;
  transition:color .16s ease, text-shadow .16s ease, transform .16s ease, border-color .16s ease;
  -webkit-tap-highlight-color:rgba(76,255,174,.12);
}
.deadman-link:active{
  transform:scale(.96);
  color:#4cffae!important;
  border-color:#4cffae;
  text-shadow:0 0 12px rgba(76,255,174,.32);
}
@media(hover:hover) and (pointer:fine){
  .deadman-link:hover{
    color:#4cffae!important;
    border-color:#4cffae;
    text-shadow:0 0 12px rgba(76,255,174,.26);
  }
}
@media(max-width:760px){
  .site-footer-credit{
    justify-content:flex-start;
    row-gap:5px;
  }
}

.footer-credit-prefix{
  color:#9f96a4;
}
@media(max-width:760px){
  .footer-credit-prefix{
    flex-basis:auto;
  }
}

/* Footer dashboard fields */
.builder-pane[data-builder-pane="footer"] .builder-card{
  border-color:rgba(76,255,174,.24);
}

/* Keep the footer credit wording and clickable name together cleanly */
.footer-credit-line{
  display:inline-flex;
  align-items:baseline;
  gap:6px;
  flex-wrap:wrap;
  min-width:0;
}
.footer-credit-prefix{
  display:inline;
}
.deadman-link{
  display:inline-flex;
  flex:0 0 auto;
  white-space:nowrap;
}
@media(max-width:760px){
  .site-footer-credit{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
  }
  .footer-credit-line{
    flex-basis:100%;
    gap:6px;
    line-height:1.35;
    margin-top:3px;
  }
  .deadman-link{
    margin-left:0;
  }
}


/* =========================================================
   ADMIN-CONTROLLED FONT COLORS
   ========================================================= */
:root{
  --site-heading:#f3eadb;
  --site-body:#d6cfca;
  --site-muted:#9b93a8;
  --site-accent:#b66cff;
  --site-link:#41f0a6;
  --site-button:#fff3dd;
}
body,#content,.panel,.card{color:var(--site-body)}
h1,h2,h3,h4,.page-head h1,.section-title h2,.detail-hero h1,.alliance-card h2{
  color:var(--site-heading)!important;
}
p,.body-copy,.profile-data,.admin-item{color:var(--site-body)}
small,.empty,.page-head>p:last-child,.hero-copy>p:not(.kicker),.muted-demo{
  color:var(--site-muted)!important;
}
.kicker,.realm-number,.rank-row .tag,.leader-row>span,.back,.accent,.highlight{
  color:var(--site-accent)!important;
}
a,.deadman-link{color:var(--site-link)!important}
button,.btn,.nav-btn,.account-btn{color:var(--site-button)}
.btn.gold{color:#120a03}

/* Theme editor */
.theme-color-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.color-field{display:grid;grid-template-columns:58px minmax(0,1fr);gap:9px;align-items:center}
.color-field input[type="color"]{
  width:58px;height:48px;padding:4px;border:1px solid rgba(123,55,174,.45);
  border-radius:10px;background:#08080d;cursor:pointer
}
.color-field input[type="text"]{
  width:100%;min-width:0;background:#07070b;color:#eee;border:1px solid rgba(123,55,174,.35);
  border-radius:10px;padding:11px 12px;font:inherit
}
.color-field input.invalid-color{border-color:#e35e71!important}
.theme-preview{
  margin-top:18px;padding:18px;border:1px solid rgba(76,255,174,.22);
  border-radius:14px;background:#07080a;display:flex;gap:12px;align-items:center;flex-wrap:wrap
}
.theme-preview h2{margin:0 8px 0 0}
.theme-preview p{margin:0}
.theme-preview a{text-decoration:underline}
@media(max-width:760px){
  .theme-color-grid{grid-template-columns:1fr}
}


/* =========================================================
   ADMIN THEME: ORANGE + GOLD SITE ACCENTS
   These two colors are editable from Admin Dashboard > Theme.
   ========================================================= */
:root{
  --site-orange:#ef7715;
  --site-gold:#d6a84b;
}

/* Main orange used across Home/nav/buttons/stats */
.topbrand b,
.hero .kicker,
.hero h1 span,
.stat strong,
.mobile-dock .dock-btn.active,
.hero h1 .realm-number,
.stat-icon{
  color:var(--site-orange)!important;
}

.account-btn{
  border-color:color-mix(in srgb,var(--site-orange) 46%,transparent)!important;
}

.btn.gold{
  background:linear-gradient(180deg,
    color-mix(in srgb,var(--site-orange) 78%,white 22%),
    var(--site-orange))!important;
  border-color:var(--site-orange)!important;
  box-shadow:0 0 28px color-mix(in srgb,var(--site-orange) 20%,transparent)!important;
}

.stat:after{
  background:linear-gradient(90deg,transparent 45%,color-mix(in srgb,var(--site-orange) 6%,transparent))!important;
}

.stat-icon{
  border-color:color-mix(in srgb,var(--site-orange) 34%,transparent)!important;
  background:radial-gradient(circle,
    color-mix(in srgb,var(--site-orange) 14%,transparent),
    rgba(4,5,4,.70) 68%)!important;
  box-shadow:inset 0 0 25px color-mix(in srgb,var(--site-orange) 8%,transparent)!important;
}

.mobile-dock{
  border-top-color:color-mix(in srgb,var(--site-orange) 30%,transparent)!important;
}
.mobile-dock .dock-btn.active span{
  text-shadow:0 0 12px color-mix(in srgb,var(--site-orange) 46%,transparent)!important;
}

/* Secondary gold details */
.kicker,
.realm-number i,
.hero-ornament,
.page-head .kicker,
.rank-row .tag,
.back{
  color:var(--site-gold)!important;
}

.hero-ornament:before,
.hero-ornament:after{
  background:linear-gradient(90deg,transparent,var(--site-gold))!important;
}
.hero-ornament:after{
  background:linear-gradient(90deg,var(--site-gold),transparent)!important;
}

/* Fallback for browsers without color-mix support */
@supports not (color:color-mix(in srgb,red 50%,blue)){
  .account-btn{border-color:var(--site-orange)!important}
  .btn.gold{box-shadow:0 0 28px rgba(239,119,21,.18)!important}
  .stat-icon{border-color:var(--site-orange)!important}
  .mobile-dock{border-top-color:var(--site-orange)!important}
}


/* =========================================================
   ALLIANCE BRANDING / LEADER CUSTOMIZATION
   ========================================================= */
.alliance-branded-hero{
  position:relative;overflow:hidden;min-height:250px;background-size:cover!important;background-position:center!important;
  grid-template-columns:auto minmax(0,1fr) auto;isolation:isolate
}
.alliance-branded-hero:before{
  content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(135deg,rgba(11,7,18,.20),rgba(3,8,8,.34));pointer-events:none
}
.alliance-custom-avatar{
  width:104px;height:104px;border-radius:20px;overflow:hidden;display:grid;place-items:center;
  background:rgba(4,5,7,.78);border:1px solid color-mix(in srgb,var(--ab-kicker) 58%,transparent);
  box-shadow:0 0 28px rgba(0,0,0,.42);font-size:1.4rem
}
.alliance-custom-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.alliance-branded-hero .alliance-rank-label{color:var(--ab-kicker)!important}
.alliance-branded-hero h1{color:var(--ab-name)!important}
.alliance-branded-hero .alliance-leader-line,.alliance-branded-hero .alliance-leader-line b{color:var(--ab-details)!important}
.alliance-branded-hero .detail-numbers span{color:var(--ab-stat-label)!important}
.alliance-branded-hero .detail-numbers strong{color:var(--ab-stat-value)!important}
.alliance-roster-panel .section-title .kicker,.alliance-roster-panel .section-title h2{color:var(--ab-roster)!important}

.alliance-branding-intro{display:grid;gap:6px;padding:14px 16px;margin-bottom:14px;border:1px solid rgba(76,255,174,.22);border-radius:14px;background:rgba(5,10,8,.62)}
.alliance-branding-intro span{color:#c9c1ca}.alliance-branding-intro small{color:#918a96}
.alliance-brand-admin-list{display:grid;gap:16px}
.alliance-brand-card{display:grid;gap:15px}
.alliance-brand-preview{min-height:120px;border-radius:14px;padding:15px;display:flex;align-items:center;gap:14px;background:linear-gradient(110deg,#0a0710,#07100c);background-size:cover;background-position:center;border:1px solid rgba(127,60,184,.28);overflow:hidden}
.alliance-brand-preview .alliance-brand-avatar{width:74px;height:74px;flex:0 0 74px;border-radius:16px;overflow:hidden;display:grid;place-items:center;background:#090a0d;border:1px solid rgba(255,255,255,.12);font-weight:800}
.alliance-brand-preview .alliance-brand-avatar img{width:100%;height:100%;object-fit:cover}
.alliance-brand-preview>div:last-child{display:grid;gap:4px;min-width:0}.alliance-brand-preview small{color:var(--ab-kicker)!important;font-weight:800;letter-spacing:.12em}.alliance-brand-preview b{color:var(--ab-name)!important;font-size:1.15rem}.alliance-brand-preview span{color:var(--ab-details)!important}
.alliance-color-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.alliance-color-grid label{display:grid;gap:6px;color:#aba3af;font-size:.79rem}
.alliance-upload-grid{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto;gap:9px;align-items:end}
.alliance-upload-grid label{display:grid;gap:6px;color:#aaa2ad;font-size:.78rem}.alliance-upload-grid input[type=file]{max-width:100%;font-size:.76rem;color:#aaa;background:#07080b;border:1px solid rgba(123,55,174,.28);border-radius:10px;padding:9px}
.alliance-brand-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.alliance-leader-manager{display:grid;gap:14px}.alliance-leader-manager>p{color:#9c949f}
.builder-fields select{width:100%;box-sizing:border-box;border-radius:10px;padding:11px 12px;background:#07070b;color:#eee3ed;border:1px solid rgba(129,58,180,.35);font:inherit}
@media(max-width:760px){
  .alliance-branded-hero{min-height:310px;grid-template-columns:auto minmax(0,1fr);align-items:start;background-position:center!important}
  .alliance-branded-hero .detail-numbers{grid-column:1/-1;width:100%;display:grid;grid-template-columns:1fr 1fr}
  .alliance-custom-avatar{width:84px;height:84px;border-radius:17px}
  .alliance-color-grid{grid-template-columns:1fr}
  .alliance-upload-grid{grid-template-columns:1fr}.alliance-upload-grid .btn{width:100%}
  .alliance-brand-preview{align-items:flex-start}.alliance-brand-preview .alliance-brand-avatar{width:64px;height:64px;flex-basis:64px}
}

/* Admin-editable alliance image upload rules */
.alliance-upload-settings-card{margin-bottom:16px;border-color:rgba(76,255,174,.28)!important}
.upload-rule-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}
.upload-rule-grid label{display:grid;gap:6px;color:#b9afbd;font-size:.84rem}
.upload-rule-grid input{
  width:100%;box-sizing:border-box;background:#07070b;color:#eee;
  border:1px solid rgba(123,55,174,.36);border-radius:10px;padding:11px 12px;font:inherit
}
.upload-format-box{margin-top:16px;padding:14px;border:1px solid rgba(123,55,174,.28);border-radius:12px;background:#08080d}
.upload-format-choices{display:flex;gap:10px 16px;flex-wrap:wrap;margin:10px 0}
.upload-format-choice{display:flex!important;align-items:center;gap:7px;color:#ddd!important;font-size:.9rem!important}
.upload-format-choice input{width:19px;height:19px}
.upload-format-box small{display:block;color:#91899a;line-height:1.45}
@media(max-width:760px){
  .upload-rule-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:460px){
  .upload-rule-grid{grid-template-columns:1fr}
}


/* Alliance custom banner must override the site's generic panel background. */
.panel.alliance-branded-hero{
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}


/* Alliance list avatars */
.alliance-list-avatar{overflow:hidden}
.alliance-list-avatar img{width:100%;height:100%;object-fit:cover;display:block}

/* Public alliance hero: remove the large empty area under Power/Members. */
.alliance-branded-hero{
  min-height:0!important;
  align-items:center!important;
  padding-top:20px!important;
  padding-bottom:20px!important;
}
.alliance-branded-hero .detail-numbers{align-self:center}
.alliance-custom-avatar{
  width:clamp(48px,var(--ab-avatar-size,104px),220px)!important;
  height:clamp(48px,var(--ab-avatar-size,104px),220px)!important;
  flex:0 0 clamp(48px,var(--ab-avatar-size,104px),220px)!important;
}
.alliance-about-panel{display:grid;gap:8px}
.alliance-about-panel .kicker{margin:0}
.alliance-about-copy{color:var(--ab-details);line-height:1.65;white-space:normal}
.alliance-page-options{margin-top:4px}
.alliance-page-options textarea{
  width:100%;box-sizing:border-box;resize:vertical;min-height:130px;
  background:#07070b;color:#eee;border:1px solid rgba(123,55,174,.35);
  border-radius:10px;padding:11px 12px;font:inherit;line-height:1.45
}
.field-help{display:block;color:#8f8793;font-size:.72rem;margin-top:2px}
@media(max-width:760px){
  .alliance-branded-hero{min-height:0!important;align-items:start!important}
  .alliance-branded-hero .detail-numbers{margin-top:4px!important}
  .alliance-custom-avatar{
    width:clamp(48px,var(--ab-avatar-size,104px),220px)!important;
    height:clamp(48px,var(--ab-avatar-size,104px),220px)!important;
    flex-basis:clamp(48px,var(--ab-avatar-size,104px),220px)!important;
  }
}


/* Keep Power + Members directly below the leader line on alliance pages. */
.alliance-branded-hero .alliance-title-copy{
  min-width:0;
}
.alliance-branded-hero .alliance-title-copy .detail-numbers{
  margin:10px 0 0!important;
  width:auto!important;
  display:flex!important;
  grid-template-columns:none!important;
  gap:32px!important;
  text-align:left!important;
  align-self:auto!important;
}
.alliance-branded-hero .alliance-title-copy .detail-numbers span{
  min-width:72px;
}
@media(max-width:760px){
  .alliance-branded-hero .alliance-title-copy .detail-numbers{
    margin-top:9px!important;
    width:auto!important;
    display:flex!important;
    gap:28px!important;
  }
}


/* Global alliance page display controls */
.alliance-display-settings-card{margin:16px 0;border-color:rgba(76,255,174,.28)!important}
.display-setting-note{display:block;margin-top:10px;color:#91899a;line-height:1.45}

/* Compact About Us rows while preserving intentional blank lines. */
.alliance-about-copy{line-height:var(--ab-about-line,1.35)!important}
.alliance-about-copy p{margin:0!important;line-height:inherit!important}
.alliance-about-copy p + p{margin-top:var(--ab-about-gap,12px)!important}

/* Alliance leader/admin customizable About Us text color */
.alliance-about-copy,
.alliance-about-copy p{
  color:var(--ab-about,#d6cfca)!important;
}


/* =========================================================
   MOBILE SIDEBAR — ALWAYS-AVAILABLE CLOSE BAR
   ========================================================= */
.close-menu-bar{
  margin-top:7px!important;
  color:#fff!important;
  background:linear-gradient(180deg,#b51f2b,#781019)!important;
  border:1px solid rgba(255,90,103,.75)!important;
  box-shadow:0 0 16px rgba(190,25,40,.22)!important;
  font-weight:800!important;
}
.close-menu-bar:hover,
.close-menu-bar:active{
  background:linear-gradient(180deg,#d02a38,#8c111d)!important;
}

/* =========================================================
   ALLIANCE DETAIL — MOBILE WIDE-FIT MODE
   Keep the whole alliance header/about/roster visible instead of making the
   page feel horizontally cropped on phones.
   Safari supports CSS zoom, which gives this the same "wide/zoomed-out"
   presentation the user gets after manually spreading the page.
   ========================================================= */
@media(max-width:760px){
  /* The BODY is already zoomed to 75% by setAlliancePageMobileFit().
     Do not zoom the alliance wrapper a second time: double zoom was
     shrinking/cropping forged borders and roster columns on Safari. */
  .alliance-wide-fit{
    width:100%!important;
    max-width:none!important;
    zoom:1!important;
    padding-left:10px!important;
    padding-right:10px!important;
    box-sizing:border-box!important;
  }
  .alliance-wide-fit .alliance-branded-hero{
    grid-template-columns:auto minmax(0,1fr)!important;
  }
  .alliance-wide-fit .alliance-title-copy{
    min-width:0!important;
  }
  .alliance-wide-fit .alliance-title-copy h1{
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  .alliance-wide-fit .roster-scroll{
    overflow-x:visible!important;
  }
}


/* Admin-controlled global About Us text size */
.alliance-about-copy,
.alliance-about-copy p{
  font-size:var(--ab-about-font-size,16px)!important;
}

/* Multiple alliance manager / R4 selector */
.alliance-manager-picker{display:grid;gap:8px;padding:12px;border:1px solid rgba(123,55,174,.32);border-radius:12px;background:#08080d}
.alliance-manager-picker>small{color:#91899a;line-height:1.4}
.alliance-manager-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:260px;overflow:auto;padding:4px 2px}
.alliance-manager-option{display:flex!important;align-items:center;gap:9px;min-width:0;padding:9px 10px;border:1px solid rgba(255,255,255,.08);border-radius:9px;background:rgba(255,255,255,.025);color:#ddd!important}
.alliance-manager-option input{width:19px;height:19px;flex:0 0 auto}
.alliance-manager-option span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:600px){.alliance-manager-options{grid-template-columns:1fr}}


/* Discord contact buttons for assigned alliance managers */
.alliance-discord-contacts{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:10px;
  align-items:center;
}
.alliance-discord-label{
  width:100%;
  font-size:.66rem;
  letter-spacing:.14em;
  color:var(--ab-stat-label,#9b93a8);
  font-weight:800;
}
.discord-message-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  text-decoration:none!important;
  color:#f5efff!important;
  background:linear-gradient(180deg,rgba(88,101,242,.32),rgba(88,101,242,.18));
  border:1px solid rgba(114,126,255,.65);
  border-radius:9px;
  padding:7px 10px;
  font-size:.78rem;
  font-weight:750;
  line-height:1.15;
  box-shadow:0 0 12px rgba(88,101,242,.12);
}
.discord-message-btn:active{transform:scale(.98)}
@media(max-width:760px){
  .alliance-discord-contacts{gap:6px;margin-top:8px}
  .discord-message-btn{font-size:.72rem;padding:6px 8px}
}


/* Alliance hero alignment + tighter title spacing */
.alliance-branded-hero{
  align-items:start!important;
}
.alliance-branded-hero .alliance-custom-avatar{
  align-self:start!important;
}
.alliance-branded-hero .alliance-title-copy{
  align-self:start!important;
  padding-top:0!important;
}
.alliance-branded-hero .alliance-rank-label{
  margin:0 0 2px!important;
  line-height:1.05!important;
}
.alliance-branded-hero .alliance-title-copy h1{
  margin:0 0 4px!important;
  line-height:1.02!important;
}
.alliance-branded-hero .alliance-leader-line{
  margin:0!important;
  line-height:1.15!important;
}
.alliance-branded-hero .alliance-title-copy .detail-numbers{
  margin-top:7px!important;
}

/* Short Discord manager button: Discord icon + manager name only */
.alliance-discord-contacts{
  margin-top:7px!important;
  gap:6px!important;
}
.discord-message-btn{
  gap:5px!important;
  padding:5px 8px!important;
  border-radius:8px!important;
  font-size:.72rem!important;
  white-space:nowrap;
}
.discord-mark{
  width:15px;
  height:15px;
  flex:0 0 15px;
  display:block;
  color:#cfd4ff;
}
@media(max-width:760px){
  .alliance-branded-hero .alliance-rank-label{margin-bottom:1px!important}
  .alliance-branded-hero .alliance-title-copy h1{margin-bottom:3px!important}
  .alliance-branded-hero .alliance-title-copy .detail-numbers{margin-top:6px!important}
  .discord-message-btn{font-size:.68rem!important;padding:4px 7px!important}
  .discord-mark{width:14px;height:14px;flex-basis:14px}
}


/* Enter-Realm-like press feedback for Discord contact buttons */
.discord-message-btn{position:relative;transform-origin:center;transition:transform .14s ease,filter .14s ease,box-shadow .14s ease,border-color .14s ease!important}
.discord-message-btn:active,.discord-message-btn.discord-pressed{
  transform:scale(.91)!important;
  filter:brightness(1.45)!important;
  border-color:#cbd0ff!important;
  box-shadow:0 0 0 2px rgba(117,126,255,.32),0 0 20px rgba(88,101,242,.75),inset 0 0 16px rgba(255,255,255,.12)!important;
}
.discord-message-btn.discord-pressed::after{
  content:'';position:absolute;inset:-7px;border:2px solid rgba(150,158,255,.62);
  border-radius:12px;animation:discordPressRing .5s ease-out forwards;pointer-events:none;
}
@keyframes discordPressRing{0%{opacity:1;transform:scale(.82)}100%{opacity:0;transform:scale(1.18)}}

/* Link an existing Kingdom 1006 account to Discord */
.profile-actions{display:flex;gap:8px;flex-wrap:wrap}
.discord-link-btn{
  border:1px solid rgba(114,126,255,.72)!important;
  background:linear-gradient(180deg,rgba(88,101,242,.30),rgba(88,101,242,.14))!important;
  color:#f4f3ff!important;
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease!important;
}
.discord-link-btn:active,.discord-link-btn.link-pressed{
  transform:scale(.94)!important;filter:brightness(1.4);
  box-shadow:0 0 0 2px rgba(114,126,255,.24),0 0 22px rgba(88,101,242,.55)!important;
}
.discord-linked-note{margin:10px 0 0;color:#91899a;font-size:.82rem;line-height:1.4}


/* Admin duplicate-account merge tool */
.account-merge-tool{display:grid;gap:14px}
.merge-warning{
  padding:11px 13px;border:1px solid rgba(255,78,89,.48);border-radius:10px;
  background:rgba(120,15,24,.16);color:#efc7ca;line-height:1.45
}
.merge-grid,.merge-preview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.merge-grid label,.merge-confirm-label{display:grid;gap:6px;color:#b7aeba}
.merge-grid select,.merge-confirm-label input{
  width:100%;box-sizing:border-box;background:#07070b;color:#eee;
  border:1px solid rgba(123,55,174,.4);border-radius:10px;padding:11px 12px;font:inherit
}
.merge-preview-grid>div{min-width:0}
.merge-preview-grid h4{margin:0 0 7px;color:#e9dfd4}
.merge-account-summary,.merge-account-empty{
  display:grid;gap:5px;padding:12px;border:1px solid rgba(255,255,255,.09);
  border-radius:10px;background:rgba(255,255,255,.025);min-height:108px
}
.merge-account-summary span{font-size:.78rem;color:#9b929f;overflow-wrap:anywhere}
.merge-account-empty{place-items:center;color:#777}
.merge-account-btn{justify-self:start}
.merge-account-btn:disabled{opacity:.4;filter:none!important;transform:none!important}
@media(max-width:700px){.merge-grid,.merge-preview-grid{grid-template-columns:1fr}}


/* Linked member About Me */
.member-about-card{
  margin-top:12px;padding:13px 14px;border:1px solid rgba(123,55,174,.35);
  border-radius:11px;background:rgba(255,255,255,.02)
}
.member-about-card>span,.public-player-about>span{
  display:block;margin-bottom:6px;font-size:.68rem;letter-spacing:.16em;font-weight:800;color:#d6a84b
}
.member-about-card p,.public-player-about p{
  margin:0;line-height:1.42;color:#d6cfca;overflow-wrap:anywhere
}
.form textarea{
  width:100%;box-sizing:border-box;resize:vertical;min-height:120px;background:#07070b;color:#eee;
  border:1px solid rgba(123,55,174,.45);border-radius:10px;padding:11px 12px;font:inherit
}
.player-link-note{
  padding:10px 12px;border:1px solid rgba(65,240,166,.26);border-radius:9px;
  background:rgba(65,240,166,.055);color:#9aa49d;font-size:.79rem;line-height:1.45
}
.public-player-about{
  margin-top:11px;max-width:760px;padding:10px 12px;border-left:2px solid rgba(65,240,166,.55);
  background:rgba(0,0,0,.18);border-radius:0 8px 8px 0
}


/* Member public profile improvements + customization */
.player-public-profile{
  --mp-kicker:#d6a84b;
  --mp-name:#f3eadb;
  --mp-alliance:#8d978e;
  --mp-about-label:#d6a84b;
  --mp-about-text:#d6cfca;
  --mp-stat-value:#e8ddbf;
}
.player-profile-hero{
  align-items:flex-start;
}
.player-profile-copy{
  min-width:0;
  flex:1 1 0;
  overflow:hidden;
}
.player-profile-kicker{
  color:var(--mp-kicker)!important;
}
.player-profile-name{
  color:var(--mp-name)!important;
  font-size:clamp(1.8rem,6vw,3.35rem)!important;
  line-height:1.03!important;
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal!important;
}
.player-profile-alliance{
  color:var(--mp-alliance)!important;
}
.public-player-about{
  margin-top:8px!important;
  padding:0!important;
  border-left:0!important;
  background:transparent!important;
}
.public-player-about>span{
  display:inline!important;
  margin:0!important;
  color:var(--mp-about-label)!important;
  font-weight:900!important;
  letter-spacing:.06em!important;
  font-size:.82rem!important;
}
.public-player-about p{
  display:inline!important;
  margin:0 0 0 5px!important;
  color:var(--mp-about-text)!important;
  line-height:1.35!important;
}
.player-public-profile .player-stats strong{
  color:var(--mp-stat-value)!important;
}

/* Member Portal About Me styling */
.member-about-card>span{
  font-weight:900!important;
}
.member-about-card p{
  margin-top:2px!important;
}

/* Profile color editor */
.member-profile-color-editor{
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid rgba(123,55,174,.38);
  border-radius:12px;
  background:rgba(255,255,255,.02);
}
.member-profile-color-editor h3{
  margin:0;
  font-size:.9rem;
  letter-spacing:.12em;
}
.member-profile-color-editor>p{
  margin:0;
  color:#91899a;
  font-size:.8rem;
}
.profile-color-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.profile-color-grid label{
  display:grid;
  gap:5px;
}
.profile-color-grid input[type="color"]{
  width:100%;
  min-height:44px;
  padding:3px;
  border:1px solid rgba(123,55,174,.45);
  border-radius:9px;
  background:#08080d;
}
@media(max-width:600px){
  .profile-color-grid{grid-template-columns:1fr 1fr}
  .player-profile-name{font-size:clamp(1.65rem,7vw,2.55rem)!important}
}

/* Ensure View Profile action is prominent but compact */
#viewLinkedProfile{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}


/* Fix member Player Name custom color specificity.
   The global .detail-hero h1 theme rule is more specific than .player-profile-name,
   so target the public-profile H1 with greater specificity. */
.player-public-profile .player-profile-hero h1.player-profile-name{
  color:var(--mp-name)!important;
}

/* =========================================================
   INTRO SETTINGS LABEL CLARITY + SMOKY SUMMON OVERRIDES
   Added after the safe combined build so we don't disturb older fixes.
   ========================================================= */

/* Give the summon wrappers filter support for the smoky reveal. */
.summon-slot{
  will-change:transform,opacity,filter!important;
  filter:blur(18px) brightness(.52) saturate(.72) drop-shadow(0 22px 26px rgba(0,0,0,.62));
}

/* Text layer starts slightly lower/blurred so it can smoke in cleanly. */
.realm-copy{
  opacity:0;
  transform:translateX(-50%) translateY(24px) scale(.97);
  filter:blur(14px);
}
.realm-copy::before,
.realm-copy::after{
  content:"";
  position:absolute;
  left:50%;
  pointer-events:none;
  opacity:0;
  filter:blur(18px);
  mix-blend-mode:screen;
}
.realm-copy::before{
  width:min(82vw,560px);
  height:110px;
  bottom:72px;
  transform:translateX(-50%);
  background:
    radial-gradient(ellipse at 50% 55%,rgba(182,108,255,.24),transparent 52%),
    radial-gradient(ellipse at 35% 60%,rgba(76,255,174,.12),transparent 46%),
    radial-gradient(ellipse at 70% 45%,rgba(255,255,255,.08),transparent 34%);
}
.realm-copy::after{
  width:min(70vw,430px);
  height:86px;
  bottom:132px;
  transform:translateX(-50%) scale(.9);
  background:
    radial-gradient(ellipse at 50% 50%,rgba(229,193,126,.18),transparent 48%),
    radial-gradient(ellipse at 55% 58%,rgba(176,86,255,.14),transparent 52%);
}

/* Make each part of the writing stagger very slightly for a nicer reveal. */
.realm-kicker,
.realm-title,
.realm-tagline,
.realm-enter-real{
  opacity:0;
  transform:translateY(10px);
  filter:blur(10px);
}
.exact-intro.realm-ready .realm-kicker{animation:realmTextPieceSmoke .52s .04s ease forwards}
.exact-intro.realm-ready .realm-title{animation:realmTextPieceSmoke .68s .10s ease forwards}
.exact-intro.realm-ready .realm-tagline{animation:realmTextPieceSmoke .62s .18s ease forwards}
.exact-intro.realm-ready .realm-enter-real{animation:realmTextPieceSmoke .72s .28s ease forwards}

@keyframes reaperSlotRiseSmoke{
  0%{opacity:0;transform:translate(-50%,28%) scale(.76);filter:blur(22px) brightness(.38) saturate(.62) drop-shadow(0 18px 24px rgba(0,0,0,.55))}
  30%{opacity:.40;filter:blur(16px) brightness(.55) saturate(.74) drop-shadow(0 20px 26px rgba(0,0,0,.60))}
  68%{opacity:1;filter:blur(7px) brightness(.84) saturate(.92) drop-shadow(0 24px 30px rgba(0,0,0,.70))}
  100%{opacity:1;transform:translate(-50%,0) scale(1);filter:blur(0) brightness(1) saturate(1) drop-shadow(0 28px 34px rgba(0,0,0,.78))}
}
@keyframes eagleSlotRiseSmoke{
  0%{opacity:0;transform:translate(-10%,72%) rotate(-8deg) scale(.68);filter:blur(18px) brightness(.44) saturate(.68) drop-shadow(0 18px 24px rgba(0,0,0,.55))}
  34%{opacity:.45;filter:blur(13px) brightness(.62) saturate(.76)}
  72%{opacity:1;filter:blur(6px) brightness(.88) saturate(.95)}
  100%{opacity:1;transform:translate(0,0) rotate(-1deg) scale(1);filter:blur(0) brightness(1) saturate(1) drop-shadow(0 25px 31px rgba(0,0,0,.76))}
}
@keyframes mammothSlotRiseSmoke{
  0%{opacity:0;transform:translate(10%,74%) scale(.68);filter:blur(18px) brightness(.42) saturate(.66) drop-shadow(0 18px 24px rgba(0,0,0,.55))}
  36%{opacity:.46;filter:blur(13px) brightness(.60) saturate(.76)}
  74%{opacity:1;filter:blur(6px) brightness(.88) saturate(.95)}
  100%{opacity:1;transform:translate(0,0) scale(1);filter:blur(0) brightness(1) saturate(1) drop-shadow(0 25px 31px rgba(0,0,0,.76))}
}
@keyframes realmCopySmokeIn{
  0%{opacity:0;transform:translateX(-50%) translateY(24px) scale(.97);filter:blur(16px)}
  45%{opacity:.82;transform:translateX(-50%) translateY(10px) scale(.985);filter:blur(8px)}
  100%{opacity:1;transform:translateX(-50%) translateY(0) scale(1);filter:blur(0)}
}
@keyframes realmTextPieceSmoke{
  0%{opacity:0;transform:translateY(12px);filter:blur(12px)}
  55%{opacity:.86;transform:translateY(4px);filter:blur(5px)}
  100%{opacity:1;transform:translateY(0);filter:blur(0)}
}
@keyframes realmCopySmokeDriftA{
  0%{opacity:0;transform:translateX(-50%) translateY(10px) scale(.88)}
  28%{opacity:.42}
  100%{opacity:0;transform:translateX(-50%) translateY(-38px) scale(1.16)}
}
@keyframes realmCopySmokeDriftB{
  0%{opacity:0;transform:translateX(-50%) translateY(12px) scale(.82)}
  30%{opacity:.32}
  100%{opacity:0;transform:translateX(-50%) translateY(-52px) scale(1.22)}
}
.exact-intro.realm-ready .realm-copy::before{animation:realmCopySmokeDriftA 1.8s ease-out forwards}
.exact-intro.realm-ready .realm-copy::after{animation:realmCopySmokeDriftB 2.2s .08s ease-out forwards}

/* =========================================================
   SELECTABLE TRANSPARENT MYTHICAL SMOKE OVERLAY
   Admin > Intro: Off / Wide Ground Haze / Mystical Wisps
   ========================================================= */
.intro-smoke-overlay{
  position:absolute;
  z-index:22;
  left:50%;
  bottom:-2%;
  width:120%;
  height:auto;
  max-width:none;
  pointer-events:none;
  opacity:0;
  transform:translateX(-50%) scale(1.03);
  transform-origin:50% 100%;
  mix-blend-mode:screen;
  filter:url(#introSmokeTint) brightness(.92) blur(.35px);
  -webkit-filter:url(#introSmokeTint) brightness(.92) blur(.35px);
  transition:opacity .45s ease;
  animation:introSmokeBreathe 7s ease-in-out infinite alternate;
}
.exact-intro.smoke-wide .intro-smoke-overlay{opacity:.78;}
.exact-intro.smoke-wide .intro-smoke-overlay{
  bottom:-4%;
  width:128%;
  filter:url(#introSmokeTint) brightness(.90) blur(.55px);
  -webkit-filter:url(#introSmokeTint) brightness(.90) blur(.55px);
}
.exact-intro.smoke-wisps .intro-smoke-overlay{opacity:.70;}
.exact-intro.smoke-wisps .intro-smoke-overlay{
  bottom:-7%;
  width:112%;
  filter:url(#introSmokeTint) brightness(.96) blur(.25px);
  -webkit-filter:url(#introSmokeTint) brightness(.96) blur(.25px);
}
.exact-intro.smoke-off .intro-smoke-overlay{display:none!important}

@media(max-width:760px){
  .exact-intro.smoke-wide .intro-smoke-overlay{width:175%;bottom:-1%}
  .exact-intro.smoke-wisps .intro-smoke-overlay{width:150%;bottom:-1%}
}

@media(prefers-reduced-motion:reduce){
  .intro-smoke-overlay{display:none!important}
}

@keyframes introSmokeBreathe{
  0%{transform:translateX(-50%) translateY(1%) scale(1.02);}
  50%{transform:translateX(-51%) translateY(-2%) scale(1.08);}
  100%{transform:translateX(-49%) translateY(-5%) scale(1.12);}
}

/* =========================================================
   IOS-SAFE CANVAS MYTHICAL SMOKE
   Replaces SVG-filtered GIF smoke that Safari could hide.
   Smoke is visible from frame one, above the closed curtains,
   below the realm copy/button, and remains for the full intro.
   ========================================================= */
.intro-smoke-overlay{display:none!important}
.intro-smoke-canvas{
  position:absolute;
  inset:0;
  z-index:22;
  width:100%;
  height:100%;
  pointer-events:none;
  display:block;
  opacity:1;
  mix-blend-mode:screen;
}
.exact-intro.smoke-off .intro-smoke-canvas{display:none!important}
.exact-intro.smoke-wide .intro-smoke-canvas{opacity:1}
.exact-intro.smoke-wisps .intro-smoke-canvas{opacity:.96}

/* =========================================================
   TRUE OVERLAY FOG LAYER
   Put smoke above curtains and characters, but below the text/button.
   ========================================================= */
.intro-smoke-canvas{
  z-index:34!important;
  opacity:.94;
}
.realm-copy{
  z-index:40!important;
}
.exact-intro.smoke-wide .intro-smoke-canvas{opacity:.90!important}
.exact-intro.smoke-wisps .intro-smoke-canvas{opacity:.96!important}

/* =========================================================
   REAL VIDEO SMOKE OVERLAY — USER-SUPPLIED ANIMATION
   Black background disappears with screen blending.
   Layer is above curtains + summoned characters and below realm copy.
   ========================================================= */
.intro-smoke-canvas{display:none!important}
.intro-smoke-video{
  position:absolute;
  z-index:34!important;
  left:50%;
  bottom:-3%;
  width:190%;
  height:58%;
  max-width:none;
  object-fit:cover;
  object-position:center center;
  transform:translateX(-50%);
  pointer-events:none;
  opacity:.82;
  mix-blend-mode:screen;
  filter:hue-rotate(var(--smoke-hue-shift,95deg)) saturate(1.35) brightness(1.14) contrast(1.06);
}
.exact-intro.smoke-off .intro-smoke-video{display:none!important}
.exact-intro.smoke-wide .intro-smoke-video{display:block!important}
.realm-copy{z-index:40!important}
@media(max-width:760px){
  .intro-smoke-video{
    width:215%;
    height:54%;
    bottom:-2%;
    opacity:.86;
  }
}

/* ===== REAL SMOKE FULL-HEIGHT FIX =====
   Keep the real smoke video spanning the entire intro so it does not
   begin/cut off around the KINGDOM 1006 title on tall mobile screens. */
.intro-smoke-video{
  inset:0!important;
  left:0!important;
  bottom:auto!important;
  width:100%!important;
  height:100%!important;
  transform:none!important;
  object-fit:cover!important;
  object-position:center center!important;
}
@media(max-width:760px){
  .intro-smoke-video{
    inset:0!important;
    left:0!important;
    bottom:auto!important;
    width:100%!important;
    height:100%!important;
    transform:none!important;
    object-fit:cover!important;
    object-position:center center!important;
    opacity:.86;
  }
}

/* ===== FOUR REAL SMOKE CLIPS + RANDOM SELECTOR =====
   Video source switching and per-clip color calibration live in intro.js. */

/* ===== iOS FOUR-PERSISTENT-VIDEO SMOKE FIX =====
   Safari can keep the first decoded video when JS swaps a <video> src.
   Keep all four clips mounted and only display/play the chosen one. */
.intro-smoke-videos{
  position:absolute!important;
  inset:0!important;
  z-index:34!important;
  pointer-events:none!important;
  overflow:hidden!important;
}
.intro-smoke-videos .intro-smoke-video{
  display:none!important;
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center center!important;
  opacity:.35;
  pointer-events:none!important;
  mix-blend-mode:screen!important;
  /* Source clips are grayscale. This maps them to the selected admin color. */
  filter:sepia(1) saturate(7) hue-rotate(var(--smoke-tint-rotate, -135deg)) brightness(1.08) contrast(1.08)!important;
  -webkit-filter:sepia(1) saturate(7) hue-rotate(var(--smoke-tint-rotate, -135deg)) brightness(1.08) contrast(1.08)!important;
}
.intro-smoke-videos .intro-smoke-video.is-active{
  display:block!important;
}
@media(max-width:760px){
  .intro-smoke-videos .intro-smoke-video{opacity:.35}
}

/* =========================================================
   TRANSFER APPLICATION + PRIVATE ADMIN INBOX
   ========================================================= */
.transfer-application-panel{padding:clamp(18px,3vw,30px);overflow:hidden}
.transfer-application-head,.application-admin-heading{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap
}
.transfer-application-head h2,.application-admin-heading h3{margin:.15rem 0 .45rem}
.transfer-application-head p,.application-admin-heading p{margin:0;color:#9c949f;line-height:1.5}
.application-private-badge{
  display:inline-flex;align-items:center;white-space:nowrap;border:1px solid rgba(65,240,166,.30);
  border-radius:999px;padding:7px 10px;background:rgba(65,240,166,.07);color:#75e7ae;font-size:.74rem;font-weight:800
}
.transfer-application-form{margin-top:22px;gap:16px}
.transfer-application-form[hidden],.transfer-application-form [hidden],#transferApplicationSuccess[hidden]{display:none!important}
.application-section{
  display:grid;gap:16px;padding:18px;border:1px solid rgba(123,55,174,.28);border-radius:15px;
  background:linear-gradient(145deg,rgba(15,10,22,.75),rgba(5,8,8,.82))
}
.application-section-title{display:flex;gap:12px;align-items:flex-start}
.application-section-title>span{font-family:Georgia,serif;color:var(--site-gold);font-size:1.25rem;line-height:1}
.application-section-title h3{margin:0 0 4px}.application-section-title p{margin:0;color:#8f8794;font-size:.84rem}
.transfer-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.transfer-form-grid .full{grid-column:1/-1}
.transfer-application-form label,.notification-settings-form>label,.notification-column>label{
  display:grid;gap:6px;color:#bbb1be;font-size:.80rem;line-height:1.35
}
.transfer-application-form input:not([type=checkbox]),.transfer-application-form select,.transfer-application-form textarea,
.notification-settings-form input:not([type=checkbox]),.notification-settings-form select,.notification-settings-form textarea,
.application-inbox-actions select,.application-review-controls select,.application-review-controls textarea{
  width:100%;box-sizing:border-box;border:1px solid rgba(129,58,180,.40);border-radius:10px;
  background:#07070b;color:#eee3ed;padding:11px 12px;font:inherit;outline:none
}
.transfer-application-form textarea{min-height:125px;resize:vertical}
.transfer-application-form input:focus,.transfer-application-form select:focus,.transfer-application-form textarea:focus,
.notification-settings-form input:focus,.notification-settings-form textarea:focus{
  border-color:rgba(65,240,166,.72);box-shadow:0 0 0 3px rgba(65,240,166,.08)
}
.troop-checklist{border:1px solid rgba(255,255,255,.09);border-radius:12px;padding:14px;margin:0}
.troop-checklist legend{padding:0 7px;color:#b9afbd;font-size:.80rem}
.troop-checklist{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.troop-checklist label{display:flex;align-items:center;gap:8px;padding:9px;border:1px solid rgba(255,255,255,.07);border-radius:9px;background:rgba(255,255,255,.02)}
.troop-checklist input,.application-consent input,.setting-toggle input,.notification-recipient-list input{width:18px;height:18px;accent-color:#41f0a6;flex:0 0 18px}
.application-consent{display:flex!important;grid-template-columns:none!important;align-items:flex-start;gap:10px!important;padding:14px;border:1px solid rgba(65,240,166,.22);border-radius:11px;background:rgba(65,240,166,.045)}
.application-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.transfer-submit{justify-self:start;min-width:min(100%,280px);padding:13px 18px!important}
.transfer-submit:disabled{opacity:.55;cursor:wait}
.transfer-member-cta{display:flex;justify-content:space-between;gap:20px;align-items:center;flex-wrap:wrap}
.transfer-member-cta-copy{display:grid;gap:0;flex:1 1 360px;min-width:0}
.transfer-member-cta .transfer-cta-kicker{margin:0;font-size:var(--transfer-cta-kicker-size,15px);overflow-wrap:anywhere}
.transfer-member-cta .transfer-cta-title{margin:.35rem 0 0;font-size:var(--transfer-cta-title-size,32px);line-height:1.12;overflow-wrap:anywhere}
.transfer-member-cta .transfer-cta-description{margin:.65rem 0 0;max-width:760px;color:var(--site-body,#d6cfca);font-size:var(--transfer-cta-description-size,18px);line-height:1.5;overflow-wrap:anywhere}
.transfer-member-cta .transfer-cta-button{font-size:var(--transfer-cta-button-size,16px)}
#transferApplicationSuccess{text-align:center;padding:clamp(20px,4vw,50px) 10px}
#transferApplicationSuccess h2{margin:.35rem 0 .55rem}
#transferApplicationSuccess p{max-width:620px;margin:0 auto;color:#a9a0ac;line-height:1.55}
.application-success-mark{width:64px;height:64px;margin:0 auto 15px;border-radius:50%;display:grid;place-items:center;background:rgba(65,240,166,.12);border:1px solid rgba(65,240,166,.55);color:#65e9a8;font-size:1.8rem;box-shadow:0 0 28px rgba(65,240,166,.13)}
.application-number{display:inline-flex;margin-top:16px;border:1px solid rgba(214,168,75,.38);border-radius:999px;padding:8px 13px;color:#e4c77e;background:rgba(214,168,75,.07);font-weight:800}

.application-settings-card,.application-inbox-card{display:grid;gap:16px}
.notification-settings-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.notification-settings-form>.notice,.notification-save-row{grid-column:1/-1}
.notification-column{display:grid;align-content:start;gap:13px;padding:15px;border:1px solid rgba(255,255,255,.08);border-radius:13px;background:rgba(255,255,255,.018);min-width:0}
.setting-toggle{display:flex!important;align-items:flex-start;gap:10px!important;padding:10px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(0,0,0,.16)}
.setting-toggle>span{display:grid;gap:3px}.setting-toggle b{color:#e8dee9}.setting-toggle small{color:#8f8793;line-height:1.4}
.notification-recipient-box{display:grid;gap:9px}.notification-recipient-box>strong{font-size:.80rem;color:#bbb1be}
.notification-recipient-list{display:grid;gap:7px;max-height:280px;overflow:auto;padding-right:3px}
.notification-recipient-list label{display:flex;align-items:flex-start;gap:9px;padding:9px;border:1px solid rgba(123,55,174,.24);border-radius:9px;background:#08080c}
.notification-recipient-list label>span{display:grid;gap:2px;min-width:0}.notification-recipient-list b{color:#e8dfe9;font-size:.82rem}.notification-recipient-list small{overflow-wrap:anywhere;color:#918995;font-size:.72rem}
.webhook-input-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.webhook-input-row .btn{padding:9px 12px!important}
.discord-notification-note{display:grid;gap:4px;border-left:3px solid #5865f2;padding:10px 12px;background:rgba(88,101,242,.08);border-radius:0 9px 9px 0}
.discord-notification-note b{color:#cbd0ff}.discord-notification-note span{font-size:.76rem;color:#9994af;line-height:1.45}
.notification-save-row{display:flex;align-items:center;gap:13px;flex-wrap:wrap}
.application-inbox-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.application-inbox-actions select{width:auto;min-width:155px}
.application-inbox-count{margin-bottom:10px;color:#99909d;font-size:.78rem}
.transfer-application-list{display:grid;gap:10px}
.transfer-application-card{border:1px solid rgba(123,55,174,.28);border-radius:13px;background:#08080d;overflow:hidden}
.transfer-application-card[open]{border-color:rgba(65,240,166,.26)}
.transfer-application-card summary{list-style:none;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:13px 14px;cursor:pointer}
.transfer-application-card summary::-webkit-details-marker{display:none}
.application-summary-name{display:grid;gap:3px;min-width:0}.application-summary-name b{color:#eee3ed;overflow-wrap:anywhere}.application-summary-name small{color:#8c8490;overflow-wrap:anywhere}
.transfer-application-card summary time{color:#8c8490;font-size:.75rem;white-space:nowrap}.application-chevron{color:#a870c8;font-size:1.15rem}
.transfer-application-card[open] .application-chevron{transform:rotate(180deg)}
.application-status{display:inline-flex;border-radius:999px;padding:5px 8px;font-size:.67rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;border:1px solid #4b4650;color:#bdb5c0;background:#17131a}
.application-status.status-new{color:#74efb2;border-color:rgba(65,240,166,.38);background:rgba(65,240,166,.08)}
.application-status.status-reviewing{color:#f0cf7e;border-color:rgba(214,168,75,.42);background:rgba(214,168,75,.08)}
.application-status.status-approved{color:#7adca5;border-color:rgba(72,195,126,.40);background:rgba(72,195,126,.08)}
.application-status.status-declined{color:#ef9aa4;border-color:rgba(239,94,112,.40);background:rgba(239,94,112,.08)}
.application-status.status-waitlisted{color:#b9a1ef;border-color:rgba(151,118,223,.40);background:rgba(151,118,223,.08)}
.application-card-body{display:grid;gap:14px;padding:15px;border-top:1px solid rgba(255,255,255,.075)}
.application-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.application-detail-grid>div{display:grid;gap:4px;padding:10px;border:1px solid rgba(255,255,255,.07);border-radius:9px;background:rgba(255,255,255,.018);min-width:0}
.application-detail-grid span,.application-long-answer>span{font-size:.67rem;text-transform:uppercase;letter-spacing:.08em;color:#827985}.application-detail-grid b{font-size:.84rem;color:#ddd3de;overflow-wrap:anywhere}
.application-long-answer{padding:11px 12px;border-left:2px solid rgba(176,86,255,.52);background:rgba(176,86,255,.035);border-radius:0 9px 9px 0}.application-long-answer p{margin:6px 0 0;color:#b4abb6;line-height:1.5;overflow-wrap:anywhere}
.application-delivery-row{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.delivery-pill{border:1px solid #403b44;border-radius:999px;padding:5px 8px;color:#8e8790;font-size:.70rem}.delivery-pill.sent{color:#65e9a8;border-color:rgba(65,233,168,.32);background:rgba(65,233,168,.06)}.delivery-error{color:#ed8796;font-size:.74rem}
.application-review-controls{display:grid;grid-template-columns:180px minmax(0,1fr);gap:11px;padding-top:13px;border-top:1px solid rgba(255,255,255,.08)}
.application-review-controls label{display:grid;gap:6px;color:#aaa0ad;font-size:.78rem}.application-review-controls textarea{min-height:90px;resize:vertical}.application-review-actions{grid-column:1/-1;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.application-empty{text-align:center;padding:35px 12px;color:#8c8490}.application-empty>span{font-size:2rem}.application-empty h4{margin:8px 0 4px}.application-empty p{margin:0;color:#7f7782}

@media(max-width:800px){
  .notification-settings-form{grid-template-columns:1fr}.notification-settings-form>.notice,.notification-save-row{grid-column:auto}
  .troop-checklist{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .transfer-form-grid,.application-detail-grid,.application-review-controls{grid-template-columns:1fr}
  .transfer-form-grid .full,.application-review-actions{grid-column:auto}
  .troop-checklist{grid-template-columns:1fr}
  .transfer-application-card summary{grid-template-columns:auto minmax(0,1fr) auto}.transfer-application-card summary time{grid-column:2}.application-chevron{grid-column:3;grid-row:1/3}
  .application-inbox-actions{width:100%}.application-inbox-actions select{flex:1;min-width:0}.application-inbox-actions .btn{flex:0 0 auto}
  .notification-save-row .btn,.transfer-submit{width:100%}
}

/* =========================================================
   COMMANDER RANKINGS — ROYAL WAR PEDESTALS
   Rank artwork follows position, never a specific player.
   ========================================================= */
.commander-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;align-items:stretch;padding-top:12px}
.rank-card{
  --rank-metal:#d8cfbd;--rank-accent:#41f0a6;--rank-glow:rgba(65,240,166,.22);
  position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:stretch;
  min-width:0;min-height:350px;overflow:hidden;padding:18px;border:1px solid color-mix(in srgb,var(--rank-metal) 42%,transparent);
  border-radius:22px;background:
    radial-gradient(circle at 50% 14%,color-mix(in srgb,var(--rank-accent) 16%,transparent),transparent 31%),
    radial-gradient(circle at 105% 100%,var(--rank-glow),transparent 42%),
    linear-gradient(145deg,rgba(17,13,24,.98),rgba(4,7,8,.99) 58%,rgba(10,7,13,.99));
  box-shadow:0 24px 70px rgba(0,0,0,.40),inset 0 0 34px rgba(255,255,255,.018)
}
.rank-card-1{--rank-metal:#f2c963;--rank-accent:#55f0a9;--rank-glow:rgba(222,171,49,.27);border-color:rgba(242,201,99,.56);box-shadow:0 26px 80px rgba(0,0,0,.48),0 0 34px rgba(216,165,44,.13),inset 0 0 42px rgba(85,240,169,.04)}
.rank-card-2{--rank-metal:#c9d5db;--rank-accent:#4de8a3;--rank-glow:rgba(132,184,178,.19);border-color:rgba(177,207,207,.42)}
.rank-card-3{--rank-metal:#d8915e;--rank-accent:#b66cff;--rank-glow:rgba(153,74,213,.22);border-color:rgba(192,109,73,.44)}
.rank-card:before{
  content:attr(data-watermark);position:absolute;z-index:-2;right:-17px;bottom:-58px;
  font-family:Georgia,serif;font-size:13rem;line-height:1;color:color-mix(in srgb,var(--rank-metal) 5%,transparent);
  transform:rotate(-10deg);pointer-events:none
}
.rank-card:after{
  content:"";position:absolute;z-index:-1;inset:-70% -85%;pointer-events:none;opacity:0;
  background:linear-gradient(110deg,transparent 42%,color-mix(in srgb,var(--rank-metal) 17%,transparent) 49%,transparent 56%);
  transform:translateX(-34%) rotate(7deg);animation:rank-card-shimmer 8s ease-in-out infinite
}
.rank-card-2:after{animation-delay:1.2s}.rank-card-3:after{animation-delay:2.4s}
.rank-card-frame{
  position:absolute;z-index:2;inset:9px;border-radius:16px;pointer-events:none;opacity:.72;
  background:
    linear-gradient(var(--rank-metal),var(--rank-metal)) left top/34px 1px no-repeat,
    linear-gradient(var(--rank-metal),var(--rank-metal)) left top/1px 34px no-repeat,
    linear-gradient(var(--rank-metal),var(--rank-metal)) right top/34px 1px no-repeat,
    linear-gradient(var(--rank-metal),var(--rank-metal)) right top/1px 34px no-repeat,
    linear-gradient(var(--rank-metal),var(--rank-metal)) left bottom/34px 1px no-repeat,
    linear-gradient(var(--rank-metal),var(--rank-metal)) left bottom/1px 34px no-repeat,
    linear-gradient(var(--rank-metal),var(--rank-metal)) right bottom/34px 1px no-repeat,
    linear-gradient(var(--rank-metal),var(--rank-metal)) right bottom/1px 34px no-repeat
}
.rank-card-header{position:relative;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:10px}
.rank-tier,.rank-position{font-size:.68rem;font-weight:900;letter-spacing:.16em;text-transform:uppercase}
.rank-tier{display:flex;align-items:center;gap:7px;color:var(--rank-metal)}
.rank-tier i{display:grid;place-items:center;width:25px;height:25px;border:1px solid color-mix(in srgb,var(--rank-metal) 45%,transparent);border-radius:50%;font-style:normal;background:rgba(0,0,0,.28);box-shadow:0 0 13px var(--rank-glow)}
.rank-position{color:color-mix(in srgb,var(--rank-metal) 72%,#fff 28%);padding:6px 9px;border:1px solid color-mix(in srgb,var(--rank-metal) 32%,transparent);border-radius:999px;background:rgba(0,0,0,.26)}
.rank-seal{
  position:relative;z-index:3;width:84px;height:84px;margin:15px auto 12px;border-radius:50%;display:grid;place-items:center;
  border:1px solid color-mix(in srgb,var(--rank-metal) 72%,transparent);color:var(--rank-metal);
  background:radial-gradient(circle at 48% 40%,color-mix(in srgb,var(--rank-accent) 18%,#0b0b0f),#08080d 66%);
  box-shadow:0 0 0 5px rgba(0,0,0,.24),0 0 0 6px color-mix(in srgb,var(--rank-metal) 22%,transparent),0 0 30px var(--rank-glow)
}
.rank-seal:before,.rank-seal:after{content:"❧";position:absolute;top:50%;color:color-mix(in srgb,var(--rank-metal) 72%,transparent);font-size:1.35rem;text-shadow:0 0 12px var(--rank-glow)}
.rank-seal:before{right:calc(100% + 8px);transform:translateY(-50%) rotate(-18deg)}
.rank-seal:after{left:calc(100% + 8px);transform:translateY(-50%) scaleX(-1) rotate(-18deg)}
.rank-seal strong{font-family:Georgia,serif;font-size:1.75rem;line-height:1;text-shadow:0 0 17px var(--rank-glow)}
.rank-seal-emblem{position:absolute;top:8px;font-size:.74rem}
.rank-commander{position:relative;z-index:3;display:flex;align-items:center;justify-content:center;gap:11px;min-width:0;text-align:left}
.rank-avatar{width:49px;height:49px;flex:0 0 49px;display:grid;place-items:center;overflow:hidden;border:1px solid color-mix(in srgb,var(--rank-metal) 58%,transparent);border-radius:13px;background:linear-gradient(145deg,color-mix(in srgb,var(--rank-accent) 13%,#111018),#07070b);box-shadow:0 0 18px var(--rank-glow)}
.rank-avatar img{width:100%;height:100%;object-fit:cover}.rank-avatar-fallback{font-family:Georgia,serif;font-size:1.45rem;color:var(--rank-metal)}
.rank-identity{min-width:0}.rank-identity h2{margin:0!important;color:#f4eadb!important;font-family:Georgia,serif;font-size:clamp(1.35rem,2.25vw,1.85rem);line-height:1.08;overflow-wrap:anywhere;text-shadow:0 3px 16px rgba(0,0,0,.55)}
.rank-identity>span{display:block;margin-top:5px;color:color-mix(in srgb,var(--rank-metal) 72%,#8f8795 28%);font-size:.59rem;font-weight:800;letter-spacing:.10em;line-height:1.35;text-transform:uppercase;overflow-wrap:anywhere}
.rank-card-stats{position:relative;z-index:3;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;margin:16px 0 13px;padding:12px 0;border-top:1px solid color-mix(in srgb,var(--rank-metal) 18%,transparent);border-bottom:1px solid color-mix(in srgb,var(--rank-metal) 18%,transparent)}
.rank-card-stats>span{display:grid;align-content:center;gap:2px;min-width:0}.rank-card-stats small{color:#928a98!important;font-size:.56rem;letter-spacing:.13em;font-weight:900}.rank-card-stats strong{color:var(--rank-metal);font-family:Georgia,serif;font-size:1.45rem;line-height:1.05;overflow-wrap:anywhere}.rank-card-stats em{color:#8e8792;font-size:.62rem;font-style:normal;overflow-wrap:anywhere}.rank-governor{text-align:right}.rank-governor strong{max-width:120px;font-family:inherit;font-size:.72rem}
.rank-profile-btn,.rank-profile-placeholder{position:relative;z-index:4;margin-top:auto;min-height:38px;border-radius:10px;font-size:.68rem;font-weight:900;letter-spacing:.10em;text-transform:uppercase}
.rank-profile-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid color-mix(in srgb,var(--rank-metal) 38%,transparent);background:linear-gradient(180deg,color-mix(in srgb,var(--rank-accent) 13%,#17121f),rgba(5,6,8,.78));color:#f1e8dc!important;box-shadow:inset 0 0 18px rgba(255,255,255,.018);touch-action:manipulation}
.rank-profile-btn span{font-size:1rem;color:var(--rank-metal)}
.rank-profile-btn:active{transform:scale(.985);filter:brightness(1.22)}
.rank-profile-placeholder{display:grid;place-items:center;color:color-mix(in srgb,var(--rank-metal) 58%,transparent);border:1px solid color-mix(in srgb,var(--rank-metal) 15%,transparent)}
.leaderboard-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding:0 2px 14px;border-bottom:1px solid rgba(255,255,255,.08)}
.leaderboard-heading .kicker{margin:0}.leaderboard-heading h2{margin:4px 0 0}.leaderboard-heading>span{color:#8e8793;font-size:.65rem;font-weight:800;letter-spacing:.10em;white-space:nowrap}
@keyframes rank-card-shimmer{0%,68%,100%{opacity:0;transform:translateX(-34%) rotate(7deg)}76%{opacity:.8}88%{opacity:0;transform:translateX(34%) rotate(7deg)}}
@media(min-width:900px){
  .commander-podium{padding-top:26px}
  .rank-card-1{order:2;transform:translateY(-12px);min-height:374px}
  .rank-card-2{order:1}.rank-card-3{order:3}
}
@media(max-width:899px){.commander-podium{grid-template-columns:1fr}.rank-card{min-height:0}}
@media(max-width:620px){
  .commander-podium{gap:13px;padding-top:4px}
  .rank-card{padding:16px;border-radius:19px}
  .rank-card-frame{inset:8px}
  .rank-seal{width:74px;height:74px;margin:12px auto 10px}.rank-seal strong{font-size:1.55rem}.rank-seal:before{right:calc(100% + 6px)}.rank-seal:after{left:calc(100% + 6px)}
  .rank-identity h2{font-size:clamp(1.3rem,7vw,1.75rem)}
  .rank-card-stats{margin:13px 0 11px;padding:10px 0}.rank-card-stats strong{font-size:1.25rem}
  .leaderboard-heading{align-items:flex-start;flex-direction:column}.leaderboard-heading>span{white-space:normal}
}
@media(prefers-reduced-motion:reduce){.rank-card:after{animation:none}}

/* OPTION A — ROYAL THRONE
   Live avatar, rank-matched MP4 smoke, banners, torches and throne arch. */
.rank-card{min-height:438px;background:radial-gradient(circle at 50% 20%,color-mix(in srgb,var(--rank-accent) 15%,transparent),transparent 34%),linear-gradient(145deg,rgba(15,11,22,.96),rgba(3,6,7,.985) 61%,rgba(10,7,13,.98))}
.rank-card-1{--rank-banner:#174d31;--rank-flame:#f5b640;--rank-smoke-opacity:.23}
.rank-card-2{--rank-banner:#17433a;--rank-flame:#bce8d8;--rank-smoke-opacity:.18}
.rank-card-3{--rank-banner:#4a214f;--rank-flame:#d69b5e;--rank-smoke-opacity:.19}
.rank-smoke{position:absolute;z-index:-3;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;opacity:var(--rank-smoke-opacity,.2)}
.rank-smoke:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 52% 38%,color-mix(in srgb,var(--rank-accent) 58%,transparent),transparent 55%);mix-blend-mode:color}
.rank-smoke-video{width:100%;height:100%;object-fit:cover;transform:scale(1.18);mix-blend-mode:screen;filter:contrast(1.38) brightness(.72)}
.rank-card-1 .rank-smoke-video{filter:sepia(.8) saturate(3.8) hue-rotate(76deg) contrast(1.45) brightness(.68)}
.rank-card-2 .rank-smoke-video{filter:grayscale(.75) sepia(.28) saturate(2.1) hue-rotate(82deg) contrast(1.5) brightness(.7)}
.rank-card-3 .rank-smoke-video{filter:sepia(.88) saturate(4.2) hue-rotate(222deg) contrast(1.45) brightness(.67)}
.rank-card:after{z-index:5;inset:-75% -95%;background:linear-gradient(108deg,transparent 43%,color-mix(in srgb,var(--rank-metal) 28%,transparent) 49%,rgba(255,255,255,.13) 50%,transparent 57%);mix-blend-mode:screen;animation-duration:7.4s}
.rank-throne-scene{position:relative;z-index:3;width:min(100%,290px);height:188px;margin:12px auto 5px;display:grid;place-items:center}
.rank-throne-arch{position:relative;width:156px;height:166px;display:grid;place-items:end center;padding-bottom:9px;border:2px solid color-mix(in srgb,var(--rank-metal) 72%,transparent);border-radius:78px 78px 18px 18px;background:radial-gradient(circle at 50% 35%,color-mix(in srgb,var(--rank-accent) 16%,#111018),#06070a 73%);box-shadow:0 0 0 5px rgba(0,0,0,.27),0 0 0 6px color-mix(in srgb,var(--rank-metal) 20%,transparent),0 0 34px var(--rank-glow),inset 0 0 28px rgba(0,0,0,.52)}
.rank-throne-arch:before,.rank-throne-arch:after{content:"";position:absolute;z-index:-1;top:70px;bottom:-10px;width:17px;border:1px solid color-mix(in srgb,var(--rank-metal) 52%,transparent);background:linear-gradient(90deg,#08080b,color-mix(in srgb,var(--rank-metal) 20%,#111016),#060609);box-shadow:0 9px 0 -3px color-mix(in srgb,var(--rank-metal) 38%,transparent)}
.rank-throne-arch:before{left:-14px}.rank-throne-arch:after{right:-14px}
.rank-throne-arch .rank-avatar{width:126px;height:126px;display:grid;place-items:center;overflow:hidden;border:1px solid color-mix(in srgb,var(--rank-metal) 48%,transparent);border-radius:63px 63px 12px 12px;background:linear-gradient(145deg,color-mix(in srgb,var(--rank-accent) 14%,#111018),#07070b);box-shadow:0 0 24px var(--rank-glow),inset 0 -18px 25px rgba(0,0,0,.28)}
.rank-throne-arch .rank-avatar img,.rank-throne-arch .rank-avatar-image{width:100%;height:100%;object-fit:cover;object-position:center;display:block}
.rank-throne-arch .rank-avatar-fallback{font-size:2.5rem}
.rank-throne-scene .rank-seal{position:absolute;z-index:7;top:-7px;left:50%;width:61px;height:70px;margin:0;transform:translateX(-50%);border:1px solid color-mix(in srgb,var(--rank-metal) 80%,transparent);border-radius:12px 12px 28px 28px;background:linear-gradient(155deg,color-mix(in srgb,var(--rank-metal) 24%,#19151c),#07080a 58%);box-shadow:0 0 0 4px rgba(0,0,0,.30),0 0 24px var(--rank-glow);filter:drop-shadow(0 8px 9px rgba(0,0,0,.48))}
.rank-throne-scene .rank-seal:before,.rank-throne-scene .rank-seal:after{top:47%;font-size:1.1rem}.rank-throne-scene .rank-seal:before{right:calc(100% + 5px)}.rank-throne-scene .rank-seal:after{left:calc(100% + 5px)}
.rank-throne-scene .rank-seal strong{font-size:1.55rem}.rank-throne-scene .rank-seal-emblem{top:7px;font-size:.65rem}
.rank-banner{position:absolute;z-index:1;top:24px;width:35px;height:108px;display:grid;place-items:start center;padding-top:17px;border:1px solid color-mix(in srgb,var(--rank-metal) 45%,transparent);background:linear-gradient(90deg,rgba(0,0,0,.42),var(--rank-banner),rgba(0,0,0,.48));clip-path:polygon(0 0,100% 0,100% 84%,50% 100%,0 84%);box-shadow:0 0 17px var(--rank-glow)}
.rank-banner:before{content:"";position:absolute;top:6px;bottom:15px;left:6px;right:6px;border:1px solid color-mix(in srgb,var(--rank-metal) 23%,transparent)}
.rank-banner i{position:relative;z-index:2;color:var(--rank-metal);font-style:normal;font-size:.93rem;text-shadow:0 0 11px var(--rank-glow)}
.rank-banner-left{left:19px;transform:rotate(-3deg)}.rank-banner-right{right:19px;transform:rotate(3deg)}
.rank-torch{position:absolute;z-index:4;bottom:23px;width:5px;height:47px;border-radius:2px;background:linear-gradient(90deg,#302619,var(--rank-metal),#241a11);box-shadow:0 0 9px rgba(0,0,0,.7)}
.rank-torch:after{content:"";position:absolute;left:50%;bottom:-5px;width:15px;height:6px;transform:translateX(-50%);border-radius:50%;background:color-mix(in srgb,var(--rank-metal) 48%,#08080b)}
.rank-torch i{position:absolute;left:50%;top:-22px;width:18px;height:27px;transform:translateX(-50%) rotate(4deg);border-radius:48% 52% 46% 54%;background:radial-gradient(circle at 50% 68%,#fff7cc 0 10%,var(--rank-flame) 28%,color-mix(in srgb,var(--rank-flame) 60%,transparent) 56%,transparent 70%);filter:drop-shadow(0 0 8px var(--rank-flame));animation:rank-torch-flicker 1.25s ease-in-out infinite alternate;transform-origin:50% 100%}
.rank-torch-left{left:4px}.rank-torch-right{right:4px}.rank-torch-right i{animation-delay:-.58s}
.rank-identity{position:relative;z-index:4;text-align:center;margin:4px auto 0;max-width:100%}
.rank-identity h2{font-size:clamp(1.48rem,2.5vw,2rem)}
.rank-card-stats{grid-template-columns:minmax(0,1fr) minmax(126px,auto)}
.rank-governor{min-width:0}.rank-governor strong{max-width:none!important;white-space:nowrap;overflow-wrap:normal!important;word-break:normal;font-size:clamp(.68rem,1.15vw,.79rem);font-variant-numeric:tabular-nums}
@keyframes rank-torch-flicker{0%{opacity:.72;transform:translateX(-50%) rotate(-7deg) scale(.92,1.02)}55%{opacity:1;transform:translateX(-50%) rotate(5deg) scale(1.06,.94)}100%{opacity:.86;transform:translateX(-50%) rotate(-2deg) scale(.96,1.08)}}
@media(min-width:900px){.rank-card{min-height:458px}.rank-card-1{min-height:486px}.rank-throne-scene{height:198px}}
@media(max-width:620px){
  .rank-card{min-height:0;padding:16px}.rank-throne-scene{width:min(100%,278px);height:183px;margin-top:9px}
  .rank-throne-arch{width:148px;height:160px}.rank-throne-arch .rank-avatar{width:120px;height:120px}
  .rank-banner-left{left:15px}.rank-banner-right{right:15px}
  .rank-card-stats{grid-template-columns:minmax(0,1fr) minmax(118px,auto);gap:8px}
  .rank-governor strong{font-size:.68rem}
}
@media(max-width:370px){.rank-banner{display:none}.rank-torch-left{left:15px}.rank-torch-right{right:15px}.rank-card-stats{grid-template-columns:1fr}.rank-governor{text-align:left}.rank-governor strong{font-size:.72rem}}
@media(prefers-reduced-motion:reduce){.rank-smoke-video{display:none}.rank-torch i{animation:none}}

/* =========================================================
   COMMANDER RANKINGS — FORGED ROYAL CARD FRAMES
   Layered metal rails, armored corners and rank-colored gems.
   ========================================================= */
.rank-card{
  border:0!important;
  border-radius:24px;
  padding:23px 22px 21px;
  box-shadow:
    0 28px 78px rgba(0,0,0,.50),
    0 0 30px color-mix(in srgb,var(--rank-glow) 68%,transparent),
    inset 0 0 0 1px color-mix(in srgb,var(--rank-metal) 16%,transparent),
    inset 0 0 46px rgba(0,0,0,.28)
}
.rank-card-frame{
  position:absolute;z-index:8;inset:4px;border-radius:20px;pointer-events:none;opacity:1;
  border:1px solid color-mix(in srgb,var(--rank-metal) 58%,#050607 42%);
  background:
    linear-gradient(90deg,transparent,color-mix(in srgb,var(--rank-metal) 68%,#08090a 32%) 12%,color-mix(in srgb,var(--rank-metal) 92%,#fff 8%) 49%,color-mix(in srgb,var(--rank-metal) 48%,#08090a 52%) 76%,transparent) center top/calc(100% - 58px) 5px no-repeat,
    linear-gradient(90deg,transparent,color-mix(in srgb,var(--rank-metal) 42%,#050607 58%) 18%,color-mix(in srgb,var(--rank-metal) 78%,#fff 22%) 52%,color-mix(in srgb,var(--rank-metal) 38%,#050607 62%) 82%,transparent) center bottom/calc(100% - 58px) 5px no-repeat,
    linear-gradient(180deg,transparent,color-mix(in srgb,var(--rank-metal) 72%,#08090a 28%) 14%,color-mix(in srgb,var(--rank-metal) 88%,#fff 12%) 46%,color-mix(in srgb,var(--rank-metal) 45%,#070809 55%) 78%,transparent) left center/5px calc(100% - 58px) no-repeat,
    linear-gradient(180deg,transparent,color-mix(in srgb,var(--rank-metal) 45%,#070809 55%) 18%,color-mix(in srgb,var(--rank-metal) 86%,#fff 14%) 53%,color-mix(in srgb,var(--rank-metal) 65%,#08090a 35%) 84%,transparent) right center/5px calc(100% - 58px) no-repeat;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.88),
    0 0 0 2px color-mix(in srgb,var(--rank-metal) 34%,transparent),
    0 0 18px var(--rank-glow),
    inset 0 0 10px rgba(0,0,0,.88),
    inset 0 0 18px color-mix(in srgb,var(--rank-accent) 7%,transparent);
  animation:rank-frame-breathe 4.8s ease-in-out infinite alternate
}
.rank-card-frame:before{
  content:"";position:absolute;inset:7px;border-radius:14px;
  border:1px solid color-mix(in srgb,var(--rank-metal) 30%,transparent);
  box-shadow:
    0 0 0 1px rgba(0,0,0,.72),
    inset 0 0 0 1px color-mix(in srgb,var(--rank-accent) 11%,transparent),
    inset 0 0 14px rgba(0,0,0,.46)
}
.rank-card-frame:after{
  content:"";position:absolute;inset:11px;border-radius:11px;
  border:1px solid color-mix(in srgb,var(--rank-accent) 18%,transparent);
  box-shadow:inset 0 0 16px color-mix(in srgb,var(--rank-glow) 36%,transparent)
}
.rank-frame-corner{
  position:absolute;z-index:2;display:block;width:45px;height:45px;
  clip-path:polygon(0 0,100% 0,100% 9px,49% 9px,31% 18px,18px 31%,9px 49%,9px 100%,0 100%);
  background:linear-gradient(135deg,
    color-mix(in srgb,var(--rank-metal) 96%,#fff 4%) 0 9%,
    color-mix(in srgb,var(--rank-metal) 48%,#111217 52%) 24%,
    color-mix(in srgb,var(--rank-metal) 84%,#fff 16%) 43%,
    color-mix(in srgb,var(--rank-metal) 34%,#050607 66%) 67%,
    color-mix(in srgb,var(--rank-metal) 72%,#0a0b0e 28%));
  filter:drop-shadow(0 0 6px var(--rank-glow)) drop-shadow(1px 2px 2px rgba(0,0,0,.9))
}
.rank-frame-corner:before{
  content:"";position:absolute;left:4px;top:4px;width:26px;height:2px;
  background:linear-gradient(90deg,color-mix(in srgb,var(--rank-metal) 94%,#fff 6%),transparent);
  box-shadow:0 4px 0 color-mix(in srgb,var(--rank-metal) 24%,transparent)
}
.rank-frame-corner:after{
  content:"";position:absolute;left:8px;top:8px;width:9px;height:9px;transform:rotate(45deg);
  border:1px solid color-mix(in srgb,var(--rank-metal) 84%,#fff 16%);
  background:radial-gradient(circle at 35% 30%,#eafff5 0 8%,var(--rank-accent) 31%,color-mix(in srgb,var(--rank-accent) 46%,#050607 54%) 70%);
  box-shadow:0 0 9px var(--rank-glow),inset 0 0 3px rgba(255,255,255,.5)
}
.rank-frame-corner-tl{left:-2px;top:-2px}
.rank-frame-corner-tr{right:-2px;top:-2px;transform:rotate(90deg)}
.rank-frame-corner-br{right:-2px;bottom:-2px;transform:rotate(180deg)}
.rank-frame-corner-bl{left:-2px;bottom:-2px;transform:rotate(270deg)}
.rank-frame-gem{
  position:absolute;z-index:3;left:50%;display:block;width:19px;height:19px;
  transform:translateX(-50%) rotate(45deg);border-radius:3px;
  border:2px solid color-mix(in srgb,var(--rank-metal) 82%,#fff 18%);
  background:linear-gradient(135deg,color-mix(in srgb,var(--rank-accent) 82%,#eafff5 18%),color-mix(in srgb,var(--rank-accent) 42%,#030405 58%));
  box-shadow:
    0 0 0 3px rgba(3,4,5,.86),
    0 0 0 4px color-mix(in srgb,var(--rank-metal) 32%,transparent),
    0 0 15px var(--rank-glow),
    inset 0 0 5px rgba(255,255,255,.48)
}
.rank-frame-gem:after{
  content:"";position:absolute;inset:4px;border-radius:1px;
  border:1px solid rgba(255,255,255,.38);background:rgba(255,255,255,.08)
}
.rank-frame-gem-top{top:4px}
.rank-frame-gem-bottom{bottom:4px}
.rank-card-1 .rank-card-frame{box-shadow:0 0 0 1px rgba(0,0,0,.9),0 0 0 2px rgba(242,201,99,.46),0 0 24px rgba(222,171,49,.24),inset 0 0 12px rgba(0,0,0,.9),inset 0 0 20px rgba(85,240,169,.08)}
.rank-card-2 .rank-card-frame{box-shadow:0 0 0 1px rgba(0,0,0,.9),0 0 0 2px rgba(201,213,219,.38),0 0 20px rgba(132,184,178,.18),inset 0 0 12px rgba(0,0,0,.9),inset 0 0 18px rgba(77,232,163,.065)}
.rank-card-3 .rank-card-frame{box-shadow:0 0 0 1px rgba(0,0,0,.9),0 0 0 2px rgba(216,145,94,.40),0 0 22px rgba(153,74,213,.20),inset 0 0 12px rgba(0,0,0,.9),inset 0 0 20px rgba(182,108,255,.075)}
@keyframes rank-frame-breathe{
  from{filter:brightness(.91) saturate(.92)}
  to{filter:brightness(1.10) saturate(1.08)}
}
@media(max-width:620px){
  .rank-card{padding:21px 19px 19px;border-radius:22px}
  .rank-card-frame{inset:4px;border-radius:18px}
  .rank-card-frame:before{inset:6px;border-radius:13px}
  .rank-card-frame:after{inset:10px;border-radius:10px}
  .rank-frame-corner{width:41px;height:41px}
  .rank-frame-gem{width:17px;height:17px}
}
@media(prefers-reduced-motion:reduce){.rank-card-frame{animation:none}}

/* =========================================================
   HOME — FORGED REALM FRAMES
   A lighter version of the ranking frame for every home card.
   ========================================================= */
.home-screen .panel,.home-screen .stat{
  position:relative;isolation:isolate;border:0!important;border-radius:22px;
  box-shadow:
    0 22px 58px rgba(0,0,0,.38),
    inset 0 0 0 1px rgba(255,255,255,.025),
    inset 0 0 34px rgba(0,0,0,.20)
}
.home-screen .stat{border-radius:20px}
.realm-card-frame{
  --realm-metal:#ad8b52;--realm-accent:#9c58ce;--realm-glow:rgba(143,68,191,.23);
  position:absolute;z-index:9;inset:4px;display:block;border-radius:18px;pointer-events:none;overflow:visible;
  border:1px solid color-mix(in srgb,var(--realm-metal) 58%,#040506 42%);
  background:
    linear-gradient(90deg,transparent,color-mix(in srgb,var(--realm-metal) 64%,#08090a 36%) 13%,color-mix(in srgb,var(--realm-metal) 88%,#fff 12%) 50%,color-mix(in srgb,var(--realm-metal) 43%,#070809 57%) 82%,transparent) center top/calc(100% - 54px) 4px no-repeat,
    linear-gradient(90deg,transparent,color-mix(in srgb,var(--realm-metal) 42%,#060708 58%) 16%,color-mix(in srgb,var(--realm-metal) 76%,#fff 24%) 51%,color-mix(in srgb,var(--realm-metal) 36%,#050607 64%) 84%,transparent) center bottom/calc(100% - 54px) 4px no-repeat,
    linear-gradient(180deg,transparent,color-mix(in srgb,var(--realm-metal) 67%,#08090a 33%) 14%,color-mix(in srgb,var(--realm-metal) 84%,#fff 16%) 48%,color-mix(in srgb,var(--realm-metal) 40%,#060708 60%) 82%,transparent) left center/4px calc(100% - 54px) no-repeat,
    linear-gradient(180deg,transparent,color-mix(in srgb,var(--realm-metal) 42%,#060708 58%) 17%,color-mix(in srgb,var(--realm-metal) 82%,#fff 18%) 52%,color-mix(in srgb,var(--realm-metal) 62%,#08090a 38%) 85%,transparent) right center/4px calc(100% - 54px) no-repeat;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.86),
    0 0 0 2px color-mix(in srgb,var(--realm-metal) 31%,transparent),
    0 0 18px var(--realm-glow),
    inset 0 0 10px rgba(0,0,0,.78),
    inset 0 0 18px color-mix(in srgb,var(--realm-accent) 6%,transparent)
}
.realm-card-frame-purple{--realm-metal:#a37e4b;--realm-accent:#aa55dd;--realm-glow:rgba(149,66,207,.25)}
.realm-card-frame-emerald{--realm-metal:#a9874d;--realm-accent:#28e56f;--realm-glow:rgba(30,214,103,.22)}
.realm-card-frame:before{
  content:"";position:absolute;inset:7px;border-radius:12px;
  border:1px solid color-mix(in srgb,var(--realm-metal) 25%,transparent);
  box-shadow:0 0 0 1px rgba(0,0,0,.66),inset 0 0 0 1px color-mix(in srgb,var(--realm-accent) 9%,transparent),inset 0 0 12px rgba(0,0,0,.42)
}
.realm-card-frame:after{
  content:"";position:absolute;inset:11px;border-radius:9px;
  border:1px solid color-mix(in srgb,var(--realm-accent) 17%,transparent);
  box-shadow:inset 0 0 15px color-mix(in srgb,var(--realm-glow) 34%,transparent)
}
.realm-frame-corner{
  position:absolute;z-index:3;display:block;width:41px;height:41px;
  clip-path:polygon(0 0,100% 0,100% 8px,48% 8px,30% 17px,17px 30%,8px 48%,8px 100%,0 100%);
  background:linear-gradient(135deg,
    color-mix(in srgb,var(--realm-metal) 95%,#fff 5%) 0 10%,
    color-mix(in srgb,var(--realm-metal) 45%,#111217 55%) 25%,
    color-mix(in srgb,var(--realm-metal) 82%,#fff 18%) 44%,
    color-mix(in srgb,var(--realm-metal) 31%,#040506 69%) 68%,
    color-mix(in srgb,var(--realm-metal) 68%,#090a0c 32%));
  filter:drop-shadow(0 0 5px var(--realm-glow)) drop-shadow(1px 2px 2px rgba(0,0,0,.86))
}
.realm-frame-corner:before{
  content:"";position:absolute;left:4px;top:4px;width:24px;height:2px;
  background:linear-gradient(90deg,color-mix(in srgb,var(--realm-metal) 92%,#fff 8%),transparent);
  box-shadow:0 4px 0 color-mix(in srgb,var(--realm-metal) 22%,transparent)
}
.realm-frame-corner:after{
  content:"";position:absolute;left:7px;top:7px;width:8px;height:8px;transform:rotate(45deg);
  border:1px solid color-mix(in srgb,var(--realm-metal) 80%,#fff 20%);
  background:radial-gradient(circle at 35% 30%,#f1fff7 0 8%,var(--realm-accent) 31%,color-mix(in srgb,var(--realm-accent) 43%,#030405 57%) 72%);
  box-shadow:0 0 8px var(--realm-glow),inset 0 0 3px rgba(255,255,255,.46)
}
.realm-frame-corner-tl{left:-2px;top:-2px}
.realm-frame-corner-tr{right:-2px;top:-2px;transform:rotate(90deg)}
.realm-frame-corner-br{right:-2px;bottom:-2px;transform:rotate(180deg)}
.realm-frame-corner-bl{left:-2px;bottom:-2px;transform:rotate(270deg)}
.realm-frame-gem{
  position:absolute;z-index:4;left:50%;display:block;width:17px;height:17px;
  transform:translateX(-50%) rotate(45deg);border-radius:3px;
  border:2px solid color-mix(in srgb,var(--realm-metal) 78%,#fff 22%);
  background:linear-gradient(135deg,color-mix(in srgb,var(--realm-accent) 82%,#f2fff7 18%),color-mix(in srgb,var(--realm-accent) 40%,#030405 60%));
  box-shadow:0 0 0 3px rgba(3,4,5,.84),0 0 0 4px color-mix(in srgb,var(--realm-metal) 28%,transparent),0 0 13px var(--realm-glow),inset 0 0 4px rgba(255,255,255,.45)
}
.realm-frame-gem:after{content:"";position:absolute;inset:4px;border:1px solid rgba(255,255,255,.34);border-radius:1px}
.realm-frame-gem-top{top:4px}.realm-frame-gem-bottom{bottom:4px}
.realm-frame-glint{
  position:absolute;z-index:5;top:-1px;left:-28%;display:block;width:62px;height:5px;
  transform:skewX(-25deg);opacity:0;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.86),transparent);
  filter:drop-shadow(0 0 7px var(--realm-accent));
  animation:realm-frame-glint 8.2s ease-in-out infinite
}
.realm-card-frame-compact{inset:4px;border-radius:16px}
.realm-card-frame-compact:before{inset:6px;border-radius:11px}.realm-card-frame-compact:after{inset:9px;border-radius:9px}
.realm-card-frame-compact .realm-frame-corner{width:35px;height:35px}
.realm-card-frame-compact .realm-frame-gem{width:14px;height:14px;border-width:1px}
.realm-card-frame-compact .realm-frame-gem:after{inset:3px}
.realm-card-frame-hero{border-radius:19px}
.halloween-stats .stat:nth-child(2) .realm-frame-glint{animation-delay:1.15s}
.halloween-stats .stat:nth-child(3) .realm-frame-glint{animation-delay:2.3s}
.halloween-stats .stat:nth-child(4) .realm-frame-glint{animation-delay:3.45s}
@keyframes realm-frame-glint{
  0%,68%,100%{left:-28%;opacity:0}
  72%{opacity:.18}
  79%{opacity:.94}
  88%{left:112%;opacity:0}
}
@media(max-width:620px){
  .home-screen .panel{border-radius:21px}.home-screen .stat{border-radius:19px}
  .realm-card-frame{inset:4px;border-radius:17px}
  .realm-card-frame:before{inset:6px}.realm-card-frame:after{inset:10px}
  .realm-card-frame-panel .realm-frame-corner,.realm-card-frame-hero .realm-frame-corner{width:38px;height:38px}
  .realm-card-frame-panel .realm-frame-gem,.realm-card-frame-hero .realm-frame-gem{width:16px;height:16px}
}
@media(prefers-reduced-motion:reduce){.realm-frame-glint{animation:none}}

/* Forged frame coverage for Alliance Council, Events and full rankings. */
.alliances-page .alliance-card,
.events-page>.panel,
.events-page .event-row,
.rankings-page .leaderboard{
  position:relative;isolation:isolate;border:0!important;border-radius:22px;
  box-shadow:
    0 24px 64px rgba(0,0,0,.42),
    inset 0 0 0 1px rgba(255,255,255,.024),
    inset 0 0 38px rgba(0,0,0,.22)
}
.alliances-page .alliance-card{border-radius:23px}
.rankings-page .leaderboard{overflow:hidden}
.events-page .event-row{overflow:hidden}
.alliances-page .alliance-card>.realm-card-frame,
.events-page .realm-card-frame,
.rankings-page .leaderboard>.realm-card-frame{display:block}
@media(max-width:620px){
  .alliances-page .alliance-card,
  .events-page>.panel,
  .events-page .event-row,
  .rankings-page .leaderboard{border-radius:21px}
}

/* =========================================================
   SAFARI FORGED-FRAME OVERFLOW STABILITY — 2026-09-04
   Preserve the site's original zoom/mobile-fit behavior.
   Only constrain the animated forged-frame glint so Safari does not count
   its off-card travel as document-width overflow while scrolling.
   ========================================================= */
html,body{
  overflow-x:clip;
}
.realm-card-frame{
  overflow:visible;
}
.realm-frame-glint{
  left:6px;
  width:54px;
}
@keyframes realm-frame-glint{
  0%,68%,100%{left:6px;opacity:0}
  72%{opacity:.18}
  79%{opacity:.94}
  88%{left:calc(100% - 60px);opacity:0}
}
@supports not (overflow:clip){
  html,body{overflow-x:hidden}
}

/* =========================================================
   KINGSHOT-STYLE MOBILE COMMAND DOCK + SLIDING SELECTOR
   Dashboard > Navigation controls the three --dock-* colors.
   The selector remains clipped inside the dock so Safari never counts
   animation/glow as page-width overflow.
   ========================================================= */
:root{
  --dock-active:#39e36f;
  --dock-trim:#d6a84b;
  --dock-panel:#080b09;
}
@media(max-width:760px){
  body{padding-bottom:92px}
  .mobile-dock{
    --dock-index:0;
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr));
    align-items:stretch;
    left:6px!important;
    right:6px!important;
    bottom:0!important;
    height:82px!important;
    padding:9px 5px 5px!important;
    overflow:hidden!important;
    isolation:isolate;
    border:1px solid color-mix(in srgb,var(--dock-trim) 74%,#24170b 26%)!important;
    border-bottom:0!important;
    border-radius:15px 15px 0 0!important;
    background:
      linear-gradient(180deg,color-mix(in srgb,var(--dock-trim) 18%,transparent),transparent 13%),
      linear-gradient(180deg,color-mix(in srgb,var(--dock-panel) 92%,#16100b 8%),var(--dock-panel))!important;
    box-shadow:
      0 -9px 28px rgba(0,0,0,.58),
      inset 0 1px 0 color-mix(in srgb,var(--dock-trim) 55%,transparent),
      inset 0 0 20px rgba(0,0,0,.72)!important;
  }
  .mobile-dock:before,
  .mobile-dock:after{
    content:"";position:absolute;z-index:0;top:4px;bottom:4px;width:5px;pointer-events:none;
    background:linear-gradient(180deg,var(--dock-trim),#302316 45%,var(--dock-trim));
    box-shadow:0 0 9px color-mix(in srgb,var(--dock-trim) 35%,transparent)
  }
  .mobile-dock:before{left:3px}.mobile-dock:after{right:3px}
  .dock-btn{
    position:relative;z-index:3;min-width:0;height:68px;padding:7px 2px 4px!important;
    border:1px solid color-mix(in srgb,var(--dock-trim) 40%,#17120c 60%)!important;
    border-radius:10px!important;
    background:
      linear-gradient(145deg,rgba(255,255,255,.035),transparent 26%),
      linear-gradient(180deg,color-mix(in srgb,var(--dock-panel) 84%,#161616 16%),color-mix(in srgb,var(--dock-panel) 96%,black 4%))!important;
    color:color-mix(in srgb,var(--dock-trim) 52%,#c9c4b8 48%)!important;
    gap:1px!important;
    box-shadow:
      inset 0 0 0 2px rgba(0,0,0,.48),
      inset 0 0 12px rgba(0,0,0,.52)!important;
    transition:color .22s ease,filter .22s ease,background .22s ease!important;
    transform:none!important;
    overflow:hidden!important;
  }
  .dock-btn+.dock-btn{margin-left:2px}
  .dock-btn:before{
    content:"";position:absolute;inset:3px;border:1px solid color-mix(in srgb,var(--dock-trim) 22%,transparent);border-radius:7px;pointer-events:none
  }
  .dock-btn .dock-icon{
    position:relative;z-index:2;display:grid;place-items:center;height:30px;line-height:1;
    font-family:Georgia,"Times New Roman",serif;font-size:1.35rem!important;font-weight:700;
    color:inherit!important;text-shadow:0 2px 4px rgba(0,0,0,.9)!important
  }
  .dock-btn .dock-more-icon{font-family:inherit;font-size:1.1rem!important;letter-spacing:.08em}
  .dock-btn small{
    position:relative;z-index:2;display:block;max-width:100%;overflow:hidden;text-overflow:clip;
    font-family:Georgia,"Times New Roman",serif;font-size:clamp(.43rem,1.75vw,.57rem)!important;
    font-weight:700;letter-spacing:.025em!important;white-space:nowrap;color:inherit!important
  }
  .dock-btn .dock-gem{
    position:absolute;z-index:4;left:50%;bottom:2px;width:7px;height:7px;transform:translateX(-50%) rotate(45deg);
    border:1px solid color-mix(in srgb,var(--dock-trim) 75%,#1d1409 25%);background:color-mix(in srgb,var(--dock-active) 68%,#0a2414 32%);
    box-shadow:0 0 5px color-mix(in srgb,var(--dock-active) 42%,transparent)
  }
  .dock-btn.active{
    color:color-mix(in srgb,var(--dock-trim) 38%,#fff3d8 62%)!important;
    background:
      radial-gradient(circle at 50% 18%,color-mix(in srgb,var(--dock-active) 26%,transparent),transparent 60%),
      linear-gradient(180deg,color-mix(in srgb,var(--dock-panel) 72%,var(--dock-active) 28%),var(--dock-panel))!important;
    box-shadow:
      inset 0 0 0 2px color-mix(in srgb,var(--dock-active) 20%,transparent),
      inset 0 0 22px color-mix(in srgb,var(--dock-active) 20%,transparent)!important
  }
  .dock-btn.active .dock-icon{
    color:color-mix(in srgb,var(--dock-trim) 58%,#fff0c5 42%)!important;
    text-shadow:0 0 11px color-mix(in srgb,var(--dock-active) 65%,transparent),0 2px 4px #000!important
  }
  .dock-btn.active .dock-gem{background:var(--dock-active);box-shadow:0 0 8px var(--dock-active)}
  .dock-slider{
    position:absolute;z-index:5;top:1px;left:0;width:20%;height:7px;padding:0 7px;
    transform:translateX(calc(var(--dock-index) * 100%));
    transition:transform .34s cubic-bezier(.2,.75,.25,1);
    pointer-events:none;will-change:transform
  }
  .dock-slider i{
    display:block;width:100%;height:5px;border:1px solid color-mix(in srgb,var(--dock-trim) 66%,#151008 34%);border-radius:999px;
    background:linear-gradient(90deg,transparent,var(--dock-active) 18%,color-mix(in srgb,var(--dock-active) 70%,white 30%) 50%,var(--dock-active) 82%,transparent);
    box-shadow:0 0 7px color-mix(in srgb,var(--dock-active) 75%,transparent),0 0 12px color-mix(in srgb,var(--dock-active) 35%,transparent)
  }
  .dock-btn:active{filter:brightness(1.22)}
}
@media(max-width:390px){
  .mobile-dock{left:3px!important;right:3px!important;padding-left:3px!important;padding-right:3px!important}
  .dock-btn{padding-left:0!important;padding-right:0!important}.dock-btn+.dock-btn{margin-left:1px}
  .dock-btn .dock-icon{font-size:1.2rem!important}.dock-btn small{font-size:.43rem!important}
}
@media(prefers-reduced-motion:reduce){.dock-slider{transition:none!important}}

/* Dashboard mini-preview for the mobile command dock. */
.mobile-nav-admin-preview{
  margin-top:16px;padding:10px 7px 7px;display:grid;grid-template-columns:repeat(5,1fr);gap:4px;position:relative;overflow:hidden;
  border:1px solid var(--preview-trim);border-radius:13px;background:var(--preview-panel)
}
.mobile-nav-admin-preview:before{content:"";position:absolute;top:2px;left:20%;width:20%;height:4px;background:var(--preview-active);box-shadow:0 0 8px var(--preview-active)}
.mobile-nav-admin-preview>span{min-width:0;padding:8px 2px 5px;border:1px solid color-mix(in srgb,var(--preview-trim) 38%,transparent);border-radius:8px;text-align:center;color:var(--preview-trim);font-size:1.1rem}
.mobile-nav-admin-preview>span.preview-active{background:color-mix(in srgb,var(--preview-active) 15%,var(--preview-panel));box-shadow:inset 0 0 14px color-mix(in srgb,var(--preview-active) 20%,transparent)}
.mobile-nav-admin-preview small{display:block;margin-top:3px;font-size:.48rem;white-space:nowrap;overflow:hidden}
@media(max-width:760px){
  .mobile-dock .dock-btn.active{color:color-mix(in srgb,var(--dock-trim) 38%,#fff3d8 62%)!important}
  .mobile-dock .dock-btn.active .dock-icon{color:color-mix(in srgb,var(--dock-trim) 58%,#fff0c5 42%)!important;text-shadow:0 0 11px color-mix(in srgb,var(--dock-active) 65%,transparent),0 2px 4px #000!important}
}

/* =========================================================
   KINGSHOT FORGED COMMAND DOCK — exact visual pass
   Matches the approved preview: castle/banner/swords/crown icons,
   faceted gold frames, emerald gems and compact sliding selector.
   Keeps all glow/animation clipped inside the dock for Safari.
   ========================================================= */
@media(max-width:760px){
  body{padding-bottom:84px!important}
  .mobile-dock{
    left:0!important;right:0!important;bottom:0!important;
    height:78px!important;
    padding:5px 5px 4px!important;
    gap:3px!important;
    border:0!important;
    border-radius:0!important;
    overflow:hidden!important;
    isolation:isolate;
    background:
      linear-gradient(180deg,rgba(255,226,145,.10) 0,transparent 9px),
      linear-gradient(180deg,#17140d 0,#080a08 14px,#050706 100%)!important;
    box-shadow:0 -8px 24px rgba(0,0,0,.62)!important;
  }
  /* continuous forged outer rails */
  .mobile-dock:before{
    content:""!important;position:absolute!important;z-index:1!important;
    inset:0 0 auto 0!important;height:9px!important;width:auto!important;
    background:
      linear-gradient(180deg,#5a3a11 0 1px,#d6a84b 2px,#8e6529 4px,#2d210f 6px,#d6a84b 7px,#3b2b13 9px)!important;
    box-shadow:0 1px 0 rgba(255,232,162,.34),0 0 8px color-mix(in srgb,var(--dock-trim) 25%,transparent)!important;
  }
  .mobile-dock:after{
    content:""!important;position:absolute!important;z-index:1!important;
    inset:auto 0 0 0!important;height:6px!important;width:auto!important;
    background:linear-gradient(180deg,#24190b,#c5963d 45%,#3a270e 55%,#110d08)!important;
    box-shadow:inset 0 1px rgba(255,226,151,.24)!important;
  }
  .dock-btn{
    position:relative!important;z-index:3!important;
    height:67px!important;min-width:0!important;
    margin:0!important;padding:8px 1px 7px!important;
    border:0!important;border-radius:4px!important;
    color:color-mix(in srgb,var(--dock-trim) 72%,#fff1c8 28%)!important;
    background:
      linear-gradient(135deg,rgba(255,255,255,.055),transparent 23%),
      radial-gradient(circle at 50% 10%,rgba(255,220,145,.035),transparent 35%),
      linear-gradient(180deg,#0a0d0b,#050706 70%,#020302)!important;
    clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px),0 8px)!important;
    box-shadow:none!important;
    overflow:hidden!important;
    transition:filter .18s ease,background .24s ease,color .24s ease!important;
  }
  /* thick faceted metallic frame */
  .dock-btn:before{
    content:""!important;position:absolute!important;inset:0!important;z-index:0!important;
    border:0!important;border-radius:0!important;pointer-events:none!important;
    background:
      linear-gradient(135deg,#33220d 0 4%,var(--dock-trim) 5% 7%,#573b16 8% 11%,transparent 12% 88%,#573b16 89% 92%,var(--dock-trim) 93% 95%,#33220d 96%),
      linear-gradient(45deg,#33220d 0 4%,var(--dock-trim) 5% 7%,#573b16 8% 11%,transparent 12% 88%,#573b16 89% 92%,var(--dock-trim) 93% 95%,#33220d 96%),
      linear-gradient(180deg,var(--dock-trim) 0 2px,#3b290f 3px 5px,transparent 6px calc(100% - 6px),#3b290f calc(100% - 5px) calc(100% - 3px),var(--dock-trim) calc(100% - 2px)),
      linear-gradient(90deg,var(--dock-trim) 0 2px,#3b290f 3px 5px,transparent 6px calc(100% - 6px),#3b290f calc(100% - 5px) calc(100% - 3px),var(--dock-trim) calc(100% - 2px))!important;
    opacity:.92!important;
  }
  .dock-btn:after{
    content:"";position:absolute;z-index:1;inset:6px;pointer-events:none;
    clip-path:polygon(6px 0,calc(100% - 6px) 0,100% 6px,100% calc(100% - 6px),calc(100% - 6px) 100%,6px 100%,0 calc(100% - 6px),0 6px);
    border:1px solid color-mix(in srgb,var(--dock-trim) 42%,#1a1209 58%);
    box-shadow:inset 0 0 0 1px #020302,inset 0 0 14px rgba(0,0,0,.78)
  }
  .dock-btn .dock-icon{
    position:relative!important;z-index:4!important;
    height:35px!important;width:100%!important;display:grid!important;place-items:center!important;
    color:inherit!important;filter:drop-shadow(0 2px 1px #000) drop-shadow(0 0 2px rgba(255,215,125,.18));
  }
  .dock-btn .dock-icon svg{width:33px;height:33px;display:block;overflow:visible}
  .dock-btn .dock-icon svg path,.dock-btn .dock-icon svg circle{
    fill:currentColor;stroke:#39280f;stroke-width:1.15;stroke-linejoin:round;stroke-linecap:round
  }
  .dock-btn small{
    position:relative!important;z-index:4!important;
    margin-top:-1px!important;
    font-family:Georgia,"Times New Roman",serif!important;
    font-size:clamp(.44rem,1.75vw,.58rem)!important;
    line-height:1!important;font-weight:700!important;letter-spacing:.015em!important;
    color:inherit!important;text-shadow:0 1px 2px #000!important;
  }
  .dock-btn .dock-gem{
    z-index:6!important;bottom:1px!important;width:9px!important;height:9px!important;
    border:1px solid #d8a94c!important;
    background:linear-gradient(135deg,#53f1aa,#15905e)!important;
    box-shadow:0 0 0 2px #35250d,0 0 6px rgba(45,231,139,.58)!important;
  }
  .dock-btn.active{
    color:#f2cf78!important;
    background:
      radial-gradient(ellipse at 50% 15%,color-mix(in srgb,var(--dock-active) 45%,transparent),transparent 61%),
      linear-gradient(180deg,color-mix(in srgb,var(--dock-panel) 67%,var(--dock-active) 33%),#06120c 72%,#030705)!important;
    filter:brightness(1.08)!important;
  }
  .dock-btn.active:after{
    border-color:color-mix(in srgb,var(--dock-active) 52%,var(--dock-trim) 48%);
    box-shadow:inset 0 0 0 1px #07110b,inset 0 0 20px color-mix(in srgb,var(--dock-active) 25%,transparent),0 0 7px color-mix(in srgb,var(--dock-active) 25%,transparent)
  }
  .dock-btn.active .dock-icon{color:#f2cd72!important;filter:drop-shadow(0 2px 1px #000) drop-shadow(0 0 7px color-mix(in srgb,var(--dock-active) 60%,transparent))!important}
  .dock-btn.active .dock-gem{background:var(--dock-active)!important;box-shadow:0 0 0 2px #35250d,0 0 10px var(--dock-active)!important}
  /* compact illuminated slider centered over active forged tile */
  .dock-slider{
    z-index:8!important;top:1px!important;height:8px!important;width:20%!important;padding:0 16px!important;
    transform:translateX(calc(var(--dock-index) * 100%))!important;
    transition:transform .34s cubic-bezier(.2,.78,.24,1)!important;
    overflow:visible!important
  }
  .dock-slider i{
    height:5px!important;border:0!important;border-radius:999px!important;
    background:linear-gradient(90deg,transparent 0,color-mix(in srgb,var(--dock-active) 72%,#fff 28%) 28%,#e9ffd9 50%,color-mix(in srgb,var(--dock-active) 72%,#fff 28%) 72%,transparent 100%)!important;
    box-shadow:0 0 4px var(--dock-active),0 0 11px var(--dock-active),0 2px 0 #5b431a!important;
  }
}
@media(max-width:390px){
  .mobile-dock{height:76px!important;padding-left:3px!important;padding-right:3px!important;gap:2px!important}
  .dock-btn{height:65px!important}
  .dock-btn .dock-icon svg{width:30px;height:30px}
  .dock-btn small{font-size:.43rem!important}
}


/* =========================================================
   IMAGE-LOCKED KINGSHOT MOBILE DOCK
   Uses the approved generated button art as the actual UI assets so
   the castle/banner/swords/crown/more icons and forged frames remain
   visually identical instead of being approximated with CSS/SVG.
   ========================================================= */
@media(max-width:760px){
  body{padding-bottom:74px!important}
  .mobile-dock{
    height:72px!important;left:0!important;right:0!important;bottom:0!important;
    padding:2px 2px 1px!important;gap:0!important;overflow:hidden!important;
    border:0!important;background:#050706!important;box-shadow:0 -3px 12px rgba(0,0,0,.48)!important;
  }
  .mobile-dock:before{height:3px!important;background:linear-gradient(90deg,#4a3110,var(--dock-trim),#5a3b12,var(--dock-trim),#4a3110)!important;box-shadow:none!important}
  .mobile-dock:after{display:none!important}
  .dock-btn{
    height:69px!important;padding:0!important;margin:0!important;border:0!important;
    border-radius:0!important;background:transparent!important;clip-path:none!important;
    overflow:hidden!important;box-shadow:none!important;filter:none!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
  }
  .dock-btn:before,.dock-btn:after,.dock-btn .dock-icon,.dock-btn small,.dock-btn .dock-gem{display:none!important}
  .dock-art{
    position:absolute!important;inset:-5px -10px -5px -10px!important;
    width:calc(100% + 20px)!important;height:calc(100% + 10px)!important;
    object-fit:fill!important;display:block!important;pointer-events:none!important;
    user-select:none!important;-webkit-user-drag:none!important;
  }
  .dock-btn.active .dock-art{filter:brightness(1.04) saturate(1.04)!important}
  .dock-btn:active .dock-art{filter:brightness(1.18)!important}
  .dock-slider{
    z-index:20!important;top:1px!important;height:7px!important;width:20%!important;padding:0 19px!important;
    transform:translateX(calc(var(--dock-index) * 100%))!important;
    transition:transform .34s cubic-bezier(.2,.78,.24,1)!important;overflow:visible!important;
  }
  .dock-slider i{
    display:block!important;height:4px!important;border-radius:999px!important;border:1px solid rgba(214,168,75,.72)!important;
    background:linear-gradient(90deg,transparent,var(--dock-active) 23%,#efffe8 50%,var(--dock-active) 77%,transparent)!important;
    box-shadow:0 0 4px var(--dock-active),0 0 10px var(--dock-active)!important;
  }
  .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
}
@media(max-width:390px){
  body{padding-bottom:70px!important}
  .mobile-dock{height:68px!important}
  .dock-btn{height:65px!important}
  .dock-art{inset:-4px -9px!important;width:calc(100% + 18px)!important;height:calc(100% + 8px)!important}
}

/* =========================================================
   IMAGE DOCK — CLEAN SELECTED STATE
   Keep the selected generated PNG + sliding indicator only.
   Removes Safari/button focus rectangles and any CSS box around
   the active tile without changing the image artwork itself.
   ========================================================= */
@media(max-width:760px){
  .mobile-dock .dock-btn,
  .mobile-dock .dock-btn:hover,
  .mobile-dock .dock-btn:active,
  .mobile-dock .dock-btn:focus,
  .mobile-dock .dock-btn:focus-visible,
  .mobile-dock .dock-btn.active{
    appearance:none!important;
    -webkit-appearance:none!important;
    -webkit-tap-highlight-color:transparent!important;
    outline:none!important;
    border:0!important;
    box-shadow:none!important;
    background:transparent!important;
  }
  .mobile-dock .dock-btn.active:before,
  .mobile-dock .dock-btn.active:after,
  .mobile-dock .dock-btn:focus:before,
  .mobile-dock .dock-btn:focus:after{
    display:none!important;
  }
  .mobile-dock .dock-btn.active{
    filter:none!important;
  }
  /* Keep only the active PNG's built-in emerald glow. */
  .mobile-dock .dock-btn.active .dock-art{
    filter:none!important;
  }
}


/* =========================================================
   DISCORD AUTH BUTTON — branded sign-in
   Added on top of the latest mobile-menu build.
   ========================================================= */
.discord-auth-btn{
  width:100%;
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:13px 20px;
  border:1px solid rgba(255,255,255,.20);
  border-radius:12px;
  background:#5865F2;
  color:#fff;
  font:800 15px/1.15 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing:.04em;
  cursor:pointer;
  box-shadow:0 7px 20px rgba(88,101,242,.30),inset 0 1px 0 rgba(255,255,255,.18);
  transition:transform .16s ease,filter .16s ease,box-shadow .16s ease;
}
.discord-auth-btn:hover{filter:brightness(1.07);box-shadow:0 9px 24px rgba(88,101,242,.40),inset 0 1px 0 rgba(255,255,255,.22)}
.discord-auth-btn:active{transform:translateY(1px) scale(.995);filter:brightness(.96)}
.discord-auth-btn:focus-visible{outline:3px solid rgba(255,255,255,.82);outline-offset:3px}
.discord-btn-icon{width:25px;height:25px;flex:0 0 25px;display:block;color:#fff}
.discord-auth-btn span{display:block;min-width:0}
@media(max-width:520px){
  .discord-auth-btn{min-height:56px;font-size:15px;border-radius:11px}
  .discord-btn-icon{width:26px;height:26px;flex-basis:26px}
}

/* =========================================================
   ALLIANCE ROSTER — MOBILE HORIZONTAL SCROLL
   Scoped to roster only; does not alter document/body overflow
   or the fixed mobile command dock.
   ========================================================= */
@media(max-width:760px){
  .alliance-wide-fit .roster-scroll{
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    touch-action:pan-x pan-y;
    max-width:100%!important;
  }
  .alliance-wide-fit .roster-row{
    min-width:820px!important;
  }
}


/* =========================================================
   MOBILE ALLIANCE ROSTER — REAL SWIPE FIX
   Disable the old Safari zoom/wide-fit trick on alliance detail pages.
   That trick made the roster visually wider than the viewport while the
   document itself remained horizontally clipped, so there was nowhere to drag.
   The page now stays viewport-width and ONLY the roster becomes scrollable.
   ========================================================= */
@media(max-width:760px){
  .alliance-detail-page.alliance-wide-fit{
    width:100%!important;
    max-width:100%!important;
    zoom:1!important;
  }

  .alliance-detail-page .alliance-roster-panel{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }

  .alliance-detail-page .roster-scroll{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:scroll!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-x:contain;
    touch-action:pan-x!important;
    scrollbar-width:auto;
  }

  .alliance-detail-page .roster-row{
    width:820px!important;
    min-width:820px!important;
    max-width:none!important;
  }

  .alliance-detail-page .roster-scroll::-webkit-scrollbar{
    height:8px;
  }
}


/* =========================================================
   MOBILE ROSTER — TWO-WAY TOUCH GESTURE FIX
   Horizontal swipes scroll the roster.
   Vertical swipes bubble naturally to the page, even when the
   gesture starts directly on a player row.
   ========================================================= */
@media(max-width:760px){
  .alliance-detail-page .roster-scroll{
    overflow-x:auto!important;
    overflow-y:visible!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-x:contain!important;
    overscroll-behavior-y:auto!important;
    touch-action:pan-x pan-y!important;
  }

  .alliance-detail-page .roster-row,
  .alliance-detail-page .roster-row *{
    touch-action:pan-x pan-y!important;
  }
}


/* =========================================================
   MOBILE ROSTER — COMPACT COLUMNS + SORT CONTROL
   Reduces dead space so more columns are visible at first glance.
   ========================================================= */
.roster-sort-wrap{
  display:flex;
  align-items:center;
  gap:7px;
  margin-left:auto;
  color:#8d978e;
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  white-space:nowrap;
}
.roster-sort{
  appearance:none;
  -webkit-appearance:none;
  min-height:38px;
  padding:7px 30px 7px 10px;
  border:1px solid rgba(65,240,166,.34);
  border-radius:9px;
  background:
    linear-gradient(45deg,transparent 50%,#41f0a6 50%) calc(100% - 14px) 52%/5px 5px no-repeat,
    linear-gradient(135deg,#41f0a6 50%,transparent 50%) calc(100% - 9px) 52%/5px 5px no-repeat,
    #090c0a;
  color:#e9e2d3;
  font:700 .78rem/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  outline:none;
}
.roster-sort:focus{border-color:#41f0a6;box-shadow:0 0 0 2px rgba(65,240,166,.10)}

@media(max-width:760px){
  .alliance-roster-panel{padding-left:12px!important;padding-right:12px!important}
  .alliance-roster-panel .roster-headbar{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:start!important;
    gap:8px 10px!important;
  }
  .alliance-roster-panel .roster-headbar>.searchbox{
    grid-column:1 / -1;
    width:100%;
  }
  .roster-sort-wrap{
    align-self:start;
    margin:0;
    padding-top:2px;
  }
  .roster-sort-wrap>span{display:none}
  .roster-sort{min-width:132px;max-width:150px}

  .alliance-detail-page .roster-row{
    width:650px!important;
    min-width:650px!important;
    grid-template-columns:42px 170px 92px 64px 88px 86px!important;
    column-gap:5px!important;
    padding:9px 7px!important;
  }
  .alliance-detail-page .roster-row.header{
    padding-top:8px!important;
    padding-bottom:8px!important;
  }
  .alliance-detail-page .roster-player{gap:7px!important;min-width:0}
  .alliance-detail-page .roster-player img,
  .alliance-detail-page .tiny-avatar{
    width:32px!important;
    height:32px!important;
    flex:0 0 32px!important;
  }
  .alliance-detail-page .roster-player>span:last-child{min-width:0}
  .alliance-detail-page .roster-player strong{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .alliance-detail-page .roster-player small{
    font-size:.67rem!important;
    white-space:nowrap;
  }
}

@media(max-width:430px){
  .alliance-detail-page .roster-row{
    width:620px!important;
    min-width:620px!important;
    grid-template-columns:38px 158px 88px 60px 84px 82px!important;
    column-gap:4px!important;
    padding-left:6px!important;
    padding-right:6px!important;
  }
  .roster-sort{min-width:126px;max-width:138px;font-size:.73rem}
}


/* =========================================================
   MOBILE ROSTER — SORT BY LABEL + WIDER GOVERNOR COLUMN
   ========================================================= */
.roster-sort-wrap{
  gap:6px!important;
}
.roster-sort-label{
  display:inline-block!important;
  color:#d6cfca;
  font-size:.74rem;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.roster-sort-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  flex:0 0 22px;
  border:1px solid rgba(65,240,166,.40);
  border-radius:7px;
  color:#41f0a6;
  font-size:15px;
  line-height:1;
  box-shadow:0 0 10px rgba(65,240,166,.10),inset 0 1px 0 rgba(255,255,255,.05);
}
@media(max-width:760px){
  .roster-sort-wrap>span{display:inline-flex!important}
  .roster-sort-label{font-size:.70rem}
  .roster-sort-icon{width:21px;height:21px;flex-basis:21px;font-size:14px}

  /* Reclaim space from the right-side columns and give Governor more room. */
  .alliance-detail-page .roster-row{
    width:650px!important;
    min-width:650px!important;
    grid-template-columns:38px 205px 84px 54px 78px 74px!important;
    column-gap:4px!important;
  }
  .alliance-detail-page .roster-player{
    gap:6px!important;
  }
}
@media(max-width:430px){
  .alliance-detail-page .roster-row{
    width:620px!important;
    min-width:620px!important;
    grid-template-columns:36px 192px 80px 52px 76px 72px!important;
    column-gap:3px!important;
  }
  .roster-sort-label{font-size:.66rem}
  .roster-sort{min-width:120px!important;max-width:128px!important}
}


/* =========================================================
   ALLIANCE BRANDING — ADMIN-CONTROLLED ROSTER COLUMN WIDTHS
   Widths come from Dashboard > Alliance Branding > Alliance page display.
   Total roster row width is content-based, eliminating unused space at right.
   ========================================================= */
.roster-width-admin{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid rgba(214,168,75,.18);
}
.roster-width-admin h4{
  margin:0 0 6px;
  color:#f3eadb;
  font-size:1rem;
}
.roster-width-admin p{
  margin:0 0 12px;
  color:#8d978e;
  line-height:1.45;
}
@media(max-width:760px){
  .alliance-detail-page .roster-row{
    width:max-content!important;
    min-width:max-content!important;
    max-width:none!important;
    grid-template-columns:
      var(--roster-rank-w,36px)
      var(--roster-governor-w,192px)
      var(--roster-power-w,80px)
      var(--roster-tc-w,52px)
      var(--roster-kills-w,76px)
      var(--roster-active-w,72px)!important;
    column-gap:var(--roster-col-gap,3px)!important;
  }
}


/* =========================================================
   ROSTER TABLE — FILL UNUSED RIGHT-SIDE SPACE
   Keep the admin-controlled column widths exactly as selected,
   but extend the dark roster/table surface across the full viewport
   so any unused area after ACTIVE no longer looks like an empty gap.
   ========================================================= */
.alliance-detail-page .roster-scroll{
  background:#070b08!important;
}

.alliance-detail-page #rosterBody{
  background:#070b08!important;
}

.alliance-detail-page .roster-row{
  /* Preserve max-content when columns exceed the viewport,
     but fill the full visible roster width when they do not. */
  min-width:100%!important;
  background:#070b08!important;
}

.alliance-detail-page .roster-row.header{
  background:#060a07!important;
}

.alliance-detail-page .roster-row:hover,
.alliance-detail-page .roster-row:focus{
  background:#0a100c!important;
}

.alliance-detail-page .roster-row:nth-child(odd):not(.header){
  background:#080c09!important;
}

.alliance-detail-page .roster-row:nth-child(even):not(.header){
  background:#070b08!important;
}

/* Preserve the existing highlighted/selected player row appearance. */
.alliance-detail-page .roster-row.featured,
.alliance-detail-page .roster-row.current,
.alliance-detail-page .roster-row.selected{
  background:linear-gradient(90deg,rgba(73,35,103,.34),rgba(18,12,28,.80))!important;
}


/* =========================================================
   ALLIANCE DETAIL — RESTORE WIDE INITIAL MOBILE FIT
   The old 75% visual fit is what made the whole alliance page visible
   at first load. Keep that visual scale, but retain the newer roster-only
   horizontal scrolling and two-way touch behavior.
   ========================================================= */
@media(max-width:760px){
  .alliance-detail-page.alliance-wide-fit{
    width:133.333333%!important;
    max-width:none!important;
    zoom:.75!important;
  }

  /* The roster remains its own horizontal scroller even though the
     overall alliance page is visually zoomed out. */
  .alliance-detail-page .alliance-roster-panel{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }

  .alliance-detail-page .roster-scroll{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-x pan-y!important;
    overscroll-behavior-x:contain!important;
    overscroll-behavior-y:auto!important;
  }

  .alliance-detail-page .roster-row,
  .alliance-detail-page .roster-row *{
    touch-action:pan-x pan-y!important;
  }
}


/* =========================================================
   ALLIANCE DETAIL — SAFE MOBILE FIT WITHOUT SIDE CLIPPING
   Previous 133.33% width + 75% zoom visually fit the page, but
   the oversized layout was still being clipped by the document.
   This keeps the alliance page inside the viewport so About Us,
   headers, roster controls and cards cannot disappear off-screen.
   ========================================================= */
@media(max-width:760px){
  .alliance-detail-page.alliance-wide-fit{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    zoom:.86!important;
    margin-left:auto!important;
    margin-right:auto!important;
    overflow:visible!important;
  }

  .alliance-detail-page,
  .alliance-detail-page .panel,
  .alliance-detail-page .alliance-hero-card,
  .alliance-detail-page .alliance-roster-panel{
    box-sizing:border-box!important;
    max-width:100%!important;
  }

  .alliance-detail-page .alliance-about,
  .alliance-detail-page .alliance-about *,
  .alliance-detail-page .panel p,
  .alliance-detail-page .panel div{
    overflow-wrap:anywhere;
    word-break:normal;
  }

  /* Keep horizontal movement limited to the roster table itself. */
  .alliance-detail-page .roster-scroll{
    overflow-x:auto!important;
    overflow-y:visible!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-x pan-y!important;
    max-width:100%!important;
  }
}


/* =========================================================
   TRANSFER PASS ESTIMATOR
   ========================================================= */
.transfer-pass-calculator{
  position:relative;
  overflow:hidden;
  border-color:rgba(65,240,166,.28)!important;
  background:
    radial-gradient(circle at 92% 0%,rgba(89,52,145,.17),transparent 32%),
    linear-gradient(180deg,rgba(9,14,11,.98),rgba(7,9,8,.98))!important;
}
.transfer-pass-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}
.transfer-pass-head h2{margin:.15rem 0 .45rem}
.transfer-pass-head p:not(.kicker){margin:0;max-width:780px;color:#929b92;line-height:1.5}
.transfer-estimate-badge{flex:0 0 auto;border:1px solid rgba(65,240,166,.38);border-radius:999px;padding:7px 10px;color:#78f4b6;background:rgba(65,240,166,.06);font-size:.67rem;font-weight:900;letter-spacing:.1em}
.transfer-pass-fields{display:grid;grid-template-columns:1.3fr .8fr .8fr 1.3fr;gap:12px}
.transfer-pass-fields label{min-width:0}
.transfer-pass-actions{display:flex;align-items:center;gap:14px;margin-top:14px}
.transfer-pass-method{color:#7f887f;font-size:.76rem;line-height:1.4}
#transferPassResult{margin-top:16px}
.transfer-pass-result-card{display:grid;grid-template-columns:170px minmax(0,1fr);gap:20px;padding:18px;border:1px solid rgba(214,168,75,.24);border-radius:15px;background:rgba(0,0,0,.26)}
.transfer-pass-number{display:grid;align-content:center;justify-items:center;min-height:160px;border:1px solid rgba(65,240,166,.30);border-radius:14px;background:radial-gradient(circle,rgba(65,240,166,.10),rgba(0,0,0,.2) 68%)}
.transfer-pass-number small{color:#8c978e;font-size:.63rem;font-weight:800;letter-spacing:.1em}
.transfer-pass-number strong{font-family:Georgia,serif;font-size:4.3rem;line-height:.95;color:#41f0a6;text-shadow:0 0 18px rgba(65,240,166,.22)}
.transfer-pass-number span{margin-top:8px;color:#d7b55d;font-size:.62rem;font-weight:900;letter-spacing:.1em}
.transfer-pass-result-copy h3{margin:.1rem 0 12px}
.transfer-pass-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.transfer-pass-stats span{display:grid;padding:10px;border:1px solid rgba(255,255,255,.07);border-radius:9px;background:rgba(255,255,255,.025)}
.transfer-pass-stats small{color:#778278;text-transform:uppercase;font-size:.62rem;letter-spacing:.07em}
.transfer-pass-stats b{margin-top:4px;color:#eee4cf}
.transfer-pass-explain,.transfer-pass-sample,.transfer-pass-disclaimer{color:#8d978e;line-height:1.45}
.transfer-pass-disclaimer{font-size:.76rem}
.transfer-score-breakdown{margin-top:10px;border:1px solid rgba(255,255,255,.07);border-radius:10px;padding:10px}
.transfer-score-breakdown summary{cursor:pointer;color:#d7b55d;font-weight:800}
.transfer-score-breakdown>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}
.transfer-score-breakdown span{display:flex;justify-content:space-between;gap:10px;color:#8e988e}
.transfer-score-breakdown em{font-style:normal;color:#e6ddc8}
@media(max-width:900px){
  .transfer-pass-fields{grid-template-columns:1fr 1fr}
  .transfer-pass-stats{grid-template-columns:1fr 1fr}
}
@media(max-width:600px){
  .transfer-pass-head{display:grid;gap:10px}
  .transfer-estimate-badge{justify-self:start}
  .transfer-pass-fields{grid-template-columns:1fr}
  .transfer-pass-actions{display:grid}
  .transfer-pass-result-card{grid-template-columns:1fr}
  .transfer-pass-number{min-height:130px}
  .transfer-pass-number strong{font-size:3.6rem}
}

/* ===== FULL 10-STEP TRANSFER PLANNER ===== */
.transfer-guide-coverage{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:0 0 18px}.transfer-guide-coverage span{display:flex;align-items:center;gap:7px;padding:8px 9px;border:1px solid rgba(255,255,255,.07);border-radius:9px;background:rgba(255,255,255,.025);color:#9aa29a;font-size:.7rem}.transfer-guide-coverage b{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:rgba(65,240,166,.09);border:1px solid rgba(65,240,166,.28);color:#41f0a6}
.transfer-form-title{margin:18px 0 8px!important;padding-top:14px;border-top:1px solid rgba(214,168,75,.14);font-size:.9rem!important;color:#d7b55d!important;text-transform:uppercase;letter-spacing:.07em}.transfer-check-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.transfer-check-grid label{display:flex!important;align-items:center;gap:8px;padding:9px 10px;border:1px solid rgba(255,255,255,.07);border-radius:9px;background:#090c0a;color:#a6aea7!important;font-size:.78rem}.transfer-check-grid input{width:18px;height:18px;flex:0 0 auto}
.transfer-planner-results{display:grid;gap:14px}.transfer-summary-hero{display:grid;grid-template-columns:170px minmax(0,1fr);gap:20px;padding:18px;border:1px solid rgba(214,168,75,.24);border-radius:15px;background:rgba(0,0,0,.27)}.transfer-summary-copy h2{margin:.25rem 0 .7rem}.transfer-summary-copy>p:last-of-type{color:#929b92;line-height:1.5}.transfer-confidence-row{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.transfer-confidence-row span{padding:6px 8px;border-radius:8px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.07);font-size:.69rem;color:#8f9990}.transfer-confidence-row b{color:#dcd3c0}
.transfer-quick-feedback{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.transfer-quick-feedback article{display:grid;gap:5px;padding:11px;border:1px solid rgba(255,255,255,.07);border-radius:10px;background:rgba(255,255,255,.025)}.transfer-quick-feedback small{font-size:.6rem;letter-spacing:.08em;color:#788178}.transfer-quick-feedback b{font-size:.79rem;color:#e5dcc8;line-height:1.35}
.transfer-destination-card,.transfer-eligibility-panel,.transfer-after-card{padding:15px;border:1px solid rgba(65,240,166,.16);border-radius:13px;background:rgba(5,10,7,.5)}.transfer-destination-card h3,.transfer-eligibility-panel h2{margin:.2rem 0 .35rem}.transfer-destination-card p{color:#8f9890}.transfer-cap-choices{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0}.transfer-cap-choices span{padding:7px 9px;border-radius:8px;border:1px solid rgba(255,255,255,.08);font-weight:800;font-size:.73rem}.transfer-cap-choices .fits{color:#64eaa2;border-color:rgba(65,240,166,.28);background:rgba(65,240,166,.05)}.transfer-cap-choices .over{color:#c7898f;border-color:rgba(226,92,105,.20);background:rgba(226,92,105,.04)}
.transfer-steps-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.transfer-step-card{display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;padding:13px;border:1px solid rgba(255,255,255,.07);border-radius:12px;background:rgba(255,255,255,.02)}.transfer-step-card.good{border-color:rgba(65,240,166,.20)}.transfer-step-card.warn{border-color:rgba(214,168,75,.23)}.transfer-step-card.bad{border-color:rgba(226,92,105,.26)}.transfer-step-number{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#0a0f0b;border:1px solid rgba(65,240,166,.20);color:#41f0a6;font-family:Georgia,serif;font-weight:800}.transfer-step-title{display:flex;justify-content:space-between;gap:10px;align-items:start}.transfer-step-title h3{margin:0;font-size:.94rem}.transfer-step-title span{flex:0 0 auto;padding:4px 6px;border-radius:999px;border:1px solid rgba(255,255,255,.08);color:#cdb36f;font-size:.58rem;font-weight:900;letter-spacing:.06em}.transfer-step-body p{margin:5px 0;color:#919991;font-size:.78rem;line-height:1.4}.transfer-step-body ul{margin:8px 0 0;padding-left:17px;color:#7f8980;font-size:.72rem;line-height:1.45}
.transfer-check-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}.transfer-check-result{display:grid;grid-template-columns:25px minmax(0,1fr);gap:8px;align-items:start;padding:9px;border:1px solid rgba(255,255,255,.07);border-radius:9px;background:rgba(255,255,255,.02)}.transfer-check-result>b{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;font-size:.75rem}.transfer-check-result.good>b{background:rgba(65,240,166,.10);color:#41f0a6}.transfer-check-result.warn>b,.transfer-check-result.info>b{background:rgba(214,168,75,.10);color:#d7b55d}.transfer-check-result.bad>b{background:rgba(226,92,105,.12);color:#e65c69}.transfer-check-result span{display:grid}.transfer-check-result strong{font-size:.75rem;color:#ded6c3}.transfer-check-result small{margin-top:2px;color:#7c857d;font-size:.67rem;line-height:1.35}
.transfer-static-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.transfer-static-guide article{padding:12px;border:1px solid rgba(123,55,174,.20);border-radius:11px;background:rgba(123,55,174,.035)}.transfer-static-guide h3{margin:0 0 6px;font-size:.83rem;color:#b889df}.transfer-static-guide p{margin:0;color:#858e86;font-size:.72rem;line-height:1.45}.transfer-after-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:9px}.transfer-after-grid span{padding:8px;border:1px solid rgba(255,255,255,.06);border-radius:8px;background:rgba(255,255,255,.02);font-size:.7rem;color:#879188}
@media(max-width:900px){.transfer-guide-coverage{grid-template-columns:repeat(2,minmax(0,1fr))}.transfer-check-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.transfer-quick-feedback{grid-template-columns:1fr 1fr}}@media(max-width:650px){.transfer-summary-hero{grid-template-columns:1fr}.transfer-steps-grid,.transfer-check-results,.transfer-static-guide,.transfer-after-grid{grid-template-columns:1fr}.transfer-guide-coverage{grid-template-columns:1fr 1fr}.transfer-check-grid{grid-template-columns:1fr}}


/* =========================================================
   TRANSFER PLANNER — ATLAS + KINGSHOT.NET BRACKET SCENARIOS
   ========================================================= */
.transfer-auto-bracket-fields{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(260px,1.35fr)!important;
}
.transfer-auto-bracket-note{
  display:grid;align-content:center;gap:4px;padding:11px 12px;border:1px solid rgba(65,240,166,.20);
  border-radius:10px;background:rgba(65,240,166,.035);color:#89948b
}
.transfer-auto-bracket-note b{color:#68edaa;font-size:.79rem}
.transfer-auto-bracket-note span{font-size:.7rem;line-height:1.42}
.transfer-auto-bracket-note strong{color:#d7b55d}

.transfer-bracket-summary{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:15px;
  border-radius:13px;border:1px solid rgba(65,240,166,.22);background:linear-gradient(90deg,rgba(65,240,166,.045),rgba(123,55,174,.055))
}
.transfer-bracket-summary.split{border-color:rgba(214,168,75,.34)}
.transfer-bracket-summary small,.transfer-safe-plan small{font-size:.61rem;letter-spacing:.09em;color:#7f8a81}
.transfer-bracket-summary h3{margin:3px 0 5px;color:#61eca7}
.transfer-bracket-summary.split h3{color:#d7b55d}
.transfer-bracket-summary p{margin:0;color:#8d978f;font-size:.77rem;line-height:1.4}
.transfer-safe-plan{
  display:grid;justify-items:end;min-width:170px;padding-left:16px;border-left:1px solid rgba(255,255,255,.08)
}
.transfer-safe-plan strong{margin:3px 0;color:#f0c967;font-family:Georgia,serif;font-size:1.45rem}
.transfer-safe-plan span{max-width:210px;text-align:right;color:#808a82;font-size:.65rem;line-height:1.35}

.transfer-bracket-scenarios{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.transfer-bracket-scenario{
  padding:13px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:rgba(255,255,255,.022)
}
.transfer-bracket-source{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}
.transfer-bracket-source span{color:#d7b55d;font-size:.72rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.transfer-bracket-source b{color:#f1e8d4;font-size:1rem}
.transfer-bracket-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.transfer-bracket-metrics span{display:grid;padding:8px;border:1px solid rgba(255,255,255,.06);border-radius:8px;background:rgba(0,0,0,.18)}
.transfer-bracket-metrics small{color:#737e75;font-size:.56rem;text-transform:uppercase;letter-spacing:.06em}
.transfer-bracket-metrics b{margin-top:3px;color:#d9d2c1;font-size:.73rem}
.transfer-bracket-scenario p{margin:9px 0 0;color:#7f8981;font-size:.68rem;line-height:1.4}

@media(max-width:800px){
  .transfer-auto-bracket-fields{grid-template-columns:1fr!important}
  .transfer-bracket-summary{grid-template-columns:1fr}
  .transfer-safe-plan{justify-items:start;padding:10px 0 0;border-left:0;border-top:1px solid rgba(255,255,255,.08)}
  .transfer-safe-plan span{text-align:left}
  .transfer-bracket-scenarios{grid-template-columns:1fr}
}
@media(max-width:520px){
  .transfer-bracket-metrics{grid-template-columns:1fr 1fr}
}


/* =========================================================
   SPLIT TRANSFER PAGES
   ========================================================= */
.transfer-calculator-hero{
  border-color:rgba(65,240,166,.25)!important;
  background:
    radial-gradient(circle at 12% 20%,rgba(65,240,166,.08),transparent 34%),
    radial-gradient(circle at 90% 0%,rgba(123,55,174,.12),transparent 35%),
    #090b0a!important;
}
.transfer-calculator-hero .detail-crest{
  color:#d7b55d;
  border-color:rgba(214,168,75,.38);
  background:radial-gradient(circle,rgba(214,168,75,.10),rgba(0,0,0,.2));
}


/* =========================================================
   TRANSFER PLAN CALCULATOR — ID-FIRST UX
   ========================================================= */
.transfer-id-first-form{display:grid;gap:12px}
.transfer-id-primary{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:end;
  padding:14px;
  border:1px solid rgba(65,240,166,.22);
  border-radius:13px;
  background:rgba(65,240,166,.035);
}
.transfer-id-primary label{margin:0!important}
.transfer-id-run{min-height:48px;white-space:nowrap}
.transfer-id-help{
  margin:0;
  color:#8c968d;
  font-size:.78rem;
  line-height:1.5;
}
.transfer-advanced-options{
  margin-top:6px;
  border:1px solid rgba(214,168,75,.18);
  border-radius:12px;
  background:rgba(255,255,255,.018);
  overflow:hidden;
}
.transfer-advanced-options summary{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:12px 14px;
  cursor:pointer;
  color:#d8cfbd;
  font-weight:800;
  list-style:none;
}
.transfer-advanced-options summary::-webkit-details-marker{display:none}
.transfer-advanced-options summary::after{
  content:"＋";
  color:#d7b55d;
  font-size:1rem;
}
.transfer-advanced-options[open] summary::after{content:"−"}
.transfer-advanced-options summary span{
  margin-left:auto;
  padding:3px 7px;
  border:1px solid rgba(65,240,166,.22);
  border-radius:999px;
  color:#66eaaa;
  font-size:.62rem;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.transfer-advanced-options>p,
.transfer-advanced-options>.transfer-form-title,
.transfer-advanced-options>.transfer-pass-fields,
.transfer-advanced-options>.transfer-check-grid{
  margin-left:14px!important;
  margin-right:14px!important;
}
.transfer-advanced-options>p{
  color:#7f8981;
  font-size:.72rem;
  line-height:1.45;
}
.transfer-advanced-options>.transfer-check-grid{margin-bottom:14px!important}

@media(max-width:700px){
  .transfer-id-primary{grid-template-columns:1fr}
  .transfer-id-run{width:100%}
}


/* =========================================================
   SIMPLIFIED TRANSFER PLAN CALCULATOR
   ========================================================= */
.transfer-pass-head-compact{
  margin-bottom:14px!important;
  align-items:center!important;
}
.transfer-pass-head-compact h2{
  margin:.15rem 0 .35rem!important;
  font-size:clamp(1.35rem,4vw,2rem)!important;
}
.transfer-pass-head-compact p:not(.kicker){
  max-width:720px!important;
  line-height:1.42!important;
}
.transfer-id-primary{
  padding:12px!important;
}
.transfer-id-help{
  margin-top:-2px!important;
}
.transfer-guide-coverage,
.transfer-advanced-options{
  display:none!important;
}

/* =========================================================
   TRANSFER APPLICATION — COMPACT LANDING
   ========================================================= */
.transfer-application-intro{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  align-items:center;
  padding:18px!important;
  border-color:rgba(65,240,166,.24)!important;
}
.transfer-application-intro-copy h2{
  margin:.15rem 0 .35rem!important;
  font-family:Georgia,serif;
  font-size:clamp(1.45rem,4.5vw,2.25rem);
  color:#f0e7d6;
}
.transfer-application-intro-copy p:last-child{
  margin:0;
  color:#8e988e;
  line-height:1.42;
}
.transfer-jump-apply{
  white-space:nowrap;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none!important;
}

.transfer-requirements-compact{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.transfer-requirements-compact article{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:9px;
  align-items:start;
  padding:11px 12px;
  border:1px solid rgba(123,55,174,.22);
  border-radius:11px;
  background:rgba(255,255,255,.018);
}
.transfer-requirements-compact article>span{
  color:#d7b55d;
  font-family:Georgia,serif;
  font-size:.85rem;
  line-height:1.35;
}
.transfer-requirements-compact h3{
  margin:0!important;
  font-size:.84rem!important;
  line-height:1.25;
  color:#e9dfcc!important;
}
.transfer-requirements-compact p{
  margin:4px 0 0!important;
  color:#7f8981!important;
  font-size:.70rem!important;
  line-height:1.35!important;
}
.transfer-application-primary{
  margin-top:4px!important;
  border-color:rgba(214,168,75,.28)!important;
}
.transfer-bracket-admin-note{
  padding:10px 12px;
  border:1px solid rgba(65,240,166,.18);
  border-radius:9px;
  background:rgba(65,240,166,.035);
  color:#8f9990;
  line-height:1.45;
}
.transfer-bracket-admin-note b{color:#66eaaa}

@media(max-width:700px){
  .transfer-application-intro{
    grid-template-columns:1fr;
    gap:10px;
    padding:14px!important;
  }
  .transfer-jump-apply{
    width:100%;
  }
  .transfer-requirements-compact{
    grid-template-columns:1fr 1fr;
    gap:6px;
  }
  .transfer-requirements-compact article{
    grid-template-columns:28px minmax(0,1fr);
    padding:9px 10px;
    gap:7px;
  }
  .transfer-requirements-compact h3{
    font-size:.76rem!important;
  }
  .transfer-requirements-compact p{
    font-size:.64rem!important;
    display:-webkit-box;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden;
  }
}
@media(max-width:430px){
  .transfer-requirements-compact{
    grid-template-columns:1fr;
  }
  .transfer-requirements-compact p{
    -webkit-line-clamp:2;
  }
}


/* =========================================================
   HOME — TRANSFER-FIRST LANDING
   Bring the reaper hero/copy upward so all three primary actions
   appear much sooner on mobile.
   ========================================================= */
.hero-apply-btn{
  position:relative;
  font-weight:900!important;
  letter-spacing:.015em;
}
@media(max-width:760px){
  .hero{
    min-height:535px!important;
    padding:16px 18px 22px!important;
  }
  .hero:before{
    background-position:center -48px!important;
    background-size:cover!important;
  }
  .hero-copy{
    padding-top:145px!important;
  }
  .hero .kicker{
    margin:0 0 4px!important;
    font-size:.61rem!important;
  }
  .hero h1{
    margin:5px 0 10px!important;
    font-size:3.35rem!important;
    line-height:.83!important;
  }
  .hero-ornament{
    margin:-2px 0 7px!important;
  }
  .hero-copy>p:not(.kicker){
    margin:5px 0!important;
    font-size:.96rem!important;
    line-height:1.28!important;
  }
  .hero-actions{
    margin-top:13px!important;
    gap:7px!important;
  }
  .hero-actions .btn{
    min-height:41px!important;
    padding:8px 11px!important;
    font-size:.82rem!important;
  }
  .hero-actions .hero-apply-btn{
    min-height:45px!important;
    font-size:.88rem!important;
  }
}
@media(max-width:430px){
  .hero{
    min-height:510px!important;
  }
  .hero:before{
    background-position:center -55px!important;
  }
  .hero-copy{
    padding-top:132px!important;
  }
  .hero h1{
    font-size:3.08rem!important;
  }
  .hero-actions{
    gap:6px!important;
  }
}

/* =========================================================
   MOBILE DOCK — TRANSFER APPLICATION MAIN SLOT
   Reuses the exact existing forged EVENTS frame artwork, then
   overlays APPLY so the frame/gems remain visually consistent.
   ========================================================= */
@media(max-width:760px){
  .dock-btn[data-view="transfer-application"]{
    position:relative!important;
  }
  .dock-btn[data-view="transfer-application"] .dock-art{
    z-index:1!important;
  }
  .dock-apply-overlay{
    position:absolute!important;
    z-index:6!important;
    left:17%!important;
    right:17%!important;
    top:14%!important;
    bottom:12%!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:0!important;
    pointer-events:none!important;
    background:
      radial-gradient(circle at 50% 22%,rgba(214,168,75,.09),transparent 35%),
      linear-gradient(180deg,rgba(16,13,9,.98),rgba(6,8,7,.98))!important;
    border-radius:4px!important;
    box-shadow:inset 0 0 10px rgba(0,0,0,.7)!important;
  }
  .dock-apply-overlay b{
    display:block!important;
    color:#d7b55d!important;
    font-size:1.24rem!important;
    line-height:.92!important;
    text-shadow:0 1px 3px #000!important;
  }
  .dock-apply-overlay small{
    display:block!important;
    margin-top:3px!important;
    color:#efd889!important;
    font-family:Georgia,"Times New Roman",serif!important;
    font-size:.58rem!important;
    line-height:1!important;
    font-weight:800!important;
    letter-spacing:.08em!important;
    text-shadow:0 1px 3px #000!important;
  }
  .dock-btn[data-view="transfer-application"].active .dock-apply-overlay{
    box-shadow:
      inset 0 0 11px rgba(0,0,0,.78),
      0 0 11px color-mix(in srgb,var(--dock-active) 34%,transparent)!important;
  }
  .dock-btn[data-view="transfer-application"].active .dock-apply-overlay b,
  .dock-btn[data-view="transfer-application"].active .dock-apply-overlay small{
    color:#fff0ad!important;
  }
}


/* =========================================================
   HOME CTA POLISH
   ========================================================= */
@media(max-width:760px){
  /* Drop copy slightly lower so the KINGDOM wording sits below the reaper's neck,
     while keeping the buttons visible on first view. */
  .hero-copy{
    padding-top:178px!important;
  }

  /* Secondary Home actions should read as real controls, not plain text. */
  .hero-actions .btn:not(.hero-apply-btn){
    font-weight:900!important;
    letter-spacing:.025em!important;
    border-width:2px!important;
    border-style:solid!important;
    border-color:rgba(214,168,75,.52)!important;
    background:
      linear-gradient(180deg,rgba(28,23,17,.92),rgba(9,8,9,.97))!important;
    color:#f1e1b0!important;
    box-shadow:
      inset 0 1px 0 rgba(255,245,205,.10),
      inset 0 -10px 20px rgba(0,0,0,.34),
      0 3px 10px rgba(0,0,0,.34)!important;
    text-shadow:0 1px 2px #000!important;
    cursor:pointer!important;
    transition:transform .14s ease,filter .14s ease,box-shadow .14s ease!important;
  }
  .hero-actions .btn:not(.hero-apply-btn):active{
    transform:translateY(1px) scale(.992)!important;
    filter:brightness(1.13)!important;
    box-shadow:
      inset 0 2px 8px rgba(0,0,0,.42),
      0 1px 4px rgba(0,0,0,.35)!important;
  }

  /* Keep the application CTA visually strongest. */
  .hero-actions .hero-apply-btn{
    font-weight:950!important;
    border:2px solid rgba(96,255,78,.72)!important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.23),
      inset 0 -8px 20px rgba(0,90,0,.22),
      0 0 12px rgba(52,242,44,.18),
      0 4px 12px rgba(0,0,0,.38)!important;
  }
}

@media(max-width:430px){
  .hero-copy{
    padding-top:164px!important;
  }
}

/* =========================================================
   MOBILE DOCK APPLY — MATCH FORGED GOLD BUTTON STYLE
   ========================================================= */
@media(max-width:760px){
  .dock-apply-overlay{
    color:#d8b85f!important;
  }

  .dock-apply-icon{
    display:block!important;
    width:25px!important;
    height:20px!important;
    color:#d8b85f!important;
    filter:drop-shadow(0 1px 2px #000)!important;
  }

  .dock-apply-overlay small{
    margin-top:2px!important;
    color:#e6c873!important;
    font-family:Georgia,"Times New Roman",serif!important;
    font-size:.57rem!important;
    font-weight:900!important;
    letter-spacing:.09em!important;
    text-shadow:0 1px 2px #000,0 0 4px rgba(214,168,75,.12)!important;
  }

  .dock-btn[data-view="transfer-application"].active .dock-apply-icon,
  .dock-btn[data-view="transfer-application"].active .dock-apply-overlay small{
    color:#f4d97f!important;
  }
}


/* =========================================================
   PNG RANKING FRAMES (Top 3 commanders)
   ========================================================= */
.rank-art-scene{
  position:relative;
  z-index:3;
  width:min(100%,340px);
  margin:14px auto 8px;
  display:block;
  isolation:isolate;
}
.rank-art-frame{
  display:block;
  width:100%;
  height:auto;
  user-select:none;
  pointer-events:none;
  filter:drop-shadow(0 18px 26px rgba(0,0,0,.45));
}
.rank-art-avatar{
  position:absolute;
  left:50%;
  top:var(--rank-avatar-top,17%);
  width:var(--rank-avatar-size,34%);
  aspect-ratio:1/1;
  transform:translateX(-50%);
  border-radius:999px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:3px solid color-mix(in srgb,var(--rank-metal) 82%,rgba(255,255,255,.18));
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.12), rgba(255,255,255,0) 45%),
    linear-gradient(145deg, color-mix(in srgb,var(--rank-accent) 16%,#131118), #08080b 72%);
  box-shadow:
    0 0 0 5px rgba(0,0,0,.35),
    0 0 0 6px color-mix(in srgb,var(--rank-metal) 24%,transparent),
    0 0 32px var(--rank-glow),
    inset 0 -18px 28px rgba(0,0,0,.22);
}
.rank-art-avatar img,
.rank-art-avatar .rank-avatar-image{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
}
.rank-art-avatar .rank-avatar-fallback{
  font-size:2.55rem;
}

.rank-card .rank-throne-scene,
.rank-card .rank-banner,
.rank-card .rank-torch{
  display:none !important;
}

.rank-card{
  min-height:unset !important;
}
.rank-card-1{
  --rank-metal:#f2c963;
  --rank-accent:#55f0a9;
  --rank-glow:rgba(222,171,49,.27);
  border-color:rgba(242,201,99,.56);
  box-shadow:0 26px 80px rgba(0,0,0,.48),0 0 34px rgba(216,165,44,.13),inset 0 0 42px rgba(85,240,169,.04);
}
.rank-card-2{
  --rank-metal:#d1b56a;
  --rank-accent:#55e6af;
  --rank-glow:rgba(94,243,173,.16);
  border-color:rgba(216,184,108,.46);
}
.rank-card-3{
  --rank-metal:#d7d9e1;
  --rank-accent:#b46bff;
  --rank-glow:rgba(171,113,255,.24);
  border-color:rgba(190,186,224,.42);
}
.rank-card-2 .rank-position{
  color:#efe0a6;
}
.rank-card-3 .rank-position{
  color:#e8ddff;
}
.rank-card-3 .rank-tier{
  color:#d9d7e8;
  background:linear-gradient(180deg, rgba(36,28,45,.95), rgba(12,11,18,.96));
}
.rank-card-3 .rank-profile-btn{
  border-color:rgba(212,203,255,.28);
  color:#efe8ff;
}
.rank-card-3 .rank-profile-btn:hover{
  border-color:rgba(224,214,255,.4);
}

.rank-card-header{
  position:relative;
  z-index:4;
}
.rank-identity{
  margin-top:4px;
}
.rank-identity h2{
  text-shadow:0 1px 2px rgba(0,0,0,.55);
}

@media (min-width:900px){
  .rank-art-scene{
    width:min(100%,360px);
    margin-top:16px;
  }
  .rank-card-1 .rank-art-scene{
    width:min(100%,372px);
  }
}

@media (max-width:899px){
  .rank-art-scene{
    width:min(100%,330px);
    margin-top:10px;
  }
}

@media (max-width:480px){
  .rank-art-scene{
    width:min(100%,312px);
    margin-bottom:5px;
  }
  .rank-art-avatar{
    border-width:2px;
    box-shadow:
      0 0 0 4px rgba(0,0,0,.34),
      0 0 0 5px color-mix(in srgb,var(--rank-metal) 24%,transparent),
      0 0 24px var(--rank-glow),
      inset 0 -12px 22px rgba(0,0,0,.22);
  }
}


/* =========================================================
   TOP-3 AVATAR RESTORE — portrait behind transparent PNG frame
   ========================================================= */
.rank-art-scene{
  position:relative!important;
}
.rank-art-frame{
  position:relative!important;
  z-index:3!important;
}
.rank-art-avatar{
  z-index:2!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  flex:none!important;
  aspect-ratio:1 / 1!important;
  border-radius:50%!important;
  padding:0!important;
  overflow:hidden!important;
}
.rank-art-avatar img,
.rank-art-avatar .rank-avatar-image{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:50%!important;
}
.rank-art-avatar .rank-avatar-fallback{
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  height:100%!important;
  border-radius:50%!important;
}

/* Fine-tuned opening alignment for the three generated transparent frames. */
.rank-card-1 .rank-art-avatar{
  top:17.0%!important;
  width:34.5%!important;
}
.rank-card-2 .rank-art-avatar{
  top:17.1%!important;
  width:34.2%!important;
}
.rank-card-3 .rank-art-avatar{
  top:17.0%!important;
  width:34.2%!important;
}


/* =========================================================
   LIVE DATA REFRESH — NON-BLOCKING
   Home and Rankings now keep their current content visible while
   live data refreshes in the background.
   ========================================================= */
.notice.live-refresh-inline{
  margin-bottom:10px;
  opacity:.82;
}


/* =========================================================
   RANKING PNG FRAME LOAD STABILITY
   Preserve the full throne/frame layout while transparent PNG art decodes.
   ========================================================= */
.rank-art-scene{
  min-height:390px!important;
}
.rank-art-frame{
  min-height:390px!important;
  object-fit:contain!important;
}
@media(max-width:899px){
  .rank-art-scene{
    min-height:382px!important;
  }
  .rank-art-frame{
    min-height:382px!important;
  }
}
@media(max-width:480px){
  .rank-art-scene{
    min-height:365px!important;
  }
  .rank-art-frame{
    min-height:365px!important;
  }
}


/* TRANSFER CALCULATOR — graceful MightPulse retry */
.transfer-retry-notice{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
}
.transfer-retry-notice>span{
  min-width:0;
}
.transfer-retry-notice .btn{
  flex:0 0 auto;
  min-height:36px!important;
  padding:7px 13px!important;
}
@media(max-width:520px){
  .transfer-retry-notice{
    align-items:stretch!important;
    flex-direction:column!important;
  }
  .transfer-retry-notice .btn{
    width:100%;
  }
}


/* =========================================================
   TRANSFER CALCULATOR — OPTIONAL OFFICIAL PASS HISTORY
   ========================================================= */
.transfer-history-options{
  margin-top:4px;
  border:1px solid rgba(214,168,75,.20);
  border-radius:12px;
  background:rgba(214,168,75,.025);
  overflow:hidden;
}
.transfer-history-options summary{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  cursor:pointer;
  list-style:none;
  color:#e8dfcc;
  font-weight:850;
}
.transfer-history-options summary::-webkit-details-marker{display:none}
.transfer-history-options summary:after{
  content:"+";
  margin-left:3px;
  color:#d7b55d;
  font-size:1rem;
}
.transfer-history-options[open] summary:after{content:"−"}
.transfer-history-options summary b{
  margin-left:auto;
  padding:4px 7px;
  border:1px solid rgba(65,240,166,.23);
  border-radius:999px;
  color:#60e8a4;
  font-size:.58rem;
  letter-spacing:.065em;
  white-space:nowrap;
}
.transfer-history-copy{
  padding:0 14px 2px;
}
.transfer-history-copy p{
  margin:0;
  color:#858f87;
  font-size:.72rem;
  line-height:1.45;
}
.transfer-history-copy strong{color:#d8cfbd}
.transfer-history-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  padding:12px 14px 14px;
}
.transfer-history-grid label{
  margin:0!important;
}
.transfer-history-grid input{
  margin-top:6px;
}

.transfer-history-result{
  padding:14px;
  border:1px solid rgba(65,240,166,.20);
  border-radius:13px;
  background:rgba(65,240,166,.025);
}
.transfer-history-result.outlier{
  border-color:rgba(214,168,75,.36);
  background:linear-gradient(110deg,rgba(214,168,75,.055),rgba(91,42,116,.045));
}
.transfer-history-result-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:start;
}
.transfer-history-result-head small{
  color:#7f8981;
  font-size:.6rem;
  letter-spacing:.09em;
}
.transfer-history-result-head h3{
  margin:3px 0 0;
  color:#61e9a7;
  font-size:.95rem;
}
.transfer-history-result.outlier h3{color:#e3bd5e}
.transfer-history-result-head>span{
  max-width:48%;
  text-align:right;
  color:#aaa18d;
  font-size:.65rem;
  line-height:1.4;
}
.transfer-history-result-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-top:11px;
}
.transfer-history-result-stats>span{
  display:grid;
  padding:9px;
  border:1px solid rgba(255,255,255,.065);
  border-radius:9px;
  background:rgba(0,0,0,.18);
}
.transfer-history-result-stats small{
  color:#747e76;
  font-size:.56rem;
  text-transform:uppercase;
  letter-spacing:.055em;
}
.transfer-history-result-stats b{
  margin-top:3px;
  color:#ddd4c1;
  font-size:.8rem;
}
.transfer-history-result-stats .recommended{
  border-color:rgba(65,240,166,.22);
}
.transfer-history-result-stats .recommended b{
  color:#62eaa7;
}
.transfer-history-result>p{
  margin:10px 0 0;
  color:#879088;
  font-size:.72rem;
  line-height:1.45;
}

@media(max-width:650px){
  .transfer-history-grid{
    grid-template-columns:1fr;
  }
  .transfer-history-result-head{
    display:grid;
  }
  .transfer-history-result-head>span{
    max-width:none;
    text-align:left;
  }
  .transfer-history-result-stats{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   TRANSFER CALCULATOR DISABLED STATE
   ========================================================= */
.transfer-calculator-disabled{
  text-align:center;
  padding:28px 18px!important;
  border-color:rgba(214,168,75,.24)!important;
  background:linear-gradient(145deg,rgba(214,168,75,.035),rgba(92,43,117,.035))!important;
}
.transfer-calculator-disabled h2{
  margin:.25rem 0 .5rem;
}
.transfer-calculator-disabled p:last-child{
  max-width:680px;
  margin:0 auto;
  color:#8d978e;
  line-height:1.5;
}

/* =========================================================
   DASHBOARD — TRANSFER ESTIMATE RECORDS
   ========================================================= */
.transfer-estimate-records-card .application-inbox-actions{
  flex-wrap:wrap;
}
#transferEstimateRecordSearch{
  min-width:210px;
  min-height:38px;
}
.transfer-estimate-record-list{
  display:grid;
  gap:8px;
  margin-top:10px;
}
.transfer-estimate-record{
  border:1px solid rgba(255,255,255,.08);
  border-radius:11px;
  background:rgba(255,255,255,.02);
  overflow:hidden;
}
.transfer-estimate-record>summary{
  display:grid;
  grid-template-columns:minmax(0,1fr) 110px 150px 22px;
  gap:10px;
  align-items:center;
  padding:11px 12px;
  cursor:pointer;
  list-style:none;
}
.transfer-estimate-record>summary::-webkit-details-marker{display:none}
.estimate-record-player{
  display:grid;
  min-width:0;
}
.estimate-record-player b{
  color:#e8dfcc;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.estimate-record-player small,
.estimate-record-date{
  color:#7e887f;
  font-size:.67rem;
}
.estimate-record-result{
  display:grid;
  text-align:right;
}
.estimate-record-result small{
  color:#777f78;
  font-size:.55rem;
  letter-spacing:.07em;
}
.estimate-record-result b{
  color:#62eaa7;
}
.estimate-record-date{
  text-align:right;
}
.estimate-record-body{
  padding:12px;
  border-top:1px solid rgba(255,255,255,.06);
}
.estimate-record-scenarios{
  margin-top:10px;
  padding:10px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:8px;
  background:rgba(0,0,0,.16);
}
.estimate-record-scenarios>span{
  color:#d7b55d;
  font-size:.62rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.estimate-record-scenarios p{
  margin:4px 0 0;
  color:#858f86;
  font-size:.71rem;
  line-height:1.4;
}
.estimate-record-verify{
  display:grid;
  grid-template-columns:180px minmax(220px,1fr) auto;
  gap:9px;
  align-items:end;
  margin-top:12px;
}
.estimate-record-verify label{
  margin:0!important;
}
.estimate-record-comparison{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
  padding:9px 10px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:8px;
  color:#8a948b;
  font-size:.7rem;
}
.estimate-record-comparison.exact{
  border-color:rgba(65,240,166,.26);
}
.estimate-record-comparison.exact b{color:#61eaa7}
.estimate-record-comparison.close b{color:#d7b55d}
.estimate-record-comparison.miss b{color:#e26b77}
.estimate-record-comparison.pending b{color:#aaa18d}

@media(max-width:760px){
  .transfer-estimate-record>summary{
    grid-template-columns:minmax(0,1fr) 82px 20px;
  }
  .estimate-record-date{
    grid-column:1 / -1;
    text-align:left;
  }
  .estimate-record-verify{
    grid-template-columns:1fr;
  }
  .estimate-record-verify .btn{
    width:100%;
  }
}


/* =========================================================
   ALLIANCE ROSTER — NUMBER COUNT COLUMN
   ========================================================= */
.alliance-roster-panel .roster-row{
  width:max-content!important;
  min-width:max-content!important;
  max-width:none!important;
  grid-template-columns:
    var(--roster-number-w,40px)
    var(--roster-rank-w,36px)
    var(--roster-governor-w,192px)
    var(--roster-power-w,80px)
    var(--roster-tc-w,52px)
    var(--roster-kills-w,76px)
    var(--roster-active-w,72px)!important;
  column-gap:var(--roster-col-gap,3px)!important;
}
.alliance-roster-panel .roster-count{
  color:#e45b5b;
  font-weight:900;
  font-variant-numeric:tabular-nums;
  text-align:center;
}
.alliance-roster-panel .roster-row.header>span:first-child{
  color:#ff7a7a;
}

/* =========================================================
   ALLIANCE ROSTER — CRIMSON "STATUS WINDOW" FRAME
   Inspired by the supplied red fantasy status-window reference.
   ========================================================= */
.alliance-roster-panel{
  position:relative!important;
  isolation:isolate;
  overflow:visible!important;
  border:1px solid rgba(255,68,68,.58)!important;
  border-radius:8px!important;
  background:
    radial-gradient(circle at 50% 0%,rgba(112,0,0,.12),transparent 34%),
    linear-gradient(180deg,rgba(20,6,9,.92),rgba(5,7,7,.97))!important;
  box-shadow:
    0 0 0 1px rgba(119,0,0,.72),
    0 0 18px rgba(255,23,23,.25),
    0 0 42px rgba(126,0,0,.15),
    inset 0 0 32px rgba(128,0,0,.08)!important;
  padding:24px 18px 18px!important;
}
.alliance-roster-panel::before{
  content:"";
  position:absolute;
  z-index:3;
  pointer-events:none;
  inset:-8px;
  border-radius:10px;
  background:
    radial-gradient(circle at 0 0,#fff 0 1px,#ff6b6b 2px 3px,rgba(255,0,0,.65) 4px 6px,transparent 8px),
    radial-gradient(circle at 100% 0,#fff 0 1px,#ff6b6b 2px 3px,rgba(255,0,0,.65) 4px 6px,transparent 8px),
    radial-gradient(circle at 0 100%,#fff 0 1px,#ff6b6b 2px 3px,rgba(255,0,0,.65) 4px 6px,transparent 8px),
    radial-gradient(circle at 100% 100%,#fff 0 1px,#ff6b6b 2px 3px,rgba(255,0,0,.65) 4px 6px,transparent 8px),
    linear-gradient(90deg,transparent 3%,rgba(255,43,43,.85) 10%,rgba(255,84,84,.95) 50%,rgba(255,43,43,.85) 90%,transparent 97%) top/100% 2px no-repeat,
    linear-gradient(90deg,transparent 3%,rgba(255,43,43,.85) 10%,rgba(255,84,84,.95) 50%,rgba(255,43,43,.85) 90%,transparent 97%) bottom/100% 2px no-repeat,
    linear-gradient(180deg,transparent 3%,rgba(255,43,43,.80) 10%,rgba(255,72,72,.92) 50%,rgba(255,43,43,.80) 90%,transparent 97%) left/2px 100% no-repeat,
    linear-gradient(180deg,transparent 3%,rgba(255,43,43,.80) 10%,rgba(255,72,72,.92) 50%,rgba(255,43,43,.80) 90%,transparent 97%) right/2px 100% no-repeat;
  filter:drop-shadow(0 0 5px rgba(255,37,37,.8));
}
.alliance-roster-panel::after{
  content:"✦";
  position:absolute;
  z-index:4;
  pointer-events:none;
  top:-23px;
  left:50%;
  transform:translateX(-50%) rotate(45deg);
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  color:#fff3f3;
  font-size:15px;
  line-height:1;
  border:1px solid rgba(255,74,74,.85);
  background:
    linear-gradient(135deg,#2a0609 0 42%,#9b1118 43% 57%,#2a0609 58% 100%);
  box-shadow:
    0 0 0 4px rgba(70,0,0,.86),
    0 0 11px rgba(255,24,24,.92),
    0 0 25px rgba(255,0,0,.42);
}
.alliance-roster-panel .roster-headbar{
  position:relative;
  z-index:5;
  padding-bottom:13px;
  border-bottom:1px solid rgba(255,67,67,.35);
  box-shadow:0 7px 16px -14px rgba(255,20,20,.95);
}
.alliance-roster-panel .section-title .kicker{
  color:#ff6666!important;
  text-shadow:0 0 8px rgba(255,31,31,.35);
}
.alliance-roster-panel .section-title h2{
  color:#f4e4e1!important;
  text-shadow:0 0 10px rgba(255,32,32,.16);
}
.alliance-roster-panel .roster-scroll{
  position:relative;
  z-index:5;
  border-color:rgba(255,71,71,.28)!important;
  box-shadow:inset 0 0 22px rgba(110,0,0,.08);
}
.alliance-roster-panel .roster-row.header{
  background:linear-gradient(180deg,rgba(31,6,8,.96),rgba(13,8,9,.98))!important;
  color:#8e7a7a!important;
  border-bottom-color:rgba(255,68,68,.22)!important;
}
.alliance-roster-panel .roster-row:not(.header){
  background:rgba(5,10,7,.93)!important;
  border-bottom-color:rgba(111,57,57,.26)!important;
}
.alliance-roster-panel .roster-row:not(.header):hover{
  background:linear-gradient(90deg,rgba(75,8,10,.30),rgba(11,16,11,.98))!important;
}

/* Decorative red "star" nodes centered on each edge. */
.alliance-roster-panel .roster-headbar::before,
.alliance-roster-panel .roster-headbar::after{
  content:"✦";
  position:absolute;
  top:-35px;
  color:#ffdad7;
  font-size:11px;
  text-shadow:
    0 0 4px #fff,
    0 0 8px #ff2828,
    0 0 14px #ff0000;
  pointer-events:none;
}
.alliance-roster-panel .roster-headbar::before{left:22%}
.alliance-roster-panel .roster-headbar::after{right:22%}

@media(max-width:760px){
  .alliance-roster-panel{
    padding:22px 12px 14px!important;
    margin-top:10px!important;
  }
  .alliance-roster-panel .roster-row{
    width:max-content!important;
    min-width:max-content!important;
    max-width:none!important;
    grid-template-columns:
      var(--roster-number-w,40px)
      var(--roster-rank-w,36px)
      var(--roster-governor-w,192px)
      var(--roster-power-w,80px)
      var(--roster-tc-w,52px)
      var(--roster-kills-w,76px)
      var(--roster-active-w,72px)!important;
    column-gap:var(--roster-col-gap,3px)!important;
    padding-left:8px!important;
    padding-right:8px!important;
  }
  .alliance-roster-panel::after{
    top:-20px;
    width:32px;
    height:32px;
    font-size:12px;
  }
}

/* =========================================================
   Fiery PNG frame treatment for alliance detail + player pages
   Uses the transparent asset generated from the status-window reference.
   ========================================================= */
.alliance-detail-page .alliance-branded-hero,
.alliance-detail-page .alliance-about-panel,
.alliance-detail-page .alliance-roster-panel,
.player-public-profile .player-profile-hero,
.player-public-profile .player-stats .card,
.player-public-profile .grid2 > .panel{
  position:relative!important;
  isolation:isolate!important;
  overflow:visible!important;
  border:0!important;
  border-radius:24px!important;
  background:
    radial-gradient(circle at 50% 0%,rgba(185,28,28,.10),transparent 34%),
    linear-gradient(180deg,rgba(15,8,8,.96),rgba(7,8,9,.98))!important;
  box-shadow:
    0 16px 40px rgba(0,0,0,.28),
    inset 0 0 30px rgba(90,0,0,.08)!important;
}

.alliance-detail-page .alliance-branded-hero::before,
.alliance-detail-page .alliance-about-panel::before,
.alliance-detail-page .alliance-roster-panel::before,
.player-public-profile .player-profile-hero::before,
.player-public-profile .player-stats .card::before,
.player-public-profile .grid2 > .panel::before{
  content:""!important;
  position:absolute!important;
  inset:-12px!important;
  z-index:0!important;
  pointer-events:none!important;
  border-radius:28px!important;
  background:url('./fiery_demonic_fantasy_ui_frame.png') center/100% 100% no-repeat!important;
  filter:drop-shadow(0 0 12px rgba(255,48,48,.18));
}

.alliance-detail-page .alliance-branded-hero > *,
.alliance-detail-page .alliance-about-panel > *,
.alliance-detail-page .alliance-roster-panel > *,
.player-public-profile .player-profile-hero > *,
.player-public-profile .player-stats .card > *,
.player-public-profile .grid2 > .panel > *{
  position:relative;
  z-index:1;
}

/* Replace the prior CSS-drawn roster frame with the PNG version. */
.alliance-detail-page .alliance-roster-panel{
  padding:28px 20px 18px!important;
}
.alliance-detail-page .alliance-roster-panel::after{
  content:none!important;
  display:none!important;
}
.alliance-detail-page .alliance-roster-panel .roster-headbar{
  border-bottom:1px solid rgba(255,87,87,.22)!important;
  box-shadow:none!important;
}
.alliance-detail-page .alliance-roster-panel .section-title .kicker{
  color:#ff7a7a!important;
  text-shadow:0 0 8px rgba(255,32,32,.25);
}
.alliance-detail-page .alliance-roster-panel .section-title h2,
.player-public-profile .player-profile-name{
  text-shadow:0 0 14px rgba(255,55,55,.10);
}
.alliance-detail-page .alliance-roster-panel .roster-headbar::before,
.alliance-detail-page .alliance-roster-panel .roster-headbar::after{
  display:none!important;
}
.alliance-detail-page .alliance-roster-panel .roster-scroll{
  background:rgba(6,8,8,.86)!important;
  border-color:rgba(255,71,71,.16)!important;
}
.alliance-detail-page .alliance-roster-panel .roster-row.header{
  background:linear-gradient(180deg,rgba(34,9,11,.95),rgba(14,9,10,.98))!important;
  color:#a99090!important;
  border-bottom-color:rgba(255,84,84,.18)!important;
}
.alliance-detail-page .alliance-roster-panel .roster-row:not(.header){
  background:rgba(7,10,9,.92)!important;
  border-bottom-color:rgba(125,66,66,.22)!important;
}
.alliance-detail-page .alliance-roster-panel .roster-row:not(.header):hover{
  background:linear-gradient(90deg,rgba(78,10,10,.22),rgba(10,13,12,.98))!important;
}

/* Room for the decorative frame on hero cards and profile cards. */
.alliance-detail-page .alliance-branded-hero,
.player-public-profile .player-profile-hero{
  padding:30px 28px!important;
}
.alliance-detail-page .alliance-about-panel,
.player-public-profile .grid2 > .panel{
  padding:24px 22px!important;
}
.player-public-profile .player-stats .card{
  padding:22px 18px!important;
  min-height:112px;
}
.player-public-profile .player-profile-hero .avatar{
  border-color:rgba(255,92,92,.40)!important;
  box-shadow:0 0 0 1px rgba(255,45,45,.12), 0 0 18px rgba(255,35,35,.08);
}
.player-public-profile .profile-pills span{
  border-color:rgba(255,93,93,.20)!important;
  background:rgba(255,255,255,.02);
}

@media (max-width: 760px){
  .alliance-detail-page .alliance-branded-hero,
  .player-public-profile .player-profile-hero,
  .alliance-detail-page .alliance-about-panel,
  .alliance-detail-page .alliance-roster-panel,
  .player-public-profile .grid2 > .panel{
    padding:22px 16px!important;
  }
  .player-public-profile .player-stats .card{
    padding:18px 14px!important;
  }
  .alliance-detail-page .alliance-branded-hero::before,
  .alliance-detail-page .alliance-about-panel::before,
  .alliance-detail-page .alliance-roster-panel::before,
  .player-public-profile .player-profile-hero::before,
  .player-public-profile .player-stats .card::before,
  .player-public-profile .grid2 > .panel::before{
    inset:-8px!important;
  }
}


/* =========================================================
   FIERY FRAME POLISH — ALIGNMENT + LESS REPETITION
   ========================================================= */

/* Give the decorative PNG room so headings/labels never sit under the spikes. */
.alliance-detail-page .alliance-branded-hero,
.alliance-detail-page .alliance-about-panel,
.alliance-detail-page .alliance-roster-panel,
.player-public-profile .player-profile-hero,
.player-public-profile .grid2 > .panel{
  padding-top:42px!important;
  padding-left:30px!important;
  padding-right:30px!important;
  padding-bottom:28px!important;
}

/* Player profile heading area needs more breathing room around the avatar/frame. */
.player-public-profile .player-profile-hero{
  gap:24px!important;
  align-items:center!important;
}
.player-public-profile .player-profile-copy{
  padding-top:2px!important;
}
.player-public-profile .player-profile-kicker{
  margin:0 0 8px!important;
  line-height:1.35!important;
}
.player-public-profile .player-profile-name{
  margin:.15rem 0 .5rem!important;
  line-height:1.02!important;
}
.player-public-profile .player-profile-alliance{
  margin:.35rem 0 .65rem!important;
  line-height:1.35!important;
}
.player-public-profile .profile-pills{
  margin-top:8px!important;
}

/* Alliance page copy spacing */
.alliance-detail-page .alliance-branded-hero .alliance-rank-label{
  margin:0 0 5px!important;
}
.alliance-detail-page .alliance-branded-hero h1{
  margin:.1rem 0 .35rem!important;
  line-height:1.05!important;
}
.alliance-detail-page .alliance-leader-line{
  margin:.25rem 0 .55rem!important;
  line-height:1.35!important;
}
.alliance-detail-page .alliance-about-panel .kicker{
  margin:0 0 9px!important;
}
.alliance-detail-page .alliance-about-copy{
  line-height:1.5!important;
}
.alliance-detail-page .alliance-about-copy p{
  margin:.2rem 0!important;
}

/* Keep the roster title/control block clear of the top crest. */
.alliance-detail-page .alliance-roster-panel .roster-headbar{
  padding-top:3px!important;
  margin-bottom:14px!important;
}
.alliance-detail-page .alliance-roster-panel .section-title{
  margin-bottom:0!important;
}

/* Heroes/Gear titles were too close to the frame art. */
.player-public-profile .grid2 > .panel .section-title{
  margin:0 0 18px!important;
  padding-top:2px!important;
}
.player-public-profile .grid2 > .panel .section-title .kicker{
  margin:0 0 5px!important;
}
.player-public-profile .grid2 > .panel .section-title h2{
  margin:0!important;
  line-height:1.05!important;
}

/* =========================================================
   PLAYER STATS — COLOR VARIATION PER BOX
   Same PNG frame, different magical tint per stat card.
   ========================================================= */
.player-public-profile .player-stats{
  gap:14px!important;
}
.player-public-profile .player-stats .card{
  min-height:118px!important;
  padding:34px 22px 22px!important;
  background:
    radial-gradient(circle at 50% 0%,rgba(255,255,255,.035),transparent 36%),
    linear-gradient(180deg,rgba(14,9,11,.97),rgba(7,8,9,.99))!important;
}
.player-public-profile .player-stats .card small{
  position:relative!important;
  z-index:2!important;
  margin-bottom:7px!important;
  font-size:.72rem!important;
  letter-spacing:.04em!important;
}
.player-public-profile .player-stats .card strong{
  position:relative!important;
  z-index:2!important;
  font-size:1.15rem!important;
  line-height:1.1!important;
}

/* Power — red/orange */
.player-public-profile .player-stats .card:nth-child(1)::before{
  filter:hue-rotate(0deg) saturate(1.05) brightness(1.00) drop-shadow(0 0 10px rgba(255,45,45,.18))!important;
}
.player-public-profile .player-stats .card:nth-child(1) small{color:#ff9a73!important}
.player-public-profile .player-stats .card:nth-child(1) strong{color:#ffd0b0!important}

/* Kills — magenta/purple */
.player-public-profile .player-stats .card:nth-child(2)::before{
  filter:hue-rotate(280deg) saturate(1.05) brightness(.98) drop-shadow(0 0 10px rgba(208,66,255,.17))!important;
}
.player-public-profile .player-stats .card:nth-child(2) small{color:#df9cff!important}
.player-public-profile .player-stats .card:nth-child(2) strong{color:#f0d1ff!important}

/* Town Center — emerald */
.player-public-profile .player-stats .card:nth-child(3)::before{
  filter:hue-rotate(105deg) saturate(.92) brightness(.94) drop-shadow(0 0 10px rgba(54,231,158,.15))!important;
}
.player-public-profile .player-stats .card:nth-child(3) small{color:#73e8b4!important}
.player-public-profile .player-stats .card:nth-child(3) strong{color:#c7f7df!important}

/* VIP — gold */
.player-public-profile .player-stats .card:nth-child(4)::before{
  filter:hue-rotate(30deg) saturate(.82) brightness(1.03) drop-shadow(0 0 10px rgba(232,187,76,.16))!important;
}
.player-public-profile .player-stats .card:nth-child(4) small{color:#e8c46f!important}
.player-public-profile .player-stats .card:nth-child(4) strong{color:#f6e2a9!important}

/* Location — blue/cyan */
.player-public-profile .player-stats .card:nth-child(5)::before{
  filter:hue-rotate(175deg) saturate(.95) brightness(.92) drop-shadow(0 0 10px rgba(73,176,255,.15))!important;
}
.player-public-profile .player-stats .card:nth-child(5) small{color:#82c7ff!important}
.player-public-profile .player-stats .card:nth-child(5) strong{color:#d2ecff!important}

/* Last Active — violet */
.player-public-profile .player-stats .card:nth-child(6)::before{
  filter:hue-rotate(230deg) saturate(.9) brightness(.94) drop-shadow(0 0 10px rgba(122,103,255,.16))!important;
}
.player-public-profile .player-stats .card:nth-child(6) small{color:#aaa0ff!important}
.player-public-profile .player-stats .card:nth-child(6) strong{color:#dfdbff!important}

/* Heroes and Gear should not look identical. */
.player-public-profile .grid2 > .panel:nth-child(1)::before{
  filter:hue-rotate(292deg) saturate(.96) brightness(.96) drop-shadow(0 0 12px rgba(200,73,255,.14))!important;
}
.player-public-profile .grid2 > .panel:nth-child(1) .kicker{
  color:#dca0ff!important;
}
.player-public-profile .grid2 > .panel:nth-child(2)::before{
  filter:hue-rotate(28deg) saturate(.82) brightness(1.03) drop-shadow(0 0 12px rgba(231,180,71,.14))!important;
}
.player-public-profile .grid2 > .panel:nth-child(2) .kicker{
  color:#e5bd63!important;
}

/* Reduce visual weight on the repeating inner hero/gear rows. */
.player-public-profile .hero-item,
.player-public-profile .gear-item{
  border-color:rgba(255,255,255,.08)!important;
  background:rgba(5,9,7,.82)!important;
  box-shadow:none!important;
}

/* Mobile alignment */
@media(max-width:760px){
  .alliance-detail-page .alliance-branded-hero,
  .alliance-detail-page .alliance-about-panel,
  .alliance-detail-page .alliance-roster-panel,
  .player-public-profile .player-profile-hero,
  .player-public-profile .grid2 > .panel{
    padding-top:36px!important;
    padding-left:20px!important;
    padding-right:20px!important;
    padding-bottom:22px!important;
  }

  .player-public-profile .player-profile-hero{
    gap:16px!important;
    align-items:flex-start!important;
  }

  .player-public-profile .player-stats .card{
    min-height:112px!important;
    padding:31px 18px 18px!important;
  }

  .alliance-detail-page .alliance-about-copy{
    padding:0 2px!important;
  }
}

@media(max-width:430px){
  .player-public-profile .player-profile-hero{
    padding-top:38px!important;
  }
  .player-public-profile .player-profile-name{
    font-size:clamp(1.65rem,8vw,2.5rem)!important;
  }
}


/* =========================================================
   Alliance page frame fix + theme preset picker
   ========================================================= */
.alliance-detail-page .alliance-branded-hero,
.alliance-detail-page .alliance-about-panel{
  padding-top:44px!important;
  padding-left:28px!important;
  padding-right:28px!important;
  padding-bottom:26px!important;
}
.alliance-detail-page .alliance-roster-panel{
  padding-top:36px!important;
  padding-left:22px!important;
  padding-right:22px!important;
  padding-bottom:20px!important;
}
.alliance-detail-page .alliance-branded-hero::before,
.alliance-detail-page .alliance-about-panel::before,
.alliance-detail-page .alliance-roster-panel::before{
  inset:-10px!important;
}
.alliance-detail-page .alliance-branded-hero .alliance-custom-avatar{
  margin-top:12px!important;
  align-self:flex-start!important;
}
.alliance-detail-page .alliance-branded-hero .alliance-title-copy{
  padding-top:6px!important;
  min-width:0!important;
}
.alliance-detail-page .alliance-branded-hero .alliance-rank-label{
  margin:0 0 6px!important;
  line-height:1.2!important;
}
.alliance-detail-page .alliance-branded-hero .alliance-title-copy h1{
  margin:0 0 6px!important;
  line-height:1.02!important;
  text-wrap:balance;
}
.alliance-detail-page .alliance-branded-hero .alliance-leader-line{
  margin:0 0 10px!important;
  line-height:1.42!important;
}
.alliance-detail-page .alliance-branded-hero .detail-numbers{
  margin-top:8px!important;
}
.alliance-detail-page .alliance-about-panel .kicker{
  margin:0 0 10px!important;
  line-height:1.2!important;
}
.alliance-detail-page .alliance-about-copy,
.alliance-detail-page .alliance-about-copy p{
  font-size:var(--ab-about-font-size,16px)!important;
  line-height:max(1.5,var(--ab-about-line,1.5))!important;
  color:var(--ab-about,#eee3d0)!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  text-shadow:0 1px 1px rgba(0,0,0,.18);
}
.alliance-detail-page .alliance-about-copy{
  padding:0 2px 4px!important;
}
.alliance-detail-page .alliance-about-copy p + p{
  margin-top:max(10px,var(--ab-about-gap,10px))!important;
}

.alliance-theme-presets{
  display:grid;
  gap:10px;
  margin:12px 0 16px;
  padding:14px 14px 12px;
  border:1px solid rgba(255,102,102,.16);
  border-radius:16px;
  background:linear-gradient(180deg,rgba(14,8,10,.86),rgba(8,8,10,.92));
}
.alliance-theme-presets-head{
  display:grid;
  gap:3px;
}
.alliance-theme-presets-head b{
  color:#f2ead8;
  letter-spacing:.04em;
}
.alliance-theme-presets-head small{
  color:#9f9494;
}
.alliance-theme-preset-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:10px;
}
.alliance-theme-preset{
  appearance:none;
  border:1px solid rgba(255,110,110,.18);
  border-radius:14px;
  background:linear-gradient(180deg,rgba(18,12,13,.96),rgba(8,8,10,.98));
  color:#f2ead8;
  padding:10px 12px;
  display:grid;
  gap:8px;
  text-align:left;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.alliance-theme-preset:hover{
  transform:translateY(-1px);
  border-color:rgba(255,146,146,.34);
}
.alliance-theme-preset.active{
  border-color:rgba(255,194,118,.5);
  box-shadow:0 0 0 1px rgba(255,194,118,.18),0 0 16px rgba(255,58,58,.10);
}
.alliance-theme-preset strong{
  font-size:.86rem;
  line-height:1.15;
}
.alliance-theme-swatch-row{
  display:flex;
  gap:6px;
  align-items:center;
}
.alliance-theme-swatch-row i{
  width:18px;
  height:18px;
  border-radius:999px;
  display:block;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 0 0 1px rgba(0,0,0,.3) inset;
}

@media(max-width:760px){
  .alliance-detail-page .alliance-branded-hero,
  .alliance-detail-page .alliance-about-panel{
    padding-top:38px!important;
    padding-left:18px!important;
    padding-right:18px!important;
    padding-bottom:22px!important;
  }
  .alliance-detail-page .alliance-roster-panel{
    padding-top:32px!important;
    padding-left:14px!important;
    padding-right:14px!important;
    padding-bottom:18px!important;
  }
  .alliance-detail-page .alliance-branded-hero .alliance-custom-avatar{
    margin-top:8px!important;
  }
  .alliance-detail-page .alliance-branded-hero .alliance-title-copy h1{
    font-size:clamp(1.75rem,7.2vw,2.3rem)!important;
  }
  .alliance-theme-preset-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* =========================================================
   ABOUT FIX + FRAME STYLE PICKERS
   ========================================================= */
.alliance-detail-page,
.player-public-profile,
.alliance-brand-preview{
  --page-frame-image:url('./fiery_demonic_fantasy_ui_frame.png');
  --page-frame-filter:drop-shadow(0 0 12px rgba(255,48,48,.18));
  --page-frame-glow:#ff6a6a;
  --page-frame-stroke:#d6a84b;
}
.alliance-detail-page .alliance-branded-hero::before,
.alliance-detail-page .alliance-about-panel::before,
.alliance-detail-page .alliance-roster-panel::before,
.player-public-profile .player-profile-hero::before,
.player-public-profile .player-about-panel::before,
.player-public-profile .player-stats .card::before,
.player-public-profile .grid2 > .panel::before,
.alliance-brand-preview::before{
  background-image:var(--page-frame-image)!important;
  filter:var(--page-frame-filter)!important;
}
.alliance-brand-preview{position:relative;overflow:visible}
.alliance-brand-preview::before{content:"";position:absolute;inset:-10px;border-radius:24px;pointer-events:none;z-index:0;background-position:center;background-size:100% 100%;background-repeat:no-repeat}
.alliance-brand-preview>*{position:relative;z-index:1}
.alliance-brand-preview[data-frame-style="plain"]::before{opacity:0}
.alliance-brand-preview[data-frame-style="plain"]{border:1px solid rgba(214,168,75,.42)!important;box-shadow:0 0 0 1px rgba(214,168,75,.18) inset,0 0 18px rgba(255,106,106,.12)!important}

.alliance-detail-page[data-alliance-frame="plain"] .alliance-branded-hero,
.alliance-detail-page[data-alliance-frame="plain"] .alliance-about-panel,
.alliance-detail-page[data-alliance-frame="plain"] .alliance-roster-panel,
.player-public-profile[data-player-frame="plain"] .player-profile-hero,
.player-public-profile[data-player-frame="plain"] .player-about-panel,
.player-public-profile[data-player-frame="plain"] .grid2>.panel,
.player-public-profile[data-player-frame="plain"] .player-stats .card{
  border:1px solid color-mix(in srgb,var(--page-frame-stroke) 72%, transparent)!important;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--page-frame-stroke) 34%, transparent) inset,0 0 18px color-mix(in srgb,var(--page-frame-glow) 18%, transparent),0 16px 40px rgba(0,0,0,.28)!important;
}
.alliance-detail-page[data-alliance-frame="plain"] .alliance-branded-hero::before,
.alliance-detail-page[data-alliance-frame="plain"] .alliance-about-panel::before,
.alliance-detail-page[data-alliance-frame="plain"] .alliance-roster-panel::before,
.player-public-profile[data-player-frame="plain"] .player-profile-hero::before,
.player-public-profile[data-player-frame="plain"] .player-about-panel::before,
.player-public-profile[data-player-frame="plain"] .grid2>.panel::before,
.player-public-profile[data-player-frame="plain"] .player-stats .card::before{opacity:0!important}

.alliance-detail-page .alliance-about-panel{display:block!important;min-height:0!important;padding-top:58px!important;padding-bottom:30px!important}
.alliance-detail-page .alliance-about-panel .kicker{margin:0 0 14px!important}
.alliance-detail-page .alliance-about-copy,.alliance-detail-page .alliance-about-copy p{display:block!important;width:100%!important;max-width:none!important;line-height:max(1.62,var(--ab-about-line,1.62))!important}
.alliance-detail-page .alliance-about-copy{padding:2px 4px 6px!important}
.alliance-detail-page .alliance-about-copy p{margin:0!important}
.alliance-detail-page .alliance-about-copy p+p{margin-top:max(12px,var(--ab-about-gap,12px))!important}

.player-public-profile .player-profile-hero,.player-public-profile .player-about-panel{padding-top:50px!important;padding-bottom:28px!important}
.player-public-profile .player-profile-hero{display:grid!important;grid-template-columns:110px minmax(0,1fr)!important;align-items:start!important;gap:22px!important}
.player-public-profile .player-profile-copy{overflow:visible!important}
.player-public-profile .player-profile-name{font-size:clamp(1.6rem,5.9vw,3rem)!important;line-height:.96!important;overflow-wrap:anywhere!important;word-break:break-word!important;text-wrap:balance}
.player-public-profile .player-about-panel .kicker{margin:0 0 12px!important;color:var(--mp-about-label)!important}
.player-public-profile .public-player-about,.player-public-profile .public-player-about p,.player-public-profile .public-player-about>span{display:none!important}
.player-public-profile .public-player-about-block{color:var(--mp-about-text)!important;font-size:.98rem!important;line-height:1.55!important;overflow-wrap:anywhere!important;word-break:break-word!important;white-space:normal!important}

.frame-style-editor{display:grid;gap:10px;margin:0 0 16px;padding:14px;border:1px solid rgba(255,110,110,.16);border-radius:16px;background:linear-gradient(180deg,rgba(14,8,10,.84),rgba(7,8,9,.94))}
.frame-style-editor-head{display:grid;gap:3px}
.frame-style-editor-head b{color:#f2ead8;letter-spacing:.04em}
.frame-style-editor-head small{color:#9f9494;line-height:1.4}
.frame-style-preset-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(142px,1fr));gap:10px}
.frame-style-preset{appearance:none;border:1px solid rgba(255,110,110,.18);border-radius:14px;background:linear-gradient(180deg,rgba(18,12,13,.96),rgba(8,8,10,.98));color:#f2ead8;padding:10px 12px;display:grid;gap:8px;text-align:left;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
.frame-style-preset:hover{transform:translateY(-1px);border-color:rgba(255,146,146,.34)}
.frame-style-preset.active{border-color:rgba(255,194,118,.5);box-shadow:0 0 0 1px rgba(255,194,118,.18),0 0 16px rgba(255,58,58,.10)}
.frame-style-preset strong{font-size:.86rem;line-height:1.15}
.frame-style-chip{display:block;height:18px;border-radius:999px;border:1px solid rgba(255,255,255,.12);box-shadow:0 0 0 1px rgba(0,0,0,.28) inset}
.frame-style-chip-plain{background:linear-gradient(90deg,rgba(212,169,92,.95),rgba(85,236,168,.88))}
.frame-style-chip-fiery{background:linear-gradient(90deg,#ff6c58,#ff2e2e)}
.frame-style-chip-crimson{background:linear-gradient(90deg,#ff9888,#ff3d3d)}
.frame-style-chip-blood{background:linear-gradient(90deg,#ff5a66,#ff3049)}
.frame-style-chip-emberFrame{background:linear-gradient(90deg,#ffdc92,#ffb14d)}
.frame-style-chip-royalFrame{background:linear-gradient(90deg,#e2a8ff,#8a4fff)}
.frame-style-chip-emeraldFrame{background:linear-gradient(90deg,#7fffd0,#30e688)}
.frame-style-chip-frostFrame{background:linear-gradient(90deg,#d8efff,#63c0ff)}

@media(max-width:760px){
  .alliance-detail-page .alliance-about-panel{padding-top:48px!important;padding-bottom:24px!important}
  .player-public-profile .player-profile-hero,.player-public-profile .player-about-panel{padding-top:42px!important;padding-bottom:22px!important}
  .player-public-profile .player-profile-hero{grid-template-columns:86px minmax(0,1fr)!important;gap:16px!important}
  .player-public-profile .player-profile-name{font-size:clamp(1.45rem,7vw,2.35rem)!important}
  .frame-style-preset-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* =========================================================
   FRAME PERSISTENCE / LAYOUT FINAL FIX
   ========================================================= */

/* Keep alliance banner artwork INSIDE the decorative frame instead of
   extending underneath/outside the visual border. */
.alliance-detail-page .alliance-branded-hero{
  background-position:center!important;
  background-repeat:no-repeat!important;
  background-size:calc(100% - 42px) calc(100% - 42px)!important;
  padding:58px 48px 42px!important;
}

/* About Us: keep all copy safely inside every edge of the PNG frame. */
.alliance-detail-page .alliance-about-panel{
  padding:68px 52px 52px!important;
  overflow:visible!important;
}
.alliance-detail-page .alliance-about-panel .kicker{
  margin:0 0 18px!important;
}
.alliance-detail-page .alliance-about-copy{
  padding:0!important;
  margin:0!important;
  overflow:visible!important;
}
.alliance-detail-page .alliance-about-copy,
.alliance-detail-page .alliance-about-copy p{
  position:relative!important;
  z-index:2!important;
  width:100%!important;
  max-width:100%!important;
  line-height:1.65!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}

/* About Me has its own real framed panel. */
.player-public-profile .player-about-panel{
  position:relative!important;
  isolation:isolate!important;
  overflow:visible!important;
  border:0!important;
  border-radius:24px!important;
  padding:64px 42px 44px!important;
  background:
    radial-gradient(circle at 50% 0%,rgba(255,255,255,.025),transparent 36%),
    linear-gradient(180deg,rgba(13,9,12,.97),rgba(7,8,9,.99))!important;
}
.player-public-profile .player-about-panel::before{
  content:""!important;
  position:absolute!important;
  inset:-10px!important;
  z-index:0!important;
  pointer-events:none!important;
  border-radius:28px!important;
  background-image:var(--page-frame-image)!important;
  background-position:center!important;
  background-size:100% 100%!important;
  background-repeat:no-repeat!important;
  filter:var(--page-frame-filter)!important;
}
.player-public-profile .player-about-panel > *{
  position:relative!important;
  z-index:1!important;
}
.player-public-profile .player-about-panel .kicker{
  margin:0 0 14px!important;
}
.player-public-profile .public-player-about-block{
  margin:0!important;
  padding:0!important;
  line-height:1.6!important;
}

/* Center the label/value vertically in every stat box from Power through Last Active. */
.player-public-profile .player-stats .card{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:flex-start!important;
  min-height:150px!important;
  padding:38px 32px!important;
}
.player-public-profile .player-stats .card small,
.player-public-profile .player-stats .card strong{
  margin-left:0!important;
  margin-right:0!important;
}
.player-public-profile .player-stats .card small{
  margin-bottom:9px!important;
}

/* Plain Glow keeps each user's existing per-box glow colors. */
.player-public-profile[data-player-frame="plain"] .player-about-panel::before{
  opacity:0!important;
}
.player-public-profile[data-player-frame="plain"] .player-about-panel{
  border:1px solid color-mix(in srgb,var(--mp-about-label) 68%,transparent)!important;
  box-shadow:
    0 0 0 1px color-mix(in srgb,var(--mp-about-label) 24%,transparent) inset,
    0 0 18px color-mix(in srgb,var(--mp-about-text) 16%,transparent)!important;
}

/* Mobile spacing: preserve frame-safe gutters without making the cards huge. */
@media(max-width:760px){
  .alliance-detail-page .alliance-branded-hero{
    background-size:calc(100% - 28px) calc(100% - 28px)!important;
    padding:50px 34px 34px!important;
  }
  .alliance-detail-page .alliance-about-panel{
    padding:60px 38px 44px!important;
  }
  .player-public-profile .player-about-panel{
    padding:56px 34px 38px!important;
  }
  .player-public-profile .player-stats .card{
    min-height:138px!important;
    padding:34px 28px!important;
  }
}

@media(max-width:430px){
  .alliance-detail-page .alliance-about-panel{
    padding:56px 32px 40px!important;
  }
  .player-public-profile .player-about-panel{
    padding:52px 30px 36px!important;
  }
  .player-public-profile .player-stats .card{
    min-height:132px!important;
    padding:30px 26px!important;
  }
}


/* =========================================================
   BANNER + ABOUT US + PLAYER STAT ALIGNMENT POLISH
   ========================================================= */

/* Round the actual alliance hero/banner surface so the banner image
   blends into the frame instead of showing square image corners. */
.alliance-detail-page .alliance-branded-hero{
  border-radius:34px!important;
  background-clip:padding-box!important;
  background-origin:padding-box!important;
}
.alliance-detail-page .alliance-branded-hero::before{
  border-radius:38px!important;
}

/* Pull About Us copy further inward from all four frame edges. */
.alliance-detail-page .alliance-about-panel{
  padding-top:72px!important;
  padding-right:78px!important;
  padding-bottom:58px!important;
  padding-left:78px!important;
}
.alliance-detail-page .alliance-about-panel .kicker{
  margin-bottom:20px!important;
}
.alliance-detail-page .alliance-about-copy{
  padding:0 4px!important;
}
.alliance-detail-page .alliance-about-copy,
.alliance-detail-page .alliance-about-copy p{
  max-width:100%!important;
  line-height:1.68!important;
}

/* Center BOTH the label and value inside Power, Kills, Town Center,
   VIP, Location and Last Active. */
.player-public-profile .player-stats .card{
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
}
.player-public-profile .player-stats .card small,
.player-public-profile .player-stats .card strong{
  width:100%!important;
  text-align:center!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Mobile-specific safe areas. */
@media(max-width:760px){
  .alliance-detail-page .alliance-branded-hero{
    border-radius:30px!important;
  }
  .alliance-detail-page .alliance-branded-hero::before{
    border-radius:34px!important;
  }
  .alliance-detail-page .alliance-about-panel{
    padding-top:64px!important;
    padding-right:54px!important;
    padding-bottom:48px!important;
    padding-left:54px!important;
  }
}

@media(max-width:430px){
  .alliance-detail-page .alliance-about-panel{
    padding-top:60px!important;
    padding-right:46px!important;
    padding-bottom:44px!important;
    padding-left:46px!important;
  }
}


/* =========================================================
   HALL OF LEGENDS / RANKING LIST — AVATAR + PROFILE LINK
   ========================================================= */
.leaderboard .leader-row{
  grid-template-columns:52px 48px minmax(0,1fr) 150px!important;
  gap:12px!important;
  align-items:center!important;
  min-width:0!important;
}
.leaderboard .leader-rank{
  font-variant-numeric:tabular-nums;
}
.leaderboard .leader-avatar{
  width:44px;
  height:44px;
  border-radius:12px;
  overflow:hidden;
  display:grid;
  place-items:center;
  flex:0 0 44px;
  border:1px solid rgba(197,165,93,.28);
  background:linear-gradient(145deg,rgba(28,25,31,.98),rgba(9,9,12,.98));
  color:#d7bf75;
  font-weight:900;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025);
}
.leaderboard .leader-avatar img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
}
.leaderboard .leader-avatar>span{
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
}
.leaderboard .leader-identity{
  display:grid!important;
  gap:3px;
  min-width:0;
}
.leaderboard .leader-name-link{
  appearance:none;
  border:0;
  padding:0;
  margin:0;
  background:transparent;
  color:#ece5da;
  font:inherit;
  font-weight:850;
  line-height:1.15;
  text-align:left;
  width:max-content;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  cursor:pointer;
}
.leaderboard .leader-name-link:hover,
.leaderboard .leader-name-link:focus-visible{
  color:#d9bf75;
  text-decoration:underline;
  text-underline-offset:3px;
}
.leaderboard .leader-identity small{
  display:block;
  color:#8d8799!important;
  line-height:1.2;
  white-space:normal;
}
.leaderboard .leader-power{
  display:flex!important;
  justify-content:flex-end;
  align-items:baseline;
  gap:7px;
  text-align:right!important;
  white-space:nowrap;
}
.leaderboard .leader-power span{
  color:#8e8793!important;
  font-size:.68rem;
  font-style:normal;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.leaderboard .leader-power strong{
  color:#ddd3b9;
  font-style:normal;
  font-weight:500;
}

@media(max-width:760px){
  .leaderboard .leader-row{
    grid-template-columns:42px 42px minmax(0,1fr)!important;
    gap:9px!important;
    padding:14px 2px!important;
  }
  .leaderboard .leader-avatar{
    width:40px;
    height:40px;
    border-radius:10px;
  }
  .leaderboard .leader-power{
    grid-column:3!important;
    justify-content:flex-start!important;
    text-align:left!important;
    margin-top:3px;
  }
  .leaderboard .leader-name-link{
    font-size:1rem;
  }
}

@media(max-width:430px){
  .leaderboard .leader-row{
    grid-template-columns:36px 38px minmax(0,1fr)!important;
    gap:8px!important;
  }
  .leaderboard .leader-avatar{
    width:36px;
    height:36px;
    border-radius:9px;
  }
  .leaderboard .leader-identity small{
    font-size:.72rem;
  }
}


/* =========================================================
   RANKINGS — MULTI-BOARD SELECTOR
   ========================================================= */
.ranking-board-picker{
  padding:22px 20px!important;
}
.ranking-board-picker-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:16px;
  margin-bottom:16px;
}
.ranking-board-picker-head h2{
  margin:.15rem 0 0;
}
.ranking-board-picker-head>span{
  color:#837d8a;
  font-size:.7rem;
  font-weight:850;
  letter-spacing:.08em;
  white-space:nowrap;
}
.ranking-board-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.ranking-board-choice{
  min-height:44px;
  border:1px solid rgba(158,126,208,.18);
  border-radius:10px;
  background:rgba(9,9,13,.36);
  color:#9b96a7;
  font:inherit;
  font-size:.78rem;
  font-weight:760;
  line-height:1.2;
  padding:8px 10px;
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.ranking-board-choice.active{
  color:#f4eee4;
  border-color:rgba(184,118,255,.55);
  background:linear-gradient(180deg,rgba(145,84,221,.74),rgba(99,54,180,.82));
  box-shadow:0 0 16px rgba(151,82,232,.18),inset 0 1px rgba(255,255,255,.12);
}
@media(hover:hover) and (pointer:fine){
  .ranking-board-choice:hover{
    color:#e6dfeb;
    border-color:rgba(179,132,233,.34);
    transform:translateY(-1px);
  }
}
.ranking-board-panel{
  min-height:280px;
}
.ranking-board-loading,
.ranking-board-empty{
  min-height:180px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:8px;
  text-align:center;
  color:#918b98;
}
.ranking-board-loading>span{
  width:28px;
  height:28px;
  border:3px solid rgba(172,115,238,.18);
  border-top-color:#a866ee;
  border-radius:50%;
  animation:rankingBoardSpin .8s linear infinite;
}
.ranking-board-empty>span{
  font-size:1.6rem;
}
.ranking-board-empty b{
  color:#d7d0db;
}
.ranking-board-empty small{
  max-width:420px;
}
@keyframes rankingBoardSpin{to{transform:rotate(360deg)}}
.ranking-alliance-row .leader-name-link{
  white-space:normal!important;
}
.alliance-ranking-avatar{
  color:#d9bc69!important;
  text-transform:uppercase;
  font-size:.72rem;
}

@media(max-width:760px){
  .ranking-board-picker{
    padding:18px 14px!important;
  }
  .ranking-board-picker-head{
    display:grid;
    gap:6px;
  }
  .ranking-board-picker-head>span{
    white-space:normal;
  }
  .ranking-board-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
  }
  .ranking-board-choice{
    min-height:42px;
    padding:7px 7px;
    font-size:.69rem;
  }
}
@media(max-width:430px){
  .ranking-board-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .ranking-board-choice{
    font-size:.72rem;
  }
}
@media(prefers-reduced-motion:reduce){
  .ranking-board-loading>span{animation:none}
}


/* Ranking boards now use stale-while-revalidate:
   saved rows remain visible while fresh data updates quietly. */
.ranking-board-panel .leaderboard-heading>span{
  transition:opacity .18s ease;
}


/* Alliance detail pages intentionally use the 133.333% body wide-fit.
   Global Safari overflow clipping must not cut the outer forged frame. */
@media(max-width:760px){
  body[data-alliance-page-fit="1"]{overflow-x:visible!important;}
  body[data-alliance-page-fit="1"] #content{overflow:visible!important;}
  body[data-alliance-page-fit="1"] .alliance-detail-page,
  body[data-alliance-page-fit="1"] .alliance-branded-hero,
  body[data-alliance-page-fit="1"] .alliance-roster-panel{overflow:visible!important;}
}

/* =========================================================
   RANKINGS — COMPACT MOBILE BOARD PICKER
   Keeps every board visible while reducing long scrolling.
   ========================================================= */
@media(max-width:760px){
  .ranking-board-picker{
    padding:14px 10px!important;
  }
  .ranking-board-picker-head{
    gap:3px;
    margin-bottom:10px;
  }
  .ranking-board-picker-head>span{
    font-size:.62rem;
    line-height:1.15;
  }
  .ranking-board-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
  }
  .ranking-board-choice{
    min-height:34px!important;
    border-radius:8px;
    padding:5px 4px!important;
    font-size:.625rem!important;
    line-height:1.08!important;
    letter-spacing:-.01em;
  }
}
@media(max-width:390px){
  .ranking-board-choice{
    font-size:.595rem!important;
    padding-left:3px!important;
    padding-right:3px!important;
  }
}

/* --- Player profile icon + Kingshot-style enhancements --- */
.player-public-profile .profile-label-icon{
  display:inline-grid!important;
  place-items:center!important;
  width:1.4rem!important;
  height:1.4rem!important;
  border-radius:999px!important;
  margin-right:.42rem!important;
  font-size:.84rem!important;
  font-style:normal!important;
  line-height:1!important;
  color:#ffe9bf!important;
  background:radial-gradient(circle at 30% 25%,rgba(255,236,168,.52),rgba(215,149,53,.25) 42%,rgba(42,18,7,.92) 100%)!important;
  border:1px solid rgba(255,214,126,.38)!important;
  box-shadow:0 0 12px rgba(236,171,69,.18),inset 0 0 18px rgba(255,255,255,.08)!important;
  vertical-align:middle!important;
}
.player-public-profile .profile-label-icon-kills{color:#ffd2ff!important;background:radial-gradient(circle at 30% 25%,rgba(255,224,255,.5),rgba(163,54,255,.26) 45%,rgba(28,8,36,.94) 100%)!important;border-color:rgba(212,136,255,.38)!important;box-shadow:0 0 12px rgba(180,86,255,.18)!important}
.player-public-profile .profile-label-icon-townCenter{color:#d9ffe9!important;background:radial-gradient(circle at 30% 25%,rgba(236,255,247,.48),rgba(55,214,124,.24) 42%,rgba(5,25,12,.95) 100%)!important;border-color:rgba(114,255,182,.36)!important;box-shadow:0 0 12px rgba(46,215,122,.18)!important}
.player-public-profile .profile-label-icon-location{color:#d6efff!important;background:radial-gradient(circle at 30% 25%,rgba(232,247,255,.5),rgba(68,158,255,.23) 42%,rgba(10,18,33,.95) 100%)!important;border-color:rgba(123,200,255,.34)!important;box-shadow:0 0 12px rgba(89,166,255,.18)!important}
.player-public-profile .profile-label-icon-lastActive{color:#e3deff!important;background:radial-gradient(circle at 30% 25%,rgba(243,240,255,.5),rgba(105,100,255,.22) 45%,rgba(16,14,34,.95) 100%)!important;border-color:rgba(170,164,255,.33)!important;box-shadow:0 0 12px rgba(115,115,255,.18)!important}
.player-public-profile .profile-label-icon-heroes,
.player-public-profile .profile-label-icon-gear,
.player-public-profile .profile-label-icon-about{margin-right:.5rem!important}

.player-public-profile .player-profile-hero .avatar.player-avatar-shell{
  position:relative!important;
  width:118px!important;
  height:118px!important;
  min-width:118px!important;
  border:0!important;
  border-radius:28px!important;
  overflow:visible!important;
  background:transparent!important;
  box-shadow:none!important;
  isolation:isolate!important;
}
.player-public-profile .player-avatar-backdrop{
  position:absolute!important;
  inset:10px!important;
  border-radius:24px!important;
  background:radial-gradient(circle at 35% 28%,rgba(255,210,96,.18),rgba(14,10,8,.96) 70%)!important;
  border:1px solid rgba(255,219,145,.18)!important;
  box-shadow:inset 0 0 22px rgba(255,255,255,.06),0 10px 28px rgba(0,0,0,.34)!important;
}
.player-public-profile .player-avatar-core{
  position:absolute!important;
  inset:14px!important;
  border-radius:22px!important;
  overflow:hidden!important;
  display:grid!important;
  place-items:center!important;
  background:linear-gradient(145deg,#111018,#050507)!important;
  z-index:2!important;
}
.player-public-profile .player-avatar-core img,
.player-public-profile .player-avatar-image{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
}
.player-public-profile .player-avatar-fallback{
  font-family:Georgia,serif!important;
  font-size:2.8rem!important;
  color:#ffe2aa!important;
}
.player-public-profile .player-avatar-frame-image,
.player-public-profile .player-avatar-frame-fallback{
  position:absolute!important;
  inset:0!important;
  z-index:3!important;
  pointer-events:none!important;
}
.player-public-profile .player-avatar-frame-image{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  filter:drop-shadow(0 0 16px rgba(255,181,73,.16))!important;
}
.player-public-profile .player-avatar-frame-fallback::before,
.player-public-profile .player-avatar-frame-fallback::after{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  border-radius:28px!important;
}
.player-public-profile .player-avatar-frame-fallback::before{
  background:linear-gradient(145deg,rgba(255,232,171,.92),rgba(186,114,41,.96) 34%,rgba(94,47,18,.98) 72%,rgba(255,215,132,.82))!important;
  clip-path:polygon(20% 0,80% 0,92% 8%,100% 20%,100% 80%,92% 92%,80% 100%,20% 100%,8% 92%,0 80%,0 20%,8% 8%)!important;
  box-shadow:0 0 0 2px rgba(255,233,190,.1),0 10px 32px rgba(0,0,0,.22)!important;
}
.player-public-profile .player-avatar-frame-fallback::after{
  inset:8px!important;
  background:linear-gradient(145deg,rgba(45,18,6,.96),rgba(10,8,12,.98))!important;
  clip-path:polygon(18% 0,82% 0,94% 8%,100% 18%,100% 82%,94% 92%,82% 100%,18% 100%,6% 92%,0 82%,0 18%,6% 8%)!important;
  box-shadow:inset 0 0 0 1px rgba(255,216,141,.18)!important;
}
.player-public-profile .player-profile-kicker,
.player-public-profile .profile-pills span,
.player-public-profile .player-stats .card small,
.player-public-profile .grid2 > .panel .section-title .kicker,
.player-public-profile .grid2 > .panel .section-title h2,
.player-public-profile .player-about-panel .kicker{
  display:flex!important;
  align-items:center!important;
}
.player-public-profile .profile-pills span{gap:.12rem!important}
.player-public-profile .profile-pill-tc{gap:.52rem!important}
.player-public-profile .profile-pill-tc b{font-weight:800!important;color:#efe7cf!important}
.player-public-profile .player-stats .card small{gap:.18rem!important}
.player-public-profile .player-stats .card strong{display:flex!important;align-items:center!important;gap:.66rem!important;flex-wrap:wrap!important}
.player-public-profile .player-stats .card.player-stat-card-townCenter strong{justify-content:flex-start!important}

.tc-icon-badge{
  display:inline-grid!important;
  place-items:center!important;
  grid-template-rows:1fr auto!important;
  width:52px!important;
  height:52px!important;
  border-radius:14px!important;
  clip-path:polygon(50% 0,84% 12%,100% 44%,92% 84%,50% 100%,8% 84%,0 44%,16% 12%)!important;
  background:linear-gradient(180deg,#f7df7b 0%,#e3b041 28%,#b76722 60%,#5a2a12 100%)!important;
  border:1px solid rgba(255,236,168,.4)!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.1),0 6px 20px rgba(0,0,0,.26)!important;
  color:#fff7db!important;
  line-height:1!important;
  vertical-align:middle!important;
}
.tc-icon-badge .tc-icon-core{font-weight:900!important;font-size:1.08rem!important;text-shadow:0 1px 0 rgba(73,33,8,.75)!important}
.tc-icon-badge small{display:block!important;font-size:.54rem!important;letter-spacing:.12em!important;font-weight:900!important;margin-top:-2px!important;text-shadow:0 1px 0 rgba(73,33,8,.75)!important}
.tc-icon-badge.is-tg{background:linear-gradient(180deg,#ffe695 0%,#f0c649 24%,#c87b22 56%,#5d2514 100%)!important}
.tc-icon-badge.is-tc{background:linear-gradient(180deg,#d7efff 0%,#7ac7ff 26%,#256ea5 58%,#16304f 100%)!important}
.tc-icon-badge.is-empty{width:auto!important;height:auto!important;clip-path:none!important;border-radius:999px!important;padding:.28rem .56rem!important;background:rgba(255,255,255,.08)!important}
.tc-icon-badge.is-mini{width:34px!important;height:34px!important;border-radius:10px!important}
.tc-icon-badge.is-mini .tc-icon-core{font-size:.84rem!important}
.tc-icon-badge.is-mini small{display:none!important}
.player-public-profile .tc-stat-wrap{display:flex!important;align-items:center!important;gap:.72rem!important;flex-wrap:wrap!important}
.player-public-profile .tc-stat-wrap b{font-size:1.12em!important;font-weight:900!important;letter-spacing:.02em!important;color:#f3ebd2!important}

@media (max-width: 700px){
  .player-public-profile .player-profile-hero .avatar.player-avatar-shell{
    width:100px!important;
    height:100px!important;
    min-width:100px!important;
  }
  .tc-icon-badge{width:46px!important;height:46px!important}
  .tc-icon-badge.is-mini{width:var(--profile-icon-size)!important;height:var(--profile-icon-size)!important}
}

/* --- 2026-09-06 player profile correction: centered stats, exact TG art, real avatar visible --- */
.player-public-profile .player-stats .player-stat-card{
  text-align:center!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
}
.player-public-profile .player-stats .player-stat-card small,
.player-public-profile .player-stats .player-stat-card strong{
  width:100%!important;
  justify-content:center!important;
  text-align:center!important;
}
.player-public-profile .player-stats .player-stat-card strong{
  align-items:center!important;
}
.player-public-profile .player-stats .card.player-stat-card-townCenter strong{
  justify-content:center!important;
}
.player-public-profile .tc-stat-wrap{
  width:100%!important;
  justify-content:center!important;
}

/* Real TG 1-8 art cut from the supplied Kingshot reference. */
.tc-icon-badge.tg-image-badge{
  width:58px!important;
  height:58px!important;
  display:inline-grid!important;
  place-items:center!important;
  border:0!important;
  border-radius:0!important;
  clip-path:none!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.tc-icon-badge.tg-image-badge img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  display:block!important;
  filter:drop-shadow(0 4px 6px rgba(0,0,0,.28)) drop-shadow(0 0 5px rgba(255,197,74,.16))!important;
}
.tc-icon-badge.tg-image-badge.is-mini{
  width:38px!important;
  height:38px!important;
}
.tc-icon-badge.tc-basic-badge{
  width:50px!important;
  height:50px!important;
  clip-path:none!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,rgba(45,103,143,.96),rgba(16,43,67,.98))!important;
  border:1px solid rgba(157,216,255,.34)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05),0 5px 16px rgba(0,0,0,.25)!important;
  grid-template-columns:auto auto!important;
  grid-template-rows:1fr!important;
  gap:4px!important;
  padding:0 7px!important;
}
.tc-icon-badge.tc-basic-badge .tc-basic-castle{font-size:.9rem!important;color:#bfe7ff!important}
.tc-icon-badge.tc-basic-badge .tc-icon-core{font-size:.9rem!important;color:#fff!important}
.tc-icon-badge.tc-basic-badge.is-mini{width:36px!important;height:32px!important;border-radius:10px!important;padding:0 4px!important}
.tc-icon-badge.tc-basic-badge.is-mini .tc-basic-castle{font-size:.68rem!important}
.tc-icon-badge.tc-basic-badge.is-mini .tc-icon-core{font-size:.72rem!important}

/* Never cover the player's avatar with a fake frame. */
.player-public-profile .player-profile-hero .avatar.player-avatar-shell{
  width:118px!important;
  height:118px!important;
  min-width:118px!important;
  overflow:visible!important;
  border:0!important;
  background:transparent!important;
}
.player-public-profile .player-avatar-backdrop,
.player-public-profile .player-avatar-frame-fallback{
  display:none!important;
}
.player-public-profile .player-avatar-core{
  position:absolute!important;
  inset:10px!important;
  z-index:1!important;
  overflow:hidden!important;
  border-radius:22px!important;
  display:grid!important;
  place-items:center!important;
  background:#09090b!important;
  border:1px solid rgba(214,170,85,.22)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.34)!important;
}
.player-public-profile .player-avatar-core img,
.player-public-profile .player-avatar-image{
  position:relative!important;
  z-index:1!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
  opacity:1!important;
  visibility:visible!important;
}
.player-public-profile .player-avatar-frame-image{
  position:absolute!important;
  inset:-2px!important;
  width:calc(100% + 4px)!important;
  height:calc(100% + 4px)!important;
  object-fit:contain!important;
  z-index:3!important;
  pointer-events:none!important;
  filter:drop-shadow(0 5px 10px rgba(0,0,0,.25))!important;
}
.player-public-profile .player-avatar-shell.no-live-frame .player-avatar-core{
  inset:8px!important;
  border-radius:24px!important;
  border:2px solid rgba(215,166,78,.42)!important;
}

@media (max-width:700px){
  .player-public-profile .player-profile-hero .avatar.player-avatar-shell{width:102px!important;height:102px!important;min-width:102px!important}
  .tc-icon-badge.tg-image-badge{width:52px!important;height:52px!important}
  .tc-icon-badge.tg-image-badge.is-mini{width:36px!important;height:36px!important}
}

/* --- 2026-09-06 profile frame + icon controls polish --- */
.player-public-profile .profile-label-icon.has-custom-image{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.player-public-profile .profile-label-icon.has-custom-image img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  display:block!important;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.28))!important;
}

/* Make the supplied Kingshot TG badges read clearly in both the top pill and stat card. */
.player-public-profile .profile-pill-tc .tc-icon-badge.tg-image-badge.is-mini{
  width:48px!important;
  height:48px!important;
  flex:0 0 48px!important;
}
.player-public-profile .player-stat-card-townCenter .tc-icon-badge.tg-image-badge{
  width:70px!important;
  height:70px!important;
}

/* Real Kingshot avatar frame geometry: the avatar sits inside the frame opening. */
.player-public-profile .player-profile-hero .avatar.player-avatar-shell.has-live-frame{
  width:132px!important;
  height:132px!important;
  min-width:132px!important;
}
.player-public-profile .player-avatar-shell.has-live-frame .player-avatar-core{
  inset:24px!important;
  border-radius:5px!important;
  border:0!important;
  box-shadow:none!important;
  background:#050505!important;
}
.player-public-profile .player-avatar-shell.has-live-frame .player-avatar-frame-image{
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  z-index:4!important;
  filter:drop-shadow(0 6px 10px rgba(0,0,0,.28))!important;
}
.player-public-profile .player-avatar-shell.no-live-frame .player-avatar-core{
  inset:8px!important;
  border-radius:24px!important;
}

/* Admin: player-profile icon customization */
.profile-icon-admin-list{display:grid;gap:12px;margin-top:16px}
.profile-icon-admin-row{
  display:grid;
  grid-template-columns:64px minmax(150px,1fr) minmax(110px,150px) minmax(160px,1fr) auto auto;
  gap:10px;
  align-items:center;
  border:1px solid rgba(197,165,93,.18);
  border-radius:14px;
  padding:12px;
  background:rgba(8,10,8,.58);
}
.profile-icon-admin-row>div:nth-child(2){display:grid;gap:3px}
.profile-icon-admin-row>div:nth-child(2) small{color:#8f958f;font-size:.76rem}
.profile-icon-admin-preview{
  width:52px;height:52px;display:grid;place-items:center;
  border:1px solid rgba(197,165,93,.2);border-radius:13px;background:#0a0d0a;
}
.profile-icon-admin-preview .profile-label-icon{margin:0!important;width:34px!important;height:34px!important;font-size:1.25rem!important}
.profile-icon-admin-row label{display:grid;gap:5px;color:#aeb4ae;font-size:.74rem;text-transform:uppercase;letter-spacing:.05em}
.profile-icon-admin-row input[type="text"],
.profile-icon-admin-row input:not([type]){min-height:42px}
.profile-icon-file-label input{max-width:210px}
.player-frame-admin{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-top:14px}
.player-frame-admin label{display:grid;gap:6px;min-width:190px;flex:1;color:#aeb4ae;font-size:.78rem}

@media(max-width:800px){
  .profile-icon-admin-row{grid-template-columns:52px 1fr;align-items:start}
  .profile-icon-admin-row>label,
  .profile-icon-admin-row>button{grid-column:1/-1;width:100%}
  .profile-icon-admin-preview{width:46px;height:46px}
  .player-public-profile .player-profile-hero .avatar.player-avatar-shell.has-live-frame{
    width:116px!important;height:116px!important;min-width:116px!important;
  }
  .player-public-profile .player-avatar-shell.has-live-frame .player-avatar-core{inset:21px!important}
  .player-public-profile .profile-pill-tc .tc-icon-badge.tg-image-badge.is-mini{width:46px!important;height:46px!important;flex-basis:46px!important}
}

/* 2026-09-06: render MightPulse equipped avatar frames using the same oversized overlay geometry. */
.player-public-profile .player-profile-hero .avatar.player-avatar-shell.has-live-frame{
  width:112px!important;
  height:112px!important;
  min-width:112px!important;
  overflow:visible!important;
  position:relative!important;
}
.player-public-profile .player-avatar-shell.has-live-frame .player-avatar-core{
  position:absolute!important;
  inset:10px!important;
  border-radius:18px!important;
  overflow:hidden!important;
  z-index:1!important;
  background:#050505!important;
  border:0!important;
}
.player-public-profile .player-avatar-shell.has-live-frame .player-avatar-frame-image{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  width:178%!important;
  height:auto!important;
  aspect-ratio:288 / 214!important;
  transform:translate(-50%,-50%)!important;
  object-fit:fill!important;
  max-width:none!important;
  z-index:5!important;
  pointer-events:none!important;
  filter:drop-shadow(0 5px 10px rgba(0,0,0,.32))!important;
}
@media(max-width:800px){
  .player-public-profile .player-profile-hero .avatar.player-avatar-shell.has-live-frame{
    width:104px!important;
    height:104px!important;
    min-width:104px!important;
  }
  .player-public-profile .player-avatar-shell.has-live-frame .player-avatar-core{inset:10px!important}
  .player-public-profile .player-avatar-shell.has-live-frame .player-avatar-frame-image{width:182%!important}
}


/* 2026-09-06 FAST PROFILE + CORRECT AVATAR FRAME SIZE
   Final override: keep MightPulse frames inside the profile identity column. */
.player-public-profile .player-profile-hero .avatar.player-avatar-shell.has-live-frame{
  width:124px!important;
  height:124px!important;
  min-width:124px!important;
  overflow:visible!important;
  position:relative!important;
}
.player-public-profile .player-avatar-shell.has-live-frame .player-avatar-core{
  inset:24px!important;
  border-radius:12px!important;
}
.player-public-profile .player-avatar-shell.has-live-frame .player-avatar-frame-image{
  left:0!important;
  top:0!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  aspect-ratio:auto!important;
  transform:none!important;
  object-fit:contain!important;
  max-width:100%!important;
}
@media(max-width:800px){
  .player-public-profile .player-profile-hero .avatar.player-avatar-shell.has-live-frame{
    width:110px!important;height:110px!important;min-width:110px!important;
  }
  .player-public-profile .player-avatar-shell.has-live-frame .player-avatar-core{inset:21px!important}
  .player-public-profile .player-avatar-shell.has-live-frame .player-avatar-frame-image{width:100%!important;height:100%!important}
}


/* 2026-09-06 SIMPLIFIED PLAYER AVATAR
   Removed live avatar-frame overlays. Keep the avatar fast-loading with a smoky round neon glow. */
.player-public-profile .player-avatar-frame-image,
.player-public-profile .player-avatar-frame-fallback,
.player-public-profile .player-avatar-backdrop{display:none!important}
.player-public-profile .player-profile-hero .avatar.player-avatar-shell,
.player-public-profile .player-profile-hero .avatar.player-avatar-shell.has-live-frame,
.player-public-profile .player-profile-hero .avatar.player-avatar-shell.no-live-frame,
.player-public-profile .player-profile-hero .avatar.player-avatar-shell.neon-avatar-shell{
  position:relative!important;
  width:118px!important;
  height:118px!important;
  min-width:118px!important;
  border-radius:999px!important;
  overflow:visible!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  isolation:isolate!important;
}
.player-public-profile .player-avatar-shell .player-avatar-core,
.player-public-profile .player-avatar-shell.has-live-frame .player-avatar-core,
.player-public-profile .player-avatar-shell.no-live-frame .player-avatar-core,
.player-public-profile .player-avatar-shell.neon-avatar-shell .player-avatar-core{
  position:absolute!important;
  inset:10px!important;
  z-index:2!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  border-radius:999px!important;
  background:radial-gradient(circle at 32% 24%,rgba(255,255,255,.16),rgba(20,18,28,.96) 68%,rgba(5,5,8,.99) 100%)!important;
  border:2px solid rgba(255,196,92,.45)!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.06) inset,0 0 16px rgba(255,153,46,.18),0 0 26px rgba(190,76,255,.18),0 8px 22px rgba(0,0,0,.34)!important;
}
.player-public-profile .player-avatar-neon-ring{
  position:absolute!important;
  inset:0!important;
  z-index:3!important;
  border-radius:999px!important;
  pointer-events:none!important;
}
.player-public-profile .player-avatar-neon-ring:before,
.player-public-profile .player-avatar-neon-ring:after{
  content:""!important;
  position:absolute!important;
  border-radius:999px!important;
  inset:2px!important;
}
.player-public-profile .player-avatar-neon-ring:before{
  border:2px solid rgba(255,134,48,.9)!important;
  box-shadow:0 0 8px rgba(255,110,24,.52),0 0 20px rgba(255,81,0,.22),0 0 28px rgba(187,82,255,.18)!important;
  animation:playerAvatarNeonPulse 3.4s ease-in-out infinite!important;
}
.player-public-profile .player-avatar-neon-ring:after{
  inset:8px!important;
  border:1px solid rgba(158,95,255,.5)!important;
  box-shadow:0 0 14px rgba(158,95,255,.20)!important;
  opacity:.85!important;
}
.player-public-profile .player-avatar-smoke{
  position:absolute!important;
  inset:-8px!important;
  z-index:1!important;
  pointer-events:none!important;
  border-radius:999px!important;
  filter:blur(10px)!important;
  opacity:.88!important;
}
.player-public-profile .player-avatar-smoke:before,
.player-public-profile .player-avatar-smoke:after{
  content:""!important;
  position:absolute!important;
  border-radius:50%!important;
  background:radial-gradient(circle,rgba(181,74,255,.34) 0,rgba(255,94,0,.26) 28%,rgba(49,14,64,.18) 48%,rgba(0,0,0,0) 72%)!important;
}
.player-public-profile .player-avatar-smoke:before{
  width:88px!important;
  height:88px!important;
  left:-2px!important;
  bottom:-2px!important;
  animation:playerAvatarSmokeDriftA 6.4s ease-in-out infinite!important;
}
.player-public-profile .player-avatar-smoke:after{
  width:96px!important;
  height:96px!important;
  right:-6px!important;
  top:-4px!important;
  animation:playerAvatarSmokeDriftB 7.2s ease-in-out infinite!important;
}
@keyframes playerAvatarNeonPulse{
  0%,100%{transform:scale(.985);opacity:.92}
  50%{transform:scale(1.02);opacity:1}
}
@keyframes playerAvatarSmokeDriftA{
  0%{transform:translate(0,0) scale(.92);opacity:.50}
  50%{transform:translate(9px,-8px) scale(1.08);opacity:.86}
  100%{transform:translate(1px,-14px) scale(.98);opacity:.36}
}
@keyframes playerAvatarSmokeDriftB{
  0%{transform:translate(0,0) scale(.88);opacity:.38}
  50%{transform:translate(-10px,7px) scale(1.04);opacity:.76}
  100%{transform:translate(-2px,14px) scale(.96);opacity:.30}
}
@media(max-width:800px){
  .player-public-profile .player-profile-hero .avatar.player-avatar-shell,
  .player-public-profile .player-profile-hero .avatar.player-avatar-shell.has-live-frame,
  .player-public-profile .player-profile-hero .avatar.player-avatar-shell.no-live-frame,
  .player-public-profile .player-profile-hero .avatar.player-avatar-shell.neon-avatar-shell{
    width:102px!important;height:102px!important;min-width:102px!important;
  }
  .player-public-profile .player-avatar-shell .player-avatar-core,
  .player-public-profile .player-avatar-shell.has-live-frame .player-avatar-core,
  .player-public-profile .player-avatar-shell.no-live-frame .player-avatar-core,
  .player-public-profile .player-avatar-shell.neon-avatar-shell .player-avatar-core{inset:9px!important}
}


/* 2026-09-06 Bubbleless uploaded / emoji icons */
.player-public-profile .profile-label-icon{
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  border-radius:0!important;
  margin-right:.42rem!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  line-height:1!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  vertical-align:middle!important;
  color:#ffd78f!important;
  text-shadow:0 0 10px rgba(255,120,40,.25),0 0 14px rgba(173,88,255,.14)!important;
}
.player-public-profile .profile-label-icon img{
  width:1.15rem!important;
  height:1.15rem!important;
  object-fit:contain!important;
  display:block!important;
  filter:drop-shadow(0 1px 0 rgba(255,255,255,.14)) drop-shadow(0 0 6px rgba(255,115,36,.22)) drop-shadow(0 0 10px rgba(179,95,255,.18))!important;
}
.player-public-profile .profile-label-icon.has-custom-image{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.player-public-profile .profile-label-icon.has-custom-image img{
  width:1.15rem!important;
  height:1.15rem!important;
}
.profile-icon-admin-preview .profile-label-icon{
  margin:0!important;
}
.profile-icon-admin-preview .profile-label-icon img{
  width:30px!important;
  height:30px!important;
}


/* 2026-09-06 profile icon upload settings + larger icon controls */
:root{
  --profile-icon-size:18px;
  --profile-icon-preview-size:30px;
  --profile-icon-preview-box:52px;
}
.profile-icon-settings-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(220px,1fr));
  gap:12px;
  margin:14px 0 6px;
}
.player-public-profile .profile-label-icon{
  font-size:var(--profile-icon-size)!important;
}
.player-public-profile .profile-label-icon img,
.player-public-profile .profile-label-icon.has-custom-image img{
  width:var(--profile-icon-size)!important;
  height:var(--profile-icon-size)!important;
}
.profile-icon-admin-preview{
  width:var(--profile-icon-preview-box)!important;
  height:var(--profile-icon-preview-box)!important;
}
.profile-icon-admin-preview .profile-label-icon{
  width:auto!important;
  height:auto!important;
  font-size:var(--profile-icon-preview-size)!important;
}
.profile-icon-admin-preview .profile-label-icon img,
.profile-icon-admin-preview .profile-label-icon.has-custom-image img{
  width:var(--profile-icon-preview-size)!important;
  height:var(--profile-icon-preview-size)!important;
}
@media(max-width:800px){
  .profile-icon-settings-grid{grid-template-columns:1fr}
}

/* Profile frames use fixed edge depths so tall lists cannot stretch crests into content. */
.player-public-profile .player-profile-hero,
.player-public-profile .player-about-panel,
.player-public-profile .grid2 > .panel,
.player-public-profile .player-stats .card{
  padding:100px 42px 66px!important;
  min-width:0;
}
.player-public-profile .player-profile-hero::before,
.player-public-profile .player-about-panel::before,
.player-public-profile .grid2 > .panel::before,
.player-public-profile .player-stats .card::before{
  inset:0!important;
  background:none!important;
  border-style:solid!important;
  border-color:transparent!important;
  border-width:90px 36px 56px!important;
  border-image-source:var(--page-frame-image)!important;
  border-image-slice:36% 19% 24%!important;
  border-image-width:1!important;
  border-image-repeat:stretch!important;
}
.player-public-profile .grid2{align-items:start!important}
.player-public-profile .grid2 > .panel .section-title{padding:0!important;margin:0 0 18px!important}
.player-public-profile .heroes,.player-public-profile .gear{min-width:0}
.player-public-profile .hero-item,.player-public-profile .gear-item{min-width:0}
.player-public-profile .hero-item > div,.player-public-profile .gear-item > div{min-width:0;overflow-wrap:anywhere}
.player-public-profile .hero-item img,.player-public-profile .gear-item img{flex-shrink:0}
.player-public-profile .empty{margin:0;padding:8px 0;line-height:1.5}
.player-public-profile .player-profile-copy{min-width:0;overflow-wrap:anywhere}
.player-public-profile .profile-pills span{max-width:100%;flex-wrap:wrap}
@media(max-width:760px){
  .player-public-profile .player-profile-hero{grid-template-columns:minmax(0,1fr)!important;gap:18px!important}
  .player-public-profile .player-profile-name{line-height:1.12!important}
  .player-public-profile .grid2 > .panel .section-title .kicker{letter-spacing:.12em!important}
}
/* Unframed profiles do not need the decorative border's reserved space. */
.player-public-profile[data-player-frame="plain"] .player-profile-hero,
.player-public-profile[data-player-frame="plain"] .player-about-panel,
.player-public-profile[data-player-frame="plain"] .grid2 > .panel,
.player-public-profile[data-player-frame="plain"] .player-stats .card{padding:24px!important}
/* Compact profile layout; preserve fixed frame gutters around all content. */
.player-public-profile .player-profile-hero,
.player-public-profile .grid2 > .panel{padding:68px 30px 40px!important}
.player-public-profile .player-profile-hero::before,
.player-public-profile .grid2 > .panel::before{border-width:60px 24px 32px!important}
.player-public-profile .grid2 > .panel .section-title{margin-bottom:12px!important}
.player-public-profile .grid2 > .panel .section-title h2 .profile-label-icon{margin-right:8px!important}
.player-public-profile .grid2 > .panel .section-title h2 .profile-label-icon img{width:32px!important;height:32px!important}
.player-public-profile .heroes,.player-public-profile .gear{gap:8px!important}
.player-public-profile .player-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
.player-public-profile .player-stats .card{padding:46px 18px 28px!important;min-height:150px!important}
.player-public-profile .player-stats .card::before{border-width:40px 14px 22px!important}
.player-public-profile .player-stats .card small{font-size:.66rem!important;gap:5px!important;line-height:1.3!important}
.player-public-profile .player-stats .card small .profile-label-icon img{width:var(--profile-icon-size)!important;height:var(--profile-icon-size)!important}
.player-public-profile .player-stats .card strong{font-size:1.1rem!important;overflow-wrap:anywhere;max-width:100%}
.player-public-profile .player-stat-card-townCenter .tc-icon-badge.tg-image-badge{width:40px!important;height:40px!important;flex-basis:40px!important}
.player-public-profile .player-stats .tc-stat-wrap{gap:4px!important;justify-content:center!important}
@media(max-width:760px){
  .player-public-profile .player-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .player-public-profile .player-profile-hero{grid-template-columns:76px minmax(0,1fr)!important;gap:12px!important;padding:64px 24px 36px!important}
  .player-public-profile .player-profile-hero .avatar.player-avatar-shell.neon-avatar-shell{width:76px!important;height:76px!important;min-width:76px!important;flex-basis:76px!important}
  .player-public-profile .player-profile-kicker{font-size:.61rem!important;letter-spacing:.1em!important;margin-bottom:6px!important}
  .player-public-profile .player-profile-name{font-size:clamp(1.4rem,6vw,2rem)!important;margin-bottom:6px!important}
  .player-public-profile .player-profile-alliance{font-size:.8rem!important}
  .player-public-profile .profile-pills{gap:5px!important}
  .player-public-profile .profile-pills span{padding:4px 6px!important;font-size:.65rem!important}
  .player-public-profile .profile-pills .profile-label-icon img{width:var(--profile-icon-size)!important;height:var(--profile-icon-size)!important}
  .player-public-profile .profile-pill-tc .tc-icon-badge.tg-image-badge.is-mini{width:30px!important;height:30px!important;flex-basis:30px!important}
}
.player-public-profile[data-player-frame="plain"] .player-profile-hero,
.player-public-profile[data-player-frame="plain"] .grid2 > .panel,
.player-public-profile[data-player-frame="plain"] .player-stats .card{padding:20px!important}

/* Let the configured icon size determine content height, with compact frame gutters. */
.player-public-profile .player-stats .card{padding:28px 16px 18px!important;min-height:0!important}
.player-public-profile .player-stats .card::before{border-width:24px 12px 14px!important}
.player-public-profile .player-stats .card small{font-weight:800!important;margin-bottom:4px!important;flex-wrap:wrap!important}
.player-public-profile .player-stats .card strong{font-weight:900!important;margin-top:0!important;line-height:1.2!important}
.player-public-profile .profile-label-icon{flex-shrink:0!important}

/* Battle Lab: allow form controls and grid tracks to fit narrow screens. */
.battle{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}
.battle > .panel,.battle form,.battle fieldset,.battle label{min-width:0}
.battle fieldset{grid-template-columns:repeat(2,minmax(0,1fr))}
.battle input{width:100%;min-width:0;max-width:100%}
.battle .split{min-width:0;flex-wrap:wrap}
@media(max-width:900px){
  .battle{grid-template-columns:minmax(0,1fr)}
}

/* Themed alliance frames have fixed edge depths; artwork and copy stay inside. */
.alliance-detail-page:not([data-alliance-frame="plain"]) .alliance-branded-hero,
.alliance-detail-page:not([data-alliance-frame="plain"]) .alliance-about-panel{
  --alliance-frame-top:60px;
  --alliance-frame-side:24px;
  --alliance-frame-bottom:32px;
  border:solid transparent!important;
  border-width:var(--alliance-frame-top) var(--alliance-frame-side) var(--alliance-frame-bottom)!important;
  padding:12px!important;
  border-radius:0!important;
  background-origin:padding-box!important;
  background-clip:padding-box!important;
  background-size:cover!important;
  min-width:0!important;
}
.alliance-detail-page:not([data-alliance-frame="plain"]) .alliance-branded-hero::before,
.alliance-detail-page:not([data-alliance-frame="plain"]) .alliance-about-panel::before{
  inset:calc(-1 * var(--alliance-frame-top)) calc(-1 * var(--alliance-frame-side)) calc(-1 * var(--alliance-frame-bottom))!important;
  background:none!important;
  border:solid transparent!important;
  border-width:var(--alliance-frame-top) var(--alliance-frame-side) var(--alliance-frame-bottom)!important;
  border-image-source:var(--page-frame-image)!important;
  border-image-slice:36% 19% 24%!important;
  border-image-width:1!important;
  border-image-repeat:stretch!important;
  border-radius:0!important;
}
.alliance-detail-page:not([data-alliance-frame="plain"]) .alliance-about-copy{
  padding:0!important;
}


/* ===== HEADER: COMPACT LOGIN + RECTANGULAR DISCORD SIGN IN ===== */
.header-auth-actions{
  margin-left:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  flex:0 0 auto!important;
}
.header-auth-actions .account-btn.header-login-btn{
  margin-left:0!important;
  width:auto!important;
  min-width:0!important;
  min-height:36px!important;
  height:36px!important;
  padding:0 10px!important;
  border-radius:9px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
  font-size:.76rem!important;
  line-height:1!important;
}
.header-signin-btn{
  appearance:none!important;
  -webkit-appearance:none!important;
  margin:0!important;
  width:auto!important;
  min-width:76px!important;
  max-width:none!important;
  height:36px!important;
  min-height:36px!important;
  padding:0 13px!important;
  border:1px solid rgba(88,101,242,.82)!important;
  border-radius:9px!important;
  background:linear-gradient(180deg,#5865f2,#4652d8)!important;
  color:#fff!important;
  box-shadow:0 4px 13px rgba(88,101,242,.22)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  font-size:.72rem!important;
  font-weight:900!important;
  letter-spacing:.08em!important;
  line-height:1!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}
.header-signin-icon{
  width:14px!important;
  height:14px!important;
  flex:0 0 14px!important;
  display:block!important;
  color:#fff!important;
}
.header-signin-btn span{
  display:block!important;
  line-height:1!important;
}
.header-signin-btn:hover{filter:brightness(1.08)!important}
.header-signin-btn[hidden]{display:none!important}
@media(max-width:760px){
  .topbar{gap:7px!important;padding-left:10px!important;padding-right:10px!important}
  .topbrand{min-width:0!important;margin-right:0!important}
  .header-auth-actions{gap:5px!important}
  .header-auth-actions .account-btn.header-login-btn{
    height:34px!important;min-height:34px!important;padding:0 8px!important;font-size:.66rem!important;
  }
  .header-signin-btn{
    height:34px!important;min-height:34px!important;min-width:74px!important;padding:0 10px!important;font-size:.66rem!important;gap:5px!important;
  }
}
@media(max-width:430px){
  .topbrand b{font-size:.84rem!important}
  .topbrand small{font-size:.41rem!important}
  .header-auth-actions .account-btn.header-login-btn{max-width:108px!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .header-signin-btn{min-width:72px!important;padding:0 8px!important}.header-signin-icon{width:12px!important;height:12px!important;flex-basis:12px!important}
}


/* Add to Home Screen / install shortcut prompt */
.install-shortcut-bar{display:none}
.install-shortcut-sheet{position:fixed;inset:0;z-index:2147483600;background:rgba(0,0,0,.72);backdrop-filter:blur(8px);padding:18px;align-items:flex-end;justify-content:center}
.install-shortcut-sheet-card{position:relative;width:min(520px,100%);border:1px solid rgba(214,168,75,.5);border-radius:22px 22px 14px 14px;background:linear-gradient(180deg,rgba(17,13,22,.99),rgba(5,7,6,.99));box-shadow:0 -18px 60px rgba(0,0,0,.7),0 0 34px rgba(65,240,166,.08);padding:24px 20px calc(22px + env(safe-area-inset-bottom));text-align:center;color:var(--site-body,#d6cfca)}
.install-shortcut-sheet-close{position:absolute;right:12px;top:10px;width:38px;height:38px;border:0;border-radius:50%;background:rgba(255,255,255,.07);color:#ddd;font-size:27px;line-height:1;cursor:pointer}
.install-shortcut-sheet-icon{font-size:42px;filter:drop-shadow(0 0 12px rgba(65,240,166,.25));margin-bottom:4px}.install-shortcut-sheet-card h3{margin:4px 0 16px;font-size:1.3rem;color:var(--site-heading,#f3eadb)}
.install-shortcut-steps{display:grid;gap:10px;text-align:left}.install-shortcut-steps>span{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid rgba(182,108,255,.22);border-radius:13px;background:rgba(255,255,255,.035)}.install-shortcut-steps>span>b{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:rgba(65,240,166,.12);border:1px solid rgba(65,240,166,.38);color:#41f0a6}.ios-share-symbol{display:inline-grid;place-items:center;border:1px solid rgba(255,255,255,.32);border-radius:5px;width:24px;height:24px;font-size:18px}.install-shortcut-note{margin:14px 0 0;color:var(--site-muted,#9b93a8);font-size:.82rem}
@media(max-width:760px){
  .install-shortcut-bar{position:fixed;display:flex;align-items:center;gap:9px;left:9px;right:9px;bottom:calc(78px + env(safe-area-inset-bottom));z-index:2147482500;min-height:58px;padding:8px 8px 8px 10px;border:1px solid rgba(214,168,75,.48);border-radius:15px;background:linear-gradient(135deg,rgba(10,8,13,.97),rgba(4,9,7,.97));box-shadow:0 8px 28px rgba(0,0,0,.56),0 0 18px rgba(65,240,166,.08);backdrop-filter:blur(14px)}
  .install-shortcut-mark{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border:1px solid rgba(65,240,166,.3);border-radius:10px;background:rgba(65,240,166,.06);font-size:21px}
  .install-shortcut-copy{display:grid;gap:2px;min-width:0;flex:1}.install-shortcut-copy b{font-size:.68rem;line-height:1.16;letter-spacing:.035em;color:#f4ead8}.install-shortcut-copy span{font-size:.62rem;line-height:1.2;color:#9f96a5}
  .install-shortcut-install{flex:0 0 auto;border:1px solid rgba(65,240,166,.52);border-radius:9px;background:linear-gradient(180deg,rgba(65,240,166,.19),rgba(65,240,166,.08));color:#6dffc1;font-weight:900;font-size:.64rem;letter-spacing:.055em;padding:10px 9px;cursor:pointer}
  .install-shortcut-dismiss{flex:0 0 27px;width:27px;height:34px;border:0;background:transparent;color:#877e8e;font-size:22px;line-height:1;cursor:pointer}
  .install-shortcut-sheet{display:flex}
}
@media(max-width:390px){.install-shortcut-copy span{display:none}.install-shortcut-copy b{font-size:.64rem}.install-shortcut-mark{display:none}}
/* Player intelligence and mobile content editors */
.content-edit-row{min-width:0;margin:18px 0;padding:18px;border:1px solid #493054;border-radius:16px;background:#100d16}.content-edit-row legend{padding:0 8px;color:#d6a84b;font-weight:700}.content-edit-row input,.content-edit-row textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%;font:inherit}.content-edit-row textarea{resize:vertical;min-height:100px}.content-edit-row label{min-width:0}.content-edit-row .profile-actions{gap:8px;flex-wrap:wrap}.content-link{margin:12px 8px 0 0;overflow-wrap:anywhere;white-space:normal}.guide-detail{white-space:pre-wrap}.event-row>div{min-width:0;overflow-wrap:anywhere}.equipped-skins{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.skin-card{display:flex;align-items:center;text-align:center;flex-direction:column;gap:10px;padding:16px 10px;border:1px solid #493054;border-radius:16px;min-width:0}.skin-card img{width:90px;height:90px;object-fit:contain}.skin-card b{overflow-wrap:anywhere}.skin-card small{color:#aaa0b5;text-transform:uppercase;letter-spacing:1px}.office-card img{width:64px;height:64px;object-fit:contain}.office-card p{color:#aaa0b5}.arena-heroes{display:grid;gap:20px;grid-template-columns:repeat(2,minmax(0,1fr))}.arena-hero-card{border:1px solid #493054;border-top:3px solid #b66cff;border-radius:18px;padding:20px;min-width:0;background:#0d0c12}.arena-hero-heading{display:grid;grid-template-columns:80px minmax(0,1fr);gap:14px}.arena-hero-heading>img{width:80px;height:80px;object-fit:contain;border-radius:16px}.arena-hero-heading h3{margin:0 0 5px;overflow-wrap:anywhere}.hero-stars{color:#eab743;font-size:24px;letter-spacing:2px}.profile-facts{margin:8px 0}.profile-facts>div{display:flex;justify-content:space-between;gap:10px}.profile-facts dt{color:#aaa0b5}.profile-facts dd{margin:0;text-align:right;font-weight:700}.arena-hero-card h4{color:#aaa0b5;font-size:12px;letter-spacing:2px}.equipment-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(95px,1fr));gap:12px}.equipment-tile{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px;padding:10px 6px;min-width:0;background:linear-gradient(145deg,#473a16,#1a1511);border:1px solid #a37e35;border-radius:12px}.equipment-tile.red{background:linear-gradient(145deg,#71303a,#211014);border-color:#bc5d68}.equipment-tile img{width:75px;height:75px;max-width:100%;object-fit:contain}.equipment-tile b{font-size:12px;overflow-wrap:anywhere}.equipment-tile small{font-size:12px}.equipment-tile>span{color:#9ef5bf;font-weight:700}.equipped-avatar-shell{position:relative!important;overflow:visible!important;background:transparent!important;border:0!important;isolation:isolate}.equipped-avatar-shell .player-avatar-core{position:absolute!important;inset:17%!important;width:auto!important;height:auto!important;border-radius:0!important;overflow:hidden}.player-avatar-core .player-avatar-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.equipped-avatar-frame{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:contain!important;z-index:4;pointer-events:none}.player-nameplate{position:relative;isolation:isolate;max-width:100%;width:fit-content}.player-nameplate.has-nameplate{padding:26px 25px 15px;min-width:min(260px,100%)}.nameplate-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;z-index:-1;pointer-events:none}.player-nameplate h1{overflow-wrap:anywhere;margin:0}.player-public-profile .player-stat-card strong{overflow-wrap:anywhere}.install-shortcut-copy{min-width:0}.install-shortcut-copy b,.install-shortcut-copy span,.install-shortcut-install{overflow-wrap:anywhere;white-space:normal}
@media(max-width:700px){.equipped-skins{grid-template-columns:repeat(2,minmax(0,1fr))}.arena-heroes{grid-template-columns:minmax(0,1fr)}.arena-hero-card{padding:14px}.content-edit-row{padding:12px}.content-edit-row .builder-fields{grid-template-columns:minmax(0,1fr)}.content-edit-row .builder-fields .full{grid-column:auto}.player-nameplate.has-nameplate{padding:23px 15px 12px}.equipment-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.arena-hero-heading{grid-template-columns:64px minmax(0,1fr);gap:10px}.arena-hero-heading>img{width:64px;height:64px}.profile-facts{font-size:13px}}
/* Override older portrait rules: equipped icons contain transparent padding. */
.player-public-profile .player-profile-hero .avatar.equipped-avatar-shell{width:92px!important;height:92px!important;min-width:92px!important;flex-basis:92px!important;box-shadow:none!important;border-radius:0!important}
.player-public-profile .equipped-avatar-shell::before,.player-public-profile .equipped-avatar-shell::after{display:none!important}
.player-public-profile .avatar.equipped-avatar-shell .player-avatar-core{position:absolute!important;inset:21%!important;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;border:0!important;background:#151019!important;box-shadow:none!important;display:block!important;border-radius:0!important}
.player-public-profile .player-avatar-core .player-avatar-image{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;border:0!important;border-radius:0!important;z-index:1!important;object-fit:cover!important}
.player-public-profile .player-avatar-core .player-avatar-fallback{position:absolute;inset:0;display:grid;place-items:center;font-size:24px}
.player-public-profile .equipped-avatar-frame{transform:scale(1.6)}
.player-public-profile .player-nameplate.has-nameplate{padding:28px 20px 22px;min-width:0;width:100%}
.player-public-profile .nameplate-art{width:140%;height:240%;max-width:none;left:-20%;top:-70%}
.player-public-profile .player-nameplate.has-nameplate h1{font-size:clamp(16px,2.5vw,32px)!important;text-align:center;margin:0!important;line-height:1.3!important}
@media(max-width:700px){.player-public-profile .player-profile-hero{display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important;gap:16px!important}.player-public-profile .player-profile-copy{width:100%!important;min-width:0!important}.player-public-profile .player-nameplate.has-nameplate h1{font-size:clamp(16px,4vw,22px)!important}.player-public-profile .player-profile-hero .profile-pills{justify-content:center}}
.admin-builder{min-width:0;grid-template-columns:minmax(0,1fr)}
[data-builder-pane="content"], [data-content-list], .content-edit-row .builder-fields{min-width:0;max-width:100%}
@media(max-width:700px){[data-builder-pane="content"] .builder-grid{grid-template-columns:minmax(0,1fr)}}
@media(min-width:701px){.player-public-profile .player-nameplate.has-nameplate{width:fit-content;min-width:360px;max-width:min(460px,100%);padding-left:38px;padding-right:38px}.player-public-profile .player-nameplate.has-nameplate h1{font-size:clamp(20px,2vw,28px)!important}}
.player-alliance-flag{width:32px;height:32px;object-fit:contain;vertical-align:middle;margin-right:8px}.content-edit-row select{width:100%;min-width:0;max-width:100%}
/* Profile controls, readable icons, and safe decorative bounds. */
.detail-icon-sprite{display:block;width:var(--profile-icon-size,32px);height:var(--profile-icon-size,32px);background-image:url('/assets/profile-icons/details-sprite.png');background-size:400% 400%;background-repeat:no-repeat;flex:0 0 auto}
.profile-icon-admin-row{grid-template-columns:max-content minmax(0,1fr)!important;gap:14px!important;align-items:center!important;min-width:0}
.profile-icon-admin-description{min-width:0;overflow-wrap:anywhere}.profile-icon-admin-description small{display:block;margin-top:6px}
.profile-icon-admin-row>label,.profile-icon-admin-row>button{grid-column:1/-1!important;min-width:0;max-width:100%}
.profile-icon-admin-preview{box-sizing:border-box;display:grid!important;place-items:center;flex-shrink:0;margin:0!important;overflow:hidden}
.profile-icon-admin-preview .profile-label-icon{display:grid!important;place-items:center;position:static!important;margin:0!important;transform:none!important}
.profile-icon-admin-preview .detail-icon-sprite{width:var(--profile-icon-preview-size);height:var(--profile-icon-preview-size)}
.player-public-profile .player-stat-card>small{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:8px!important;max-width:100%;text-align:center}
.player-public-profile .player-stat-card>small>span:last-child{font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.player-public-profile .player-stat-card .profile-label-icon{position:static!important;flex-shrink:0;display:grid!important;place-items:center;margin:0!important;transform:none!important;width:var(--profile-icon-size)!important;height:var(--profile-icon-size)!important}
.player-public-profile .panel>.kicker{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.player-public-profile .player-nameplate.has-nameplate{box-sizing:border-box;width:100%!important;max-width:440px!important;min-width:0!important;margin:12px auto!important;padding:32px 36px 24px!important;overflow:hidden;isolation:isolate}
.player-public-profile .nameplate-art{width:118%!important;left:-9%!important;max-width:none!important;height:210%!important;top:-55%!important;object-fit:fill;pointer-events:none}
.player-public-profile .player-profile-copy{min-width:0!important;max-width:100%!important}
.profile-alliance-link{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;background:linear-gradient(#352d17,#18140c)!important;border:1px solid #d6a84b!important;border-radius:12px!important;box-shadow:0 3px 0 #090604!important;padding:10px 14px!important;min-height:46px;color:#ffe7a6!important;max-width:100%;white-space:normal!important}
.player-profile-alliance>small{display:block;margin-top:10px;color:#aaa0b5}
#accountBody .profile-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px!important}
#accountBody .profile-actions>.btn{display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid #9d78bd!important;border-radius:12px!important;background:linear-gradient(#34243e,#201528)!important;box-shadow:0 4px 0 #0a070e,0 1px 0 #aa7cc855 inset!important;min-height:50px;padding:12px!important;font-size:14px!important;font-weight:700!important;text-align:center;white-space:normal!important;transition:transform .12s,filter .12s}
#accountBody .profile-actions>.btn:active,.profile-alliance-link:active{transform:translateY(2px);filter:brightness(1.2)}
#accountBody #viewLinkedProfile{background:linear-gradient(#48dd19,#249907)!important;border-color:#74fb3f!important;color:#fff!important}
#accountBody #logout{border-color:#db6e75!important;background:linear-gradient(#51242c,#32151c)!important}
#viewLinkedProfile::before{content:'👤'}#editProfile::before{content:'✏️'}#changePassword::before{content:'🔑'}#linkDiscordAccount::before{content:'💬'}#logout::before{content:'↪'}
.ranking-scope-label{display:grid;gap:8px;font-weight:700;margin:16px 0}.ranking-scope-label select{box-sizing:border-box;width:100%;min-height:48px;padding:12px;background:#181020;color:#f3eadb;border:1px solid #a675c3;border-radius:10px;font:inherit}
.ranking-scope-note{line-height:1.5;color:#c9bed3;padding:12px;border:1px solid #493054;border-radius:10px}.commander-podium[hidden]{display:none!important}
.visual-edit-toolbar{position:fixed;right:18px;bottom:110px;z-index:1100;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:calc(100vw - 32px);padding:10px;background:#15101ded;border:1px solid #ac83cf;border-radius:16px;box-shadow:0 8px 30px #0009}.visual-edit-toolbar .btn{min-height:40px;padding:8px 12px;font-size:13px}.visual-edit-toolbar small{color:#cab9d7;flex-basis:100%;text-align:center}
.visual-editable{position:relative!important;outline:1px dashed #c194e8!important;outline-offset:4px;padding-top:48px!important}.visual-edit-pencil{position:absolute;right:8px;top:8px;z-index:20;min-height:36px;padding:6px 12px;border:1px solid #d4b0ef;border-radius:9px;background:#422754;color:#fff;font:700 13px system-ui;cursor:pointer;box-shadow:0 3px 8px #0006}
.visual-edit-overlay{position:fixed;inset:0;z-index:10000;background:#000b;display:grid;place-items:center;padding:16px;overscroll-behavior:contain}.visual-edit-dialog{box-sizing:border-box;max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;width:min(620px,100%);padding:24px;border:1px solid #b48bd4;border-radius:20px;background:#17111f;color:#f3eadb;box-shadow:0 20px 70px #000a}.visual-edit-dialog h2{font-size:23px;margin:0 0 8px}.visual-edit-dialog p{color:#bcb0c6;line-height:1.5}.visual-edit-fields{display:grid;gap:14px}.visual-edit-fields label{display:grid;gap:6px;font-weight:600;font-size:14px}.visual-edit-fields textarea,.visual-edit-fields select{box-sizing:border-box;width:100%;max-width:100%;padding:12px;border:1px solid #735087;border-radius:10px;background:#0c0911;color:#f4eafc;font:16px system-ui;resize:vertical}.visual-edit-actions{display:flex;flex-wrap:wrap;gap:12px;position:sticky;bottom:-24px;padding:16px 0;background:#17111f}.visual-edit-status.error{color:#ff9292}.visual-edit-dialog :focus-visible,.visual-edit-pencil:focus-visible,.profile-alliance-link:focus-visible{outline:3px solid #64f4bc;outline-offset:3px}
@media(max-width:480px){.profile-icon-admin-row{gap:10px!important}.profile-icon-admin-description b{font-size:16px}.profile-icon-admin-description small{font-size:13px}.player-public-profile .player-nameplate.has-nameplate{padding:28px 30px 23px!important}.visual-edit-toolbar{right:12px;bottom:100px;max-width:calc(100vw - 24px)}.visual-edit-dialog{padding:18px}.visual-edit-actions{bottom:-18px}.visual-edit-actions .btn{flex:1;font-size:14px}#accountBody .profile-actions{grid-template-columns:minmax(0,1fr)}}

/* Keep admin editing controls in the header, clear of page content. */
#visualEditToolbar.visual-edit-toolbar{position:static;inset:auto;display:flex;flex-wrap:wrap;flex:0 0 auto;gap:4px;max-width:150px;padding:0;background:none;border:0;border-radius:0;box-shadow:none}
#visualEditToolbar [data-toggle-edit]{min-height:40px;padding:6px 8px;font-size:12px;white-space:nowrap}
#visualEditToolbar [data-edit-brand]{padding:3px 6px;min-height:26px;font-size:10px}
#visualEditToolbar [data-edit-status]{display:none}
@media(max-width:600px){#visualEditToolbar.visual-edit-toolbar{max-width:78px;justify-content:center}.header-auth-actions:has(#visualEditToolbar){gap:4px!important}.header-auth-actions:has(#visualEditToolbar) .header-login-btn{max-width:100px!important;min-width:0!important;overflow:hidden}.header-auth-actions:has(#visualEditToolbar) #memberName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

.home-kvk{padding:24px!important}.kvk-versus{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px;text-align:center;margin:18px 0}.kvk-versus strong{display:block;font-size:clamp(14px,3vw,22px);overflow-wrap:anywhere;color:#edcf88}.kvk-bar{height:10px;background:#798dde;border-radius:8px;overflow:hidden;margin:10px 0}.kvk-bar i{display:block;height:100%;background:#e4bb47}.kvk-compare{margin:18px 0}.kvk-compare>div:not(.kvk-bar){display:flex;justify-content:space-between;gap:12px}.kvk-days{display:grid;gap:10px;margin-top:20px}.kvk-days>div{padding:14px;border:1px solid #5b4267;border-radius:12px}.kvk-days span{float:right}.kvk-days strong,.kvk-days small{display:block;clear:both;padding-top:8px}.home-kvk small,.home-kvk p{color:#bcb1c5}.home-kvk h3{margin-top:28px}

.kvk-flag{width:60px;height:50px;object-fit:contain;margin-bottom:8px}
