/* Reference layout, built from the original stone surface and frame resources. */
body:not(.inGame){background:#02050b}
body:not(.inGame)::before{inset:0;border:0;box-shadow:none;background:url('/static/assets/mir/create-background-0.webp') center/cover no-repeat;opacity:1;filter:grayscale(.55) hue-rotate(170deg) brightness(.5);z-index:-2}
body:not(.inGame)::after{content:'';position:fixed;inset:0;background:radial-gradient(ellipse at 50% 35%,#09223820,#010610a0);pointer-events:none;z-index:-1}
#auth{width:min(440px,calc(100vw - 34px));max-width:none;padding:28px 30px 24px;border:0;border-radius:0;background:none;box-shadow:0 12px 45px #000c;font-family:serif;overflow:visible;color:#e9d9ad}
#auth::before{content:'';position:absolute;inset:-12px;z-index:-1;background:url('/static/assets/mir/auth-stone.webp') repeat;border:16px solid transparent;border-image:url('/static/assets/mir/auth-frame.webp') 16 round;filter:grayscale(.85) brightness(.9);box-shadow:inset 0 0 24px #0006}
#auth::backdrop{background:#0002}
#auth h2{font:700 27px/1.3 serif;text-align:center;color:#f3e6ad;text-shadow:2px 2px 2px #050402,-1px -1px #2c2519;margin:0 0 27px}
#auth .authRow{display:grid;grid-template-columns:88px 1fr;align-items:center;gap:10px;margin:12px 0}
#auth .authRow[hidden],#auth button[hidden]{display:none}
#auth label{font:bold 20px/1.2 serif;white-space:nowrap;text-shadow:2px 2px 2px #000,-1px -1px 2px #000}
#auth input{width:100%;margin:0;padding:5px 7px;height:30px;min-width:0;border:2px inset #55564c;border-radius:0;background:#030403;color:#e9dfc5;font:16px/1.1 serif;box-shadow:inset 0 0 4px #000}
#auth input::placeholder{font:12px serif;color:#77766a}
#auth #login,#auth #register,#auth #changePassword,#auth #authBack,#authReopen{border:4px ridge #77786d;border-radius:1px;background:linear-gradient(#353631d9,#0c0d0bed),url('/static/assets/mir/auth-stone.webp');box-shadow:2px 3px 5px #000a;color:#f2dfad;font:20px/1.2 serif;text-shadow:2px 2px #000;padding:8px 16px}
#auth #login{display:block;width:108px;margin:13px 0 14px auto}
#auth .authActions{display:flex;gap:9px}
#auth .authActions button{flex:1;width:auto!important;min-height:43px;margin:0}
#auth #register{padding:8px 12px}
#auth #error{font:13px/1.4 serif;color:#ffe0a4;min-height:18px;margin:0 0 4px;white-space:normal}
#auth #close{display:block;position:absolute;right:0;top:0;width:27px;height:28px;padding:0;border:2px ridge #8c8b69;border-radius:0;background:#431b17;color:#c7a05e;font:21px/1 serif;box-shadow:1px 2px 4px #000}
#auth button:focus-visible,#authReopen:focus-visible{outline:1px solid #ffdb8b;outline-offset:3px}
#auth button:hover,#authReopen:hover{filter:brightness(1.2)}
#auth button:active,#authReopen:active{box-shadow:inset 2px 2px 5px #000;transform:translateY(1px)}
#authReopen{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:1;white-space:nowrap}
#authReopen:active{transform:translate(-50%,-50%)}
body:has(#auth[open]) #authReopen,body.inGame #authReopen,body.selecting #authReopen{display:none}
.gateTorches{z-index:0}
.gateTorches i{width:36px;height:120px;border:3px ridge #393c35;background:linear-gradient(#0008,#000c),url('/static/assets/mir/auth-stone.webp');box-shadow:0 -35px 65px 14px #f98e293d,inset 0 0 10px #000}
.gateTorches i::before{left:50%;transform:translateX(-50%);top:-68px;width:85px;height:100px;background:url('/static/assets/mir/auth-flame.webp') center bottom/contain no-repeat;border-radius:0;animation:none;filter:drop-shadow(0 0 12px #fb7b27)}
@media(max-height:500px) and (orientation:landscape){
 #auth{padding:16px 26px 12px;width:390px}
 #auth h2{font-size:21px;margin:0 0 13px}
 #auth .authRow{grid-template-columns:78px 1fr;margin:8px 0}
 #auth label{font-size:17px}#auth input{height:27px}
 #auth #login{padding:5px 12px;margin:7px 0 8px auto;font-size:17px}
 #auth .authActions button{font-size:17px!important;padding:5px 12px!important;min-height:32px}
 #auth #error{font-size:11px;min-height:14px}
 #auth[data-mode=change-password] .authRow{margin:5px 0}
 .gateTorches i{top:55%;height:55px}
}
@media(max-width:420px){#auth{padding:22px 18px 18px}#auth label{font-size:17px}#auth .authRow{grid-template-columns:75px 1fr;gap:6px}#auth .authActions button{font-size:18px!important;padding:7px 8px!important}.gateTorches i{left:5%}.gateTorches i:last-child{right:5%}}
@media(prefers-reduced-motion:reduce){.gateTorches i::before{background-image:none}}
