:root{--bg:#f3f1eb;--surface:#faf9f5;--ink:#29382f;--muted:#72786f;--accent:#377566;--accent-soft:#e3ebe2;--line:#dcded4;--subtle:#e9e9e0;--button:#303f36;--button-text:#fbfbf5;--shadow:rgba(44,51,43,.09);--overlay:rgba(234,234,225,.69);--error:#b07153;color-scheme:light;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-synthesis:none}
:root[data-theme=dark]{--bg:#191d2a;--surface:#232838;--ink:#e6e5ef;--muted:#a2a5b7;--accent:#b1a4eb;--accent-soft:#353249;--line:#373c50;--subtle:#272d3d;--button:#d8d0f1;--button-text:#272438;--shadow:rgba(0,0,0,.20);--overlay:rgba(17,21,33,.76);--error:#dfaa91;color-scheme:dark}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;background:var(--bg);color:var(--ink)}body{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation;transition:background-color .3s,color .3s}button,input,select{font:inherit}button{appearance:none;-webkit-appearance:none;cursor:pointer;border:0;color:inherit;background:none;touch-action:manipulation}button:disabled{cursor:default}button:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid var(--accent);outline-offset:4px}button{transition:background .16s,color .16s,transform .16s,opacity .16s}button:not(:disabled):active{transform:scale(.96)}svg{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}h1,h2,p{margin:0}h1,h2{font-weight:450}button strong{font-weight:550}button small{display:block}button[hidden],[hidden]{display:none!important}.svg-defs{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}#app{position:relative;width:100%;height:100%;height:100dvh;min-height:280px;isolation:isolate}#ui{position:absolute;inset:0;pointer-events:none}.screen{position:absolute;inset:0;pointer-events:none}.screen button,.screen nav,.screen input,.screen select{pointer-events:auto}.screen[hidden]{display:none}#stage{position:absolute;touch-action:none;transition:opacity .3s;overflow:hidden}#cube{display:block;width:100%;height:100%;touch-action:none;outline:none;cursor:grab}.loading-screen{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:24px;background:var(--bg);z-index:20;color:var(--muted);font-size:18px}.loading-logo{width:50px;height:50px;color:var(--accent);stroke-width:1.1;animation:loading-turn 2s ease-in-out infinite}@keyframes loading-turn{50%{transform:translateY(-6px);opacity:.6}}
body[data-screen=home] #stage{left:44%;right:2%;top:14%;bottom:15%}.home-header{position:absolute;top:max(32px,env(safe-area-inset-top));left:5.4%;right:4.2%;display:flex;align-items:center;justify-content:space-between}.wordmark{display:flex;align-items:center;gap:14px;font-size:21px;letter-spacing:.23em;font-weight:550;white-space:nowrap}.wordmark svg{width:33px;height:33px;stroke-width:1.25}.wordmark.small{font-size:16px;letter-spacing:.24em;font-weight:500}.icon-button{width:48px;height:48px;min-width:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid var(--line);background:transparent}.icon-button svg{width:22px;height:22px}.icon-button.subtle{border-color:transparent}.icon-button:disabled{opacity:.28}.hero-copy{position:absolute;left:7.2%;top:23.5%;width:40%}.eyebrow{font-size:12px;line-height:1.45;letter-spacing:.18em;text-transform:uppercase;font-weight:550;color:var(--muted)}.hero-copy .eyebrow{margin-bottom:26px;color:var(--accent)}.hero-copy h1{font-size:clamp(46px,5.2vw,80px);line-height:1.08;letter-spacing:-.052em;font-weight:400}.hero-intro{font-size:clamp(17px,1.4vw,21px);line-height:1.65;color:var(--muted);margin-top:25px;letter-spacing:-.016em}.home-actions{position:absolute;left:7.2%;top:65%;width:330px;max-width:34%}.primary-button{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:66px;width:100%;padding:16px 24px;border-radius:18px;background:var(--button);color:var(--button-text);font-size:20px;font-weight:500;letter-spacing:-.015em;text-align:left}.primary-button svg{width:27px;height:27px;stroke-width:1.6}.home-play{min-height:80px;padding:15px 24px}.home-play strong{font-size:23px;line-height:1.4}.home-play small{font-size:13px;letter-spacing:.04em;line-height:1.5;opacity:.67;font-weight:400}.home-links{display:flex;justify-content:space-between;gap:14px;margin-top:12px}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:46px;font-size:16px;line-height:1.3;padding:8px 4px;font-weight:450}.text-button svg{width:21px;height:21px;stroke-width:1.55}.new-dot{width:5px;height:5px;background:var(--accent);border-radius:50%;align-self:center;margin-left:-4px}.home-footer{position:absolute;left:7.2%;right:5.2%;bottom:max(23px,env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:space-between;gap:20px}.home-footer p{font-size:14px;color:var(--muted)}.home-footer .text-button{font-size:15px;gap:8px}.hero-caption{position:absolute;bottom:17%;left:56%;width:32%;color:var(--muted);display:flex;gap:10px;align-items:center;justify-content:center;pointer-events:none;font-size:13px;letter-spacing:.03em}.hero-caption svg{width:16px;height:16px;stroke-width:1.3}.caption-line{width:30px;height:1px;background:var(--line);margin-right:3px}
body[data-screen=game] #stage{left:0;right:0;top:105px;bottom:139px}.game-header{position:absolute;top:max(24px,env(safe-area-inset-top));left:5%;right:5%;display:flex;justify-content:space-between;align-items:center;max-width:1200px;margin:auto}.level-heading{text-align:center}.level-heading .eyebrow{font-size:11px;letter-spacing:.17em}.level-heading h2{font-size:24px;letter-spacing:-.035em;line-height:1.4;font-weight:500}.game-header>.icon-button{border-color:transparent}.progress-track{position:absolute;top:99px;left:7%;right:7%;height:2px;background:var(--line);overflow:hidden;border-radius:2px;max-width:1100px;margin:auto}#game-progress{height:100%;width:0;background:var(--accent);transition:width .45s ease-out}.remaining{position:absolute;top:139px;left:max(8%,calc((100vw - 1060px)/2));text-align:center;display:flex;flex-direction:column;gap:5px;min-width:72px;pointer-events:none}.remaining>span{font-size:12px;color:var(--muted);letter-spacing:.06em}.remaining strong{font-size:39px;font-weight:350;font-variant-numeric:tabular-nums;letter-spacing:-.06em}.view-tools{position:absolute;right:max(7%,calc((100vw - 1100px)/2));top:140px;display:flex;gap:8px;flex-direction:column}.view-tools .icon-button{background:color-mix(in srgb,var(--bg) 70%,transparent)}.game-bottom{position:absolute;bottom:max(19px,env(safe-area-inset-bottom));left:0;right:0;display:flex;flex-direction:column;align-items:center;gap:24px}.face-indicators{display:flex;gap:7px;height:7px;align-items:center}.face-indicators i{width:7px;height:7px;border:1px solid var(--muted);border-radius:2px;opacity:.50;transition:background .3s,border .3s}.face-indicators i.done{background:var(--accent);border-color:var(--accent);opacity:.85}.game-controls{display:flex;align-items:stretch;justify-content:center;gap:24px;min-width:360px}.game-controls>button{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:106px;max-width:180px;gap:9px;padding:0 8px 5px;font-size:14px;line-height:1.25;color:var(--muted)}.control-icon{position:relative;display:flex;width:43px;height:36px;align-items:center;justify-content:center;color:var(--ink)}.control-icon svg{width:25px;height:25px;stroke-width:1.45}.control-icon i{position:absolute;right:-7px;top:-5px;min-width:20px;min-height:20px;display:flex;align-items:center;justify-content:center;padding:2px 4px;background:var(--accent-soft);border-radius:8px;font-style:normal;font-size:11px;line-height:1;color:var(--accent);font-weight:650}.tutorial{position:absolute;left:50%;transform:translateX(-50%);bottom:152px;width:max-content;max-width:min(510px,88%);display:flex;align-items:center;justify-content:center;gap:12px;background:color-mix(in srgb,var(--surface) 94%,transparent);border:1px solid var(--line);border-radius:16px;padding:12px 12px 12px 17px;box-shadow:0 6px 24px var(--shadow);pointer-events:auto;z-index:2}.tutorial-dot{width:7px;height:7px;flex-shrink:0;border-radius:50%;background:var(--accent)}.tutorial p{font-size:15px;line-height:1.45}.tutorial-close{width:32px;height:32px;min-width:32px;display:flex;align-items:center;justify-content:center;color:var(--muted)}.tutorial-close svg{width:17px;height:17px}
.page-header{position:absolute;top:max(24px,env(safe-area-inset-top));left:5%;right:5%;display:flex;align-items:center;justify-content:space-between}.page-header .icon-button{border-color:transparent}.levels-screen{overflow:auto;overscroll-behavior:contain;pointer-events:auto}.levels-content{max-width:650px;padding:120px 24px 24px;margin:0 auto;min-height:100%}.page-title{text-align:center}.page-title .eyebrow{font-size:11px;letter-spacing:.12em;margin-bottom:8px}.page-title h1{font-size:42px;letter-spacing:-.045em;font-weight:400;line-height:1.1}.page-title>p:last-child{margin-top:10px;font-size:16px;color:var(--muted)}.chapter-heading{display:flex;align-items:center;justify-content:space-between;margin:33px 0 23px;gap:16px}.chapter-heading>div{text-align:center}.chapter-heading .eyebrow{font-size:10px;letter-spacing:.1em}.chapter-heading h2{font-size:24px;line-height:1.45;letter-spacing:-.025em}.chapter-heading .icon-button{width:40px;height:40px;min-width:40px}.level-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.level-tile{position:relative;aspect-ratio:1.14;border:1px solid var(--line);border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:25px;font-weight:400;letter-spacing:-.035em;background:transparent;min-height:56px}.level-tile:disabled{color:var(--muted);opacity:.44}.level-tile.current{background:var(--button);color:var(--button-text);border-color:var(--button);box-shadow:0 5px 15px var(--shadow)}.level-tile.completed{background:var(--accent-soft);border-color:transparent;color:var(--accent)}.level-tile .tile-check{width:12px;height:12px;position:absolute;bottom:7px;right:8px;stroke-width:2}.level-tile .tile-perfect{width:4px;height:4px;position:absolute;bottom:9px;left:10px;border-radius:50%;background:currentColor}.level-tile .tile-lock{width:11px;height:11px;position:absolute;bottom:7px;right:8px;opacity:.8}.chapter-note{text-align:center;min-height:40px;margin-top:21px;color:var(--muted);font-size:14px;line-height:1.5}.chapter-dots{display:flex;gap:5px;justify-content:center;margin-top:3px}.chapter-dots button{width:28px;height:28px;display:flex;align-items:center;justify-content:center}.chapter-dots button:before{content:'';width:5px;height:5px;border-radius:50%;background:var(--muted);opacity:.35}.chapter-dots button.current:before{width:20px;border-radius:3px;background:var(--accent);opacity:1}
body[data-screen=win] #stage{left:0;right:0;top:70px;bottom:100px;opacity:.065;pointer-events:none}.win-screen{display:flex;align-items:center;justify-content:center;padding:30px 20px;background:color-mix(in srgb,var(--bg) 40%,transparent)}.win-content{width:430px;max-width:100%;text-align:center;display:flex;align-items:center;flex-direction:column;animation:win-reveal .6s ease-out}.win-seal{width:80px;height:80px;border:1px solid var(--line);border-radius:50%;display:flex;align-items:center;justify-content:center;margin-bottom:27px;position:relative;color:var(--accent)}.win-seal:after{content:'';position:absolute;inset:8px;border:1px solid var(--line);border-radius:50%;opacity:.65}.win-seal svg{width:32px;height:32px;stroke-width:1.5}.win-content>.eyebrow{margin-bottom:14px;letter-spacing:.13em}.win-content h1{font-size:48px;line-height:1.08;letter-spacing:-.05em;font-weight:400;max-width:440px}.win-sub{font-size:18px;line-height:1.55;color:var(--muted);margin-top:21px;max-width:350px}.win-note{font-size:14px;color:var(--accent);min-height:24px;margin-top:15px;line-height:1.5;max-width:360px}.win-content .primary-button{margin-top:32px;max-width:350px}.win-content>.text-button{margin-top:14px;color:var(--muted)}@keyframes win-reveal{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
.modal-layer{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:20px;pointer-events:auto}.modal-backdrop{position:absolute;inset:0;background:var(--overlay);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.modal{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:26px;width:470px;max-width:100%;max-height:calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:36px 32px 27px;overflow:auto;overscroll-behavior:contain;box-shadow:0 20px 100px var(--shadow);animation:win-reveal .2s ease-out;outline:none}.modal-close{position:absolute;right:16px;top:16px;border-color:transparent;width:36px;height:36px;min-width:36px}.modal-close svg{width:19px;height:19px}.modal h2{font-size:30px;font-weight:450;letter-spacing:-.045em;line-height:1.15;margin:8px 30px 15px 0}.modal h3{font-size:17px;font-weight:550;margin:0 0 7px;letter-spacing:-.015em}.modal .modal-intro{font-size:16px;line-height:1.6;color:var(--muted);margin-bottom:23px}.modal .primary-button{margin-top:24px;font-size:18px;min-height:60px}.modal .secondary-button{width:100%;border:1px solid var(--line);min-height:55px;border-radius:15px;display:flex;align-items:center;justify-content:center;gap:10px;font-size:17px;margin-top:12px}.modal .center-link{display:flex;margin:12px auto 0;text-align:center;color:var(--muted);font-size:15px;min-height:44px;align-items:center;justify-content:center}.modal .settings-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;border-bottom:1px solid var(--line);padding:10px 0;font-size:16px}.settings-row>label{display:flex;gap:12px;align-items:center;font-weight:450}.setting-audio{padding:4px 0 12px;border-bottom:1px solid var(--line)}.setting-audio .settings-row{border:0;min-height:48px}.setting-audio input[type=range]{width:100%;height:18px;margin:1px 0 1px;accent-color:var(--accent);cursor:pointer}.switch{position:relative;width:45px;height:27px;background:var(--line);border-radius:30px;flex-shrink:0;min-width:45px}.switch:after{content:'';position:absolute;top:4px;left:4px;width:19px;height:19px;border-radius:50%;background:var(--surface);box-shadow:0 1px 4px var(--shadow);transition:transform .2s}.switch[aria-checked=true]{background:var(--accent)}.switch[aria-checked=true]:after{transform:translateX(18px);background:var(--bg)}.theme-options{display:flex;gap:4px;padding:4px;background:var(--subtle);border-radius:10px}.theme-options button{min-height:31px;border-radius:7px;font-size:13px;padding:4px 10px}.theme-options button.selected{background:var(--surface);box-shadow:0 2px 6px var(--shadow);color:var(--ink)}.settings-row select{width:140px;padding:8px 9px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:14px;max-width:50%;cursor:pointer}.save-status{display:flex;align-items:center;justify-content:center;gap:7px;font-size:11px;color:var(--muted);margin:17px 0 0;line-height:1.5}.save-status svg{width:13px;height:13px}.pause-actions{display:flex;flex-direction:column;gap:2px}.pause-actions .secondary-button{justify-content:flex-start;padding:0 18px;border:0;background:var(--subtle)}.pause-actions .secondary-button svg{width:20px;height:20px}.modal-hero-icon{width:44px;height:44px;color:var(--accent);stroke-width:1.3;margin-bottom:23px}.help-step{display:flex;gap:17px;margin:24px 0}.help-step>svg{width:31px;height:31px;min-width:31px;stroke-width:1.3;color:var(--accent);margin-top:2px}.help-step p{font-size:15px;line-height:1.55;color:var(--muted)}.help-footer{font-size:13px;line-height:1.55;color:var(--muted);border-top:1px solid var(--line);padding-top:16px}.help-end{font-size:15px;color:var(--accent);margin-top:16px}.reward-button{justify-content:center!important;gap:13px!important}.reward-button span{display:flex;flex-direction:column;gap:4px;align-items:flex-start}.reward-button small{font-size:12px;opacity:.74}.reward-value{font-size:32px;font-weight:400;letter-spacing:-.04em;color:var(--accent);margin:20px 0 15px}.mood-option{display:flex;align-items:center;width:100%;padding:15px 16px;gap:15px;border:1px solid var(--line);border-radius:15px;text-align:left;margin:10px 0}.mood-option.selected{border-color:var(--accent);background:var(--accent-soft)}.mood-option>span:first-child{width:28px;height:28px;display:flex;align-items:center;justify-content:center;color:var(--accent);flex-shrink:0}.mood-option strong{display:block;font-size:17px;font-weight:500}.mood-option small{font-size:12px;line-height:1.45;margin-top:5px;color:var(--muted);display:block}.daily-date{font-size:13px;letter-spacing:.12em;color:var(--accent);text-transform:uppercase;margin:0 0 12px}.daily-badge{display:inline-flex;align-items:center;gap:8px;color:var(--accent);padding:8px 13px;background:var(--accent-soft);border-radius:10px;font-size:14px;margin:0 0 8px}.daily-badge svg{width:17px;height:17px}.toast{position:absolute;left:50%;transform:translateX(-50%);bottom:128px;max-width:min(540px,90%);width:max-content;background:var(--button);color:var(--button-text);font-size:15px;line-height:1.4;padding:13px 21px;border-radius:13px;box-shadow:0 10px 40px var(--shadow);text-align:center;z-index:50;pointer-events:none}body[data-screen=home] .toast,body[data-screen=levels] .toast{bottom:24px}body[data-ad=true] #modal-layer,body[data-ad=true] #toast,body[data-ad=true] #ui,body[data-platform-pause=true] #modal-layer{visibility:hidden}body[data-ad=true] #stage{pointer-events:none}.reduced *,.reduced *:before,.reduced *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(hover:hover){.icon-button:not(:disabled):hover{background:var(--subtle)}.text-button:hover{color:var(--accent)}.primary-button:hover{filter:brightness(1.07);transform:translateY(-1px)}.level-tile:not(:disabled):hover{border-color:var(--accent);transform:translateY(-2px)}.game-controls>button:hover{color:var(--accent)}.mood-option:hover{border-color:var(--accent)}}
@media(min-width:1600px){.hero-copy{top:24%}.home-actions{top:63%}.home-footer{bottom:4%}.home-header{top:4%}.hero-caption{bottom:20%}}
@media(max-width:950px) and (min-aspect-ratio:1/1){.hero-copy{left:6%;top:24%;width:43%}.hero-copy h1{font-size:47px}.hero-intro{font-size:16px;line-height:1.6}.hero-copy .eyebrow{margin-bottom:19px}.home-actions{left:6%;max-width:38%;width:310px;top:65%}.home-play{min-height:66px}.home-play strong{font-size:20px}.home-play small{font-size:11px}.home-links{gap:12px;margin-top:9px}.home-links .text-button{font-size:14px;gap:6px}.home-header{left:5%;right:4%;top:22px}.wordmark{font-size:18px;gap:10px}.wordmark svg{width:29px;height:29px}.home-footer{left:6%;right:5%;bottom:14px}.home-footer p{font-size:12px}.hero-caption{font-size:11px;bottom:15%;left:53%;width:42%}.home-footer .text-button{font-size:13px}body[data-screen=home] #stage{left:43%;right:0;top:15%;bottom:17%}.game-controls{gap:10px}.remaining{left:6%}.view-tools{right:5%}}
@media(max-aspect-ratio:1/1){.home-header{left:7%;right:6%;top:max(22px,env(safe-area-inset-top))}.wordmark{font-size:17px;letter-spacing:.22em;gap:11px}.wordmark svg{width:29px;height:29px}.icon-button{width:44px;height:44px;min-width:44px}.hero-copy{left:8%;top:13.6%;width:84%;text-align:left}.hero-copy .eyebrow{font-size:10px;letter-spacing:.17em;margin-bottom:16px}.hero-copy h1{font-size:clamp(39px,10.5vw,66px);line-height:1.06;letter-spacing:-.048em}.hero-intro{display:none}body[data-screen=home] #stage{left:1%;right:1%;top:32%;bottom:24.5%}.home-actions{left:8%;right:8%;top:auto;bottom:9%;width:84%;max-width:unset}.home-play{min-height:70px;padding:13px 22px;border-radius:16px}.home-play strong{font-size:22px;line-height:1.35}.home-play small{font-size:12px;line-height:1.6}.home-links{justify-content:space-around;margin-top:6px;gap:8px}.home-links .text-button{font-size:15px;gap:8px;min-height:45px}.home-footer{left:8%;right:8%;bottom:max(10px,env(safe-area-inset-bottom));gap:12px}.home-footer p{font-size:10px;line-height:1.45;max-width:65%}.home-footer .text-button{font-size:12px;gap:6px;min-height:37px}.home-footer .text-button svg{width:18px;height:18px}.hero-caption{bottom:26.2%;left:0;width:100%;font-size:10px;gap:6px}.hero-caption svg{width:13px;height:13px}.caption-line{display:none}body[data-screen=game] #stage{top:124px;bottom:169px}.game-header{top:max(18px,env(safe-area-inset-top));left:5%;right:5%}.level-heading .eyebrow{font-size:10px;letter-spacing:.12em}.level-heading h2{font-size:22px}.progress-track{top:83px;left:8%;right:8%}.remaining{top:103px;left:8%;min-width:42px;gap:1px}.remaining>span{font-size:10px}.remaining strong{font-size:31px;font-weight:400}.view-tools{top:97px;right:5%;flex-direction:row;gap:1px}.view-tools .icon-button{width:37px;height:37px;min-width:37px}.view-tools .icon-button svg{width:19px;height:19px}.game-bottom{bottom:max(20px,env(safe-area-inset-bottom));gap:24px}.game-controls{gap:8px;width:91%;min-width:0}.game-controls>button{min-width:0;flex:1;font-size:12px;gap:10px;padding:0 2px 5px;max-width:150px}.control-icon svg{width:27px;height:27px}.control-icon i{right:-7px;top:-6px;font-size:11px;min-width:19px}.tutorial{bottom:151px;max-width:90%;padding:10px 8px 10px 13px;gap:9px;border-radius:14px}.tutorial p{font-size:13px;line-height:1.45}.tutorial-close{width:28px;min-width:28px;height:30px}.tutorial-dot{width:5px;height:5px}.face-indicators{gap:6px}.face-indicators i{width:6px;height:6px}.page-header{top:max(18px,env(safe-area-inset-top));left:5%;right:5%}.wordmark.small{font-size:13px}.levels-content{max-width:530px;padding:99px 7% 20px}.page-title h1{font-size:34px}.page-title>p:last-child{font-size:14px;margin-top:8px}.page-title .eyebrow{font-size:10px}.chapter-heading{margin:26px 0 17px;gap:8px}.chapter-heading h2{font-size:22px}.chapter-heading .eyebrow{font-size:9px}.chapter-heading .icon-button{width:35px;height:35px;min-width:35px}.chapter-heading .icon-button svg{width:18px;height:18px}.level-grid{gap:9px}.level-tile{font-size:21px;aspect-ratio:1.03;min-height:47px;border-radius:12px}.level-tile .tile-check{width:10px;height:10px;bottom:5px;right:5px}.level-tile .tile-lock{width:9px;height:9px;bottom:5px;right:5px}.level-tile .tile-perfect{width:3px;height:3px;bottom:7px;left:7px}.chapter-note{font-size:12px;margin-top:18px;min-height:34px}.chapter-dots{margin-top:0}.win-content h1{font-size:42px}.win-sub{font-size:17px}.win-content .primary-button{max-width:330px;font-size:18px}.win-note{font-size:13px}.win-seal{width:72px;height:72px;margin-bottom:24px}.modal-layer{padding:16px}.modal{padding:31px 23px 23px;border-radius:22px;max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.modal h2{font-size:28px;margin-top:8px}.modal .modal-intro{font-size:15px;line-height:1.6}.modal .settings-row{font-size:15px;min-height:51px;gap:8px}.settings-row select{font-size:13px;width:130px}.theme-options button{font-size:12px;padding:5px 8px}.modal .primary-button{font-size:17px}.help-step{gap:13px;margin:22px 0}.help-step p{font-size:14px}.help-step h3{font-size:16px}.help-step>svg{width:27px;height:27px;min-width:27px}.help-footer{font-size:12px}.help-end{font-size:14px}.toast{font-size:13px;bottom:134px;max-width:89%;padding:12px 17px}.mood-option{padding:13px}.mood-option strong{font-size:16px}.mood-option small{font-size:11px}}
@media(max-height:700px) and (max-aspect-ratio:1/1){.home-header{top:13px}.hero-copy{top:13%;}.hero-copy .eyebrow{margin-bottom:12px}.hero-copy h1{font-size:39px}.home-play{min-height:64px}.home-play strong{font-size:20px}.home-play small{font-size:11px}.home-actions{bottom:8.5%}.hero-caption{bottom:25.5%}body[data-screen=home] #stage{top:31%;bottom:25.5%}.home-links .text-button{font-size:14px;min-height:40px}.home-footer{bottom:6px}.home-footer p{font-size:9px}.home-footer .text-button{font-size:11px}body[data-screen=game] #stage{top:120px;bottom:148px}.game-bottom{bottom:14px;gap:19px}.tutorial{bottom:136px}.game-controls>button{font-size:11px;gap:7px}.control-icon svg{width:24px;height:24px}.game-controls .control-icon{height:32px}.levels-content{padding-top:85px}.page-title h1{font-size:29px}.page-title>p:last-child{margin-top:5px;font-size:13px}.chapter-heading{margin-top:20px}.chapter-heading h2{font-size:20px}.level-tile{min-height:44px;aspect-ratio:1.13;font-size:20px}.chapter-note{font-size:11px;min-height:30px;margin-top:14px}.win-seal{width:62px;height:62px;margin-bottom:20px}.win-content h1{font-size:39px}.win-sub{margin-top:16px}.win-note{margin-top:10px}.win-content .primary-button{margin-top:23px;min-height:60px}.modal .settings-row{min-height:47px}.modal h2{font-size:26px}.modal .primary-button{margin-top:19px;min-height:55px}.setting-audio{padding-bottom:9px}.save-status{margin-top:14px}}
@media(max-height:580px) and (min-aspect-ratio:1/1){.home-header{top:13px;left:4%;right:3%}.wordmark{font-size:15px;gap:9px}.wordmark svg{width:25px;height:25px}.icon-button{width:40px;height:40px;min-width:40px}.hero-copy{top:23%;left:6%;width:47%}.hero-copy .eyebrow{font-size:9px;margin-bottom:13px}.hero-copy h1{font-size:clamp(32px,4.5vw,49px)}.hero-intro{display:none}.home-actions{top:auto;bottom:15%;width:280px;max-width:38%;left:6%}.home-play{min-height:59px;border-radius:13px;padding:10px 19px}.home-play strong{font-size:19px}.home-play small{font-size:10px}.home-play svg{width:23px;height:23px}.home-links{margin-top:3px}.home-links .text-button{font-size:12px;gap:6px;min-height:37px}.home-links svg{width:17px;height:17px}.home-footer{bottom:8px;left:6%;right:5%}.home-footer p{font-size:10px}.home-footer .text-button{font-size:12px}.hero-caption{bottom:16%;font-size:10px}body[data-screen=home] #stage{left:44%;right:0;top:9%;bottom:13%}.game-header{top:11px;left:4%;right:4%}.level-heading h2{font-size:19px}.level-heading .eyebrow{font-size:9px}.progress-track{top:65px;left:6%;right:6%}body[data-screen=game] #stage{top:71px;bottom:15px;left:13%;right:19%}.remaining{top:91px;left:6%;min-width:50px}.remaining strong{font-size:32px}.remaining>span{font-size:10px}.view-tools{top:auto;bottom:30px;right:auto;left:5%;flex-direction:column;gap:1px}.view-tools .icon-button{width:35px;height:35px;min-width:35px}.game-bottom{left:auto;right:4%;top:92px;bottom:28px;width:105px;gap:12px;justify-content:center}.game-controls{flex-direction:column;gap:17px;min-width:0;width:100%;}.game-controls>button{font-size:11px;min-width:0;gap:4px;}.control-icon{height:29px}.control-icon svg{width:23px;height:23px}.face-indicators{gap:4px}.face-indicators i{width:5px;height:5px}.tutorial{bottom:12px;left:47%;max-width:51%;padding:7px 7px 7px 10px;gap:8px}.tutorial p{font-size:11px}.tutorial-close{width:24px;min-width:24px;height:26px}.tutorial-close svg{width:14px;height:14px}.tutorial-dot{width:5px;height:5px}.toast{bottom:25px;font-size:13px;max-width:60%;left:46%}.page-header{top:12px}.levels-content{padding:76px 24px 20px;max-width:610px}.page-title{display:none}.chapter-heading{margin:3px 0 15px}.chapter-heading h2{font-size:20px}.chapter-heading .eyebrow{font-size:9px}.level-grid{gap:8px;grid-template-columns:repeat(10,1fr)}.level-tile{aspect-ratio:1;min-height:42px;font-size:19px;border-radius:10px}.chapter-note{font-size:12px;min-height:20px;margin-top:13px}.chapter-dots{margin-top:0}.win-content{width:600px}.win-seal{width:45px;height:45px;margin-bottom:13px}.win-seal svg{width:23px;height:23px}.win-seal:after{inset:5px}.win-content>.eyebrow{margin-bottom:8px;font-size:10px}.win-content h1{font-size:34px}.win-sub{font-size:15px;margin-top:12px;max-width:500px}.win-note{font-size:12px;margin-top:8px;min-height:18px}.win-content .primary-button{margin-top:17px;max-width:310px;min-height:50px;font-size:16px;padding:12px 19px;border-radius:13px}.win-content>.text-button{margin-top:3px;font-size:13px;min-height:37px}.modal{max-height:calc(100dvh - 24px);padding-top:28px}.modal-layer{padding:12px}}
@media(max-width:340px) and (max-aspect-ratio:1/1){.hero-copy h1{font-size:35px}.wordmark{font-size:15px}.home-actions{left:7%;right:7%;width:86%}.home-links .text-button{font-size:12px}.home-footer p{max-width:60%}.game-controls>button{font-size:10px}.levels-content{padding-left:6%;padding-right:6%}.level-grid{gap:7px}.level-tile{min-height:42px;font-size:18px}.modal{padding-left:19px;padding-right:19px}.theme-options button{font-size:11px;padding:5px 6px}.settings-row>label{max-width:60%;line-height:1.4}.win-content h1{font-size:35px}}

/* v6: real-form UI additions */
.hero-pills{position:absolute;left:7.2%;top:57.5%;display:flex;gap:8px;flex-wrap:wrap;max-width:38%;z-index:3}
.hero-pill,.meta-pill{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);background:color-mix(in srgb,var(--surface) 88%,transparent);color:var(--muted);border-radius:999px;box-shadow:0 7px 20px var(--shadow);font-size:11px;font-weight:600;line-height:1;letter-spacing:.07em;text-transform:uppercase;white-space:nowrap}
.hero-pill{min-height:32px;padding:8px 13px}
.collection-pills{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:16px}
.level-meta{position:absolute;left:50%;transform:translateX(-50%);top:49px;display:flex;gap:6px;justify-content:center;white-space:nowrap}
.meta-pill{min-height:24px;padding:6px 9px;font-size:9px;letter-spacing:.09em;background:color-mix(in srgb,var(--surface) 78%,transparent);box-shadow:none}
.game-controls{background:color-mix(in srgb,var(--surface) 78%,transparent);border:1px solid color-mix(in srgb,var(--line) 86%,transparent);border-radius:22px;padding:9px 12px;box-shadow:0 12px 28px var(--shadow);gap:8px}
.game-controls>button{border-radius:16px;padding:8px 7px;transition:background .16s,color .16s,transform .16s}
.game-controls>button:hover{background:var(--accent-soft);color:var(--ink)}
.remaining{background:color-mix(in srgb,var(--surface) 84%,transparent);border:1px solid color-mix(in srgb,var(--line) 85%,transparent);border-radius:16px;padding:8px 12px;box-shadow:0 8px 22px var(--shadow)}
.face-indicators{height:auto;min-height:24px;padding:7px 10px;border:1px solid color-mix(in srgb,var(--line) 82%,transparent);border-radius:999px;background:color-mix(in srgb,var(--surface) 80%,transparent);box-shadow:0 7px 18px var(--shadow)}
.level-tile{box-shadow:0 8px 20px var(--shadow);background:color-mix(in srgb,var(--surface) 86%,transparent)}
.chapter-note{padding:12px 16px;border:1px solid color-mix(in srgb,var(--line) 86%,transparent);background:color-mix(in srgb,var(--surface) 84%,transparent);border-radius:16px}
@media(max-aspect-ratio:1/1){
 .hero-pills{display:none}
 .level-meta{top:48px;gap:4px}
 .meta-pill{min-height:20px;padding:4px 7px;font-size:8px}
 .game-controls{width:94%;padding:8px 7px;border-radius:20px}
 .game-controls>button{padding:7px 2px;border-radius:13px}
 .remaining{padding:7px 10px}
}
@media(max-height:580px) and (min-aspect-ratio:1/1){.hero-pills{top:60%;max-width:40%}.level-meta{top:39px}.meta-pill{font-size:8px;min-height:19px;padding:4px 7px}}

/* Yandex moderation hardening: dynamic viewport, no browser scroll / pull-to-refresh. */
html,body{position:fixed;inset:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none!important;touch-action:none}
#app{height:var(--app-height,100dvh);max-height:var(--app-height,100dvh);overflow:hidden}
#stage,#cube,.home-screen,.game-screen,.win-screen{touch-action:none;overscroll-behavior:none}
.levels-screen,.modal{overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.screen,.home-header,.game-header,.page-header,.game-bottom,.home-actions,.home-footer{max-width:100vw}
@media(max-width:420px){
 .game-header{left:3.5%;right:3.5%}
 .level-heading h2{font-size:20px}
 .level-heading .eyebrow{font-size:9px}
 .remaining{left:5%;min-width:72px}
 .view-tools{right:3.5%}
 .game-controls{width:96%;gap:4px}
 .game-controls>button{font-size:11px}
 .home-actions{left:6%;right:6%;width:88%}
 .home-footer{left:6%;right:6%}
}
@media(max-height:520px) and (orientation:landscape){
 body[data-screen=game] #stage{top:66px;bottom:10px;left:12%;right:18%}
 .game-header{top:8px}.progress-track{top:58px}
 .remaining{top:72px}.view-tools{bottom:18px}.game-bottom{top:72px;bottom:18px}
}

/* RTL localizations: Arabic, Persian, Hebrew */
html[dir=rtl] body{direction:rtl}
html[dir=rtl] .hero-copy{text-align:right;left:auto;right:7.2%}
html[dir=rtl] .home-actions{left:auto;right:7.2%;text-align:right}
html[dir=rtl] .primary-button{text-align:right}
html[dir=rtl] .hero-caption{left:auto;right:56%}
html[dir=rtl] .remaining{left:auto;right:max(8%,calc((100vw - 1060px)/2))}
html[dir=rtl] .view-tools{right:auto;left:max(7%,calc((100vw - 1100px)/2))}
html[dir=rtl] .modal,html[dir=rtl] .settings-row,html[dir=rtl] .help-step,html[dir=rtl] .chapter-note{text-align:right}
html[dir=rtl] .modal-close{right:auto;left:18px}
html[dir=rtl] .help-step{direction:rtl}
html[dir=rtl] .home-play svg,html[dir=rtl] #next-button svg{transform:scaleX(-1)}
@media(max-aspect-ratio:1/1){
 html[dir=rtl] .hero-copy{left:auto;right:8%;text-align:right}
 html[dir=rtl] .home-actions{left:auto;right:8%}
 html[dir=rtl] .remaining{left:auto;right:8%}
 html[dir=rtl] .view-tools{right:auto;left:5%}
 html[dir=rtl] .hero-caption{left:0;right:0}
}
@media(max-height:580px) and (min-aspect-ratio:1/1){
 html[dir=rtl] .hero-copy{left:auto;right:6%}
 html[dir=rtl] .home-actions{left:auto;right:6%}
 html[dir=rtl] .remaining{left:auto;right:6%}
 html[dir=rtl] .view-tools{left:auto;right:5%}
}


/* v9 minimalist refresh */
:root[data-theme=sage]{--bg:#edf2ea;--surface:#f8fbf6;--ink:#32443d;--muted:#708078;--accent:#5f8a77;--accent-soft:#dfeae3;--line:#d5ddd5;--subtle:#e6ede7;--button:#31453d;--button-text:#f9fbf8;--shadow:rgba(44,55,49,.09);--overlay:rgba(234,240,235,.72);--error:#be8667;color-scheme:light}
:root[data-theme=sand]{--bg:#f5eee4;--surface:#fbf7f0;--ink:#433730;--muted:#88786e;--accent:#b37b53;--accent-soft:#eee2d6;--line:#e3d6c9;--subtle:#f0e7de;--button:#4a3d35;--button-text:#fcf8f1;--shadow:rgba(68,52,43,.10);--overlay:rgba(243,236,228,.76);--error:#c46a61;color-scheme:light}
:root[data-theme=lavender]{--bg:#f2eff8;--surface:#faf8fd;--ink:#403a56;--muted:#7f7994;--accent:#8d79c8;--accent-soft:#e8e2f5;--line:#ddd8eb;--subtle:#ece8f5;--button:#4a4364;--button-text:#faf9fd;--shadow:rgba(58,48,78,.10);--overlay:rgba(240,236,247,.76);--error:#c27b85;color-scheme:light}
:root[data-theme=midnight]{--bg:#16202c;--surface:#1f2a38;--ink:#e5edf2;--muted:#9fb0bc;--accent:#5ca3b8;--accent-soft:#223646;--line:#304252;--subtle:#223140;--button:#d8eef4;--button-text:#20303a;--shadow:rgba(0,0,0,.24);--overlay:rgba(12,18,26,.78);--error:#d9a58f;color-scheme:dark}

.hero-pills,.hero-caption,.level-meta,.progress-track,.view-tools,.face-indicators,#game-chapter{display:none!important}
body[data-screen=game] #stage{top:92px;bottom:128px}
.game-header{justify-content:center;grid-template-columns:48px 1fr 48px;display:grid;align-items:center;max-width:820px;left:50%;right:auto;transform:translateX(-50%);width:min(92vw,820px)}
.game-header>.icon-button:first-child{justify-self:start}.game-header>.icon-button:last-child{justify-self:end}
.level-heading h2{font-size:34px;line-height:1.1;font-weight:600}
.remaining{top:118px;left:max(6%,calc((100vw - 840px)/2));min-width:76px}
.remaining strong{font-size:48px}
.game-bottom{gap:14px;bottom:max(18px,env(safe-area-inset-bottom))}
.game-controls{min-width:0;width:auto;gap:18px;padding:14px 28px;border-radius:24px}
.game-controls>button{min-width:126px;max-width:none;padding:10px 10px 8px;font-size:14px}
.game-controls>button:hover{background:transparent;color:var(--muted)}
.control-icon i{background:var(--surface);border:1px solid var(--line);color:var(--accent);right:-10px;top:-7px}
.home-header{left:50%;right:auto;transform:translateX(-50%);width:min(92vw,1120px);top:max(28px,env(safe-area-inset-top))}
body[data-screen=home] #stage{left:50%;right:auto;transform:translateX(0);width:min(44vw,620px);top:14%;bottom:14%}
.hero-copy{left:50%;transform:translateX(-560px);top:25%;width:min(420px,30vw)}
.home-actions{left:50%;transform:translateX(-560px);top:58%;width:min(330px,30vw);max-width:none}
.home-footer{left:50%;transform:translateX(-560px);right:auto;bottom:max(34px,env(safe-area-inset-bottom));width:min(360px,32vw);flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:8px}
.home-footer p{font-size:13px}
.home-screen .hero-copy h1{font-size:clamp(42px,4.6vw,72px)}
.home-screen .hero-intro{margin-top:18px;max-width:32ch}
.home-links{justify-content:flex-start;gap:18px}
.theme-options.theme-swatches{gap:10px;padding:0;background:transparent;border-radius:0}
.theme-swatch{width:34px;height:34px;min-height:34px;min-width:34px;padding:0;border-radius:50%;border:1px solid var(--line);background:transparent;display:flex;align-items:center;justify-content:center;box-shadow:none}
.theme-swatch span{width:22px;height:22px;border-radius:50%;display:block;border:1px solid rgba(0,0,0,.06);box-shadow:inset 0 0 0 1px rgba(255,255,255,.25)}
.theme-swatch[data-theme=light] span{background:#f3f1eb}
.theme-swatch[data-theme=dark] span{background:#191d2a}
.theme-swatch[data-theme=sage] span{background:#edf2ea}
.theme-swatch[data-theme=sand] span{background:#f5eee4}
.theme-swatch[data-theme=lavender] span{background:#f2eff8}
.theme-swatch[data-theme=midnight] span{background:#16202c}
.theme-swatch.selected{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%, transparent)}
.theme-swatch.selected span{transform:scale(.92)}
@media(min-width:1360px){
  body[data-screen=home] #stage{width:610px}
  .hero-copy,.home-actions,.home-footer{transform:translateX(-590px)}
}
@media(max-width:980px){
  .home-header,.hero-copy,.home-actions,.home-footer{left:7.2%;transform:none;width:auto;right:7.2%}
  body[data-screen=home] #stage{left:44%;right:2%;width:auto;transform:none}
  .home-footer{flex-direction:row;align-items:center;justify-content:space-between}
  .game-header{left:5%;right:5%;transform:none;width:auto;max-width:none}
}
@media(max-aspect-ratio:1/1){
  body[data-screen=game] #stage{top:92px;bottom:126px}
  .game-header{display:flex;left:4.5%;right:4.5%;transform:none;width:auto;justify-content:space-between}
  .level-heading h2{font-size:30px}
  .remaining{top:118px;left:6%;min-width:70px}
  .remaining strong{font-size:42px}
  .game-controls{width:auto;min-width:0;padding:12px 18px;gap:22px}
  .game-controls>button{min-width:112px;padding:6px 4px;font-size:13px}
}
@media(max-width:580px) and (max-aspect-ratio:1/1){
  .game-header{top:max(14px,env(safe-area-inset-top))}
  .level-heading h2{font-size:24px}
  .remaining{top:112px;left:7%;min-width:66px;padding:7px 10px}
  .remaining>span{font-size:11px}.remaining strong{font-size:34px}
  body[data-screen=game] #stage{top:152px;bottom:160px;left:4%;right:4%}
  .game-bottom{bottom:max(20px,env(safe-area-inset-bottom))}
  .game-controls{width:92%;justify-content:space-evenly;padding:12px 12px;gap:10px}
  .game-controls>button{min-width:0;flex:1;gap:7px;font-size:13px}
  .control-icon{width:38px;height:32px}
  .control-icon svg{width:23px;height:23px}
}


/* v10 cleaner gameplay + turnline-like home */
.remaining{display:none!important}
body[data-screen=game] #stage{top:92px!important;bottom:124px!important}
body[data-screen=home] #stage{left:50%!important;right:auto!important;transform:translateX(-50%)!important;top:10%!important;bottom:28%!important;width:min(76vw,700px)!important}
.home-header{left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(92vw,980px)!important;justify-content:center!important;gap:18px}
.home-header .icon-button{position:absolute;right:0;top:0}
.home-header .wordmark{font-size:18px!important;letter-spacing:.20em!important}
.hero-copy{left:50%!important;right:auto!important;transform:translateX(-50%)!important;top:14%!important;width:min(520px,88vw)!important;text-align:center!important}
.hero-copy h1{font-size:clamp(46px,5vw,72px)!important;line-height:1.05!important}
.hero-intro,.hero-pills,.hero-caption,.home-footer p{display:none!important}
.home-actions{left:50%!important;right:auto!important;transform:translateX(-50%)!important;top:auto!important;bottom:max(42px,env(safe-area-inset-bottom))!important;width:min(360px,88vw)!important;max-width:none!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px}
.home-play{min-height:72px!important;border-radius:22px!important;padding:16px 22px!important;box-shadow:0 16px 34px var(--shadow)}
.home-play strong{font-size:22px!important}.home-play small{font-size:12px!important;opacity:.58!important}
.home-links{display:grid!important;grid-template-columns:1fr 1fr 1fr;gap:10px!important;margin-top:0!important}
.home-links .text-button,.home-footer .text-button{min-height:52px!important;padding:0 10px!important;border-radius:18px!important;border:1px solid var(--line)!important;background:color-mix(in srgb,var(--surface) 82%, transparent)!important;box-shadow:0 10px 24px var(--shadow);font-size:14px!important;justify-content:center!important}
.home-footer{left:50%!important;right:auto!important;transform:translateX(-50%)!important;bottom:max(106px,env(safe-area-inset-bottom))!important;width:min(360px,88vw)!important;justify-content:center!important}
.home-footer .text-button{width:100%!important}
.home-footer .text-button span{font-weight:500}
@media(max-aspect-ratio:1/1){
  body[data-screen=home] #stage{top:15%!important;bottom:34%!important;width:96vw!important}
  .home-header{top:max(14px,env(safe-area-inset-top))!important;width:92vw!important}
  .hero-copy{top:10%!important;width:90vw!important}
  .hero-copy h1{font-size:40px!important}
  .home-actions{bottom:max(24px,env(safe-area-inset-bottom))!important;width:92vw!important}
  .home-links{grid-template-columns:1fr 1fr!important}
  .home-footer{bottom:max(90px,env(safe-area-inset-bottom))!important;width:92vw!important}
}
@media(min-width:1100px){
  .home-actions,.home-footer{width:330px!important}
}


/* v12 rebuilt home + single typeface */
@font-face{font-family:'Cubeline Sans';src:url('assets/comfortaa-regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Cubeline Sans';src:url('assets/comfortaa-bold.ttf') format('truetype');font-weight:700;font-style:normal;font-display:swap}
html,body,button,input,select,textarea,h1,h2,h3,p,span,strong,small,.wordmark,.text-button,.primary-button,.level-tile,.modal,.tutorial,.toast{font-family:'Cubeline Sans',sans-serif!important}
body[data-screen=home] #stage{display:none!important}
.home-screen{display:flex;flex-direction:column;align-items:center;justify-content:flex-start}
.home-header{position:absolute!important;top:max(26px,env(safe-area-inset-top))!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(92vw,980px)!important;display:flex!important;align-items:center!important;justify-content:center!important;min-height:52px!important}
.wordmark.wordmark-home,.wordmark.small.wordmark-text-only{display:flex!important;align-items:center!important;justify-content:center!important;gap:0!important}
.wordmark.wordmark-home svg,.wordmark.small.wordmark-text-only svg{display:none!important}
.wordmark.wordmark-home{font-size:30px!important;letter-spacing:.20em!important;font-weight:700!important;color:var(--ink)!important;text-transform:none!important}
.wordmark.small.wordmark-text-only{font-size:16px!important;letter-spacing:.18em!important;font-weight:700!important}
.home-settings{position:absolute!important;right:0!important;top:0!important;background:color-mix(in srgb,var(--surface) 88%, transparent)!important;box-shadow:0 10px 28px var(--shadow)!important}
.hero-copy{position:absolute!important;left:50%!important;top:138px!important;right:auto!important;transform:translateX(-50%)!important;width:min(620px,88vw)!important;text-align:center!important}
.hero-copy .eyebrow,.hero-pills,.hero-caption,.home-footer{display:none!important}
.hero-copy h1{font-size:clamp(34px,4vw,58px)!important;line-height:1.18!important;letter-spacing:.01em!important;font-weight:700!important;max-width:11ch!important;margin:0 auto!important;color:var(--ink)!important}
.hero-intro{display:block!important;margin:16px auto 0!important;max-width:30ch!important;font-size:15px!important;line-height:1.65!important;color:var(--muted)!important;text-align:center!important}
.home-actions{position:absolute!important;left:50%!important;top:340px!important;right:auto!important;transform:translateX(-50%)!important;width:min(420px,88vw)!important;max-width:none!important;display:flex!important;flex-direction:column!important;gap:14px!important;align-items:stretch!important}
.home-play{min-height:84px!important;border-radius:24px!important;padding:18px 24px!important;background:var(--button)!important;color:var(--button-text)!important;box-shadow:0 18px 40px var(--shadow)!important}
.home-play strong{font-size:25px!important;line-height:1.2!important;font-weight:700!important;letter-spacing:0!important}
.home-play small{font-size:12px!important;line-height:1.45!important;letter-spacing:.08em!important;text-transform:uppercase!important;opacity:.62!important}
.home-play svg{width:28px!important;height:28px!important}
.home-links{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:12px!important;width:100%!important;margin-top:0!important}
.home-links .text-button{min-height:58px!important;padding:0 12px!important;border-radius:20px!important;border:1px solid var(--line)!important;background:color-mix(in srgb,var(--surface) 90%, transparent)!important;box-shadow:0 10px 24px var(--shadow)!important;font-size:15px!important;font-weight:700!important;justify-content:center!important;gap:8px!important}
.home-links .text-button svg{width:18px!important;height:18px!important}
.home-links .text-button span{white-space:nowrap!important}
#daily-dot{align-self:center;margin-left:0}
@media(max-aspect-ratio:1/1){
  .home-header{top:max(16px,env(safe-area-inset-top))!important;width:92vw!important}
  .wordmark.wordmark-home{font-size:24px!important;letter-spacing:.16em!important}
  .home-settings{width:44px!important;height:44px!important;min-width:44px!important}
  .hero-copy{top:108px!important;width:92vw!important}
  .hero-copy h1{font-size:clamp(28px,9vw,42px)!important;max-width:10ch!important;line-height:1.16!important}
  .hero-intro{font-size:13px!important;max-width:28ch!important;margin-top:12px!important}
  .home-actions{top:288px!important;width:92vw!important;gap:10px!important}
  .home-play{min-height:76px!important;border-radius:20px!important;padding:16px 20px!important}
  .home-play strong{font-size:22px!important}
  .home-links{grid-template-columns:repeat(3,1fr)!important;gap:8px!important}
  .home-links .text-button{min-height:52px!important;border-radius:16px!important;padding:0 8px!important;font-size:13px!important;gap:6px!important}
  .home-links .text-button svg{width:16px!important;height:16px!important}
}
@media(max-width:420px){
  .hero-copy{top:98px!important}
  .hero-copy h1{font-size:32px!important;max-width:9ch!important}
  .hero-intro{font-size:12px!important}
  .home-actions{top:254px!important}
  .home-links{grid-template-columns:1fr 1fr!important}
  .home-links .text-button:last-child{grid-column:1 / -1}
}
@media(min-width:1200px){
  .hero-copy{top:146px!important}
  .home-actions{top:358px!important}
}


/* v13 rebuilt minimal home menu */
body[data-screen=home] #stage{display:none!important}
.home-header .home-settings{display:none!important}
.home-screen{display:flex;align-items:center;justify-content:center;min-height:100%;padding:0 24px}
.home-header{position:absolute!important;top:clamp(24px,4vh,40px)!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:auto!important;min-height:auto!important;display:block!important}
.wordmark.wordmark-home{font-size:18px!important;letter-spacing:.28em!important;font-weight:700!important;color:var(--ink)!important}
.wordmark.wordmark-home span{display:block}
.hero-copy{position:absolute!important;left:50%!important;top:23vh!important;transform:translateX(-50%)!important;width:min(520px,88vw)!important;text-align:center!important}
.hero-copy h1{font-size:clamp(38px,4.3vw,62px)!important;line-height:1.1!important;letter-spacing:.08em!important;font-weight:700!important;margin:0 auto!important;max-width:none!important}
.hero-intro{display:block!important;margin:14px auto 0!important;max-width:30ch!important;font-size:18px!important;line-height:1.45!important;color:var(--muted)!important;text-align:center!important}
.hero-pills,.hero-caption{display:none!important}
.home-actions{position:absolute!important;left:50%!important;top:42vh!important;transform:translateX(-50%)!important;width:min(340px,86vw)!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:12px!important}
.home-play{min-height:60px!important;border-radius:0!important;padding:0 22px!important;background:transparent!important;color:var(--ink)!important;border:1px solid var(--line)!important;box-shadow:none!important}
.home-play strong{font-size:17px!important;font-weight:700!important;letter-spacing:.02em!important}
.home-play small{font-size:12px!important;line-height:1.4!important;letter-spacing:.02em!important;text-transform:none!important;opacity:.72!important}
.home-play svg{width:22px!important;height:22px!important;stroke-width:1.5!important}
.home-status{display:flex!important;flex-direction:column!important;align-items:center!important;gap:8px!important;width:100%}
#home-progress{margin:0!important;font-size:14px!important;line-height:1.3!important;color:var(--muted)!important}
.home-dots{display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;min-height:10px}
.home-dots i{width:6px!important;height:6px!important;border-radius:50%!important;background:var(--line)!important;display:block!important}
.home-dots i.active{background:var(--accent)!important}
.home-links{display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:center!important;gap:14px!important;margin-top:4px!important;width:100%}
.home-links .text-button{min-height:auto!important;padding:0!important;background:transparent!important;border:none!important;box-shadow:none!important;border-radius:0!important;font-size:15px!important;font-weight:700!important;color:var(--ink)!important;gap:8px!important}
.home-links .text-button svg{width:17px!important;height:17px!important;stroke-width:1.5!important}
.home-links .text-button:not(:last-child)::after{content:'|';margin-left:14px;color:var(--line);font-weight:400}
.home-links .text-button:last-child::after{content:none}
.new-dot{width:5px!important;height:5px!important;margin-left:2px!important}
.home-footer{position:absolute!important;left:50%!important;top:58vh!important;transform:translateX(-50%)!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:16px!important;width:min(340px,86vw)!important}
.home-divider{width:100%!important;height:1px!important;background:var(--line)!important}
.home-meta-button{min-height:auto!important;padding:0!important;background:transparent!important;border:none!important;box-shadow:none!important;font-size:15px!important;font-weight:700!important;color:var(--muted)!important;gap:8px!important}
.home-meta-button svg{width:17px!important;height:17px!important;stroke-width:1.5!important}
@media(max-aspect-ratio:1/1){
  .home-header{top:max(16px,env(safe-area-inset-top))!important}
  .wordmark.wordmark-home{font-size:16px!important;letter-spacing:.24em!important}
  .hero-copy{top:16vh!important;width:90vw!important}
  .hero-copy h1{font-size:34px!important;letter-spacing:.06em!important}
  .hero-intro{font-size:14px!important;max-width:26ch!important;margin-top:10px!important}
  .home-actions{top:38vh!important;width:90vw!important;max-width:320px!important}
  .home-play{min-height:56px!important}
  .home-play strong{font-size:16px!important}
  #home-progress{font-size:13px!important}
  .home-links{gap:10px!important}
  .home-links .text-button{font-size:14px!important}
  .home-links .text-button:not(:last-child)::after{margin-left:10px!important}
  .home-footer{top:56vh!important;width:90vw!important;max-width:320px!important}
}
@media(max-width:420px){
  .hero-copy{top:14vh!important}
  .hero-copy h1{font-size:30px!important}
  .hero-intro{font-size:13px!important}
  .home-actions{top:34vh!important}
  .home-links{display:grid!important;grid-template-columns:1fr!important;gap:12px!important}
  .home-links .text-button{justify-content:center!important}
  .home-links .text-button::after{content:none!important}
  .home-footer{top:63vh!important}
}


/* v13.1 quick fixes */
body[data-screen=home] .home-header{display:none!important}
body[data-screen=home] .home-divider{display:none!important}
@media(max-width:420px){
  .home-footer{top:66vh!important}
}


/* v13.3 mobile home spacing fix */
@media(max-aspect-ratio:1/1){
  .hero-copy{top:18vh!important;width:88vw!important}
  .home-actions{top:46vh!important;width:88vw!important;max-width:380px!important;gap:16px!important}
  .home-footer{top:72vh!important;width:88vw!important;max-width:380px!important}
}
@media(max-width:420px){
  .hero-copy{top:16vh!important}
  .hero-copy h1{font-size:32px!important}
  .hero-intro{font-size:13px!important;max-width:27ch!important}
  .home-actions{top:43vh!important;width:88vw!important;max-width:390px!important;gap:16px!important}
  .home-links{display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:center!important;gap:12px 18px!important}
  .home-links .text-button{font-size:13px!important}
  .home-links .text-button::after{content:none!important}
  .home-footer{top:78vh!important;width:88vw!important;max-width:390px!important;gap:12px!important}
  .home-meta-button{width:100%!important;min-height:54px!important;padding:0 18px!important;border:1px solid var(--line)!important;border-radius:18px!important;justify-content:center!important;color:var(--ink)!important}
}


/* v13.4 lower settings slightly */
.home-footer{top:62vh!important}
@media(max-aspect-ratio:1/1){
  .home-footer{top:76vh!important}
}
@media(max-width:420px){
  .home-footer{top:83vh!important}
}


/* v14 Android / embedded Yandex layout hardening */
html,body{width:100%!important;height:100%!important;min-height:100%!important;background:var(--bg)!important}
#app{height:100%!important;min-height:100%!important;max-height:none!important;background:var(--bg)!important}
#stage,#cube{background:var(--bg)!important}
#stage{contain:layout paint;isolation:isolate}
#cube{transform:translateZ(0);backface-visibility:hidden;-webkit-backface-visibility:hidden}

/* Normal portrait mobile: keep a large play field and reserve a stable control area. */
@media(max-aspect-ratio:1/1){
  body[data-screen=game] #stage{top:92px!important;bottom:150px!important;left:3%!important;right:3%!important;min-height:260px!important}
  .game-bottom{left:4%!important;right:4%!important;bottom:max(16px,env(safe-area-inset-bottom))!important;width:auto!important;top:auto!important}
  .game-controls{width:min(94%,560px)!important;min-width:0!important;flex-direction:row!important;padding:10px 12px!important;gap:10px!important}
  .game-controls>button{min-width:0!important;flex:1!important;max-width:none!important;padding:8px 4px!important}
}

/* Yandex can embed the game as a wide, short iframe inside a portrait Android page.
   In that case a bottom toolbar steals most of the height, so place controls at the side. */
@media(max-height:580px) and (min-aspect-ratio:1/1){
  .game-header{top:7px!important;left:3%!important;right:3%!important;height:52px!important;max-width:none!important}
  .game-header .icon-button{width:40px!important;height:40px!important;min-width:40px!important}
  .level-heading h2{font-size:22px!important;line-height:1.1!important}
  body[data-screen=game] #stage{top:60px!important;bottom:8px!important;left:2%!important;right:22%!important;min-height:0!important}
  .game-bottom{left:auto!important;right:2%!important;top:66px!important;bottom:12px!important;width:18%!important;min-width:118px!important;display:flex!important;justify-content:center!important;align-items:stretch!important}
  .game-controls{width:100%!important;height:100%!important;min-width:0!important;display:flex!important;flex-direction:column!important;justify-content:center!important;gap:12px!important;padding:10px 8px!important;border-radius:20px!important}
  .game-controls>button{min-width:0!important;max-width:none!important;width:100%!important;flex:0 1 auto!important;padding:8px 2px!important;font-size:11px!important;gap:4px!important}
  .control-icon{height:28px!important;width:38px!important}
  .control-icon svg{width:22px!important;height:22px!important}
  .control-icon i{font-size:10px!important;min-width:18px!important;min-height:18px!important}
  .tutorial{left:40%!important;bottom:10px!important;max-width:52%!important;font-size:11px!important;padding:8px 9px!important}
}

/* Compact embedded home screen: all actions remain visible without fullscreen. */
@media(max-height:580px) and (min-aspect-ratio:1/1){
  body[data-screen=home] .home-header{display:none!important}
  body[data-screen=home] #stage{display:none!important}
  .home-screen{display:flex!important;align-items:center!important;justify-content:center!important;padding:10px 20px!important}
  .hero-copy{top:30px!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(52vw,430px)!important;text-align:center!important}
  .hero-copy h1{font-size:28px!important;line-height:1.08!important;letter-spacing:.05em!important}
  .hero-intro{display:none!important}
  .home-actions{top:104px!important;bottom:auto!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(460px,78vw)!important;max-width:none!important;gap:8px!important}
  .home-play{min-height:54px!important;padding:9px 18px!important;border-radius:16px!important}
  .home-play strong{font-size:17px!important}.home-play small{font-size:10px!important}
  .home-links{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:8px!important;margin:0!important}
  .home-links .text-button{min-height:42px!important;font-size:11px!important;padding:0 6px!important;border-radius:13px!important}
  .home-links .text-button::after{content:none!important}
  .home-footer{top:auto!important;bottom:10px!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(460px,78vw)!important}
  .home-meta-button{min-height:38px!important;font-size:11px!important}
}

/* Very short host slots: still keep the cube usable. */
@media(max-height:400px) and (min-aspect-ratio:1/1){
  .game-header{height:46px!important}
  body[data-screen=game] #stage{top:52px!important;right:24%!important;bottom:4px!important}
  .game-bottom{top:56px!important;bottom:6px!important;width:20%!important;min-width:108px!important}
  .game-controls{gap:5px!important;padding:6px!important}
  .game-controls>button{font-size:10px!important;padding:4px 1px!important}
}

/* Hidden screens must always stay hidden, even when responsive home rules use !important. */
.screen[hidden]{display:none!important}

/* Y8 RESPONSIVE REVIEW FIX v15
   The game fills the whole iframe and reflows at arbitrary host sizes.
   These rules intentionally override older fixed-position experiments above. */
html,body{
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:var(--bg)!important;
}
body{touch-action:manipulation!important}
#app{
  position:fixed!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  overflow:hidden!important;
  background:var(--bg)!important;
}
#ui,.screen,.loading-screen{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important}
#ui,.screen{inset:0!important}
#stage,#cube{background:var(--bg)!important}
#stage{min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important}
#cube{transform:none!important;backface-visibility:visible!important;-webkit-backface-visibility:visible!important}

/* Home: content participates in a fluid layout instead of being tied to one resolution. */
body[data-screen=home] #stage{display:none!important}
body[data-screen=home] .home-screen{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(18px,1fr) auto auto auto minmax(18px,1fr)!important;
  justify-items:center!important;
  align-items:center!important;
  align-content:stretch!important;
  gap:clamp(10px,2.2vh,22px)!important;
  padding:max(12px,env(safe-area-inset-top)) clamp(14px,4vw,56px) max(12px,env(safe-area-inset-bottom))!important;
  overflow:hidden!important;
}
body[data-screen=home] .home-header{display:none!important}
body[data-screen=home] .hero-copy{
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  grid-row:2!important;
  width:min(620px,94vw)!important;
  max-width:100%!important;
  margin:0!important;
  text-align:center!important;
}
body[data-screen=home] .hero-copy h1{
  font-size:clamp(28px,5.2vmin,58px)!important;
  line-height:1.08!important;
  letter-spacing:.01em!important;
  max-width:none!important;
  margin:0 auto!important;
}
body[data-screen=home] .hero-intro{
  display:block!important;
  font-size:clamp(12px,1.8vmin,15px)!important;
  line-height:1.5!important;
  margin:clamp(6px,1.5vh,14px) auto 0!important;
  max-width:36ch!important;
}
body[data-screen=home] .home-actions{
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  grid-row:3!important;
  width:min(420px,94vw)!important;
  max-width:100%!important;
  margin:0!important;
  gap:clamp(8px,1.7vh,14px)!important;
}
body[data-screen=home] .home-play{
  min-height:clamp(52px,9vh,72px)!important;
  padding:clamp(10px,1.8vh,16px) clamp(16px,3vw,22px)!important;
  border-radius:clamp(15px,2.4vmin,22px)!important;
}
body[data-screen=home] .home-play strong{font-size:clamp(15px,2.7vmin,22px)!important}
body[data-screen=home] .home-play small{font-size:clamp(9px,1.5vmin,12px)!important}
body[data-screen=home] .home-status{gap:clamp(4px,1vh,8px)!important}
body[data-screen=home] .home-links{
  width:100%!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:clamp(6px,1.5vw,12px)!important;
  margin:0!important;
}
body[data-screen=home] .home-links .text-button{
  min-width:0!important;
  min-height:clamp(38px,6.5vh,50px)!important;
  padding:6px 8px!important;
  font-size:clamp(11px,1.8vmin,14px)!important;
  white-space:nowrap!important;
}
body[data-screen=home] .home-links .text-button::after{content:none!important}
body[data-screen=home] .home-footer{
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  grid-row:4!important;
  display:flex!important;
  width:min(420px,94vw)!important;
  max-width:100%!important;
  margin:0!important;
  align-items:center!important;
  justify-content:center!important;
  gap:0!important;
}
body[data-screen=home] .home-divider{display:none!important}
body[data-screen=home] .home-meta-button{
  width:auto!important;
  min-height:40px!important;
  padding:6px 14px!important;
  border:0!important;
  border-radius:14px!important;
  background:transparent!important;
  box-shadow:none!important;
  font-size:clamp(11px,1.7vmin,14px)!important;
}

/* Gameplay: reserve flexible HUD areas and let the board consume all remaining space. */
body[data-screen=game] .game-header{
  top:max(10px,env(safe-area-inset-top))!important;
  left:clamp(10px,4vw,48px)!important;
  right:clamp(10px,4vw,48px)!important;
  width:auto!important;
  max-width:none!important;
  height:clamp(44px,8vh,64px)!important;
  transform:none!important;
  margin:0!important;
}
body[data-screen=game] .level-heading h2{font-size:clamp(19px,3.6vmin,32px)!important}
body[data-screen=game] #stage{
  top:clamp(66px,12vh,104px)!important;
  bottom:clamp(104px,20vh,148px)!important;
  left:clamp(8px,2.5vw,34px)!important;
  right:clamp(8px,2.5vw,34px)!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  transform:none!important;
}
body[data-screen=game] .game-bottom{
  top:auto!important;
  left:clamp(8px,3vw,40px)!important;
  right:clamp(8px,3vw,40px)!important;
  bottom:max(8px,env(safe-area-inset-bottom))!important;
  width:auto!important;
  height:auto!important;
  min-width:0!important;
}
body[data-screen=game] .game-controls{
  width:min(480px,96%)!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  flex-direction:row!important;
  justify-content:center!important;
  gap:clamp(8px,3vw,24px)!important;
  padding:clamp(7px,1.5vh,12px) clamp(10px,3vw,22px)!important;
}
body[data-screen=game] .game-controls>button{
  min-width:0!important;
  width:auto!important;
  flex:1 1 0!important;
  max-width:180px!important;
  padding:clamp(4px,1vh,8px)!important;
  font-size:clamp(10px,1.7vmin,14px)!important;
}
body[data-screen=game] .tutorial{
  bottom:clamp(92px,18vh,140px)!important;
  max-width:min(520px,90vw)!important;
}

/* Wide but short embeds used by game portals: controls move to the side instead of crushing the board. */
@media (max-height:520px) and (min-aspect-ratio:4/3){
  body[data-screen=game] .game-header{
    top:4px!important;left:2%!important;right:2%!important;height:44px!important;
  }
  body[data-screen=game] .level-heading h2{font-size:clamp(17px,4.8vh,23px)!important}
  body[data-screen=game] #stage{
    top:50px!important;bottom:6px!important;left:1.5%!important;right:22%!important;
  }
  body[data-screen=game] .game-bottom{
    left:auto!important;right:1.5%!important;top:54px!important;bottom:6px!important;
    width:18.5%!important;min-width:96px!important;
  }
  body[data-screen=game] .game-controls{
    width:100%!important;height:100%!important;flex-direction:column!important;
    gap:6px!important;padding:6px!important;border-radius:16px!important;
  }
  body[data-screen=game] .game-controls>button{
    width:100%!important;max-width:none!important;flex:1 1 0!important;
    font-size:clamp(9px,2.6vh,12px)!important;gap:3px!important;
  }
  body[data-screen=game] .control-icon{height:24px!important;width:34px!important}
  body[data-screen=game] .control-icon svg{width:20px!important;height:20px!important}
  body[data-screen=game] .tutorial{left:40%!important;bottom:8px!important;max-width:52%!important}
}

/* Narrow / portrait: keep all controls visible and board centered. */
@media (max-aspect-ratio:3/4){
  body[data-screen=home] .home-screen{gap:clamp(8px,1.8vh,16px)!important;padding-left:4vw!important;padding-right:4vw!important}
  body[data-screen=home] .hero-copy,body[data-screen=home] .home-actions,body[data-screen=home] .home-footer{width:min(390px,92vw)!important}
  body[data-screen=home] .home-links{gap:7px!important}
  body[data-screen=game] #stage{top:clamp(64px,10vh,92px)!important;bottom:clamp(118px,17vh,150px)!important;left:2%!important;right:2%!important}
  body[data-screen=game] .game-header{left:3%!important;right:3%!important;height:50px!important}
  body[data-screen=game] .game-controls{width:min(94vw,520px)!important}
}

/* Extremely small host slots: compact without clipping or forcing a fixed aspect ratio. */
@media (max-height:430px){
  body[data-screen=home] .home-screen{grid-template-rows:minmax(4px,.35fr) auto auto auto minmax(4px,.35fr)!important;gap:5px!important;padding-top:6px!important;padding-bottom:6px!important}
  body[data-screen=home] .hero-copy h1{font-size:clamp(22px,8vh,34px)!important}
  body[data-screen=home] .hero-intro{display:none!important}
  body[data-screen=home] .home-play{min-height:42px!important;padding-top:7px!important;padding-bottom:7px!important}
  body[data-screen=home] .home-links .text-button{min-height:34px!important}
  body[data-screen=home] .home-footer{display:none!important}
}
@media (max-width:430px){
  body[data-screen=home] .home-links{grid-template-columns:1fr!important;gap:5px!important}
  body[data-screen=home] .home-links .text-button{min-height:36px!important}
}
@media (max-width:430px) and (max-height:720px){
  body[data-screen=home] .hero-intro{display:none!important}
  body[data-screen=home] .home-footer{display:none!important}
}

/* Scrolling screens and dialogs follow the live iframe size. */
.levels-screen{height:100%!important;max-height:100%!important;overflow-x:hidden!important;overflow-y:auto!important}
.levels-content{width:min(650px,100%)!important;max-width:100%!important;padding-left:clamp(14px,4vw,24px)!important;padding-right:clamp(14px,4vw,24px)!important}
.modal-layer{inset:0!important;width:100%!important;height:100%!important}
.modal{max-width:min(560px,92vw)!important;max-height:min(88vh,calc(var(--app-height,100vh) - 24px))!important;overflow:auto!important}
.screen[hidden]{display:none!important}

