/* Shared final geometry: the element owns its fill and its frame. */
html {overflow-x:clip}
body:is(.inner-page,.portal-page,body) .site-header,body.inner-page .site-header,body.portal-page .site-header {
 position:fixed!important;z-index:1000!important;top:28px!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;
 width:min(1280px,calc(100% - 80px))!important;height:44px!important;min-height:44px!important;
 display:grid!important;grid-template-columns:100px minmax(0,1fr) auto!important;grid-template-rows:44px!important;gap:8px!important;
 padding:0 28px!important;margin:0!important;box-sizing:border-box!important;align-items:center!important;
 border:0!important;border-radius:0!important;background:url('/images/ui/web/paal_header_center_v2.png') center -15px / 100% 74px no-repeat!important;
 box-shadow:none!important;backdrop-filter:none!important;overflow:visible!important;isolation:isolate;
}
body:is(.inner-page,.portal-page,body) .site-header::before,body:is(.inner-page,.portal-page,body) .site-header::after {
 content:''!important;display:block!important;position:absolute!important;top:-15px!important;width:107px!important;height:74px!important;
 background-size:100% 100%!important;background-repeat:no-repeat!important;z-index:0!important;pointer-events:none!important;opacity:1!important;
}
body:is(.inner-page,.portal-page,body) .site-header::before{left:-30px!important;background-image:url('/images/ui/web/paal_header_left_v2.png')!important;mask-image:linear-gradient(90deg,#000 52%,transparent);-webkit-mask-image:linear-gradient(90deg,#000 52%,transparent)}
body:is(.inner-page,.portal-page,body) .site-header::after{right:-30px!important;background-image:url('/images/ui/web/paal_header_right_v2.png')!important;mask-image:linear-gradient(270deg,#000 52%,transparent);-webkit-mask-image:linear-gradient(270deg,#000 52%,transparent)}
body:is(.inner-page,.portal-page,body) .site-header>*{position:relative!important;z-index:1!important;min-width:0!important}
body:is(.inner-page,.portal-page,body) .site-header .brand{grid-column:1!important;grid-row:1!important;width:auto!important;height:auto!important;padding:0!important;margin:0!important;display:flex!important;align-items:center!important}
body:is(.inner-page,.portal-page,body) .site-header .brand-wordmark{width:76px!important;height:auto!important}
body:is(.inner-page,.portal-page,body) .site-header .brand::after{display:none!important}
body:is(.inner-page,.portal-page,body) .site-header .top-nav{grid-column:2!important;grid-row:1!important;display:flex!important;justify-content:space-evenly!important;align-items:center!important;gap:0!important;overflow:auto!important;height:44px!important;padding:0!important;margin:0!important;border:0!important;scrollbar-width:none}
body:is(.inner-page,.portal-page,body) .site-header .top-nav a{flex:1 0 auto!important;text-align:center!important;font-size:10px!important;letter-spacing:.07em!important;padding:0 8px!important;height:44px!important;line-height:44px!important;white-space:nowrap!important}
body:is(.inner-page,.portal-page,body) .site-header .top-nav a::before{display:none!important}
body:is(.inner-page,.portal-page,body) .site-header .header-actions{grid-column:3!important;grid-row:1!important;display:flex!important;gap:8px!important;margin:0!important;align-items:center!important}
body:is(.inner-page,.portal-page,body) .site-header .header-btn,body:is(.inner-page,.portal-page,body) .site-header .server-pill{height:30px!important;min-width:80px!important;padding:0 14px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:9px!important;white-space:nowrap!important;border:0!important;border-radius:0!important;box-sizing:border-box!important;background:url('/images/ui/web/paal_header_login_panel_v2.png') center/100% 100% no-repeat!important}
body:is(.inner-page,.portal-page,body) .site-header .server-pill{min-width:120px!important;background-image:url('/images/ui/web/paal_header_status_panel_v2.png')!important}
body:is(.inner-page,.portal-page,body) .site-header .server-pill::before{width:6px!important;height:6px!important;margin-right:7px!important}
body.portal-page .portal-layout{display:grid!important;grid-template-columns:240px minmax(0,1fr)!important;gap:28px!important;align-items:start!important;width:min(1400px,calc(100% - 64px))!important;margin:140px auto 40px!important;padding:0!important}
body.portal-page .portal-frame{position:relative!important;min-width:0!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;transform:none!important;align-self:start!important;box-sizing:border-box!important}
body.portal-page .portal-frame::before{display:none!important;content:none!important}
body.portal-page .portal-menu,body.portal-page .portal-surface,body.inner-page .content-shell,body.inner-page .rail-panel{
 position:relative!important;box-sizing:border-box!important;isolation:isolate!important;transform:none!important;
 border:0!important;border-radius:0!important;overflow:visible!important;
 background:linear-gradient(180deg,rgba(5,18,29,.90),rgba(1,8,14,.93)),url('/images/ui/web/paal_web_panel_fill_seamless.png') 0 0/420px 420px repeat!important;
 box-shadow:none!important;
}
body.portal-page .portal-menu,body.portal-page .portal-surface{width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:24px!important}
body.portal-page .portal-surface{padding:32px!important;min-height:360px!important}
body.portal-page .portal-menu::before,body.portal-page .portal-surface::before,body.inner-page .content-shell::before,body.inner-page .rail-panel::before {
 content:''!important;display:block!important;position:absolute!important;inset:0!important;box-sizing:border-box!important;pointer-events:none!important;z-index:5!important;opacity:.84!important;
 border:12px solid transparent!important;border-image:url('/images/ui/web/paal_web_center_frame.png') 92 / 12px / 0 round!important;
}
body.portal-page .portal-menu::after,body.portal-page .portal-surface::after,body.inner-page .content-shell::after,body.inner-page .rail-panel::after{display:none!important}
body.portal-page .portal-menu nav{display:flex!important;flex-direction:column!important;gap:6px!important}
body.portal-page .portal-menu nav a{min-height:36px!important;height:auto!important;font-size:12px!important;padding:9px 12px!important;box-sizing:border-box!important;white-space:normal!important}
body.portal-page .portal-footer{width:min(1400px,calc(100% - 64px))!important;margin:20px auto!important}
body.portal-page .portal-heading{flex-wrap:wrap;gap:12px}
body.portal-page h1{font-size:clamp(30px,4vw,48px)!important;overflow-wrap:anywhere}
body.portal-page #portalContent{min-height:0!important;padding-top:20px!important;overflow-wrap:anywhere}
body.portal-page .portal-surface>*{min-width:0}
body.inner-page .content-shell{width:100%!important;max-width:520px!important;min-height:0!important;height:auto!important;max-height:none!important;padding:24px!important;margin:0 auto!important}
body.inner-page .page-section:not(#intro){padding:140px 420px 48px!important;min-height:100svh!important;height:auto!important;overflow:visible!important;align-items:flex-start!important}
body.inner-page .portal-rail{top:140px!important;bottom:32px!important;width:320px!important;height:auto!important;max-height:none!important;overflow:visible!important;scrollbar-width:thin}
body.inner-page .portal-rail.left{left:calc(50% - 680px)!important}body.inner-page .portal-rail.right{right:calc(50% - 680px)!important}
body.inner-page .rail-panel{height:100%!important;min-height:100%!important;padding:22px 20px!important;max-height:none!important;overflow:visible!important}
body.inner-page .rail-bottom{display:none!important}
.portal-table-wrap{max-width:100%;overflow:auto}
.paal-class-icon{width:36px;height:36px;object-fit:contain;vertical-align:middle;margin-right:8px}
.paal-empire-icon{width:24px;height:24px;object-fit:contain;vertical-align:middle;margin-right:6px}
@media(min-width:1201px) and (max-width:1650px){
 body.inner-page .portal-rail{display:block!important;width:270px!important}
 body.inner-page .portal-rail.left{left:18px!important}
 body.inner-page .portal-rail.right{right:18px!important}
 body.inner-page .page-section:not(#intro){padding-left:330px!important;padding-right:330px!important}
 body.inner-page .content-shell{max-width:500px!important}
}
@media(min-width:1021px) and (max-width:1200px){
 body.inner-page .portal-rail{display:block!important;width:220px!important}
 body.inner-page .portal-rail.left{left:10px!important}
 body.inner-page .portal-rail.right{right:10px!important}
 body.inner-page .rail-panel{padding:22px 16px!important}
 body.inner-page .page-section:not(#intro){padding-left:260px!important;padding-right:260px!important}
 body.inner-page .content-shell{max-width:460px!important;padding:22px!important}
 body:is(.inner-page,.portal-page,body) .site-header .top-nav a{font-size:9px!important;padding:0 6px!important}
}
@media(max-width:1020px){
 body.inner-page .portal-rail{display:none!important}
 body.inner-page .page-section:not(#intro){padding:140px 24px 48px!important}
 body.inner-page .content-shell{max-width:620px!important}
 body:is(.inner-page,.portal-page,body) .site-header .top-nav a{font-size:9px!important;padding:0 6px!important}
}
@media(max-width:760px){
 body:is(.inner-page,.portal-page,body) .site-header,body.inner-page .site-header,body.portal-page .site-header{top:22px!important;width:calc(100% - 48px)!important;height:92px!important;min-height:92px!important;padding:0 12px!important;grid-template-columns:72px minmax(0,1fr)!important;grid-template-rows:44px 44px!important;gap:0!important;background-position:center!important;background-size:100% 122px!important}
 body:is(.inner-page,.portal-page,body) .site-header::before,body:is(.inner-page,.portal-page,body) .site-header::after{top:-15px!important;width:66px!important;height:122px!important}
 body:is(.inner-page,.portal-page,body) .site-header::before{left:-20px!important}body:is(.inner-page,.portal-page,body) .site-header::after{right:-20px!important}
 body:is(.inner-page,.portal-page,body) .site-header .brand-wordmark{width:60px!important}
 body:is(.inner-page,.portal-page,body) .site-header .header-actions{grid-column:2!important;grid-row:1!important;justify-content:flex-end!important;gap:4px!important}
 body:is(.inner-page,.portal-page,body) .site-header .header-btn{min-width:62px!important;padding:0 7px!important;font-size:8px!important}
 body:is(.inner-page,.portal-page,body) .site-header .server-pill{min-width:96px!important;padding:0 7px!important;font-size:8px!important}
 body:is(.inner-page,.portal-page,body) .site-header .top-nav{grid-column:1 / -1!important;grid-row:2!important;width:100%!important}
 body:is(.inner-page,.portal-page,body) .site-header .top-nav a{font-size:8px!important;letter-spacing:.03em!important;padding:0 5px!important}
 body.portal-page .portal-layout{grid-template-columns:minmax(0,1fr)!important;width:calc(100% - 32px)!important;gap:24px!important;margin-top:150px!important}
 body.portal-page .portal-menu,body.portal-page .portal-surface{padding:24px 20px!important}
 body.portal-page .portal-menu nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.portal-page .portal-menu nav a{font-size:11px!important;padding:8px!important}
 body.portal-page .portal-footer{width:calc(100% - 32px)!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important}
 body.inner-page .page-section:not(#intro){padding:150px 16px 36px!important}
 body.inner-page .content-shell{padding:24px 20px!important}
 body.inner-page .content-shell h1,body.inner-page .content-shell h2{font-size:clamp(30px,8vw,48px)!important;overflow-wrap:anywhere}
}

body:is(.inner-page,.portal-page,body) .site-header::before{right:auto!important;bottom:auto!important}
body:is(.inner-page,.portal-page,body) .site-header::after{left:auto!important;bottom:auto!important}
body:is(.inner-page,.portal-page,body) .site-header .top-nav a{min-width:0!important;flex:1 1 0!important}
@media(max-width:760px){body:is(.inner-page,.portal-page,body) .site-header .top-nav a{font-size:7px!important;padding:0 2px!important}}

body:is(.inner-page,.portal-page,body) .site-header .top-nav a.active::after{bottom:5px!important;max-width:60%!important;left:20%!important;right:20%!important}
body.inner-page .char-avatar img{width:40px;height:40px;object-fit:contain}

/* Patch 02: retain section geometry and allow long panels to scroll. */
body.inner-page .page-section:not(#intro){height:100svh!important;min-height:100svh!important;max-height:100svh!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-width:thin}
body.portal-page .portal-layout{align-items:start!important}
body.portal-page .portal-frame-menu,body.portal-page .portal-frame-surface{align-self:start!important;top:auto!important;bottom:auto!important;transform:none!important;margin:0!important}
body.portal-page .portal-menu,body.portal-page .portal-surface,body.inner-page .content-shell,body.inner-page .rail-panel{background-clip:padding-box!important;border:10px solid transparent!important}
body.portal-page .portal-menu::before,body.portal-page .portal-surface::before,body.inner-page .content-shell::before,body.inner-page .rail-panel::before{inset:-10px!important;border-width:12px!important;border-image-outset:0!important}
/* On home retain the original modest navigation bar. */
body:not(.inner-page):not(.portal-page) .site-header{top:0!important;left:0!important;right:0!important;transform:none!important;width:100%!important;height:74px!important;grid-template-rows:74px!important;padding:0 36px!important;background:rgba(2,10,17,.88)!important;border-bottom:1px solid rgba(124,176,201,.22)!important}
body:not(.inner-page):not(.portal-page) .site-header::before,body:not(.inner-page):not(.portal-page) .site-header::after{display:none!important}
@media(max-width:760px){body:not(.inner-page):not(.portal-page) .site-header{height:92px!important;grid-template-rows:44px 44px!important;padding:0 16px!important}}
.shop-card-image{display:block;width:100%;height:130px;object-fit:contain;margin-bottom:12px}.shop-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px}
body.portal-page .portal-menu,body.portal-page .portal-surface{top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;translate:none!important}

/* Patch 03: compact home navigation, proportional columns at every width. */
body:not(.inner-page):not(.portal-page) .site-header{grid-template-columns:100px minmax(0,1fr) auto!important;gap:18px!important;padding:0 clamp(16px,4vw,64px)!important;height:70px!important;grid-template-rows:70px!important}
body:not(.inner-page):not(.portal-page) .site-header .top-nav{justify-content:center!important;gap:clamp(8px,2vw,32px)!important;height:70px!important}
body:not(.inner-page):not(.portal-page) .site-header .top-nav a{flex:0 1 auto!important;padding:0 12px!important;min-width:0!important;font-size:11px!important;letter-spacing:.08em!important}
body:not(.inner-page):not(.portal-page) .site-header .top-nav a.active::after{width:24px!important;left:calc(50% - 12px)!important;right:auto!important;bottom:4px!important}
@media(max-width:760px){body:not(.inner-page):not(.portal-page) .site-header{grid-template-columns:64px minmax(0,1fr)!important;grid-template-rows:44px 44px!important;height:92px!important;gap:0!important;padding:0 14px!important}body:not(.inner-page):not(.portal-page) .site-header .top-nav{height:44px!important;gap:0!important}body:not(.inner-page):not(.portal-page) .site-header .top-nav a{flex:1 1 0!important;padding:0 3px!important;font-size:8px!important}}

/* Patch 04: a single box geometry, without the transparent offset border. */
body.portal-page .portal-menu,body.portal-page .portal-surface,body.inner-page .content-shell,body.inner-page .rail-panel{border:0!important;background-clip:border-box!important;border-radius:4px!important}
body.portal-page .portal-menu::before,body.portal-page .portal-surface::before,body.inner-page .content-shell::before,body.inner-page .rail-panel::before{inset:-4px!important;border:9px solid transparent!important;border-image:url("/images/ui/web/paal_web_center_frame.png") 92 / 9px / 0 round!important}
@media(max-width:760px){
 body.inner-page .site-header,body.portal-page .site-header{height:92px!important;grid-template-rows:40px 36px!important;padding:8px 12px!important;row-gap:0!important}
 body:is(.inner-page,.portal-page) .site-header .top-nav{height:36px!important;align-self:center!important}
 body:is(.inner-page,.portal-page) .site-header .top-nav a{height:36px!important;line-height:36px!important;font-size:8px!important;background:transparent!important}
 body:is(.inner-page,.portal-page) .site-header .top-nav a.active{color:#fff!important}
 body:is(.inner-page,.portal-page) .site-header .top-nav a::after{display:none!important}
 body:is(.inner-page,.portal-page) .site-header .brand{align-self:center!important}
 body:is(.inner-page,.portal-page) .site-header .header-actions{align-self:center!important}
}
