/* Angel sanctuary login; existing auth IDs and handlers stay attached. */
#login-panel-toggle{display:none}
@media(max-width:1100px),(pointer:coarse){
 html body #screen-auth{background-image:linear-gradient(90deg,#09120e85,#09120e15 48%,#0b1513b8),url('/assets/ui/login/angel-sanctuary-v1.png')!important;background-size:cover!important}
 html #screen-auth #login-panel-toggle{display:block;position:fixed;right:max(8px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));z-index:5;min-height:44px;padding:10px 14px;background:#14241ef5;border:1px solid #b99c58;color:#ecdbb5;font:600 12px 'Outfit',sans-serif;border-radius:0;touch-action:manipulation}
 html #screen-auth.auth-scene-only .auth-panel{display:none!important}
 html #screen-auth.auth-scene-only{overflow:hidden!important}
}
@media(max-width:520px) and (orientation:portrait){html body #screen-auth{padding-top:60px!important}}
.login-atmosphere{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0}
#screen-auth .login-intro,#screen-auth .auth-panel{position:relative;z-index:1}
.login-scene-fx{position:absolute;width:max(100vw,150dvh);height:max(100dvh,66.66667vw);left:50%;top:50%;transform:translate(-50%,-50%)}
.login-scene-foreground{position:absolute;inset:0;z-index:2000;pointer-events:none;background-image:linear-gradient(90deg,#09120e85,#09120e15 48%,#0b1513b8),url('/assets/ui/login/angel-sanctuary-v1.png');background-position:center,center;background-size:100vw 100dvh,100% 100%;background-repeat:no-repeat;mask:url('/assets/ui/login/angel-foreground-mask-v2.png') center/100% 100% no-repeat;-webkit-mask:url('/assets/ui/login/angel-foreground-mask-v2.png') center/100% 100% no-repeat;image-rendering:pixelated}
.login-portal-light{position:absolute;left:28%;top:14%;width:5%;height:21%;background:#f5dc8a;clip-path:polygon(25% 0,75% 0,75% 8%,90% 8%,90% 22%,100% 22%,100% 100%,0 100%,0 22%,10% 22%,10% 8%,25% 8%);opacity:.09;animation:sanctuary-light 6s ease-in-out infinite}
.login-candle-light{position:absolute;width:3%;height:5%;background:#edbd64;clip-path:polygon(30% 0,70% 0,70% 20%,100% 20%,100% 80%,70% 80%,70% 100%,30% 100%,30% 80%,0 80%,0 20%,30% 20%);animation:sanctuary-light 3.7s ease-in-out infinite alternate;opacity:.12}.candle-one{left:52.5%;top:14.5%;animation-delay:-2s}.candle-two{left:39.3%;top:31%;animation-delay:-1s}
.login-motes{position:absolute;inset:0}.login-motes i{position:absolute;left:var(--x);top:var(--y);width:3px;height:3px;background:#ecd89d;box-shadow:3px 0 #9b895b66;opacity:0;animation:sanctuary-mote var(--duration,12s) linear infinite;animation-delay:var(--delay,-3s)}
.login-motes i:nth-child(1){--x:12%;--y:80%;--delay:-2s}.login-motes i:nth-child(2){--x:24%;--y:62%;--delay:-8s}.login-motes i:nth-child(3){--x:36%;--y:85%;--delay:-5s}.login-motes i:nth-child(4){--x:48%;--y:59%;--delay:-10s}.login-motes i:nth-child(5){--x:55%;--y:80%;--delay:-1s}.login-motes i:nth-child(6){--x:8%;--y:47%;--delay:-7s}.login-motes i:nth-child(7){--x:30%;--y:40%;--delay:-4s}.login-motes i:nth-child(8){--x:61%;--y:39%;--delay:-9s}.login-motes i:nth-child(9){--x:43%;--y:72%;--delay:-6s}.login-motes i:nth-child(10){--x:19%;--y:93%;--delay:-11s}.login-motes i:nth-child(11){--x:73%;--y:91%;--delay:-3s}.login-motes i:nth-child(12){--x:91%;--y:52%;--delay:-8s}
@keyframes sanctuary-light{0%,100%{opacity:.06}50%{opacity:.18}}
@keyframes sanctuary-mote{0%,100%{opacity:0;transform:translate(0,24px)}20%{opacity:.65}75%{opacity:.4}95%{opacity:0;transform:translate(14px,-110px)}}
.login-last-character{position:absolute;left:35%;top:39%;width:150px;height:150px;transform:translate(-50%,-90%);text-align:center}.login-last-character[hidden]{display:none}.login-last-character img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.login-last-character span{position:absolute;bottom:82%;left:50%;transform:translateX(-50%);padding:3px 7px;border:1px solid #9c875864;background:#0b171be0;color:#f1dfb8;white-space:nowrap;font:600 12px 'Outfit',sans-serif;text-shadow:1px 2px #07110c,-1px -1px #07110c}
.login-character-model{position:absolute;inset:0;width:100%;height:100%}.login-last-character.has-live-model>img{visibility:hidden}
#login-last-character{z-index:1000}
#login-guild-members{position:absolute;inset:0;pointer-events:none}.login-guild-character{position:absolute;transform:translate(-50%,-90%);pointer-events:none}.login-guild-model{position:absolute;inset:0}.login-guild-character>span{position:absolute;bottom:84%;left:50%;transform:translateX(-50%);white-space:nowrap;font:600 10px 'Outfit',sans-serif;color:#c9d2c5;text-shadow:1px 1px #050d0a,-1px -1px #050d0a;background:#0b171b9c;padding:2px 4px}.login-guild-character.guild-leader>span{color:#eace82;border-bottom:1px solid #a1884c}.login-guild-character.guild-officer>span{color:#bbd3dd}
@media(min-width:1101px){#screen-auth .login-intro{align-self:start}#screen-auth .login-intro h1{font-size:clamp(36px,4vw,60px)}#screen-auth .login-story{font-size:16px;max-width:280px;margin-bottom:24px}}
@media(max-width:520px) and (orientation:portrait){html body #screen-auth{background-position:36% center!important}.login-scene-fx{left:36%;transform:translate(-36%,-50%)}.login-motes i:nth-child(n+7){display:none}}
@media(prefers-reduced-motion:reduce){.login-motes i{animation:none;opacity:0}.login-portal-light,.login-candle-light{animation:none;opacity:.08}}
html #screen-auth{background-image:linear-gradient(90deg,#09120e85,#09120e15 48%,#0b1513b8),url('/assets/ui/login/angel-sanctuary-v1.png');background-size:cover;background-position:center;image-rendering:pixelated;display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:6vw;padding:36px 7vw;align-content:center;align-items:center;overflow:auto;isolation:isolate}
#screen-auth::before,#screen-auth::after{content:'';position:fixed;width:130px;height:130px;background:url('/assets/ui/forest-chronicle/corner-v1.png') center/contain no-repeat;pointer-events:none;z-index:-1}#screen-auth::before{top:12px;left:12px}#screen-auth::after{right:12px;bottom:12px;transform:rotate(180deg)}
.login-intro{padding:15px 0;text-shadow:0 3px 0 #0009;color:#f1dfb8;font-family:'Outfit',sans-serif}.login-chapter{color:#d4c494;font:600 11px 'Outfit',sans-serif;letter-spacing:3px;margin-bottom:22px}.login-intro h1{font:700 clamp(38px,5.5vw,80px)/1.08 'Cinzel',Georgia,serif;letter-spacing:2px;color:#ecdbb5}.login-intro h1 span{letter-spacing:6px;color:#f5ebcf}.login-divider{width:280px;max-width:100%;height:36px;object-fit:contain;margin:15px 0}.login-story{font:19px/1.7 'Cinzel',Georgia,serif;max-width:380px;color:#d6dfd1;margin-bottom:48px}.login-world{font:10px 'Outfit',sans-serif;letter-spacing:2px;color:#b6c5b5}
html #screen-auth .auth-panel{width:400px;max-width:100%;padding:28px;gap:9px;transform:none!important;scale:1;background:#14241eea!important;border:1px solid #9e8b5d!important;border-radius:0!important;box-shadow:inset 0 0 0 3px #0e1b14,0 18px 55px #0009!important;text-align:left;font-family:'Outfit','Segoe UI',sans-serif;align-self:center;min-width:0}
html #screen-auth .auth-panel .game-title{margin:0!important;padding:2px 0 10px!important;font:700 29px/1.15 'Cinzel',Georgia,serif!important;color:#f0deb5!important;text-shadow:none!important;letter-spacing:0}
html #screen-auth .auth-panel .game-title::after{display:none!important}html #screen-auth .auth-panel>.subtitle{font:12px/1.5 'Outfit',sans-serif;color:#adbea8;margin:0 0 12px!important}
html #screen-auth .auth-panel #channel-row{margin:0 0 3px!important}html #screen-auth #channel-select{min-height:38px;padding:8px;background:#0e1b15;border:1px solid #57694e;color:#e7dbb8;border-radius:0;font:13px 'Outfit',sans-serif}
html #screen-auth .auth-panel :is(#auth-user,#auth-pass){width:100%;min-height:44px;padding:11px 12px;background:#0d1b15!important;border:1px solid #52664c!important;color:#e9dfc7!important;font:14px 'Outfit',sans-serif;box-shadow:none!important}
html #screen-auth .auth-panel :is(#auth-user,#auth-pass):focus{border-color:#d5bc7b!important;outline:1px solid #d5bc7b}html #screen-auth .auth-panel :is(#auth-user,#auth-pass)::placeholder{color:#a6b49e}
html #screen-auth .auth-panel .auth-actions{gap:8px}html #screen-auth .auth-panel .auth-actions button{min-height:44px;font:700 12px 'Outfit',sans-serif;letter-spacing:1px!important;border:1px solid #74805b!important;background:#233b2c!important;color:#e4d8b5!important;padding:10px!important}
html #screen-auth .auth-panel button#btn-login{background:#b99c58!important;border-color:#e4c784!important;color:#172318!important;box-shadow:inset 0 0 0 2px #886f3e!important}html #screen-auth .auth-panel button#btn-login:hover{background:#d0b676!important}
html #screen-auth .auth-panel #btn-discord,html #screen-auth .auth-panel #btn-google{min-height:40px;padding:10px!important;border-radius:0!important;font:600 12px 'Outfit',sans-serif!important;letter-spacing:0}
html #screen-auth .auth-panel .auth-remember-row{font:12px 'Outfit',sans-serif!important}html #screen-auth .auth-panel #auth-remember{accent-color:#c5aa6c}html #screen-auth .auth-panel label[for=auth-remember]{color:#bbc9b0!important}
html #screen-auth .auth-panel #login-volume-ctrl{margin-top:7px!important;padding-top:10px!important;border-color:#63705066!important;gap:8px}html #screen-auth .auth-panel #btn-music-toggle{padding:6px 8px!important;min-height:30px;font:11px 'Outfit',sans-serif!important;letter-spacing:0!important}html #screen-auth #login-volume-range{accent-color:#c2a868}
html #screen-auth .auth-panel #auth-msg{font:12px/1.5 'Outfit',sans-serif;overflow-wrap:anywhere}html #screen-auth #auth-msg:empty{display:none}html #screen-auth .auth-panel :focus-visible{outline:2px solid #e6cf91;outline-offset:2px}
@media(max-height:800px) and (min-width:1101px){html #screen-auth{padding-top:22px;padding-bottom:22px}.login-story{margin-bottom:28px}html #screen-auth .auth-panel{padding:22px;gap:7px}}
@media(max-width:1100px){html #screen-auth{display:flex;justify-content:center;padding:22px;gap:0}.login-intro{display:none}html #screen-auth .auth-panel{width:400px}}
@media(orientation:landscape) and (max-height:600px) and (max-width:1100px){html #screen-auth{padding:10px 12px;align-items:center}html #screen-auth .auth-panel{display:grid;grid-template-columns:var(--auth-left) minmax(0,1fr) minmax(0,1fr);grid-template-rows:44px 44px 36px 44px 44px auto;width:min(100%,980px);max-width:100%;padding:14px;gap:7px}html #screen-auth .auth-panel .game-title{font-size:23px!important}html #screen-auth .auth-panel>.subtitle{margin:0!important}html #screen-auth .auth-panel #login-volume-ctrl{margin:0!important;padding:0!important}}
@media(max-width:520px) and (orientation:portrait){html #screen-auth{padding:16px;background-position:36% center;align-items:flex-start}html #screen-auth .auth-panel{padding:22px;width:100%;margin:auto}#screen-auth::before,#screen-auth::after{width:75px;height:75px}}
