.scene-frame{position:absolute;inset:0;overflow:hidden;background:#070c17}
.scene-frame #world{object-fit:fill;width:100%;height:100%;touch-action:none}
.inventory #cancel-item{width:32px;height:32px;border:1px solid var(--mint);color:var(--mint);font-size:22px}
.inventory[data-selected="true"] #hint{display:none}
.touch-controls button{user-select:none;-webkit-user-select:none}
#touch-use span,#touch-use small{display:block}
#touch-use small{font-size:9px;line-height:1.3;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shell.immersive{position:fixed;inset:0;z-index:100;max-width:none;width:100%;height:100dvh;background:var(--ink)}
html[data-compact="true"]{height:100%;overscroll-behavior:none}
html[data-compact="true"] body{height:100%;overflow:hidden;overscroll-behavior:none}
html[data-compact="true"] .shell{height:100dvh;min-height:0;max-width:none;width:100%;padding:max(0px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(0px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));display:grid;grid-template-rows:52px minmax(0,1fr) 24px;gap:0}
html[data-compact="true"] .topbar{height:52px;gap:8px}
html[data-compact="true"] .wordmark{font-size:11px;gap:8px;min-height:44px}
html[data-compact="true"] .wordmark small{font-size:7px}
html[data-compact="true"] .mark{font-size:25px;width:30px}
html[data-compact="true"] .chapter-top{display:none}
html[data-compact="true"] .top-actions{gap:2px}
html[data-compact="true"] .icon-btn{width:44px;height:44px;padding:11px}
html[data-compact="true"] main{width:100%!important;height:100%!important;max-height:none;min-height:0;aspect-ratio:auto;margin:0!important;border:0;box-shadow:none}
html[data-compact="true"] .scene-frame{top:82px;bottom:164px;left:0;right:0;border-block:1px solid #354255}
html[data-compact="true"] .bottom-bar{min-height:24px;max-height:24px;font-size:9px;line-height:1.3;overflow:hidden}
html[data-compact="true"] .bottom-bar>div:first-child{max-width:100%;width:100%;gap:6px}
html[data-compact="true"] #footer-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-compact="true"] .key-guide,html[data-compact="true"] .footer-build{display:none}
html[data-compact="true"] .location{top:12px;left:10px;font-size:11px;gap:8px;letter-spacing:1.4px}
html[data-compact="true"] .location small{font-size:8px;top:20px;left:13px;letter-spacing:.7px}
html[data-compact="true"] .journal-btn{top:4px;right:4px;height:44px;font-size:11px;padding:8px}
html[data-compact="true"] .journal-btn svg{width:17px;height:17px}
html[data-compact="true"] .objective{top:49px;left:10px;max-width:calc(100% - 20px);width:auto}
html[data-compact="true"] .objective>span{display:none}
html[data-compact="true"] .objective p{font-size:12px;line-height:1.4;margin:0}
html[data-compact="true"] .inventory{left:4px;right:4px;bottom:84px;transform:none;width:auto;max-width:none;height:64px;padding:8px;gap:8px}
html[data-compact="true"] #slots{flex:1;min-width:0;overflow-x:auto;display:flex;gap:6px;scrollbar-width:none;touch-action:pan-x;overscroll-behavior:contain}
html[data-compact="true"] #slots::-webkit-scrollbar{display:none}
html[data-compact="true"] .slot{width:44px;height:44px;min-width:44px;flex:0 0 44px;padding:7px}
html[data-compact="true"] .slot.empty{display:none}
html[data-compact="true"] .slot-num{display:none}
html[data-compact="true"] .inventory-label{display:none}
html[data-compact="true"] .inventory[data-empty="true"] #slots:before{content:'Предметов пока нет';font-size:12px;color:#8896ac;align-self:center;white-space:nowrap}
html[data-compact="true"] .inventory #hint,html[data-compact="true"] .inventory #cancel-item{flex:0 0 44px;width:44px;height:44px;margin:0;font-size:20px}
html[data-compact="true"] .touch-controls{inset:0;display:block;pointer-events:none;z-index:7}
html[data-compact="true"] .touch-controls button{position:absolute;bottom:10px;height:58px;border:1px solid #6e8c99;background:#142132eb;pointer-events:auto;touch-action:none}
html[data-compact="true"] #touch-left{left:6px;width:56px;font-size:26px}
html[data-compact="true"] #touch-right{left:70px;width:56px;font-size:26px}
html[data-compact="true"] #touch-use{right:6px;width:146px;padding:7px 9px;font-size:13px}
html[data-compact="true"] #touch-use small{font-size:10px;margin-top:5px;color:#9eafbd}
html[data-compact="true"] #touch-use:disabled{opacity:.5}
html[data-compact="true"] .item-description{left:4px;right:4px;bottom:156px;transform:none;width:auto;max-height:150px;overflow:auto;font-size:12px;line-height:1.5;padding:12px;z-index:8}
html[data-compact="true"] .item-description b{font-size:13px}
html[data-compact="true"] .item-description small{font-size:10px}
html[data-compact="true"] .hover-label{display:none}
html[data-compact="true"] .danger{top:77px;left:12px;right:12px;width:auto;z-index:4;pointer-events:none}
html[data-compact="true"] .danger>span{font-size:9px;background:#0b101caa;padding:3px}
html[data-compact="true"] .danger>div{margin-top:3px}
html[data-compact="true"] .toast{top:84px;max-width:92%;width:max-content;font-size:12px;white-space:normal;text-align:center;line-height:1.5;padding:8px 12px;pointer-events:none}
html[data-compact="true"] .speech,html[data-compact="true"] #stage[data-mode="intro"] .speech{left:6px!important;right:6px;bottom:10px;top:auto!important;width:auto;max-width:none;min-width:0;min-height:170px;max-height:55%;padding:14px 14px 12px 84px;overflow:auto;box-shadow:none;animation:none}
html[data-compact="true"] .speech:after{display:none}
html[data-compact="true"] #portrait{left:12px;top:14px;width:58px;height:72px}
html[data-compact="true"] #speaker{font-size:10px;letter-spacing:1.2px}
html[data-compact="true"] #speech-text{font-size:14px;line-height:1.5;min-height:0;margin:8px 0 10px}
html[data-compact="true"] #speech-next{font-size:12px;min-height:44px;min-width:112px;padding:10px 12px;border:1px solid #547779;color:var(--mint)}
html[data-compact="true"] #speech-next b{display:none}
html[data-compact="true"] .voice-meter{margin:8px 0;height:3px}
html[data-compact="true"][data-speaking="true"] .scene-frame{bottom:calc(var(--speech-height,210px) + 24px)}
html[data-compact="true"][data-speaking="true"] .inventory,html[data-compact="true"][data-speaking="true"] .item-description{visibility:hidden}
html[data-compact="true"] .modal{padding:10px;backdrop-filter:none;background:#050b14f5}
html[data-compact="true"] .modal-card{padding:20px;width:100%;max-width:560px;max-height:100%;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;box-shadow:none}
html[data-compact="true"] .modal-kicker{font-size:9px;margin-right:30px;line-height:1.5}
html[data-compact="true"] .modal-card h2{font-size:24px;margin:8px 0 12px}
html[data-compact="true"] .modal-card p,html[data-compact="true"] .journal-entry p{font-size:13px;line-height:1.6}
html[data-compact="true"] .modal-actions button{min-height:48px;padding:12px;font-size:13px;line-height:1.5}
html[data-compact="true"] .modal-actions button small{font-size:10px;float:none;display:block}
html[data-compact="true"] .close-modal{width:44px;height:44px;top:2px;right:2px;font-size:24px;z-index:2}
html[data-compact="true"] .journal-list{max-height:none;overflow:visible}
html[data-compact="true"] .journal-entry h3{font-size:13px}
html[data-compact="true"] .controls-list{font-size:12px;grid-template-columns:80px 1fr;gap:12px}
html[data-compact="true"] .keypad{width:100%;max-width:280px;gap:7px}
html[data-compact="true"] .keypad button{min-height:44px;font-size:18px;padding:8px;touch-action:manipulation}
html[data-compact="true"] .code-display{margin:14px 0}
html[data-compact="true"] .code-display input{font-size:28px;min-height:52px;width:190px}
html[data-compact="true"] .code-error{font-size:12px!important;line-height:1.5;min-height:30px}
html[data-compact="true"] .intro-label{display:none}
html[data-compact="true"] #skip{top:4px;bottom:auto;right:4px;min-height:44px;padding:10px;font-size:11px}
html[data-compact="true"] #stage[data-mode="intro"] .scene-frame{top:54px;bottom:10px}
html[data-compact="true"][data-speaking="true"] #stage[data-mode="intro"] .scene-frame{bottom:calc(var(--speech-height,210px) + 24px)}
html[data-compact="true"] #stage[data-mode="title"] .scene-frame{inset:0;border:0}
html[data-compact="true"] .title-content{left:24px;top:10%;width:calc(100% - 48px)}
html[data-compact="true"] .eyebrow{font-size:9px;letter-spacing:1px}
html[data-compact="true"] h1{font-size:clamp(76px,25vw,128px);margin:22px 0 0}
html[data-compact="true"] .tagline{font-size:14px;line-height:1.5;margin:20px 0}
html[data-compact="true"] .chapter-label{font-size:11px;margin:0 0 14px;letter-spacing:1px}
html[data-compact="true"] .primary-btn{font-size:13px;min-height:52px;width:100%;padding:15px 18px}
html[data-compact="true"] .text-btn{font-size:13px;min-height:48px;padding:13px 0}
html[data-compact="true"] .title-links{margin-top:12px;gap:20px}
html[data-compact="true"] .title-links button{font-size:12px;min-height:44px}
html[data-compact="true"] .title-links span{font-size:10px}
html[data-compact="true"] .version{font-size:8px;bottom:16px;left:24px;letter-spacing:1px}
html[data-compact="true"] .title-corner{font-size:7px;top:12px;right:12px}
html[data-compact="true"] .title-corner b{font-size:20px}
html[data-compact="true"] .vertical-caption{display:none}
@media(orientation:landscape){
 html[data-compact="true"] .shell{grid-template-rows:44px minmax(0,1fr) 0}
 html[data-compact="true"] .topbar{height:44px}
 html[data-compact="true"] .bottom-bar{display:none}
 html[data-compact="true"] .wordmark small{display:none}
 html[data-compact="true"] .scene-frame{top:0;bottom:0;left:110px;right:120px;border:0}
 html[data-compact="true"] .location{top:6px;left:6px;font-size:9px;letter-spacing:.5px}
 html[data-compact="true"] .location small{font-size:7px;max-width:96px;white-space:normal;top:18px;left:0;line-height:1.4}
 html[data-compact="true"] .objective{left:6px;top:54px;max-width:100px}
 html[data-compact="true"] .objective p{font-size:11px;line-height:1.45}
 html[data-compact="true"] .journal-btn{right:6px;top:0;font-size:10px;padding:6px}
 html[data-compact="true"] .inventory{left:auto;right:4px;top:50px;bottom:auto;transform:none;width:106px;height:auto;max-height:calc(100% - 126px);overflow:auto;display:block;padding:4px;background:#0b1322;touch-action:pan-y}
 html[data-compact="true"] #slots{display:grid;grid-template-columns:repeat(2,44px);gap:6px;max-height:none;overflow-x:hidden;touch-action:pan-y}
 html[data-compact="true"] .inventory[data-empty="true"] #slots:before{grid-column:1/-1;white-space:normal;font-size:10px;line-height:1.5}
 html[data-compact="true"] .inventory #hint,html[data-compact="true"] .inventory #cancel-item{width:94px;height:44px;margin-top:6px;font-size:17px}
 html[data-compact="true"] #touch-left{left:4px;width:46px;height:50px;bottom:8px}
 html[data-compact="true"] #touch-right{left:58px;width:46px;height:50px;bottom:8px}
 html[data-compact="true"] #touch-use{right:4px;width:106px;height:54px;bottom:8px;font-size:12px;padding:4px}
 html[data-compact="true"] #touch-use small{font-size:9px;white-space:normal;max-height:23px;line-height:1.2}
 html[data-compact="true"] .item-description{left:116px;right:124px;bottom:8px;max-height:110px}
 html[data-compact="true"] .danger{left:116px;right:124px;top:8px}
 html[data-compact="true"] .toast{top:10px}
 html[data-compact="true"] .speech,html[data-compact="true"] #stage[data-mode="intro"] .speech{left:8px!important;right:8px;bottom:8px;min-height:130px;max-height:66%;padding:12px 14px 10px 82px}
 html[data-compact="true"] #speech-text{font-size:13px;line-height:1.4;margin:6px 0}
 html[data-compact="true"][data-speaking="true"] .scene-frame{top:0;left:110px;right:120px;bottom:calc(var(--speech-height,180px) + 16px)}
 html[data-compact="true"][data-speaking="true"] .objective{visibility:hidden}
 html[data-compact="true"] #stage[data-mode="intro"] .scene-frame{top:0;left:0;right:0;bottom:0}
 html[data-compact="true"][data-speaking="true"] #stage[data-mode="intro"] .scene-frame{bottom:calc(var(--speech-height,180px) + 16px)}
 html[data-compact="true"] #skip{top:0;font-size:10px}
 html[data-compact="true"] .title-content{top:10px;bottom:10px;left:22px;width:70%;display:grid;grid-template-columns:1fr 1fr;column-gap:20px;align-content:center}
 html[data-compact="true"] .eyebrow{grid-column:1/-1;font-size:8px}
 html[data-compact="true"] h1{grid-column:1;grid-row:2/6;font-size:min(24vh,94px);margin:12px 0 0}
 html[data-compact="true"] .tagline{grid-column:2;grid-row:2;font-size:12px;margin:12px 0 6px}
 html[data-compact="true"] .chapter-label{grid-column:2;grid-row:3;font-size:9px;margin:0 0 8px}
 html[data-compact="true"] .primary-btn{grid-column:2;grid-row:4;min-height:44px;padding:10px 12px;font-size:11px}
 html[data-compact="true"] .text-btn{grid-column:2;grid-row:5;min-height:42px;font-size:11px;padding:10px 0}
 html[data-compact="true"] .title-links{grid-column:1/-1;grid-row:6;margin:5px 0 0}
 html[data-compact="true"] .title-links button{min-height:36px;font-size:11px}
 html[data-compact="true"] .version{bottom:7px;font-size:7px}
 html[data-compact="true"] .modal-card{padding:14px 18px;max-width:680px}
 html[data-compact="true"] .modal-card h2{font-size:20px;margin:3px 40px 6px 0}
 html[data-compact="true"] .modal-card p{font-size:12px;line-height:1.4;margin:6px 0}
 html[data-compact="true"] .modal-kicker{font-size:8px;margin-bottom:4px}
 html[data-compact="true"] #code-form{display:grid;grid-template-columns:minmax(140px,1fr) minmax(200px,1fr);gap:8px 18px}
 html[data-compact="true"] .code-display{grid-column:1;grid-row:1;align-self:center;margin:0}
 html[data-compact="true"] .code-error{grid-column:1;grid-row:2;margin:0!important;align-self:start}
 html[data-compact="true"] .keypad{grid-column:2;grid-row:1/3;max-width:250px;gap:5px}
 html[data-compact="true"] .keypad button{min-height:40px;padding:5px;font-size:17px}
 html[data-compact="true"] .modal-actions{margin-top:8px;gap:6px}
 html[data-compact="true"] .modal-actions button{min-height:44px;padding:8px 12px;font-size:12px}
 html[data-compact="true"] .modal-actions button small{float:right;display:inline;font-size:10px}
}
.primary-btn:disabled{opacity:.65;cursor:progress}html[data-compact="true"] .speech{overscroll-behavior:contain;touch-action:pan-y}
