/* Logo-matched candy controls. Gameplay cells and piece gestures stay separate. */
.mode-menu{gap:13px}
.mode-menu button,#intro-play,.mode-menu #intro-endless,.mode-menu #intro-items,.mode-menu #intro-timed{
 --candy-top:#fff2ba;--candy-mid:#ffcd68;--candy-bottom:#ff9e62;--candy-edge:#ae4d72;
 position:relative;isolation:isolate;overflow:visible;min-height:60px;padding:13px 53px 13px 18px!important;
 border:2px solid #fff2d9!important;border-radius:20px!important;
 background:linear-gradient(180deg,var(--candy-top),var(--candy-mid) 48%,var(--candy-bottom))!important;
 box-shadow:inset 0 3px 0 #ffffffac,inset 0 -3px 0 #a0255530,0 5px 0 var(--candy-edge),0 7px 0 #421d5099,0 10px 15px #21132f38!important;
 color:#482039!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
 transition:transform .12s ease,box-shadow .12s ease,filter .12s ease;
}
.mode-menu #intro-endless{--candy-top:#d8ffdf;--candy-mid:#7ae9bf;--candy-bottom:#35c8b0;--candy-edge:#217f81;color:#173d46!important}
.mode-menu #intro-items{--candy-top:#f5d9ff;--candy-mid:#d9a0f5;--candy-bottom:#b67cdf;--candy-edge:#775193;color:#3d2559!important}
.mode-menu #intro-timed{--candy-top:#d7faff;--candy-mid:#8cddff;--candy-bottom:#55b7e8;--candy-edge:#3778a7;color:#193b58!important}
.mode-menu b{font-size:17px;font-weight:900;text-shadow:0 1px 0 #fff7;letter-spacing:-.4px}
.mode-menu small{font-size:10px;opacity:1;color:inherit;font-weight:600}
.mode-menu button:after{right:13px;width:28px;height:28px;background:#ffffff70;border:1px solid #fffc;color:inherit;box-shadow:0 2px 0 #76335326;font-weight:900}
.mode-menu button:active{transform:translateY(4px) scale(.985)!important;box-shadow:inset 0 2px 0 #fff8,0 1px 0 var(--candy-edge)!important}
/* Compact 32px visual shell inside a stable 44px touch target. */
.intro-tools,.game-tools{gap:0}
.intro-tools button,.game-tools button{position:relative!important;isolation:isolate;width:44px!important;height:44px!important;min-width:44px;padding:12px!important;border:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-radius:14px!important}
.intro-tools button:before,.game-tools button:before{content:'';position:absolute;inset:6px;z-index:-1;border-radius:11px;border:1px solid #ffe4f6ab;background:linear-gradient(155deg,#aa7cbaeb,#5b427ee8);box-shadow:inset 0 2px 0 #fff6,0 2px 0 #342244,0 3px 7px #25142d44}
.intro-tools button>svg,.game-tools button>svg{width:19px!important;height:19px!important;stroke:#fff2d2;stroke-width:2}
.intro-tools button:active:before,.game-tools button:active:before{transform:translateY(2px);box-shadow:inset 0 1px 0 #fff6}
.intro-tools{right:max(9px,env(safe-area-inset-right));top:calc(8px + env(safe-area-inset-top))}
/* Keep glass panels airy, give their actions a solid tactile face. */
dialog button:not([data-dismiss]),#endless-choice button:not([data-dismiss]),#assist-row button,#stage-select,.wallet{
 border:1px solid #ffe8f3a8;border-radius:15px;background:linear-gradient(#ffe8f4,#f6b2d8 52%,#e88bc5);color:#522547;box-shadow:inset 0 2px 0 #fff9,0 3px 0 #975881,0 5px 9px #24133325;font-weight:800;
}
dialog button:not([data-dismiss]):active,#assist-row button:active{transform:translateY(2px);box-shadow:inset 0 1px 0 #fff8,0 1px 0 #975881}
#settings-dialog .setting-row button{background:linear-gradient(#9387a5,#685979);color:#fff;box-shadow:inset 0 1px 0 #fff6,0 2px 0 #41334f}
#settings-dialog .setting-row button.on{background:linear-gradient(#d8ffe6,#73d8b4);color:#204840;box-shadow:inset 0 1px 0 #fff9,0 2px 0 #36796a}
#intro-home,#help-open,#dialog-close,#endless-new{background:linear-gradient(#a995bc,#79688f);color:#fff6ec;box-shadow:inset 0 1px 0 #fff6,0 3px 0 #51405f}
#burst{background:linear-gradient(#b995d3,#84609d);border:1px solid #ffe8fd;box-shadow:inset 0 2px 0 #fff7,0 3px 0 #4a305b}
#burst.ready{background:linear-gradient(#fff2a9,#ffd477 42%,#ff9ebf);color:#622247;border-color:#fff6d4;box-shadow:inset 0 2px 0 #fff9,0 4px 0 #ae526d,0 0 17px #ffc87366}
#burst.active{background:linear-gradient(#b175c7,#663778);color:#fff}
#intro-detail{margin-top:22px}.intro-foot{margin-top:16px}
@media(max-height:650px){.mode-menu{gap:10px}.mode-menu button{min-height:52px;padding-top:10px!important;padding-bottom:10px!important}.mode-menu b{font-size:15px}.intro-foot{margin-top:10px}}
@media(prefers-reduced-motion:reduce){.mode-menu button,.intro-tools button:before,.game-tools button:before{transition:none!important}}
/* Clear legacy absolute offsets when icons participate in the toolbar row. */
.intro-tools button,.game-tools button{inset:auto!important;align-self:center;flex:0 0 44px!important;margin:0!important}
/* Crafted jewel controls, shared with the flower-block logo language. */
.intro-tools button:before,.game-tools button:before{display:none}
.intro-tools button,.game-tools button{padding:3px!important;overflow:visible}
.jewel-icon{display:block;width:36px;height:38px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 2px #28153550);transition:transform .12s}
.intro-tools button:active .jewel-icon,.game-tools button:active .jewel-icon{transform:translateY(2px) scale(.94)}
.intro-tools,.game-tools{gap:3px}
#intro-screen .intro-content{width:min(350px,calc(100vw - 44px));padding:48px 0 12px}
#intro-screen .intro-title{max-width:310px;width:100%;margin:0 auto 22px;filter:drop-shadow(0 6px 8px #23123250)}
#intro-screen .intro-orbs,#intro-screen .intro-kicker{display:none}
#intro-screen .mode-menu{gap:14px}
#intro-screen .mode-menu button{padding:13px 42px 13px 69px!important;min-height:65px;border-radius:19px!important;border-width:1.5px!important;box-shadow:inset 0 2px 0 #fff9,inset 0 -2px 0 #a0255520,0 4px 0 var(--candy-edge),0 6px 0 #421d5055,0 9px 14px #21132f28!important}
#intro-screen .mode-menu button:before{content:'';position:absolute;left:13px;top:50%;width:44px;height:47px;transform:translateY(-50%) rotate(-7deg);background:url('art/jewel-flower.svg') center/contain no-repeat;border:0;border-radius:0;box-shadow:none;opacity:1}
#intro-screen #intro-endless:before{filter:hue-rotate(125deg)}
#intro-screen #intro-items:before{filter:hue-rotate(290deg);transform:translateY(-50%) rotate(7deg)}
#intro-screen #intro-timed:before{filter:hue-rotate(215deg)}
#intro-screen .mode-menu b{font-size:16px;line-height:1.25;letter-spacing:-.4px}
#intro-screen .mode-menu small{font-size:10px;line-height:1.4;opacity:.85}
#intro-screen .mode-menu button:after{width:22px;height:22px;right:11px;font-size:20px;background:#fff5;border:1px solid #fff8}
#intro-screen #intro-detail{font-size:10px;letter-spacing:.3px;margin:20px 0 0;opacity:.75}
@media(max-height:620px){#intro-screen .intro-content{padding-top:43px}#intro-screen .intro-title{max-width:255px;margin-bottom:18px}#intro-screen .mode-menu{gap:11px}#intro-screen .mode-menu button{min-height:57px;padding-top:9px!important;padding-bottom:9px!important}#intro-screen .mode-menu button:before{width:39px;height:42px;left:14px}#intro-screen .mode-menu b{font-size:14px}#intro-screen #intro-detail{margin-top:15px}}
@media(prefers-reduced-motion:reduce){.jewel-icon{transition:none}}

/* A single text column keeps narrow phones readable beside the jewel. */
#intro-screen .mode-menu button{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;text-align:left}
#intro-screen .mode-menu b,#intro-screen .mode-menu small{display:block;width:100%;max-width:none;min-width:0;white-space:normal;word-break:normal;overflow-wrap:normal;text-align:left}
@media(max-width:360px){
 #intro-screen{padding-left:14px;padding-right:14px}
 #intro-screen .intro-content{width:100%;max-width:350px}
 #intro-screen .mode-menu button{padding-left:56px!important;padding-right:32px!important;min-height:62px}
 #intro-screen .mode-menu button:before{left:9px;width:36px;height:39px}
 #intro-screen #intro-vs:before{width:33px;height:33px;font-size:14px}
 #intro-screen .mode-menu button:after{right:8px;width:18px;height:18px;font-size:17px}
 #intro-screen .mode-menu b{font-size:15px;line-height:1.3;letter-spacing:-.25px}
 #intro-screen .mode-menu small{font-size:10px;line-height:1.35;letter-spacing:0}
 #intro-screen .intro-title{max-width:220px;margin-bottom:15px}
}
