/* One game and one URL: touch controls adapt to phones and tablets. */
.touch-controls,.touch-status,.touch-hint{display:none}
#modal{position:fixed;z-index:20}
html.embed-mode body{padding:8px}
html.embed-mode #app{width:min(1440px,100%,calc((100dvh - 116px)*16/9))}
html.embed-mode .touch-device #app{width:100%}
.touch-device{padding:8px;min-height:100svh;overscroll-behavior:none}
.touch-device #app{width:100%;max-width:1100px}
.touch-device .masthead{height:44px;gap:8px}
.touch-device .masthead>a{font-size:10px;letter-spacing:0}
.touch-device .edition{display:none}
.touch-device .tools{gap:4px}
.touch-device .tools button{min-width:44px;min-height:44px}
.touch-device .footer{justify-content:center;min-height:40px}
.touch-device .footer-right{display:flex}
.touch-device .keyboard-hints{display:none}
.touch-device .footer button{min-height:44px;padding:0 8px;font-size:10px}
.touch-device button{touch-action:manipulation}
.touch-device .primary,.touch-device .secondary{min-height:44px;font-size:11px;letter-spacing:.4px}
.touch-device .map-tools button{min-height:44px;font-size:10px}
.touch-device .game-buttons{top:5px;right:6px;gap:5px}
.touch-device .game-buttons button{min-height:44px;min-width:44px;font-size:10px;padding:5px 8px}
.touch-device .modal{position:fixed;inset:0;z-index:20;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
.touch-device .modal-panel{max-height:calc(100dvh - 32px);width:min(700px,100%);padding:20px;overscroll-behavior:contain;scrollbar-width:thin}
.touch-device .modal-panel h2{font-size:25px;padding-right:35px}
.touch-device .modal-panel p{font-size:13px}
.touch-device .modal-panel button{min-height:44px;font-size:12px}
.touch-device .close-modal{width:44px;height:44px;margin:-10px -10px 0 0;font-size:25px!important}
.touch-device .control-grid{font-size:11px;grid-template-columns:1fr}
.touch-device .inventory-grid{grid-template-columns:1fr 1fr}
.touch-device .item-card{padding:12px}
.touch-device .item-card p{min-height:52px;font-size:12px}
.touch-device .reference-videos video{min-height:110px}
.touch-device .toast{font-size:11px;width:max-content;max-width:90%;bottom:10%;padding:10px 13px}
.touch-device[data-screen="play"] #game{touch-action:none;user-select:none;-webkit-user-select:none}
.touch-device[data-screen="play"] .touch-controls{display:flex;align-items:end;justify-content:space-between;gap:12px;padding:12px 10px 8px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.touch-device[data-screen="play"] .touch-status{display:block;font-size:12px;text-align:center;color:#f0dba5;padding:12px 0 0;letter-spacing:.4px}
.touch-device[data-screen="play"] .touch-hint{display:block;text-align:center;font-size:11px;color:#b5b4be;line-height:1.8;margin:8px 0}
.touch-movement{display:flex;gap:10px}
.touch-controls button{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border:1px solid #b0a58b88;border-radius:14px;min-width:60px;min-height:60px;background:#343949e8;color:#ffe1a0;box-shadow:0 4px 0 #0b1020;font-size:13px;font-weight:bold;pointer-events:auto}
.touch-controls button[data-active="true"]{background:#f0c36e;color:#252433;transform:translateY(2px);box-shadow:0 2px 0 #5b4339;filter:none}
.touch-movement button{font-size:25px}
.touch-actions{display:grid;grid-template-columns:60px 60px;gap:8px}
.touch-actions button{min-height:47px;min-width:60px}
.touch-actions [data-touch="jump"]{background:#b34f51;color:#fff0c4;border-color:#e99a7e}
.touch-actions [data-touch="attack"]{background:#866445;color:#fff0c4;border-color:#d3ad7d}
.touch-device.modal-open .touch-controls{visibility:hidden}
#app:fullscreen{width:100vw!important;max-width:none;height:100dvh;background:#14151e;display:flex;flex-direction:column;justify-content:center;padding:0 max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left))}
#app:fullscreen .cabinet{width:min(100%,calc((100dvh - 100px)*16/9));margin:0 auto;flex-shrink:0}
@media (max-width:600px) and (orientation:portrait){
 .touch-device{display:block;padding:8px max(8px,env(safe-area-inset-right)) 8px max(8px,env(safe-area-inset-left))}
 .touch-device #app{width:100%}
 .touch-device:not([data-screen="play"]) .cabinet{width:100%;height:clamp(465px,125vw,650px);aspect-ratio:auto;min-height:0;max-height:none}
 .touch-device[data-screen="map"] .cabinet{height:560px}
 .touch-device .title-screen{background-position:64% center;background-image:linear-gradient(90deg,#170d25e8 0%,#170d2599 55%,#170d2533),url('assets/title-art.png')}
 .touch-device .title-copy{width:77%;left:7%;top:8%}
 .touch-device .title-copy .eyebrow{font-size:9px;line-height:1.6;letter-spacing:1px;margin-bottom:18px}
 .touch-device h1{font-size:clamp(38px,10cqw,54px);letter-spacing:-2px}
 .touch-device h1 span{letter-spacing:-1px}
 .touch-device .subtitle{font-size:11px;letter-spacing:2.5px;margin:19px 0}
 .touch-device .tagline{display:block;font-size:13px;line-height:1.65;margin-bottom:23px}
 .touch-device .title-buttons{width:100%;gap:11px}
 .touch-device .title-buttons button{min-height:48px;padding:12px 14px;font-size:12px}
 .touch-device .title-copy>.text-button{font-size:10px;min-height:44px;margin-top:15px;text-align:left;line-height:1.6}
 .touch-device .intro-content{width:85%;top:7%;left:7%}
 .touch-device .intro-content h2{font-size:29px;margin:20px 0;line-height:1.1;letter-spacing:-1px}
 .touch-device .intro-content h2 br{display:block}
 .touch-device #story-text{font-size:14px;min-height:130px;line-height:1.7}
 .touch-device .intro-bottom>span{display:none}
 .touch-device .intro-bottom button{min-height:44px;font-size:11px}
 .touch-device[data-screen="map"] #game{position:absolute;top:112px;left:0;width:100%;height:auto;aspect-ratio:16/9}
 .touch-device .map-heading{top:20px;left:6%;right:6%}
 .touch-device .map-heading .eyebrow{font-size:8px;margin-bottom:11px;letter-spacing:1px}
 .touch-device .map-heading h2{font-size:27px}
 .touch-device .map-heading>p:last-child{display:none}
 .touch-device .world-tabs{left:6%;right:6%;top:92px;justify-content:space-between;gap:8px}
 .touch-device .world-tabs button{min-height:44px;flex:1;font-size:9px;padding:8px}
 .touch-device .map-card{bottom:61px;left:6%;right:6%;padding:14px;display:block}
 .touch-device .map-card .eyebrow,.touch-device .stage-record{font-size:9px}
 .touch-device .map-card h3{font-size:18px;margin:7px 0}
 .touch-device .map-card p{font-size:11px;line-height:1.5}
 .touch-device .map-card .primary{width:100%;margin-top:13px;min-height:44px;font-size:11px}
 .touch-device .map-tools{bottom:7px;left:6%;right:6%}
 .touch-device .map-tools>span{display:none}
 .touch-device .inventory-grid{grid-template-columns:1fr}
 .touch-device .dossier{grid-template-columns:90px 1fr;gap:13px}
 .touch-device .dossier p{font-size:11px}
 .touch-device .stat-grid{gap:6px}.touch-device .stat-grid div{padding:12px 5px;font-size:8px}
 .touch-device .game-buttons{top:auto;bottom:7px}
 .touch-device .toast{bottom:26%;font-size:10px}
}
@media (orientation:landscape) and (max-height:600px){
 html.embed-mode body.touch-device,.touch-device{padding:0 max(4px,env(safe-area-inset-right)) 0 max(4px,env(safe-area-inset-left));min-height:100dvh;display:block}
 .touch-device #app{width:100%;max-width:none}
 .touch-device .masthead{height:34px;max-width:100%;margin:0 8px}
 .touch-device .masthead .brand-mark{height:22px;width:22px;font-size:15px}
 .touch-device .tools button{min-height:32px;min-width:40px}
 .touch-device .cabinet{width:min(100%,calc((100dvh - 38px)*16/9));margin:auto;aspect-ratio:16/9;min-height:0;max-height:none}
 .touch-device #app:fullscreen .cabinet{width:min(100%,calc((100dvh - 38px)*16/9))}
 .touch-device .footer,.touch-device[data-screen="play"] .touch-status,.touch-device[data-screen="play"] .touch-hint{display:none}
 .touch-device[data-screen="play"] .touch-controls{position:fixed;bottom:max(8px,env(safe-area-inset-bottom));left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));z-index:4;pointer-events:none;padding:0}
 .touch-device .touch-movement{gap:7px}
 .touch-device .touch-controls button{min-width:50px;min-height:50px;border-radius:12px;font-size:11px;background:#343949c9}
 .touch-device .touch-movement button{font-size:22px}
 .touch-device .touch-actions{grid-template-columns:50px 50px;gap:7px}
 .touch-device .touch-actions button{min-height:44px}
 .touch-device .title-copy{top:6%;left:5%;width:47%}
 .touch-device .title-copy .eyebrow{font-size:7px;margin-bottom:9px;letter-spacing:.5px}
 .touch-device h1{font-size:clamp(25px,6.5cqw,48px)}
 .touch-device .subtitle{font-size:8px;letter-spacing:2px;margin:12px 0}
 .touch-device .tagline,.touch-device .save-note{display:none}
 .touch-device .title-buttons{width:88%;gap:8px}
 .touch-device .title-buttons button{min-height:40px;padding:9px;font-size:10px}
 .touch-device .title-copy>.text-button{font-size:8px;min-height:35px;margin-top:6px}
 .touch-device .map-heading{top:5%;left:4%}.touch-device .map-heading .eyebrow{font-size:7px;letter-spacing:.5px;margin-bottom:6px}
 .touch-device .map-heading h2{font-size:24px}.touch-device .map-heading>p:last-child{display:none}
 .touch-device .world-tabs{top:4%;right:4%;gap:7px}.touch-device .world-tabs button{min-height:38px;padding:7px;font-size:9px}
 .touch-device .map-card{bottom:13%;padding:8px 10px;gap:12px}.touch-device .map-card h3{font-size:15px;margin:4px 0}
 .touch-device .map-card .eyebrow,.touch-device .stage-record{font-size:8px}.touch-device .map-card p{font-size:9px}
 .touch-device .map-card .primary{min-height:40px;font-size:10px;padding:10px;white-space:nowrap}
 .touch-device .map-tools{bottom:0;left:4%;right:4%}.touch-device .map-tools>span{display:none}
 .touch-device .map-tools button{min-height:38px;font-size:9px}
 .touch-device .game-buttons{top:4px;right:4px}.touch-device .game-buttons button{min-height:36px;min-width:36px;font-size:8px}
 .touch-device .intro-content{top:7%;left:6%;width:75%}.touch-device .intro-content h2{font-size:22px;line-height:1.2;margin:11px 0;letter-spacing:-.5px}.touch-device .intro-content h2 br{display:none}
 .touch-device #story-text{font-size:12px;min-height:72px;line-height:1.6;margin:12px 0}
 .touch-device .intro-bottom{margin-top:4px}.touch-device .intro-bottom button{min-height:40px;font-size:10px}.touch-device .intro-bottom>span{display:none}
 .touch-device .toast{bottom:12%;font-size:10px}
}
