/* LPKII V57 – site-wide layout repair, fantasy character visibility, accessibility and ambience */
:root{--l57-gold:#f7d99e;--l57-cyan:#8ce7f1;--l57-ink:#061326}
html{overflow-x:hidden}
body{min-width:320px;overflow-x:hidden}
*,*::before,*::after{box-sizing:border-box}
/* Fix page content sizing and alignment without changing the existing banner or video. */
body :is(main,.lp-shell,.inner-shell,.register-shell,.lpk4-wrap){max-width:100%}
body :is(.lp-shell,.inner-shell,.register-shell){margin-left:auto!important;margin-right:auto!important}
body :is(.lp-grid,.download-grid,.shop-grid,.lpk4-memory-grid,.realm-grid,.hero-highlights){min-width:0}
body :is(.content-panel,.lp-card,.download-card,.shop-card,.register-card,.login-card,.donation-card,.kingdom-card,.realm-card){min-width:0;overflow-wrap:anywhere}
body :is(.content-panel,.lp-card,.download-card,.shop-card,.register-card,.login-card,.donation-card,.kingdom-card,.realm-card){transition:transform .25s ease,border-color .25s ease,box-shadow .25s ease}
@media(hover:hover) and (pointer:fine){body :is(.content-panel,.lp-card,.download-card,.shop-card,.kingdom-card,.realm-card):hover{transform:translateY(-3px);border-color:rgba(252,216,145,.4)!important;box-shadow:0 16px 36px rgba(0,0,0,.42),0 0 18px rgba(110,212,250,.09)!important}}
body :is(img,video,iframe){max-width:100%}
body :is(.lp-banner,.hero-video-shell,.hero-video-ratio){min-width:0}
/* Header and enlarged crest remain visible and consistent across all actual pages. */
body :is(.topbar,.godz-topbar,.inner-topbar,.lpk4-nav,.lp-nav){isolation:isolate}
body .lpk4-nav-inner{width:min(1420px,100%);margin-inline:auto;flex-wrap:wrap;justify-content:space-between}
body .lpk4-brand{display:inline-flex;align-items:center;flex:0 0 auto;min-width:0}
body .lpk4-brand img{width:clamp(166px,14vw,225px)!important;height:clamp(72px,7vw,94px)!important;object-fit:contain!important}
body .lp-nav>a:first-child{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center}
body .lp-nav>a:first-child img{width:clamp(174px,15vw,240px)!important;height:clamp(78px,7vw,100px)!important;max-width:100%!important;object-fit:contain!important}
body .lp-nav .lp-links,body .lpk4-nav .lpk4-links{min-width:0;justify-content:flex-end;gap:6px!important}
body .topbar .nav,body .godz-topbar .nav,body .inner-topbar .nav{flex-wrap:wrap!important;min-width:0!important}
body .topbar .site-logo-brand,body .godz-topbar .site-logo-brand,body .inner-topbar .site-logo-brand{flex:0 0 auto!important;max-width:260px!important;width:clamp(210px,18vw,260px)!important;min-width:0!important}
body .topbar .site-logo-img,body .godz-topbar .site-logo-img,body .inner-topbar .site-logo-img{height:auto!important;max-height:94px!important;width:100%!important;object-fit:contain!important}
/* Golden glass navigation and accessible touch targets */
body :is(.topbar,.godz-topbar,.inner-topbar,.lpk4-nav,.lp-nav) :is(nav a,.lp-links a,.lpk4-links a){white-space:normal;text-align:center;line-height:1.25}
body :is(a.btn,button.btn,.lpk4-btn,.lp-primary,.lp-secondary,.submit-btn,button[type=submit],input[type=submit]){transition:transform .25s ease,filter .25s ease,box-shadow .25s ease!important}
body :is(a.btn,button.btn,.lpk4-btn,.lp-primary,.lp-secondary,.submit-btn,button[type=submit],input[type=submit]):hover{transform:translateY(-2px)!important;filter:brightness(1.12);box-shadow:0 13px 28px rgba(0,0,0,.32),0 0 18px rgba(243,209,137,.22)!important}
body :is(a.btn,button.btn,.lpk4-btn,.lp-primary,.lp-secondary,.submit-btn,button[type=submit],input[type=submit]):active{transform:translateY(0) scale(.98)!important}
body :is(a,button,input,select,textarea):focus-visible{outline:2px solid var(--l57-gold)!important;outline-offset:3px!important}
/* Mascots: fixed, visible, each page receives a unique character from the existing sheet. */
body .gw54-floating-mascot{display:block!important;position:fixed!important;width:clamp(165px,13.5vw,235px)!important;right:clamp(8px,1.5vw,24px)!important;bottom:clamp(10px,2vh,24px)!important;left:auto!important;z-index:80!important;opacity:.96!important;pointer-events:none!important;overflow:visible!important}
body .gw54-sprite{display:block!important;width:100%!important;aspect-ratio:1/1!important;background-image:url('../images/fantasy-pirate-mascots-v54.png?v=57')!important;background-repeat:no-repeat!important;background-size:500% 600%!important;filter:drop-shadow(0 16px 18px rgba(0,0,0,.45))}
/* Prevent the character from covering forms and important mobile controls. */
body.register-page .gw54-floating-mascot,body.login-page .gw54-floating-mascot{right:-20px!important;bottom:8px!important;width:160px!important;opacity:.82!important}
body .gw53-olympian-santa,body .gw-v48-santa-runner,body .gw-v48-snowman{display:none!important}
/* Ambience: slow moving magical light across cards, headlines and navigation. */
body :is(.lp-banner,.lpk4-hero,.register-intro,.inner-intro,.lp-card,.download-card,.kingdom-card,.realm-card){position:relative;isolation:isolate}
body :is(.register-intro,.inner-intro,.lp-card,.download-card,.kingdom-card,.realm-card)::after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:inherit;background:radial-gradient(circle at 20% -15%,rgba(104,216,255,.10),transparent 45%),radial-gradient(circle at 100% 105%,rgba(203,139,255,.09),transparent 45%);animation:l57Breath 8s ease-in-out infinite alternate}
body :is(.lp-banner,.lpk4-hero)::after{pointer-events:none}
body :is(.topbar,.godz-topbar,.inner-topbar,.lpk4-nav,.lp-nav){box-shadow:0 10px 40px rgba(1,9,20,.56),0 0 28px rgba(75,210,255,.075)!important}
body :is(.topbar,.godz-topbar,.inner-topbar,.lpk4-nav,.lp-nav)::after{animation:l57HeaderShimmer 8s ease-in-out infinite alternate}
@keyframes l57Breath{0%{opacity:.45}100%{opacity:1}}
@keyframes l57HeaderShimmer{0%{opacity:.38}100%{opacity:.95}}
@media(max-width:1100px){body .lp-nav,body .lpk4-nav-inner{flex-direction:column;align-items:center;justify-content:center;gap:6px}body .lp-links,body .lpk4-links{justify-content:center!important}body .topbar .nav{flex-basis:100%!important;justify-content:center!important}}
@media(max-width:760px){body .lp-shell,body .inner-shell,body .register-shell{padding-left:14px!important;padding-right:14px!important}body .lpk4-nav-inner{padding-inline:12px!important}body .lp-nav .lp-links,body .lpk4-nav .lpk4-links{justify-content:center!important}body .lp-nav .lp-links a,body .lpk4-nav .lpk4-links a{font-size:11px!important;padding:8px 10px!important;min-height:38px!important}body .gw54-floating-mascot{width:128px!important;right:-14px!important;bottom:5px!important;opacity:.8!important}body :is(.topbar,.godz-topbar,.inner-topbar) .nav a{font-size:11px!important}}
@media(max-width:560px){body .gw54-floating-mascot{display:block!important;width:105px!important;opacity:.55!important;right:-22px!important;bottom:6px!important}body .gw54-sprite{animation:none!important}}
@media(prefers-reduced-motion:reduce){body .gw54-floating-mascot,body .gw54-sprite,body :is(.register-intro,.inner-intro,.lp-card,.download-card,.kingdom-card,.realm-card)::after,body :is(.topbar,.godz-topbar,.inner-topbar,.lpk4-nav,.lp-nav)::after{animation:none!important}}
