:root{color-scheme:light;--ink:#253d36;--paper:#f5f5ed;--line:#ccd3c6;--leaf:#365d45;--accent:#bd8a4c;--font-body:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--font-heading:Georgia,serif;--host-height:100dvh;--scene-height:clamp(350px,calc(var(--host-height) - 201px),604px);font-family:var(--font-body);font-size:16px;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}body{margin:0}button,input,a{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{font:inherit;color:inherit;background:#fffef9;border:1px solid var(--line);border-radius:9px;min-height:44px;padding:9px 13px;cursor:pointer}button:hover{background:#e8eee3}button:active{transform:translateY(1px)}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.primary{background:var(--leaf);color:white;border-color:var(--leaf)}.primary:hover{background:#284b36}p{line-height:1.45;margin:0 0 .7em}h1,h2{font-family:var(--font-heading);margin:0}h1{font-size:clamp(1.25rem,2vw,1.65rem)}h2{font-size:1.25rem}img{max-width:100%}[hidden]{display:none!important}.game{max-width:1640px;margin:auto;padding:12px 18px}.masthead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.eyebrow{font-size:.63rem;letter-spacing:.15em;margin-bottom:3px;font-weight:750}.tools{display:flex;gap:6px}.tools button:first-child{width:44px;padding:0;font-size:1.2rem;font-weight:700}.play-layout{display:grid;grid-template-columns:minmax(0,1fr) 224px;gap:16px}.scene-heading{height:35px;display:flex;align-items:start;justify-content:space-between;gap:10px}.scene-heading h2{font-size:1.05rem}.scene-heading span{font-size:.6rem;letter-spacing:.1em;padding-top:4px}.stage-wrap{position:relative;max-width:calc(var(--scene-height) + var(--scene-height) + var(--scene-height));margin-inline:auto;border-radius:12px;overflow:hidden;border:1px solid #afbdae;background:#d8e2d1}.stage{height:var(--scene-height);overflow:hidden;overflow:clip;position:relative;touch-action:pan-y;cursor:crosshair;isolation:isolate}.world{position:absolute;left:0;top:0;will-change:transform;transform-origin:0 0}.scene-bg{position:absolute;inset:0;width:100%;height:100%;max-width:none;pointer-events:none;user-select:none}.prop{position:absolute;object-fit:contain;pointer-events:none;user-select:none;z-index:2}.actor{position:absolute;width:auto;max-width:none;object-fit:contain;transform-origin:50% 100%;pointer-events:none;z-index:3;user-select:none;filter:drop-shadow(1px 2px 1px #2836293b)}.destination{position:absolute;width:22px;height:7px;transform:translate(-50%,-50%);border:2px solid white;box-shadow:0 0 0 2px #365d4577;border-radius:50%;z-index:4;pointer-events:none}.hotspot{position:absolute;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:8px;background:transparent!important;padding:0;min-width:44px;min-height:44px;z-index:5;cursor:pointer}.hotspot:active{transform:translate(-50%,-50%)}.hotspot:hover,.hotspot:focus-visible{border-color:#fcfcdf;background:#fff7cc22!important;box-shadow:0 0 0 2px #304c4b5a}.hotspot-label{display:none;position:absolute;left:50%;bottom:100%;transform:translateX(-50%);max-width:180px;width:max-content;border-radius:6px;padding:5px 9px;background:#253d36f2;color:white;font-size:.78rem;line-height:1.25;pointer-events:none}.hotspot:hover .hotspot-label,.hotspot:focus-visible .hotspot-label{display:block}.markers .hotspot{border:1.5px dashed #fffce7;background:#3a685526!important}.markers .hotspot::after,.exit-hotspot::after{content:'•';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#ffffffde;color:#304b3b;border:1px solid #617759;border-radius:50%;width:24px;height:24px;text-align:center;line-height:21px;font-size:22px}.exit-hotspot::after{content:'↗';font-size:17px}.tutorial-target{border:2px dashed #fffade;background:#ffef951a!important;box-shadow:0 0 0 2px #3257445a}.walk-controls{position:relative;padding:6px 10px;background:#e4eadf;min-height:56px;display:flex;align-items:center;justify-content:space-between;gap:8px;pointer-events:none;z-index:6}.walk-controls button{pointer-events:auto;width:48px;background:#f8faefed;font-size:1.3rem;box-shadow:0 2px 6px #293c3c22}.walk-controls span{font-size:.65rem;background:#fffef1dc;border-radius:20px;padding:5px 10px;color:#2c4434;pointer-events:none}.controls{padding-top:35px;display:flex;flex-direction:column;gap:10px;max-height:calc(var(--scene-height) + 91px);overflow:auto;scrollbar-width:thin}.objective{font-size:.88rem;font-weight:700;margin:0;padding-bottom:10px;border-bottom:1px solid var(--line)}.interaction{background:#e7ede1;border-radius:10px;padding:10px;font-size:.87rem}#feedback{margin:0;min-height:2.5em}.inventory{margin-top:auto}.inventory-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}.inventory-heading h2{font:700 .88rem var(--font-body)}.inventory-heading span{font-size:.72rem}.inventory-items{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.item,.empty-slot{padding:5px 2px;min-width:0;min-height:84px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:9px;font-size:.65rem;text-align:center;line-height:1.15}.item img{width:45px;height:42px;object-fit:contain;margin-bottom:4px}.item[aria-pressed=true]{border:2px solid #365d45;background:#dfead5}.empty-slot{border:1px dashed var(--line);color:#677461;font-size:.6rem}.selected-detail{margin-top:8px;font-size:.8rem}.selected-detail>p{font-size:.75rem;margin:4px 0}.selected-actions{display:flex;flex-wrap:wrap;gap:5px}.selected-actions button{font-size:.76rem;padding:7px 9px}.inventory-tip{font-size:.7rem;color:#586452;margin:7px 0}.scene-description{font-size:.72rem;color:#64715e;margin:0}.tutorial{border-left:3px solid #bd8a4c;padding:5px 0 5px 9px;font-size:.77rem}.tutorial p{margin:4px 0 0}.tutorial-heading,.repair-heading{display:flex;align-items:center;justify-content:space-between;gap:5px}.tutorial-heading button,.repair-heading button{font-size:.68rem;padding:3px 6px;min-height:36px}.repair-heading{margin-top:12px;border-top:1px solid var(--line);padding-top:8px}.repair-steps{padding-left:20px;font-size:.78rem;margin:8px 0}.repair-steps .done{color:#5c7259}.repair-steps .current{font-weight:750}.repair-actions{display:flex;gap:5px;flex-wrap:wrap}.repair-actions button{font-size:.75rem;padding:7px}.muted{font-size:.8rem;color:#5a6758}.image-warning{padding:10px;background:#f7e6cf;border-radius:8px;font-size:.8rem;margin-top:8px}footer{font-size:.65rem;text-align:center;color:#68765f;margin:10px 0 1px}dialog{border:1px solid var(--line);border-radius:16px;max-width:560px;width:calc(100% - 28px);max-height:calc(100dvh - 28px);padding:0;color:var(--ink);background:var(--paper);box-shadow:0 12px 60px #10291e44}dialog::backdrop{background:#172c25a6}.dialog-content{padding:25px}.dialog-content h2{font-size:1.55rem;margin-bottom:15px}.dialog-content p{font-size:.94rem}.dialog-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:17px}.dialog-content .howto{background:#e7ede1;padding:13px;border-radius:8px;font-size:.88rem}.dialog-content .save-note{font-size:.7rem;color:#64715e;margin-top:14px}.setting{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:52px;border-bottom:1px solid var(--line);font-size:.87rem}.setting input{width:23px;height:23px;accent-color:var(--leaf)}#detail-body img{max-height:48vh;object-fit:contain;display:block;margin:0 auto 12px}#detail-close{margin-top:12px}.ending-goat{width:115px;max-height:150px;object-fit:contain;float:right;margin:0 0 12px 15px}#ending-link a{display:inline-block;color:var(--leaf);padding:10px 0}.bench-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.bench-item img{display:block;width:70px;height:60px;object-fit:contain;margin:auto}.bench-item{font-size:.8rem}#storage button{font-size:.72rem;width:100%;margin-top:5px}.reduced *{scroll-behavior:auto!important;animation:none!important;transition:none!important}
@media(max-width:800px){.game{padding:9px}.masthead{margin-bottom:6px}.eyebrow{font-size:.57rem}h1{font-size:1.25rem}.tools button{font-size:.75rem}.play-layout{display:block}.scene-heading{height:28px}.game{--scene-height:clamp(330px,calc(var(--host-height) * .54),470px)}.controls{padding-top:9px;display:grid;grid-template-columns:1fr;gap:8px;max-height:none;overflow:visible}.objective{font-size:.8rem;padding-bottom:6px}.inventory{grid-row:2}.inventory-items{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.item,.empty-slot{min-height:72px;flex-direction:column;gap:3px;font-size:.64rem}.item img{width:31px;height:34px;margin:0}.inventory-heading{margin-bottom:4px}.scene-description{display:none}.interaction{font-size:.82rem}.tutorial{font-size:.76rem}.selected-detail p{display:none}.selected-detail>strong{display:none}.selected-actions{justify-content:flex-end}.inventory-tip{font-size:.69rem}.walk-controls span{font-size:.59rem}.dialog-content{padding:20px}.hotspot-label{font-size:.73rem;max-width:140px}footer{margin-top:7px}}
@media(max-height:520px) and (min-width:650px){.game{padding:7px}.masthead{margin-bottom:3px}.eyebrow{display:none}.scene-heading{height:25px}.game{--scene-height:max(190px,calc(var(--host-height) - 151px))}.play-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:10px}.controls{display:flex;max-height:calc(var(--host-height) - 70px);overflow:auto;padding-top:25px}.scene-description,footer,.walk-controls span{display:none}.inventory-items .item{flex-direction:column}.objective{font-size:.76rem}}

/* Scene guidance: guidance belongs to the scene. The side panel holds objects only. */
.visual-shell{position:relative}.scene-hud{position:absolute;z-index:7;left:12px;top:12px;max-width:min(470px,calc(100% - 24px));pointer-events:none;filter:drop-shadow(0 2px 5px #10251d22)}
.scene-hud .objective{display:table;max-width:100%;border:0;border-radius:8px 8px 0 0;background:var(--leaf);color:#fff;padding:7px 11px;font-size:.76rem;line-height:1.3;font-weight:700;margin:0}
.scene-hud #feedback{min-height:0;background:var(--paper);color:var(--ink);border-radius:0 8px 8px 8px;padding:8px 11px;font-size:.8rem;line-height:1.35;max-width:100%;margin:0}
.scene-hud #feedback:empty{display:none}.tutorial{position:absolute;left:12px;bottom:12px;z-index:8;max-width:min(350px,calc(100% - 24px));padding:10px 12px;background:var(--paper);box-shadow:0 3px 18px #162a252e;border-left:3px solid var(--accent);border-radius:8px;color:var(--ink)}
.tutorial p{font-size:.79rem;margin:0 0 6px}.coach-actions{display:flex;flex-wrap:wrap;gap:6px}.coach-actions button{font-size:.7rem;padding:6px 9px;min-height:36px}.repair-overlay{position:absolute;right:12px;top:100px;z-index:9;max-width:310px;width:calc(100% - 24px);max-height:calc(var(--scene-height) - 112px);overflow:auto;padding:10px 14px;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:10px;box-shadow:0 3px 20px #20382c2b}.repair-heading{margin-top:0;padding-top:0;border:0}.climbing .tutorial,.climbing .scene-hud{visibility:hidden}
.controls{justify-content:center}.inventory{margin-top:0}.inventory-items{grid-template-columns:repeat(2,minmax(0,1fr))}.item,.empty-slot{min-height:89px}.item img{width:50px;height:45px}.selected-detail>strong,.selected-detail>p{display:none}.selected-actions{margin-top:8px}.inventory-tip{display:none}.scene-description{display:none}.tools button{font-size:.8rem}footer{display:none}
@media(max-width:800px){.controls{padding-top:9px;display:block}.inventory-items{grid-template-columns:repeat(5,minmax(0,1fr))}.item,.empty-slot{min-height:68px}.item img{width:35px;height:34px}.scene-hud{left:8px;top:8px;max-width:calc(100% - 16px)}.scene-hud .objective{font-size:.69rem;padding:6px 9px}.scene-hud #feedback{font-size:.74rem;padding:6px 9px}.tutorial{bottom:8px;left:8px;max-width:calc(100% - 16px)}.repair-overlay{top:80px;right:8px;max-height:calc(var(--scene-height) - 88px)}.selected-actions{justify-content:center}.walk-controls span{display:none}}
@media(max-height:520px) and (min-width:650px){.play-layout{grid-template-columns:minmax(0,1fr) 185px}.inventory-items{grid-template-columns:repeat(2,minmax(0,1fr))}.item,.empty-slot{min-height:66px}.item img{width:33px;height:30px}.scene-hud #feedback{font-size:.67rem}.scene-hud .objective{font-size:.65rem}.tutorial{bottom:5px;padding:7px 9px;max-width:280px}.tutorial p{font-size:.7rem}.repair-overlay{top:66px;max-height:calc(var(--scene-height) - 73px)}}

/* Comfortable touch targets, including contextual assistance. */
.coach-actions button,.repair-heading button{min-height:44px}.item[aria-pressed=true]{border-color:var(--leaf)}

/* Viewport layout: a viewport-sized game and one vertical inventory rail. */
:root{--selection-bg:#194641;--selection-text:#fff;--scene-height:max(160px,calc(var(--host-height) - 142px))}
::selection{background:var(--selection-bg);color:var(--selection-text)}
.game{height:var(--host-height);max-height:var(--host-height);padding:8px 12px;display:flex;flex-direction:column;overflow:hidden}
.masthead{flex:0 0 44px;margin:0;min-height:44px}.masthead h1{font-size:clamp(1rem,2vw,1.45rem)}
.global-progress{display:flex;align-items:center;gap:10px;min-height:23px;flex:0 0 23px;margin-bottom:4px}.global-progress progress{display:block;appearance:none;width:100%;height:6px;border:none;border-radius:9px;overflow:hidden;background:var(--line);color:var(--leaf)}
progress::-webkit-progress-bar{background:var(--line)}progress::-webkit-progress-value{background:var(--leaf);border-radius:9px}progress::-moz-progress-bar{background:var(--leaf)}
#progress-value{font-size:.7rem;white-space:nowrap;font-variant-numeric:tabular-nums;min-width:33px}
.play-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(82px,11vw,142px);gap:10px;flex:1;min-height:0}
.scene-section{display:flex;flex-direction:column;min-height:0;min-width:0}.scene-heading{flex:0 0 24px;height:24px}.scene-heading h2{font-size:.9rem}
.stage-wrap{flex:1;min-height:0;width:100%;max-width:none;display:flex;flex-direction:column}.visual-shell{flex:1;min-height:0;overflow:hidden}.stage{height:100%;width:100%}.walk-controls{flex:0 0 48px;min-height:48px;padding:2px 8px}.walk-controls button{height:44px;min-height:44px;padding:0}.walk-controls span{display:none}
.controls{padding-top:24px;max-height:none;height:100%;overflow:hidden;display:block}.inventory{height:100%;display:flex;flex-direction:column;min-height:0}.inventory-heading{flex:0 0 22px;margin:0 0 3px;gap:3px}.inventory-heading h2{font-size:.73rem}.inventory-heading span{font-size:.61rem;white-space:nowrap}
.inventory-items{display:grid;grid-template-columns:1fr;grid-template-rows:repeat(5,minmax(44px,1fr));gap:6px;flex:1;min-height:0;max-height:480px}
.item,.empty-slot{min-height:44px;padding:3px;flex-direction:column;gap:2px;overflow:hidden;font-size:.68rem}.item{touch-action:none;user-select:none;-webkit-user-select:none}.item img{width:auto;height:clamp(20px,5vh,44px);max-height:50%;max-width:65px;margin:0;flex-shrink:1}.item span{line-height:1.1}.empty-slot{font-size:0}.empty-slot::after{content:'+';font-size:1rem;color:var(--line)}
#selection{flex:0 0 auto}.selected-actions{display:flex;flex-direction:column;gap:4px;margin-top:6px}.selected-actions button{min-height:44px;width:100%;font-size:.69rem;padding:5px 3px}.selected-detail{margin:0}.inventory-tip{display:none}#storage{flex-shrink:0}#storage button{min-height:44px;padding:4px;font-size:.63rem}
.scene-hud{left:10px;top:10px;max-width:min(460px,calc(100% - 20px))}.scene-hud .objective{font-size:.73rem;padding:6px 9px}.scene-hud #feedback{font-size:.76rem;padding:7px 9px}
.tutorial{max-width:min(380px,calc(100% - 20px));left:10px;bottom:10px;padding:10px 12px}.tutorial p{font-size:.81rem}.coach-actions button{min-height:44px;padding:6px 9px;font-size:.74rem}
.repair-overlay{top:90px;right:10px;max-height:calc(100% - 102px)}.dialog-content{position:relative}.dialog-content h2{padding-right:30px}.dialog-x{position:absolute;right:9px;top:9px;min-height:44px;width:44px;padding:0;border:0;background:transparent;font-size:1.55rem;line-height:1}.save-note:empty{display:none}.text-button{background:transparent;border:0;text-decoration:underline;font-size:.8rem}.completed-banner{position:absolute;z-index:9;bottom:12px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;max-width:calc(100% - 20px);padding:9px 12px;background:var(--paper);border:1px solid var(--line);border-radius:12px;box-shadow:0 4px 16px #172e3540}.completed-banner .primary{font-weight:700;font-size:1rem;white-space:normal}.completed-banner .text-button{font-size:.72rem;padding:4px;min-height:44px}.completed-banner~.scene-hud{max-width:calc(100% - 20px)}
#reward-status:empty{display:none}#reward-status{font-size:.82rem}.drag-ghost{position:fixed;z-index:99999;width:64px;height:64px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 5px #13291d66)}.drag-active{cursor:grabbing}.drop-target{outline:3px solid var(--accent);outline-offset:3px}

@media(max-width:600px){.game{padding:6px}.play-layout{grid-template-columns:minmax(0,1fr) 82px;gap:6px}.masthead h1{font-size:1.05rem}.tools{gap:4px}.tools button{padding:6px 8px;font-size:.68rem}.inventory-heading h2{font-size:.64rem}.inventory-heading span{font-size:.56rem}.item span{font-size:.61rem}.scene-hud{top:7px;left:7px;max-width:calc(100% - 14px)}.scene-hud .objective{font-size:.66rem;padding:5px 7px}.scene-hud #feedback{font-size:.68rem;padding:5px 7px}.tutorial{left:7px;bottom:7px;max-width:calc(100% - 14px);padding:6px 7px}.tutorial p{font-size:.67rem}.coach-actions{gap:3px}.coach-actions button{font-size:.61rem;padding:4px}.completed-banner{bottom:7px;padding:6px;max-width:calc(100% - 14px)}.completed-banner .primary{font-size:.8rem;padding:7px}.completed-banner .text-button{font-size:.66rem}.dialog-content{padding:20px}.repair-overlay{top:100px;right:7px;width:calc(100% - 14px);max-height:calc(100% - 107px)}}
@media(max-height:500px){.game{padding:5px 8px}.masthead{flex-basis:44px}.global-progress{flex-basis:18px;min-height:18px;margin:0}.scene-heading{flex-basis:20px;height:20px}.controls{padding-top:20px;overflow-y:auto}.inventory{min-height:230px}.inventory-items{gap:3px}.item img{height:20px}.item,.empty-slot{font-size:.58rem;gap:0}.selected-actions{flex-direction:row;flex-wrap:wrap}.selected-actions button{flex:1;min-width:50px;font-size:.61rem}.inventory-heading{flex-basis:16px}.scene-hud{top:5px;left:5px;max-width:60%}.scene-hud .objective{font-size:.62rem;padding:4px 6px}.scene-hud #feedback{font-size:.62rem;padding:4px 6px}.tutorial{left:auto;right:6px;bottom:6px;max-width:38%;padding:5px 7px}.tutorial p{font-size:.65rem}.coach-actions button{font-size:.6rem}.repair-overlay{top:5px;max-height:calc(100% - 10px);max-width:45%}.completed-banner{left:auto;right:6px;transform:none;max-width:45%;bottom:6px}.completed-banner .primary{font-size:.75rem}.completed-banner .text-button{font-size:.63rem}}


.drag-ghost{transform:translate(-50%,-50%)}
.prop[data-layer="cabins"]{opacity:.92;mask-image:linear-gradient(#000 86%,transparent 100%);-webkit-mask-image:linear-gradient(#000 86%,transparent 100%)}

/* The reward stays in the game header, so no scene exit is covered. */
.masthead>div:first-child{min-width:0}
.completed #title{display:none}
.completed .masthead{flex:0 0 auto;min-height:80px;align-items:center}
.completed-banner{position:static;transform:none;inset:auto;display:flex;align-items:flex-start;max-width:100%;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}
.completed-banner .primary{font-size:.92rem;min-height:44px;padding:8px 13px;line-height:1.2}
.completed-banner .text-button{min-height:32px;font-size:.72rem;padding:5px 0}
@media(max-width:600px){.completed-banner .primary{font-size:.75rem;padding:7px 9px}.completed-banner .text-button{font-size:.65rem}.completed .tools{align-self:flex-start;margin-top:4px}}

/* Touch layout follows the host screen orientation, independently of iframe height. */
.mobile-instructions{display:none}
:is(.mobile-portrait,.mobile-landscape) .game{padding:6px}
:is(.mobile-portrait,.mobile-landscape) .masthead{flex:0 0 44px;min-height:44px;margin:0;gap:6px}
:is(.mobile-portrait,.mobile-landscape) .masthead h1{font-size:1.05rem}
:is(.mobile-portrait,.mobile-landscape) .tools{gap:4px}
:is(.mobile-portrait,.mobile-landscape) .tools button{font-size:.75rem;padding:6px 9px}
:is(.mobile-portrait,.mobile-landscape) .global-progress{flex:0 0 18px;min-height:18px;margin:0 0 4px}
:is(.mobile-portrait,.mobile-landscape) :is(.scene-heading,.walk-controls,.keyboard-instructions){display:none}
:is(.mobile-portrait,.mobile-landscape) .stage{touch-action:pan-y pinch-zoom}
:is(.mobile-portrait,.mobile-landscape) .mobile-instructions{display:block}
:is(.mobile-portrait,.mobile-landscape) .controls{padding:0;max-height:none}
:is(.mobile-portrait,.mobile-landscape) .empty-slot{font-size:0}
:is(.mobile-portrait,.mobile-landscape) .item span{font-size:.65rem;line-height:1.15}
:is(.mobile-portrait,.mobile-landscape) #selection:empty,:is(.mobile-portrait,.mobile-landscape) #storage:empty{display:none}
:is(.mobile-portrait,.mobile-landscape) .selected-detail:has(.selected-actions:empty){display:none}
:is(.mobile-portrait,.mobile-landscape) .selected-actions{margin:0}
:is(.mobile-portrait,.mobile-landscape) :is(.selected-actions button,#storage button){min-height:44px;margin:0;font-size:.7rem;padding:4px 7px}
:is(.mobile-portrait,.mobile-landscape) .scene-hud{top:7px;left:7px;max-width:calc(100% - 76px)}
:is(.mobile-portrait,.mobile-landscape) .scene-hud .objective{font-size:.7rem;padding:5px 8px}
:is(.mobile-portrait,.mobile-landscape) .scene-hud #feedback{font-size:.72rem;padding:5px 8px}
/* A small optional help card replaces the coaching block that covered the ground. */
:is(.mobile-portrait,.mobile-landscape) .tutorial{left:auto;right:7px;top:7px;bottom:auto;max-width:min(220px,calc(100% - 14px));padding:0;border:0;background:transparent;box-shadow:none;pointer-events:none}
.coach-toggle{float:right;pointer-events:auto;min-height:44px;font-size:.68rem;padding:4px 8px;background:var(--paper);box-shadow:0 2px 8px #162a2526}
:is(.mobile-portrait,.mobile-landscape) .coach-content{clear:both;margin-top:4px;padding:8px;background:var(--paper);box-shadow:0 3px 16px #162a2526;border-left:2px solid var(--accent);border-radius:6px;pointer-events:none}
:is(.mobile-portrait,.mobile-landscape) .tutorial p{font-size:.7rem;line-height:1.35;margin:0 0 5px}
:is(.mobile-portrait,.mobile-landscape) .coach-actions{gap:4px;justify-content:flex-end}
:is(.mobile-portrait,.mobile-landscape) .coach-actions button{pointer-events:auto;font-size:.62rem;padding:4px 6px;min-height:44px}
:is(.mobile-portrait,.mobile-landscape) .repair-overlay{top:7px;right:7px;max-width:250px;max-height:calc(100% - 14px);padding:8px 10px}
:is(.mobile-portrait,.mobile-landscape) .repair-steps{font-size:.72rem;padding-left:17px;margin:6px 0;line-height:1.4}
:is(.mobile-portrait,.mobile-landscape) .dialog-content{padding:18px}
:is(.mobile-portrait,.mobile-landscape) .dialog-content h2{font-size:1.35rem}
:is(.mobile-portrait,.mobile-landscape) .setting{min-height:52px}
:is(.mobile-portrait,.mobile-landscape) .completed-banner .primary{font-size:.78rem}
.mobile-portrait .play-layout{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:6px}
.mobile-portrait .controls{height:auto;overflow:visible}
.mobile-portrait .inventory{height:auto;min-height:0;display:grid;grid-template-columns:1fr 1fr;gap:4px}
.mobile-portrait .inventory-heading{grid-column:1/-1;height:16px;margin:0}
.mobile-portrait .inventory-heading h2{font-size:.69rem}.mobile-portrait .inventory-heading span{font-size:.62rem}
.mobile-portrait .inventory-items{grid-column:1/-1;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:68px;max-height:none;gap:5px}
.mobile-portrait :is(.item,.empty-slot){height:68px;min-height:44px;flex-direction:column;gap:2px;padding:3px}
.mobile-portrait .item img{height:32px;max-height:32px;max-width:44px}
.mobile-portrait .selected-actions{flex-direction:row}
.mobile-portrait.completed .masthead{min-height:80px}
.mobile-landscape .play-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(90px,14vw,142px);grid-template-rows:minmax(0,1fr);gap:8px}
.mobile-landscape .controls{height:100%;min-height:0;overflow:hidden;display:block}
.mobile-landscape .inventory{display:flex;flex-direction:column;gap:4px;height:100%;min-height:0}
.mobile-landscape .inventory-heading{display:none}
.mobile-landscape .inventory-items{flex:1;min-height:0;max-height:none;grid-template-columns:1fr;grid-template-rows:repeat(5,minmax(44px,1fr));gap:3px;overflow-y:auto;scrollbar-width:thin}
.mobile-landscape :is(.item,.empty-slot){height:auto;min-height:44px;flex-direction:row;gap:4px;padding:3px}
.mobile-landscape .item img{height:24px;max-height:28px;max-width:30px}
.mobile-landscape :is(#selection,#storage){flex-shrink:0}
.mobile-landscape .selected-actions{flex-direction:column;gap:0}
.mobile-landscape .scene-hud{max-width:65%}
.mobile-landscape .tutorial{max-width:210px}
.mobile-landscape.completed .masthead{min-height:44px}.mobile-landscape .completed-banner{flex-direction:row;align-items:center;gap:8px}
.mobile-landscape .completed-banner .text-button{font-size:.68rem;min-height:44px}
@media(max-height:500px){
 .mobile-portrait .inventory-heading{display:none}.mobile-portrait .inventory-items{grid-template-rows:50px;gap:4px}.mobile-portrait :is(.item,.empty-slot){height:50px}.mobile-portrait .item img{height:23px;max-height:23px}
 :is(.mobile-portrait,.mobile-landscape) .game{padding:4px}
 :is(.mobile-portrait,.mobile-landscape) .global-progress{flex-basis:12px;min-height:12px;margin-bottom:2px}
 .mobile-landscape .inventory{gap:2px}.mobile-landscape .inventory-items{gap:0}
 .mobile-landscape .scene-hud .objective,.mobile-landscape .scene-hud #feedback{font-size:.65rem;padding:4px 6px}
}
.stage.vertical-pan{touch-action:pinch-zoom}
@media(hover:none){.hotspot:hover .hotspot-label{display:none}.hotspot:hover{border-color:transparent;box-shadow:none;background:transparent!important}.markers .hotspot,.hotspot.tutorial-target{border-color:#fffce7}}
/* Standalone fallback follows the same square outline as the Elementor reward. */
#ending-dialog{border-radius:0}
:is(.mobile-portrait,.mobile-landscape) #ending-dialog{width:min(460px,calc(100% - 32px));max-height:80dvh}

/* The full bench is a drop surface; its objects and drawer remain clickable. */
.hotspot.workbench-zone{z-index:4}
.carrying-item .hotspot.workbench-zone{z-index:6}
.hotspot.drop-hover,.item.drop-hover{border:2px solid var(--accent)!important;background:#f5f5ed33!important;box-shadow:inset 0 0 0 2px #fff7,0 0 0 2px #253d3644!important}
.carrying-item .hotspot.drop-hover .hotspot-label{display:none}
.carrying-item .hotspot.workbench-zone .hotspot-label{display:none}
