@font-face{font-family:Rubik;src:url("assets/fonts/Rubik-variable.ttf") format("truetype");font-weight:300 900;font-display:swap}
*{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden}body{padding:4px 8px 4px 28px;background:#0c0f0e;color:white;font-family:Rubik,Arial,sans-serif}button,input{font:inherit}button{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible{outline:3px solid #fff;outline-offset:3px}button:disabled{cursor:default}button:not(:disabled):active{filter:brightness(.9)}[hidden]{display:none!important}
#game-frame{position:relative;width:100%;height:100%;isolation:isolate;overflow:hidden;border-radius:18px;border:1px solid #737c75;background:#77b1bc}.sky{position:absolute;inset:0;background:linear-gradient(180deg,#55a8bf 0%,#68afbf 32%,#9ab9b5 68%,#c2c2aa 87%)}.soil{position:absolute;left:0;right:0;bottom:0;height:15.6%;background:#68513b url("assets/static/soil.webp") repeat-x left bottom;background-size:auto 100%}#app,#pixi-container{position:absolute;inset:0}canvas{display:block;width:100%;height:100%}.game-logo{position:absolute;top:22px;left:18px;width:178px;height:auto;z-index:2;pointer-events:none}
.controls{position:absolute;z-index:3;bottom:0;left:50%;transform:translateX(-50%);width:min(644px,calc(100% - 32px));height:136px;padding:16px;display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#2c2c2c url("assets/static/control-panel.png") center/100% 100% no-repeat;border-radius:5px 5px 0 0;box-shadow:0 1px 12px #0009}.amount-controls{min-width:0;display:grid;grid-template-rows:48px 46px;gap:8px}.amount-field{display:flex;align-items:center;min-width:0;padding:4px 5px;border:2px solid #a1a1a1;border-radius:12px;background:linear-gradient(160deg,#555 0%,#262626 46%,#414141 100%);box-shadow:inset 0 0 12px #a9a9a94d}.amount-field input{width:0;flex:1;min-width:0;border:0;background:transparent;text-align:center;color:#fff;font-weight:700;font-size:16px;padding:0 4px;outline-offset:0}.step{display:flex;align-items:center;justify-content:center;flex:0 0 34px;height:34px;border:0;border-radius:50%;background:linear-gradient(#343434,#202020);color:#bbb;font-size:24px;font-weight:400;line-height:1}.quick-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.blue-button{border:0;border-radius:8px;color:#fff;font-weight:800;font-size:16px;background:transparent url("assets/static/blue-button.png") center/100% 100% no-repeat;min-width:0;min-height:44px;text-shadow:0 1px 2px #1a4a9c}.build-button{min-height:44px;border:0;border-radius:10px;background:transparent url("assets/static/gold-button-clean.png") center/100% 100% no-repeat;color:#fff;font-size:26px;font-weight:800;text-shadow:0 2px 2px #745200;line-height:1.1}.build-button:disabled{filter:saturate(.75);color:#fffd}.cashout{font-size:23px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px}.cashout span{font-size:20px}.cashout:disabled{filter:brightness(.75)}.game-status{position:absolute;top:10px;left:50%;transform:translateX(-50%);margin:0;padding:8px 12px;border-radius:8px;background:#142a34bb;font-size:14px;z-index:4}.dialog-backdrop{position:absolute;z-index:10;inset:0;display:grid;place-items:center;background:#07151dbb;padding:20px}.win-card{width:min(420px,100%);padding:28px;text-align:center;border:2px solid #f9bd32;border-radius:16px;background:#2c2c2c}.win-card h1{margin:0 0 20px;color:#ffdc4a;font-size:40px}.win-card #win-amount{font-size:28px;font-weight:800;margin:0 0 16px}.demo-note{font-size:14px;line-height:1.5;color:#eee}.win-card button{height:72px;width:100%;margin-top:12px}
@media(max-width:600px){body{padding:4px 8px}#game-frame{border-radius:14px}.game-logo{width:88px;top:12px;left:12px}.controls{width:calc(100% - 16px);height:128px;padding:12px 8px;gap:8px}.amount-controls{grid-template-rows:48px 46px}.blue-button{font-size:14px}.build-button{font-size:22px}.cashout{font-size:18px}.cashout span{font-size:16px}.step{flex-basis:32px}.amount-field{padding:4px 2px}.amount-field input{font-size:15px}.soil{height:16%}}
@media(max-height:500px) and (min-width:601px){.controls{height:112px;padding:10px 12px;grid-template-columns:1fr 1fr;width:520px}.amount-controls{grid-template-rows:44px 44px;gap:4px}.game-logo{width:120px;top:12px}.blue-button{font-size:14px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
/* v2: the gameplay HUD and moving industrial trims */
.left-slot{position:relative;min-width:0;height:100%}.left-slot .amount-controls{height:100%;transition:transform .42s ease,opacity .3s}.controls{--panel-gap:12px;overflow:hidden}.controls.is-playing .amount-controls{transform:translateX(calc(-100% - 24px));opacity:0;pointer-events:none}.cashout{position:absolute;inset:0;width:100%;height:100%;z-index:5;transform:translateX(calc(100% + var(--panel-gap)));will-change:transform}.cashout.is-entering{animation:cashout-slide .48s cubic-bezier(.22,.75,.24,1) forwards}.cashout.is-settled{transform:translateX(0)}.cashout .cashout-label{font-size:23px}.cashout #reward{font-size:20px}.controls.cashout-arriving>#build{opacity:.22;transform:scale(.98);pointer-events:none}.controls>#build{transition:opacity .2s,transform .2s}
@keyframes cashout-slide{from{transform:translateX(calc(100% + var(--panel-gap)))}to{transform:translateX(0)}}
.build-button{position:relative;overflow:hidden;isolation:isolate}.build-button::before,.build-button::after,.controls::before,.win-banner::before{content:"";position:absolute;z-index:1;left:5px;right:5px;height:11px;background:repeating-linear-gradient(-55deg,#ffcf2e 0 10px,#111 10px 20px);background-size:49px 100%;pointer-events:none;animation:stripe-run 1.2s linear infinite}.build-button::before{top:2px;border-radius:3px 3px 0 0}.build-button::after{bottom:2px;animation-direction:reverse;border-radius:0 0 3px 3px}.controls::before{height:3px;left:2px;right:2px;top:0;background-size:29px 100%;animation:panel-stripe 1.8s linear infinite}.button-label{position:relative;z-index:3}.button-shine{position:absolute;z-index:2;inset:12px -40%;background:linear-gradient(110deg,transparent 35%,#fff0 43%,#fff5 49%,#fff0 55%,transparent 65%);transform:translateX(-100%);animation:gold-shine 2.8s ease-in-out infinite;pointer-events:none}.build-button:disabled{filter:brightness(.88);opacity:.85}.build-button:disabled::before,.build-button:disabled::after,.build-button:disabled .button-shine{animation-play-state:paused}
@keyframes stripe-run{to{background-position:49px 0}}@keyframes panel-stripe{to{background-position:29px 0}}@keyframes gold-shine{0%,15%{transform:translateX(-90%)}70%,100%{transform:translateX(90%)}}
.currency-picker{position:absolute;z-index:8;top:16px;right:14px}.currency-toggle{height:44px;min-width:84px;padding:0 12px;display:flex;gap:12px;align-items:center;justify-content:space-between;border:1px solid #f7d166a8;border-radius:8px;background:#25434d99;color:#fff;font-size:14px;font-weight:700;backdrop-filter:blur(8px)}.currency-menu{position:absolute;right:0;top:52px;width:232px;background:#273b40;border:1px solid #efd06d;border-radius:10px;padding:8px;box-shadow:0 8px 24px #0005}.currency-menu p{margin:5px 8px 8px;font-size:14px;font-weight:700;color:#ffe391}.currency-menu button{width:100%;height:44px;display:flex;align-items:center;gap:10px;padding:0 8px;border:0;border-radius:6px;background:transparent;color:#fff;font-size:14px;text-align:left}.currency-menu button:hover,.currency-menu button[aria-checked=true]{background:#ffffff1e}.currency-menu button>span{width:22px;font-size:19px;color:#ffdc72}.currency-menu b{margin-left:auto;font-size:12px;color:#e7e9df}.currency-menu small{display:block;margin:8px;font-size:12px;line-height:1.4;color:#d5dedc}
.results{position:absolute;z-index:3;top:35%;right:14px;width:62px;pointer-events:none;text-align:center}.results h2{font-size:14px;font-weight:700;margin:0 0 13px;color:#fff}.results ol{list-style:none;display:flex;flex-direction:column;align-items:stretch;gap:8px;margin:0;padding:0}.results li{font-size:17px;line-height:28px;font-weight:600;border:1px solid #ffdd5b;border-radius:6px;background:#c3b27a88;color:#fff;animation:result-in .25s ease both}.results li:first-child{background:#d3be7899}@keyframes result-in{from{transform:translateY(-8px);opacity:0}to{transform:none;opacity:1}}
.dialog-backdrop{padding:16px;background:#28404b29;backdrop-filter:blur(5px)}.win-menu{width:min(1000px,100%);text-align:center}.win-banner{position:relative;isolation:isolate;height:200px;overflow:hidden;border-radius:5px;border-top:2px solid #f9d06b;border-bottom:2px solid #d48b11;background:radial-gradient(ellipse at 50% 20%,#ffe888 0%,#ffcb3a 35%,#eaa521 67%,#be7617 100%);box-shadow:0 10px 35px #28170060}.win-banner::before{top:0;left:0;right:0;height:4px;animation:panel-stripe 1.8s linear infinite}.win-banner::after{content:"";position:absolute;inset:0;z-index:-1;background:repeating-conic-gradient(from 0deg at 50% 65%,#fff2 0deg 12deg,#fff0 12deg 24deg);opacity:.35}.win-copy{position:relative;z-index:3;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;pointer-events:none}.win-copy h1{font-size:52px;line-height:1;margin:0;color:#fff1a5;-webkit-text-stroke:2px #fff;paint-order:stroke fill;font-weight:900;letter-spacing:-1.5px;text-shadow:0 3px 2px #b77910}.win-copy p{font-size:28px;font-weight:800;margin:0;line-height:1.2;color:#fff;text-shadow:0 2px 2px #926011}.win-house,.win-lamp{position:absolute;z-index:2;bottom:-2px;width:auto;pointer-events:none;object-fit:contain;filter:drop-shadow(0 2px 2px #78501888)}.house-left-back{height:94%;left:8%}.house-left-front{height:72%;left:17%}.house-right-back{height:72%;right:17%}.house-right-front{height:94%;right:7%}.win-lamp{height:92%;z-index:1}.lamp-left{left:1%}.lamp-right{right:0;transform:scaleX(-1)}.win-menu-footer{position:relative;padding:12px 12px 0;color:#fff;text-shadow:0 1px 3px #000}.win-menu-footer #balance-summary{font-size:14px;margin:0 0 8px;line-height:1.5}.new-round{height:44px;min-width:150px;border:1px solid #f4d06e;border-radius:7px;background:#2b454de6;color:#fff;font-size:14px;font-weight:700;padding:0 16px}.new-round span{font-size:20px;margin-left:10px}.demo-note{margin:9px 0 0;font-size:12px;color:white;line-height:1.5}.win-card{display:none}
@media(max-width:600px){.controls{--panel-gap:8px}.cashout .cashout-label{font-size:18px}.cashout #reward{font-size:16px}.currency-picker{top:12px;right:10px}.currency-toggle{height:44px;min-width:76px;padding:0 10px}.results{right:10px;width:54px;top:31%}.results h2{font-size:12px;margin-bottom:10px}.results li{font-size:14px;line-height:25px}.results ol{gap:6px}.win-banner{height:170px}.win-copy{gap:7px}.win-copy h1{font-size:34px;letter-spacing:-1px;-webkit-text-stroke:1px #fff}.win-copy p{font-size:22px}.house-left-back{height:66%;left:5%}.house-left-front{height:44%;left:12%}.house-right-back{height:44%;right:11%}.house-right-front{height:66%;right:4%}.win-lamp{height:63%}.lamp-left{left:-3%}.lamp-right{right:-4%}.win-copy{padding-bottom:24px}.win-menu-footer{padding-top:12px}.currency-menu{width:222px}.build-button::before,.build-button::after{height:10px}}
@media(prefers-reduced-motion:reduce){.build-button::before,.build-button::after,.controls::before,.win-banner::before,.button-shine,.results li{animation:none!important}.cashout.is-entering{animation:none!important;transform:translateX(0)}.controls.cashout-arriving>#build{opacity:1}.left-slot .amount-controls{transition:none}}

.chevron{display:block;width:7px;height:7px;border-right:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(45deg);margin-top:-3px}.restart-icon{display:inline-block;width:15px;height:15px;border:2px solid white;border-left-color:transparent;border-radius:50%;position:relative;vertical-align:-3px;margin-left:10px!important}.restart-icon::after{content:"";position:absolute;left:-2px;top:-2px;width:5px;height:5px;border-top:2px solid white;border-left:2px solid white;transform:rotate(-12deg)}.currency-menu button>span{font-family:Arial,sans-serif}
@media(max-width:600px){.house-left-front{height:40%;left:11%}.house-right-back{height:40%;right:11%}}
/* v3: result banner replaces the bottom control panel, not the whole screen. */
.preferences{position:absolute;top:16px;right:14px;display:flex;gap:8px;align-items:start;z-index:8}.preferences .currency-picker{position:relative;top:auto;right:auto}.language-control select{height:44px;width:90px;border:1px solid #f7d166a8;border-radius:8px;padding:0 8px;background:#25434dcc;color:#fff;font:700 13px Rubik,Arial,sans-serif;cursor:pointer}.language-control select option{background:#273b40;color:#fff}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.preferences .currency-menu{width:260px;max-width:calc(100vw - 42px)}.currency-menu button>.currency-name,.currency-menu #currency-auto-label{font-family:Rubik,Arial,sans-serif;width:auto;flex:1;font-size:13px;color:#fff;min-width:0;line-height:1.15}.currency-menu button>span:first-child{flex:0 0 22px}.currency-menu b{flex-shrink:0}.currency-menu #currency-auto>span:first-child{font-family:Arial,sans-serif}.currency-menu #currency-auto{border-bottom:1px solid #ffffff28;border-radius:6px 6px 0 0;margin-bottom:4px}
.dialog-backdrop{position:absolute;inset:auto auto 0 50%;transform:translateX(-50%);width:min(644px,calc(100% - 32px));height:136px;padding:0;display:block;background:transparent;backdrop-filter:none;z-index:6;animation:bottom-banner-in .36s cubic-bezier(.2,.7,.2,1) both}.win-menu{position:relative;width:100%;height:100%}.win-banner{width:100%;height:100%;border-radius:5px 5px 0 0;box-shadow:0 -4px 24px #0004}.win-copy{padding:0 0 14px;gap:5px}.win-copy h1{font-size:34px;letter-spacing:-1px;-webkit-text-stroke:1.2px #fff}.win-copy p{font-size:22px}.win-menu .house-left-back{height:94%;left:8%}.win-menu .house-left-front{height:72%;left:17%}.win-menu .house-right-back{height:72%;right:17%}.win-menu .house-right-front{height:94%;right:7%}.win-menu .win-lamp{height:92%}.win-menu .lamp-left{left:1%}.win-menu .lamp-right{right:0}.banner-restart{position:absolute;z-index:4;bottom:4px;left:50%;transform:translateX(-50%);height:28px;min-width:120px;border:0;border-radius:4px;background:transparent;color:#fff;font-size:11px;font-weight:700;text-shadow:0 1px 2px #7b4a00;display:flex;justify-content:center;align-items:center;gap:6px;white-space:nowrap}.banner-restart:hover{background:#9b681444}.banner-restart .restart-icon{width:12px;height:12px;margin-left:0!important}.controls.is-cashed-out{visibility:hidden!important;pointer-events:none}#game-frame .dialog-backdrop~*{filter:none}
@keyframes bottom-banner-in{from{opacity:0;translate:0 100%}to{opacity:1;translate:0 0}}
html[lang=ru-RU] .win-copy h1{font-size:27px;letter-spacing:-.8px}
@media(max-width:600px){.preferences{top:12px;right:10px;gap:6px}.language-control select{width:76px;font-size:12px}.dialog-backdrop{width:calc(100% - 16px);height:128px}.win-copy{padding-bottom:14px;gap:5px}.win-copy h1{font-size:28px;letter-spacing:-1px}.win-copy p{font-size:20px}.win-menu .house-left-back{height:77%;left:2%}.win-menu .house-left-front{height:54%;left:11%}.win-menu .house-right-back{height:54%;right:10%}.win-menu .house-right-front{height:77%;right:2%}.win-menu .win-lamp{height:75%}.win-menu .lamp-left{left:-3%}.win-menu .lamp-right{right:-4%}.banner-restart{font-size:10px;min-width:110px;bottom:2px}html[lang=ru-RU] .win-copy h1{font-size:21px;letter-spacing:-1px}.controls .button-label{font-size:clamp(16px,4.2vw,22px)}}
@media(max-height:500px) and (min-width:601px){.dialog-backdrop{width:520px;height:112px}.win-copy h1{font-size:28px}.win-copy p{font-size:20px}}
@media(prefers-reduced-motion:reduce){.dialog-backdrop{animation:none}}
/* The whole banner is the accessible 128/136px-high new-round click target. */
.banner-restart{inset:0;transform:none;width:100%;height:100%;padding:0 0 6px;align-items:flex-end;min-height:44px}.banner-restart:hover{background:transparent}.banner-restart .restart-icon{margin-bottom:1px}.win-menu .house-left-front,.win-menu .house-right-back{height:62%}.results h2{font-family:Rubik,Arial,sans-serif}
@media(max-width:600px){.win-copy h1{font-size:26px}.win-menu .house-left-front,.win-menu .house-right-back{height:44%}.banner-restart{padding-bottom:4px}.results h2{font-size:11px}html[lang=ru-RU] .win-copy h1{font-size:21px}}

.auto-currency-icon{position:relative;height:20px}.auto-currency-icon::before{content:"";position:absolute;width:12px;height:12px;left:1px;top:3px;border:2px solid #ffdc72;border-left-color:transparent;border-radius:50%}.auto-currency-icon::after{content:"";position:absolute;width:5px;height:5px;left:0;top:2px;border-top:2px solid #ffdc72;border-left:2px solid #ffdc72;transform:rotate(-15deg)}

.preferences .currency-menu{max-height:calc(100dvh - 92px);overflow-y:auto;overscroll-behavior:contain}
/* v4: compact top hamburger menu, visible amount editor, automatic next round. */
.settings-shell{position:absolute;top:6px;right:8px;z-index:20}.settings-toggle{position:relative;width:44px;height:44px;border:0;background:transparent;border-radius:50%;display:grid;place-items:center;padding:0}.settings-toggle::before{content:"";position:absolute;width:29px;height:29px;border-radius:50%;background:#555c5b;border:1px solid #7b8281;box-shadow:0 1px 3px #0005}.hamburger-lines{position:relative;width:14px;height:1.5px;background:#eee;box-shadow:0 -4px 0 #eee,0 4px 0 #eee}.settings-toggle:hover::before{background:#676e6d}.settings-panel{position:absolute;right:2px;top:48px;width:304px;max-width:calc(100vw - 40px);max-height:calc(100dvh - 84px);overflow-y:auto;overscroll-behavior:contain;background:#2d3234;border:1px solid #72797a;border-radius:10px;color:#fff;box-shadow:0 10px 30px #0006;padding:16px}.settings-panel header{display:flex;align-items:center;justify-content:space-between;margin:-5px -7px 10px 0;gap:12px}.settings-panel h2{font-size:18px;margin:0;font-weight:700}.settings-close{width:44px;height:44px;position:relative;border:0;border-radius:7px;background:transparent}.settings-close::before,.settings-close::after{content:"";position:absolute;width:15px;height:1.5px;background:#eee;left:14px;top:21px;transform:rotate(45deg)}.settings-close::after{transform:rotate(-45deg)}.settings-close:hover{background:#ffffff12}.settings-label{display:block;font-size:14px;line-height:1.4;color:#f0f0ed;margin:0 0 7px;font-weight:600}.settings-balance-row{display:flex;align-items:center;position:relative;gap:8px}.settings-balance-row input{height:44px;min-width:0;flex:1;width:0;padding:0 48px 0 10px;color:#fff;background:#1e2426;border:1px solid #7c8485;border-radius:7px;font-size:16px}.settings-balance-row>span{position:absolute;right:116px;color:#c1cbcb;font-size:12px;pointer-events:none}.settings-balance-row>button{height:44px;width:105px;flex:0 0 105px;background:#485c64;color:#fff;border:1px solid #8a9b9f;border-radius:7px;font-size:13px;font-weight:700}.settings-balance-row>button:hover{background:#5a7079}.balance-help{font-family:Arial,sans-serif;font-size:13px;line-height:1.5;color:#c6cccc;margin:8px 0 18px;min-height:39px}.settings-panel .preferences{position:static;display:flex;flex-direction:column;align-items:stretch;gap:18px}.settings-panel .language-control select{width:100%;height:44px;background:#1e2426;border:1px solid #7c8485;font-size:14px}.settings-panel .currency-picker{position:static}.settings-panel .currency-toggle{width:100%;background:#1e2426;border:1px solid #7c8485;color:#fff;backdrop-filter:none;height:44px;border-radius:7px}.settings-panel .currency-menu{position:static;width:100%;max-width:none;max-height:none;box-shadow:none;border:1px solid #778587;background:#222a2d;margin-top:8px;padding:5px}.settings-panel #currency-menu-title{display:none}.settings-panel .currency-menu button{height:44px;padding:0 5px;gap:7px}.settings-panel .currency-name{font-size:12px!important}.settings-panel .currency-menu small{font-size:12px;margin:8px 5px}.amount-currency{font-family:Arial,sans-serif;color:#d6d9da;font-size:11px;padding-right:6px}.amount-field input{font-size:18px}.win-copy{padding-bottom:0}.banner-restart,.win-menu-footer{display:none!important}.dialog-backdrop.is-leaving{animation:bottom-banner-out .25s ease forwards}.win-copy h1{margin:0}.settings-shell [hidden]{display:none!important}@keyframes bottom-banner-out{from{opacity:1;translate:0 0}to{opacity:0;translate:0 100%}}
@media(max-width:600px){.settings-shell{top:4px;right:6px}.settings-panel{right:0;width:300px;padding:14px}.amount-currency{font-size:10px;padding-right:3px}.amount-field input{font-size:16px}.amount-settings .balance-help{font-size:13px}.win-copy{padding-bottom:0}}
@media(prefers-reduced-motion:reduce){.dialog-backdrop.is-leaving{animation:none;opacity:0}}

/* v5: portrait iPhone layout, matching the supplied two-row control reference. */
.mobile-header{display:none}
@media(max-width:600px){
 html,body{width:100%;height:100%;height:100dvh;overscroll-behavior:none}
 body{padding:0;background:#303030}
 #game-frame{width:100%;height:100%;border:0;border-radius:0;--panel-height:calc(138px + env(safe-area-inset-bottom,0px));--top-height:calc(48px + env(safe-area-inset-top,0px))}
 .mobile-header{position:absolute;inset:0 0 auto;height:var(--top-height);padding:calc(5px + env(safe-area-inset-top,0px)) 16px 5px 64px;display:flex;flex-direction:column;justify-content:center;align-items:flex-end;gap:2px;z-index:4;background:repeating-linear-gradient(132deg,#303030 0 23px,#353535 23px 46px);border-bottom:1px solid #ffffff24}
 .mobile-demo{font:600 10px Arial,sans-serif;color:#c5d3c4;letter-spacing:1px}
 #mobile-total{font-size:17px;line-height:21px;font-variant-numeric:tabular-nums;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .game-logo{display:none}
 .settings-shell{left:8px;right:auto;top:calc(2px + env(safe-area-inset-top,0px))}
 .settings-toggle::before{display:none}.hamburger-lines{width:19px;height:2px;box-shadow:0 -6px 0 #eee,0 6px 0 #eee}
 .settings-panel{left:0;right:auto;top:48px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 72px - env(safe-area-inset-top,0px));width:320px}
 .controls{width:100%;height:var(--panel-height);left:0;transform:none;grid-template-columns:1fr;grid-template-rows:48px 58px;gap:10px;padding:12px 8px calc(10px + env(safe-area-inset-bottom,0px));border-radius:0;background-color:#303030;background-size:100% 100%;--panel-gap:8px}
 .left-slot{height:48px;width:100%}
 .left-slot .amount-controls{height:48px;display:grid;grid-template-columns:1fr 1.9fr 1fr;grid-template-rows:48px;gap:8px}
 .quick-controls{display:contents}
 #all-in{grid-column:1;grid-row:1}#double{grid-column:3;grid-row:1}
 .amount-field{grid-column:2;grid-row:1;padding:0;border-width:1px;border-radius:9px;min-width:0;position:relative}
 .step{flex:0 0 44px;height:44px;font-size:26px;background:radial-gradient(circle,#242424 60%,transparent 64%)}
 .amount-field input{font-size:16px;padding:0;min-width:0}
 .amount-currency{display:none}
 .blue-button{font-size:16px;border-radius:9px;min-height:48px}
 .build-button{width:100%;height:58px;border-radius:9px}
 .controls .button-label{font-size:23px;letter-spacing:.5px}
 .build-button::before,.build-button::after{height:9px}
 .cashout{inset:0;display:flex;flex-direction:row;gap:14px;height:48px}
 .cashout .cashout-label{font-size:18px}.cashout #reward{font-size:18px}
 .controls.is-playing .amount-controls{transform:translateX(calc(-100% - 16px))}
 .soil{bottom:var(--panel-height);height:min(64px,8dvh);background-size:auto 100%}
 .results{top:calc(var(--top-height) + 16px);right:10px;width:58px}
 .results h2{font-size:12px;text-shadow:0 1px 3px #254550;margin-bottom:8px}
 .results li{background:#365c65dc;line-height:26px;font-size:14px}
 .dialog-backdrop{width:100%;height:var(--panel-height);left:0;transform:none;bottom:0}
 .win-banner{border-radius:0;padding-bottom:env(safe-area-inset-bottom,0px)}
 .win-copy{z-index:3}.win-copy p{font-size:22px}
 .win-menu .house-left-back,.win-menu .house-right-front{height:69%}
 .game-status{top:calc(var(--top-height) + 8px);max-width:85%;text-align:center}
}

/* v6: no fixed soil strip; cloud follows the sky, not the rising tower. */
.soil{display:none!important}
.sky-cloud{position:absolute;z-index:0;left:0;top:12%;width:clamp(260px,48vw,560px);pointer-events:none;will-change:transform;animation:sky-cloud-crossing 32s linear infinite}
.sky-cloud img{display:block;width:100%;height:auto}
@keyframes sky-cloud-crossing{from{transform:translateX(-100%)}to{transform:translateX(calc(100vw + 20px))}}
@media(max-width:600px){.sky-cloud{top:calc(var(--top-height) + 46px);width:78vw;max-width:380px}}
@media(prefers-reduced-motion:reduce){.sky-cloud{animation:none;transform:translateX(16vw)}}

/* v7: reference-style high-win overlay and profile strip. */
.profile-status{display:flex;align-items:center;gap:5px;font:600 11px Arial,sans-serif;color:#c7c9c5;line-height:13px}
.signal-bars{display:flex;align-items:flex-end;gap:2px;height:13px}
.signal-bars i{display:block;width:3px;background:#69b83d;border-radius:1px;box-shadow:0 0 3px #69b83d33}
.signal-bars i:nth-child(1){height:4px}.signal-bars i:nth-child(2){height:7px}.signal-bars i:nth-child(3){height:10px}.signal-bars i:nth-child(4){height:13px}
.big-win-card{display:none}
.dialog-backdrop.is-big-win{inset:0;left:0;bottom:0;transform:none;translate:none;width:100%;height:100%;z-index:30;display:grid;place-items:center;padding:100px 16px 32px;background:#071725b8;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);animation:big-win-reveal .28s ease both}
.is-big-win .win-menu{display:none}
.is-big-win .big-win-card{display:block;position:relative;width:min(580px,100%);aspect-ratio:1.36;max-height:76dvh;border:2px solid #9a8b54;border-radius:18px;outline:none;background:linear-gradient(180deg,#382b25 0%,#211b18 45%,#050505 100%);box-shadow:0 12px 48px #0004;isolation:isolate}
.big-win-card::before{content:"";position:absolute;inset:34% 0 27%;z-index:-1;background:repeating-linear-gradient(130deg,#8d6e2510 0 48px,transparent 48px 96px);border-radius:inherit;pointer-events:none}
.big-win-art{position:absolute;left:16%;top:-24%;width:68%;height:46%;pointer-events:none}
.big-win-art img{position:absolute;bottom:0;width:auto;object-fit:contain;filter:drop-shadow(0 0 8px #e7d06777)}
.big-house-left{height:82%;left:0;z-index:1}.big-house-center{height:117%;left:28%;z-index:3}.big-house-right{height:82%;right:0;z-index:2;filter:drop-shadow(0 0 9px #fff27088)!important}
.big-win-glow{position:absolute;inset:-26% -14% -20%;border-radius:50%;background:radial-gradient(ellipse,#ffed8b8c 0%,#d8bd3d36 35%,transparent 68%);filter:blur(8px)}
.big-win-art::after{content:"";position:absolute;inset:-22% -18%;background:radial-gradient(circle at 12% 60%,#ffe88b 0 1px,transparent 3px),radial-gradient(circle at 21% 32%,#ffec9d 0 2px,transparent 4px),radial-gradient(circle at 85% 44%,#ffe88b 0 1px,transparent 4px),radial-gradient(circle at 72% 12%,#fff3a2 0 1px,transparent 4px),radial-gradient(circle at 93% 73%,#ffe88b 0 2px,transparent 4px),radial-gradient(circle at 38% 9%,#fff3a2 0 1px,transparent 3px);filter:drop-shadow(0 0 4px #ffde64);pointer-events:none}
.big-win-copy{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:14px;padding:24% 12px 7%;text-align:center;color:white;position:relative;z-index:4}
.big-win-copy>p:first-child{font:400 clamp(16px,2.5vw,23px)/1.3 Arial,sans-serif;color:#f1efeb;margin:0}
.big-win-copy h1{font-size:clamp(26px,4vw,39px);line-height:1.1;margin:0;font-weight:800}
.big-win-copy #big-win-amount{font-size:clamp(28px,4.6vw,48px);font-weight:700;line-height:1.2;max-width:100%;margin:2px 0 0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.dialog-backdrop.is-big-win.is-leaving{animation:big-win-exit .25s ease forwards}
@keyframes big-win-reveal{from{opacity:0}to{opacity:1}}@keyframes big-win-exit{from{opacity:1}to{opacity:0}}
@media(max-width:600px){.is-big-win .big-win-card{border-radius:16px}.big-win-copy{gap:13px}.big-win-copy #big-win-amount{font-size:clamp(25px,7.5vw,36px)}}
@media(max-height:500px) and (min-width:601px){.dialog-backdrop.is-big-win{padding:64px 16px 12px}.is-big-win .big-win-card{width:340px;aspect-ratio:1.6}.big-win-copy{gap:8px}.big-win-copy h1{font-size:26px}.big-win-copy #big-win-amount{font-size:30px}.big-win-copy>p:first-child{font-size:16px}}
@media(prefers-reduced-motion:reduce){.dialog-backdrop.is-big-win,.dialog-backdrop.is-big-win.is-leaving{animation:none}}

/* v8: slow build stripes, a stationary panel trim, and camera-bound soil. */
.build-button::before,.build-button::after{animation-duration:5s}
.controls::before{animation:none!important}
.soil{display:block!important;bottom:0;height:calc(136px + min(64px,8dvh));background-size:auto 100%;will-change:transform;pointer-events:none}
@media(max-width:600px){.soil{bottom:0;height:calc(var(--panel-height) + min(64px,8dvh))}}
@media(min-width:601px){.mobile-header{position:absolute;top:10px;right:60px;z-index:3;display:flex;flex-direction:column;align-items:flex-end;gap:4px;padding:8px 12px;border-radius:8px;background:#203f4973;pointer-events:none}.mobile-header #mobile-total{font-size:20px;font-weight:700;line-height:1.2}.mobile-header .profile-status{font-size:11px}}
@media(max-height:500px) and (min-width:601px){.soil{height:calc(112px + min(64px,8dvh))}}

/* v9: reference balance typography, light result labels, and two-column cashout. */
.mobile-header #mobile-total{display:flex;align-items:baseline;justify-content:flex-end;gap:5px;max-width:100%;font-family:Rubik,Arial,sans-serif;font-size:18px;line-height:1.2;letter-spacing:.1px;font-variant-numeric:tabular-nums;white-space:nowrap}
#balance-number{font-weight:600}#balance-currency{font-weight:300;color:#b9b9b9}
.profile-status{font-family:Rubik,Arial,sans-serif;font-weight:400;color:#b9b9b9}
.results{top:calc(var(--scene-top,0px) + var(--scene-height,640px) * .29);right:14px;width:62px}
.results h2{font-size:14px;line-height:1.2;font-weight:400;text-shadow:none;margin:0 0 9px}
.results li{font-size:17px;line-height:28px;font-weight:300;background:#adab7480;border:1px solid #f3d35d;border-radius:7px;color:#fff;letter-spacing:.1px}
.results li:first-child{background:#adab7480}.results ol{gap:6px}
.soil{height:calc(var(--current-panel-height,136px) + min(64px,8dvh))}
@media(max-width:600px){
 .mobile-header #mobile-total{font-size:18px;font-weight:400;overflow:visible}
 .profile-status{font-size:12px}
 .results{right:9px;width:58px;top:calc(var(--scene-top,48px) + var(--scene-height,640px) * .29)}
 .results h2{font-size:14px;margin-bottom:8px;font-weight:400}
 .results li{font-size:16px;font-weight:300;line-height:26px}
 .controls.is-playing{height:calc(90px + env(safe-area-inset-bottom,0px));grid-template-columns:1fr 1fr;grid-template-rows:68px;gap:8px;padding:12px 8px calc(10px + env(safe-area-inset-bottom,0px))}
 .controls.is-playing .left-slot{height:68px}
 .controls.is-playing .cashout{height:68px;flex-direction:column;gap:4px;justify-content:center;align-items:center;border-radius:9px;padding:4px}
 .controls.is-playing .cashout .cashout-label{font-size:20px;font-weight:700;line-height:1.1}
 .controls.is-playing .cashout #reward{font-size:18px;font-weight:300;line-height:1.2;white-space:nowrap;max-width:100%}
 .controls.is-playing #build{height:68px;min-width:0}
 .controls.is-playing .button-label{font-size:24px;letter-spacing:.2px}
 html[lang=ru-RU] .controls.is-playing .button-label{font-size:18px;letter-spacing:0}
 .soil{height:calc(var(--current-panel-height,var(--panel-height)) + min(64px,8dvh))}
 .dialog-backdrop:not(.is-big-win){height:var(--current-panel-height,138px)}
 .win-copy p{font-size:20px}.win-copy h1{font-size:25px}
 html[lang=ru-RU] .win-copy h1{font-size:20px}
}
@media(min-width:601px){.mobile-header #mobile-total{font-size:20px}}
/* Do not let focus scroll the clipped game world after a panel-height change. */
@supports(overflow:clip){#game-frame{overflow:clip}}
#game-frame{overflow-anchor:none}

/* v10: regular balance figures and no currency suffix inside the stake field. */
#balance-number{font-weight:400}
.amount-currency{display:none!important}
.results li.result-pending{opacity:0;animation:none}
.results li.result-arrived{animation:result-dock .12s ease-out both}
@keyframes result-dock{from{transform:scale(.94);opacity:.8}to{transform:scale(1);opacity:1}}
@media(prefers-reduced-motion:reduce){.results li.result-arrived{animation:none}}

/* v11: compact balance like the supplied reference; the round total is bold. */
.mobile-header #mobile-total{font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:1.2;letter-spacing:0;gap:4px}
#balance-number{font-weight:700}#balance-currency{font-weight:400;color:#b9b9b9}
.profile-status{font-family:Arial,Helvetica,sans-serif;font-weight:400}
.cashout #reward,.controls.is-playing .cashout #reward{font-weight:700}
@media(min-width:601px){.mobile-header #mobile-total{font-size:18px}}

/* v12: bold history, light cashout total, and balance selection in settings. */
.results li{font-weight:700}
.cashout #reward,.controls.is-playing .cashout #reward{font-weight:300}

/* v13: reference weights, no artificial wait for the BUILD transition. */
.results li{font-weight:300}
.cashout #reward,.controls.is-playing .cashout #reward{font-weight:350}
.controls.cashout-arriving>#build{opacity:1;transform:none;pointer-events:auto}
.build-button.is-queued{filter:brightness(1.08);opacity:1}
.sky-cloud{animation:sky-cloud-drift 38s ease-in-out infinite alternate}
@keyframes sky-cloud-drift{from{transform:translateX(-18%)}to{transform:translateX(100vw)}}
@media(max-width:600px){.results li{font-size:15px;line-height:25px;font-weight:300}.controls.is-playing .cashout #reward{font-size:17px}}
@media(prefers-reduced-motion:reduce){.sky-cloud{animation:none;transform:translateX(-18%)}}

.results{top:calc(var(--scene-top,0px) + var(--scene-height,640px) * .305)}

.sky-cloud{top:calc(var(--scene-top,0px) + var(--scene-height,640px) * .27)}
/* Keep CASHOUT's entrance inside its own column while BUILD stays usable. */
.left-slot{overflow:hidden;border-radius:9px}
.left-slot button:focus-visible,.left-slot input:focus-visible{outline-offset:-3px}
.cashout.is-entering{animation:cashout-fade .14s ease-out both;transform:translateX(0)}
@keyframes cashout-fade{from{opacity:.3}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.cashout.is-entering{animation:none!important}}

/* v17: stable world geometry across the first CASHOUT layout switch. */
.results[hidden]{display:none!important}
.soil{height:calc(var(--scene-panel-height,var(--current-panel-height,136px)) + min(64px,8dvh))}

/* v20: height-driven reference sky. Do not desaturate the whole canvas. */
.sky{background:linear-gradient(180deg,rgb(var(--sky-top,105,167,178)) 0%,rgb(var(--sky-bottom,167,180,154)) 100%)}
.reference-clouds{position:absolute;inset:var(--scene-top,0px) 0 calc(var(--scene-panel-height,138px) + min(64px,8dvh));overflow:hidden;z-index:0;pointer-events:none}
.reference-cloud{position:absolute;top:0;width:26%;height:auto;opacity:1;will-change:transform;pointer-events:none}
.reference-cloud-a{left:-4%}.reference-cloud-b{left:81%;width:24%;opacity:.8;scale:-1 1}

.currency-menu button>span:first-child{font-size:15px;white-space:nowrap}
@media(max-width:600px){
 html[lang=vi-VN] .controls .button-label{font-size:20px}
 html[lang=vi-VN] .controls.is-playing .button-label{font-size:18px}
 html[lang=fil-PH] .controls .button-label{font-size:21px}
 html[lang=tg-TJ] .controls.is-playing .cashout-label{font-size:17px}
 .settings-panel .currency-name{overflow-wrap:normal}
}
.settings-panel .currency-menu button>span:first-child{flex-basis:34px;width:34px;text-align:center}
html[lang=tg-TJ] .results h2{font-size:11px;letter-spacing:-.2px}

/* v23: converted multi-million balances and stakes must not overflow. */
.amount-field input{font-variant-numeric:tabular-nums}
@media(max-width:600px){.amount-field input{font-size:14px}.controls.is-playing .cashout #reward{font-size:clamp(12px,3.7vw,17px)}}

/* v24: game UI must not select text or open the iOS long-press callout.
   Keep native selection/copy/paste available in editable money fields. */
#game-frame,#game-frame *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#game-frame input,#game-frame textarea,#game-frame [contenteditable="true"],#game-frame [contenteditable="true"] *,#game-frame [contenteditable="plaintext-only"],#game-frame [contenteditable="plaintext-only"] *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
#game-frame button,#game-frame button *,#game-frame img,#game-frame canvas{-webkit-user-drag:none}

/* v4: Thai fallback and regional Spanish labels. */
html[lang^="th"] body,html[lang^="th"] button,html[lang^="th"] select,html[lang^="th"] input{font-family:"Noto Sans Thai",Tahoma,Arial,sans-serif}
.settings-panel .currency-menu button{height:auto;min-height:44px;padding-top:8px;padding-bottom:8px}
.settings-panel .currency-name{white-space:normal;overflow-wrap:anywhere;line-height:1.3}
html[lang^="th"] .controls .button-label{font-size:24px}
