/* MASTER 3.5.0 — dedicated portrait composition and compact, independent controls. */
html,body{min-height:100%;overflow-x:hidden}
#app{min-height:100svh;min-height:100dvh}
#stage-wrap{flex-shrink:0}
#stage:is([data-view="language"],[data-view="brief"]) .world-bg{background:none!important}

/* The title screen is no longer a screenshot with a second cropped screenshot below it. */

















/* Bubble sprites use baked localized text; only one speaker is displayed at a time. */
.speech-bubble{background:none;border:0;border-radius:0;padding:0;box-shadow:none;pointer-events:none}
.speech-bubble::after{display:none}
.speech-bubble .speech-sprite{display:block;width:100%;height:auto;object-fit:contain}
#sam-bubble{left:0;top:4px;width:146px;height:auto;z-index:2}
#agent-card{left:auto;right:0;top:213px;width:198px;height:159px;overflow:visible;z-index:8}
#agent-card::after{content:"";position:absolute;bottom:0;right:-8px;width:169px;height:53px;background:url("assets/scene/agent-barrier-3.5.0.webp?v=3.5.2") center/100% 100% no-repeat;z-index:3;pointer-events:none}
#agent-face{right:-7px;top:23px;width:122px;height:186px;object-fit:contain;clip-path:inset(0 0 48px 0);z-index:1}
#agent-bubble{left:-20px;top:0;width:154px;height:auto;z-index:4}

/* Portrait is a 390 × 740 logical scene fitted into the available viewport. */
#stage.portrait{width:390px;height:740px;background:#b8a58a}
#stage.portrait::before{display:none}
#stage.portrait .world-bg{inset:0;background:var(--portrait-art,url("assets/scene/portrait-3.5.2.webp?v=3.5.2")) center/100% 100% no-repeat}
#stage.portrait #time-card{left:4px;top:4px;width:124px;height:65px}
#stage.portrait #debt-card{left:131px;top:4px;width:255px;height:66px}
#stage.portrait #stats-card{left:4px;top:74px;width:279px;height:39px}
#stage.portrait .stat.score{left:0;width:104px}
#stage.portrait .stat.loaded{left:104px;width:104px}
#stage.portrait .stat.flights{left:208px;width:71px}
#stage.portrait .stat-label{left:7px;top:3px;width:calc(100% - 14px);height:11px}
#stage.portrait .stat-icon{left:6px;top:17px;width:20px;height:18px}
#stage.portrait .stat.score canvas{left:27px;top:16px;width:73px;height:20px}
#stage.portrait .stat.loaded canvas{left:30px;top:16px;width:69px;height:20px}
#stage.portrait .stat.flights canvas{left:30px;top:16px;width:35px;height:20px}
#stage.portrait #sound-toggle{left:289px;top:74px;width:44px;height:39px}
#stage.portrait #settings-toggle{left:338px;top:74px;width:45px;height:39px}
#stage.portrait #sound-state{display:block;top:41px;left:-2px;font-size:8px;min-width:48px;text-align:center}
#stage.portrait #sam-card{left:6px;top:118px;width:187px;height:76px}
#stage.portrait #sam-face{left:0;right:auto;top:0;width:66px;height:66px;object-fit:cover;object-position:center 3px;background:radial-gradient(circle at 35% 28%,#21323c,#0f1f28 62%,#0a161d);border:4px solid #8294a0;border-bottom-width:5px;border-radius:50%;box-shadow:0 3px 0 #0b1419aa;padding:3px}
#stage.portrait #sam-bubble{left:64px;top:1px;width:116px;height:auto}
#stage.portrait #sam-bubble::after{right:auto;left:8px}
#stage.portrait #agent-card{left:auto;right:0;top:223px;width:118px;height:130px}
#stage.portrait #agent-face{top:13px;right:-10px;width:86px;height:153px;clip-path:inset(0 0 42px 0)}
#stage.portrait #agent-card::after{right:-6px;bottom:0;width:112px;height:38px}
#stage.portrait #agent-bubble{left:-57px;top:0;width:125px;height:auto}
#stage.portrait #load-zone{left:131px;top:300px;width:148px;height:43px;border-radius:5px;background:#2636380c;border:1px solid #f5ce7877}
#stage.portrait #load-zone>span{left:50%;bottom:1px;max-width:145px;padding:3px 6px;font-size:10px;white-space:normal;text-align:center;line-height:1.1}
#stage.portrait .lane{top:366px;width:124px;height:79px}
#stage.portrait .lane:nth-child(1){left:0}
#stage.portrait .lane:nth-child(2){left:133px}
#stage.portrait .lane:nth-child(3){left:266px}
#stage.portrait .platform-skin{display:none}
#stage.portrait .cargo{left:2px;top:0;width:119px;height:57px}
#stage.portrait .cargo>img{filter:drop-shadow(0 3px 2px #13232d88)}
#stage.portrait .lane-next{left:24px;top:-25px;width:81px;height:25px}
#stage.portrait .next-item{right:5px;top:3px;width:43px;height:20px}
#stage.portrait .lane-category{left:8px;right:8px;bottom:1px;height:17px;display:flex;justify-content:center;gap:3px;border-radius:2px;background:#142c37e6;border:1px solid #c4a364}
#stage.portrait .lane-category .cat-icon{display:none}
#stage.portrait .lane-category .cat-title{width:100%;height:13px}
#stage.portrait #action-line{left:18px;right:18px;top:449px;min-height:14px;font-size:8px;color:#18353f;text-shadow:0 1px #fff3ca;text-align:center}
#stage.portrait #shred-zone{left:0;top:458px;width:184px;height:163px}
#stage.portrait #wait-zone{left:211px;top:452px;width:179px;height:170px}
#stage.portrait .mobile-only{display:block}
#stage.portrait .zone-sign{position:absolute;left:23px;top:62px;width:104px;height:35px;display:flex;align-items:center;justify-content:center;text-align:center;color:#162b35;font-size:14px;line-height:1.05;font-weight:900;padding:3px}
#stage.portrait .support-sign{position:absolute;left:40px;top:7px;width:118px;height:28px;color:#132f4b;text-align:center;display:flex;flex-direction:column;justify-content:center;font-family:"Arial Narrow",Arial,Tahoma,sans-serif}
#stage.portrait .support-sign strong{font-size:9px;font-weight:900;line-height:1.1}
#stage.portrait .support-sign small{font-size:8px;line-height:1.15;margin-top:2px;font-weight:800}
#stage.portrait #wait-count{left:135px;top:47px;width:35px;height:19px;font-size:12px;line-height:19px;letter-spacing:0;background:transparent;outline:none;border:0;text-align:center}
#stage.portrait #action-feedback{left:65px;bottom:453px;width:188px;gap:4px}
#stage.portrait #action-feedback #event-note{width:100%;max-width:100%;font-size:10px;line-height:1.2;padding:4px 6px}
#stage.portrait #action-feedback #score-feedback{font-size:19px;min-width:0}
#stage.portrait #category-strip{left:4px;right:4px;top:650px;height:80px;border:2px solid #ad9670;border-radius:7px;background:linear-gradient(#274958,#102c3d);padding:0;box-shadow:0 3px 0 #26343877}
#stage.portrait #category-list{left:4px;top:4px;width:370px;height:68px;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(2,32px);gap:4px;overflow:visible;touch-action:manipulation}
#stage.portrait .category-card{min-width:0;width:100%;height:32px;min-height:0;padding:2px;display:flex;align-items:center;justify-content:center;gap:1px;background:linear-gradient(#2e4d58,#122d3b);border:1px solid #b4a077;border-radius:4px}
#stage.portrait .category-card img{width:27px;height:25px;object-fit:contain}
#stage.portrait .category-count{width:13px;max-width:13px;height:22px}
#stage.portrait #cat-prev,#stage.portrait #cat-next,#stage.portrait .desktop-only{display:none}




/* Reset legacy portrait hitbox fills and relative poster offsets. */

#stage.portrait #shred-zone,#stage.portrait #wait-zone{background:transparent;border-color:transparent;box-shadow:none}
#stage.portrait #shred-zone.candidate,#stage.portrait #wait-zone.candidate{border-color:#ffe177;box-shadow:inset 0 0 0 2px #4c5129;background:#e5bb591f}
#stage.portrait #shred-zone.invalid,#stage.portrait #wait-zone.invalid{border-color:#e36b4d}
#stage.portrait #wait-count{padding:0;white-space:nowrap;font-family:monospace;font-size:10.5px}




#stage.portrait #action-line{top:628px;left:12px;right:12px;font-size:9px;line-height:1.2;background:transparent}



/* 3.5.1: labels follow the new painted waiting corner; no character DOM layer. */
#stage.portrait .support-sign{left:55px;top:4px;width:118px;height:27px}
#stage.portrait #wait-count{left:133px;top:35px;width:39px;height:17px;line-height:17px;font-size:10px}


/* 3.5.2: use baked HUD frames and keep only live digits/text over them. */
#stage.portrait #hud .instrument>.skin{display:none}
#stage.portrait #sound-toggle>img,#stage.portrait #settings-toggle>img{display:none}
#stage.portrait #sound-toggle,#stage.portrait #settings-toggle{background:transparent!important;border:0;box-shadow:none}
