:root{--number-header-height:105px;--number-page:#f7f1e5}
html,body{height:100%;background:var(--number-page)}body{height:100dvh;overflow:hidden}
header{height:var(--number-header-height)!important;min-height:0!important;padding:6px 170px!important;background:var(--number-page);flex:none;z-index:30}
header .brand{display:none!important}header h1 .game-wordmark{width:330px!important;max-width:47vw!important;height:92px!important;object-fit:contain}
header .top-left-controls{position:absolute;left:16px;top:16px;display:flex;align-items:center;gap:8px}
header .top-left-controls .icon{width:39px!important;height:39px!important}
#music{position:absolute!important;right:16px!important;top:16px!important;width:39px!important;height:39px!important;padding:0!important;font-size:25px!important}
#level,#open-number-selector,#start,#reward-home{display:none!important}
main{position:absolute;top:calc(var(--number-header-height) + 10px);bottom:8px;left:0;right:0;padding:0 12px;max-width:none;width:100%;margin:0;min-height:0}
#play{grid-template-rows:minmax(0,1fr) 26px}#board{border-radius:0}
body[data-number-screen="home"] main{top:calc(var(--number-header-height) + 24px);bottom:100px}
#welcome{height:100%;width:100%;gap:0}#welcome .title-number{height:100%!important;width:100%!important;max-height:none!important;min-height:0;display:flex;align-items:center;justify-content:center}
#welcome .maths-classroom{height:100%;width:100%;max-width:100%;max-height:100%;object-fit:contain}
#reward{grid-template-rows:minmax(0,1fr) auto!important;gap:8px}#reward nav{display:none!important}#story-image.rich-reward{max-width:none}#story-text{padding:0 195px 14px;font-size:clamp(17px,2vw,25px)}
.number-selector-footer{position:fixed;bottom:12px;right:14px;left:auto;width:190px;height:78px;padding:0;background:transparent;z-index:110;display:block}
body[data-number-screen="home"] .number-selector-footer{left:50%;right:auto;transform:translateX(-50%);bottom:16px;width:206px}
.number-spinner{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;gap:7px;padding:7px;border:3px solid #b9954e;border-radius:18px;background:repeating-linear-gradient(2deg,transparent 0 4px,#3a200e16 5px 6px),linear-gradient(#96704a,#67482c);box-shadow:inset 0 2px 1px #f5d89988,inset 0 -3px 2px #24190e99,0 3px 2px #412a2050;touch-action:pan-y;user-select:none}
.number-spinner:before,.number-spinner:after{content:'';position:absolute;top:3px;width:5px;height:5px;border:1px solid #684c23;border-radius:50%;background:#e4bf71}.number-spinner:before{left:6px}.number-spinner:after{right:6px}
.number-selector-window{height:58px;flex:1;min-width:0}.number-spinner-track{height:100%;width:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;border:2px solid #bda467;border-radius:9px;background:linear-gradient(#e4d3ad,#fff3d2);box-shadow:inset 0 2px 4px #36230e50}
.number-spinner-glyph{height:100%;width:100%;border:0;background:transparent;padding:3px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.number-glyph-digits{display:flex;align-items:center;justify-content:center;gap:1px;height:49px;max-width:100%}.number-selector-art{display:inline-block;background-repeat:no-repeat;height:100%;flex:none}
.number-glyph-digits[data-digits="3"]{height:40px}.number-spinner-arrow{flex:none;width:30px;height:30px;padding:0;font:26px Georgia;line-height:25px;border:1px solid #6b4c24;border-radius:50%;background:linear-gradient(#f4dc91,#ba8b44);color:#573e21;box-shadow:inset 0 1px #fff6cf,0 2px #442b17;cursor:pointer}
.number-spinner-arrow:active{transform:translateY(2px)}.number-spinner-glyph:focus-visible,.number-spinner-arrow:focus-visible{outline:3px solid #3c8990;outline-offset:2px}
#number-selector-dialog{border:2px solid #b9954e;border-radius:20px;background:#f7f1e5;padding:22px;max-width:94vw}#number-selector-dialog .number-spinner{width:210px;height:78px}#number-selector-dialog::backdrop{background:#2e223f70}.selector-close{position:absolute;right:5px;top:2px;background:none;border:0;font-size:24px}.selector-label{text-align:center}.selector-confirm{display:block;margin:20px auto 0;background:#376f7e;color:white;border:0;border-radius:12px;padding:10px 22px}
#board .collision-dust{scale:var(--dust-scale,1)!important}
@media(max-height:650px){:root{--number-header-height:85px}header h1 .game-wordmark{height:75px!important}body[data-number-screen="home"] main{bottom:86px}.number-selector-footer{width:175px;height:68px}.number-selector-window{height:48px}.number-glyph-digits{height:41px}.number-glyph-digits[data-digits="3"]{height:34px}}
@media(max-width:600px){header{padding-inline:100px!important}header h1 .game-wordmark{max-width:49vw!important}header .top-left-controls{left:8px;gap:5px}header .top-left-controls .icon,#music{width:28px!important;height:28px!important}#music{right:8px!important;font-size:20px!important}.number-selector-footer{width:175px;right:8px}#story-text{padding:0 185px 10px 4px;text-align:left;font-size:17px}main{padding-inline:4px}}
.number-glyph-digits[data-digits="2"]{height:44px}.number-glyph-digits[data-digits="3"]{height:36px}
@media(max-width:600px),(max-height:650px){.number-glyph-digits[data-digits="2"]{height:35px}.number-glyph-digits[data-digits="3"]{height:30px}}

/* Larger wordmark and opening film, while reserving space for the selector. */
:root{--number-header-height:136px}
header h1 .game-wordmark{width:450px!important;height:123px!important;max-width:52vw!important}
body[data-number-screen="home"] main{position:fixed;top:calc(var(--number-header-height) + 12px);bottom:94px}
@media(max-height:650px){:root{--number-header-height:110px}header h1 .game-wordmark{height:99px!important}body[data-number-screen="home"] main{top:calc(var(--number-header-height) + 10px);bottom:88px}}
@media(max-width:600px){header h1 .game-wordmark{max-width:49vw!important;height:99px!important}:root{--number-header-height:110px}}
body[data-number-screen="home"] #welcome{display:block!important;padding:0!important;position:relative!important}
body[data-number-screen="home"] #titleNumber{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
body[data-number-screen="home"] #welcome .maths-classroom{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important}
