.game-view-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.game-fullscreen-button{white-space:nowrap}
.game-rotation-hint{display:none;margin:0 0 10px;color:#bdcec2;font-size:12px}
body:has(.game-presentation){overflow:hidden}
.game-presentation{
 position:fixed;inset:0;z-index:5000;overflow:auto;overscroll-behavior:contain;
 background:#0e1517;color:#ecf4e8;animation:none!important;
 padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
}
.game-presentation>.page{animation:none!important}
.game-presentation .game-fullscreen-button{
 position:fixed;z-index:20;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));
 min-height:40px;background:#19292a;color:#edf9e9;border-color:#9cc79880;padding:7px 12px;
}
.game-presentation .game-view-tools{margin-right:150px}

@media(max-width:760px){
 .game-view-tools{gap:5px}
 .game-view-tools>button{padding:7px 9px;min-height:40px;font-size:11px}
 .journey-heading,.backpack-head{flex-wrap:wrap;row-gap:8px}
 .rescue-node{min-width:30px;min-height:25px}
 .game-presentation .game-view-tools{margin-right:0}
 .game-presentation :is(.journey-heading,.backpack-head){padding-top:34px}
}
@media(max-width:760px) and (orientation:portrait){
 .game-rotation-hint{display:block}
}
@media(orientation:landscape) and (max-height:600px) and (max-width:1100px){
 .journey-page:not(.is-finished) .journey-layout,.rescue-layout,.backpack-layout{
  grid-template-columns:minmax(0,1fr) clamp(166px,29vw,260px);
  gap:10px;
 }
 .journey-page .journey-camera{--visible:16;max-width:100%}
 .journey-page .journey-track{transform:translateX(calc(var(--camera) * -100% / 160))}
 .journey-page .journey-look,.journey-page .journey-quick,.journey-page .journey-back-to-world{display:none}
 .rescue-layout .rescue-pack{grid-row:auto}
 .journey-layout .journey-inventory,.rescue-layout .journey-inventory{grid-template-columns:repeat(4,minmax(0,1fr))}
 .journey-layout .journey-slot,.rescue-layout .journey-slot{min-height:38px}
 .backpack-inventory{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:10px}
 .backpack-inventory .backpack-slot{height:auto;min-height:32px;aspect-ratio:1;padding:4px}
 .backpack-inventory .backpack-slot img{width:100%;height:100%}
 .backpack-inventory .backpack-slot img[src$="/prismarine.png"]{height:auto}
 .backpack-workbench,.journey-layout .journey-pack{padding:10px}
 .rescue-foot{flex-wrap:nowrap}.rescue-foot .journey-next{width:auto;margin-left:auto}
 .backpack-status,.journey-message{height:auto;min-height:23px;padding:3px 0}
 .backpack-input-tip{min-height:0}

 .game-presentation :is(.journey-page,.backpack-page){margin:0 auto;padding:0 3px 8px}
 .game-presentation :is(.journey-heading,.backpack-head){min-height:0;height:0;margin:0;padding:0}
 .game-presentation :is(.journey-heading,.backpack-head)>div:first-child,
 .game-presentation .game-view-tools>button:not([data-game-fullscreen]),
 .game-presentation :is(.journey-story-chapters,.journey-chapters,.game-rotation-hint,.journey-credit,.backpack-credit){display:none}
 .game-presentation .backpack-shell,.game-presentation .journey-play{padding:9px 10px}
 .game-presentation .journey-quest,.game-presentation .backpack-mission,.game-presentation .rescue-quest{
  min-height:0;margin-bottom:8px;padding-right:144px;
 }
 .game-presentation .journey-quest h2,.game-presentation .backpack-mission h2,.game-presentation .rescue-quest h2{font-size:18px;margin:3px 0}
 .game-presentation .backpack-mission{padding:40px 0 0}
 .game-presentation .backpack-level-picker{width:min(100%,290px)}
 .game-presentation .journey-quest .journey-objective{font-size:13px;margin:4px 0;padding-left:7px}
 .game-presentation .journey-quest .journey-objective-detail{font-size:11px;margin-bottom:3px;padding-left:10px}
 .game-presentation :is(.journey-camera,.rescue-camera){
  width:min(100%,max(250px,calc((100dvh - 115px) * 16 / 9)));margin-inline:auto;
 }
 .game-presentation .journey-camera{
  width:min(100%,max(236px,calc((100dvh - 145px) * 16 / 9)));
 }
 .game-presentation .backpack-world{
  width:min(100%,max(236px,calc((100dvh - 158px) * 8 / 5)));margin-inline:auto;
 }
 .game-presentation :is(.rescue-foot,.journey-route-actions){margin-top:4px;min-height:32px}
 .game-presentation .journey-next{min-width:108px;min-height:34px;padding:6px 9px}
 .game-presentation .backpack-objective{margin-top:5px}
}

/* Keep the chapter's live world mounted while changing its presentation. */
.game-presentation:has(>.journey-page :is(.journey-layout,.rescue-layout,.siege-layout)):not(:has(>.is-finished)){
 padding:0;
 overflow:hidden;
}
.game-presentation>.journey-page:has(>:is(.journey-layout,.rescue-layout,.siege-layout)):not(.is-finished){
 --journey-rail:clamp(155px,23vw,300px);
 --journey-inset:clamp(8px,1.5vw,24px);
 --journey-outline:1px 1px #15201c,-1px 1px #15201c,1px -1px #15201c,-1px -1px #15201c,0 2px 5px #101611;
 width:100%;
 max-width:none;
 height:100%;
 margin:0;
 padding:0;
}
.game-presentation>.journey-page:has(>:is(.journey-layout,.rescue-layout,.siege-layout)):not(.is-finished)>:not(.journey-heading,.journey-layout,.rescue-layout,.siege-layout),
.game-presentation>.journey-page:has(>:is(.journey-layout,.rescue-layout,.siege-layout)):not(.is-finished) .journey-heading>:first-child,
.game-presentation>.journey-page:has(>:is(.journey-layout,.rescue-layout,.siege-layout)):not(.is-finished) .game-view-tools>button:not([data-game-fullscreen]){
 display:none;
}
.game-presentation>.journey-page:has(>:is(.journey-layout,.rescue-layout,.siege-layout)):not(.is-finished) .journey-heading{
 position:absolute;
 height:0;
 margin:0;
 padding:0;
}
.game-presentation>.journey-page:not(.is-finished)>:is(.journey-layout,.rescue-layout,.siege-layout){
 display:grid;
 grid-template-columns:minmax(0,1fr) var(--journey-rail);
 gap:0;
 height:100%;
 align-items:stretch;
}
.game-presentation .journey-page:not(.is-finished) :is(.journey-layout,.rescue-layout,.siege-layout)>.journey-play{
 position:relative;
 padding:0;
 border:0;
 border-radius:0;
 min-height:0;
}
.game-presentation .journey-page:not(.is-finished) .journey-play>:is(.journey-camera,.rescue-camera,.siege-camera){
 --visible:16;
 width:100%;
 max-width:none;
 height:100%;
 aspect-ratio:auto;
 border:0;
 border-radius:0;
 container-type:inline-size;
}
.game-presentation .journey-page:not(.is-finished) :is(.journey-actor,.rescue-hero,.siege-hero)>.journey-person:first-child{
 position:absolute;
 bottom:0;
 height:min(100%,13cqw);
}
.game-presentation .journey-page:not(.is-finished) .journey-play>.journey-camera .journey-track{
 transform:translateX(calc(var(--camera) * -100% / 160));
}
.game-presentation .journey-page:not(.is-finished) .journey-play>:is(.journey-quest,.rescue-quest,.siege-quest){
 position:absolute;
 z-index:12;
 top:max(var(--journey-inset),env(safe-area-inset-top));
 left:max(var(--journey-inset),env(safe-area-inset-left));
 right:var(--journey-inset);
 min-height:0;
 margin:0;
 padding:0;
 background:none;
 pointer-events:none;
 text-shadow:var(--journey-outline);
}
.game-presentation .journey-page:not(.is-finished) .journey-play>:is(.journey-quest,.rescue-quest,.siege-quest) h2{
 margin:3px 0;
 font-size:clamp(15px,2.3vmin,29px);
 line-height:1.15;
}
.game-presentation .journey-page:not(.is-finished) .journey-play>:is(.journey-quest,.rescue-quest,.siege-quest) p:not(.eyebrow){
 margin:3px 0 0;
 padding:0;
 border:0;
 color:#f7fff2;
 font-size:clamp(12px,1.9vmin,17px);
 line-height:1.3;
}
.game-presentation .journey-page:not(.is-finished) .journey-play>:is(.journey-quest,.rescue-quest,.siege-quest) :is(.eyebrow,span){
 font-size:clamp(8px,1.45vmin,11px);
}
.game-presentation .journey-page:not(.is-finished) .journey-play>.minecraft-hints{
 position:absolute;
 z-index:14;
 bottom:calc(max(var(--journey-inset),env(safe-area-inset-bottom)) + 48px);
 left:max(var(--journey-inset),env(safe-area-inset-left));
 width:min(420px,calc(100% - 2 * var(--journey-inset)));
 max-height:55%;
 overflow:auto;
 margin:0;
 background:#102017ed;
}
.game-presentation .journey-page:not(.is-finished) .journey-play>.minecraft-hints:not([open]){
 width:max-content;
 max-width:calc(100% - 2 * var(--journey-inset));
}
.game-presentation .journey-page:not(.is-finished) .journey-play>:is(.journey-route-actions,.rescue-foot,.siege-status){
 position:absolute;
 z-index:12;
 left:max(var(--journey-inset),env(safe-area-inset-left));
 right:var(--journey-inset);
 bottom:max(var(--journey-inset),env(safe-area-inset-bottom));
 min-height:0;
 margin:0;
 pointer-events:none;
 text-shadow:var(--journey-outline);
}
.game-presentation .journey-page:not(.is-finished) .journey-play>:is(.journey-route-actions,.rescue-foot,.siege-status) button{
 pointer-events:auto;
}
.game-presentation .journey-page:not(.is-finished) .journey-play :is(.journey-look,.journey-quick),
.game-presentation .journey-pack .journey-back-to-world{
 display:none;
}
.game-presentation .journey-page :is(.journey-layout,.rescue-layout,.siege-layout)>.journey-pack{
 min-height:0;
 grid-row:auto;
 overflow:auto;
 overscroll-behavior:contain;
 border:0;
 border-left:1px solid var(--j-border);
 border-radius:0;
 padding:max(55px,calc(env(safe-area-inset-top) + 48px)) max(9px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) 9px;
 scrollbar-width:thin;
}
@media(max-height:620px),(max-width:760px){
 .game-presentation .journey-pack .journey-inventory{grid-template-columns:repeat(5,minmax(0,1fr));min-height:0}
 .game-presentation .journey-pack .journey-slot{min-height:0;padding:3px}
 .game-presentation .journey-pack .journey-craft-grid{flex:0 1 142px}
 .game-presentation .journey-pack .journey-crafting{gap:5px;margin:0}
 .game-presentation .journey-pack .journey-craft-output{width:19%;font-size:16px}
 .game-presentation .journey-pack .journey-recipes>div{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(orientation:portrait) and (max-width:760px){
 .game-presentation>.journey-page:has(>:is(.journey-layout,.rescue-layout,.siege-layout)):not(.is-finished){--journey-rail:clamp(116px,36vw,175px)}
 .game-presentation .journey-page .game-fullscreen-button{max-width:calc(var(--journey-rail) - 12px);white-space:normal;font-size:11px}
 .game-presentation .journey-pack .journey-inventory{grid-template-columns:repeat(4,minmax(0,1fr))}
 .game-presentation .journey-page:not(.is-finished) .journey-route-actions{grid-template-columns:auto minmax(0,1fr);gap:4px}
 .game-presentation .journey-page:not(.is-finished) .journey-route-actions>:is(.journey-next,.journey-food){grid-column:2;max-width:100%;min-width:0}
 .game-presentation .journey-page:not(.is-finished) .journey-play>.minecraft-hints{bottom:calc(max(var(--journey-inset),env(safe-area-inset-bottom)) + 92px)}
}
