.loading{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:24px max(20px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));background:radial-gradient(120% 70% at 50% 100%,#1f4032 0,#132633 62%);color:#fff8e8;transition:opacity .4s}
.loading.done{opacity:0;pointer-events:none}
.loading-card{width:min(430px,100%);display:grid;gap:18px}
.loading-brand{display:flex;align-items:center;gap:10px;margin:0;font-size:15px;font-weight:700;letter-spacing:-.01em;color:#fff8e8}
.loading-brand img{width:36px;height:36px}
.loading-brand span{color:#c9d4d3;font-weight:500;border-left:1px solid #ffffff33;padding-left:10px}
.loading h2{margin:0 0 8px;font-size:clamp(28px,8vw,36px);line-height:1.1;letter-spacing:-.025em;font-weight:800;text-wrap:balance}
.loading p{margin:0;font-size:16px;line-height:1.5;color:#d9e1df;max-width:40ch}
.loading-bar{height:12px;margin-top:22px;border-radius:6px;background:#ffffff1f;overflow:hidden}
.loading-bar i{display:block;height:100%;width:0;border-radius:inherit;background:repeating-linear-gradient(115deg,#f27b5f 0 14px,#ff9a80 14px 28px);background-size:200% 100%;animation:loading-flow 1.4s linear infinite;transition:width .35s ease-out}
.loading .loading-meta{display:flex;justify-content:space-between;gap:12px;margin-top:10px;font-size:14px;color:#fff8e8;font-variant-numeric:tabular-nums}
.loading .loading-slow{display:none;margin-top:12px;font-size:14px;color:#ffd7a8}
.loading.slow .loading-slow{display:block}
.loading-failed{display:none}
.loading.failed .loading-now{display:none}
.loading.failed .loading-failed{display:block}
.loading-retry{display:inline-flex;align-items:center;justify-content:center;min-height:50px;margin-top:22px;padding:0 28px;border-radius:9px;background:#f27b5f;color:#062642;font-size:17px;font-weight:700;text-decoration:none}
.loading-retry:hover{background:#ff9a80}
.loading-retry:focus-visible{outline:3px solid #fff8e8;outline-offset:3px}
@keyframes loading-flow{to{background-position:-56px 0}}
@media(prefers-reduced-motion:reduce){.loading-bar i{animation:none;transition:none}.loading{transition:none}}

@media(max-width:600px){
 body.phone-layout{display:flex;flex-direction:column;height:100dvh;overflow:hidden;background:#132633}
 .phone-layout .topbar{position:relative;inset:auto;flex:none;height:auto;min-height:48px;padding:6px 10px;gap:8px;background:#132633;pointer-events:auto}
 .phone-layout .game-name{display:none}
 .phone-layout .brand{font-size:17px;max-width:none;text-shadow:none}
 .phone-layout .brand img{width:28px;height:28px}
 .phone-layout .settings{gap:5px}
 .phone-layout .settings button{white-space:nowrap;font-size:11px;min-height:36px;padding:5px 9px}
 .phone-layout #game{display:flex;flex-direction:column;flex:1;min-height:0;height:auto}
 .phone-strip{flex:none;padding:0 8px 6px;background:#132633}
 .phone-strip .hud{position:static;inset:auto;display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:4px}
 .phone-strip .hud>button,.phone-strip .hud>button:first-child{width:auto;max-width:none;min-width:0;padding:5px 8px 6px;border-radius:8px!important;box-shadow:none}
 .phone-strip .hud span{font-size:10px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .phone-strip .hud strong{font-size:16px;line-height:1.3}
 .phone-strip .hud strong small{font-size:11px}
 .phone-layout .world{position:relative;inset:auto;flex:none;height:clamp(220px,min(46dvh,100dvh - 400px),420px);min-height:0}
 .phone-layout #payment{top:8px;right:8px}
 .phone-layout .montage{top:auto;bottom:8px}
 .scene-toolbar{flex:none;display:flex;align-items:center;gap:6px;padding:6px 8px;background:#132633;overflow-x:auto;scrollbar-width:none}
 .scene-toolbar::-webkit-scrollbar{display:none}
 .scene-toolbar.more-right{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 44px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 44px),transparent)}
 .scene-toolbar .world-camera{position:static;flex:none;order:0;gap:0;padding:0;border-radius:8px;background:#1f3a4d}
 .scene-toolbar .world-camera button{min-width:38px;min-height:38px;font-size:20px}
 .scene-toolbar .world-camera span{min-width:0;padding:0 2px;font-size:12.5px;white-space:nowrap}
 .scene-toolbar .scene-label{position:static;inset:auto;flex:none;order:1;display:block}
 .scene-toolbar .scene-label button{min-height:38px;padding:0 12px;border:0;border-radius:8px;background:#fff5de;color:#062642;font-size:12.5px;font-weight:600;white-space:nowrap}
 .scene-toolbar .world-tools{display:contents}
 .scene-toolbar .world-tools button{position:static!important;left:auto!important;top:auto!important;transform:none!important;order:2;flex:none;min-height:38px;padding:0 12px;border-radius:8px;background:#1f3a4d;border:1px solid #f7efbc4d;font-size:12.5px}
 .phone-layout .decision{position:relative;inset:auto;flex:1;min-height:0;margin:0;overflow-y:auto;overscroll-behavior:contain;border:0;border-radius:14px 14px 0 0;box-shadow:none;padding:12px 12px 16px;transform:none}
 .phone-layout .decision .art-status{position:static;inset:auto;display:block;padding:0 0 5px;border-radius:0;background:none;color:#336588;font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;text-align:left}
 .phone-layout .position-controls{position:static;margin:8px 0 0;padding:0;background:none;box-shadow:none}
 .phone-layout .bottom{position:relative;inset:auto;flex:none;justify-content:space-between;gap:0;min-height:50px;padding:3px 4px max(3px,env(safe-area-inset-bottom));background:#11222e}
 .phone-layout .bottom button{flex:1 1 auto;min-height:42px;padding:6px 3px;font-size:11px;white-space:nowrap}
 .phone-layout.introducing .phone-strip,.phone-layout.introducing .scene-toolbar,.phone-layout.introducing .decision,.phone-layout.introducing .bottom{display:none}
 .phone-layout.introducing .world{flex:1;height:auto}
}
