/* Design space and image slices follow build_patcher_scene (1672 × 941). */
#game-editor{position:fixed;left:max(8px,env(safe-area-inset-left));top:max(8px,env(safe-area-inset-top));width:2px;height:2px;font:16px system-ui;opacity:0;pointer-events:none;border:0;padding:0}
html:not([data-interface=mobile]) #game-editor{display:none}
#rotate-screen{position:fixed;inset:0;z-index:4;display:grid;place-items:center;text-align:center;background:#171411;color:#e8dcc7;padding:24px}
#rotate-screen img{object-fit:contain}
#rotate-screen h1{font:500 clamp(23px,5vw,32px) Georgia,serif;margin:20px 0 8px}
#rotate-screen p{margin:0 0 24px;color:#c1b8aa}
#rotate-play,#install-tip button{font:inherit;color:#f1e4c9;cursor:pointer}
#rotate-play{border:1px solid #827150;background:#30291f;border-radius:5px;padding:12px 18px}
#install-tip{position:fixed;z-index:5;bottom:max(10px,env(safe-area-inset-bottom));left:max(10px,env(safe-area-inset-left));max-width:min(290px,80vw);border:1px solid #706047;border-radius:6px;background:#211d18f7;color:#eee2ca;box-shadow:0 2px 8px #0005}
#install-tip button{min-height:40px;border:0;background:transparent}
#install-tip #fullscreen-game{padding:8px 10px;font-weight:600}
#install-tip #fullscreen-game{color:#f5dfaa;border-left:1px solid #635641}
#install-tip #dismiss-install{min-width:40px;vertical-align:top;font-size:19px;color:#d3c5b3}
#install-tip:not([hidden]){display:flex;align-items:center;max-width:calc(100vw - 28px);white-space:nowrap}
#install-tip #dismiss-install{flex:0 0 40px;align-self:stretch}
html[data-editing=true] #install-tip{display:none}
html[data-playing=true] #install-tip{bottom:auto;top:max(8px,var(--game-safe-top))}
html[data-launch=install] #entry-patcher{display:none}
#install-screen{position:absolute;inset:0;z-index:6;display:grid;justify-items:center;align-items:safe center;overflow:auto;overscroll-behavior:contain;box-sizing:border-box;padding:max(12px,env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(22px,env(safe-area-inset-left));background:linear-gradient(#100e0bd9,#100e0bf2),url(entry-art/backdrop.webp) center/cover;color:#f0e4d1;text-align:center}
.install-card{width:min(100%,420px);margin:auto}
.install-card img{width:auto;height:clamp(45px,14vh,90px);object-fit:contain}
.install-card h1{font:500 clamp(23px,5vw,32px) Georgia,serif;margin:8px 0 14px}
.install-card p{line-height:1.5;margin:10px 0;color:#ded1bf}
.install-card summary{display:list-item;width:fit-content;margin:auto;cursor:pointer;line-height:44px;color:#f1dfc0}
#install-game{font:600 15px system-ui;min-height:44px;margin:5px 0;padding:8px 20px;border:1px solid #ab9369;border-radius:5px;color:#f9edda;background:#3c3021}
#entry-patcher{position:absolute;inset:0;z-index:1;overflow:hidden;color:#ffe5b4;
  background:#1b1116 url(entry-art/backdrop.webp) center/cover no-repeat;
  font-family:Georgia,"Times New Roman",serif;text-shadow:0 1px 3px #150907,0 1px 1px #150907}
.entry-layout{position:absolute;inset:0;margin:auto;width:min(100%,177.68vh);height:min(100%,56.28vw);
  container-type:inline-size}
.entry-brand{position:absolute;top:3.61%;width:100%;text-align:center}
.entry-brand img{display:block;width:35.4%;height:auto;aspect-ratio:8/3;object-fit:contain;margin:0 auto}
.entry-brand p{margin:1.05% 0 0;font-size:clamp(16px,2.22cqw,42px);color:#ffe7bd;letter-spacing:.025em}
.entry-quiet{position:absolute;inset:auto 0 max(7%,env(safe-area-inset-bottom));margin:0;text-align:center;
  font-size:clamp(14px,1.5cqw,27px);text-shadow:0 1px 4px #000,0 0 12px #000}
.entry-panel{position:absolute;box-sizing:border-box;left:3.89%;right:3.89%;bottom:4.89%;height:30.82%;
  padding:2.2cqw 4.7cqw 1.65cqw;display:none;flex-direction:column;justify-content:center;
  font-size:clamp(12px,1.52cqw,28px);font-variant-numeric:tabular-nums;isolation:isolate}
.entry-panel::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  border-image:url(entry-art/frame.webp) 28 39 fill / 1.68cqw 2.34cqw / 0 stretch}
#entry-patcher:is([data-view=download],[data-view=error]) .entry-panel{display:flex}
#entry-patcher:is([data-view=download],[data-view=error]) .entry-quiet{display:none}
.entry-heading{display:flex;align-items:center;gap:2.35cqw;margin-bottom:1.15cqw;min-width:0}
.entry-heading img{width:4.3cqw;height:4.3cqw;flex:none}
.entry-heading h1{font-size:clamp(19px,2.47cqw,46px);font-weight:500;margin:0;line-height:1.12}
.entry-heading p{font-size:clamp(12px,1.55cqw,27px);color:#cfb697;margin:.26em 0 0;line-height:1.12}
.entry-details{display:flex;align-items:center;justify-content:space-between;gap:2cqw}
.entry-meters{flex:1;display:grid;grid-template-columns:max-content minmax(40px,1fr) minmax(8.4em,max-content);
  align-items:center;column-gap:1.25cqw;row-gap:.72cqw;color:#ead3ae}
.entry-track{position:relative;box-sizing:border-box;height:clamp(7px,1.27cqw,23px);overflow:hidden;
  border:1px solid #9a7545;background:#170d0c;box-shadow:inset 0 1px 4px #0a0504}
.entry-track::before{content:"";position:absolute;inset:0;background:url(entry-art/tracks.webp) top/100% 200%;
  clip-path:inset(0 var(--unfilled,100%) 0 0)}
.entry-track.gold::before{background-position:bottom}
.entry-count{display:grid;justify-items:center;align-content:center;min-width:15%;padding-left:2cqw;
  border-left:1px solid #80563388;color:#cdb494}
.entry-count strong{font-size:clamp(24px,3.1cqw,56px);line-height:1;color:#f6cf86;font-weight:500}
.entry-count span{margin-top:.3em;font-size:.85em;text-align:center}
.entry-timing{display:flex;gap:1.8cqw;min-height:1.15em;margin-top:1cqw;font-size:.86em;color:#cbb395}
.entry-retry{display:none;align-self:flex-start;color:#fff0cf;padding:.45em 1.6em;text-decoration:none;
  border:1px solid #b69360;background:#39251b;box-shadow:inset 0 1px #f5d59945}
.entry-retry:is(:focus-visible,:hover){outline:2px solid #f4cc86;outline-offset:2px}
#entry-patcher[data-view=error] :is(.entry-details,.entry-timing){display:none}
#entry-patcher[data-view=error] .entry-retry{display:block}
@media (max-aspect-ratio:1/1){
  .entry-layout{width:100%;height:100%}
  .entry-brand{top:max(9%,env(safe-area-inset-top))}
  .entry-brand img{width:min(77%,550px)}
  .entry-brand p{font-size:clamp(18px,4.6cqw,30px)}
  .entry-panel{left:3%;right:3%;bottom:max(5%,env(safe-area-inset-bottom));height:auto;padding:7cqw 6cqw;font-size:clamp(13px,3.3cqw,20px)}
  .entry-panel::before{border-image-width:17px 24px}
  .entry-heading{gap:3cqw;margin-bottom:5cqw}.entry-heading img{width:10cqw;height:10cqw}
  .entry-heading h1{font-size:clamp(22px,5.7cqw,34px)}.entry-heading p{font-size:1em;margin-top:.35em}
  .entry-details{display:block}.entry-meters{grid-template-columns:max-content minmax(28px,1fr) max-content;gap:.65em}
  .entry-count{margin-top:1em;padding:0;border:0;display:flex;align-items:baseline;gap:.6em}
  .entry-count strong{font-size:1.45em}.entry-count span{margin:0}
  .entry-timing{margin-top:.7em;gap:1.2em}.entry-quiet{font-size:1rem}
}
@media (orientation:landscape) and (max-height:450px){
  .entry-panel{left:max(2%,env(safe-area-inset-left));right:max(2%,env(safe-area-inset-right));height:auto;
    padding:2.4cqw 4cqw;bottom:max(2%,env(safe-area-inset-bottom))}
  .entry-heading{margin-bottom:1cqw}.entry-heading h1{font-size:clamp(17px,2.3cqw,24px)}
}

.data-dialog{box-sizing:border-box;width:min(420px,94vw);max-height:92dvh;overflow:auto;border:1px solid #8c744a;border-radius:8px;background:#1b1917;color:#f0e8d9;padding:clamp(16px,3vh,26px);font:15px/1.4 system-ui;cursor:auto}
.data-dialog::backdrop{background:#100f0de3}
.data-dialog h2{margin:0 0 8px;font:600 23px Georgia,serif;color:#f2d69b}
.data-dialog p{margin:0 0 16px;color:#d3c9b8}
.data-dialog fieldset{border:0;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:5px 9px}
.data-dialog legend{font-weight:600;margin-bottom:6px}
.data-dialog label{display:flex;align-items:center;gap:7px;min-height:36px}
.data-dialog input{accent-color:#cdaa69}
.data-dialog footer{display:flex;align-items:stretch;gap:8px;margin-top:20px}
.data-dialog button{font:inherit;cursor:pointer;background:#302a23;border:1px solid #837154;border-radius:5px;color:#f2e5cb;padding:8px 12px}
.data-dialog button[type=submit]{background:#d2b578;color:#191612}

.data-dialog{width:min(470px,94vw);border-radius:15px;box-shadow:0 18px 60px #0009}
.data-dialog .data-modes{margin-bottom:15px}
.data-dialog label{padding:6px 9px;cursor:pointer;border-radius:6px;background:#262422}
.data-modes label:has(:checked){color:#f3d494;box-shadow:inset 0 0 0 1px #c3a66d}
.data-dialog fieldset[hidden]{display:none}
.data-dialog footer{justify-content:flex-end}
.install-card img{max-width:min(240px,62vw)}
