/* Viewport layout: the iframe is the screen, not the parent browser window. */
html,body{height:100%;overflow:hidden;overscroll-behavior:none}body{height:var(--screen-height,100dvh)}
body>header{height:56px;padding:0 18px;gap:12px}.brand{font-size:22px}.brand-icon{font-size:32px}.brand-small{font-size:8px;margin-top:4px}nav{gap:20px}nav button{padding:10px 0}body>footer{display:none}
#app{position:relative;left:50%;transform-origin:top center;max-width:none;min-height:0;margin:0;padding:10px 14px 12px;will-change:auto}
.level-intro{max-width:900px;padding:18px 24px;border-radius:22px}.intro-top{margin:10px 0}.level-intro h1{font-size:36px}.intro-subtitle{margin:6px 0 12px;font-size:13px}.intro-columns{gap:20px}.intro-tray{width:min(230px,30vh);margin:6px auto 12px}.intro-columns>div:first-child>p{margin:6px 0;font-size:12px}.intro-recipe{padding:16px}.intro-recipe h3{font-size:20px;margin-top:4px}.intro-targets{gap:8px;margin:10px 0}.intro-targets>div{padding:6px;grid-template-columns:30px 1fr;border-radius:10px}.intro-targets svg{width:30px;height:30px}.intro-targets b{font-size:20px}.intro-moves{padding:5px 0}.intro-moves b{font-size:28px}.intro-stars{margin:10px 0;gap:4px}.intro-recipe .primary{margin-top:8px;padding:12px 16px}.intro-recipe .tiny{margin:6px 0!important}.personal-best{padding:7px;font-size:11px}
html[data-screen="game"] body>header{display:none}html[data-screen="game"] #app{padding:6px 10px 12px}.game-head{margin:0 auto 6px;max-width:980px;height:44px}.game-head h2{font-size:24px}.game-head .icon{width:40px;height:40px}.game-wrap{display:grid;grid-template-columns:160px minmax(0,480px);gap:12px;align-items:start}.game-wrap>.game-stats{display:block;padding:12px;border-radius:16px}.game-stats h3{font-size:19px}.game-stats #targets{display:flex;flex-wrap:wrap;gap:8px}.game-stats .target{margin:6px 0;gap:5px;border:0;padding:0}.game-stats .target svg{width:28px;height:28px}.game-stats .target b{font-size:21px}.game-stats .target small{font-size:9px}.game-stats .moves{margin-top:10px;padding:8px;font-size:10px}.game-stats .moves b{font-size:32px}.game-center{width:100%;max-width:min(480px,calc(var(--screen-height,100dvh) - 174px));justify-self:center}.board-shell{padding:5px;border:4px solid #fff9ee;border-radius:16px}.board{gap:3px}.game-side{display:none}.score-strip{padding:6px 2px 0}.score-strip b{font-size:23px;margin-top:0}.star-score>span{font-size:24px}.star-score small{font-size:8px;margin-top:0}.move-feedback{height:20px;line-height:20px;margin:3px 0 0;font-size:13px}.play-actions{margin-top:4px;gap:5px}.play-actions button{min-height:40px;padding:6px;font-size:11px}.preview-note{font-size:9px;margin:4px 0}.hint-message{position:fixed;bottom:4px;left:8px;right:8px;z-index:30;margin:0;padding:8px;box-shadow:0 2px 12px #49303c33}.lesson-coach{padding:9px 12px;gap:10px;margin:0 auto 8px;max-width:900px}.lesson-coach h3{font-size:18px;margin:3px 0}.lesson-coach p{font-size:11px;line-height:1.4}.chef-mark{width:36px;height:36px;font-size:24px}.lesson-controls{gap:4px}.lesson-controls .primary{padding:9px;font-size:12px}.finale-ribbon{margin-bottom:6px;padding:5px 10px;font-size:11px}.fit-help{min-height:40px}.fit-extra{display:none!important}
.result{margin:0 auto;padding:16px 24px;max-width:520px}.result .medal{width:64px;height:64px;font-size:30px;border-width:6px;margin:8px auto}.result .eyebrow{margin-bottom:8px}.result-stars{font-size:36px;margin:6px 0}.result h2{font-size:25px}.result p{font-size:12px;line-height:1.45;margin:8px 0}.result .moves{padding:8px;margin-top:8px}.result .moves b{font-size:28px}.result .primary{padding:12px;margin:10px 0}.result .chapter-progress{padding:9px;margin:8px 0}.result .milestone{padding:10px;margin-bottom:8px}.result .campaign-honours{padding:10px;margin:8px 0}.result .tiny{margin:5px 0!important}
/* Secondary screens retain navigation while using the same bounded stage. */
.hero{max-width:1050px;margin:auto}.hero-copy{padding:8px}.hero h1{font-size:46px}.hero-copy p{margin:12px 0;font-size:14px}.scene{height:280px}.hero-stats{margin-top:12px}.section-head{margin:16px 0 10px}.worlds{gap:10px}.world{min-height:84px;padding:10px}.world-art{width:50px;height:50px}.world h3{font-size:17px}.screen-title{margin:0 0 10px}.screen-title h2{font-size:28px}.screen-title .eyebrow{margin-bottom:5px}.group-label{margin:8px 0}.chapter-progress{margin:8px 0;padding:10px}.map-layout{grid-template-columns:210px 1fr;gap:12px}.map{min-height:330px}.map-layout .panel{padding:14px}.chapter-panel .world-art{display:none}.next-chapter{margin:10px 0;padding:12px}.pager{margin-top:10px}.collection{gap:12px}.sweet-card{padding:12px}.sweet-card svg{width:80px;height:80px}
@media(max-width:650px){body>header{height:48px;padding:0 10px}body>header .brand{font-size:19px}body>header .brand-icon{font-size:27px}body>header nav{gap:10px}#app{padding:8px}.level-intro{padding:12px}.intro-top{margin:8px 0}.level-intro h1{font-size:29px}.intro-columns{grid-template-columns:1fr;gap:8px}.intro-columns>div:first-child{display:none}.intro-recipe{padding:12px}.intro-subtitle{margin:4px 0 8px;font-size:12px}.intro-recipe .primary{min-height:44px}.game-wrap{grid-template-columns:1fr;gap:6px}.game-wrap>.panel.game-stats{width:100%;display:grid;grid-template-columns:minmax(0,1fr) 62px;padding:6px 8px;gap:5px}.game-stats h3{display:none}.game-stats #targets{display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px}.game-stats .target{margin:0}.game-stats .target svg{width:23px;height:23px}.game-stats .target b{font-size:18px}.game-stats .target small{font-size:8px}.game-stats .moves{width:auto;margin:0;padding:3px;font-size:9px}.game-stats .moves b{font-size:25px}.game-center{max-width:min(100%,calc(var(--screen-height,100dvh) - 225px))}.game-head h2{font-size:21px}.game-head{height:40px}.board{gap:2px}.play-actions .text-btn{font-size:10px}.lesson-coach{flex-wrap:wrap;padding:7px}.lesson-coach .chef-mark{display:none}.lesson-controls{flex-direction:row;margin-left:0}.hero{grid-template-columns:1fr}.hero-copy{text-align:center}.hero-copy p{margin:10px auto}.hero .scene{display:none}.hero h1{font-size:40px}.hero-stats{justify-content:center}.worlds{grid-template-columns:1fr 1fr}.world{gap:5px}.world-art{display:none}.world h3{font-size:15px}.world p{font-size:9px}.world .tag{position:static;margin-left:auto;font-size:7px}.map-layout{grid-template-columns:1fr}.map-layout>.chapter-panel{display:none}.map{min-height:330px}.next-chapter{flex-direction:row;gap:10px}.next-chapter p{display:none}.next-chapter h3{font-size:16px}.next-chapter .primary{font-size:11px;padding:10px}.screen-title p{font-size:12px}.group-label{flex-direction:row;font-size:10px}.group-label select{padding:7px}.collection{grid-template-columns:repeat(2,1fr)}.sweet-card h3{font-size:18px}}
@media(orientation:landscape) and (max-height:500px){body>header{height:42px}.level-intro{max-width:850px;padding:10px 16px}.intro-columns{grid-template-columns:1fr 1fr}.intro-columns>div:first-child{display:block}.intro-top{margin:4px 0}.intro-subtitle{display:none}.intro-tray{width:130px;margin:3px auto}.intro-columns>div:first-child>p,.intro-columns>div:first-child>small{display:none}.level-intro h1{font-size:25px}.intro-recipe{padding:8px}.intro-recipe>small,.intro-recipe>h3{display:none}.intro-stars{margin:5px 0;gap:2px}.intro-targets{margin:4px 0}.intro-recipe .tiny{display:none}.game-wrap{grid-template-columns:125px minmax(0,1fr);max-width:760px;margin:auto}.game-wrap>.panel.game-stats{display:block}.game-stats #targets{display:flex}.game-stats .moves{margin-top:7px}.game-center{max-width:min(100%,calc(var(--screen-height,100dvh) - 143px))}.game-head{height:35px;margin-bottom:3px}.game-head .text-btn{min-height:32px}.game-head .icon{height:32px;width:32px}.score-strip{padding:2px}.move-feedback{height:16px;line-height:16px;margin:1px 0}.score-strip small{font-size:7px}.score-strip b{font-size:19px}.star-score small{display:none}.play-actions button{min-height:32px}.preview-note{display:none}.lesson-coach{max-width:760px}.result{max-width:620px}.result .medal{display:none}}
/* Keep dense objective sets and paused timers legible in short landscape frames. */
.trial-cover{padding:12px}.trial-cover>span{font-size:36px}.trial-cover h3{font-size:21px;margin:5px}.trial-cover p{font-size:11px;line-height:1.4;margin:5px}.trial-cover .primary{font-size:13px;padding:10px 14px;margin-top:8px}
@media(orientation:landscape) and (max-height:500px){.game-wrap{grid-template-columns:minmax(180px,240px) minmax(0,1fr);gap:12px}.game-stats #targets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.game-stats .target{margin:0;min-width:0}.game-stats .target small{font-size:8px;overflow-wrap:anywhere}.game-stats .target svg{width:24px;height:24px}.game-stats .target b{font-size:19px}.game-stats .moves b{font-size:24px}.game-stats .moves{padding:5px}.game-stats .ice-symbol,.game-stats .cloud-symbol,.game-stats .crystal-symbol,.game-stats .syrup-symbol{width:24px;font-size:24px}.game-center{max-width:min(100%,calc(var(--screen-height,100dvh) - 122px))}.game-stats h3{margin-bottom:6px}.trial-cover>span{font-size:24px}.trial-cover h3{font-size:17px}.trial-cover p{font-size:10px}.trial-cover .primary{min-height:32px;padding:7px 12px}.intro-recipe .intro-ice{padding:5px;margin-bottom:5px}.intro-recipe .intro-ice p{display:none}.intro-recipe .personal-best{padding:4px}.intro-recipe .primary{padding:8px;margin-top:5px}.intro-recipe .fit-help{min-height:30px}.intro-stars small{font-size:10px}.intro-recipe .personal-best span{font-size:9px}.intro-recipe h3{font-size:16px}}
.board{aspect-ratio:1;grid-auto-rows:minmax(0,1fr)}.board>.tile{display:grid;place-items:center;min-height:0;min-width:0;aspect-ratio:auto}.board>.tile>svg{display:block;width:100%;height:100%}.board>.board-gap{min-height:0;min-width:0}
