*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#d1dcc3}body{overscroll-behavior:none}#game{display:block;width:100vw;height:100dvh;touch-action:none;outline:none;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;left:-10000px;top:0}
/* The account form uses native controls for password managers and keyboard access. */
#account-gate{position:fixed;inset:0;z-index:20;display:grid;place-items:safe center;overflow:auto;padding:24px;background:linear-gradient(#153d32bb,#12372ef2),url('/assets/terrain-ink.png') center/cover;color:#eadfc6;font-family:serif}
#account-gate[hidden]{display:none}
.account-card{box-sizing:border-box;width:min(100%,420px);padding:30px;border:1px solid #bda676;border-radius:16px;background:#21483fee;box-shadow:0 20px 70px #102c25}
.account-kicker{color:#d9bc7a;letter-spacing:3px;font-size:12px}.account-card h1{font-size:38px;margin:15px 0}.account-card p{line-height:1.8}
.account-card label{display:block;margin:16px 0 7px}.account-card input{box-sizing:border-box;width:100%;padding:13px 14px;border-radius:7px;border:1px solid #b6a171;background:#f5eedf;color:#263e32;font-size:16px}
.account-card button{width:100%;padding:13px;margin-top:22px;border:1px solid #cbae74;border-radius:8px;background:#e8c58d;color:#3c4b34;cursor:pointer;font-size:16px}.account-card button:disabled{opacity:.6;cursor:wait}.account-card .account-secondary{background:transparent;color:#eadfc6;margin-top:0}.account-note{font-size:12px;color:#c8c8af}#account-message{min-height:24px;font-size:14px;color:#f1d49b}
#connection-dialog{color:#eadfc6;max-height:calc(100dvh - 32px);width:min(calc(100% - 32px),420px);overflow:auto;font-family:serif}#connection-dialog::backdrop{background:#102c25c9;backdrop-filter:blur(3px)}#connection-dialog h2{font-size:26px;margin:14px 0}#connection-dialog .account-secondary{margin-top:12px}#connection-dialog button[hidden]{display:none}#connection-dialog button:focus-visible,.account-card input:focus-visible{outline:3px solid #ffedb0;outline-offset:4px}
.account-tabs{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:20px}
.account-card .account-tabs button{margin-top:0;background:transparent;color:#eadfc6;padding:10px}
.account-card .account-tabs button[aria-pressed=true]{background:#e8c58d;color:#3c4b34}
.account-card .server-option{display:block;text-align:left;background:#193d35;color:#eadfc6;margin-top:12px;padding:16px}
.server-option strong,.server-option span{display:block}.server-option strong{font-size:19px;margin-bottom:8px}.server-option span{font-size:13px;line-height:1.6;color:#c8c8af}
.account-card .server-option[aria-pressed=true]{border-color:#f4d695;box-shadow:inset 0 0 0 1px #f4d695;background:#345a47}
#server-selection h2{font-size:24px;margin:22px 0 8px}#account-logout{margin-top:12px}
.account-card button:focus-visible{outline:3px solid #ffedb0;outline-offset:4px}
@media(max-width:480px){#account-gate{padding:16px}.account-card{padding:22px}.account-card h1{font-size:32px}}
.account-card p{margin:10px 0;line-height:1.6}.account-card .account-kicker{margin-top:0}
#account-message:empty{display:none}#server-enter{margin-top:14px}
#server-selection + #account-message:empty + #account-demo{margin-top:14px}
/* Native cursors retain an accurate hotspot without a lagging DOM follower. */
@media (any-pointer:fine){
 #game{cursor:url('/assets/cursor-jade.svg') 2 2,default}
 #game[data-cursor=action]{cursor:url('/assets/cursor-jade-active.svg') 2 2,pointer}
 #game[data-cursor=drag]{cursor:grabbing}
 .account-card button:not(:disabled){cursor:url('/assets/cursor-jade-active.svg') 2 2,pointer}
}
#game-shell{height:100%}
#landscape-gate{display:none;position:fixed;inset:0;z-index:10000;place-items:center;padding:max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));overflow:auto;outline:none;background:radial-gradient(ellipse at 50% 25%,#386455,#15392f 75%);color:#f4e8c9;font-family:serif;text-align:center;touch-action:none}
.landscape-card{width:min(100%,360px);padding:36px 22px;border:1px solid #bba36b80;border-radius:20px;background:#193e35d9;box-shadow:0 20px 70px #102c2566}
.landscape-card h1{font-size:28px;letter-spacing:3px;margin:20px 0 14px}.landscape-card p{line-height:1.9}.landscape-note{font-size:13px;color:#c0cdb6;margin-top:24px}
.landscape-device{width:98px;height:58px;border:3px solid #e3c88c;border-radius:11px;margin:4px auto 28px;box-shadow:inset 0 0 0 5px #254c3f;position:relative}.landscape-device:after{content:'';position:absolute;right:6px;top:23px;width:4px;height:8px;border-radius:3px;background:#e3c88c}.landscape-device span{font:38px/50px sans-serif;color:#e3c88c}
html[data-orientation-blocked] #landscape-gate{display:grid}html[data-orientation-blocked] #game-shell{visibility:hidden}html[data-orientation-blocked] #connection-dialog{display:none}
/* Enforce the gate before the module loads as well. */
@media (orientation:portrait){#landscape-gate{display:grid}#game-shell{visibility:hidden}#connection-dialog{display:none}}
:root{--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px);--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
@media (orientation:landscape) and (max-height:600px) and (max-width:1100px){
 #account-gate{padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
 .account-card{width:min(100%,640px);padding:18px 24px;max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
 .account-card h1{font-size:28px;margin:8px 0}.account-card h2{font-size:24px}.account-card label{margin:10px 0 5px}.account-card input{padding:10px 12px;min-height:42px}.account-card button{padding:10px 12px;min-height:42px;margin-top:14px}.account-card .account-tabs{margin-bottom:8px}.account-card p{line-height:1.5}
 #server-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.account-card .server-option{margin-top:0}#connection-dialog{width:min(calc(100% - 32px),560px);max-height:calc(100dvh - 24px)}
}
