:root{color-scheme:light;--ink:#275777;--muted:#6b91a5;--gold:#ffd442;--display:PourNumbers,"Segoe UI",sans-serif;--numbers:PourNumbers,"Segoe UI",sans-serif;--body:PourNumbers,"Segoe UI",sans-serif}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{display:flex;align-items:center;justify-content:center;background:#93ddff url("assets/pixel-playground.webp") center/cover no-repeat;color:var(--ink);font:14px var(--body);user-select:none;overscroll-behavior:none;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;border:0;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible,canvas:focus-visible{outline:3px solid #f29232;outline-offset:3px}button:disabled{cursor:default}button:active:not(:disabled){transform:translateY(2px)}[hidden]{display:none!important}.icon-library{position:absolute;overflow:hidden;pointer-events:none}.game-icon{flex-shrink:0;overflow:visible;image-rendering:pixelated}.screen-reader-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.game-shell{position:relative;width:min(460px,calc(100dvh*.54));height:min(930px,100dvh);min-width:280px;border:3px solid #fff8d8;border-radius:18px;overflow:hidden;background:#b3ecff url("assets/pixel-playground.webp") center/cover no-repeat;box-shadow:0 0 0 3px #459fca,0 14px 40px #4c93b840;isolation:isolate}.game-shell::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,#b4ebff18,#fff5cb65 55%,#ffe7a1cc);pointer-events:none}
.screen{width:100%;height:100%;position:relative;display:flex;flex-direction:column;padding:max(14px,env(safe-area-inset-top)) 13px max(16px,env(safe-area-inset-bottom));overflow:hidden}.home-topbar,.game-topbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;min-height:49px}.heart-card,.coin-card,.icon-button{display:flex;align-items:center;justify-content:center;gap:5px;height:43px;border:2px solid #56abd1;border-radius:8px;background:#fff9e2;box-shadow:0 3px 0 #2788b1,inset 0 2px 0 #ffffff;padding:3px 8px}.heart-card{min-width:98px;padding-left:3px}.heart-card .game-icon{width:30px;height:30px}.heart-card>span{display:flex;flex-direction:column;gap:3px}.heart-card strong{font-size:15px}.heart-card strong small{font-size:9px}.heart-card span>small{font-size:9px;color:#6e95aa}.coin-card{position:relative;min-width:94px}.coin-card strong{font-size:15px}.coin-card .game-icon{width:27px;height:27px}.icon-button{width:43px;flex-shrink:0;background:#65d5ff;padding:6px}.icon-button .game-icon{width:30px;height:30px}.coin-card .ad-tag{top:-7px;right:-5px}
.brand{text-align:center;flex-shrink:0;position:relative;padding:15px 0 1px}.brand h1{width:230px;max-width:74vw;margin:0 auto;line-height:0;filter:drop-shadow(0 3px 0 #ffffff)}.brand h1 .game-icon{display:block;width:100%;height:auto}.brand-pixels{display:flex;justify-content:center;gap:7px;margin:5px auto}.brand-pixels i{width:7px;height:7px;background:#ffd43b;box-shadow:0 2px 0 #e4b457}.brand-pixels i:nth-child(2){background:#7be161}.brand-pixels i:nth-child(3){background:#ff88b9}.brand-pixels i:nth-child(4){background:#51cfee}.brand-pixels i:nth-child(5){background:#bba0ff}
.home-picture{background:transparent;position:relative;width:100%;max-width:355px;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;margin:10px auto 7px;padding:0 0 18px;max-height:365px}.wood-frame{height:min(100%,310px);width:auto;max-width:100%;aspect-ratio:1.13;position:relative;padding:13px 13px 27px;border:3px solid #fff7d6;border-radius:9px;background:#ffd968;box-shadow:0 0 0 2px #5abada,0 6px 0 #dfac49,0 10px 0 2px #67a8ba}.wood-frame::before{content:"";position:absolute;left:5px;right:5px;top:4px;height:3px;background:#fff7d6}.wood-frame canvas{width:100%;height:100%;display:block;image-rendering:pixelated;background:#242b34;border:2px solid #53abc9;border-radius:3px}.picture-sticker{position:absolute;bottom:-13px;left:50%;transform:translateX(-50%);min-width:180px;padding:9px 15px;border:2px solid #ffffff;border-radius:6px;background:#65d6f5;box-shadow:0 3px 0 #2798c1;display:flex;align-items:center;justify-content:center;gap:9px;white-space:nowrap;font-size:12px;font-weight:800}.picture-sticker span:last-child{color:#397d9e;font-size:9px}
.home-bottom{text-align:center;flex-shrink:0;padding:17px 18px 4px}.primary-button{position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;padding:11px 13px;border:2px solid #ffffff;border-radius:7px;background:#79dd61;box-shadow:0 4px 0 #349856,0 0 0 1px #3ca976,inset 0 3px 0 #b8f797;color:#ffffff;font:900 17px var(--numbers);text-shadow:0 2px 0 #3c9b52}.start-button{display:grid;grid-template-columns:42px 1fr;min-height:70px;padding:9px 24px;background:#70d85e;font-size:28px}.start-button .game-icon{grid-row:1/3;width:40px;height:40px}.start-button span{text-align:center}.start-button small{grid-column:2;font-size:10px;font-weight:700;line-height:1.3;letter-spacing:1px;text-shadow:none;color:#267343}
.home-navigation{display:flex;justify-content:center;gap:16px;margin-top:20px}.home-nav-button{height:72px;min-width:76px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;padding:5px 7px;border:2px solid #ffffff;border-radius:9px;background:#ffe784;box-shadow:0 4px 0 #d6a744,inset 0 2px 0 #fff9c7}.home-nav-button:nth-child(2){background:#d7c4ff;box-shadow:0 4px 0 #9583c7,inset 0 2px 0 #f1e7ff}.home-nav-button:nth-child(3){background:#91e4f8;box-shadow:0 4px 0 #4199c2,inset 0 2px 0 #d1f6ff}.home-nav-button .game-icon{width:38px;height:38px}.home-nav-button strong{font-size:11px;font-weight:800}
.play-screen{padding-left:3px;padding-right:3px;padding-top:11px;padding-bottom:10px;background:linear-gradient(180deg,#9cdefc38,#fff0bc8c)}.game-topbar{padding:0 10px;gap:7px;min-height:46px}.level-card{display:flex;flex-direction:column;gap:4px;min-width:91px;padding:8px 10px;border:2px solid #ffffff;border-radius:6px;background:#87dcfa;box-shadow:0 3px 0 #419fc4;text-align:center}.level-card strong{font-size:16px;font-weight:900}.level-card small{font-size:8px;color:#39799c}.score-card{flex:1;min-width:0;text-align:center}.score-total{display:flex;align-items:center;justify-content:center;gap:5px}.score-total>.game-icon{width:30px;height:30px}.score-total strong{font-size:21px;font-weight:900;color:#ffffff;text-shadow:0 2px 0 #629bc0,1px 0 #629bc0,-1px 0 #629bc0}.queue-slot{height:16px;display:flex;justify-content:center;align-items:center}.bucket-queue{display:inline-flex;align-items:center;gap:3px;max-height:16px;color:#4b849e;background:#effcffc9;border-radius:3px;padding:0 4px;font-size:8px;font-weight:700}.bucket-queue .game-icon{width:13px;height:13px}.game-progress{flex-shrink:0;height:6px;margin:8px 20px 4px;border:1px solid #74badd;background:#d6f3fa;border-radius:2px;overflow:hidden}.game-progress span{display:block;width:0;height:100%;background:#ffd74f;transition:width .2s linear}.game-hint{flex-shrink:0;display:none;align-items:center;justify-content:center;gap:9px;font-size:10px}.game-hint.selecting{display:flex;min-height:30px;background:#ffeb9ccc;border-radius:5px;margin:2px 17px}.game-hint button{padding:6px 10px;min-height:27px;font-size:10px;background:#ffffff;border-radius:4px}
.playfield{position:relative;flex:1;min-height:0;width:100%;display:flex;align-items:center;justify-content:center}.playfield canvas{display:block;width:100%;height:100%;touch-action:none;outline:none;image-rendering:pixelated}.tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:10px 8px 9px;margin:0 11px;flex-shrink:0;border:2px solid #ffffff;border-radius:8px;background:#ffe28b;box-shadow:0 4px 0 #dba84c}.tool-button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;height:67px;gap:3px;background:#fff6d8;border:2px solid #ffffff;border-radius:6px;box-shadow:0 3px 0 #d6b267;min-width:0}.tool-button:nth-child(1){background:#ffe1e6;box-shadow:0 3px 0 #d5979d}.tool-button:nth-child(3){background:#daf7eb;box-shadow:0 3px 0 #8fbaa7}.tool-button:nth-child(4){background:#dcf2ff;box-shadow:0 3px 0 #8fb8cc}.tool-button .game-icon{width:35px;height:35px}.tool-button strong{font-size:11px;font-weight:900}.tool-detail{display:none}.tool-button:disabled{filter:grayscale(.7);opacity:.65}.ad-tag,.free-tag{position:absolute;right:-5px;top:-10px;border:1px solid #ffffff;background:#ffab61;color:#ffffff;padding:3px 5px;border-radius:4px;font-size:9px;font-weight:800;box-shadow:0 2px 0 #cb8553}.owned-tag{background:#74c897}.active-tool{outline:2px solid #ffb943}.ad-banner{flex-shrink:0;min-height:20px;background:#ffffff;color:#76a0b2;text-align:center;font-size:9px}.toast{position:absolute;left:18px;right:18px;bottom:110px;padding:12px;border:2px solid #ffffff;border-radius:6px;background:#285f7bea;color:#ffffff;text-align:center;font-size:11px;z-index:20;pointer-events:none}
.modal{padding:0;border:0;background:transparent;color:var(--ink);width:min(370px,calc(100vw - 30px));max-height:calc(100dvh - 38px);overflow:visible}.modal::backdrop{background:#1b4e756b;backdrop-filter:blur(2px)}.modal-card{position:relative;max-height:calc(100dvh - 38px);overflow:auto;padding:25px 22px 22px;text-align:center;border:3px solid #ffffff;border-radius:11px;background:#fff7dd;box-shadow:0 0 0 3px #70bcd7,0 8px 0 #3884aa,0 18px 45px #124c6845}.modal-card h2{font:900 22px/1.2 var(--numbers);margin:11px 25px 15px;color:#317897}.modal-card p{font-size:11px;line-height:1.65;color:#6c8b99;margin:0 0 17px}.modal-card .primary-button{margin-top:12px}.modal-close{position:absolute;right:8px;top:8px;display:flex;align-items:center;justify-content:center;width:35px;height:35px;background:#ffe3bb;border:1px solid #ffffff;border-radius:4px}.modal-close .game-icon{width:25px;height:25px}.modal-symbol{margin:0 auto;width:65px;height:65px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:#aeeaf8;border:2px solid #ffffff;box-shadow:0 3px 0 #61afcf}.modal-symbol .game-icon{width:48px;height:48px}.win-symbol{background:#ffed9d}.fail-symbol{background:#ffd4d4}.secondary-button{width:100%;min-height:43px;margin-top:10px;padding:9px;border:2px solid #ffffff;border-radius:6px;background:#a4e1f5;box-shadow:0 3px 0 #64aaca;font-size:13px;font-weight:800}.secondary-button:disabled{opacity:.4}.text-button{display:block;margin:12px auto 0;padding:8px;min-height:38px;color:#76a0af;background:transparent;font-size:11px;font-weight:700}.modal-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 2px;border-bottom:1px solid #e8dec0;font-size:13px}.switch{position:relative;width:49px;height:27px;border-radius:5px;border:2px solid #aac5cb;background:#b7ccd0;box-shadow:inset 0 2px 0 #88a9b5}.switch::after{content:"";position:absolute;width:19px;height:19px;top:2px;left:3px;background:#fffdf0;border-radius:3px;box-shadow:0 2px 0 #6393a5}.switch[aria-checked=true]{background:#7cda65;border-color:#65bc63}.switch[aria-checked=true]::after{left:24px}.heart-display{display:flex;justify-content:center;gap:4px;margin:17px 0}.heart-display .game-icon{width:38px;height:38px}.heart-display .empty{filter:grayscale(1);opacity:.35}.help-steps{text-align:left;padding-left:22px;color:#6b8c9f;font-size:11px;line-height:1.65}.help-steps li{margin-bottom:10px}.win-stats{font-size:12px;font-weight:800;color:#4e8eaa}.coin-reward{display:inline-flex;align-items:center;gap:3px;color:#ce9834}.coin-reward .game-icon{width:21px;height:21px}.next-preview{width:155px;margin:14px auto;background:#ffffff;border:2px solid #f2d99b;padding:6px;border-radius:4px}.next-preview canvas{display:block;width:139px;height:115px;image-rendering:pixelated}.mechanic-preview{padding:7px;background:#dcf3fb;border-radius:4px;font-size:10px}
.shop-heading{display:flex;align-items:center;justify-content:space-between;gap:9px;margin:13px 0 16px}.shop-heading h2{margin:0;font-size:20px}.shop-wallet{display:inline-flex;align-items:center;gap:3px;padding:3px 6px;border:1px solid #f4d27e;background:#fff0b3;border-radius:5px;font-size:12px;font-weight:800}.shop-wallet .game-icon{width:23px;height:23px}.shop-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.shop-item{display:flex;align-items:center;flex-direction:column;gap:5px;padding:12px 7px;background:#fffdf1;border:2px solid #f4d99f;border-radius:6px}.shop-tool{width:65px;height:58px;display:flex;align-items:center;justify-content:center}.shop-tool .game-icon{width:55px;height:55px}.shop-copy h3{font-size:15px;margin:0 0 4px}.shop-copy h3 small{display:block;font-size:9px;font-weight:500;color:#97acb0;margin-top:4px}.modal-card .shop-copy p{font-size:9px;margin:0 0 7px}.shop-buy{display:flex;align-items:center;justify-content:center;gap:4px;min-height:36px;width:100%;border-radius:4px;background:#ffdf72;border:1px solid #fffdf0;box-shadow:0 2px 0 #d9b152;font-size:11px;font-weight:900}.shop-buy .game-icon{width:22px;height:22px}.shop-buy:disabled{opacity:.4}.modal-card .shop-note{margin:15px 0 0;font-size:9px}
.guide-coach{position:absolute;left:9%;right:9%;bottom:33%;padding:14px;border:2px solid #ffffff;border-radius:6px;background:#fff9ddf2;box-shadow:0 5px 0 #73aec7;pointer-events:auto;text-align:center}.guide-top{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#7a99aa}.guide-top button{background:transparent;color:#79a0b0;font-size:10px;padding:5px;min-height:30px}.guide-coach strong{display:block;font-size:17px;margin:7px 0;color:#34768f}.guide-coach p{font-size:10px;line-height:1.5;margin:8px 0}.guide-next{display:block;margin:9px auto 0;padding:8px 22px;border-radius:4px;background:#82d974;color:#ffffff;font-size:12px;font-weight:800}
.ad-stage{margin:16px auto;padding:20px 10px;border:2px solid #ffffff;border-radius:7px;background:#98ddf4;color:#34788f;min-height:155px}.ad-symbol .game-icon{width:56px;height:56px}.ad-preview-badge{display:inline-block;margin:6px;font-size:9px;color:#4f8aa1}.ad-meter{height:7px;background:#d7f4fb;border-radius:2px;overflow:hidden;margin:13px 0}.ad-meter span{display:block;height:100%;width:0;background:#ffd65b}.loading-screen{justify-content:center;align-items:center;text-align:center}.loading-screen h1{font-size:29px;letter-spacing:2px;color:#ffffff;text-shadow:0 3px 0 #3aa9d4}.loading-screen p{font-size:11px;color:#5085a2}.loading-screen .primary-button{width:190px}.loading-cubes{display:flex;gap:10px}.loading-cubes i{width:15px;height:15px;background:#ffd748;box-shadow:3px 3px 0 #ddb154;animation:hop .9s ease-in-out infinite}.loading-cubes i:nth-child(2){background:#75df68;animation-delay:.1s}.loading-cubes i:nth-child(3){background:#ff89b8;animation-delay:.2s}.loading-cubes i:nth-child(4){background:#8ddff8;animation-delay:.3s}@keyframes hop{50%{transform:translateY(-8px)}}
.color-modal .modal-card{padding:20px 16px 18px}.color-modal .modal-card h2{font-size:19px;margin:8px 30px 14px}.color-preview{display:grid;grid-template-columns:88px minmax(0,1fr);gap:9px;align-items:center;padding:8px;border:1px solid #bbdfe9;border-radius:5px;background:#e2f6fb}.color-preview canvas{display:block;width:88px;height:79px;background:#29313b;border:1px solid #aad4e0;image-rendering:pixelated}.color-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.color-legend-item{display:flex;align-items:center;gap:4px;font-size:9px;min-width:0}.color-legend-item i,.mode-chips i{display:block;width:12px;height:12px;flex-shrink:0;border:1px solid #ffffff;box-shadow:1px 1px 0 #729bb4;border-radius:1px}.color-legend-item b{font-size:9px}.color-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}.color-mode{position:relative;min-height:83px;padding:9px 7px;border:2px solid #ffffff;border-radius:6px;background:#d9eef7;box-shadow:0 2px 0 #9cc4d4;color:#44839b}.color-mode strong{display:block;font-size:12px;margin:4px}.color-mode[aria-pressed=true]{border-color:#72cadd;background:#b3eafa;box-shadow:0 3px 0 #3b9eb6}.mode-chips{display:flex;justify-content:center;gap:4px}.color-mode-note{display:block;margin-top:6px;font-size:8px;color:#689cab}.color-disclaimer{font-size:9px!important;line-height:1.5!important;margin:12px 0!important}.color-disclaimer a{color:#4893b1}.color-check-entry{display:flex;align-items:center;gap:8px;width:100%;padding:10px;border:2px solid #ffffff;border-radius:6px;background:#ffeb9c;box-shadow:0 3px 0 #dfbd6d;text-align:left}.color-check-entry>.game-icon{width:33px;height:33px}.color-check-entry>span{flex:1;display:flex;flex-direction:column;gap:4px}.color-check-entry strong{font-size:12px}.color-check-entry small{font-size:9px;color:#8f945e}.color-check-entry>b{background:#fff8d2;border-radius:3px;padding:8px;font-size:11px}.color-choice-note{font-size:9px!important;margin:13px 0 0!important}.color-card-top{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#689ab3}.reference-plate{width:100%;margin:11px auto}.reference-plate canvas{display:block;width:100%;height:auto;border-radius:7px}.color-answer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.color-answer{min-height:44px;border:2px solid #ffffff;border-radius:5px;background:#a6e2f2;box-shadow:0 2px 0 #78b2c5;font-size:17px;font-weight:800}.unclear-answer{grid-column:1/-1;font-size:11px;background:#e6e8d5}.color-results{display:grid;gap:7px;margin:12px 0}.color-result-detail{padding:9px;text-align:left;border:1px solid #c1dfe7;border-radius:5px;background:#e3f4f8}.color-result-title{font-size:11px;font-weight:800}.color-result-scope{font-size:9px;line-height:1.5;color:#81a0ab;margin-top:5px}.color-recommendation{font-size:13px!important;color:#679b7f!important;font-weight:800}
.level-picker-cue{position:absolute;right:4px;top:4px;z-index:2;width:26px;height:26px;background:#fff8de;border:2px solid #ffffff;border-radius:4px;box-shadow:0 2px 0 #cfb071;display:flex;align-items:center;justify-content:center}.level-picker-cue .game-icon{width:22px;height:22px}
.level-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px 9px;margin:14px 0}.level-tile{position:relative;aspect-ratio:1.05;padding:5px 5px 17px;background:#ffeaa8;border:2px solid #ffffff;border-radius:5px;box-shadow:0 3px 0 #cfb071}.level-tile canvas{width:100%;height:100%;display:block;image-rendering:pixelated}.level-number{position:absolute;bottom:3px;left:0;right:0;font-size:9px;font-weight:900;color:#528db1}.level-tile.chosen{outline:2px solid #42b4d4;background:#caf4ff;box-shadow:0 3px 0 #469fbd}.level-tile.locked{background:#d6dde0;border-color:#edf2f3;box-shadow:0 3px 0 #a5b1b6}.level-tile.locked canvas{filter:grayscale(1) brightness(.75);opacity:.6}.level-lock{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#b0c0c028}.level-lock .game-icon{width:30px;height:30px}.level-paging{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:9px;color:#82a5b3}.level-paging .secondary-button{width:auto;min-height:35px;padding:8px;font-size:9px;margin-top:0}
@media(max-width:500px){.game-shell{width:100%;height:100dvh;max-width:460px;min-width:280px;border:0;border-radius:0;box-shadow:none}}
@media(max-height:720px){.screen{padding-top:10px;padding-bottom:11px}.brand{padding-top:10px}.brand h1{width:200px}.home-picture{max-height:290px;margin-top:6px}.home-bottom{padding-top:12px}.home-navigation{margin-top:14px}.home-nav-button{height:64px;min-width:72px}.start-button{min-height:61px;font-size:25px}.play-screen{padding-top:7px;padding-bottom:8px}.tools{padding:7px 6px;margin:0 9px;gap:7px}.tool-button{height:58px}.tool-button .game-icon{width:31px;height:31px}.tool-button strong{font-size:10px}.game-topbar{min-height:40px}.level-card{min-width:80px;padding:6px 8px}.level-card strong{font-size:14px}.level-card small{font-size:7px}.score-total strong{font-size:18px}.score-total>.game-icon{width:27px;height:27px}.queue-slot{height:13px}.icon-button{width:38px;height:38px}.game-progress{margin-top:6px}.modal-card{padding:20px 16px 18px}.modal-card h2{font-size:20px}.level-grid{gap:9px 7px}.guide-coach{padding:11px}.guide-coach strong{font-size:14px}.guide-coach p{font-size:9px}}
@media(max-height:610px){.home-topbar{min-height:40px}.brand{padding-top:6px}.brand h1{width:165px}.brand-pixels{margin-top:2px}.brand-pixels i{width:5px;height:5px}.wood-frame{padding:10px 10px 22px}.picture-sticker{padding:7px 12px;font-size:11px;min-width:165px}.home-picture{max-height:233px;margin-top:4px}.home-bottom{padding-top:8px}.home-navigation{margin-top:11px}.home-nav-button{height:55px;min-width:68px;gap:1px}.home-nav-button .game-icon{width:31px;height:31px}.home-nav-button strong{font-size:10px}.start-button{min-height:51px;font-size:22px}.start-button .game-icon{width:32px;height:32px}.start-button small{font-size:8px}.tools{padding-top:6px;padding-bottom:6px}.tool-button{height:51px;gap:1px}.tool-button .game-icon{width:29px;height:29px}.tool-button strong{font-size:9px}.modal-card .next-preview{width:123px;margin:8px auto}.next-preview canvas{width:107px;height:88px}.modal-symbol{width:50px;height:50px}.modal-symbol .game-icon{width:38px;height:38px}.modal-card h2{margin:9px 25px 12px}.modal-card p{margin-bottom:12px}.modal-card .primary-button{min-height:42px;font-size:14px}.level-grid{margin-top:12px}.shop-tool{height:43px}.shop-tool .game-icon{width:43px;height:43px}.shop-item{padding-top:7px;padding-bottom:7px;gap:3px}.shop-copy h3{font-size:13px}.reference-plate{max-width:230px}.modal-card .shop-note{margin-top:11px}}
@media(max-width:350px){.screen{padding-left:10px;padding-right:10px}.play-screen{padding-left:1px;padding-right:1px}.home-bottom{padding-left:12px;padding-right:12px}.game-topbar{padding-left:9px;padding-right:9px}.heart-card{min-width:89px}.coin-card{min-width:83px}.coin-card strong{font-size:13px}.heart-card strong{font-size:13px}.tools{margin-left:6px;margin-right:6px;gap:5px}.score-total strong{font-size:17px}.level-card{min-width:76px}.home-navigation{gap:13px}.modal-card{padding-left:13px;padding-right:13px}.color-mode strong{font-size:11px}.color-preview{grid-template-columns:77px minmax(0,1fr)}.color-preview canvas{width:77px;height:70px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;animation-iteration-count:1!important}}
/* Keep the HUD below a notch without adding a visible label or spacer. */
.screen{--device-safe-top:env(safe-area-inset-top,0px);padding-top:max(24px,calc(var(--device-safe-top) + 8px))}
.play-screen{padding-bottom:max(10px,env(safe-area-inset-bottom,0px))}

/* Cream beach: in-level surfaces only; home, dialogs and game rules stay shared. */
body:has(#game-screen:not([hidden])){background:#64d0ed url("assets/cream-beach.webp") center/cover no-repeat}
.game-shell:has(#game-screen:not([hidden])){border-color:#ffe7a5;box-shadow:0 0 0 3px #cda25d,0 14px 40px #98753730}
.game-shell:has(#game-screen:not([hidden]))::after{display:none}
.play-screen{padding: max(24px,calc(var(--device-safe-top) + 10px)) 3px max(14px,env(safe-area-inset-bottom,0px));background:#ffecc2 url("assets/cream-beach.webp") center/100% 100% no-repeat;color:#35596a}
.play-screen .game-topbar{padding:0 18px;min-height:57px;gap:10px;align-items:center}
.play-screen .level-card{position:relative;min-width:96px;padding:12px 10px;gap:0;border:2px solid #cf9a43;border-radius:5px;background:#ffdf91;box-shadow:0 3px 0 #b7874b}
.play-screen .level-card::before{content:"";position:absolute;left:4px;top:4px;width:5px;height:3px;background:#ffe3a4;box-shadow:75px 0 #ffe3a4}
.play-screen .level-card strong{font-size:19px;letter-spacing:.2px;color:#294b5b}
.play-screen .level-card small{font-size:8px;color:#8b7955;max-width:100px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.play-screen .score-total{gap:5px}
.play-screen .score-total>.game-icon{width:35px;height:35px;filter:drop-shadow(0 2px 0 #a97836)}
.play-screen .score-total strong{font-size:27px;font-weight:900;color:#23485c;letter-spacing:0;-webkit-text-stroke:0;text-shadow:none}
.play-screen .queue-slot{height:15px;margin-top:2px}
.play-screen .bucket-queue{background:#fff4d9d9;color:#6b725c;border:1px solid #fff9e4;border-radius:4px;font-size:8px;gap:2px}
.play-screen .pause-button{width:47px;height:49px;padding:6px;border:2px solid #3593b4;border-radius:8px;background:#59d4f3;box-shadow:0 4px 0 #3286a4,inset 0 -4px 0 #3bb7df}
.play-screen .pause-button .game-icon{width:33px;height:33px;filter:drop-shadow(1px 2px 0 #256783)}
.play-screen .game-progress{height:6px;margin:9px 24px 7px;border:1px solid #2c97b5;border-radius:4px;background:#71cde6;box-shadow:inset 0 1px 0 #c1f3fd,0 1px 0 #effbff8c}
.play-screen .game-progress span{background:#ffd24d;box-shadow:inset 0 2px 0 #fff19a}
.play-screen .playfield{flex:0 1 auto;aspect-ratio:420/654;min-height:0}
.play-screen .tools{gap:10px;margin:1px 17px 0;padding:3px 0 7px;border:0;border-radius:0;background:none;box-shadow:none}
.play-screen .tool-button{--tool-face:#ffd4e0;--tool-shadow:#c78494;--tool-edge:#cf8c91;--tool-bottom:#efa8bb;height:80px;gap:2px;padding:7px 2px 8px;background:var(--tool-face);border:2px solid var(--tool-edge);border-radius:9px;box-shadow:0 5px 0 var(--tool-shadow),inset 0 -4px 0 var(--tool-bottom);transition:transform .12s,box-shadow .12s}
.play-screen .tool-button:nth-child(2){--tool-face:#fff0ac;--tool-shadow:#ce9a36;--tool-edge:#e1b255;--tool-bottom:#f2d47c}
.play-screen .tool-button:nth-child(3){--tool-face:#c7f4df;--tool-shadow:#67b99d;--tool-edge:#7acdaf;--tool-bottom:#9ee2c8}
.play-screen .tool-button:nth-child(4){--tool-face:#d0f0ff;--tool-shadow:#6baeca;--tool-edge:#87bed1;--tool-bottom:#a8dbef}
.play-screen .tool-button>.game-icon{width:42px;height:42px;filter:drop-shadow(1px 2px 0 #ffffff90)}
.play-screen .tool-button strong{font-size:13px;font-weight:900;color:#25495d;text-shadow:none}
.tool-art{display:inline-block;width:40px;height:40px;background:url("assets/sprites/tools-beach.webp") 0 0/200% 200% no-repeat;image-rendering:pixelated;vertical-align:middle}
.tool-art-speed{background-position:100% 0}.tool-art-shuffle{background-position:0 100%}.tool-art-expand{background-position:100% 100%}
.play-screen .tool-button>.tool-art{width:42px;height:42px;filter:none}
.shop-tool .tool-art{width:55px;height:55px}.modal-symbol>.tool-art{width:58px;height:58px}
.play-screen .tool-button strong{font-size:14px;line-height:1.2;letter-spacing:.4px}
.play-screen .tool-button .ad-tag{top:-8px;right:-3px;min-width:22px;min-height:18px;padding:2px 4px;border:1px solid #fff8dc;border-radius:4px;background:#ffa55c;box-shadow:0 2px 0 #c98446;font-size:9px;line-height:13px}
.play-screen .tool-button .owned-tag{background:#74c897;box-shadow:0 2px 0 #4c9c75}
.ad-tag.ad-play{display:flex;align-items:center;justify-content:center;min-width:29px;height:25px;padding:1px 3px;background:#ffa74b;border:1px solid #be7a34;border-radius:5px;box-shadow:0 2px 0 #b77331}
.ad-tag.ad-play>.game-icon{display:block;width:23px;height:21px;filter:none;flex:none}
.play-screen .tool-button .ad-tag.ad-play{top:-10px;min-width:29px;min-height:25px;padding:1px 3px}
.play-screen .tool-button:not(:disabled):active{transform:translateY(4px);box-shadow:0 1px 0 var(--tool-shadow),inset 0 -2px 0 var(--tool-bottom)}
.play-screen .tool-button.active-tool{outline:3px solid #fffbd1;outline-offset:3px}
.play-screen .game-hint.selecting{margin:0 20px 4px;min-height:28px;background:#fff3b7;border:1px solid #e9b854;color:#6a603d;box-shadow:0 2px 0 #b7975030}
.play-screen .ad-banner{margin-top:8px;background:#fff6d1;color:#7f765d}
@media(max-height:740px){
  .play-screen .game-topbar{min-height:45px;padding:0 15px}
  .play-screen .level-card{min-width:82px;padding:6px 8px;gap:2px}
  .play-screen .level-card::before{box-shadow:62px 0 #ffe3a4}
  .play-screen .level-card strong{font-size:15px}
  .play-screen .level-card small{font-size:7px;max-width:90px}
  .play-screen .score-total strong{font-size:24px}
  .play-screen .score-total>.game-icon{width:30px;height:30px}
  .play-screen .pause-button{width:41px;height:43px;padding:5px}
  .play-screen .pause-button .game-icon{width:29px;height:29px}
  .play-screen .queue-slot{height:12px}
  .play-screen .game-progress{margin-top:7px;margin-bottom:5px}
  .play-screen .tools{gap:8px;margin:1px 14px 0}
  .play-screen .tool-button{height:65px;padding:5px 1px 7px;gap:1px}
  .play-screen .tool-button>.game-icon{width:34px;height:34px}
  .play-screen .tool-button>.tool-art{width:34px;height:34px}
  .play-screen .tool-button{padding:4px 1px 5px}
  html[lang="zh-CN"] .play-screen .tool-button strong{font-size:13px}
  .play-screen .tool-button strong{font-size:11px}
}
@media(max-width:350px){
  .play-screen .game-topbar{padding:0 12px;gap:7px}
  .play-screen .tools{gap:8px;margin-left:13px;margin-right:13px}
  .play-screen .tool-button{height:60px}
  .play-screen .tool-button>.game-icon{width:31px;height:31px}
  .play-screen .tool-button>.tool-art{width:31px;height:31px}
  .play-screen .tool-button{padding:4px 1px}
  html[lang="zh-CN"] .play-screen .tool-button strong{font-size:12px}
  .play-screen .tool-button strong{font-size:10px}
}

/* B: beach postcards. These rules apply only to the home screen. */
body:has(#home-screen:not([hidden])){background-image:url("assets/home/background-calm.webp");background-position:center 43%}
.game-shell:has(#home-screen:not([hidden])){container-type:size;background:#28bdec;border-color:#ffe9ad;box-shadow:0 0 0 3px #d9a359,0 14px 40px #376b8540}
.game-shell:has(#home-screen:not([hidden]))::after{display:none}
.home-screen{padding:max(18px,env(safe-area-inset-top),2.8cqh) 4.5cqw max(18px,env(safe-area-inset-bottom),2.8cqh);background:url("assets/home/background-calm.webp") center/100% 100% no-repeat;color:#134c6d}
.home-screen .home-topbar{min-height:0;height:clamp(40px,5.7cqh,50px);gap:10px;z-index:3}
.home-screen .heart-card,.home-screen .coin-card{height:100%;border:2px solid #b77d29;border-radius:10px;background:linear-gradient(#fff6cb,#ffe9a1);box-shadow:inset 0 2px #fffceb,0 3px #ca9134;padding:4px 8px;gap:5px}
.home-screen .heart-card{min-width:0;width:29%;justify-content:flex-start}
.home-screen .heart-card>.game-icon{width:clamp(26px,8cqw,38px);height:clamp(26px,8cqw,38px)}
.home-screen .heart-card strong{font-size:clamp(15px,4.5cqw,20px);white-space:nowrap;font-weight:900}
.home-screen .heart-card strong small{font-size:.7em;color:#134c6d}
.home-screen #heart-timer{display:none}
.home-screen .coin-card{margin-left:auto;min-width:0;gap:4px}
.home-screen .coin-card>.game-icon{width:clamp(23px,7cqw,33px);height:clamp(23px,7cqw,33px)}
.home-screen .coin-card strong{font-size:clamp(15px,4.5cqw,20px);max-width:22cqw;overflow:hidden;text-overflow:ellipsis}
.home-screen .coin-card .ad-tag{position:static;margin-left:2px;flex-shrink:0;min-width:26px;width:26px;height:25px;border-color:#2c8eb5;background:#61d9f7;box-shadow:0 2px #2c8eb5}
.home-screen .settings-button{height:100%;width:auto;aspect-ratio:1;border-radius:11px;border-color:#1887b4;box-shadow:inset 0 2px #cefbff,0 3px #14719a;background:linear-gradient(#8aeaff,#40bfe9);padding:5px}
.home-screen .settings-button>.game-icon{width:30px;height:30px}
.home-screen .brand{height:14cqh;min-height:72px;padding:0;display:flex;align-items:center;justify-content:center;margin:1.5cqh -2cqw .8cqh;z-index:2}
.home-screen .brand h1{width:100%!important;max-width:100%;margin:0;filter:drop-shadow(0 3px 0 #a9722840)}
.home-screen .brand h1 img{display:block;width:100%;height:auto;max-height:15cqh;object-fit:contain}
.postcard-stage{position:relative;flex:1;min-height:0;margin:0 -2cqw 2cqh;isolation:isolate}
.home-screen .home-picture{position:absolute;inset:4% 8% 3%;width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;display:block;transform:rotate(4deg);z-index:2}
.home-screen .home-picture:active{transform:rotate(4deg)}
.home-screen .wood-frame{width:100%;height:100%;max-width:none;aspect-ratio:auto;padding:10px 10px 44px;border:2px solid #d79e52;border-radius:5px;background:#fff1cf;box-shadow:inset 0 0 0 3px #fff9e8,0 5px 0 #bd843a,0 9px 14px #744e4259}
.home-screen .wood-frame::before{display:none}
.home-art{display:block;background-repeat:no-repeat;image-rendering:pixelated;background-color:#6ad9f1}
.home-screen .wood-frame>.home-art,.home-screen .wood-frame>canvas{position:absolute;left:10px;right:10px;top:10px;width:calc(100% - 20px);height:calc(100% - 58px);border:0;border-radius:1px;background-color:#70d8ef;box-shadow:0 0 0 1px #e7be79}
.home-screen .wood-frame>canvas{opacity:0}
.home-screen .wood-frame>canvas.postcard-live{opacity:1;background:#262a30}
.home-screen .picture-sticker{bottom:8px;left:50%;min-width:0;padding:5px 22px;border:2px solid #ffab68;border-radius:5px;background:#ff7950;box-shadow:0 2px #cd633d;color:#fff9dc;font-size:clamp(17px,5cqw,23px);font-weight:900;text-shadow:0 2px #c65631;line-height:1.1;gap:0}
.home-screen .picture-sticker span:last-child{color:inherit;font-size:inherit}
.home-screen .level-picker-cue{position:absolute;left:16px;right:auto;top:auto;bottom:10px;width:25px;height:25px;padding:2px;border:0;box-shadow:none;background:transparent}
.home-screen .level-picker-cue .game-icon{width:22px;height:22px}
.postcard-stamp{position:absolute;top:5px;right:5px;width:38px;height:39px;display:grid;place-items:center;transform:rotate(-9deg);background:#fff5d9;border:2px dashed #eec077;box-shadow:0 2px #ad845737}
.postcard-stamp .game-icon{width:27px;height:27px}
.postcard-back{position:absolute;left:2%;top:9%;width:78%;height:82%;padding:9px 9px 22px;background:#fff0cc;border:2px solid #c99860;box-shadow:0 4px 8px #6d4b3e44;border-radius:4px;transform:rotate(-13deg)}
.postcard-back .home-art{width:100%;height:100%}
.postcard-back-right{left:auto;right:0;top:10%;transform:rotate(13deg)}
.home-screen .home-bottom{padding:0 4cqw;flex-shrink:0}
.home-screen .start-button{display:flex;gap:13px;height:clamp(55px,8.2cqh,78px);min-height:0;padding:6px 14px;border:3px solid #fff5b3;border-radius:18px;background:linear-gradient(#fff366 0%,#ffdd33 68%,#ffc229 100%);box-shadow:0 0 0 2px #e59b22,0 6px 0 2px #c97e1f,inset 0 4px #fffcb7;color:#0c4a6e;font-size:clamp(23px,7cqw,33px);text-shadow:none;font-weight:900;position:relative}
.home-screen .start-button::before{content:"";position:absolute;left:7px;top:9px;width:5px;height:12px;background:#fffbd5;border-radius:2px}
.home-screen .start-button>.game-icon{order:2;width:clamp(24px,7cqw,34px);height:clamp(24px,7cqw,34px)}
.home-screen .start-button>span{line-height:1.2}
.home-screen .start-button>small{position:absolute;bottom:5px;left:10px;right:10px;color:#835e1c;font-size:10px;letter-spacing:0}
.home-screen .start-button:has(small:not([hidden])){padding-bottom:17px}
.home-level-strip{height:clamp(65px,10cqh,95px);display:flex;justify-content:center;gap:12px;margin:2cqh 0 1.5cqh}
.home-level-thumb{position:relative;width:29%;height:100%;padding:4px;border:2px solid #bc935d;border-radius:10px;background:#f4dfaf;box-shadow:0 3px #ae8855;overflow:hidden}
.home-level-thumb>.home-art{width:100%;height:100%;border-radius:5px}
.home-level-thumb[aria-current="true"]{border-color:#ff9a30;box-shadow:0 0 0 2px #fff7ba,0 0 0 4px #ff9a30,0 4px #dd7d20;background:#fff4ba}
.home-level-thumb.locked>.home-art{filter:grayscale(.85) brightness(.68)}
.home-thumb-lock{position:absolute;inset:0;display:grid;place-items:center}
.home-thumb-lock .game-icon{width:29px;height:32px;filter:drop-shadow(0 2px 0 #36546c)}
.home-thumb-number{position:absolute;bottom:4px;right:5px;min-width:19px;padding:1px 3px;border-radius:4px;background:#fff5d9;color:#164863;font-size:11px;font-weight:900;box-shadow:0 1px #94744855}
.home-screen .home-navigation{gap:10px;margin:0 -2cqw;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.home-screen .home-nav-button{height:clamp(70px,10.8cqh,100px);min-width:0;width:100%;padding:3px 2px 6px;gap:0;border:2px solid #fff3e1;border-radius:13px;background:linear-gradient(#ffe3e7,#ffbdcc);box-shadow:0 0 0 1px #d58399,0 5px #c66d8d,inset 0 3px #fff4f4}
.home-screen .home-nav-button:nth-child(2){background:linear-gradient(#d3ffec,#9cedce);box-shadow:0 0 0 1px #5bb8a7,0 5px #409f91,inset 0 3px #effff6}
.home-screen .home-nav-button:nth-child(3){background:linear-gradient(#dcfaff,#a9e9fc);box-shadow:0 0 0 1px #5ab4d2,0 5px #3a9dbd,inset 0 3px #efffff}
.home-nav-art{display:block;width:clamp(43px,13cqw,60px);aspect-ratio:1;background-image:url("assets/home/navigation.webp");background-repeat:no-repeat;background-size:300% 100%;image-rendering:pixelated;flex-shrink:0}
.home-nav-shop{background-position:0 0}.home-nav-color{background-position:50% 0}.home-nav-guide{background-position:100% 0}
.home-screen .home-nav-button strong{font-size:clamp(12px,3.6cqw,16px);font-weight:900;line-height:1.3;letter-spacing:0!important;color:#104969;white-space:nowrap}
@media(max-height:650px){.home-screen .brand{margin-top:1cqh;margin-bottom:0}.home-screen .wood-frame{padding:7px 7px 36px}.home-screen .wood-frame>.home-art,.home-screen .wood-frame>canvas{left:7px;right:7px;top:7px;width:calc(100% - 14px);height:calc(100% - 46px)}.home-screen .picture-sticker{font-size:17px;bottom:6px;padding:4px 16px}.home-screen .home-level-strip{margin-top:1.8cqh;margin-bottom:1.3cqh}.home-screen .home-nav-button strong{font-size:12px}.postcard-stamp{width:29px;height:29px}.postcard-stamp .game-icon{width:21px;height:21px}}
@media(prefers-reduced-motion:reduce){.home-screen .home-picture{transition:none}}

/* Authored bitmap skins; dynamic typography stays native and readable. */
.ui-icon{object-fit:contain;display:inline-block;vertical-align:middle;width:30px;height:30px}
.heart-card,.coin-card,.icon-button,.primary-button,.secondary-button,.modal-close,.shop-buy,.guide-next,.home-nav-button,.tool-button,.modal-card,.level-card,.picture-sticker{
 background:transparent!important;box-shadow:none!important;outline:none;border-width:9px!important;border-style:solid!important;border-color:transparent!important;border-image-source:url("assets/ui/skin-wallet-v2.webp")!important;border-image-slice:32 fill!important;border-image-width:9px!important;border-image-repeat:stretch!important;border-radius:0!important;
}
.primary-button,.guide-next{border-image-source:url("assets/ui/skin-primary-v2.webp")!important}
.secondary-button,.shop-buy{border-image-source:url("assets/ui/skin-secondary-v2.webp")!important}
.icon-button,.modal-close{border-image-source:url("assets/ui/skin-control-v2.webp")!important}
.modal-card{border-image-source:url("assets/ui/skin-panel-v2.webp")!important;border-image-width:14px!important;padding:24px 20px}
.home-screen .heart-card,.home-screen .coin-card{padding:0 1px;gap:1px;overflow:visible}
.home-screen .heart-card{width:29%;position:relative;padding-left:34px}
.home-screen .heart-card>.ui-icon{position:absolute;left:-12px;top:50%;transform:translateY(-50%);width:42px;height:42px;max-width:none}
.home-screen .coin-card>.ui-icon{width:36px;height:36px;margin-left:-18px;margin-right:2px;max-width:none}
.home-screen .settings-button{padding:0;border-image-width:8px!important}
.home-screen .settings-button>.ui-icon{width:29px;height:29px}
.home-screen .start-button{border-image-source:url("assets/ui/skin-primary-v2.webp")!important;border-image-width:12px!important;padding:0 15px;gap:10px}
.home-screen .start-button::before{display:none}
.home-screen .start-button>.ui-icon{order:2;width:28px;height:28px}
.home-screen .home-nav-button{padding:0 0 6px;border-image-source:url("assets/ui/skin-nav-pink-v2.webp")!important;border-image-width:10px!important}
.home-screen .home-nav-button:nth-child(2){border-image-source:url("assets/ui/skin-nav-mint-v2.webp")!important}
.home-screen .home-nav-button:nth-child(3){border-image-source:url("assets/ui/skin-nav-blue-v2.webp")!important}
.play-screen .tool-button:nth-child(1){border-image-source:url("assets/ui/skin-tool-pink-v2.webp")!important}
.play-screen .tool-button:nth-child(2){border-image-source:url("assets/ui/skin-tool-gold-v2.webp")!important}
.play-screen .tool-button:nth-child(3){border-image-source:url("assets/ui/skin-tool-mint-v2.webp")!important}
.play-screen .tool-button:nth-child(4){border-image-source:url("assets/ui/skin-nav-blue-v2.webp")!important}
.ad-tag.ad-play,.home-screen .coin-card .ad-tag.ad-play{border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;overflow:visible}
.ad-tag.ad-play>.ui-icon{width:29px;height:27px;object-fit:contain}
.modal-symbol{background:none;border:0;box-shadow:none}
.modal-close{padding:2px;display:flex;align-items:center;justify-content:center}
.modal-close>.ui-icon{width:22px;height:22px}
.shop-wallet .ui-icon,.shop-buy .ui-icon,.coin-reward .ui-icon{width:24px;height:24px}
.home-screen .picture-sticker{border-image-source:url("assets/ui/skin-danger-v2.webp")!important;border-image-width:8px!important;padding:2px 10px}
.shop-modal .shop-buy{border-width:4px!important;border-image-width:6px!important;min-height:36px}
@media(max-height:610px){.modal-card{padding:14px 15px}.shop-heading{margin:5px 0 10px}.shop-heading h2{margin:0}.shop-modal .shop-item{padding:6px;gap:2px}.shop-modal .shop-buy{height:32px;min-height:32px}.shop-modal .shop-copy p{margin-bottom:2px}.shop-modal .shop-note{margin-top:8px}.shop-modal #shop-done{margin-top:8px}}

/* Calm beach homepage: artwork, safe areas and centered resource counters. */
body:has(#home-screen:not([hidden])){background-image:url("assets/home/background-calm.webp");background-position:center;background-size:cover}
.home-screen{padding:max(46px,env(safe-area-inset-top),5.6cqh) 5cqw max(12px,env(safe-area-inset-bottom));background-image:url("assets/home/background-calm.webp");background-size:100% 100%}
.home-screen .home-topbar{height:46px;gap:10px;flex-shrink:0}
.home-screen .heart-card,.home-screen .coin-card{width:auto;min-width:0;flex:0 1 auto;justify-content:center;padding:0 4px;gap:5px}
.home-screen .heart-card>.ui-icon,.home-screen .coin-card>.ui-icon{position:static;transform:none;width:28px;height:28px;margin:0;max-width:28px}
.home-screen .heart-card strong,.home-screen .coin-card strong{font-size:17px}
.home-screen .coin-card{margin-left:auto}
.home-screen .settings-button{border:0!important;border-image:none!important;padding:0;width:44px;height:44px;background:none!important;box-shadow:none!important}
.home-screen .settings-button>.ui-icon{width:44px;height:44px;max-width:none}
.home-screen .brand{height:12cqh;min-height:64px;margin:1cqh -1cqw .6cqh}
.home-screen .postcard-back{display:none}
.home-screen .postcard-stage{margin:0 0 2cqh}
.home-screen .home-picture{inset:3% 4% 2%;transform:rotate(1.5deg)}
.home-screen .home-picture:active{transform:rotate(1.5deg)}
.home-screen .home-bottom{padding:0 3cqw}
.home-screen .home-navigation{margin:14px -1cqw 0;gap:10px}
.home-banner-slot{flex:0 0 clamp(62px,9cqh,80px);width:100%;pointer-events:none}
.modal-card{border-image-source:url("assets/ui/skin-panel-v2.webp")!important}
@media(max-width:350px){.home-screen .home-topbar{gap:7px;height:42px}.home-screen .heart-card,.home-screen .coin-card{padding:0 2px;gap:3px}.home-screen .heart-card strong,.home-screen .coin-card strong{font-size:15px}.home-screen .heart-card>.ui-icon,.home-screen .coin-card>.ui-icon{width:24px;height:24px}.home-screen .settings-button,.home-screen .settings-button>.ui-icon{width:40px;height:40px}.home-screen .coin-card .ad-tag{min-width:24px;width:24px}}

/* Approved C travel-case artwork; all controls below display bitmap assets. */
.modal[data-kind="settings"]{width:min(360px,calc(100vw - 28px),calc((100dvh - 28px)*999/1259));max-height:calc(100dvh - 28px)}
.modal[data-kind="settings"] .modal-card{width:100%;aspect-ratio:999/1259;max-height:none;padding:0;border:0!important;border-image:none!important;background:transparent url("assets/dialogs/settings.webp") center/contain no-repeat!important;overflow:visible;box-shadow:none!important}
.modal[data-kind="settings"] h2{position:absolute;left:28%;right:28%;top:16%;margin:0;color:#593b27;font-size:23px;line-height:1.25;white-space:nowrap}
.modal[data-kind="settings"] .settings-close{position:absolute;right:5%;top:9%;width:40px;height:40px;padding:0;border:0!important;border-image:none!important;background:none!important;box-shadow:none!important}
.settings-close img{width:100%;height:100%;object-fit:contain}
.settings-options{position:absolute;top:32%;bottom:24%;left:10%;right:10%;display:grid;grid-template-rows:repeat(3,minmax(0,1fr));gap:8px}
.settings-options .modal-row{display:grid;grid-template-columns:27px minmax(0,1fr) 61px;gap:7px;align-items:center;min-height:0;margin:0;padding:6px;border:0;border-image:url("assets/ui/skin-secondary-v2.webp") 32 fill / 6px / 0 stretch;color:#593b27;font-size:16px;font-weight:800}
.settings-options .modal-row>span{text-align:left}
.settings-options .modal-row>img{width:27px;height:30px;object-fit:contain}
.modal[data-kind="settings"] .settings-switch{width:61px;height:32px;min-width:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent url("assets/ui/settings-switch-off.webp") center/100% 100% no-repeat}
.modal[data-kind="settings"] .settings-switch[aria-checked="true"]{background-image:url("assets/ui/settings-switch-on.webp")}
.modal[data-kind="settings"] .settings-switch::after{display:none;content:none}
.settings-actions{position:absolute;left:10%;right:10%;bottom:10%;height:12%;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.modal[data-kind="settings"] .settings-actions button{width:100%;min-height:0;height:100%;margin:0;padding:2px 4px;font-size:15px;line-height:1.15;color:#593b27}
@media(max-width:350px){.modal[data-kind="settings"] h2{font-size:21px}.settings-options{gap:6px;left:9%;right:9%}.settings-options .modal-row{grid-template-columns:23px minmax(0,1fr) 51px;gap:5px;font-size:13px;padding:5px}.settings-options .modal-row>img{width:23px;height:26px}.modal[data-kind="settings"] .settings-switch{width:51px;height:29px}.modal[data-kind="settings"] .settings-actions button{font-size:13px}}

#rescue-ad{display:flex;align-items:center;justify-content:center;gap:7px}#rescue-ad>.ui-icon{width:25px;height:24px}#rescue-ad>span{min-width:0}
.home-screen .heart-card strong small{font-size:inherit}.home-screen #heart-number{white-space:nowrap;line-height:1}
.ad-tag.ad-play>.ui-icon{object-fit:contain;object-position:center}
.home-screen .coin-card .ad-tag.ad-play{display:flex;align-items:center;justify-content:center;margin:0;width:26px;height:26px}
.home-screen .coin-card .ad-tag.ad-play>.ui-icon{width:24px;height:24px}
.play-screen .score-total{display:flex;align-items:center;justify-content:center;gap:6px}
.play-screen .score-total>span{display:flex;align-items:center;justify-content:center;line-height:1}
.play-screen .score-total strong{display:block;line-height:1;font-variant-numeric:tabular-nums;transform-origin:center}

/* Every dialog has its own authored bitmap, always scaled uniformly. */
.modal.individual-dialog{width:min(var(--dialog-width),calc(100vw - 28px),calc((100dvh - 28px)*var(--dialog-ratio)));max-height:calc(100dvh - 28px);overflow:visible}
.modal.individual-dialog .modal-card{position:relative;width:100%;aspect-ratio:var(--dialog-ratio);max-height:none;padding:0!important;border:0!important;border-image:none!important;border-radius:0;background:none!important;box-shadow:none!important;overflow:visible;color:#543c2b}
.dialog-backdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}
.dialog-content{position:absolute;inset:17% 9% 10%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:9px}
.dialog-header{min-height:31px;display:flex;align-items:center;justify-content:center;padding:0 4px}
.modal.individual-dialog .dialog-title{position:static;margin:0!important;color:#593b27;font-size:21px;line-height:1.16;font-weight:900;text-align:center;overflow-wrap:break-word}
.modal.individual-dialog .dialog-title:focus{outline:none}
.dialog-body{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b8c7b1 transparent;padding:2px 4px}
.dialog-body:focus{outline:none}
.modal.individual-dialog p{color:#624d39;font-size:13px;line-height:1.5;margin:8px 0 12px}
.modal.individual-dialog .dialog-close{top:4%;right:4%;width:33px;height:33px;padding:0;border:0!important;border-image:none!important;background:none!important;box-shadow:none!important;z-index:2}
.dialog-close>.ui-icon{width:100%;height:100%;object-fit:contain}
.dialog-actions{display:grid;align-items:stretch;gap:8px;min-width:0}
.dialog-actions:empty{display:none}
.dialog-actions-pair,.dialog-actions-hero-pair,.dialog-actions-grid,.dialog-actions-hero-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.dialog-actions-hero-pair>.primary-button,.dialog-actions-hero-grid>.primary-button{grid-column:1/-1}
.modal.individual-dialog .dialog-actions>button{width:100%;min-width:0;min-height:44px;margin:0;padding:7px 6px;color:#513a29;font-size:15px;font-weight:800;line-height:1.2;white-space:normal;overflow-wrap:break-word}
.modal.individual-dialog .dialog-actions>.text-button{min-height:38px;font-size:13px}
.modal.individual-dialog .modal-symbol{width:48px;height:48px;margin:0 auto 9px;background:none;border:0;box-shadow:none}
.modal.individual-dialog .modal-symbol>.game-icon,.modal.individual-dialog .modal-symbol>.ui-icon,.modal.individual-dialog .modal-symbol>.tool-art{width:44px;height:44px}
.modal-card[data-panel="color"] .dialog-content{top:15%;bottom:9%;left:8%;right:8%}
.modal-card[data-panel="color-reference"] .dialog-content{top:20%;bottom:11%}
.modal-card[data-panel="color-result"] .dialog-content{top:19%;bottom:11%}
.modal-card[data-panel="shop"] .dialog-content{top:18%;bottom:9%;left:8%;right:8%}
.modal-card[data-panel="levels"] .dialog-content{top:20%;bottom:12%}
.modal-card[data-panel="help"] .dialog-content{top:12%;bottom:12%;left:13%;right:10%}
.modal-card[data-panel="coins"] .dialog-content{top:28%;bottom:10%}
.modal-card[data-panel="hearts"] .dialog-content{top:24%;bottom:11%}
.modal-card[data-panel="hearts-empty"] .dialog-content{top:24%;bottom:12%}
.modal-card[data-panel="failed"] .dialog-content{top:19%;bottom:13%}
.modal-card[data-panel="failed-final"] .dialog-content{top:22%;bottom:13%}
.modal-card[data-panel="item-offer"] .dialog-content{top:28%;bottom:12%}
.modal-card[data-panel="switch-level"] .dialog-content{top:14%;bottom:15%}
.modal-card[data-panel="pause"] .dialog-content{top:25%;bottom:14%}
.modal-card[data-panel="pause-auto"] .dialog-content{top:23%;bottom:14%}
.modal-card[data-panel="won"] .dialog-content{top:21%;bottom:12%}
.modal-card[data-panel="tutorial"] .dialog-content{top:16%;bottom:16%;left:15%;right:10%}
.modal-card[data-panel="finish"] .dialog-content{top:23%;bottom:19%}
.modal-card[data-panel="ad"] .dialog-content{top:22%;bottom:17%}
.modal-card[data-panel="network"] .dialog-content{top:27%;bottom:13%}
.modal-card[data-panel="ad-loading"] .dialog-content{top:28%;bottom:14%}
.modal-card[data-panel="network"] .modal-symbol,.modal-card[data-panel="ad-loading"] .modal-symbol,.modal-card[data-panel="switch-level"] .modal-symbol{display:none}
.individual-dialog .color-choice-note,.individual-dialog .color-mode-note{font-size:12px;margin:7px 0}
.individual-dialog .color-disclaimer{font-size:11px;line-height:1.4;margin:9px 0 0}
.individual-dialog .color-check-entry{padding:8px;gap:8px}
.individual-dialog .color-check-entry>span{min-width:0;overflow-wrap:anywhere}.individual-dialog .color-check-entry>b{flex-shrink:0}
.individual-dialog .color-check-entry strong{font-size:13px}.individual-dialog .color-check-entry small{font-size:11px}.individual-dialog .color-check-entry b{font-size:12px}
.individual-dialog .color-modes{gap:7px;margin:10px 0}
.individual-dialog .color-mode{min-height:65px;padding:7px 4px}.individual-dialog .color-mode strong{font-size:13px;line-height:1.25}
.individual-dialog .color-preview{grid-template-columns:76px minmax(0,1fr);padding:6px;gap:7px}
.individual-dialog .color-preview canvas{width:76px;height:72px}.individual-dialog .color-legend small{font-size:11px}
.individual-dialog .color-legend{min-width:0;grid-template-columns:1fr}.individual-dialog .color-legend-item{min-width:0}.individual-dialog .color-legend-item small{overflow-wrap:anywhere}
.individual-dialog .reference-plate{max-width:200px;margin:8px auto}.individual-dialog .color-answer{min-height:40px}
.individual-dialog .color-result-title{font-size:15px}.individual-dialog .color-result-scope{font-size:11px}.individual-dialog .color-results{font-size:12px}
.individual-dialog .shop-heading{margin:0 0 5px;justify-content:center}.individual-dialog .shop-items{gap:8px}.individual-dialog .shop-item{padding:4px 5px;gap:2px}.individual-dialog .shop-tool{height:34px;width:40px}.individual-dialog .shop-tool .tool-art{width:34px;height:34px}.individual-dialog .shop-copy h3{font-size:14px;margin:0}.individual-dialog .shop-copy small{font-size:10px;margin:2px 0 0}.modal.individual-dialog .shop-copy p{font-size:10px;line-height:1.3;margin:2px 0}.individual-dialog .shop-buy{min-height:31px;font-size:13px}.individual-dialog .shop-buy .ui-icon{width:18px;height:18px}
.individual-dialog .level-grid{gap:8px;margin:4px 0}.individual-dialog .level-tile{aspect-ratio:1.05;padding-bottom:15px}.individual-dialog .level-paging{grid-column:1/-1;font-size:12px}.individual-dialog .level-paging button{min-height:38px;font-size:12px;margin:0}
.individual-dialog .help-steps{font-size:14px;line-height:1.55}.individual-dialog .win-stats{font-size:14px}
.individual-dialog .next-preview{width:126px;margin:10px auto}.individual-dialog .next-preview canvas{width:110px;height:113px}.individual-dialog .mechanic-preview{font-size:12px}
.individual-dialog .ad-stage{margin:10px auto;padding:14px 8px;min-height:120px}.individual-dialog .ad-stage .game-icon{width:42px;height:42px}
@media(max-width:350px),(max-height:620px){.dialog-content{gap:6px}.modal.individual-dialog .dialog-title{font-size:18px}.modal.individual-dialog .dialog-actions>button{min-height:41px;font-size:13px;padding:6px 4px}.modal.individual-dialog p{font-size:12px}.modal.individual-dialog .dialog-close{width:29px;height:29px}.individual-dialog .color-mode strong{font-size:12px}}

/* Short dialogs follow their actual content; there is no expanding middle row. */
.modal.compact-dialog .dialog-content{display:flex;flex-direction:column;justify-content:center;gap:10px}
.compact-dialog .dialog-header,.compact-dialog .dialog-actions{flex:0 0 auto}
.compact-dialog .dialog-header{gap:8px}
.compact-dialog .dialog-body{flex:0 1 auto;padding:0 2px}
.modal.compact-dialog .dialog-body p{margin:4px 0 6px;line-height:1.45}
.modal.compact-dialog .dialog-header>.dialog-heading-icon{display:flex;flex:0 0 28px;width:28px;height:28px;margin:0}
.modal.compact-dialog .dialog-heading-icon>.game-icon,.modal.compact-dialog .dialog-heading-icon>.ui-icon,.modal.compact-dialog .dialog-heading-icon>.tool-art{width:28px;height:28px}
.modal-card[data-panel="pause"] .dialog-content,.modal-card[data-panel="pause-auto"] .dialog-content{inset:22% 9% 10%}
.modal-card[data-panel="pause"] #pause-home{grid-column:1/-1;min-height:35px}
.modal-card[data-panel="coins"] .dialog-content{inset:15% 9% 11%}
.modal-card[data-panel="hearts"] .dialog-content{inset:16% 9% 11%}
.modal-card[data-panel="failed"] .dialog-content{inset:15% 9% 12%}
.modal-card[data-panel="item-offer"] .dialog-content{inset:16% 9% 11%}
.modal-card[data-panel="tutorial"] .dialog-content{inset:13% 11% 12%}
.modal-card[data-panel="finish"] .dialog-content{inset:15% 9% 12%}
.modal-card[data-panel="won"] .dialog-content{inset:17% 9% 12%}
.compact-dialog .heart-display{margin:5px 0 9px}
.compact-dialog .next-preview{width:112px;margin:7px auto;padding:5px}
.compact-dialog .next-preview canvas{width:98px;height:auto}
.compact-dialog .help-steps{margin:2px 0;font-size:13px;line-height:1.5}
.compact-dialog .help-steps li{margin-bottom:7px}
.compact-dialog .dialog-actions-pair{gap:8px}
@media(max-height:420px){.modal.compact-dialog .dialog-content{gap:7px}.modal.compact-dialog .dialog-header>.dialog-heading-icon{flex-basis:23px;width:23px;height:23px}.modal.compact-dialog .dialog-heading-icon>.game-icon,.modal.compact-dialog .dialog-heading-icon>.tool-art{width:23px;height:23px}}

/* Tiny authored control inside the cream space at the funnel's right edge. */
.auto-fall-button{position:absolute;z-index:2;display:flex;align-items:center;justify-content:center;transform:translate(-50%,-50%);margin:0;padding:0;border:0;border-image:none!important;border-radius:0;box-shadow:none;background:transparent;touch-action:manipulation;isolation:isolate}
.auto-fall-button>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;z-index:-1}
.auto-fall-button>span{margin-left:23%;font:900 var(--auto-font,14px)/1 var(--numbers);color:#32546a;pointer-events:none;white-space:nowrap}
.auto-fall-button[data-state="disabled"]>span{color:#747c80}.auto-fall-button[data-state="active"]>span{color:#35521b}
.auto-fall-button:disabled{opacity:1;cursor:default}.auto-fall-button:not(:disabled):active{transform:translate(-50%,-50%);filter:brightness(.95)}

/* Selected island postcard: one dedicated authored bitmap at its natural ratio.
   Code places readable live values over the matching blank artwork areas. */
.modal.postcard-dialog .modal-card{container-type:inline-size}
.modal.postcard-dialog .dialog-content{inset:0;display:block}
.modal.postcard-dialog .dialog-header{position:absolute;top:3%;left:25%;right:25%;height:10%;min-height:0;padding:0;z-index:1}
.modal.postcard-dialog .dialog-title{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:0;line-height:1;-webkit-text-stroke:0;text-shadow:none}
.postcard-title-art{display:block;width:100%;height:100%;object-fit:contain;image-rendering:auto}
.postcard-title-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.postcard-live{display:inline-block;white-space:nowrap;transform-origin:center}
.modal.postcard-dialog .dialog-body{position:absolute;top:16%;left:9%;right:9%;height:59.6%;padding:0;overflow:visible}
.postcard-stats{position:absolute;inset:0 0 auto;height:15%;text-align:center;color:#076e9c}
.postcard-score{position:absolute;top:0;left:0;width:100%;height:55%;display:flex;align-items:center;justify-content:center;font:900 7.2cqw/1 var(--numbers);font-variant-numeric:tabular-nums}
.postcard-buckets{position:absolute;bottom:0;left:0;width:100%;height:34%;display:flex;align-items:center;justify-content:center;margin:0;font:800 4cqw/1 var(--numbers)}
.postcard-rewards{position:absolute;top:16%;width:100%;height:13%;color:#603719;font:900 5cqw/1 var(--numbers);font-variant-numeric:tabular-nums}
.postcard-rewards>span{position:absolute;top:0;width:20%;height:100%;display:flex;align-items:center;justify-content:center}
.postcard-heart{left:28%}.postcard-coins{left:66%}
.postcard-preview{position:absolute;top:33.2%;left:2.7%;width:94.9%;height:52.2%;overflow:hidden}
.postcard-preview>#win-picture,.postcard-preview>#next-canvas{display:block;width:100%;height:100%;margin:0;border:0;padding:0;image-rendering:pixelated;background-repeat:no-repeat}
.modal.postcard-dialog .postcard-caption{position:absolute;top:91.8%;left:9%;right:9%;height:6%;display:flex;align-items:center;justify-content:center;overflow:hidden;margin:0;font:800 4.1cqw/1.1 var(--numbers);text-align:center;white-space:nowrap;color:#66401f}
.modal.postcard-dialog .dialog-actions{position:absolute;top:76%;left:10.5%;width:79.5%;height:21%;display:block}
.modal.postcard-dialog .dialog-actions>button{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:57%;min-height:0;margin:0;padding:0;border:0!important;border-image:none!important;border-radius:0;background:none!important;box-shadow:none!important;font:900 7.5cqw/1.1 var(--numbers);color:#573213;text-shadow:none;white-space:nowrap}
.modal.postcard-dialog .dialog-actions>#win-home{bottom:1%;left:26%;width:48%;height:31%;min-height:0;padding:0;font-size:4.7cqw;color:#087bac}
.modal.postcard-dialog .dialog-actions>button:active{transform:none;color:#9b5e10}
.modal.postcard-dialog.postcard-final .dialog-actions>#win-next{font-size:6.4cqw}

/* DIALOG_REWORK_20261026 */
/* Authored island cards. This concept stylesheet is also the implementation contract. */
.modal.refreshed-dialog{width:min(var(--dialog-width),calc(100vw - 24px),calc((100dvh - 24px)*var(--dialog-ratio)));max-height:calc(100dvh - 24px);padding:0;overflow:visible}
.modal.refreshed-dialog .modal-card{position:relative;width:100%;aspect-ratio:var(--dialog-ratio);max-height:none;padding:0!important;border:0!important;border-image:none!important;border-radius:0;background:none!important;box-shadow:none!important;overflow:visible;container-type:inline-size;--dialog-font:"Segoe UI",PourChinese,"Microsoft YaHei",sans-serif;font-family:var(--dialog-font);color:#294b55}
.modal.refreshed-dialog .modal-card *{text-shadow:none!important;-webkit-text-stroke:0!important;letter-spacing:0;font-family:var(--dialog-font);font-synthesis:weight}
.modal.refreshed-dialog .dialog-backdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.modal.refreshed-dialog .dialog-content{position:absolute;inset:var(--content-top,15%) var(--content-side,9%) var(--content-bottom,10%);display:flex;flex-direction:column;justify-content:center;gap:clamp(6px,2.4cqw,9px)}
.modal.refreshed-dialog .dialog-header{position:static;min-height:0;flex:0 0 auto;display:flex;align-items:center;justify-content:center;padding:0 14px}
.modal.refreshed-dialog .dialog-title{position:static;margin:0!important;color:#264b55;font:800 clamp(18px,6.7cqw,24px)/1.25 var(--dialog-font);text-align:center;white-space:normal}
.modal.refreshed-dialog .dialog-heading-icon{display:none!important}
.modal.refreshed-dialog .dialog-body{position:static;min-height:0;min-width:0;flex:0 1 auto;overflow:auto;padding:0 2px;scrollbar-width:thin}
.modal.refreshed-dialog .dialog-body p{color:#48585b;font-size:clamp(12px,4.4cqw,16px);line-height:1.55!important;margin:5px 0 9px}
.modal.refreshed-dialog .dialog-body>p:last-child{margin-bottom:0}
.modal.refreshed-dialog .dialog-actions{position:static;inset:auto;width:100%;height:auto;display:grid;gap:clamp(6px,2.3cqw,9px);flex:0 0 auto;align-items:center}
.modal.refreshed-dialog .dialog-actions>button,.modal.refreshed-dialog .level-paging>button{position:relative;inset:auto;width:100%;height:auto;min-height:0;margin:0;padding:5px 9px;display:flex;align-items:center;justify-content:center;gap:6px;border:0!important;border-image:none!important;border-radius:0;background:none!important;box-shadow:none!important;isolation:isolate;line-height:1.2;font-size:clamp(12px,4.8cqw,17px);font-weight:750;color:#244953;overflow-wrap:normal;white-space:normal;aspect-ratio:456/188}
.modal.refreshed-dialog button.dialog-wide{aspect-ratio:900/180}
.modal.refreshed-dialog button.dialog-wide.primary-button{aspect-ratio:900/186}
.modal.refreshed-dialog button.dialog-wide.dialog-mint{aspect-ratio:900/216}
.modal.refreshed-dialog button>.dialog-button-art{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:-1;pointer-events:none}
.modal.refreshed-dialog .dialog-actions>.text-button{aspect-ratio:auto;min-height:32px;padding:5px;font-size:clamp(12px,4.5cqw,16px);color:#326879;font-weight:700}
.modal.refreshed-dialog .dialog-actions>.primary-button{color:#314a35}
.modal.refreshed-dialog .dialog-actions>button:active{transform:none;filter:brightness(.96)}
.modal.refreshed-dialog .dialog-actions>.text-button:active{filter:none;color:#0b8a9b}
.modal.refreshed-dialog .dialog-close{position:absolute;top:6%;right:5%;width:clamp(27px,8cqw,33px);height:clamp(27px,8cqw,33px);padding:0;border:0!important;border-image:none!important;box-shadow:none!important;background:none!important;z-index:3}
.modal.refreshed-dialog .dialog-close>img{width:100%;height:100%;object-fit:contain}
.modal.refreshed-dialog .modal-symbol{width:44px;height:44px;margin:0 auto 5px}
.modal.refreshed-dialog .modal-symbol>.game-icon{width:44px;height:44px}
.modal.refreshed-dialog .dialog-content>.dialog-body[hidden]{display:none!important}
.modal.refreshed-dialog .modal-card[data-panel="pause"] #pause-home,.modal.refreshed-dialog .modal-card[data-panel="pause-auto"] #pause-home{grid-column:1/-1;min-height:32px}
.modal.refreshed-dialog #pause-fall{grid-column:1/-1}
.modal.refreshed-dialog .modal-card[data-panel="pause-auto"] .dialog-content{justify-content:center;gap:8px}
.modal.refreshed-dialog .modal-card[data-panel="pause-auto"] #pause-fall{aspect-ratio:900/180}
.modal.refreshed-dialog .modal-card[data-panel="pause-auto"] #pause-fall>.dialog-button-art{object-fit:contain}
.modal.refreshed-dialog .modal-card[data-panel="color"] .dialog-body,.modal.refreshed-dialog .modal-card[data-panel="color-reference"] .dialog-body,.modal.refreshed-dialog .modal-card[data-panel="color-result"] .dialog-body,.modal.refreshed-dialog .modal-card[data-panel="shop"] .dialog-body,.modal.refreshed-dialog .modal-card[data-panel="levels"] .dialog-body{flex:1 1 0}
.modal.refreshed-dialog .color-check-entry{border:0;background:none;padding:4px 0;gap:8px}
.modal.refreshed-dialog .color-check-entry strong{font-size:clamp(12px,4.2cqw,15px)}
.modal.refreshed-dialog .color-check-entry small,.modal.refreshed-dialog .color-check-entry b{font-size:clamp(11px,3.6cqw,13px)}
.modal.refreshed-dialog .color-modes{gap:8px;margin:8px 0}
.modal.refreshed-dialog .color-mode{position:relative;isolation:isolate;min-height:0;padding:9px 5px;border:0!important;border-radius:0;background:none!important;box-shadow:none;aspect-ratio:456/188}
.modal.refreshed-dialog .color-mode::before{content:"";position:absolute;inset:0;background:url("assets/ui/skin-secondary-v2.webp") center/contain no-repeat;z-index:-1}
.modal.refreshed-dialog .color-mode[aria-pressed="true"]::before{background-image:url("assets/ui/skin-nav-mint-v2.webp")}
.modal.refreshed-dialog .color-mode strong{font-size:clamp(12px,3.8cqw,14px);color:#254a53;line-height:1.3}
.modal.refreshed-dialog .mode-chips{margin:1px 0 3px}
.modal.refreshed-dialog .mode-chips i{width:12px;height:12px}
.modal.refreshed-dialog .color-preview{grid-template-columns:88px minmax(0,1fr);gap:8px;border:0;background:none;padding:3px 0}
.modal.refreshed-dialog .color-preview canvas{width:88px;height:90px}
.modal.refreshed-dialog .color-legend small{font-size:12px}
.modal.refreshed-dialog .color-choice-note,.modal.refreshed-dialog .color-mode-note{font-size:12px!important;line-height:1.4!important;margin:6px 0!important}
.modal.refreshed-dialog .color-disclaimer{font-size:11px!important;line-height:1.5!important;margin:7px 0!important;color:#53666c!important}
.modal.refreshed-dialog .reference-plate{width:min(65cqw,215px);margin:8px auto}
.modal.refreshed-dialog .color-answer{position:relative;isolation:isolate;min-height:40px;border:0;border-radius:0;background:transparent url("assets/ui/skin-secondary-v2.webp") center/contain no-repeat;font-size:17px;font-weight:750;box-shadow:none}
.modal.refreshed-dialog .color-result-title{font-size:17px;margin:6px 0}
.modal.refreshed-dialog .color-result-scope,.modal.refreshed-dialog .color-result-detail,.modal.refreshed-dialog .color-recommendation{font-size:13px!important}
.modal.refreshed-dialog .color-results{font-size:14px}
.modal.refreshed-dialog .modal-card[data-panel="color-result"] .color-results{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:3px 0;font-size:13px}
.modal.refreshed-dialog .modal-card[data-panel="color-result"] .color-result-scope,.modal.refreshed-dialog .modal-card[data-panel="color-result"] .color-recommendation,.modal.refreshed-dialog .modal-card[data-panel="color-result"] .color-mode-note{display:none}
.modal.refreshed-dialog .modal-card[data-panel="color-result"] .color-disclaimer{margin:4px 0!important;line-height:1.4!important}
.modal.refreshed-dialog .shop-heading{margin:0 0 5px;justify-content:center}
.modal.refreshed-dialog .shop-wallet{font-size:16px;display:flex;align-items:center;justify-content:center;gap:5px}
.modal.refreshed-dialog .shop-items{gap:6px;grid-template-columns:1fr}
.modal.refreshed-dialog .shop-item{display:grid;grid-template-columns:40px minmax(0,1fr) 58px;padding:3px 0;gap:6px;border:0;background:none;min-height:51px;text-align:left}
.modal.refreshed-dialog .shop-copy h3{font-size:15px;line-height:1.1;margin:0}
.modal.refreshed-dialog .shop-copy p{font-size:11px!important;line-height:1.25!important;margin:1px 0!important}
.modal.refreshed-dialog .shop-copy small{display:block;font-size:11px;line-height:1.25;margin:1px 0}
.modal.refreshed-dialog .shop-buy{border:0!important;border-image:none!important;background:transparent url("assets/ui/skin-secondary-v2.webp") center/contain no-repeat!important;box-shadow:none!important;min-height:36px;font-size:14px;padding:4px}
.modal.refreshed-dialog .shop-buy .ui-icon{width:18px;height:18px}
.modal.refreshed-dialog .shop-note{font-size:12px!important;line-height:1.4!important;margin:6px 0!important}
.modal.refreshed-dialog .level-grid{gap:8px;margin:4px 0;grid-template-columns:repeat(3,minmax(0,1fr))}
.modal.refreshed-dialog .level-tile{aspect-ratio:1.1;min-height:0;padding-bottom:16px}
.modal.refreshed-dialog .modal-card[data-panel="levels"] .dialog-body{overflow:hidden}
.modal.refreshed-dialog .modal-card[data-panel="levels"] .level-grid{height:100%;margin:0;grid-template-rows:repeat(4,minmax(0,1fr))}
.modal.refreshed-dialog .modal-card[data-panel="levels"] .level-tile{aspect-ratio:auto}
.modal.refreshed-dialog .level-number{font-size:13px}
.modal.refreshed-dialog .level-paging{display:grid;grid-template-columns:1fr 54px 1fr;gap:4px;font-size:12px;align-items:center;width:100%}
.modal.refreshed-dialog .level-paging>button{font-size:13px;padding:4px;aspect-ratio:456/188}
.modal.refreshed-dialog .level-paging{direction:ltr;grid-template-columns:48px minmax(54px,1fr) 48px;gap:12px;text-align:center}
.modal.refreshed-dialog .level-paging>button.level-page-arrow{width:48px;height:48px;aspect-ratio:1;padding:0;justify-self:center}
.level-page-arrow>img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.level-page-arrow:disabled{opacity:.35;filter:grayscale(1);cursor:default}
.modal.refreshed-dialog .help-steps{font-size:clamp(12px,4.3cqw,16px);line-height:1.6;margin:3px 0;padding-left:22px;text-align:left}
.modal.refreshed-dialog .help-steps li{margin-bottom:9px}
.modal.refreshed-dialog .heart-display{margin:6px 0;gap:3px}
.modal.refreshed-dialog .heart-display .ui-icon{width:37px;height:37px}
.modal.refreshed-dialog .coin-reward{font-size:28px;font-weight:800;line-height:1.2;margin:4px 0 6px}
.modal.refreshed-dialog .coin-reward .ui-icon{width:38px;height:38px}
.modal.refreshed-dialog .settings-options{position:static;inset:auto;display:grid;grid-template-rows:repeat(3,1fr);gap:14px;margin:10px 0}
.modal.refreshed-dialog .settings-options .modal-row{grid-template-columns:30px minmax(0,1fr) 61px;padding:4px 0;gap:9px;border:0!important;border-image:none!important;background:none;font-size:16px;font-weight:700;min-height:41px;color:#294b55}
.modal.refreshed-dialog .settings-options .modal-row>img{width:28px;height:31px}
.modal.refreshed-dialog .settings-switch{width:61px;height:32px;min-width:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent url("assets/ui/settings-switch-off.webp") center/contain no-repeat}
.modal.refreshed-dialog .settings-switch[aria-checked="true"]{background-image:url("assets/ui/settings-switch-on.webp")}
.modal.refreshed-dialog .settings-switch::after{display:none}
.modal.refreshed-dialog .settings-actions{position:static;display:contents}
.modal.refreshed-dialog .modal-card[data-panel="settings"] .dialog-actions{grid-template-columns:1fr 1fr}
.modal.refreshed-dialog .modal-card[data-panel="settings"] .dialog-actions>button{font-size:clamp(12px,4.1cqw,15px)}
.modal.refreshed-dialog.postcard-dialog .dialog-content{inset:0;display:block}
.modal.refreshed-dialog.postcard-dialog .dialog-header{position:absolute;top:6.5%;left:19%;right:12%;height:13%;padding:0;display:block}
.modal.refreshed-dialog.postcard-dialog .dialog-title{width:100%;height:100%;font-size:0;line-height:0}
.modal.refreshed-dialog.postcard-dialog .dialog-body{position:absolute;top:21%;left:9%;right:9%;height:53.5%;padding:0;overflow:visible}
.modal.refreshed-dialog .postcard-stats{height:22%;color:#146785}
.modal.refreshed-dialog .postcard-score{font:800 8cqw/1 var(--dialog-font);height:58%}
.modal.refreshed-dialog .postcard-buckets{font:700 4.7cqw/1 var(--dialog-font);height:33%}
.modal.refreshed-dialog .postcard-rewards{position:absolute;top:24%;height:14%;display:flex;justify-content:center;gap:24px;font:750 5.3cqw/1 var(--dialog-font);color:#6a4b2b}
.modal.refreshed-dialog .postcard-rewards>span{position:static;width:auto;height:100%;display:flex;align-items:center;gap:6px}
.modal.refreshed-dialog .postcard-rewards .ui-icon{width:8cqw;height:8cqw}
.modal.refreshed-dialog .postcard-preview{position:absolute;top:40%;left:0;width:100%;height:52%;overflow:hidden}
.modal.refreshed-dialog.postcard-dialog .postcard-caption{position:absolute;top:94%;left:0;right:0;height:6%;margin:0;font:700 4.1cqw/1.2 var(--dialog-font);color:#3d626b}
.modal.refreshed-dialog.postcard-dialog .dialog-actions{position:absolute;top:78%;left:10%;width:80%;height:18%;display:flex;flex-direction:column;gap:8px;justify-content:center}
.modal.refreshed-dialog.postcard-dialog .dialog-actions>button{position:relative;inset:auto;flex:0 0 auto;width:100%;height:auto;margin:0;font:800 5.7cqw/1.2 var(--dialog-font);padding:5px 8px;aspect-ratio:900/186;white-space:normal;color:#354b3a}
.modal.refreshed-dialog.postcard-dialog .dialog-actions>#win-home{position:relative;inset:auto;width:100%;height:auto;min-height:30px;aspect-ratio:auto;font-size:4.7cqw;display:flex;align-items:center;justify-content:center;gap:6px;color:#216b87}
.modal.refreshed-dialog #win-home>.ui-icon{width:6cqw;height:6cqw}
.modal.refreshed-dialog.postcard-final #win-next{font-size:5.5cqw}
@media(max-height:500px){.modal.refreshed-dialog .dialog-content{gap:5px}.modal.refreshed-dialog .dialog-title{font-size:17px}.modal.refreshed-dialog .dialog-body p{font-size:12px}.modal.refreshed-dialog .dialog-actions>button{font-size:12px;padding:3px}.modal.refreshed-dialog .settings-options{gap:6px;margin:3px 0}.modal.refreshed-dialog .settings-options .modal-row{grid-template-columns:22px minmax(0,1fr) 45px;gap:5px;font-size:12px;min-height:28px}.modal.refreshed-dialog .settings-options .modal-row>img{width:22px;height:24px}.modal.refreshed-dialog .settings-switch{width:45px;height:25px}}

/* Tutorial coach uses its own generated plate, not a painted CSS rectangle. */
.guide-coach{left:5%;right:5%;aspect-ratio:900/605;border:0!important;border-image:none!important;border-radius:0;background:transparent url("assets/dialogs/guide.webp") center/contain no-repeat!important;box-shadow:none!important;padding:18px 20px 14px;display:flex;flex-direction:column;justify-content:center;gap:4px;color:#294b55;font-family:"Segoe UI",PourChinese,"Microsoft YaHei",sans-serif}
.guide-coach *{font-family:inherit;text-shadow:none!important;-webkit-text-stroke:0!important}
.guide-coach strong{font-size:18px;line-height:1.25;margin:2px 0;color:#294b55}
.guide-coach p{font-size:12px;line-height:1.45;margin:2px 0;color:#48585b}
.guide-coach .guide-top{font-size:11px;min-height:24px;justify-content:flex-end;gap:10px;color:#3b646d}
.guide-coach .guide-top button{font-size:12px;min-height:24px;padding:2px 4px}
.guide-coach .guide-next{border:0!important;border-image:none!important;background:transparent url("assets/dialogs/button-gold.webp") center/contain no-repeat!important;box-shadow:none!important;border-radius:0;width:60%;aspect-ratio:900/186;min-height:0;margin:3px auto 0;padding:3px 6px;font-size:13px;color:#294b55}
@media(max-height:500px){.guide-coach{padding:14px 18px 10px;gap:3px}.guide-coach strong{font-size:16px}.guide-coach p{font-size:11px;line-height:1.35}.guide-coach .guide-top,.guide-coach .guide-top button{min-height:22px}}

/* Nine independently authored bitmap kits; native dynamic numbers stay clear. */
html{--locale-font:PourLatin}
html[lang="ar"]{--locale-font:PourArabic}
html[lang="ja"]{--locale-font:PourJapanese}
html[lang="zh-CN"]{--locale-font:PourChinese}
html[lang] body,html[lang] button,html[lang] .modal-card,html[lang] .modal-card h2,html[lang] .modal-card p,html[lang] .modal-card strong,html[lang] .modal-card small,html[lang] .guide-coach,html[lang] .tool-button strong{font-family:var(--locale-font),sans-serif!important;letter-spacing:0!important;text-shadow:none!important;-webkit-text-stroke:0!important}
html[lang] #score-number,html[lang] #coin-number,html[lang] #heart-number,html[lang] #game-level{font-family:var(--locale-font),sans-serif!important}
.locale-art-button{position:relative!important;background:none!important;border-image:none!important;box-shadow:none!important;border-color:transparent!important;isolation:isolate}
html[lang] #app .locale-art-button{border-image:none!important;border:0!important;background:none!important;box-shadow:none!important;padding:0!important}
.locale-art-button:before,.locale-art-button:after{display:none!important}
.locale-art-button>:not(.locale-bitmap){opacity:0!important;pointer-events:none!important}
.locale-art-button>.locale-bitmap{display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;pointer-events:none!important;z-index:2!important;transform:none!important}
.locale-art-heading{position:absolute!important;inset:0!important;min-height:0!important;width:100%!important;height:100%;margin:0!important;padding:0!important;color:transparent!important;font-size:0!important}
.modal.refreshed-dialog .dialog-header.has-locale-heading{position:relative!important;flex:0 0 48px;min-height:40px;height:48px}
.has-locale-heading .dialog-heading-icon{display:none!important}
.locale-art-heading>:not(.locale-heading-bitmap){visibility:hidden!important}
.locale-heading-bitmap{display:block!important;position:absolute!important;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.modal[data-kind="language"] .dialog-content{display:flex;flex-direction:column;gap:12px}
.modal[data-kind="language"] .dialog-header{flex:0 0 54px}
.modal[data-kind="language"] .dialog-body{flex:1;min-height:0}
.modal[data-kind="language"] .dialog-actions{display:flex;flex-direction:column;flex:0 0 48px}
.language-grid{height:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(44px,1fr));gap:7px}
.language-option{border:0;border-image:url("assets/ui/skin-nav-blue-v2.webp") 24 fill/10px/0 stretch;background:none;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 4px;color:#184e65;font-size:13px;line-height:1.3}
.language-option strong{font-size:inherit;overflow-wrap:anywhere}
.language-option small{display:block;font-size:10px;color:#31795c;min-height:14px}
.language-option[aria-pressed="true"]{border-image-source:url("assets/ui/skin-nav-mint-v2.webp")}
.modal .language-option{font-family:PourLatin,sans-serif!important}
.language-option[lang="ar"]{font-family:PourArabic,sans-serif!important}
.language-option[lang="ja"]{font-family:PourJapanese,sans-serif!important}
.language-option[lang="zh-CN"]{font-family:PourChinese,sans-serif!important}
.modal .language-option[lang] strong{font-family:inherit!important}
.language-current{border:0;border-image:url("assets/ui/skin-nav-mint-v2.webp") 24 fill/8px/0 stretch;background:none;padding:8px;min-width:74px;max-width:112px;font-size:12px;font-weight:800;color:#24546a;line-height:1.25;overflow-wrap:anywhere}
.modal.refreshed-dialog .settings-options .language-setting{grid-template-columns:28px minmax(0,1fr) auto}
.language-setting>img{object-fit:contain}
.modal.refreshed-dialog .settings-options .modal-row>span{font-size:clamp(12px,3.2vw,15px);line-height:1.35;white-space:normal;overflow-wrap:anywhere}
html[dir="rtl"] .home-topbar,html[dir="rtl"] .game-topbar,html[dir="rtl"] .home-navigation,html[dir="rtl"] .tools,html[dir="rtl"] .postcard-rewards{direction:ltr}
html[dir="rtl"] .modal-row>span,html[dir="rtl"] .shop-copy,html[dir="rtl"] .color-reference-entry{text-align:right!important}
html[dir="rtl"] .score-total,html[dir="rtl"] #coin-number,html[dir="rtl"] #heart-number,html[dir="rtl"] .postcard-stats,html[dir="rtl"] .postcard-rewards{direction:ltr;unicode-bidi:isolate}
html[dir="rtl"] .modal p{line-height:1.7}
html[lang="ru"] .tool-button strong,html[lang="vi"] .tool-button strong{font-size:12px!important}
@media(max-height:600px){.language-grid{gap:5px}.language-option{font-size:11px;min-height:36px;padding:3px}.modal[data-kind="language"] .dialog-header{flex-basis:38px}.modal[data-kind="language"] .dialog-actions{flex-basis:38px}.modal[data-kind="language"] .dialog-content{gap:6px}}

/* Same authored frames, recomposed for a large title and unified 900-weight labels. */
.modal.refreshed-dialog .modal-card:is([data-panel="pause"],[data-panel="pause-auto"]){--pause-font:"HGenSenRounded2TW-H",var(--locale-font),sans-serif;--pause-ink:#5b3219;--pause-label:clamp(16px,5.55cqw,20px);--pause-row:clamp(42px,15cqw,54px);--pause-gap:clamp(8px,2.8cqw,10px)}
.modal.refreshed-dialog .modal-card:is([data-panel="pause"],[data-panel="pause-auto"]) .dialog-content{inset:13% 10% 11%;justify-content:center;gap:clamp(8px,3cqw,11px)}
.modal.refreshed-dialog .modal-card:is([data-panel="pause"],[data-panel="pause-auto"]) .dialog-header{flex:0 0 clamp(48px,17cqw,62px);height:clamp(48px,17cqw,62px);min-height:0;padding:0}
html[lang] .modal.refreshed-dialog .modal-card:is([data-panel="pause"],[data-panel="pause-auto"]) .dialog-title{font-family:var(--pause-font)!important;font-size:clamp(28px,11cqw,40px)!important;line-height:1.12;font-weight:900!important;font-synthesis:none!important;color:var(--pause-ink)!important;width:100%;text-align:center}
.modal.refreshed-dialog .modal-card:is([data-panel="pause"],[data-panel="pause-auto"]) .dialog-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--pause-gap)}
html[lang] .modal.refreshed-dialog .modal-card:is([data-panel="pause"],[data-panel="pause-auto"]) .dialog-actions>button{font-family:var(--pause-font)!important;font-size:var(--pause-label)!important;line-height:1.15;font-weight:900!important;font-synthesis:none!important;color:var(--pause-ink)!important;aspect-ratio:auto!important;height:var(--pause-row)!important;min-height:var(--pause-row)!important;padding:0 8px!important;white-space:normal;overflow-wrap:normal}
.modal.refreshed-dialog .modal-card:is([data-panel="pause"],[data-panel="pause-auto"]) #pause-continue{grid-column:1/-1;grid-row:1}
.modal.refreshed-dialog .modal-card[data-panel="pause"] :is(#pause-restart,#pause-settings){grid-row:2}
.modal.refreshed-dialog .modal-card[data-panel="pause"] #pause-home{grid-row:3}
.modal.refreshed-dialog .modal-card[data-panel="pause-auto"] #pause-fall{grid-column:1/-1;grid-row:2}
.modal.refreshed-dialog .modal-card[data-panel="pause-auto"] :is(#pause-restart,#pause-settings){grid-row:3}
.modal.refreshed-dialog .modal-card[data-panel="pause-auto"] #pause-home{grid-row:4}
.modal.refreshed-dialog .modal-card:is([data-panel="pause"],[data-panel="pause-auto"]) #pause-home{grid-column:1/-1}

/* Independent redrawn failure postcards. Positions follow each bitmap's safe regions. */
.modal.refreshed-dialog[data-kind="failed"] .dialog-content{inset:0;display:block}
.modal.refreshed-dialog[data-kind="failed"] .dialog-header.has-locale-heading{position:absolute!important;left:18%;right:18%;top:6%;height:11%;min-height:0;padding:0}
.modal.refreshed-dialog[data-kind="failed"] .dialog-title{width:100%;height:100%}
.modal.refreshed-dialog[data-kind="failed"] .dialog-body{position:absolute;top:52%;left:11%;right:11%;height:15%;display:flex;align-items:center;justify-content:center;text-align:center;overflow:auto;padding:0}
.modal.refreshed-dialog[data-kind="failed"] .dialog-body p{font-size:clamp(12px,4.1cqw,16px);line-height:1.45!important;font-weight:700;color:#7e472d;margin:0!important}
.modal.refreshed-dialog[data-kind="failed"] .dialog-body .modal-symbol{display:none!important}
.modal.refreshed-dialog[data-kind="failed"] .dialog-actions{position:absolute;left:10%;right:10%;width:auto;top:68%;height:22%;display:flex;flex-direction:column;justify-content:center;gap:clamp(7px,2.5cqw,11px)}
.modal.refreshed-dialog[data-kind="failed"] .dialog-actions>button{width:100%;flex:0 0 auto;min-height:0;height:auto;aspect-ratio:900/186;white-space:normal;font-size:clamp(12px,4cqw,16px);font-weight:800;padding:6px 8px}
.modal.refreshed-dialog[data-kind="failed"] #rescue-ad{min-height:0;aspect-ratio:900/186;color:#573514}
.modal.refreshed-dialog[data-kind="failed"] #rescue-ad .ui-icon{flex:0 0 auto;width:6cqw;height:6cqw}
.modal.refreshed-dialog[data-kind="failed"] #failed-retry,.modal.refreshed-dialog[data-kind="failed"] #failed-home{aspect-ratio:auto;height:clamp(32px,10cqw,40px)}
.modal.refreshed-dialog[data-kind="failed"] .modal-card[data-panel="failed-final"] .dialog-body{top:56%;height:10%}
.modal.refreshed-dialog[data-kind="failed"] .modal-card[data-panel="failed-final"] .dialog-actions{top:69%;height:23%}
/* Pairing secondary actions avoids shrinking localized button lettering. */
.modal.refreshed-dialog[data-kind="failed"] .dialog-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:center;align-items:center}
.modal.refreshed-dialog[data-kind="failed"] #rescue-ad{grid-column:1/-1;grid-row:1}
.modal.refreshed-dialog[data-kind="failed"] #failed-retry{grid-column:1;grid-row:2}
.modal.refreshed-dialog[data-kind="failed"] #failed-home{grid-column:2;grid-row:2}
.modal.refreshed-dialog[data-kind="failed"] .modal-card[data-panel="failed-final"] #failed-retry{grid-row:1;grid-column:1/-1;aspect-ratio:900/186;height:auto}
.modal.refreshed-dialog[data-kind="failed"] .modal-card[data-panel="failed-final"] #failed-home{grid-row:2;grid-column:1/-1}

/* Compact independently drawn frame, fixed one-screen menus, no draggable/scrolling body. */
.modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-reference"]){overflow:hidden;overscroll-behavior:none;touch-action:manipulation}
.modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-reference"]) .dialog-content{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:clamp(24px,7.7cqw,31px) minmax(0,1fr) auto;justify-content:stretch;align-items:stretch;gap:clamp(6px,2cqw,9px)}
.modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-reference"]) .dialog-header{min-height:0;padding:0;align-self:center}
.modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-reference"]) .dialog-title{font-size:clamp(17px,5.5cqw,22px);line-height:1.4;white-space:nowrap}
.modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-reference"]) .dialog-body{overflow:hidden;min-height:0;padding:0;scrollbar-width:none}
.modal.refreshed-dialog[data-kind="color"] .dialog-body{display:grid;grid-template-rows:minmax(0,1fr) clamp(42px,13cqw,51px);gap:clamp(7px,2.5cqw,11px)}
.modal.refreshed-dialog[data-kind="color"] .color-modes{height:100%;min-height:0;margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:clamp(5px,1.8cqw,8px)}
.modal.refreshed-dialog[data-kind="color"] .color-mode{aspect-ratio:auto;min-height:0;padding:3px 5px;display:flex;align-items:center;justify-content:center}
.modal.refreshed-dialog[data-kind="color"] .color-mode strong{font-size:clamp(11px,3.5cqw,14px);line-height:1.4;overflow-wrap:normal}
.number-assist-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:10px;min-height:0;direction:ltr}
.number-assist-example{width:100%;height:100%;max-height:62px;object-fit:contain;pointer-events:none}
.number-assist-control{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;font-size:clamp(11px,3.5cqw,14px);font-weight:750;color:#294b55;line-height:1.4;text-align:center}
.modal.refreshed-dialog .number-assist-control .settings-switch{width:clamp(43px,14cqw,57px);height:clamp(23px,7.4cqw,30px);flex:0 0 auto;min-height:0}
.modal.refreshed-dialog[data-kind="color"] .dialog-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;height:clamp(33px,10.5cqw,42px)}
.modal.refreshed-dialog[data-kind="color"] .dialog-actions>button{height:100%;min-height:0;aspect-ratio:auto;padding:2px 7px;font-size:clamp(11px,3.5cqw,14px);line-height:1.2}
.modal.refreshed-dialog[data-kind="color-reference"] .dialog-body{display:grid;grid-template-rows:18px minmax(0,1fr) auto auto;gap:5px}
.modal.refreshed-dialog[data-kind="color-reference"] .color-card-top{margin:0;font-size:12px;line-height:18px;justify-content:center}
.modal.refreshed-dialog[data-kind="color-reference"] .reference-plate{width:auto;height:100%;max-height:100%;max-width:100%;min-height:0;aspect-ratio:1;margin:0;justify-self:center}
.modal.refreshed-dialog[data-kind="color-reference"] .reference-plate canvas{width:100%;height:100%;max-height:100%;display:block}
.modal.refreshed-dialog[data-kind="color-reference"] .color-answer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:0}
.modal.refreshed-dialog[data-kind="color-reference"] .color-answer{width:100%;height:clamp(26px,8cqw,34px);min-height:0;padding:0;font-size:clamp(13px,4.4cqw,17px)}
.modal.refreshed-dialog[data-kind="color-reference"] .unclear-answer{grid-column:auto}
.modal.refreshed-dialog[data-kind="color-reference"] .color-disclaimer{margin:0!important;padding:0 0 3px!important;font-size:clamp(9px,2.8cqw,11px)!important;line-height:1.5!important;text-align:center}
.modal.refreshed-dialog[data-kind="color-reference"] .dialog-actions{height:clamp(26px,8cqw,32px);display:block}
.modal.refreshed-dialog[data-kind="color-reference"] #color-card-back{height:100%;min-height:0;padding:0;font-size:clamp(11px,3.5cqw,14px)}
html[lang="ar"] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-reference"]) .dialog-content{grid-template-rows:clamp(31px,10cqw,40px) minmax(0,1fr) auto}
html[lang="ar"] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-reference"]) .dialog-title,html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .color-mode strong,html[lang="ar"] .number-assist-control{line-height:1.8}
html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .dialog-body{grid-template-rows:minmax(0,1fr) clamp(46px,16cqw,60px)}
html[lang="ar"] .modal.refreshed-dialog[data-kind="color-reference"] .color-disclaimer{line-height:1.8!important}
html[lang="ar"] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-reference"]) .dialog-title{padding:3px 0!important}

/* Newly authored roomy frames. Preserve button scale and keep every control off the rim. */
.modal.refreshed-dialog[data-kind="color"]{max-width:none!important}
.modal.refreshed-dialog[data-kind="color"] .dialog-content{grid-template-columns:minmax(0,1fr);grid-template-rows:clamp(34px,10cqw,44px) minmax(0,1fr) clamp(34px,10cqw,42px);gap:clamp(6px,2.3cqw,11px)}
.modal.refreshed-dialog[data-kind="color"] .dialog-header{width:100%;justify-content:center;align-self:center}
.modal.refreshed-dialog[data-kind="color"] .dialog-title{width:100%;font-size:clamp(22px,6.4cqw,27px);line-height:1.4;text-align:center;padding:2px 0;white-space:nowrap}
.modal.refreshed-dialog[data-kind="color"] .dialog-body{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:clamp(108px,28cqw,116px) 4px clamp(36px,12cqw,50px) 4px clamp(30px,9cqw,36px);align-content:center;gap:clamp(6px,2cqw,8px);overflow:hidden}
.modal.refreshed-dialog[data-kind="color"] .color-modes{width:min(100%,280px,70cqw);height:100%;justify-self:center;gap:8px 12px}
.modal.refreshed-dialog[data-kind="color"] .color-mode{flex-direction:column;gap:2px;padding:3px 8px;min-width:0}
.modal.refreshed-dialog[data-kind="color"] .color-mode strong{max-width:100%;min-width:0;font-size:clamp(11px,3cqw,12px);line-height:1.15;text-align:center}
.mode-swatch{width:30px;height:6px;flex:0 0 6px;object-fit:contain;pointer-events:none}
.assist-divider{display:block;width:min(100%,290px);height:4px;justify-self:center;object-fit:cover;pointer-events:none}
.modal.refreshed-dialog[data-kind="color"] .number-assist-row{width:min(100%,280px);height:100%;justify-self:center;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;direction:ltr}
.number-assist-label{font-size:clamp(12px,3.7cqw,16px);font-weight:750;line-height:1.4;color:#294b55;white-space:nowrap}
.modal.refreshed-dialog[data-kind="color"] .number-assist-example{width:min(100%,104px);height:36px;max-height:100%;justify-self:center;object-fit:contain}
.modal.refreshed-dialog[data-kind="color"] #color-number-cues{width:clamp(43px,13.5cqw,57px);height:clamp(23px,7.2cqw,30px);min-height:0;padding:0}
.assist-cards{height:100%;display:flex;align-items:center;justify-content:center}
.color-cards-button{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:center;width:min(100%,168px);height:100%;min-height:0;margin:0;padding:2px 9px;border:0!important;border-image:none!important;border-radius:0;background:none!important;box-shadow:none!important;color:#245364;font-size:clamp(12px,3.8cqw,16px);font-weight:750;line-height:1.4}
.color-cards-button>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;z-index:-1}
.modal.refreshed-dialog[data-kind="color"] .dialog-actions{display:flex;align-items:center;justify-content:center;gap:0;height:100%}
.modal.refreshed-dialog[data-kind="color"] #color-apply{flex:0 0 auto;width:min(100%,168px);height:100%;min-height:0;padding:0}
.modal.refreshed-dialog[data-kind="color"] .dialog-close{top:9%;right:8%}
html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .dialog-content{grid-template-rows:clamp(40px,12cqw,50px) minmax(0,1fr) clamp(34px,10cqw,42px)}
html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .dialog-title{font-size:clamp(21px,6cqw,25px);line-height:1.8;padding:3px 0!important}
html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .dialog-body{grid-template-rows:clamp(104px,29cqw,116px) 4px clamp(40px,13cqw,54px) 4px clamp(30px,9cqw,36px)}
html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .color-mode strong{font-size:11px;line-height:1.6}
html[lang="ar"] .number-assist-label{line-height:1.8;padding:2px 0}
html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .dialog-content{top:11%;bottom:9%}
@media(max-height:500px) and (min-width:600px){
 .modal.refreshed-dialog[data-kind="color"] .dialog-content,html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .dialog-content{grid-template-rows:44px minmax(0,1fr) 38px;gap:6px}
 .modal.refreshed-dialog[data-kind="color"] .dialog-body,html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .dialog-body{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:4px 42px 4px 34px;gap:8px 24px}
 .modal.refreshed-dialog[data-kind="color"] .color-modes{grid-column:1;grid-row:1/5;width:100%;max-width:280px;height:112px;align-self:center;gap:8px 12px}
 .divider-palettes{grid-column:2;grid-row:1}.number-assist-row{grid-column:2;grid-row:2}.divider-cards{grid-column:2;grid-row:3}.assist-cards{grid-column:2;grid-row:4}
 .modal.refreshed-dialog[data-kind="color"] .dialog-title{font-size:27px}
 html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .dialog-title{font-size:24px}
}

/* Large palette controls use independently drawn deeper bitmap skins. */
.modal.refreshed-dialog[data-kind="color"] .dialog-body,html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .dialog-body{grid-template-rows:clamp(144px,46cqw,192px) 4px clamp(36px,12cqw,50px) 4px clamp(30px,9cqw,36px)}
.modal.refreshed-dialog[data-kind="color"] .color-modes{width:100%;max-width:336px;gap:8px 12px}
.modal.refreshed-dialog[data-kind="color"] .color-mode{padding:3px 7px;gap:3px}
.modal.refreshed-dialog[data-kind="color"] .color-mode::before{background-image:url("assets/dialogs/palette-button.webp")}
.modal.refreshed-dialog[data-kind="color"] .color-mode[aria-pressed="true"]::before{background-image:url("assets/dialogs/palette-button-selected.webp")}
.modal.refreshed-dialog[data-kind="color"] .color-mode strong{font-size:clamp(14px,4.3cqw,18px);line-height:1.15;font-weight:800;margin:0!important}
.modal.refreshed-dialog[data-kind="color"] .mode-swatch{width:42px;height:10px;flex:0 0 10px}
html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .color-mode strong{font-size:clamp(13px,3.8cqw,16px);line-height:1.45}
.modal.refreshed-dialog[data-kind="color-result"]{max-width:none!important}
.modal.refreshed-dialog[data-kind="color-result"] .dialog-content{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:clamp(32px,10cqw,40px) minmax(0,1fr) clamp(76px,21cqw,84px);gap:clamp(6px,2cqw,9px)}
.modal.refreshed-dialog[data-kind="color-result"] .dialog-title{width:100%;font-size:clamp(21px,6cqw,25px);line-height:1.4;text-align:center;padding:2px 0;white-space:nowrap}
.modal.refreshed-dialog[data-kind="color-result"] .dialog-body{overflow:hidden;min-height:0;display:flex;align-items:center;justify-content:center}
.assist-result-content{width:100%;display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(8px,2.5cqw,12px);text-align:center;color:#254c56}
.assist-result-observation{display:grid;gap:clamp(5px,1.8cqw,8px)}
.assist-result-score{display:flex;flex-direction:column;align-items:center;gap:2px}
.assist-result-score>strong{font-size:clamp(34px,10cqw,42px);line-height:1.15;color:#08747c}
.assist-result-score small{font-size:.58em}
.assist-result-score>span,.assist-result-palette>span{font-size:clamp(12px,3.7cqw,15px);line-height:1.35}
.modal.refreshed-dialog .assist-result-finding{font-size:clamp(14px,4.2cqw,17px);line-height:1.35;margin:0;font-weight:800;color:#704b30}
.assist-result-palette{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:0}
.assist-result-palette>img{width:82px;height:18px;object-fit:contain}
.assist-result-palette>strong{font-size:clamp(16px,4.6cqw,19px);line-height:1.3;font-weight:800}
.modal.refreshed-dialog .assist-result-disclaimer{font-size:clamp(9px,2.7cqw,11px)!important;line-height:1.5!important;margin:0!important;padding:0!important;color:#65808a;text-align:center;grid-column:1/-1}
.modal.refreshed-dialog[data-kind="color-result"] .dialog-actions{height:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr) 30px;gap:6px 8px}
.modal.refreshed-dialog[data-kind="color-result"] .dialog-actions>button{min-height:0;height:100%;margin:0;padding:0 4px;line-height:1.2;white-space:normal;font-size:clamp(12px,3.6cqw,15px);display:flex;align-items:center;justify-content:center;text-align:center}
.modal.refreshed-dialog[data-kind="color-result"] #color-result-apply{grid-column:1/-1;font-weight:800;font-size:clamp(14px,4.2cqw,17px)}
.modal.refreshed-dialog[data-kind="color-result"] .dialog-close{top:15%;right:8%}
html[lang="ar"] .modal.refreshed-dialog[data-kind="color-result"] .dialog-title{font-size:clamp(20px,5.8cqw,24px);line-height:1.65;padding:2px 0!important}
html[lang="ar"] .assist-result-finding,html[lang="ar"] .assist-result-palette>strong{line-height:1.6}
@media(max-height:500px) and (min-width:600px){
 .modal.refreshed-dialog[data-kind="color"] .dialog-body,html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .dialog-body{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);grid-template-rows:4px 42px 4px 34px;gap:8px 20px}
 .modal.refreshed-dialog[data-kind="color"] .color-modes{height:150px;width:100%;max-width:280px;grid-row:1/5}
 .modal.refreshed-dialog[data-kind="color"] .color-mode strong{font-size:14px}
 html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .color-mode strong{font-size:13px}
 .modal.refreshed-dialog[data-kind="color-result"] .dialog-content{grid-template-rows:32px minmax(0,1fr) 70px;gap:4px}
 .modal.refreshed-dialog[data-kind="color-result"] .assist-result-content{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 22px;align-items:center}
 .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score>strong{font-size:30px}
 .modal.refreshed-dialog[data-kind="color-result"] .assist-result-finding{font-size:14px;line-height:1.25}
 .modal.refreshed-dialog[data-kind="color-result"] .assist-result-palette>strong{font-size:16px}
 .modal.refreshed-dialog[data-kind="color-result"] .dialog-actions{grid-template-rows:minmax(0,1fr) 34px;gap:3px 8px}
 .modal.refreshed-dialog[data-kind="color-result"] .dialog-title{font-size:24px}
 .modal.refreshed-dialog[data-kind="color-result"] .dialog-close{top:17%;right:6%}
}

.assist-result-score>strong,.assist-result-palette>strong{margin:0!important}

html[lang="ar"] .modal.refreshed-dialog[data-kind="color-result"] .dialog-content{top:14%;bottom:9%;grid-template-rows:38px minmax(0,1fr) clamp(76px,21cqw,84px)}
@media(max-height:500px) and (min-width:600px){html[lang="ar"] .modal.refreshed-dialog[data-kind="color-result"] .dialog-content{top:16%;bottom:10%;grid-template-rows:38px minmax(0,1fr) 70px}}

.assist-result-score>strong{direction:ltr;unicode-bidi:isolate}

.modal.refreshed-dialog[data-kind="color"] .color-mode strong{max-width:calc(100% - 14px)}

.modal.refreshed-dialog[data-kind="color"] .color-mode strong{line-height:1.25;overflow-wrap:anywhere}
html[lang="ar"] .modal.refreshed-dialog[data-kind="color"] .color-mode strong{line-height:1.45}

.modal.refreshed-dialog[data-kind="color-result"] .dialog-header{padding:0;justify-content:center}
.modal.refreshed-dialog[data-kind="color-result"] .dialog-close{top:10%}
@media(max-height:500px) and (min-width:600px){.modal.refreshed-dialog[data-kind="color-result"] .dialog-close{top:17%}}

@media(max-height:500px) and (min-width:600px){.modal.refreshed-dialog[data-kind="color-result"] #color-result-apply{font-size:14px}}

/* New shallow bitmap tutorial banners: no modal surface or pointer-blocking sheet. */
.guide-coach{position:absolute;left:0;right:auto;top:0;bottom:auto;width:320px;height:auto;aspect-ratio:1100/248;padding:0!important;display:block;border:0!important;border-image:none!important;border-radius:0;background-color:transparent!important;background-size:contain!important;background-position:center!important;background-repeat:no-repeat!important;box-shadow:none!important;pointer-events:none!important;z-index:15;text-align:start}
.guide-coach .guide-content{position:absolute;inset:15% 7% 10%;display:flex;flex-direction:column;justify-content:center;gap:4px;pointer-events:none}
.guide-coach .guide-heading{display:flex;align-items:center;gap:7px;padding-inline-start:11px;min-height:24px}
.guide-coach #guide-title{flex:1;min-width:0;font-size:15px;line-height:1.3;font-weight:800;margin:0;padding:0;color:#294b55;text-align:start;overflow-wrap:normal}
.guide-coach .guide-top{flex:0 0 auto;display:flex;gap:7px;justify-content:flex-end;align-items:center;min-height:24px;font-size:10px;line-height:1.2;color:#47737a;white-space:nowrap}
.guide-coach #guide-count{direction:ltr;unicode-bidi:isolate}
.guide-coach #guide-skip{pointer-events:auto!important;background:none!important;border:0!important;border-image:none!important;box-shadow:none!important;min-height:24px;padding:0 2px;font-size:11px;line-height:1.3;color:#326975}
.guide-coach .guide-body{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:8px;align-items:center;min-height:0}
.guide-coach[data-reading="false"] .guide-body{grid-template-columns:minmax(0,1fr)}
.guide-coach #guide-text{margin:0;padding:0;min-width:0;font-size:12px;line-height:1.4;color:#455c61;text-align:start;overflow-wrap:normal}
.guide-coach #guide-next{pointer-events:auto!important;width:76px;height:31px;min-height:0;aspect-ratio:auto;margin:0;padding:0 6px;border:0!important;border-image:none!important;border-radius:0;background:transparent url("assets/ui/skin-primary-v2.webp") center/contain no-repeat!important;box-shadow:none!important;display:flex;align-items:center;justify-content:center;font-size:12px;line-height:1.25;font-weight:800;color:#294b55;white-space:nowrap}
html[lang="ar"] .guide-coach #guide-title{line-height:1.65}
html[lang="ar"] .guide-coach #guide-text{font-size:12px;line-height:1.65}
html[lang="ar"] .guide-coach #guide-skip{line-height:1.65;min-height:26px}
.guide-coach[data-skin="dense"] .guide-content{inset:16% 8% 12%}

.guide-coach[data-skin="compact"] .guide-content{inset:20% 7% 8%}
.guide-coach[data-skin="compact"] .guide-heading{padding-inline-start:20px}

/* Same independently authored frames, one genuine Heavy type system. */
html[lang] .modal.refreshed-dialog .modal-card{--dialog-font:"HGenSenRounded2TW-H",PourArabic,sans-serif;--dialog-ink:#5b3219;--dialog-label:clamp(14px,4.9cqw,18px);--dialog-heading:clamp(24px,9cqw,36px);font-family:var(--dialog-font)!important}
html[lang] .modal.refreshed-dialog .modal-card :is(h2,h3,p,strong,small,button,span,label,li){font-family:var(--dialog-font)!important;font-weight:900!important;font-synthesis:none!important;text-shadow:none!important;-webkit-text-stroke:0!important}
html[lang] .modal.refreshed-dialog .dialog-title{font-size:var(--dialog-heading)!important;line-height:1.2!important;color:var(--dialog-ink)!important;white-space:normal;text-align:center;padding:0}
html[lang] .modal.refreshed-dialog .dialog-header{padding:0;min-width:0}
html[lang] .modal.refreshed-dialog .dialog-actions>button{font-size:var(--dialog-label)!important;color:var(--dialog-ink)!important;line-height:1.2!important;text-align:center}
html[lang] .modal.refreshed-dialog .dialog-body :is(p,li){font-size:clamp(12px,4cqw,15px);line-height:1.4!important}
html[lang] .modal.refreshed-dialog :is(.language-option,.language-current,.color-mode strong,.color-answer,.color-cards-button){font-size:var(--dialog-label)!important;color:var(--dialog-ink)!important}
html[lang] .modal.refreshed-dialog .language-option small{font-size:clamp(10px,3.2cqw,12px)!important}
html[lang] .modal.refreshed-dialog .language-option{border-image:none!important;background:transparent url("assets/dialogs/palette-button.webp") center/contain no-repeat!important;font-size:clamp(13px,4cqw,15px)!important;line-height:1.2;padding:6px;overflow-wrap:normal}
html[lang] .modal.refreshed-dialog .language-option[aria-pressed="true"]{background-image:url("assets/dialogs/palette-button-selected.webp")!important}
html[lang] .modal.refreshed-dialog .language-option strong{overflow-wrap:normal}
.modal.refreshed-dialog[data-kind="language"] .dialog-content{gap:clamp(6px,2.3cqw,9px)}
.modal.refreshed-dialog[data-kind="language"] .dialog-header{flex:0 0 clamp(48px,17cqw,60px)}
.modal.refreshed-dialog[data-kind="language"] .language-grid{gap:8px;grid-template-rows:repeat(3,minmax(0,1fr))}
.modal.refreshed-dialog[data-kind="settings"] .dialog-content{inset:12% 10% 10%;gap:clamp(9px,3cqw,12px);justify-content:center}
.modal.refreshed-dialog[data-kind="settings"] .dialog-header{flex:0 0 auto}
.modal.refreshed-dialog[data-kind="settings"] .dialog-body{flex:0 0 auto;overflow:visible;padding:0}
.modal.refreshed-dialog[data-kind="settings"] .settings-options{gap:clamp(9px,3cqw,12px);margin:0}
.modal.refreshed-dialog[data-kind="settings"] .settings-options .modal-row{grid-template-columns:26px minmax(0,1fr) 110px;min-height:44px;padding:0;gap:6px;align-items:center}
html[lang] .modal.refreshed-dialog[data-kind="settings"] .modal-row>span{font-size:var(--dialog-label);color:var(--dialog-ink);overflow-wrap:normal;line-height:1.2}
.modal.refreshed-dialog[data-kind="settings"] .settings-switch{justify-self:end}
html[lang] .modal.refreshed-dialog .language-current{border-image:none!important;width:100%;max-width:none;min-width:0;height:44px;background:transparent url("assets/ui/skin-nav-mint-v2.webp") center/contain no-repeat!important;padding:3px 8px;line-height:1.1;overflow-wrap:normal}
html[lang] .modal.refreshed-dialog[data-kind="settings"] .dialog-actions{grid-template-columns:minmax(0,1fr);gap:clamp(8px,2.7cqw,10px)}
html[lang] .modal.refreshed-dialog[data-kind="settings"] .dialog-actions>button{aspect-ratio:auto;height:clamp(40px,14.2cqw,50px);min-height:0;padding:4px 12px}
html[lang] .modal.refreshed-dialog .modal-card:is([data-panel="pause"],[data-panel="pause-auto"]) .dialog-title{font-size:clamp(28px,11cqw,40px)!important}
html[lang] .modal.refreshed-dialog .modal-card:is([data-panel="pause"],[data-panel="pause-auto"]) .dialog-actions>button{font-size:var(--pause-label)!important}
/* Failure and victory have their own illustrated compositions and safe title slots. */
.modal.refreshed-dialog[data-kind="failed"] .dialog-header{position:absolute;left:16%;right:16%;top:6%;height:12%;display:flex;align-items:center;justify-content:center}
.modal.refreshed-dialog[data-kind="failed"] .dialog-title{width:100%;height:auto}
.modal.refreshed-dialog[data-kind="failed"] .dialog-body p{font-size:clamp(12px,4.1cqw,16px)!important}
.modal.refreshed-dialog.postcard-dialog .dialog-header{left:16%;right:14%;top:6%;height:13%;display:flex;align-items:center;justify-content:center}
.modal.refreshed-dialog.postcard-dialog .postcard-title-art{display:none}
.modal.refreshed-dialog.postcard-dialog .postcard-title-label{position:static;display:block;width:auto;height:auto;margin:0;padding:0;clip-path:none;overflow:visible;white-space:normal}
.modal.refreshed-dialog.postcard-dialog .dialog-title{height:auto!important}
html[lang] .modal.refreshed-dialog.postcard-dialog .dialog-title{font-size:clamp(24px,8.5cqw,32px)!important}
.modal.refreshed-dialog[data-kind="color"] .dialog-header,.modal.refreshed-dialog[data-kind="color-result"] .dialog-header{height:100%}
html[lang] .modal.refreshed-dialog[data-kind="color"] .dialog-title,html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-title{font-size:clamp(22px,7.3cqw,30px)!important}
html[lang] .modal.refreshed-dialog[data-kind="color"] .color-mode strong{font-size:clamp(13px,4.1cqw,17px)!important;line-height:1.2;overflow-wrap:anywhere;max-width:100%}
html[lang] .modal.refreshed-dialog .number-assist-label{font-size:clamp(12px,3.7cqw,16px)!important}
html[lang] .modal.refreshed-dialog .shop-buy{font-size:var(--dialog-label)!important}
.modal.refreshed-dialog[data-kind="color-result"] .dialog-content{grid-template-rows:clamp(40px,12cqw,48px) minmax(0,1fr) 114px}
.modal.refreshed-dialog[data-kind="color-result"] .dialog-actions{grid-template-rows:minmax(0,1fr) 44px}
.modal.refreshed-dialog[data-kind="failed"] .dialog-actions{top:67%;height:25%;gap:8px}
.modal.refreshed-dialog[data-kind="failed"] :is(#failed-retry,#failed-home){height:auto;aspect-ratio:456/188;padding:4px 8px}
.modal.refreshed-dialog[data-kind="settings"] .modal-row>span{min-width:0}
.modal.refreshed-dialog :is(button,[role="switch"]):focus-visible{outline:3px solid #07566b!important;outline-offset:2px}
.modal.refreshed-dialog button:not(:disabled):active{filter:brightness(.88)!important}
/* Only generated hand artwork moves. The mask is input-transparent. */
#tutorial-spotlight{position:fixed;inset:0;z-index:20;pointer-events:none;overflow:hidden}
#tutorial-spotlight[hidden]{display:none}
.tutorial-shade{position:absolute;inset:0;background:rgba(0,0,0,.7)}
.tutorial-hand{position:absolute;left:var(--finger-x);top:var(--finger-y);width:var(--finger-size);height:var(--finger-size);object-fit:contain;animation:tutorial-swipe 1.8s ease-in-out infinite;will-change:transform;pointer-events:none;opacity:1}
@keyframes tutorial-swipe{0%,100%{transform:translate(0,0)}50%{transform:translate(var(--finger-travel),var(--finger-travel-y))}}
@media(prefers-reduced-motion:reduce){.tutorial-hand{animation:none}}
@media(max-height:500px){
 .modal.refreshed-dialog[data-kind="shop"] .shop-items{gap:2px}
 .modal.refreshed-dialog[data-kind="shop"] .shop-item{min-height:0;grid-template-columns:24px minmax(0,1fr) 48px;padding:1px 0;gap:4px}
 .modal.refreshed-dialog[data-kind="shop"] .shop-item .shop-tool{width:24px;height:28px}
 .modal.refreshed-dialog[data-kind="shop"] .shop-buy{min-height:25px}
 .modal.refreshed-dialog[data-kind="shop"] .shop-copy h3{font-size:12px}
 .modal.refreshed-dialog[data-kind="shop"] .shop-copy :is(p,small){font-size:9px!important;line-height:1.2!important}
 .modal.refreshed-dialog[data-kind="color-result"] .dialog-content{grid-template-rows:38px minmax(0,1fr) 86px}
 .modal.refreshed-dialog[data-kind="color-result"] .dialog-actions{grid-template-rows:minmax(0,1fr) 38px}
 .modal.refreshed-dialog[data-kind="settings"] .settings-options .modal-row{min-height:30px;grid-template-columns:22px minmax(0,1fr) 94px;gap:4px}
 .modal.refreshed-dialog[data-kind="settings"] .language-current{width:94px;height:32px}
 .modal.refreshed-dialog[data-kind="settings"] .settings-options{gap:5px}
 .modal.refreshed-dialog[data-kind="settings"] .dialog-content{gap:6px}
 .modal.refreshed-dialog[data-kind="settings"] .dialog-actions{gap:6px}
 .modal.refreshed-dialog[data-kind="settings"] .dialog-actions>button{height:36px}
 html[lang] .modal.refreshed-dialog .modal-card{--dialog-label:clamp(11px,4.9cqw,16px);--dialog-heading:clamp(20px,9cqw,32px)}
}

/* Same settings frame; confirmation is an in-place state, never a stretched new card. */
.modal.refreshed-dialog[data-kind="settings"] .reset-confirm .reset-summary{grid-template-rows:repeat(3,clamp(26px,9cqw,32px)) auto;gap:6px}
.modal.refreshed-dialog[data-kind="settings"] .reset-confirm .modal-row{grid-template-columns:26px minmax(0,1fr) 64px;min-height:0;height:100%;gap:6px}
.modal.refreshed-dialog[data-kind="settings"] .reset-confirm .modal-row>.game-icon{width:26px;height:26px;object-fit:contain}
.modal.refreshed-dialog[data-kind="settings"] .reset-confirm .modal-row>strong{font-size:var(--dialog-label);text-align:end;color:var(--dialog-ink);margin:0}
html[lang] .modal.refreshed-dialog[data-kind="settings"] .reset-confirm .reset-warning{font-size:clamp(12px,3.8cqw,14px);line-height:1.3!important;text-align:center;color:var(--dialog-ink);margin:3px 0 0!important}

/* TAIL_COLLECTION_20261105 */
.auto-fall-button[data-attention="true"]>img{animation:auto-fall-invite 1.6s ease-in-out infinite}
@keyframes auto-fall-invite{0%,100%{opacity:1}50%{opacity:.55}}
@media(prefers-reduced-motion:reduce){.auto-fall-button[data-attention="true"]>img{animation:none;opacity:1}}

/* VICTORY_CLARITY_20261106: a single authored title layer, original frame ratio. */
.modal.refreshed-dialog.postcard-dialog .postcard-title-art{display:block;width:100%;height:100%;object-fit:contain;image-rendering:auto}
.modal.refreshed-dialog.postcard-dialog .postcard-title-label{position:absolute;display:block;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.modal.refreshed-dialog.postcard-dialog .dialog-title{height:100%!important;line-height:0!important}
.modal.refreshed-dialog.postcard-dialog .dialog-header{left:17%;right:13%;top:6%;height:13%;display:flex;align-items:center;justify-content:center}
.modal.refreshed-dialog.postcard-dialog .dialog-actions{top:73%;height:22%;gap:8px}

/* Keep the existing loading surface; never fetch the legacy backdrop at boot. */
.game-shell{background-image:none!important}
@media(min-width:501px){.game-shell{width:460px;height:930px;min-width:460px;max-width:none;flex-shrink:0;transform:scale(var(--shell-scale,1));transform-origin:center;box-shadow:none}}
html[data-boot-stage="loading"] body{background-image:none!important}
html[data-boot-stage="loading"] .game-shell{background-image:none!important}
.loading-screen.asset-overlay{position:absolute;inset:0;z-index:30;background:rgba(0,0,0,.7)}
.loading-screen.asset-overlay p{color:#fff}
.loading-screen.asset-overlay>.loading-cubes,.loading-screen.asset-overlay>h1{display:none}

/* Authored nine-language gold titles sit entirely inside the red ribbon. */
html[lang] .modal.refreshed-dialog[data-kind="failed"] .dialog-header{left:21%;right:21%;top:6.5%;height:9%;padding:0;display:flex;align-items:center;justify-content:center}
html[lang] .modal.refreshed-dialog[data-kind="failed"] .dialog-title{width:100%;height:100%;display:flex;align-items:center;justify-content:center;position:relative;margin:0}
.failure-title-label{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.failure-title-art{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}
html[lang] .modal.refreshed-dialog[data-kind="failed"] .dialog-body{overflow:visible}
html[lang] .modal.refreshed-dialog :is(#rescue-ad,#coins-ad,#heart-ad,#item-ad){display:flex;align-items:center;justify-content:center;gap:8px;padding-inline:16px}
html[lang] .modal.refreshed-dialog :is(#rescue-ad,#coins-ad,#heart-ad,#item-ad)>.ui-icon{width:22px;height:22px;flex:0 0 22px;object-fit:contain}
html[lang] .modal.refreshed-dialog :is(#rescue-ad,#coins-ad,#heart-ad,#item-ad)>span{flex:0 1 auto;min-width:0}
html[lang] .modal.refreshed-dialog[data-kind="failed"] .modal-card[data-panel="failed-final"] .dialog-actions{left:12%;right:12%;top:64%;height:29%;grid-template-rows:repeat(2,minmax(0,1fr));align-content:center;gap:8px}
html[lang] .modal.refreshed-dialog[data-kind="failed"] .modal-card[data-panel="failed-final"] :is(#failed-retry,#failed-home){width:100%;height:auto;aspect-ratio:900/186;min-height:0;padding:4px 12px;grid-column:1/-1}
/* Result facts share rows instead of colliding with the action on narrow phones. */
@media(min-height:501px){
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-content{grid-template-rows:clamp(40px,12cqw,48px) minmax(0,1fr) auto}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-actions{height:auto;grid-template-rows:auto 44px;gap:6px 8px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] #color-result-apply{height:auto;aspect-ratio:900/186;min-height:0}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-content{gap:6px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score{flex-direction:row;justify-content:center;gap:8px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-palette{display:grid;grid-template-columns:52px minmax(0,1fr);gap:6px 8px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-palette>span{grid-column:1/-1}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-palette>img{width:52px;height:auto;max-height:18px;object-fit:contain}
}
/* Shop copy uses the existing interior; no label can paint over the footer. */
html[lang] .modal.refreshed-dialog[data-kind="shop"] .dialog-body{min-height:0;overflow:auto;overscroll-behavior:contain}

/* A single shop spread. The independently redrawn frames always retain aspect ratio. */
html[lang] .modal.refreshed-dialog[data-kind="shop"]{max-width:none}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .dialog-content{top:var(--content-top);right:var(--content-side);bottom:var(--content-bottom);left:var(--content-side);display:flex;flex-direction:column;justify-content:space-between;gap:8px;user-select:none;-webkit-user-select:none}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .dialog-header{flex-direction:column;gap:6px;padding:0;flex:0 0 auto}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .dialog-title{width:auto}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .dialog-body{flex:1 1 0;min-height:0;padding:0;display:flex;flex-direction:column;gap:6px;overflow:clip;overscroll-behavior:none;touch-action:manipulation;scrollbar-width:none}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .dialog-body::-webkit-scrollbar{display:none}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-items{flex:1 1 0;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(4,minmax(min-content,1fr));gap:6px;margin:0}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-item{min-height:0;grid-template-columns:36px minmax(0,1fr) 66px;gap:8px;padding:0;align-items:center}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-copy h3{font-size:15px;line-height:1.2}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-copy small{font-size:11px;line-height:1.25;margin:0;color:#48585b}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-copy p{font-size:11px!important;line-height:1.3!important;margin:0!important}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-note{flex:0 0 auto;font-size:12px!important;margin:0!important;text-align:center}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-buy{min-height:36px;padding:4px;gap:3px}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .dialog-actions{flex:0 0 auto}
html[lang] .modal.refreshed-dialog[data-kind="shop"] .dialog-close{top:10%;right:6%}
@media(max-height:600px) and (min-width:480px){
 html[lang] .modal.refreshed-dialog[data-kind="shop"] .dialog-header{flex-direction:row;justify-content:space-between;gap:12px}
 html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-items{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(min-content,1fr));gap:6px 20px}
 html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-item{grid-template-columns:32px minmax(0,1fr) 60px;column-gap:4px;row-gap:2px;padding:0;align-content:center}
 html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-copy{display:contents}
 html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-copy h3{grid-column:2;grid-row:1}
 html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-copy p{grid-column:1/-1;grid-row:2}
 html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-tool{grid-column:1;grid-row:1}
 html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-buy{grid-column:3;grid-row:1}
 html[lang] .modal.refreshed-dialog[data-kind="shop"] .dialog-actions{width:min(200px,65%);align-self:center}
 html[lang] .modal.refreshed-dialog[data-kind="shop"] .shop-tool{width:32px;height:32px}
 html[lang] .modal.refreshed-dialog[data-kind="shop"] .dialog-close{top:2%;right:3%}
}
/* Client report 2026-11-13: original bitmap add affordances and readable card copy. */
.home-screen :is(.heart-card,.coin-card){position:relative;overflow:visible}
.home-screen :is(.heart-card,.coin-card)>.home-add{position:absolute;right:-5px;bottom:-5px;width:22px;height:22px;max-width:none;object-fit:contain;pointer-events:auto;filter:drop-shadow(0 1px 0 #633c20)}
#toast[popover]{position:fixed;inset:auto auto max(20px,env(safe-area-inset-bottom)) 50%;transform:translateX(-50%);width:min(340px,calc(100vw - 32px));margin:0;z-index:2147483647;pointer-events:none}
html[lang] .modal.refreshed-dialog[data-kind="color-reference"] .dialog-content{grid-template-rows:minmax(44px,auto) minmax(0,1fr) auto}
html[lang] .modal.refreshed-dialog[data-kind="color-reference"] .dialog-header{width:100%;padding-inline:10%;box-sizing:border-box;justify-content:center}
html[lang] .modal.refreshed-dialog[data-kind="color-reference"] .dialog-title{width:100%;max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:clamp(18px,6cqw,24px)!important;line-height:1.22!important;text-align:center;margin:0}
html[lang] .modal.refreshed-dialog[data-kind="color-reference"] .color-answer-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
html[lang] .modal.refreshed-dialog[data-kind="color-reference"] .unclear-answer{grid-column:1/-1;width:100%;height:auto;aspect-ratio:900/186;min-height:32px;padding:5px 12px;background-image:url("assets/dialogs/button-cream.webp");font-size:clamp(13px,4.6cqw,17px)!important;line-height:1.2;white-space:normal;overflow-wrap:anywhere}

/* Generated wallet artwork owns the complete silhouette, icons and add button. */
.home-screen :is(.heart-card,.coin-card){position:relative;display:block;flex:0 0 clamp(96px,32cqw,144px);width:clamp(96px,32cqw,144px);min-width:0;max-width:144px;height:auto;min-height:44px;aspect-ratio:1613/392;padding:0!important;border:0!important;border-image:none!important;border-radius:0;background:none!important;box-shadow:none!important;overflow:hidden;align-self:center}
.home-screen :is(.heart-card,.coin-card)::before,.home-screen :is(.heart-card,.coin-card)::after{display:none!important}
.home-screen :is(.heart-card,.coin-card)>.wallet-art{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;object-fit:contain;pointer-events:auto;filter:none;margin:0;transform:none}
html[lang] .home-screen :is(.heart-card,.coin-card)>.wallet-number{position:absolute;inset:0 23% 0 27%;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:0;padding:0;margin:0;color:#164c65;direction:ltr;white-space:nowrap;font-family:HGenSenRounded2TW-H,PourArabic,sans-serif;font-weight:900;font-size:clamp(12px,3.8cqw,17px);font-synthesis:none;line-height:1;pointer-events:none}
html[lang] .home-screen .wallet-number strong{display:block;font:inherit!important;color:inherit;line-height:1!important;letter-spacing:0;transform:none;text-shadow:none}

html[lang] .home-screen :is(#coin-number,#heart-number){font-family:HGenSenRounded2TW-H,PourArabic,sans-serif!important}

/* EXPAND_RESULT_20261116_START */
/* Authored conveyor, never a bucket; all other tool sprites stay unchanged. */
.tool-art-expand{background-image:url("assets/ui/icon-belt-expand-v2.webp");background-position:center;background-size:contain}
/* Independent portrait and landscape art, with one typography/spacing system. */
.modal.refreshed-dialog[data-kind="color-result"]{--result-ink:#254c56;--result-brown:#5b3219;--result-accent:#08747c;--result-gap:12px;--result-small-gap:6px}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-content{top:var(--content-top);bottom:var(--content-bottom);display:grid;grid-template-rows:13% minmax(0,1fr) auto;gap:var(--result-gap)}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-header{width:78%;justify-self:center;align-items:center;justify-content:center;padding:0;height:100%}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-title{font-size:clamp(22px,7cqw,28px)!important;line-height:1.25!important;padding:0!important;margin:0!important;color:var(--result-brown);white-space:normal}
.modal.refreshed-dialog[data-kind="color-result"] .dialog-body{overflow:clip;display:flex;align-items:center;min-height:0;padding:0}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-content{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--result-gap);width:100%;text-align:center;color:var(--result-ink)}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-observation{display:grid;gap:var(--result-small-gap)}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--result-gap)}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score>strong{font-size:clamp(32px,10cqw,40px);line-height:1.15;color:var(--result-accent)}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score>span{font-size:clamp(13px,4cqw,16px);line-height:1.4}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-finding{font-size:clamp(14px,4.4cqw,17px);line-height:1.4;margin:0!important;color:var(--result-brown);font-weight:900}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-palette{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;gap:var(--result-small-gap)}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-palette>span{font-size:clamp(12px,3.7cqw,15px);line-height:1.4}
.assist-result-choice{display:flex;align-items:center;justify-content:center;gap:var(--result-gap);min-width:0;width:100%}
.assist-result-choice>img{display:block;width:78px;height:auto;max-height:26px;object-fit:contain;flex-shrink:0}
.assist-result-choice>strong{font-size:clamp(16px,4.8cqw,19px);line-height:1.4;margin:0!important;min-width:0;color:var(--result-ink);font-weight:900}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-disclaimer{font-size:clamp(10px,3cqw,12px)!important;line-height:1.4!important;color:var(--result-ink);margin:0!important;padding:0!important}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto auto;height:auto;gap:8px}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-actions>button{position:relative;display:flex;align-items:center;justify-content:center;min-height:44px;height:auto;padding:4px 8px!important;margin:0!important;white-space:normal;text-align:center;font-size:clamp(14px,4.4cqw,17px);line-height:1.25;font-weight:900;color:var(--result-brown)}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] #color-result-apply{grid-column:1/-1;aspect-ratio:900/186;font-size:clamp(16px,5cqw,19px);min-height:44px}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] #color-result-retry,html[lang] .modal.refreshed-dialog[data-kind="color-result"] #color-result-back{aspect-ratio:809/339}
.modal.refreshed-dialog[data-kind="color-result"] .dialog-actions .dialog-button-art{object-fit:contain}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-close{top:20%;right:5%;width:32px;height:32px}
@media(max-height:500px) and (min-width:600px){
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-content{grid-template-rows:19% minmax(0,1fr) auto;gap:6px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-header{width:60%}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-content{grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:6px 20px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score>strong{font-size:32px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-disclaimer{grid-column:1/-1;font-size:10px!important}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-actions{grid-template-columns:2fr 1fr 1fr;grid-template-rows:auto;align-items:center;gap:8px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] #color-result-apply{grid-column:auto;font-size:16px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-actions>button{font-size:14px;min-height:40px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-close{top:23%;right:4%}
 .assist-result-choice{gap:8px;flex-wrap:wrap}
}
@media(max-width:350px){
 .modal.refreshed-dialog[data-kind="color-result"]{--result-gap:6px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-content{bottom:6%;grid-template-rows:11% minmax(0,1fr) auto}
 .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice>img{width:64px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] #color-result-retry,html[lang] .modal.refreshed-dialog[data-kind="color-result"] #color-result-back{aspect-ratio:auto;height:44px}
}
/* EXPAND_RESULT_20261116_END */
/* ASSIST_ROUNDED_20261116_START */
:root{--assist-a-choice-ratio:1.566579634464752;--assist-a-medium-ratio:3.0150753768844223;--assist-a-wide-ratio:5.1020408163265305;--assist-a-score-ratio:6.410256410256411;--assist-a-finding-ratio:7.352941176470588;--assist-a-recommend-ratio:3.5460992907801416;--assist-a-recommend-wide-ratio:8.771929824561404;}
/* A artwork, actual rounded Heavy font; no painted substitute graphics or stretched skins. */
.modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]){--assist-a-ink:#5b3219;--assist-a-teal:#254c56;--assist-a-title:#fff5d7;--assist-a-gap:10px;--assist-a-optical-y:-2px;--assist-a-label:clamp(18px,5.5cqw,22px);--assist-a-heading:clamp(28px,8.2cqw,34px)}
html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) :is(button,strong,span,label,h2,h3,p){font-family:"HGenSenRounded2TW-H",PourArabic,sans-serif;font-weight:900!important;font-synthesis:none;text-shadow:none}
html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-content{top:var(--content-top);bottom:var(--content-bottom);display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:clamp(40px,12cqw,52px) minmax(0,1fr) auto;gap:var(--assist-a-gap)}
html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-header{width:82%;height:100%;padding:0;justify-self:center;display:flex;align-items:center;justify-content:center}
html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-title{width:100%;height:auto;margin:0!important;padding:0!important;font-size:var(--assist-a-heading)!important;line-height:1.15!important;color:var(--assist-a-title)!important;text-align:center;white-space:normal}
html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-close{top:3%;right:4%;width:32px;height:32px}
/* Four real deep button skins, with both states retaining their authored aspect. */
html[lang] .modal.refreshed-dialog[data-kind="color"] .dialog-body{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 4px clamp(44px,13cqw,52px) 4px;gap:8px;align-content:center;overflow:clip;min-height:0;padding:0}
html[lang] .modal.refreshed-dialog[data-kind="color"] .color-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,auto);height:auto;width:100%;max-width:none;gap:8px;margin:0!important;min-height:0}
html[lang] .modal.refreshed-dialog[data-kind="color"] .color-mode{aspect-ratio:var(--assist-a-choice-ratio);width:100%;height:auto;min-height:0;max-height:none;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:5px 8px;gap:4px;border:0!important;background:none!important;box-shadow:none!important;color:var(--assist-a-ink)!important}
html[lang] .modal.refreshed-dialog[data-kind="color"] .color-mode::before{background-image:url("assets/dialogs/assist-palette-normal-rounded.webp");background-size:contain;background-position:center;background-repeat:no-repeat}
html[lang] .modal.refreshed-dialog[data-kind="color"] .color-mode[aria-pressed="true"]::before{background-image:url("assets/dialogs/assist-palette-selected-rounded.webp")}
html[lang] .modal.refreshed-dialog[data-kind="color"] .color-mode[aria-pressed="true"]::after{content:"";position:absolute;inset:6px 6px auto auto;width:16px;height:16px;background:url("assets/ui/icon-check.webp") center/contain no-repeat;pointer-events:none}
html[lang] .modal.refreshed-dialog[data-kind="color"] .color-mode strong{font-size:var(--assist-a-label)!important;line-height:1.02!important;color:var(--assist-a-ink)!important;margin:0!important;max-width:100%;min-width:0;overflow-wrap:anywhere;transform:none}
html[lang] .modal.refreshed-dialog[data-kind="color"] .mode-swatch{width:56px;height:auto;max-height:18px;flex:0 0 auto;object-fit:contain;transform:none}
html[lang] .modal.refreshed-dialog[data-kind="color"] .assist-divider{width:100%;height:4px;object-fit:contain;grid-column:auto;grid-row:auto}
html[lang] .modal.refreshed-dialog[data-kind="color"] .number-assist-row{width:100%;height:100%;display:grid;grid-template-columns:minmax(0,1fr) 88px 54px;align-items:center;gap:8px;direction:ltr;grid-column:auto;grid-row:auto}
html[lang] .modal.refreshed-dialog[data-kind="color"] .number-assist-label{font-size:clamp(18px,5cqw,20px)!important;line-height:1.2!important;color:var(--assist-a-teal)!important;padding:0;white-space:normal}
html[lang] .modal.refreshed-dialog[data-kind="color"] .number-assist-example{width:100%;max-width:104px;height:36px;max-height:100%;object-fit:contain;justify-self:center}
html[lang] .modal.refreshed-dialog[data-kind="color"] #color-number-cues{width:54px;height:30px;min-height:0;padding:0}
/* Equal medium actions below the menu; full-width gold plus medium pair on results. */
html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto;height:auto;align-items:center;gap:8px}
html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-actions>button{position:relative;display:flex;align-items:center;justify-content:center;isolation:isolate;width:100%;height:auto;min-height:44px;aspect-ratio:var(--assist-a-medium-ratio);grid-column:auto;margin:0!important;padding:4px 8px!important;white-space:normal;line-height:1.15;font-size:var(--assist-a-label)!important;color:var(--assist-a-ink)!important;text-align:center}
html[lang] .modal.refreshed-dialog[data-kind="color"] #color-apply,html[lang] .modal.refreshed-dialog[data-kind="color"] #color-reference-start{width:100%;max-width:none;height:auto;aspect-ratio:var(--assist-a-medium-ratio);min-height:44px;grid-column:auto;flex:initial}
html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-button-art{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.assist-action-label{position:relative;transform:translateY(var(--assist-a-optical-y));pointer-events:none}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-body{overflow:clip;min-height:0;padding:0;display:flex;align-items:center}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-content{display:grid;grid-template-columns:minmax(0,1fr);width:100%;gap:10px;text-align:center;color:var(--assist-a-teal)}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-observation{display:grid;gap:6px}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:10px}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score>strong{font-size:clamp(36px,11.3cqw,44px);line-height:1.1;color:#08747c}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score>span,html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-palette>span{font-size:clamp(16px,4.8cqw,18px);line-height:1.25}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-finding{font-size:18px;line-height:1.25!important;color:var(--assist-a-ink);margin:0!important}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-palette{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;gap:6px}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;min-width:0}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice>img{display:block;width:74px;height:auto;max-height:24px;object-fit:contain;flex-shrink:0}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice>strong{font-size:clamp(18px,5.5cqw,22px);line-height:1.15!important;min-width:0;color:var(--assist-a-teal);margin:0!important}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-disclaimer{font-size:12px!important;line-height:1.3!important;color:var(--assist-a-teal);margin:0!important;padding:0!important}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] #color-result-apply{grid-column:1/-1;aspect-ratio:var(--assist-a-wide-ratio);min-height:44px;font-size:var(--assist-a-label)!important}
@media(max-width:350px){
 .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]){--assist-a-gap:6px}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .dialog-body{gap:6px}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .color-mode{padding:4px 6px;gap:3px}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .mode-swatch{width:48px;max-height:14px}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .number-assist-row{gap:6px;grid-template-columns:minmax(0,1fr) 66px 48px}
 html[lang] .modal.refreshed-dialog[data-kind="color"] #color-number-cues{width:48px;height:28px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-content{gap:6px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice{gap:6px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice>img{width:60px}
}
@media(max-height:500px) and (min-width:600px){
 html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-content{grid-template-rows:clamp(38px,9cqw,46px) minmax(0,1fr) auto;gap:6px}
 html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-header{width:59%}
 html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-title{font-size:28px!important}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .dialog-body{grid-template-columns:1fr 1fr;grid-template-rows:4px minmax(0,1fr) 4px;gap:6px 24px;align-content:center}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .color-modes{grid-column:1;grid-row:1/4;width:100%;max-width:none;align-self:center;gap:6px}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .color-mode strong{font-size:18px!important}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .mode-swatch{width:48px;max-height:14px}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .divider-palettes{grid-column:2;grid-row:1}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .number-assist-row{grid-column:2;grid-row:2;grid-template-columns:minmax(0,1fr) auto;height:auto;gap:8px}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .number-assist-example{grid-column:1/-1;grid-row:1;width:104px;height:32px}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .divider-cards{grid-column:2;grid-row:3}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .dialog-actions{width:60%;justify-self:center}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-content{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 20px;align-items:center}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score>strong{font-size:36px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-disclaimer{grid-column:1/-1}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-actions{grid-template-columns:2fr 1fr 1fr;grid-template-rows:auto;gap:8px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] #color-result-apply{grid-column:auto}
 html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-actions>button{font-size:18px!important;min-height:44px}
 html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-close{top:3%;right:3%}
}
/* A's actual rounded silhouettes and compact informative groups, all bitmap-backed. */
html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-content{grid-template-rows:clamp(36px,11cqw,46px) minmax(0,1fr) auto;gap:6px}
html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-title{line-height:1!important}
html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-close{background:url("assets/dialogs/assist-close-rounded.webp") center/contain no-repeat!important;box-shadow:none!important;border:0!important}
html[lang] .modal.refreshed-dialog:is([data-kind="color"],[data-kind="color-result"]) .dialog-close .game-icon{visibility:hidden}
html[lang] .modal.refreshed-dialog[data-kind="color"] .dialog-close{top:4%;right:4%}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-close{top:7%;right:3%;width:32px;height:32px}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-content{grid-template-columns:minmax(0,1fr);gap:4px}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-observation{gap:4px;justify-items:center}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score{width:100%;aspect-ratio:var(--assist-a-score-ratio);height:auto;padding:3px 10px;gap:8px;background:url("assets/dialogs/assist-score-strip-rounded.webp") center/contain no-repeat}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score>strong{font-size:clamp(30px,9.2cqw,40px);line-height:1;color:#08747c}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score>span{font-size:clamp(14px,4.5cqw,18px);line-height:1.1}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-finding{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:var(--assist-a-finding-ratio);height:auto;padding:3px 10px;font-size:18px;line-height:1.05!important;background:url("assets/dialogs/assist-finding-strip-rounded.webp") center/contain no-repeat}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-palette{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;aspect-ratio:var(--assist-a-recommend-ratio);height:auto;padding:5px 10px;gap:3px;background:url("assets/dialogs/assist-recommend-panel-rounded.webp") center/contain no-repeat}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-palette>span{font-size:16px;line-height:1}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice{gap:8px}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice>img{width:112px;max-height:28px}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice>strong{font-size:18px;line-height:1.1!important}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-disclaimer{font-size:12px!important;line-height:1.2!important;grid-column:1/-1}
html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-actions{gap:6px}
@media(max-width:350px){
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .dialog-content{gap:4px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-palette{padding:3px 8px;gap:0}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice{flex-direction:column;gap:0}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice>strong{line-height:1!important}
}
@media(max-height:500px) and (min-width:600px){
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-content{grid-template-columns:minmax(0,1fr);gap:4px}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-score{width:280px;max-width:100%;justify-self:center}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-finding{width:360px;max-width:100%;justify-self:center}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-palette{aspect-ratio:var(--assist-a-recommend-wide-ratio);flex-direction:row;gap:12px;background-image:url("assets/dialogs/assist-recommend-wide-rounded.webp")}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice{width:auto}
 html[lang] .modal.refreshed-dialog[data-kind="color-result"] .assist-result-choice{flex-direction:row}
}
/* ASSIST_ROUNDED_20261116_END */
/* MENU_SAFE_20261117_START */
/* One intrinsically sized, centered number group; inset menu actions clear the leaves. */
html[lang] .modal.refreshed-dialog[data-kind="color"] .number-assist-row{width:max-content;max-width:100%;justify-self:center;grid-template-columns:max-content 88px 54px;gap:10px;justify-content:center;align-items:center}
html[lang] .modal.refreshed-dialog[data-kind="color"] .number-assist-label{text-align:center}
html[lang] .modal.refreshed-dialog[data-kind="color"] .dialog-actions{width:86%;justify-self:center;gap:8px}
@media(max-width:350px){html[lang] .modal.refreshed-dialog[data-kind="color"] .number-assist-row{grid-template-columns:max-content 66px 48px;gap:8px}}
@media(max-height:500px) and (min-width:600px){
 html[lang] .modal.refreshed-dialog[data-kind="color"] .number-assist-row{width:100%;grid-template-columns:minmax(0,1fr) auto;gap:8px}
 html[lang] .modal.refreshed-dialog[data-kind="color"] .dialog-actions{width:60%}
}
/* MENU_SAFE_20261117_END */
