:root{font-family:'Malgun Gothic',system-ui,sans-serif;color:#47291e;background:#f7f5ef}*{box-sizing:border-box}body{margin:0}main{width:min(100%,430px);margin:0 auto;background:#fff5df;position:relative;min-height:100svh}.awning{height:50px;display:flex;overflow:hidden}.awning span{flex:1;background:#f0c3ae;border-radius:0 0 50% 50% / 0 0 13px 13px}.awning span:nth-child(even){background:#b72e24}header{padding:10px 25px 0}.mode{font-size:10px;color:#856445;letter-spacing:.02em;margin-bottom:10px}.hud{display:flex;justify-content:space-between;border-top:1px solid #b72e24;padding-top:12px;min-height:99px}.scores{display:flex;flex-direction:column;gap:3px}.scores>span{font-size:12px;color:#856445}.scores>strong{font-size:40px;line-height:1.08;letter-spacing:-1px}.scores>small{font-size:11px;color:#856445}.scores b{font-weight:400}.right-hud{display:flex;flex-direction:row;align-items:flex-start;gap:12px}.next{width:74px;height:77px;border:1.3px solid #6b3927;border-radius:5px;background:#fffcf4;display:flex;flex-direction:column;align-items:center;padding:5px 0}.next>span{font-size:12px;font-weight:700}.next small{font-weight:400;font-size:9px;color:#856445}.next canvas{width:49px;height:49px}button,select{font:inherit;color:inherit;cursor:pointer;border:1px solid #9b7259;border-radius:7px;background:#fffcf4;padding:10px 14px}button:focus-visible,canvas:focus-visible,select:focus-visible{outline:3px solid #b72e24;outline-offset:2px}#pause{border:0;background:transparent;font-size:23px;line-height:1;padding:5px 3px;width:30px;min-height:38px;order:2}.stage{position:relative}#game{width:100%;height:auto;display:block;touch-action:none;outline-offset:-3px}#ladder{list-style:none;margin:-16px 0 0;padding:0 15px 20px;display:grid;grid-template-columns:repeat(11,minmax(0,1fr));gap:2px}#ladder li{min-width:0;text-align:center}#ladder canvas{display:block;width:100%;height:auto}#ladder span{font-size:9px;color:#856445;display:block;margin-top:0}.overlay{position:absolute;inset:0;z-index:5;background:#47291e33;display:grid;place-items:center;padding:18px}.overlay[hidden]{display:none}.dialog{width:100%;max-width:374px;max-height:calc(100svh - 36px);overflow:auto;padding:22px;background:#fff5df;border:1.5px solid #6b3927;border-radius:12px;box-shadow:0 8px 30px #47291e18}.dialog h2{font-size:19px;margin:0 0 15px}.dialog>button{display:block;width:100%;margin:8px 0}#resume{background:#b72e24;border-color:#b72e24;color:#fff5df}.menu{position:fixed}.inspection{font-size:11px;line-height:1.6;border-top:1px solid #d1b899;padding-top:18px;margin-top:18px}.inspection p{margin:8px 0;color:#856445}.inspection label{display:block;margin-top:16px}.inspection select,.inspection button{display:block;width:100%;margin:8px 0}.inspection details{margin-top:15px}.inspection summary{cursor:pointer;font-weight:700}.inspection a{color:#6b3927}table{border-collapse:collapse;width:100%;font-size:9px;text-align:right}th,td{padding:5px 2px;border-bottom:1px solid #dcc5a7}#error{font-size:12px;padding:12px;color:#9c251e}#error[hidden]{display:none}@media(max-width:350px){header{padding:8px 19px 0}.awning{height:42px}.scores>strong{font-size:35px}.hud{min-height:88px}.next{width:65px;height:68px}.next canvas{width:43px;height:43px}.right-hud{gap:6px}#ladder{padding-left:10px;padding-right:10px;gap:1px}#ladder span{font-size:8px}.mode{font-size:9px}}

#ladder{position:relative;z-index:1}

.combo-controls{position:relative;margin:0 24px;padding:10px 0 8px;border-top:1px solid #dfc4ab;min-height:116px;padding-right:139px}.combo-controls>label{display:block;font-size:10px;margin-bottom:4px}.combo-controls select{font-size:10px;width:100%;padding:6px 3px;min-height:44px}.combo-controls>span{display:block;font-size:10px;margin:7px 0;color:#a52b3f}.combo-low{display:flex!important;align-items:center;font-size:9px!important;gap:4px}.combo-low input{accent-color:#aa3049}#comboFx{position:absolute;right:-20px;top:-2px;width:160px;height:124px;contain:layout paint;pointer-events:none}#comboFx[hidden]{display:none}#comboFx canvas,.comboBadge{position:absolute;inset:0;width:100%;height:100%}.comboBadge svg{width:100%;height:100%}.comboCaption{position:absolute;bottom:5px;left:0;width:100%;text-align:center;font:700 9px Georgia;letter-spacing:2px;color:#995724}.combo-controls+.stage{clear:both}#pause{min-width:44px;min-height:44px} @media(max-width:350px){.combo-controls{margin:0 19px;padding-right:118px}#comboFx{width:140px;right:-16px}.combo-controls select{font-size:9px}.comboCaption{font-size:8px}}

.combo-low[hidden]{display:none!important}.combo-controls.cushion-mode{padding-right:0;min-height:90px}.cushion-mode #combo-readout{font-size:18px;line-height:1.4;font-weight:800;color:#9d3f28}.cushion-mode select{max-width:250px}.cushion-mode>label{color:#856445}

/* Bakery cushion presentation layer; physics canvas remains unchanged. */
.bakery-controls{min-height:82px;padding-right:118px;background:linear-gradient(90deg,#fff5df 55%,#f8dfcf)}.bakery-controls:after{content:'☁';position:absolute;right:30px;top:5px;font-size:58px;color:#efd0bf;filter:drop-shadow(0 4px 0 #f6e6d7)}.bakery-controls>span{font-size:18px;font-weight:900;color:#9d3f28;margin:0 0 2px}.bakery-controls>p{font-size:10px;color:#856445;margin:0 0 6px}.bakery-controls .combo-low{position:relative;z-index:1}.stage{isolation:isolate}#bakeryFx{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden}#bakeryFx>canvas{position:absolute;inset:0;width:100%;height:auto}.bakery-multiplier{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);display:grid;place-items:center;width:94px;height:62px;border:2px solid #c47a62;border-radius:32px;background:#fff8e9d9;box-shadow:0 7px 0 #e7b39c66,0 10px 28px #8b4b3930;color:#8e382b;backdrop-filter:blur(2px)}.bakery-multiplier small{font-size:9px;letter-spacing:.12em;margin-bottom:-7px}.bakery-multiplier strong{font-size:32px;line-height:1;font-variant-numeric:tabular-nums}.bakery-multiplier.punch{animation:bakery-punch .36s cubic-bezier(.2,1.7,.4,1)}.bakery-settle{position:absolute;left:50%;top:54%;transform:translate(-50%,8px) scale(.9);min-width:190px;padding:9px 16px;text-align:center;border-radius:999px;background:#9d3f28;color:#fff7e8;font-size:18px;font-weight:900;opacity:0;box-shadow:0 6px 18px #6b392744}.bakery-settle.show{animation:bakery-settle .9s ease both}@keyframes bakery-punch{0%{transform:translate(-50%,-50%) scale(.82) rotate(-2deg)}55%{transform:translate(-50%,-50%) scale(1.12) rotate(1deg)}100%{transform:translate(-50%,-50%) scale(1)}}@keyframes bakery-settle{0%{opacity:0;transform:translate(-50%,10px) scale(.88)}20%,72%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,-8px) scale(.98)}}@media(max-width:350px){.bakery-controls{padding-right:94px}.bakery-controls:after{right:18px;font-size:48px}.bakery-multiplier{width:82px;height:56px}.bakery-multiplier strong{font-size:28px}.bakery-settle{font-size:16px;min-width:170px}}@media(prefers-reduced-motion:reduce){.bakery-multiplier.punch,.bakery-settle.show{animation:none}.bakery-settle.show{opacity:1}}

/* Targeted bakery polish: digit reels and narrow next-card fit. */
.scores>strong.rolling{display:inline-flex;align-items:flex-start;height:1.08em;overflow:hidden;white-space:nowrap}.slot-column{display:block;width:.64em;height:1em;overflow:hidden}.slot-track{display:flex;flex-direction:column;will-change:transform}.slot-track>span{display:block;height:1em;line-height:1em;text-align:center}.next>span{white-space:nowrap;line-height:1}.next{width:88px;height:78px}.next canvas{width:50px;height:50px}@media(max-width:350px){.next{width:88px;height:76px}.next>span{font-size:11px}.next small{font-size:8px}.next canvas{width:48px;height:48px}.right-hud{gap:3px}}


/* Bakery r2 transient multiplier and header settlement flight. */
.bakery-multiplier{width:auto;height:auto;min-width:0;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;filter:none;opacity:0;visibility:hidden;will-change:transform,opacity}
.bakery-multiplier strong{font-size:38px;line-height:1;color:#973d2c;text-shadow:0 2px 0 #fff7e8,2px 0 0 #fff7e8,-2px 0 0 #fff7e8,0 -2px 0 #fff7e8;white-space:nowrap}
.bakery-multiplier.punch{animation:none}
.bakery-settle{position:fixed;inset:0;z-index:20;min-width:0;padding:0;border-radius:0;background:none;box-shadow:none;opacity:1;transform:none;pointer-events:none;overflow:visible;contain:layout style}
.bakery-settle.show{animation:none}
.settle-token,.settle-result{position:fixed;display:block;width:max-content;max-width:120px;padding:0;border:0;border-radius:0;background:none;color:#8e382b;font-size:18px;font-weight:900;line-height:1;text-shadow:0 2px 0 #fff7e8,2px 0 0 #fff7e8,-2px 0 0 #fff7e8,0 -2px 0 #fff7e8;box-shadow:none;opacity:0;will-change:transform,opacity;white-space:nowrap}
.settle-mult{color:#b34f48}
.settle-result{padding:0;background:none;border:0;color:#8e382b;font-size:21px;box-shadow:none}
.scores>strong.score-punch{animation:bakery-score-punch .34s cubic-bezier(.2,1.5,.4,1)}
@keyframes bakery-score-punch{0%{transform:scale(.92)}48%{transform:scale(1.13)}100%{transform:scale(1)}}
@media(max-width:350px){.bakery-multiplier{width:auto;height:auto}.bakery-multiplier strong{font-size:34px}.settle-token{font-size:16px;padding:0}.settle-result{font-size:18px;padding:0}}
@media(prefers-reduced-motion:reduce){.scores>strong.score-punch{animation:none}.settle-token,.settle-result{transition:none}}

.combo-controls[hidden]{display:none!important}.pause-low{margin:12px 0;color:#856445}


/* r3: minimal hub, score-first play surface, compact overlays. */
[hidden]{display:none!important}
body{background:#f3ede4}
main{width:min(100%,430px);min-height:100svh;background:#fff7e8;overflow:hidden}
.hub-screen{min-height:100svh;padding:42px 24px 28px;background:linear-gradient(180deg,#fff8eb 0,#f7e7d8 100%)}
.hub-header{display:flex;align-items:center;gap:12px;margin:0 0 28px;padding:0}
.hub-header h1{margin:0;font-size:22px;letter-spacing:-.04em}
.hub-mark{position:relative;width:46px;height:40px}
.hub-mark i{position:absolute;width:25px;height:25px;border-radius:50%;background:#efb9aa;border:2px solid #8e382b}
.hub-mark i:nth-child(1){left:1px;top:11px}.hub-mark i:nth-child(2){left:18px;top:11px;background:#e4c174}.hub-mark i:nth-child(3){left:10px;top:0;background:#fff2df}
.game-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.game-card{min-height:156px;padding:18px 14px;border:1px solid #d8bca5;border-radius:20px;background:#fffaf0;color:#47291e;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;text-align:left;box-shadow:0 5px 0 #ead8c8;transition:transform .14s ease,background-color .14s ease,box-shadow .14s ease}
.game-card strong{font-size:16px}.game-card small{margin-top:3px;font-size:10px;color:#8b6b56}
.active-card{cursor:pointer;border-color:#a95a46;background:#fff3df}
.waiting-card{opacity:.62;cursor:default}
.hub-thumbnail{display:block;width:100%;height:auto;aspect-ratio:16/9;margin:0 0 12px;border:1px solid #ead2bb;border-radius:14px;background:#f8e9d8;box-shadow:inset 0 0 0 1px #fff8}
.mini-icon{position:relative;display:block;width:68px;height:60px;margin:auto auto 12px}
.icon-merge i{position:absolute;width:35px;height:35px;border:2px solid #7b412f;border-radius:50%;background:#efb8a8}.icon-merge i:nth-child(1){left:1px;top:22px}.icon-merge i:nth-child(2){left:31px;top:22px;background:#e1bb6f}.icon-merge i:nth-child(3){left:17px;top:2px;background:#fff0dc}
.icon-claw:before,.icon-claw:after{content:'';position:absolute;left:18px;top:11px;width:14px;height:38px;border:3px solid #a77d62;border-top:0;border-radius:0 0 14px 14px;transform:rotate(20deg)}.icon-claw:after{left:36px;transform:rotate(-20deg)}
.icon-press:before{content:'';position:absolute;left:12px;top:8px;width:44px;height:16px;border-radius:8px;background:#c88972;box-shadow:0 25px 0 #e7c8b2}.icon-press:after{content:'';position:absolute;left:31px;top:22px;width:7px;height:20px;background:#8e5d48}
.icon-belt:before{content:'';position:absolute;left:2px;top:28px;width:64px;height:18px;border-radius:9px;background:repeating-linear-gradient(90deg,#d39a7f 0 11px,#f3d3bc 11px 15px)}.icon-belt:after{content:'';position:absolute;left:21px;top:8px;width:28px;height:24px;border-radius:8px 8px 4px 4px;background:#e7bd70;border:2px solid #8e5d48}

.game-shell{min-height:100svh;background:#fff7e8}
.game-header{height:116px;padding:18px 22px 12px;display:flex;align-items:flex-start;justify-content:space-between;background:#f8eadb;border-bottom:1px solid #e3c9b2}
.score-card{width:170px;min-width:170px;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:end;padding:10px 14px;border:1px solid #dfc1a8;border-radius:16px;background:#fffaf0;box-shadow:0 4px 0 #ead5c3;overflow:hidden}
.score-card>span{grid-column:1;font-size:10px;color:#876652;align-self:center}
.score-card>strong{grid-column:1 / 3;font-size:42px;line-height:1;font-variant-numeric:tabular-nums;transform-origin:left center}
.score-card>small{grid-column:1 / 3;margin-top:4px;font-size:10px;color:#876652}
.score-card b{font-weight:600}
.header-actions{display:flex;gap:8px;padding-top:4px}
button.round-control,#pause,#help,#close-help{width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:1px solid #c99c7f;border-radius:50%;background:#fffaf0;color:#6e3b2b;font-size:20px;line-height:1;display:grid;place-items:center;order:initial}
.stage{background:#fff7e8}
#game{display:block;width:100%;height:auto;background:#fff7e8}
#ladder{display:none!important}
.overlay{z-index:30}
.menu,.help-overlay{position:fixed}
.dialog{border:1px solid #d5ad90;border-radius:20px;background:#fff8eb;box-shadow:0 12px 32px #5b312528}
.compact-menu{max-width:280px;padding:22px}
.icon-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.icon-button{width:100%;height:92px;padding:0;border:1px solid #cb9d7f;border-radius:18px;background:#fffaf0;color:#773d2d;font-size:32px;display:grid;place-items:center}
.icon-button.primary{background:#b94734;border-color:#b94734;color:#fff8eb}
.text-button{width:100%;margin-top:14px;padding:12px;border:0;border-radius:12px;background:transparent;color:#6f4938;font-size:13px;text-decoration:underline;text-underline-offset:3px}
.pause-low{display:flex!important;justify-content:center;align-items:center;gap:7px;margin:14px 0 0!important;font-size:10px!important;color:#876652}
.lost-dialog{max-width:250px;text-align:center}.lost-dialog>strong{display:block;margin:4px 0 18px;font-size:46px}.lost-dialog .icon-button{height:78px}
.help-dialog{max-width:330px;padding:20px}
.help-head{display:flex;align-items:center;justify-content:space-between}.help-head h2{margin:0;font-size:28px}
.help-dialog dl{margin:18px 0 2px}.help-dialog dl>div{padding:12px 0;border-top:1px solid #e4cdb8}.help-dialog dt{font-size:12px;font-weight:900;color:#9a402f}.help-dialog dd{margin:5px 0 0;font-size:12px;line-height:1.55;color:#654738}
#error{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:40;padding:9px 12px;border-radius:9px;background:#fff0e8}
.score-card>strong.rolling{display:inline-flex;align-items:flex-start;height:1em;overflow:hidden;white-space:nowrap}
.score-card>strong.score-punch{animation:bakery-score-punch .34s cubic-bezier(.2,1.5,.4,1)}

button{transition:transform .12s ease,background-color .12s ease,border-color .12s ease,box-shadow .12s ease}
button:active{transform:scale(.94)}
button:focus-visible{outline:3px solid #b94734;outline-offset:3px}
@media(hover:hover){
 button:not([disabled]):hover{transform:translateY(-2px);background-color:#fff0df}
 .active-card:hover{background:#ffe8cc;box-shadow:0 7px 0 #dfc6b2}
 .icon-button.primary:hover{background:#a83d2e}
}
@media(max-width:350px){
 .hub-screen{padding:28px 18px 24px}.game-card{min-height:138px;padding:15px 12px}.game-header{height:108px;padding:14px 18px 10px}.score-card{width:164px;min-width:164px;padding:9px 12px}.score-card>strong{font-size:32px}.header-actions{gap:6px}button.round-control,#pause,#help,#close-help{width:42px;height:42px;min-width:42px;min-height:42px}.settle-token{font-size:16px}.settle-result{font-size:18px}
}
@media(prefers-reduced-motion:reduce){
 button,.game-card{transition:none!important}.scores>strong.score-punch,.score-card>strong.score-punch{animation:none}
}


/* r4: readable slot equation, soft steam and compact dimensional menu controls. */
:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR","Malgun Gothic",sans-serif}
.compact-menu{max-width:250px;padding:18px;border-color:#c98d6e;background:linear-gradient(180deg,#fffaf0,#f7e4d3);box-shadow:0 10px 0 #9d5b4233,0 18px 36px #57302425,inset 0 1px 0 #fff}
.compact-menu .icon-actions{gap:10px}
.compact-menu .icon-button{height:68px;min-height:44px;border:1px solid #b97558;border-radius:15px;background:linear-gradient(180deg,#fffdf7,#f0d8c2);box-shadow:0 5px 0 #b97c5d,inset 0 2px 0 #fff;color:#723725;font-size:25px;text-shadow:0 1px 0 #fff}
.compact-menu .icon-button.primary{background:linear-gradient(180deg,#d9523d,#b83226);border-color:#9f2d22;color:#fff9ef;box-shadow:0 5px 0 #84261d,inset 0 2px 0 #ed806b;text-shadow:0 1px 0 #762219}
.compact-menu .icon-button:active{transform:translateY(3px) scale(.98);box-shadow:0 2px 0 #9b5d44,inset 0 1px 0 #fff}
.compact-menu .text-button{margin-top:11px;padding:10px}
.compact-menu .pause-low{margin-top:9px!important}

.bakery-multiplier{--combo-color:hsl(35 72% 43%);--combo-size:38px;--combo-glow:5px;width:132px;height:88px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;filter:none;backdrop-filter:none;color:var(--combo-color);text-shadow:0 2px 0 #fff7e8,0 0 var(--combo-glow) #ffd98a;will-change:transform,opacity}
.bakery-multiplier small{display:block;margin:0;color:currentColor;font-size:11px;font-weight:900;letter-spacing:.08em;line-height:1}
.bakery-multiplier strong{display:flex;height:1em;overflow:hidden;color:currentColor;font-size:var(--combo-size);font-weight:950;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap}
.bakery-multiplier strong:before{content:'×';display:block;height:1em;line-height:1;margin-right:2px}
.formula-card{position:fixed;width:132px;height:96px;padding:11px 12px;border:1px solid #a86147;border-radius:17px;background:linear-gradient(160deg,#fffaf0,#f2d1ba);box-shadow:0 7px 0 #b97657,inset 0 2px 0 #fff,0 14px 28px #6b392726;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#793124;opacity:0;will-change:transform,opacity}
.formula-card small{font-size:11px;font-weight:800;line-height:1;letter-spacing:.02em;color:#8e513d;white-space:nowrap}
.formula-card strong{display:flex;height:1em;overflow:hidden;font-size:38px;font-weight:900;line-height:1;font-variant-numeric:tabular-nums;text-shadow:0 1px 0 #fff;white-space:nowrap}
.formula-base{background:linear-gradient(160deg,#fffaf0,#f2deaa);border-color:#a77946;box-shadow:0 7px 0 #b68a50,inset 0 2px 0 #fff,0 14px 28px #6b392726}
.formula-result{width:154px;height:92px;background:linear-gradient(160deg,#b74b38,#8f2e25);border-color:#74231d;color:#fff8e8;box-shadow:0 8px 0 #70251e,inset 0 2px 0 #e77f67,0 16px 30px #5b282837}
.formula-result small{color:#ffe8cf}.formula-result strong{color:#fff9ea;text-shadow:0 1px 0 #6d201b}
.formula-sign{position:fixed;width:30px;height:30px;display:grid;place-items:center;color:#7f3024;font-size:30px;font-weight:900;line-height:1;opacity:0;text-shadow:0 2px 0 #fff7e8;will-change:transform,opacity}
.formula-carry{position:fixed;padding:5px 9px;border:1px solid #c99878;border-radius:999px;background:#fff8e9;color:#82513d;font-size:10px;font-weight:800;box-shadow:0 3px 0 #d5ad91;opacity:0;white-space:nowrap;will-change:transform,opacity}
.formula-slots{display:flex!important;align-items:flex-start;height:1em;overflow:hidden}
.formula-slot-column{display:block;width:.62em;height:1em;overflow:hidden}
.formula-slot-track{display:flex;flex-direction:column;will-change:transform}
.formula-slot-track>span{display:block;height:1em;line-height:1em;text-align:center}
@media(max-width:350px){
 .bakery-multiplier{width:116px;height:82px;padding:0}.bakery-multiplier small{font-size:10px}.bakery-multiplier strong{font-size:min(var(--combo-size),44px)}
 .formula-card{width:112px;height:88px;padding:9px 8px;border-radius:15px;gap:5px}.formula-card small{font-size:10px}.formula-card strong{font-size:32px}.formula-result{width:136px;height:84px}.formula-sign{font-size:25px;width:25px;height:25px}
}

/* Golden completion: snapshot-only bonus settlement over the frozen board. */
.victory-overlay{position:fixed;inset:0;z-index:32;display:grid;place-items:center;padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));background:linear-gradient(180deg,#fff7d614,#5b2f2038);pointer-events:none;overflow:hidden}
.victory-overlay[hidden]{display:none}
.victory-card{position:relative;z-index:2;width:min(100%,320px);padding:22px 18px 18px;border:1px solid #a86b32;border-radius:22px;background:linear-gradient(155deg,#fffdf0 0%,#f4d788 72%,#d99a45 100%);box-shadow:0 8px 0 #965929,inset 0 2px 0 #fff8c9,0 22px 44px #4d2a1f45;text-align:center;color:#61341f;animation:victory-card-in .52s cubic-bezier(.2,1.35,.35,1) both}
.victory-gold-mark{display:grid;place-items:center;width:68px;height:50px;margin:-48px auto 12px;border:2px solid #865225;border-radius:48% 52% 46% 54%;background:radial-gradient(circle at 35% 26%,#fff8c1 0 10%,transparent 11%),linear-gradient(145deg,#f7dc78,#c8832d);box-shadow:0 5px 0 #875026,0 0 0 7px #fff2ad99;transform:rotate(-4deg)}
.victory-gold-mark:before,.victory-gold-mark:after,.victory-gold-mark i{content:'';display:block;position:absolute;width:7px;height:7px;border:2px solid #91602f;border-radius:50%;background:#f7e3a0}
.victory-gold-mark:before{transform:translate(-17px,-8px)}.victory-gold-mark:after{transform:translate(14px,8px)}.victory-gold-mark i{transform:translate(5px,-13px)}
.victory-card h2{max-width:270px;margin:0 auto 4px;font-size:22px;line-height:1.25;word-break:keep-all}.victory-card>p{margin:0;color:#76513a;font-size:13px;line-height:1.45;word-break:keep-all}
.victory-status{display:block;min-height:18px;margin:14px 0 6px;font-size:12px;color:#8f3e28}
.victory-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:0;padding:0;list-style:none;text-align:left}
.victory-summary:empty{display:none}.victory-summary li{padding:5px 7px;border:1px solid #bc814d;border-radius:9px;background:#fff9ddc9;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.victory-total{display:block;margin:12px 0 0;font-size:27px;line-height:1.05;color:#8c3424;font-variant-numeric:tabular-nums}
.victory-actions{grid-template-columns:68px 1fr;gap:10px;margin-top:16px;pointer-events:auto}.victory-actions:not([hidden]){display:grid}.victory-actions button{min-width:44px;min-height:48px}.victory-card.victory-final{box-shadow:0 8px 0 #965929,inset 0 2px 0 #fff8c9,0 0 34px #ffd35a88,0 22px 44px #4d2a1f45}
.victory-bonus-pop{position:fixed;z-index:4;transform:translate(-50%,-50%);padding:4px 8px;border:1px solid #9c5a2d;border-radius:999px;background:#fff8d8;color:#9b3827;font-size:19px;font-weight:900;line-height:1;box-shadow:0 3px 0 #b87939,0 5px 14px #57301f38;text-shadow:0 1px #fff;animation:victory-bonus-pop .82s ease both;pointer-events:none}
.victory-total-token{position:fixed;z-index:120;padding:7px 12px;border:1px solid #9c5a2d;border-radius:999px;background:#fff3ad;color:#8c3424;font-size:24px;font-weight:900;line-height:1;box-shadow:0 4px 0 #a96932;pointer-events:none}
@keyframes victory-card-in{0%{opacity:0;transform:translateY(18px) scale(.92)}70%{opacity:1;transform:translateY(-3px) scale(1.02)}100%{opacity:1;transform:none}}
@keyframes victory-bonus-pop{0%{opacity:0;transform:translate(-50%,-20%) scale(.7)}22%,68%{opacity:1;transform:translate(-50%,-65%) scale(1)}100%{opacity:0;transform:translate(-50%,-135%) scale(.9)}}
@media(max-width:350px){.victory-overlay{padding:13px}.victory-card{padding:19px 13px 14px;border-radius:18px}.victory-card h2{font-size:19px}.victory-card>p{font-size:12px}.victory-summary{gap:3px}.victory-summary li{font-size:9px;padding:4px 5px}.victory-total{font-size:24px}.victory-actions{margin-top:12px}.victory-bonus-pop{font-size:17px}}
@media(prefers-reduced-motion:reduce){.victory-card,.victory-bonus-pop{animation:none}}
.victory-overlay[data-motion="reduced"] .victory-card,.victory-overlay[data-motion="reduced"] .victory-bonus-pop{animation:none}

/* Fit the unchanged 430×650 board into the live mobile viewport. */
html.game-active,body.game-active{width:100%;height:100dvh;overflow:hidden;overscroll-behavior:none}
body.game-active{position:fixed;inset:0;touch-action:none}
.game-shell{height:100dvh;min-height:0;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);display:grid;grid-template-rows:50px 116px minmax(0,1fr);overflow:hidden}
.game-shell>.awning{height:50px}
.game-shell>.game-header{height:116px}
.game-shell>.stage{place-self:center;width:min(100%,calc((100dvh - 166px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*430/650));aspect-ratio:430/650;min-width:0;min-height:0;overflow:hidden}
.game-shell>.stage>#game{width:100%;height:100%}
.menu,.help-overlay{padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));overscroll-behavior:contain}
.help-dialog{max-height:calc(100dvh - max(36px,env(safe-area-inset-top) + env(safe-area-inset-bottom)));overflow:auto}
.compact-menu .text-button{min-height:44px}button.round-control,#pause,#help,#close-help{width:44px;height:44px;min-width:44px;min-height:44px}
@media(max-width:600px),(max-height:780px){
 .game-shell{grid-template-rows:32px clamp(82px,16dvh,104px) minmax(0,1fr)}.game-shell>.awning{height:32px}
 .game-shell>.game-header{height:clamp(82px,16dvh,104px);padding:10px 14px 8px;align-items:center}
 .score-card{width:154px;min-width:154px;padding:7px 10px}.score-card>strong{font-size:clamp(28px,8dvh,36px)}.score-card>small{font-size:9px}
 .game-shell>.stage{width:min(100%,calc((100dvh - 32px - clamp(82px,16dvh,104px) - env(safe-area-inset-top) - env(safe-area-inset-bottom))*430/650))}
}
@media(max-height:500px) and (orientation:landscape){
 .game-shell{grid-template-rows:20px 64px minmax(0,1fr)}.game-shell>.awning{height:20px}.game-shell>.game-header{height:64px;padding:4px 12px}.score-card{padding:3px 9px}.score-card>strong{font-size:24px}.score-card>small{font-size:8px}.header-actions{padding-top:0}
 .game-shell>.stage{width:min(100%,calc((100dvh - 84px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*430/650))}
 .victory-overlay{padding:8px}.victory-card{width:min(100%,410px);padding:10px 12px 9px}.victory-gold-mark{width:46px;height:34px;margin:-24px auto 5px}.victory-card h2{font-size:16px;max-width:none}.victory-card>p{font-size:10px}.victory-status{margin:5px 0 3px;min-height:13px;font-size:10px}.victory-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:2px}.victory-summary li{padding:2px 4px;font-size:8px}.victory-total{margin-top:5px;font-size:19px}.victory-actions{margin-top:6px;grid-template-columns:54px 1fr}.victory-actions button{height:44px;min-height:44px}
}

/* Reference v3 motion, fitted to the approved blue/red/yellow/gold score layout. */
.score-formula-row{position:relative}
.score-flow{--tier-n:0;--hero-width:30%;--hero-from-x:.95;--hero-from-y:.47}
.score-flow[data-tier="T1"]{--tier-n:1}.score-flow[data-tier="T2"]{--tier-n:2;--hero-width:53%;--hero-from-x:.56}.score-flow[data-tier="T3"]{--tier-n:3;--hero-width:72%;--hero-from-x:.41}.score-flow[data-tier="T4"]{--tier-n:4;--hero-width:86%;--hero-from-x:.34}.score-flow[data-tier="T5"]{--tier-n:5;--hero-width:95%;--hero-from-x:.31}
.score-climax{position:absolute;z-index:5;left:auto;right:0;top:0;bottom:auto;width:var(--hero-width);height:84px;transform-origin:right center}
.score-flow.reference-read[data-phase="read"] .base-sector{animation:reference-read-base .36s ease both}
.score-flow.reference-read[data-phase="read"] .mult-sector{animation:reference-read-mult .36s ease both}
.score-flow.reference-read[data-phase="read"] .gain-sector{animation:reference-read-gain .36s ease both}
.score-flow[data-phase="squeeze"] .base-sector{animation:reference-charge-base var(--charge-duration,.2s) cubic-bezier(.65,0,.35,1) both}
.score-flow[data-phase="squeeze"] .mult-sector{animation:reference-charge-mult var(--charge-duration,.2s) cubic-bezier(.65,0,.35,1) both}
.score-flow[data-phase="squeeze"] .gain-sector{animation:reference-charge-gain var(--charge-duration,.2s) cubic-bezier(.65,0,.35,1) both}
.score-flow[data-phase="impact"] .score-climax{animation:reference-hero-pop var(--pop-duration,.25s) cubic-bezier(.16,1,.3,1) both}
.score-flow[data-phase="hold"] .score-climax{animation:reference-hero-dock var(--dock-duration,.25s) cubic-bezier(.65,0,.35,1) both}
.score-flow:is([data-tier="T2"],[data-tier="T3"],[data-tier="T4"],[data-tier="T5"]):is([data-phase="impact"],[data-phase="hold"]) .base-sector,
.score-flow:is([data-tier="T2"],[data-tier="T3"],[data-tier="T4"],[data-tier="T5"]):is([data-phase="impact"],[data-phase="hold"]) .mult-sector{opacity:.05}
.score-flow:is([data-tier="T2"],[data-tier="T3"],[data-tier="T4"],[data-tier="T5"]):is([data-phase="impact"],[data-phase="hold"]) .gain-sector{opacity:0}
@keyframes reference-read-base{0%,100%{transform:none}28%{transform:scale(1.025,.975)}55%{transform:scale(1.035,.965)}}
@keyframes reference-read-mult{0%,100%{transform:none}28%{transform:scale(1,.96)}55%{transform:scale(1,1.038)}}
@keyframes reference-read-gain{0%,54%{transform:none}76%{transform:scale(1.05,1.10)}100%{transform:none}}
@keyframes reference-charge-base{0%{transform:none}42%{transform:translateX(calc(var(--impact-k)*.45px)) translateY(calc(var(--impact-k)*.75px)) scale(1.04,.94)}54%{transform:translateX(calc(var(--impact-k)*-.18px)) translateY(calc(var(--impact-k)*.75px)) scale(1.05,.92)}100%{transform:translateX(calc(var(--impact-k)*.75px)) translateY(calc(var(--impact-k)*.75px)) scale(1.075,calc(.90 - var(--impact-k)*.01)) rotate(1.5deg)}}
@keyframes reference-charge-mult{0%{transform:none}42%{transform:translateX(calc(var(--impact-k)*-.45px)) translateY(calc(var(--impact-k)*.75px)) scale(1.04,.94)}54%{transform:translateX(calc(var(--impact-k)*.18px)) translateY(calc(var(--impact-k)*.75px)) scale(1.05,.92)}100%{transform:translateX(calc(var(--impact-k)*-.75px)) translateY(calc(var(--impact-k)*.75px)) scale(1.075,calc(.90 - var(--impact-k)*.01)) rotate(-1.5deg)}}
@keyframes reference-charge-gain{0%{transform:none}100%{transform:scale(1.04,.86)}}
@keyframes reference-hero-pop{0%{opacity:1;transform:translateY(calc(18px + var(--tier-n)*1.5px)) scale(var(--hero-from-x),var(--hero-from-y))}58%{opacity:1;transform:translateY(-3px) scale(calc(1.035 + var(--tier-n)*.015),calc(1.06 + var(--tier-n)*.04))}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes reference-hero-dock{0%{opacity:1;transform:scale(1)}100%{opacity:1;transform:scale(var(--hero-from-x),.72)}}
@media(max-width:390px){.score-climax{height:76px}}
@media(max-height:500px) and (orientation:landscape){.score-climax{height:48px}}

/* Local sensory comparison controls and stronger score cadence. */
.game-toolbar{justify-content:flex-end}.score-sector{justify-content:center}.score-sector>span{margin-bottom:4px}
.sensory-panel{position:fixed;z-index:40;left:16px;top:16px;width:190px;padding:10px;display:grid;grid-template-columns:1fr 1fr;gap:7px;border:1px solid #d8b59d;border-radius:15px;background:#fffaf0ee;box-shadow:0 10px 30px #71412f2b;backdrop-filter:blur(6px);font-size:11px;color:#674033}.sensory-panel[hidden]{display:none}.sensory-panel>div:first-child,.sensory-panel>small,.sensory-panel>#sensory-merge-demo{grid-column:1/-1}.sensory-panel>div:first-child{display:flex;align-items:center;justify-content:space-between}.sensory-panel label{display:flex;gap:5px;align-items:center;white-space:nowrap}.sensory-panel button{min-height:34px;border:1px solid #d8b59d;border-radius:9px;background:#fff5e3;color:#673c2d;font:inherit;font-weight:800}.sensory-panel #sensory-close{width:32px}.sensory-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,1fr);gap:3px}.sensory-actions button{padding:2px}.sensory-panel>small{line-height:1.35;color:#9a7664}
.score-flow[data-fx="on"]{--sensory-k:0}.score-flow[data-fx="on"][data-tier="T1"]{--sensory-k:1}.score-flow[data-fx="on"][data-tier="T2"]{--sensory-k:2}.score-flow[data-fx="on"][data-tier="T3"]{--sensory-k:3}.score-flow[data-fx="on"][data-tier="T4"]{--sensory-k:4}.score-flow[data-fx="on"][data-tier="T5"]{--sensory-k:5}
.score-flow[data-fx="on"][data-phase="squeeze"] .base-sector{transform:translateX(calc(var(--impact-k,0)*1.2px)) scale(calc(1 + var(--impact-k,0)*.006),calc(1 - var(--impact-k,0)*.026));filter:saturate(calc(1 + var(--impact-k,0)*.05))}.score-flow[data-fx="on"][data-phase="squeeze"] .mult-sector{transform:translateX(calc(var(--impact-k,0)*.8px)) scale(calc(1 + var(--impact-k,0)*.009),calc(1 - var(--impact-k,0)*.03))}.score-flow[data-fx="on"][data-phase="squeeze"] .gain-sector{transform:scale(calc(1 - var(--impact-k,0)*.012),calc(1 + var(--impact-k,0)*.025));box-shadow:0 3px 0 #d1bb73,inset 0 1px 0 #fff,0 0 calc(var(--impact-k,0)*5px) #edc64e78}
.score-flow[data-fx="on"][data-phase="impact"]{animation:sensory-score-impact calc(150ms + var(--impact-k,0)*22ms) cubic-bezier(.16,1.25,.28,1)}.score-flow[data-fx="on"][data-phase="impact"] .gain-sector,.score-flow[data-fx="on"][data-phase="hold"] .gain-sector{transform:scale(calc(1.02 + var(--impact-k,0)*.022),calc(1.03 + var(--impact-k,0)*.018));filter:brightness(calc(1.02 + var(--impact-k,0)*.035))}.score-flow[data-fx="on"][data-phase="impact"] .score-climax{transform:scale(calc(var(--climax-scale,1) + var(--impact-k,0)*.012));box-shadow:0 calc(3px + var(--impact-k,0)*1px) 0 #b98a2f,inset 0 1px 0 #fffbe5,0 0 calc(8px + var(--impact-k,0)*6px) #f2bf5c99}
.total-sector[data-arrival-tier="T1"].arrival{--arrival-punch:1.07}.total-sector[data-arrival-tier="T2"].arrival{--arrival-punch:1.10}.total-sector[data-arrival-tier="T3"].arrival{--arrival-punch:1.13}.total-sector[data-arrival-tier="T4"].arrival{--arrival-punch:1.17}.total-sector[data-arrival-tier="T5"].arrival{--arrival-punch:1.21;filter:brightness(1.1) saturate(1.12);box-shadow:0 4px 0 #ad7622,inset 0 1px 0 #fff8c9,0 0 20px #f0b83c99}
.total-sector.arrival{animation:sensory-total-arrival .46s cubic-bezier(.16,1.5,.28,1)}
@keyframes sensory-score-impact{0%{transform:scale(.985);filter:brightness(1)}45%{transform:scale(calc(1 + var(--impact-k,0)*.004));filter:brightness(calc(1.02 + var(--impact-k,0)*.025))}100%{transform:none;filter:none}}@keyframes sensory-total-arrival{0%{transform:scale(.94,.88)}42%{transform:scale(var(--arrival-punch,1.08),.93)}100%{transform:none}}
@media(max-width:700px){.sensory-panel{left:8px;right:8px;top:auto;bottom:8px;width:auto;grid-template-columns:repeat(3,1fr);padding:8px}.sensory-panel>div:first-child,.sensory-panel>small,.sensory-panel>#sensory-merge-demo,.sensory-actions{grid-column:1/-1}.sensory-panel button{min-height:40px}.score-sector>span{margin-bottom:2px}}

.danger-countdown{position:absolute;z-index:6;left:50%;top:calc(100% * 150 / 650);display:block;color:var(--danger-color);pointer-events:none;transform:translate(-50%,-100%) scale(var(--danger-scale));transform-origin:center bottom;text-align:center;filter:drop-shadow(0 2px 0 #fff8e9) drop-shadow(0 3px 5px #5b2c1f40)}
.danger-countdown[hidden]{display:none}.danger-countdown strong{display:block;font-size:45px;line-height:.92;font-weight:950;font-variant-numeric:tabular-nums}
.danger-countdown[data-level="warning"]{animation:danger-pulse .9s ease-in-out infinite}.danger-countdown[data-level="critical"]{animation:danger-rattle .48s ease-in-out infinite}
.danger-countdown[data-motion="reduced"]{animation:none}
@keyframes danger-pulse{50%{transform:translate(-50%,-100%) scale(calc(var(--danger-scale) + .045))}}

/* Score flow R3: all settlement cards stay in the header, outside the playfield. */
.game-header{height:148px;padding:7px 10px 8px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:5px;background:linear-gradient(180deg,#fff9ef,#f2dfcc);overflow:visible}
.game-toolbar{height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.game-toolbar>div:first-child{display:flex;flex-direction:column;min-width:0}.game-toolbar strong{font-size:12px;line-height:1.1;color:#673c2d}.game-toolbar small{margin-top:3px;font-size:8px;color:#a17f63;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.header-actions{padding:0;gap:6px;flex:none}.header-actions button.round-control,#pause,#help{width:44px;height:44px;min-width:44px;min-height:44px;font-size:18px;background:#fffaf0}
.score-flow{position:relative;height:84px;display:grid;grid-template-columns:minmax(52px,1fr) 11px minmax(47px,.86fr) 11px minmax(67px,1.12fr) minmax(76px,1.18fr);gap:3px;align-items:stretch;min-width:0;isolation:isolate}
.score-sector{position:relative;min-width:0;padding:7px 5px 6px;border:1px solid #dec3a4;border-radius:13px;background:linear-gradient(150deg,#fffdf6,#f0dcc2);box-shadow:0 3px 0 #dbc0a1,inset 0 1px 0 #fff;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;transform-origin:50% 72%;will-change:transform}
.score-sector>span{font-size:7px;line-height:1.1;font-weight:800;color:#8e7055;white-space:nowrap}.score-sector>strong{display:block;max-width:100%;font-size:23px;line-height:1.08;font-weight:950;letter-spacing:-1px;color:#71412f;font-variant-numeric:tabular-nums;white-space:nowrap}.score-sector>small{display:block;max-width:100%;margin-top:3px;font-size:6px;line-height:1.1;color:#a88869;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.score-sector b{font-weight:800}
.mult-sector{background:linear-gradient(150deg,#fff5ee,#ecc8b9);border-color:#d6a68f}.mult-sector>strong{color:#a13f30}.gain-sector{background:linear-gradient(150deg,#fffce9,#f1d78f);border-color:#d2aa69}.gain-sector>strong{color:#9c3d28}.total-sector{margin-left:2px;background:linear-gradient(150deg,#fffdf5,#ecd4b9);border-color:#cda581;text-align:right;align-items:flex-end;padding-left:4px;padding-right:7px;z-index:6}.total-sector>strong{font-size:24px;color:#61392b;transform-origin:right center}.total-sector>small{font-size:6px}.flow-op{display:grid;place-items:center;color:#b39273;font:700 18px/1 Georgia,serif}
.score-sector[data-digits="7"]>strong,.score-sector[data-digits="8"]>strong{font-size:18px;letter-spacing:-2px}.total-sector[data-digits="7"]>strong,.total-sector[data-digits="8"]>strong{font-size:19px;letter-spacing:-1.5px}
.score-climax{position:absolute;z-index:5;left:0;right:25%;top:0;bottom:0;border:1px solid #c98c43;border-radius:14px;background:linear-gradient(145deg,#fff9dd,#efc56c);box-shadow:0 5px 0 #bf8648,inset 0 1px 0 #fff7ce,0 10px 22px #9b5b252b;display:flex;flex-direction:column;align-items:center;justify-content:center;opacity:0;transform:scale(.7,.5);pointer-events:none;will-change:transform,opacity}
.score-climax small{font-size:7px;font-weight:900;letter-spacing:.08em;color:#a16b31}.score-climax strong{font-size:34px;line-height:1;font-weight:950;letter-spacing:-1.5px;color:#963b27;font-variant-numeric:tabular-nums;white-space:nowrap}.score-climax span{min-height:8px;margin-top:3px;font-size:6px;color:#9c714b}
.score-flow[data-phase="impact"] .score-climax,.score-flow[data-phase="hold"] .score-climax{opacity:1;transform:scale(var(--climax-scale,1))}
.score-flow[data-tier="T0"] .score-climax,.score-flow[data-tier="T1"] .score-climax{display:none}.score-flow[data-tier="T3"] .score-climax{--climax-scale:1.035}.score-flow[data-tier="T4"] .score-climax{--climax-scale:1.075;background:linear-gradient(145deg,#fff0b7,#dda24c);box-shadow:0 6px 0 #a86936,inset 0 1px 0 #fff6cb,0 0 20px #f0bc5c70}.score-flow[data-tier="T5"] .score-climax{--climax-scale:1.11;right:23%;background:linear-gradient(145deg,#a8432d,#7f2d22);border-color:#e8bd68;box-shadow:0 7px 0 #67251d,inset 0 1px 0 #ffd88c,0 0 26px #f2bf5c88}.score-flow[data-tier="T5"] .score-climax small,.score-flow[data-tier="T5"] .score-climax span{color:#f1cc8e}.score-flow[data-tier="T5"] .score-climax strong{font-size:39px;color:#fff0b7;text-shadow:0 2px 0 #5d2119}
.score-flight{position:absolute;z-index:8;left:0;top:0;opacity:0;color:#a13f2e;font-size:25px;line-height:1;font-weight:950;letter-spacing:-1px;white-space:nowrap;text-shadow:0 2px 0 #fff8e9,2px 0 0 #fff8e9,-2px 0 0 #fff8e9;pointer-events:none;will-change:transform,opacity}
.score-flow[data-phase="squeeze"] .base-sector,.score-flow[data-phase="squeeze"] .mult-sector{transform:scale(1.04,.88)}.score-flow[data-phase="squeeze"] .gain-sector{transform:scale(.93,1.08)}
.score-flow[data-phase="impact"] .gain-sector,.score-flow[data-phase="hold"] .gain-sector{transform:scale(1.05,1.12)}
.score-sector.sector-pop{animation:score-sector-pop .34s cubic-bezier(.2,1.45,.35,1)}.total-sector.arrival{animation:score-total-arrival .42s cubic-bezier(.2,1.55,.35,1)}
@keyframes score-sector-pop{0%{transform:scale(.92)}55%{transform:scale(1.1,.94)}100%{transform:none}}@keyframes score-total-arrival{0%{transform:scale(.92)}45%{transform:scale(1.12,.94)}100%{transform:none}}
.score-sector.number-hit{animation:score-number-hit .44s cubic-bezier(.16,1.42,.28,1)}.base-sector.number-hit{--number-hit-glow:#4c91df88}.mult-sector.number-hit{--number-hit-glow:#d244448f}.gain-sector.number-hit{--number-hit-glow:#d6a8208f}
@keyframes score-number-hit{0%{transform:scale(.97);filter:brightness(1)}42%{transform:scale(var(--number-hit-scale,1.1)) rotate(var(--number-hit-tilt,0deg));filter:brightness(1.13);box-shadow:0 4px 0 color-mix(in srgb,var(--number-hit-glow) 60%,#8f6546),0 0 18px var(--number-hit-glow),inset 0 1px 0 #fff}100%{transform:none;filter:none}}
.score-flow[data-phase="impact"] .score-climax{animation:score-climax-hit .38s cubic-bezier(.16,1.38,.28,1)}
@keyframes score-climax-hit{0%{transform:translateY(7px) scale(var(--climax-scale,1));filter:brightness(1)}48%{transform:translateY(-3px) scale(calc(var(--climax-scale,1) + .02));filter:brightness(1.14)}100%{transform:translateY(0) scale(var(--climax-scale,1));filter:none}}
.pause-settings{display:grid;grid-template-columns:1fr 1fr;gap:6px}.pause-settings .pause-low{margin-top:9px!important;padding:6px 2px;border:1px solid #dfbfa7;border-radius:9px;background:#fff8ef}
#bakeryFx>.bakery-multiplier,#bakeryFx>.bakery-settle{display:none!important}

/* Preserve the fixed viewport while allocating more vertical space to the readable header. */
.game-shell{grid-template-rows:32px 148px minmax(0,1fr)}.game-shell>.awning{height:32px}.game-shell>.game-header{height:148px}.game-shell>.stage{width:min(100%,calc((100dvh - 180px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*430/650))}
@media(max-width:390px){
 .game-header{height:136px;padding:5px 7px 6px;gap:3px}.game-toolbar{height:44px}.game-toolbar strong{font-size:10px}.game-toolbar small{font-size:7px}.score-flow{height:78px;grid-template-columns:minmax(44px,1fr) 8px minmax(40px,.84fr) 8px minmax(59px,1.12fr) minmax(66px,1.18fr);gap:2px}.score-sector{padding:5px 3px 4px;border-radius:11px}.score-sector>span{font-size:6px}.score-sector>strong{font-size:20px}.score-sector>small{font-size:5.5px}.flow-op{font-size:15px}.total-sector>strong{font-size:21px}.score-sector[data-digits="7"]>strong,.score-sector[data-digits="8"]>strong,.total-sector[data-digits="7"]>strong,.total-sector[data-digits="8"]>strong{font-size:16px}.score-climax strong{font-size:29px}.score-flow[data-tier="T5"] .score-climax strong{font-size:32px}.score-flight{font-size:21px}
 .game-shell{grid-template-rows:28px 136px minmax(0,1fr)}.game-shell>.awning{height:28px}.game-shell>.game-header{height:136px}.game-shell>.stage{width:min(100%,calc((100dvh - 164px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*430/650))}
}
@media(max-height:500px) and (orientation:landscape){
 .game-header{height:112px;padding:3px 8px 5px;gap:2px}.game-toolbar{height:44px}.game-toolbar>div:first-child{display:none}.score-flow{height:58px;grid-template-columns:minmax(42px,1fr) 8px minmax(38px,.82fr) 8px minmax(58px,1.08fr) minmax(66px,1.12fr)}.score-sector{padding:3px;border-radius:9px}.score-sector>span{font-size:5.5px}.score-sector>strong{font-size:18px}.score-sector>small{font-size:5px;margin-top:1px}.total-sector>strong{font-size:19px}.score-climax strong{font-size:26px}.score-flow[data-tier="T5"] .score-climax strong{font-size:29px}
 .game-shell{grid-template-rows:14px 112px minmax(0,1fr)}.game-shell>.awning{height:14px}.game-shell>.game-header{height:112px}.game-shell>.stage{width:min(100%,calc((100dvh - 126px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*430/650))}
}
@media(prefers-reduced-motion:reduce){.score-sector,.score-climax,.score-flight{transition:none!important;animation:none!important}.score-flow[data-phase="squeeze"] .score-sector{transform:none}}
@keyframes danger-rattle{0%,100%{transform:translate(-50%,-100%) scale(var(--danger-scale))}35%{transform:translate(calc(-50% - 1px),-100%) scale(calc(var(--danger-scale) + .03))}70%{transform:translate(calc(-50% + 1px),-100%) scale(var(--danger-scale))}}
@media(max-width:350px){.danger-countdown strong{font-size:39px}}
@media(prefers-reduced-motion:reduce){.danger-countdown{animation:none!important}}
@media(prefers-reduced-motion:reduce){.compact-menu .icon-button{transition:none}.formula-card,.formula-sign,.formula-carry{will-change:auto}}

/* Original game modes share one readable HUD and one dynamic-viewport board. */
:root{--app-height:100dvh;--game-bottom-gap:calc(16px + env(safe-area-inset-bottom))}
html.game-active,body.game-active{height:var(--app-height,100dvh)}
.game-shell{height:var(--app-height,100dvh);padding-bottom:0;grid-template-rows:32px 148px minmax(0,1fr) var(--game-bottom-gap)}
.game-shell>.stage{place-self:start center;width:min(100%,calc((var(--app-height,100dvh) - 180px - var(--game-bottom-gap) - env(safe-area-inset-top))*430/650))}
.score-sector>span{font-size:10px}.score-sector>strong{font-size:31px}.score-sector>small{font-size:8.5px}.total-sector>strong{font-size:32px}.total-sector>small{font-size:8px}
.score-sector[data-digits="7"]>strong,.score-sector[data-digits="8"]>strong{font-size:20px}.total-sector[data-digits="7"]>strong,.total-sector[data-digits="8"]>strong{font-size:21px}
body.sling-aiming{cursor:grabbing}
@media(max-width:390px){
 .game-shell{grid-template-rows:28px 136px minmax(0,1fr) var(--game-bottom-gap)}
 .game-shell>.stage{width:min(100%,calc((var(--app-height,100dvh) - 164px - var(--game-bottom-gap) - env(safe-area-inset-top))*430/650))}
 .score-sector>span{font-size:8px}.score-sector>strong{font-size:25px}.score-sector>small{font-size:7px}.total-sector>strong{font-size:26px}.total-sector>small{font-size:7px}
 .score-sector[data-digits="7"]>strong,.score-sector[data-digits="8"]>strong,.total-sector[data-digits="7"]>strong,.total-sector[data-digits="8"]>strong{font-size:17px}
}
@media(max-height:500px) and (orientation:landscape){
 .game-shell{grid-template-rows:14px 112px minmax(0,1fr) var(--game-bottom-gap)}
 .game-shell>.stage{width:min(100%,calc((var(--app-height,100dvh) - 126px - var(--game-bottom-gap) - env(safe-area-inset-top))*430/650))}
 .score-sector>span{font-size:7px}.score-sector>strong{font-size:20px}.score-sector>small{font-size:6px}.total-sector>strong{font-size:21px}.total-sector>small{font-size:6px}
}

/* Final score hierarchy: gold total above the blue × red = pale-yellow formula. */
.game-header{height:198px;padding:6px 10px 8px;gap:4px}.game-toolbar{height:44px}.score-flow{height:136px;display:flex;flex-direction:column;gap:12px;isolation:isolate}
.score-formula-row{height:84px;display:grid;grid-template-columns:minmax(0,1fr) 19px minmax(0,.92fr) 19px minmax(0,1.12fr);gap:4px;align-items:stretch}
.score-formula-row>.score-sector{height:84px}.flow-op{font-size:25px;font-weight:950;color:#633928;text-shadow:0 1px 0 #fff}
.score-formula-row>.base-sector{grid-column:1;grid-row:1}.score-formula-row>.flow-op:nth-child(2){grid-column:2;grid-row:1}.score-formula-row>.mult-sector{grid-column:3;grid-row:1}.score-formula-row>.flow-op:nth-child(4){grid-column:4;grid-row:1}.score-formula-row>.gain-sector{grid-column:5;grid-row:1}
.total-sector{order:-1;width:100%;height:40px;margin:0;padding:3px 12px;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;text-align:left;background:linear-gradient(145deg,#fff3ad,#e2af43);border-color:#b47a19;box-shadow:0 3px 0 #ad7622,inset 0 1px 0 #fff8c9;overflow:hidden}
.total-sector>span{font-size:11px;color:#74440f}.total-sector>strong{justify-self:center;font-size:34px;color:#7b450d;letter-spacing:-1px}.total-sector>small{justify-self:end;margin:0;font-size:9px;color:#76501c}
.base-sector{background:linear-gradient(150deg,#f5fbff,#d9ecff);border-color:#7ea7d4;box-shadow:0 3px 0 #9bb9d7,inset 0 1px 0 #fff}.base-sector>span,.base-sector>small{color:#477aaa}.base-sector>strong{color:#1f5f9f}
.mult-sector{background:linear-gradient(150deg,#fff7f5,#f4d4d0);border-color:#d28d87;box-shadow:0 3px 0 #d4a19b,inset 0 1px 0 #fff}.mult-sector>span,.mult-sector>small{color:#a65a55}.mult-sector>strong{color:#b23334}
.gain-sector{background:linear-gradient(150deg,#fffdf0,#f5e8a9);border-color:#d8bd62;box-shadow:0 3px 0 #d1bb73,inset 0 1px 0 #fff}.gain-sector>span,.gain-sector>small{color:#8f751d}.gain-sector>strong{color:#a56e0d}
.score-climax{position:relative;grid-column:5;grid-row:1;inset:auto;width:auto;height:84px;align-self:stretch;background:linear-gradient(145deg,#fffbd8,#efcf66);border-color:#bd8d23;color:#8d6214;box-shadow:0 5px 0 #b98a2f,inset 0 1px 0 #fffbe5,0 10px 22px #9b6b252b;transform-origin:right center;overflow:hidden}.score-climax small,.score-climax span{color:#8f6a22}.score-climax strong{max-width:100%;font-size:30px;color:#9a6611}
.score-climax[data-digits="7"] strong,.score-climax[data-digits="8"] strong{font-size:20px;letter-spacing:-2px}
.score-flow[data-tier="T3"] .score-climax,.score-flow[data-tier="T4"] .score-climax,.score-flow[data-tier="T5"] .score-climax{--climax-scale:1}.score-flow[data-tier="T5"] .score-climax{right:auto;background:linear-gradient(145deg,#fff8bc,#e8b83f);border-color:#a66d15;box-shadow:0 6px 0 #996116,inset 0 1px 0 #fff6cb,0 0 26px #f2bf5c88}.score-flow[data-tier="T5"] .score-climax small,.score-flow[data-tier="T5"] .score-climax span{color:#805814}.score-flow[data-tier="T5"] .score-climax strong{font-size:31px;color:#7d4b0b;text-shadow:0 1px 0 #fff4b2}
.score-flight{color:#a56e0d;text-shadow:0 2px 0 #fff9d9,2px 0 0 #fff9d9,-2px 0 0 #fff9d9}
.help-dialog dl>div:nth-child(1) dt,.help-dialog dl>div:nth-child(2) dt{color:#b23334}.help-dialog dl>div:nth-child(3) dt{color:#1f5f9f}.help-dialog dl>div:nth-child(4) dt{color:#9a6611}
.game-shell{grid-template-rows:32px 198px minmax(0,1fr) var(--game-bottom-gap)}.game-shell>.game-header{height:198px}.game-shell>.stage{width:min(100%,calc((var(--app-height,100dvh) - 230px - var(--game-bottom-gap) - env(safe-area-inset-top))*430/650))}
@media(max-width:390px){
 .game-header{height:177px;padding:4px 7px 5px;gap:2px}.game-toolbar{height:44px}.score-flow{height:122px;gap:10px}.total-sector{height:36px;padding:2px 8px;gap:6px}.total-sector>span{font-size:9px}.total-sector>strong{font-size:28px}.total-sector>small{font-size:7px}
 .score-formula-row{height:76px;grid-template-columns:minmax(0,.95fr) 15px minmax(0,1.05fr) 15px minmax(0,1.07fr);gap:2px}.score-formula-row>.score-sector{height:76px}.flow-op{font-size:21px}.score-climax{height:76px}
 .score-sector>span{font-size:10px}.score-sector>strong{font-size:25px}.score-sector>small{font-size:7px}.score-sector[data-digits="7"]>strong,.score-sector[data-digits="8"]>strong,.total-sector[data-digits="7"]>strong,.total-sector[data-digits="8"]>strong{font-size:17px}.score-climax strong,.score-flow[data-tier="T5"] .score-climax strong{font-size:23px}.score-climax[data-digits="7"] strong,.score-flow[data-tier="T5"] .score-climax[data-digits="7"] strong,.score-climax[data-digits="8"] strong,.score-flow[data-tier="T5"] .score-climax[data-digits="8"] strong{font-size:17px;letter-spacing:-2px}
 .game-shell{grid-template-rows:28px 177px minmax(0,1fr) var(--game-bottom-gap)}.game-shell>.game-header{height:177px}.game-shell>.stage{width:min(100%,calc((var(--app-height,100dvh) - 205px - var(--game-bottom-gap) - env(safe-area-inset-top))*430/650))}
}
@media(max-width:350px){.score-sector>span{font-size:9px}}
@media(max-height:500px) and (orientation:landscape){
 .game-header{height:132px;padding:2px 6px 3px;gap:1px}.game-toolbar{height:44px}.score-flow{height:82px;gap:6px}.total-sector{height:28px;padding:1px 8px}.total-sector>span{font-size:7px}.total-sector>strong{font-size:21px}.total-sector>small{font-size:6px}
 .score-formula-row{height:48px;grid-template-columns:minmax(0,1fr) 14px minmax(0,.9fr) 14px minmax(0,1.12fr);gap:2px}.score-formula-row>.score-sector{height:48px;padding:2px}.score-sector>span{font-size:6px}.score-sector>strong{font-size:18px}.score-sector>small{font-size:5px;margin-top:1px}.flow-op{font-size:18px}.score-climax{height:48px}.score-flow[data-tier="T5"] .score-climax strong{font-size:25px}
 .game-shell{grid-template-rows:14px 132px minmax(0,1fr) var(--game-bottom-gap)}.game-shell>.game-header{height:132px}.game-shell>.stage{width:min(100%,calc((var(--app-height,100dvh) - 146px - var(--game-bottom-gap) - env(safe-area-inset-top))*430/650))}
}

/* Keep this final so the reference motion wins over the legacy score rules above. */
.score-formula-row{position:relative}
.score-flow{--tier-n:0;--hero-width:30%;--hero-from-x:.95;--hero-from-y:.47}.score-flow[data-tier="T1"]{--tier-n:1}.score-flow[data-tier="T2"]{--tier-n:2;--hero-width:53%;--hero-from-x:.56}.score-flow[data-tier="T3"]{--tier-n:3;--hero-width:72%;--hero-from-x:.41}.score-flow[data-tier="T4"]{--tier-n:4;--hero-width:86%;--hero-from-x:.34}.score-flow[data-tier="T5"]{--tier-n:5;--hero-width:95%;--hero-from-x:.31}
.score-climax{position:absolute;z-index:5;left:auto;right:0;top:0;bottom:auto;width:var(--hero-width);height:84px;grid-column:auto;grid-row:auto;align-self:auto;transform-origin:right center}
.score-flow.reference-read[data-phase="read"] .base-sector{animation:reference-read-base .36s ease both}.score-flow.reference-read[data-phase="read"] .mult-sector{animation:reference-read-mult .36s ease both}.score-flow.reference-read[data-phase="read"] .gain-sector{animation:reference-read-gain .36s ease both}
.score-flow[data-phase="squeeze"] .base-sector{animation:reference-charge-base var(--charge-duration,.2s) cubic-bezier(.65,0,.35,1) both}.score-flow[data-phase="squeeze"] .mult-sector{animation:reference-charge-mult var(--charge-duration,.2s) cubic-bezier(.65,0,.35,1) both}.score-flow[data-phase="squeeze"] .gain-sector{animation:reference-charge-gain var(--charge-duration,.2s) cubic-bezier(.65,0,.35,1) both}
.score-flow[data-phase="impact"] .score-climax{animation:reference-hero-pop var(--pop-duration,.25s) cubic-bezier(.16,1,.3,1) both}.score-flow[data-phase="hold"] .score-climax{animation:reference-hero-dock var(--dock-duration,.25s) cubic-bezier(.65,0,.35,1) both}
.score-flow:is([data-tier="T2"],[data-tier="T3"],[data-tier="T4"],[data-tier="T5"]):is([data-phase="impact"],[data-phase="hold"]) .base-sector,.score-flow:is([data-tier="T2"],[data-tier="T3"],[data-tier="T4"],[data-tier="T5"]):is([data-phase="impact"],[data-phase="hold"]) .mult-sector{opacity:.05}.score-flow:is([data-tier="T2"],[data-tier="T3"],[data-tier="T4"],[data-tier="T5"]):is([data-phase="impact"],[data-phase="hold"]) .gain-sector{opacity:0}
@media(max-width:390px){.score-climax{height:76px}}@media(max-height:500px) and (orientation:landscape){.score-climax{height:48px}}
.score-fx{position:absolute;inset:0;z-index:7;width:100%;height:100%;pointer-events:none}

/* Keep the score HUD stretched after removing the old toolbar copy. */
.game-shell>.game-header{align-items:stretch}
.game-toolbar{width:100%;flex:none;justify-content:flex-end}
.game-toolbar>.header-actions:first-child{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-left:auto}
