/* Living Grove: the approved garden concept, rendered as a playable game. */
:root{--scene-board:clamp(320px,calc(100dvh - 405px),530px)}
body{background:#8eddeb;color:#45204e}
.page-heading,.left-rail,.right-rail,footer{display:none}
.grove-scenery{background:#88d6ed}
.grove-scenery picture,.grove-scenery img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.grove-scenery::after{background:linear-gradient(#85dded08,#ccf5c008 65%,#95d05220)}
.header{min-height:60px;max-width:none;padding:7px max(24px,env(safe-area-inset-right)) 7px max(24px,env(safe-area-inset-left));border:0;background:#fff9eddf;box-shadow:0 2px 7px #37532c15;gap:16px}
.brand{font-size:26px;min-height:44px;gap:6px}.brand-mark{width:38px;height:38px}.brand small{font-size:10px;letter-spacing:1.5px;margin-top:5px}
.nav-button{padding:9px 13px;min-height:44px}.nav-button.active{background:#dff0c7;color:#345f2d;box-shadow:inset 0 1px #fff}
.wallet{gap:6px}.wallet-pill,.round-button{background:linear-gradient(#fffef6,#fff0db);border:1px solid #ddc5a7;box-shadow:inset 0 2px #fff,0 2px 3px #67503920}.wallet-pill{font-size:14px;min-height:40px;padding:7px 10px;min-width:65px}
main,body.playing main{max-width:none;padding:12px max(12px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
.game-layout{display:block;width:min(100%,var(--scene-board));max-width:none;margin:auto}.play-area{width:100%}
.level-heading{position:relative;justify-content:center;min-height:48px;margin:0 0 10px;padding:5px 54px;background:linear-gradient(#fffdf4,#fff1df);border:2px solid #fff9e6;border-radius:30px;box-shadow:inset 0 -2px #ddba8c99,0 3px 0 #bca78077,0 5px 8px #31522d20;text-align:center}
.level-heading>div{min-width:0}.world-label{display:none}.level-heading h2{font-size:30px;font-weight:800;line-height:1.1;margin:0;color:#4b2053;text-shadow:0 1px #fff}.level-heading h2 span{display:none}
.level-heading .round-button{position:absolute;right:2px;top:1px;width:44px;height:44px;color:#562660;border:1px solid #d4b993}.level-heading .round-button svg{width:23px;height:23px}
.game-card{display:flex;flex-direction:column;padding:0;background:none;border:0;border-radius:0;box-shadow:none;gap:9px}
.game-stats{display:grid;grid-template-columns:70px minmax(0,1fr);gap:10px;margin:0;padding:10px 12px;background:linear-gradient(#fffdf6,#ffefd9);border:2px solid #fff7e4;border-radius:25px;box-shadow:inset 0 -2px #d5ae8188,0 3px 0 #bca27c88,0 4px 9px #38502e20}
.moves-stat{display:flex;flex-direction:column;justify-content:center;padding-right:10px;border-color:#bca88e}.moves-stat strong{font-size:35px;font-weight:800;line-height:.95;color:#4b2053}.moves-stat span{font-size:13px;color:#59315e;margin-top:3px;letter-spacing:.6px}
.goals-content{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:7px 10px;min-width:0}
.goal-stat,.obstacle-goal{display:grid;grid-template-columns:36px auto;grid-template-rows:auto auto;align-items:center;gap:0 6px;min-width:0;text-align:left;background:none;border:0;padding:0;color:#4e2856;line-height:1.15}
.goal-stat #goal-icon{grid-row:1/3;width:39px;height:39px}.goal-stat>span,.obstacle-goal>span{grid-column:2;grid-row:1;letter-spacing:0;font-weight:700;font-size:14px;color:#542e5a}.goal-stat strong,.obstacle-goal strong{grid-column:2;grid-row:2;font-size:20px;line-height:1.1;font-weight:800;color:#4b2053;white-space:nowrap;font-variant-numeric:tabular-nums}
.obstacle-goals{display:contents}.obstacle-goal{min-height:37px;border-left:1px solid #c2ae96;padding-left:10px;max-width:none}.obstacle-goal>svg,.obstacle-goal>.icon{grid-row:1/3;width:32px;height:32px;color:#549fce}.obstacle-goal:has(.icon-crate)>.icon{color:#b87b37;stroke-width:2.3}.obstacle-goal.complete{background:#e1efce;border-radius:10px;color:#2d683a;padding:4px 7px}.obstacle-goal.complete strong{color:#2d683a}
.score-stat{display:flex;align-items:center;gap:9px;min-height:29px;padding:4px 10px;background:linear-gradient(#fffdf4,#fff2df);border:1px solid #fff8e9;border-radius:22px;box-shadow:0 2px 0 #bca78066}
.score-emblem{color:#ffd52b;font-size:26px;line-height:.8;text-shadow:0 1px #b7850d,1px 0 #b7850d,-1px 0 #b7850d;flex-shrink:0}.score-track{height:12px;flex:1;min-width:25px;background:#dcccba;box-shadow:inset 0 2px 4px #80694d44}.score-track>div{background:linear-gradient(#fff365,#ffd829 40%,#f7a600);border:1px solid #e6a91d;min-width:0}.score-track .track-star{font-size:13px;top:-3px;width:14px;color:#886c8e;line-height:17px}.score-track .track-star.lit{color:#fff3a0}.score-stat strong{font-size:14px;white-space:nowrap;font-weight:800;color:#51235a}.score-stat small{font-size:12px;font-weight:600;color:#6d4b72}
.level-briefing{display:none}
.board-wrap,.game-card:has(.obstacle-goal:nth-child(4)) .board-wrap{width:100%;max-width:100%;padding:6px;background:linear-gradient(135deg,#884998,#54235f);border:3px solid #ffeed2;border-radius:22px;box-shadow:inset 0 0 0 2px #b988ac,0 3px 0 #ba997c,0 5px 13px #37572f44}
.board{--tile-gap:3px}.board.size-8,.board.size-9{--tile-gap:2px}
.tile{padding:0;border:0;border-radius:12px;background:#54235f;box-shadow:inset 0 2px 4px #32113c66;overflow:hidden}
.board-row:nth-child(2n) .tile:nth-child(2n),.board-row:nth-child(2n+1) .tile:nth-child(2n+1){background:#5f2c6c}
.tile.personal{background:#54235f!important;border:0;box-shadow:inset 0 2px 4px #32113c66}
.board-row:nth-child(2n) .tile.personal:nth-child(2n),.board-row:nth-child(2n+1) .tile.personal:nth-child(2n+1){background:#5f2c6c!important}
.tile.personal::after{content:none}.tile .gem-art{width:100%;height:100%;filter:drop-shadow(0 2px 1px #27102c66);overflow:hidden}
.tile .gem-art.skin-starlight{filter:drop-shadow(0 0 3px #ffefad)}.tile .gem-art.skin-aurora{filter:drop-shadow(0 0 3px #b1fff0) saturate(1.12)}
.tile:hover:not(:disabled){background:#79418a}.tile.selected{outline:3px solid #fff4b0;outline-offset:-3px;box-shadow:inset 0 0 9px #fff18a;transform:scale(.96);z-index:8}.tile.hint{outline:2px solid #c5ffb0;outline-offset:-2px}.tile:focus-visible{outline:3px solid #fff6bf;outline-offset:-3px;z-index:9}
.tile.frost{background:#477d9b}.tile.frost[data-layers]::after{content:attr(data-layers)}
.tile.frost{cursor:default}
.tile.special-row::before,.tile.special-column::before,.tile.special-burst::before{content:none;border:0;box-shadow:none;inset:auto;transform:none}
.tile.traveling-seed::before{content:'';position:absolute;left:-2px;bottom:-2px;top:auto;right:auto;width:11px;height:15px;border-radius:80% 20% 75% 25%;background:#a7e66f;border:2px solid #fcffda;z-index:6;box-shadow:0 1px 3px #203b2f66;transform:none}
.special-badge{position:absolute;left:2px;bottom:2px;display:grid;place-items:center;width:clamp(14px,34%,23px);aspect-ratio:1;border:1px solid #ffefad;border-radius:50%;background:linear-gradient(#696ed0,#323e88);color:#fffde8;box-shadow:0 1px 2px #20103277;pointer-events:none;z-index:3}
.tile .special-badge svg{width:80%;height:80%}
.badge-burst{background:linear-gradient(#f5a34b,#bb622d)}
.badge-nova{background:linear-gradient(#cd81e2,#7750b5)}
.tile.thawing .frost-overlay{animation:ice-crack .28s ease-out}
@keyframes ice-crack{0%{filter:brightness(1)}45%{filter:brightness(1.8);transform:scale(1.05)}100%{filter:brightness(1);transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.tile.thawing .frost-overlay{animation:none;filter:brightness(1.4)}}
.tile.effect-target,.tile.effect-target.personal{background:#a266ae!important;box-shadow:inset 0 0 0 2px #f2cbff}.tile.effect-target.effect-evolution-root{background:#498363!important;box-shadow:inset 0 0 0 2px #d6f7b9}.tile.effect-source{outline-color:#ffe09a;overflow:visible}.tile.traveling-seed{overflow:visible}
.board-feedback{position:absolute;left:0;right:0;bottom:96px;min-height:0;padding:0;pointer-events:none;z-index:10}.stardust-readout>svg,.stardust-readout>span:not(.stardust-gain){display:none}.stardust-gain{border-radius:18px;background:#fff5d8;box-shadow:0 2px 8px #38284644;padding:6px 12px}
.evolution-strip{margin:0;background:linear-gradient(#fffef4,#fff0dc);border:2px solid #fff9e6;border-radius:28px;box-shadow:0 2px 0 #bca78088,0 3px 7px #38502e20}.pip-strip-button{min-height:43px;padding:4px 11px;gap:8px}.pip-strip-button>svg,.pip-strip-button>img{width:35px;height:35px;flex-shrink:0}.pip-strip-button b{color:#492650;font-size:14px;line-height:1.25}.pip-strip-button small{font-size:12px;line-height:1.3;color:#6a4c67}.pip-strip-button>.icon{width:20px;height:20px;color:#78527d}.gift-state{font-size:12px;background:#e1efcb;color:#3f6737}
.game-note{margin:0;padding:6px 10px;background:#fff9e9ed;border:1px solid #fff4d4;border-radius:15px;font-size:13px;line-height:1.35;min-height:0;color:#5f3a60;box-shadow:0 2px 0 #bca78055}.game-note.quiet-note{display:none}
.boosters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(58px,.62fr);gap:8px;border:0;padding:4px 5px 0}
/* The shop's own tile on the play screen: cream and gold so it reads as a different thing from the three green power-ups. */
.booster.shop-tile{min-height:44px;background:linear-gradient(#fff6d8,#ffd98a 45%,#f2b450);border-color:#fff7cf;box-shadow:inset 0 0 0 2px #ffe9a8,inset 0 3px 2px #ffffff99,0 3px 0 #b27a1e,0 5px 9px #5a3d1444;color:#5a2d0c;text-shadow:0 1px 0 #fff3c4}
.booster.shop-tile .booster-art>img{display:block;width:38px;height:38px;margin-block:-4px -3px;object-fit:contain;filter:drop-shadow(0 2px 1px #7a4d1466)}
.booster{position:relative;min-width:0;min-height:69px;gap:2px;padding:5px 3px 7px;background:linear-gradient(#92db55,#59b332 38%,#2e852c);border:2px solid #fff0a0;border-radius:23px;box-shadow:inset 0 0 0 2px #9fdb4e,inset 0 3px 2px #e0ffa077,0 3px 0 #5b7d25,0 5px 9px #31552b44;color:#fffdf0;font-size:15px;font-weight:800;text-shadow:0 2px 1px #235a32;line-height:1.2}
.booster-art{position:static;display:grid;place-items:center;width:100%;height:31px;border:0;background:none;box-shadow:none}.booster-art>svg,.booster:nth-child(2) .booster-art>svg,.booster:nth-child(3) .booster-art>svg{width:31px;height:31px;color:#fffdf1;stroke-width:2.5;filter:drop-shadow(0 2px 1px #345724)}
.booster-count{top:-10px;right:7px;min-width:29px;height:29px;border:2px solid #d3b28d;background:linear-gradient(#fffef6,#ffefd5);color:#53285e;font-size:17px;box-shadow:0 2px 3px #3b522d44;text-shadow:none}.booster.active{background:linear-gradient(#ffe685,#ddad24);box-shadow:inset 0 0 0 2px #fff9c0,0 3px 0 #9d6d13,0 0 0 3px #f9f3bb}.booster.active .booster-art{background:none;box-shadow:none;border:0}.booster:disabled{opacity:.7}
.below-game{margin:8px 4px 0;justify-content:center}.below-game>span{display:none}.below-game .text-button{padding:2px 10px;min-height:30px;background:#fff9ecbb;border-radius:20px;font-size:13px;color:#4e3452}
.primary-button{background:linear-gradient(#7dc345,#3d8c33);border:1px solid #c3db72;border-bottom:3px solid #2b622c;box-shadow:inset 0 1px #d7ef9c,0 3px 6px #35542c22}.primary-button:hover:not(:disabled){background:linear-gradient(#8dce51,#479a3a)}.secondary-button{background:#fff5df;border-color:#cdb594}.modal{background:linear-gradient(#fffdf5,#fff5e6);border:2px solid #fff7dd;box-shadow:0 8px 0 #9d7e5d44,0 22px 80px #18382c66}
@media(min-width:901px){.nav{display:flex}.game-note{position:absolute;right:calc(100% + 26px);top:43%;width:220px;min-height:80px;padding:17px 15px;border:2px solid #fff3ca;border-radius:22px;box-shadow:0 3px 0 #bba17d66,0 5px 14px #41633322;font-size:14px}.game-note::after{content:'';position:absolute;right:-11px;top:25px;width:19px;height:19px;transform:rotate(45deg);background:#fff9e9;border-top:2px solid #fff3ca;border-right:2px solid #fff3ca}body.playing .below-game{display:none}}
@media(max-width:900px){.header{min-height:54px;padding:5px 12px;gap:8px}.nav{display:none}.game-layout{display:block;max-width:none;gap:0}.level-heading{margin-bottom:9px}.below-game{margin-top:6px}}
@media(max-width:520px){
 :root{--scene-board:clamp(300px,calc(100dvh - 360px),530px)}
 .header{min-height:52px;padding:max(5px,env(safe-area-inset-top)) 8px 5px;gap:5px}.brand{font-size:22px;gap:3px;min-height:39px}.brand-mark{width:28px;height:30px}.brand small{font-size:8px;letter-spacing:1px;margin-top:4px}.wallet{gap:3px}.wallet-pill{min-width:43px;min-height:35px;padding:5px;gap:3px;font-size:12px}.wallet-pill svg{width:16px;height:16px}.wallet-plus{width:12px;height:12px;font-size:12px}.wallet .round-button{width:34px;height:34px}.wallet-gift{display:grid!important}.wallet-gift svg{width:17px;height:17px}
 main,body.playing main{padding:9px max(8px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}.game-layout{width:min(100%,var(--scene-board))}.level-heading{min-height:44px;padding:5px 46px;border-radius:26px}.level-heading h2{font-size:27px}.level-heading .round-button{width:39px;height:39px;right:1px}.game-card{gap:8px}.game-stats{grid-template-columns:57px minmax(0,1fr);gap:7px;padding:9px;border-radius:22px}.moves-stat{padding-right:7px}.moves-stat strong{font-size:39px}.moves-stat span{font-size:12px}.goals-content{gap:6px 7px}.goal-stat,.obstacle-goal{grid-template-columns:29px auto;gap:0 4px}.goal-stat #goal-icon{width:32px;height:32px}.goal-stat>span,.obstacle-goal>span{font-size:13px}.goal-stat strong,.obstacle-goal strong{font-size:18px}.obstacle-goal{padding-left:7px;min-height:33px}.obstacle-goal>svg,.obstacle-goal>.icon{width:28px;height:28px}.score-stat{padding:4px 8px;gap:7px}.score-stat strong{font-size:13px}.score-stat small{font-size:11px}.board-wrap{padding:4px;border-radius:18px;border-width:2px}.tile{border-radius:9px}.pip-strip-button{padding:4px 8px;gap:6px;min-height:42px}.pip-strip-button>svg,.pip-strip-button>img{width:32px;height:32px}.pip-strip-button b{font-size:13px}.pip-strip-button small{font-size:12px}.game-note{font-size:12px;padding:6px 8px}.boosters{gap:10px;padding:4px 4px 0}.booster{font-size:14px;min-height:66px;border-radius:21px}.booster-count{min-width:27px;height:27px;font-size:16px;right:5px}.booster-art{height:29px}.booster-art>svg{width:29px;height:29px}
}
@media(max-width:359px){.boosters{gap:6px;padding-inline:2px}.brand-mark{display:none}.wallet .wallet-pill{min-width:40px}.wallet .wallet-pill.essence{display:none}.game-layout{width:100%}.score-stat strong{font-size:12px}.booster{font-size:13px}}
@media(max-height:650px) and (min-width:700px){:root{--scene-board:320px}.header{min-height:50px;padding-block:3px}.game-layout{width:320px}.level-heading{min-height:40px;margin-bottom:7px}.level-heading h2{font-size:25px}.level-heading .round-button{width:36px;height:36px}.game-stats{padding:7px 9px}.moves-stat strong{font-size:34px}.game-card{gap:7px}.game-note{font-size:12px}.booster{min-height:60px;font-size:13px}.booster-art{height:26px}.below-game{display:none}}
@media(forced-colors:active){.tile.personal{outline:2px solid Highlight}.tile{border:1px solid CanvasText}}
.level-heading .piece-guide-button{left:2px;right:auto;color:#578168}
.ice-goal{cursor:pointer}.ice-goal i{display:inline-grid;place-items:center;width:14px;height:14px;border:1px solid #a5c8d7;border-radius:50%;background:#effbff;color:#32667e;font-size:11px;font-style:normal;vertical-align:middle}
.tile.frost .gem-art{filter:saturate(.75) brightness(.94)}
.tile.frost .frost-overlay{filter:drop-shadow(0 0 2px #c4f5ff)}
.modal.piece-symbol-guide{max-width:490px;padding:20px;max-height:calc(100dvh - 28px)}
.piece-symbol-guide .modal-eyebrow{font-size:11px;letter-spacing:1px;margin-bottom:5px}
.piece-symbol-guide h2{font-size:26px;font-weight:700;margin-bottom:13px;padding-right:27px}
.piece-symbols{display:grid;gap:8px}.piece-symbols>section{display:flex;gap:12px;align-items:center;padding:10px 11px;background:#f3eddf;border:1px solid #e0d1bc;border-radius:15px}
.piece-symbols>section:last-child{background:#e5f5fc;border-color:#accfe0}
.symbol-example{position:relative;width:56px;height:56px;flex-shrink:0;background:#603369;border-radius:12px;padding:2px}
.symbol-example>.gem-art{display:block;width:100%;height:100%}.symbol-example .frost-overlay{inset:0}.symbol-example .special-badge{width:19px}.symbol-example .special-badge svg{width:80%;height:80%}
.piece-symbol-guide .piece-symbols h3{font-size:15px;font-weight:700;line-height:1.25;margin:0 0 4px;color:#56305f}
.piece-symbol-guide .piece-symbols p{font-size:14px;line-height:1.35;margin:0;color:#6a526b}
.piece-symbol-guide .swap-rule{font-size:13px;line-height:1.4;margin:12px 0;color:#6c536f}
.piece-symbol-guide>.primary-button{min-height:44px;padding:10px 14px;font-size:15px}
@media(max-width:520px){.modal.piece-symbol-guide{padding:16px;max-height:calc(100dvh - 20px)}.piece-symbol-guide h2{font-size:24px}.piece-symbols>section{gap:9px;padding:9px}.symbol-example{width:45px;height:45px}.piece-symbol-guide .piece-symbols h3{font-size:14px}.piece-symbol-guide .piece-symbols p{font-size:14px}.piece-symbol-guide .swap-rule{font-size:13px;margin:10px 0}}
@media(min-width:600px) and (max-height:550px){.modal.piece-symbol-guide{max-width:820px;padding:15px}.piece-symbols{grid-template-columns:repeat(3,minmax(0,1fr))}.piece-symbols>section{flex-direction:column;text-align:center;justify-content:start;padding:9px;gap:7px}.symbol-example{width:45px;height:45px}.piece-symbol-guide .piece-symbols h3{font-size:14px}.piece-symbol-guide .piece-symbols p{font-size:13px}.piece-symbol-guide h2{font-size:23px;margin-bottom:10px}.piece-symbol-guide .swap-rule{font-size:13px;margin:9px 0}}

.piece-symbol-guide .guide-actions>button{flex:1;min-height:44px;padding:9px;font-size:14px;line-height:1.3}
/* Phones and small tablets: the play screen fills the frame exactly. Every row keeps its natural height and the board takes the square that is left, so goals and boosters never fall below the fold whatever the frame size. */
@media(max-width:900px){
 body.playing{display:flex;flex-direction:column;height:100dvh;min-height:0}
 body.playing>.header{flex:none;width:100%}
 body.playing main{flex:1 1 0;min-height:0;display:flex;flex-direction:column;width:100%}
 body.playing .game-layout{flex:1 1 0;min-height:0;display:flex;flex-direction:column;width:100%;max-width:600px;margin-inline:auto}
 body.playing .play-area{flex:1 1 0;min-height:0;display:flex;flex-direction:column}
 body.playing .level-heading,body.playing .game-card>*,body.playing .completed-next{flex:none}
 body.playing .game-card{flex:1 1 0;min-height:0}
 body.playing .game-card>.board-slot{flex:1 1 0;min-height:150px;container-type:size;display:grid;place-items:center}
 body.playing .board-wrap,body.playing .game-card:has(.obstacle-goal:nth-child(4)) .board-wrap{width:min(100cqw,100cqh,560px);max-width:none;margin:0}
 body.playing .below-game{display:none}
}
/* Short frames (iPhone SE and most phones once browser bars and the Jest footer are taken off): tighter rows. */
@media(max-width:900px) and (max-height:760px){
 body.playing .game-card{gap:5px}
 body.playing main{padding-top:6px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
 .level-heading{min-height:36px;margin-bottom:5px}.level-heading .round-button{width:36px;height:36px;min-height:36px}
 #level-title{font-size:21px}
 .game-stats{padding:5px 8px;margin-bottom:0}.moves-stat strong{font-size:28px}
 .score-stat{padding-block:1px}
 .evolution-strip{margin:0}.pip-strip-button{min-height:36px;padding-block:2px}.pip-strip-button>svg,.pip-strip-button>img{width:26px;height:26px}
 .game-note{min-height:0;padding:3px 6px;font-size:12px;line-height:1.3}
 .boosters{padding-top:2px}.booster{min-height:50px}
}
/* Very short frames: the brand bar steps aside during a level (Pause still reaches every screen) and Pip's strip folds away. */
@media(max-width:900px) and (max-height:600px){
 body.playing>.header{display:none}
 body.playing .evolution-strip{display:none}
 .game-stats{padding:3px 8px}.moves-stat strong{font-size:24px}
 .level-heading{min-height:34px;margin-bottom:4px}.level-heading .round-button{width:34px;height:34px;min-height:34px}
 .booster{min-height:44px;padding:3px 3px 4px;gap:0;font-size:12px;line-height:1.15;white-space:nowrap}.booster-count{min-width:22px;height:22px;font-size:13px}
 .booster-art{height:20px}.booster-art>svg,.booster:nth-child(2) .booster-art>svg,.booster:nth-child(3) .booster-art>svg{width:20px;height:20px}.booster.shop-tile .booster-art>img{width:26px;height:26px;margin-block:-3px}
}

/* A finished board reads as paused; a tap reopens the result or the hearts screen. */
body.board-ended #board{opacity:.7;filter:saturate(.7);transition:opacity .3s,filter .3s}
/* Phones: messages drop from the top edge so they never sit over boosters, the board or dialog buttons. */
@media(max-width:900px){.toast,body.playing .toast{top:calc(8px + env(safe-area-inset-top));bottom:auto;transform:translate(-50%,-16px);padding:10px 16px;font-size:13px;max-width:min(420px,calc(100vw - 32px))}.toast.show,body.playing .toast.show{transform:translate(-50%,0)}}
/* Result cards: three stats on one line and the next-step buttons pinned to the bottom edge, so they never need a scroll. */
.results .result-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}
.results .result-stats strong{font-size:22px}
.results .spare-bonus{margin:-4px 0 6px;color:#6b4f1d;font-weight:700;font-size:14px}
.results>.button-row{position:sticky;bottom:-28px;z-index:3;margin:14px -20px -28px;padding:16px 20px 20px;background:linear-gradient(#fff5e600,#fff5e6 34%)}
@media(min-width:601px){.results>.button-row{bottom:-32px;margin:16px -32px -32px;padding:16px 32px 24px}}
@media(max-height:760px){.results .results-art{width:92px;height:86px}.results h2{margin:6px 0}.results .result-stars{margin:4px 0}.results p{margin:6px 0}}
/* Over a dialog the message keeps to the left of the close button. */
@media(max-width:900px){.toast.in-modal,body.playing .toast.in-modal{left:16px;transform:translateY(-16px);max-width:calc(100vw - 104px);text-align:left}.toast.in-modal.show,body.playing .toast.in-modal.show{transform:none}}
/* Settings: account first, then switches, links, sound previews; spaced buttons that fit a small phone. */
.settings-screen .full-width{margin:10px 0 4px}
.settings-screen .settings-row{min-height:52px;padding:4px 0}
.settings-screen .settings-links{margin-top:14px}
.settings-screen .settings-label{margin:16px 0 6px;font-size:13px;font-weight:700;color:#6c517f}
.settings-screen .audio-previews{display:flex;flex-wrap:wrap;gap:8px}
.settings-screen .audio-previews button{flex:1 1 auto;min-height:44px;padding:8px 12px}
.settings-screen .ability-box{margin-top:16px}
.settings-screen .audio-credit{font-size:12px;margin-top:10px}
/* How to play: four short rows, details folded away, keyboard hints only where there is a keyboard. */
.help-screen .help-row{gap:12px;margin:10px 0}.help-screen .help-row p{margin:2px 0 0;font-size:14px;line-height:1.45}
.help-screen .help-art{width:52px;height:52px;flex:0 0 52px}
.help-more{margin:12px 0;padding:10px 14px;border-radius:14px;background:#f3ecf8}.help-more summary{min-height:32px;cursor:pointer;font-weight:700;color:#533276}.help-more p{font-size:14px;margin:8px 0 0}
@media(hover:none) and (pointer:coarse){.kbd-only{display:none}}
/* Ice reads as a clear sheet: the piece underneath stays easy to identify; a second layer looks thicker. */
.tile.frost .gem-art{filter:none}
.tile.frost .frost-overlay{opacity:.58}
.tile.frost .frost-overlay .frost-layers-2,.tile.frost .frost-overlay .frost-layers-3{opacity:1}
.tile.frost:has(.frost-layers-2) .frost-overlay{opacity:.78}
/* Heart timer sits inside the pill, readable, never under the Level bar. */
.wallet-pill.lives small{position:static;order:3;font-size:13px;font-weight:700;color:#7a3557;padding-left:2px}
.wallet-pill.lives:has(small) .wallet-plus{display:none}
/* Between levels on phones the tab bar takes the boosters' place instead of covering them. */
@media(max-width:900px){body.board-ended .boosters{visibility:hidden}}
.bond-mode-note{margin:10px 0 8px;font-size:14px;color:#5c4670}
.upgrade-confirm{margin:8px 0 0;font-weight:700;color:#4d365f;text-align:center}
.booster .booster-art>svg.icon-painted{filter:drop-shadow(0 0 1.2px #fffbe8) drop-shadow(0 0 1.2px #fffbe8) drop-shadow(0 2px 1px #34572499)}
