/* Large native-resolution screen with a cropped prairie marquee. */
body[data-world-loading="true"] .world-loading{grid-template-columns:minmax(0,1fr) minmax(0,1fr);background:#e8e4d9;}
body[data-world-loading="true"] .world-loading-arcade{container-type:normal;background:radial-gradient(ellipse at 50% 35%,#e9e5d9,#c6c8b9);color:#343b38;display:flex;flex-direction:column;align-items:center;justify-content:safe center;gap:14px;padding:22px;overflow:auto;min-width:0;box-sizing:border-box;}
body[data-world-loading="true"] .world-loading-info h1{font-size:clamp(22px,2vw,32px);letter-spacing:.07em;}
body[data-world-loading="true"] .world-loading-info{padding-inline:20px;}
body[data-world-loading="true"] .world-loading-info .world-loading-bar{max-width:100%;}
.arcade-invitation{text-align:center;margin:0;flex:none;}.arcade-invitation h2{font:600 clamp(24px,2.2vw,36px)/1.12 Georgia,serif;letter-spacing:-.6px;margin:0;color:#343b38;}.arcade-invitation p{font:14px/1.4 Georgia,serif;margin:5px 0;}.arcade-invitation strong{font:600 14px/1.4 ui-monospace,monospace;}
.world-loading-arcade .prairie-square-link{position:absolute;top:10px;right:10px;width:30px;height:30px;z-index:2;}
.arcade-machine.screen-first{width:min(100%,1120px);max-width:none;flex:none;position:relative;padding:0 10px 10px;box-sizing:border-box;border:0;border-radius:8px;background:#344438;border-inline:7px solid #866038;box-shadow:inset 0 0 0 2px #a7894d,0 14px 35px #25301e35;filter:none;}
.arcade-sign{height:clamp(70px,7vw,104px);margin:0 -10px;background:url('/nine/assets/engine/assets/pixel-theatre-arcade-cabinet-v2.png') center 2.5% / 125% 760% no-repeat;background-color:#233426;}
.screen-first .arcade-glass{position:relative;inset:auto;width:100%;height:clamp(430px,calc(100dvh - 280px),850px);aspect-ratio:auto;margin:0;background:#101d19;border:5px solid #151f19;border-radius:5px;overflow:hidden;box-shadow:0 0 0 2px #6f7561;display:flex;flex-direction:column;box-sizing:border-box;color:#f6e9c4;}
.arcade-navigation{display:flex;gap:7px;align-items:center;flex:none;padding:8px;background:#26392d;border-bottom:1px solid #6f7b59;z-index:2;}
.arcade-navigation button{min-height:42px;padding:8px 12px;background:#e2d098;color:#233a2c;font:700 14px/1.15 ui-monospace,monospace;border:1px solid #ab9b6c;border-radius:4px;cursor:pointer;white-space:nowrap;}.arcade-navigation button:disabled{opacity:.35;cursor:default;}.arcade-navigation button:focus-visible{outline:3px solid #fff2ad;outline-offset:2px;}.arcade-navigation #arcade-home{background:#53644b;color:#fff1ca;}.arcade-navigation strong{flex:1;min-width:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font:600 17px Georgia,serif;text-align:center;}
.arcade-content{position:relative;flex:1;min-height:0;overflow:hidden;}
.arcade-selector{height:100%;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:14px;padding:18px;box-sizing:border-box;background:radial-gradient(ellipse at 50% 25%,#324735,#111e17);}
.arcade-selector[hidden],#arcade-games[hidden],#arcade-games iframe[hidden]{display:none!important;}
.arcade-selector button{display:flex;flex-direction:column;min-width:0;min-height:0;padding:0;border:1px solid #829071;background:#243729;color:#f6e9c4;border-radius:5px;overflow:hidden;cursor:pointer;text-align:left;}.arcade-selector button:hover,.arcade-selector button:focus-visible{outline:3px solid #e8cd81;outline-offset:2px;}
.arcade-card-art{flex:1;min-height:0;width:100%;display:block;background:#000;overflow:hidden;}.arcade-card-art img{width:100%;height:100%;object-fit:cover;display:block;}.starfall-card img{object-fit:contain;padding:14px;box-sizing:border-box;}.card-copy{display:flex;flex-direction:column;padding:10px 14px;gap:4px;}.card-copy strong{font:600 20px/1.1 Georgia,serif;}.card-copy small{font:12px/1.3 system-ui,sans-serif;color:#c4ceb8;}
.chess-card{display:flex;justify-content:center;background:#314635;}.chess-card #arcade-chess-board{aspect-ratio:1;max-height:100%;display:grid;grid-template-columns:repeat(8,1fr);height:100%;transform:rotate(-9deg) scale(1.1);}.chess-card i{font:clamp(12px,1.8vw,25px)/1 Georgia,serif;display:grid;place-items:center;aspect-ratio:1;color:#17241a;background:#d5d8bf;font-style:normal;}.chess-card i.dark{background:#7c8d6c;}
#arcade-games,#arcade-games iframe{position:relative;height:100%;width:100%;border:0;display:block;background:#101715;margin:0;transform:none;}
.arcade-status{flex:none;margin:0;padding:7px 12px;background:#1d2e22;color:#c9d4bc;font:12px/1.35 system-ui,sans-serif;text-align:center;min-height:16px;}
#arcade-glass:fullscreen,#arcade-glass.expanded{position:fixed;inset:0;z-index:20000;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;}
body:has(#arcade-glass.expanded) .engine-masthead,body:has(#arcade-glass.expanded) .engine-facts{visibility:hidden;}
@media(max-width:1050px){body[data-world-loading="true"] .world-loading{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}body[data-world-loading="true"] .world-loading-arcade{padding:18px 10px;}.arcade-navigation{gap:5px;}.arcade-navigation button{font-size:12px;padding:8px;}.arcade-navigation strong{font-size:14px;}.card-copy strong{font-size:18px;}}
@media(max-width:760px){body[data-world-loading="true"] .world-loading{display:block;overflow-y:auto;}body[data-world-loading="true"] .world-loading-info{min-height:420px;}.engine-facts{display:none!important;}body[data-world-loading="true"] .world-loading-arcade{padding:20px 6px;min-height:0!important;}.arcade-machine.screen-first{border-inline-width:4px;padding:0 4px 4px;}.arcade-sign{margin-inline:-4px;height:65px;}.screen-first .arcade-glass{height:max(510px,75dvh);border-width:2px;}.arcade-navigation{flex-wrap:wrap;gap:5px;padding:6px;}.arcade-navigation strong{order:5;flex-basis:100%;font-size:16px;padding:2px;}.arcade-navigation #arcade-expand{margin-left:auto;}.arcade-navigation button{min-height:42px;font-size:12px;padding:7px;}.arcade-selector{padding:10px;gap:10px;}.card-copy{padding:9px;}.card-copy strong{font-size:17px;}.card-copy small{font-size:11px;}.chess-card i{font-size:17px;}.arcade-invitation h2{font-size:26px;}#arcade-glass:fullscreen,#arcade-glass.expanded{height:100dvh;}.arcade-status{font-size:11px;}}

/* Load stays in the viewport and above the branding during every engine phase. */
body[data-scene] #scene-menu:not([hidden]):is([data-menu="load"],[data-menu="save"]){position:fixed;inset:50% auto auto 50%;width:min(560px,calc(100vw - 32px));height:auto;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);transform:translate(-50%,-50%);box-sizing:border-box;padding:20px;border:1px solid #a89a7c;border-radius:12px;background:#f6f2e8;overflow:auto;z-index:2000;box-shadow:0 20px 65px #0005;}
body:has(#scene-menu:not([hidden])) .engine-masthead{visibility:hidden;}
body[data-world-loading="true"] #scene-menu[data-menu="load"] .library-list{max-height:40dvh;overflow:auto;}
/* A single small guide replaces the crossed-arrow overlay. */
.control-guide .guide-panel{position:absolute;width:min(370px,calc(100vw - 32px));box-sizing:border-box;padding:16px 18px;background:#1a201bf2;border:1px solid #d6c79e88;border-radius:9px;color:#fff5dc;box-shadow:0 8px 30px #0005;font:15px/1.4 Georgia,serif;}
.control-guide .guide-panel::before{content:'';position:absolute;top:-9px;left:var(--guide-arrow,24px);width:16px;height:16px;background:#1a201b;border-top:1px solid #d6c79e88;border-left:1px solid #d6c79e88;transform:rotate(45deg);}
.control-guide .guide-panel p{margin:0 0 10px;font:inherit;}
.control-guide .guide-panel p:last-of-type{margin-bottom:14px;}
.control-guide .guide-panel strong{color:#f5d893;}
.control-guide .guide-panel button{position:static;transform:none;background:#e7d4a1;color:#23291e;border:0;border-radius:4px;padding:9px 14px;font:14px/1.2 Georgia,serif;cursor:pointer;}
.control-guide::backdrop{background:#0002;}
#scene-menu .load-generation-warning{color:#675633;background:#eee5cf;border:1px solid #d1c39e;}
#world-loading-open-load{margin-top:14px;border:1px solid #9e937a;border-radius:5px;background:#e6dfd0;color:#302d24;padding:9px 16px;font:14px Georgia,serif;cursor:pointer;}


body[data-world-loading="true"] .engine-masthead{right:calc(50% + 24px);}
body[data-world-loading="true"] .engine-masthead nav{display:none;}
body[data-world-loading="true"] .engine-facts{left:25%;width:calc(50% - 48px);}
body:has(#arcade-glass.expanded) .prairie-square-link{visibility:hidden;}
@media(max-width:1050px) and (min-width:761px){body[data-world-loading="true"] .engine-masthead{right:calc(50% + 16px);}body[data-world-loading="true"] .engine-facts{left:25%;width:calc(50% - 32px);}}
@media(max-width:760px){body[data-world-loading="true"] .engine-masthead{right:16px;}.world-loading-info h1{white-space:normal;}}

.control-guide .toolbar-guide::before{display:none;}
.control-guide .toolbar-guide h2{margin:0 0 12px;font:bold 17px/1.3 Georgia,serif;color:#f5d893;}

/* Complete approved prairie cabinet, compact enough to show the controls and base.
   Current brand kit: warm sand F7F1E1/EBDDB3, charcoal141210,
   amber B9975B and signature gold CCA43B. Original approved art stays intact. */
body[data-world-loading="true"] .world-loading-arcade { background:radial-gradient(ellipse at 50% 38%,#F7F1E1,#E3D5BD); color:#141210; padding:18px 12px; gap:10px; }
.arcade-invitation h2 { color:#141210; font-size:clamp(21px,2vw,28px); }
.arcade-invitation p { font-size:12px; }
.arcade-invitation strong { font-size:12px; }
.arcade-machine.screen-first { width:min(100%,640px,calc((100dvh - 160px)*.75)); position:relative; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.arcade-cabinet-art { display:block; width:100%; height:auto; pointer-events:none; user-select:none; }
.screen-first .arcade-glass { position:absolute; left:25.9%; top:20.25%; width:48.4%; height:30.7%; margin:0; border:0; border-radius:1px; box-shadow:none; background:#141210; color:#F7F1E1; }
.arcade-navigation { gap:3px; padding:4px; background:#141210; border-color:#B9975B; flex-wrap:nowrap; }
.arcade-navigation button { min-height:25px; padding:4px 5px; font-size:10px; color:#141210; background:#EBDDB3; border-color:#B9975B; border-radius:2px; }
.arcade-navigation #arcade-home { background:#CCA43B; color:#141210; }
.arcade-navigation strong { display:none; }
.arcade-navigation #arcade-expand { margin-left:auto; font-size:9px; }
.arcade-selector { padding:5px; gap:5px; background:#141210; }
.arcade-selector button { border-color:#B9975B; background:#4F4D4C; color:#F7F1E1; border-radius:2px; }
.arcade-selector button:hover,.arcade-selector button:focus-visible { outline-color:#CCA43B; }
.card-copy { padding:4px; gap:0; }
.card-copy strong { font-size:11px; }
.card-copy small { display:none; }
.starfall-card img { padding:4px; }
.arcade-status { background:#141210; color:#EBDDB3; padding:3px 4px; font-size:8px; line-height:1.25; min-height:10px; }
.chess-card { background:#4F4D4C; }
.chess-card i { background:#EBDDB3; color:#141210; font-size:12px; }
.chess-card i.dark { background:#B9975B; }
#arcade-glass:fullscreen,#arcade-glass.expanded { position:fixed; inset:0; width:100vw; height:100dvh; }
#arcade-glass:is(:fullscreen,.expanded) .arcade-navigation { gap:8px; padding:8px; }
#arcade-glass:is(:fullscreen,.expanded) .arcade-navigation button { min-height:42px; padding:8px 12px; font-size:14px; }
#arcade-glass:is(:fullscreen,.expanded) .arcade-navigation strong { display:block; }
#arcade-glass:is(:fullscreen,.expanded) .arcade-selector { padding:18px; gap:14px; }
#arcade-glass:is(:fullscreen,.expanded) .card-copy { padding:10px; }
#arcade-glass:is(:fullscreen,.expanded) .card-copy strong { font-size:20px; }
#arcade-glass:is(:fullscreen,.expanded) .card-copy small { display:block; color:#EBDDB3; font-size:12px; }
#arcade-glass:is(:fullscreen,.expanded) .arcade-status { padding:7px; font-size:12px; }
@media(max-width:760px) {
 .arcade-machine.screen-first { width:min(100%,540px); }
 body[data-world-loading="true"] .world-loading-arcade { padding:18px 0; }
 .arcade-navigation button { min-height:26px; padding:3px; font-size:9px; }
 .arcade-navigation #arcade-expand { font-size:8px; }
 .card-copy strong { font-size:10px; }
 .arcade-status { font-size:7px; }
 #arcade-glass:is(:fullscreen,.expanded) .arcade-navigation { flex-wrap:wrap; }
}

/* Zoom the same cabinet; keep its marquee in view and let its base extend below. */
body[data-world-loading="true"] .world-loading-arcade { justify-content:flex-start; overflow-x:hidden; }
.arcade-machine.screen-first { width:min(130%,1000px); max-width:none; }

/* Zoom the existing art; clip the unused cabinet base, never scroll the machine. */
body[data-world-loading="true"] .world-loading-arcade{overflow:hidden;padding:10px 8px;gap:4px}
.arcade-invitation h2{font-size:20px}.arcade-invitation p{margin:2px 0;font-size:11px}.arcade-invitation strong{display:none}
.arcade-machine.screen-first{width:min(175%,1400px,calc((100dvh - 72px)*1.47));max-width:none}
.arcade-navigation #arcade-expand{display:flex;align-items:center;justify-content:center;width:28px;height:25px;padding:4px;font-size:0}
.arcade-fullscreen-icon{width:16px;height:16px;display:block;fill:none;stroke:currentColor;stroke-width:2}
#arcade-glass:is(:fullscreen,.expanded) #arcade-expand{width:40px;height:40px}
#arcade-glass:is(:fullscreen,.expanded) .arcade-fullscreen-icon{width:22px;height:22px}
#arcade-glass.expanded{z-index:2147483647!important}
@media(max-width:760px){body[data-world-loading="true"] .world-loading{overflow:hidden;display:grid;grid-template-rows:100px minmax(0,1fr);grid-template-columns:1fr}body[data-world-loading="true"] .world-loading-info{min-height:0;padding:5px}body[data-world-loading="true"] .world-loading-info h1,body[data-world-loading="true"] .world-loading-info .world-loading-brand,body[data-world-loading="true"] .world-loading-info .world-loading-description{display:none}.arcade-machine.screen-first{width:min(195%,calc((100dvh - 230px)*1.47))}}

/* Clip rather than create a hidden scrollport: focusing a game must not move the cabinet. */
body[data-world-loading="true"] .world-loading,body[data-world-loading="true"] .world-loading-arcade{overflow:clip;overflow-anchor:none}

body[data-world-loading="true"] .world-loading-info,body[data-world-loading="true"] .world-loading-arcade{min-height:0;min-width:0}
@media(min-width:761px){body[data-world-loading="true"] .world-loading{grid-template-rows:minmax(0,1fr)}}

/* Brand-kit typography and breathing room around the existing cabinet. */
@font-face{font-family:PrairieManrope;src:url('/nine/assets/engine/assets/manrope.ttf') format('truetype');font-display:swap}
@font-face{font-family:PrairieBebas;src:url('/nine/assets/engine/assets/bebas-neue.woff2') format('woff2');font-display:swap}
body[data-world-loading="true"] .world-loading-arcade{padding:18px 24px 0;gap:12px;background:radial-gradient(ellipse at 50% 35%,#e9e5d9,#c6c8b9)}
.arcade-machine.screen-first{width:min(145%,1240px,calc((100dvh - 100px)*1.30))}
.arcade-cabinet-art{filter:sepia(.65) saturate(.65)}
.arcade-invitation h2{font-family:PrairieBebas,sans-serif;font-weight:400;letter-spacing:.035em;font-size:26px}
.arcade-invitation p,.arcade-navigation button,.arcade-status{font-family:PrairieManrope,sans-serif}
.card-copy strong{font-family:PrairieBebas,sans-serif;font-weight:400;letter-spacing:.035em;font-size:16px}
.arcade-navigation button:focus-visible{outline-color:#CCA43B}
@media(max-width:760px){body[data-world-loading="true"] .world-loading-arcade{padding:14px 16px 0;gap:8px}.arcade-machine.screen-first{width:min(155%,calc((100dvh - 242px)*1.30))}.arcade-invitation h2{font-size:23px}}

/* Retain the cabinet scale, lift it slightly beneath the two-line invitation. */
body[data-world-loading="true"] .world-loading-arcade { padding-top:10px;gap:4px; }
.arcade-invitation p { margin:4px 0 0;font-size:13px; }
