/* The stages around the bouts (stage-director.mjs): the tournament grounds and the keepers' camp. Each is
   a world on its own canvas over the game's (like the main menu's jar), with its interface in a shadow
   root above (#stage-ui, styled from inside). This sheet places the canvases and the loading veil, and
   keeps the game's top bar to its tools while a stage shows. */
canvas.stage-world{position:fixed;inset:0;width:100%;height:100%;display:block;z-index:2;opacity:0;pointer-events:none;transition:opacity .9s cubic-bezier(.4,0,.2,1)}
canvas.stage-world.visible{opacity:1}
body.reduced-motion canvas.stage-world{transition-duration:.12s}

/* while a stage loads: its still (the grounds' empty pavilion) or plain dusk, the word, a gilt line */
.stage-veil{position:fixed;inset:0;z-index:4;display:grid;place-content:end center;padding-bottom:clamp(28px,6.5vh,120px);background:#140d09;
 opacity:0;pointer-events:none;transition:opacity .8s cubic-bezier(.4,0,.2,1)}
.stage-veil.up{opacity:1;pointer-events:auto}
.stage-veil img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}
.stage-veil img[hidden]{display:none}
.stage-veil p{position:relative;z-index:1;margin:0 0 .9em;text-align:center;font:italic 400 clamp(13px,.86vw,32px)/1.3 "Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;letter-spacing:.03em;color:#e9e2c6;text-shadow:0 1px 10px rgba(0,0,0,.95)}
.stage-veil .bar{position:relative;z-index:1;justify-self:center;display:block;width:clamp(150px,12vw,480px);height:1px;background:linear-gradient(90deg,transparent,rgba(232,193,122,.3) 18%,rgba(232,193,122,.3) 82%,transparent)}
.stage-veil .bar span{display:block;height:1px;width:calc(var(--progress,0) * 100%);background:linear-gradient(90deg,rgba(232,193,122,0),#e8c17a 40%,#fff3cf);box-shadow:0 0 9px rgba(255,214,140,.7);transition:width .45s ease}
body.reduced-motion .stage-veil{transition-duration:.15s}

/* the stage's interface host (its look lives in its shadow root) */
#stage-ui[hidden]{display:none}

/* a stage brings its own headings: the top bar keeps only its tools (and a running clock) */
body.stage-active .topbar .brand,body.stage-active .topbar .room-tag,body.stage-active .topbar .top-center .eyebrow{visibility:hidden}
body.stage-active .topbar .top-tools .icon-button{background:linear-gradient(180deg,rgba(14,19,30,.88),rgba(5,8,15,.93));border:1px solid rgba(232,193,122,.32);border-radius:2px;box-shadow:inset 0 0 0 2px rgba(3,5,10,.62);color:#e8c17a}
body.stage-active .topbar .top-tools .icon-button:hover{border-color:#e8c17a;color:#fff3cf}
body.stage-active .world-shade{opacity:0}

/* Desktop only: below a landscape window of 1000 by 560 CSS pixels the game asks for more room (zoomed windows too) */
.window-note{display:none}
@media (max-width:999px),(max-height:559px),(max-aspect-ratio:1/1){
 .window-note{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at 50% 40%,#141c2e,#06090f 75%);color:#f4ead2;font-family:"Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;text-align:center}
 .window-note>div{max-width:30em;padding:1.6em 2em;background:linear-gradient(180deg,rgba(14,19,30,.9),rgba(5,8,15,.94));border:1px solid rgba(232,193,122,.45);border-radius:2px;box-shadow:inset 0 0 0 3px rgba(3,5,10,.62),0 18px 40px rgba(0,0,0,.5)}
 .window-note .kicker{margin:0;font-size:11px;font-weight:500;line-height:1.2;letter-spacing:.42em;text-transform:uppercase;color:#a6a08c}
 .window-note h2{margin:.25em 0 .4em;font-size:30px;font-weight:400;line-height:1.1;background:linear-gradient(176deg,#fff6d8,#f3d695 30%,#cf9a52 55%,#f7dfa0 70%,#b07a3a);-webkit-background-clip:text;background-clip:text;color:transparent}
 .window-note p:last-child{margin:0;font-size:15px;font-style:italic;line-height:1.5;color:#d8ccae}
}
