/* Layout slots depend on the viewport, never on transient game messages. */
.screen{overflow-x:hidden}
#homeScreen>*{flex-shrink:0}
#homeScreen .home-hero{height:auto;min-height:0;display:grid;grid-template-columns:34% minmax(0,1fr);grid-template-rows:auto auto;gap:4px;align-items:center}
#homeScreen .home-logo{position:static;grid-column:1/-1;grid-row:1;justify-self:center;width:58%;max-width:250px;height:clamp(64px,10dvh,90px);margin:0;object-fit:contain}
#homeScreen .home-mascot{position:static;grid-column:1;grid-row:2;width:100%;height:106px;object-fit:contain;align-self:center}
#homeScreen .hero-play{position:static;grid-column:2;grid-row:2;width:100%;min-width:0;gap:5px;margin:0}
#homeScreen .play-button{min-height:68px;font-size:32px;padding:6px;border-width:4px}
#homeScreen .hero-play>small{font-size:12px}
#homeScreen .next-level{font-size:12px;white-space:normal;width:auto}
#homeScreen .topbar{min-width:0;gap:4px}
#homeScreen .pill{min-width:0;padding-right:5px}
#homeScreen .pill b{font-size:clamp(14px,4vw,18px);white-space:nowrap}
#homeScreen .pill img{width:28px;height:28px}
#homeScreen .top-actions{min-width:0;gap:4px}
#homeScreen .top-actions .round{width:37px;height:37px}
.community-dock{grid-template-columns:repeat(4,minmax(0,1fr))}
.community-dock button{min-width:0;overflow-wrap:normal}
.community-dock button span{font-size:12px;line-height:1.1}
.feature-card div{min-width:0}.feature-card b{overflow-wrap:anywhere}
.modal-card{max-height:calc(100% - 16px);overflow-y:auto}
.community-card{overflow:hidden;min-height:0}.hub-heading,.hub-tabs{flex-shrink:0}.hub-body{min-height:0;overflow-y:auto;overflow-x:hidden}
.hub-body p,.hub-body label{font-size:14px;line-height:1.45}.hub-tabs button{min-width:0;font-size:14px;padding:9px 2px}
.milestone-progress{display:grid;gap:7px;border:2px solid #fff1b8;border-radius:17px;padding:12px;background:linear-gradient(125deg,#fff5b8,#ffe0eb);font-size:14px}
.milestone-progress strong{color:#8b3870}.milestone-track{height:12px;border-radius:9px;background:#6c3b79;overflow:hidden}.milestone-track i{display:block;height:100%;background:linear-gradient(90deg,#ffdc3c,#ff80be);border-radius:9px}

#gameScreen{--game-chrome:288px;--game-sidebar:220px;--game-landscape:0;gap:4px;padding:calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom))}
#gameScreen .game-topbar{height:42px;min-height:42px;gap:4px;overflow:visible}
#gameScreen .game-topbar>.game-brand{flex:0 0 54px;padding:0;display:block}
.game-brand img{display:block;width:54px;height:32px;object-fit:contain}
#gameScreen .game-topbar>div:not(.game-brand){min-width:0;padding:0;gap:0}
#gameScreen .game-topbar>div b{font-size:16px;line-height:1.1}
#gameScreen .game-topbar>div small{font-size:12px;line-height:1.15;white-space:nowrap;color:#fff9dd;text-shadow:0 1px #623b64}
#gameScreen .round.mini{width:32px;height:32px}.home-return span{display:none}
#gameScreen .game-score{font-size:11px;padding:3px 5px;min-width:44px;max-width:70px;overflow:hidden}.game-score b{font-size:15px;white-space:nowrap}
#gameScreen .game-header{height:58px;min-height:58px;gap:5px}
#gameScreen .goal-panel{padding:4px 5px;gap:3px;border-radius:17px;min-width:0}
.goal-heading{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;min-width:0}
#gameScreen .goal-panel .eyebrow{font-size:11px;line-height:1.1;min-width:0}
#gameScreen .goalbox{gap:5px;min-width:0}.goalbox>span{min-width:0}
#gameScreen .goalbox img{width:24px;height:25px}#gameScreen .goalbox>span{font-size:14px;gap:1px}
#gameScreen .moves{width:53px;border-radius:17px;gap:1px}.moves small{font-size:12px}#gameScreen .moves b{font-size:27px}
.game-meta-slot{flex:none;height:30px;min-height:30px;position:relative;margin:0}
#gameScreen .boss-hud{height:30px;min-height:30px;width:100%;padding:2px 6px;gap:4px;border-radius:13px}
#gameScreen .boss-hud>img{width:23px;height:23px}.boss-hud>div>span{font-size:12px}.boss-hud small{font-size:11px}.boss-hud>b{font-size:16px}.boss-bar{height:5px;margin-top:2px}
#gameScreen .score-challenge{background:transparent;border:0;margin:0;padding:0;font-size:11px;white-space:nowrap;color:#85346b}
#gameScreen .game-bonus-tools{height:42px;min-height:42px;gap:5px;margin:0;min-width:0}
#gameScreen .rush-hud{height:42px;padding:3px 6px;border-radius:14px;border-width:2px;gap:4px;min-width:0}
#gameScreen .rush-hud>img{width:24px;height:25px;flex:none}
#gameScreen .energy-heading{margin-bottom:3px;gap:3px}#gameScreen .energy-heading>b{font-size:12px;white-space:nowrap}#gameScreen .energy-heading>span{font-size:12px;min-width:25px}
#gameScreen .rush-track{height:10px;border-width:1px}
#gameScreen .free-spin-buy{width:142px;max-width:47%;height:42px;min-height:42px;gap:3px;padding:2px 5px;border-radius:14px;min-width:0}
#gameScreen .free-spin-buy img{width:27px;height:32px;flex:none}.free-spin-buy span{min-width:0}
#gameScreen .free-spin-buy b{font-size:14px;line-height:1;white-space:nowrap}#gameScreen .free-spin-buy small{font-size:11px;line-height:1;padding:3px;white-space:nowrap}
#gameScreen .board-stage{width:var(--board-size);height:var(--board-size);min-height:var(--board-size);margin:auto;max-width:none;flex:none}
#gameScreen .board-stage>.board{width:100%;height:100%;border-color:#fff0ad;background:linear-gradient(145deg,#753a92,#382050);box-shadow:inset 0 0 0 1px #e798ed,0 4px 0 #c99b65,0 7px 14px #34134270}
#gameScreen .tile{background:radial-gradient(at 35% 10%,#915595,#5b356b)}
#gameScreen .booster-bar{height:54px;min-height:54px;margin:0;padding:3px;gap:4px;flex:none}
#gameScreen .booster{height:43px;min-height:43px;padding:1px;gap:0}#gameScreen .booster img{width:27px;height:27px}#gameScreen .booster b{font-size:12px;line-height:1.1}
#gameScreen .gesture-tip{height:22px;min-height:22px;margin:0;padding:3px 4px;font-size:11px;line-height:14px;white-space:nowrap;text-align:center;flex:none}
#gameScreen .play-notice{position:absolute;left:9px;right:9px;bottom:calc(8px + env(safe-area-inset-bottom));height:22px;margin:0;z-index:21}
#gameScreen .combo-banner{font-size:15px;background:#ffdb9bef}.rush-overlay{background:#9b4ea9f5}.rush-overlay span{font-size:14px}.rush-overlay small{font-size:11px}
#gameScreen .booster-instruction{position:absolute;left:10px;right:10px;bottom:calc(68px + env(safe-area-inset-bottom));font-size:13px;min-height:30px;margin:0}
.scatter-mark{padding:0;border:0;background:transparent;box-shadow:none}.scatter-mark img{width:100%;height:100%;object-fit:contain;filter:none}.scatter-mark b{position:absolute;bottom:4%;left:0;right:0;font-size:8px;line-height:1;color:#fff7ab;text-align:center;text-shadow:0 1px 2px #65204e}

/* Six by five remains a complete, square-cell board in every bonus phase. */
#bonusModal{padding:0;background:#391153;align-items:stretch;justify-content:center}
#bonusModal .bonus-card{--bonus-chrome:278px;--bonus-landscape:0;max-width:520px;max-height:100%;height:100%;width:100%;min-height:0;flex-shrink:0;border:0;border-radius:0;padding:calc(8px + env(safe-area-inset-top)) 10px calc(8px + env(safe-area-inset-bottom));gap:5px;overflow:hidden;background:linear-gradient(#38116842,#41105942),url('assets/bonus/candy-kingdom-wallpaper.webp') center/cover;box-shadow:none;display:flex;flex-direction:column;color:#fff8d3}
#bonusModal .bonus-title{height:46px;min-height:46px;gap:7px;flex:none}
.bonus-logo{width:63px;height:42px;object-fit:contain;filter:drop-shadow(0 2px 2px #260d58)}
#bonusModal .bonus-title h2{font:1000 clamp(28px,8vw,39px) 'Baloo 2',sans-serif;line-height:1;letter-spacing:0;flex:1;text-align:center;color:#ffe547;text-shadow:0 3px #f6519b,0 5px #8f215d,0 0 15px #ffb849}
#bonusModal .hub-close{width:34px;height:34px;min-width:34px;background:#683091;border:2px solid #ffd966;font-size:27px}
.bonus-dashboard{height:54px;min-height:54px;display:grid;grid-template-columns:1fr 1fr;gap:7px;flex:none}
.bonus-meter{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;gap:0;border:2px solid #ffe68a;border-radius:22px;background:radial-gradient(at 50% 5%,#a947be,#42176c);box-shadow:inset 0 0 0 1px #c59458,0 2px 0 #813e49}
.bonus-meter>small{font-size:12px;font-weight:1000;line-height:1}.bonus-meter>strong{font:1000 27px 'Baloo 2';line-height:1.05;color:#ffe779;text-shadow:0 2px #b87531}.bonus-meter>span{font-size:10px;line-height:1.1;white-space:nowrap}
.bonus-meter .bonus-mini-base{font-size:11px}.bonus-meter #bonusBase{font-size:11px;color:#fff6b6}
.bonus-stage{width:var(--bonus-board-width);height:calc(var(--bonus-board-width) * 5 / 6);min-height:calc(var(--bonus-board-width) * 5 / 6);align-self:center;position:relative;flex:none;margin:auto 0;border-radius:22px;overflow:visible;box-shadow:0 0 0 2px #9c4a71,0 0 18px #ffbd6460}
#bonusModal .bonus-board{width:100%;height:100%;min-height:100%;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));gap:3px;padding:6px;border:5px solid #ffdd75;border-radius:22px;background:linear-gradient(#39114e,#240f45);box-shadow:inset 0 0 0 1px #f098ff,0 3px 0 #a85461;overflow:hidden;flex:none}
#bonusModal .bonus-tile{aspect-ratio:auto;min-width:0;min-height:0;border:1px solid #81388b;border-radius:9px;background:radial-gradient(at 25% 20%,#67267c,#391758);box-shadow:inset 0 0 8px #1a082e60;overflow:visible}
#bonusModal .bonus-lamb{border:0;background:#4a1a66;box-shadow:0 0 9px #ffb13980;animation:bonusLambFrame 2.3s ease-in-out infinite}
#bonusModal .bonus-lamb-img{inset:0;width:100%;height:100%;filter:none;object-fit:contain;animation:bonusLambBob 2.5s ease-in-out infinite}
.bonus-special-label{bottom:4%;font-size:clamp(6px,1.8vw,9px);color:#fff4ba;text-shadow:0 1px 2px #511a5a}
#bonusModal .bonus-multiplier{border:0;background:radial-gradient(#5b8bbb55,#391a6955)}
#bonusModal .multiplier-orb{opacity:1;inset:-4%;width:108%;height:108%;object-fit:contain;filter:drop-shadow(0 0 5px #44f7ff99)}
.gem-5 .multiplier-orb{filter:hue-rotate(275deg) drop-shadow(0 0 5px #80ff4499)}
.gem-high .multiplier-orb{inset:-8%;width:116%;height:116%;filter:drop-shadow(0 0 7px #ffb934)}
.gem-100 .multiplier-orb{filter:hue-rotate(292deg) drop-shadow(0 0 7px #ff60cd)}
.gem-250 .multiplier-orb{filter:hue-rotate(190deg) drop-shadow(0 0 8px #ba6dff)}
.gem-500 .multiplier-orb{filter:hue-rotate(120deg) drop-shadow(0 0 9px #93eaff)}
.gem-1000 .multiplier-orb{filter:drop-shadow(0 0 10px #ffdb46)}
#bonusModal .multiplier-value{font:1000 clamp(15px,4.7vw,27px) 'Baloo 2';letter-spacing:-.6px;color:#fff;text-shadow:0 2px #19587f,1px 0 #174570,-1px 0 #174570,0 -1px #174570}
#bonusModal .gem-high .multiplier-value{font-size:clamp(13px,4vw,24px);padding-top:10%;color:#fffbd4;text-shadow:0 2px #722956,1px 0 #722956,-1px 0 #722956,0 -1px #722956}
.gem-high .bonus-symbol{animation:gemAura 2s ease-in-out infinite}
.gem-arrival .bonus-symbol{animation:gemArrival .95s ease-out}.bonus-reveal{pointer-events:none;position:absolute;inset:0;display:grid;place-items:center;z-index:6;opacity:0}
.bonus-reveal.show{animation:rareReveal 1.25s ease-out;background:radial-gradient(#e3a44d35,transparent 65%)}
.bonus-reveal b{font:1000 clamp(42px,15vw,80px) 'Baloo 2';color:#ffef7f;text-shadow:0 3px #d7529d,0 6px #743473,0 0 22px #ffda39;background:#421352b8;border:2px solid #ffdb72;border-radius:24px;padding:5px 25px}
#bonusModal .bonus-earned{height:32px;min-height:32px;flex:none;line-height:1.15;font-size:clamp(14px,4.2vw,20px);margin:0;text-align:center;overflow-wrap:anywhere;padding:0 2px;border:0;color:#ffedb2;background:#431153cf;border-radius:14px}
.bonus-bank{height:58px;min-height:58px;display:grid;align-content:center;justify-items:center;border:3px solid #ffe28b;border-radius:25px;background:radial-gradient(at 50% 0,#de4bb7,#792174);box-shadow:inset 0 0 0 1px #fc9f61,0 2px #863974;flex:none;min-width:0}
.bonus-bank>small{font-size:12px;font-weight:1000;line-height:1.1}.bonus-bank #bonusTotal{background:none;border:0;padding:0;font:1000 clamp(23px,7vw,34px) 'Baloo 2';color:#ffe66b;line-height:1.1;min-width:0;max-width:100%;white-space:nowrap;text-shadow:0 2px #94384b}
.bonus-actions{height:44px;min-height:44px;display:flex;align-items:center;justify-content:center;flex:none}
.bonus-rule{height:44px;display:flex;align-items:center;justify-content:center;gap:3px;background:#ffd76a;border:2px solid #fff0ab;border-radius:18px;padding:3px 9px;color:#7a225b;min-width:0;font-size:14px;font-weight:1000}
.bonus-rule img{width:28px;height:28px;object-fit:contain}.bonus-rule strong{font-size:17px;white-space:nowrap;margin-left:4px}
#bonusModal #bonusDone{height:44px;min-height:44px;padding:5px 12px;font-size:16px}
#bonusModal #bonusHint{position:absolute;bottom:2px;left:12px;right:12px;font-size:10px;line-height:1;color:#f2d9fb;text-align:center;white-space:nowrap;pointer-events:none}
.bonus-demo-badge{font-size:10px;font-weight:900;color:#fff4b6;text-align:center;position:absolute;top:1px;left:10px;right:10px;pointer-events:none}
@keyframes gemArrival{0%{transform:scale(.3);filter:brightness(2)}45%{transform:scale(1.16);filter:brightness(1.6)}100%{transform:none;filter:none}}
@keyframes gemAura{50%{filter:brightness(1.12)}}
@keyframes rareReveal{0%{opacity:0;transform:scale(.8)}15%,65%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.15)}}

@media(max-width:360px){#gameScreen .game-topbar>div small{display:none}#gameScreen .game-topbar>div b{font-size:14px}#gameScreen .goalbox{gap:3px}#gameScreen .goalbox img{width:22px}#gameScreen .free-spin-buy{width:136px}#gameScreen .free-spin-buy b{font-size:13px}#gameScreen .rush-hud>img{width:21px}.bonus-logo{width:53px}.hub-heading h2{font-size:24px}.hub-tabs button{font-size:12px}.bonus-meter>small{font-size:11px}.bonus-meter>span{font-size:9px}}
@media(max-height:700px){#homeScreen .home-logo{height:64px}#homeScreen .home-mascot{height:83px}#homeScreen .play-button{min-height:53px;font-size:28px}#homeScreen .hero-play>small{display:none}}
@media(max-height:600px){
 #homeScreen .home-logo{height:58px}#homeScreen .home-mascot{height:70px}#homeScreen .play-button{min-height:48px;font-size:25px}
 #gameScreen{--game-chrome:203px;gap:3px;padding:calc(4px + env(safe-area-inset-top)) 5px calc(4px + env(safe-area-inset-bottom))}
 #gameScreen .game-topbar{height:34px;min-height:34px}#gameScreen .game-header{height:48px;min-height:48px}.game-meta-slot,#gameScreen .boss-hud{height:26px;min-height:26px}#gameScreen .boss-hud>img{width:20px;height:20px}.boss-hud small{font-size:10px}
 #gameScreen .game-bonus-tools,#gameScreen .rush-hud,#gameScreen .free-spin-buy{height:36px;min-height:36px}#gameScreen .free-spin-buy img{width:23px;height:28px}#gameScreen .free-spin-buy b{font-size:13px}#gameScreen .free-spin-buy small{font-size:10px}
 #gameScreen .booster-bar{height:46px;min-height:46px;padding:2px}#gameScreen .booster{height:37px;min-height:37px}#gameScreen .booster img{width:23px;height:23px}#gameScreen .gesture-tip{display:none}#gameScreen .play-notice{bottom:calc(50px + env(safe-area-inset-bottom))}
 #bonusModal .bonus-card{--bonus-chrome:232px;padding:calc(5px + env(safe-area-inset-top)) 7px calc(8px + env(safe-area-inset-bottom));gap:4px}
 #bonusModal .bonus-title{height:40px;min-height:40px}.bonus-title h2{font-size:29px}.bonus-logo{height:35px}.bonus-dashboard{height:44px;min-height:44px}.bonus-meter>strong{font-size:22px}
 #bonusModal .bonus-earned{height:26px;min-height:26px;font-size:14px}.bonus-bank{height:48px;min-height:48px}.bonus-bank #bonusTotal{font-size:25px}.bonus-actions,.bonus-rule{height:36px;min-height:36px}.bonus-rule img{height:24px;width:24px}.bonus-rule strong{font-size:15px}#bonusModal #bonusDone{height:36px;min-height:36px;font-size:14px}
}
@media(orientation:landscape) and (max-height:600px){
 .app-shell{width:min(1040px,100%);max-width:1040px}
 #gameScreen{--game-landscape:1;--game-sidebar:250px;display:none;grid-template-columns:var(--game-sidebar) minmax(0,1fr);grid-template-rows:34px 48px 28px 40px minmax(46px,1fr);align-content:stretch;column-gap:12px;row-gap:5px;padding:8px}
 #gameScreen.active{display:grid}#gameScreen .game-topbar{grid-column:1;grid-row:1}#gameScreen .game-brand{display:block!important;flex-basis:40px!important}#gameScreen .game-brand img{width:40px;height:28px}#gameScreen .game-topbar>div b{font-size:12px}#gameScreen .game-topbar>div small{display:none}
 #gameScreen .game-header{grid-column:1;grid-row:2}#gameScreen .game-meta-slot{grid-column:1;grid-row:3}#gameScreen .game-bonus-tools{grid-column:1;grid-row:4}#gameScreen .rush-hud>img{display:none}#gameScreen .free-spin-buy{width:128px;max-width:58%;padding:2px}#gameScreen .free-spin-buy img{width:21px}
 #gameScreen .board-stage{grid-column:2;grid-row:1/-1;align-self:center;justify-self:center;margin:0}#gameScreen .booster-bar{grid-column:1;grid-row:5;align-self:end;height:104px;min-height:104px;display:grid;grid-template-columns:1fr 1fr}#gameScreen .booster{height:45px;min-height:45px}
 #gameScreen .play-notice{left:calc(var(--game-sidebar) + 18px);bottom:8px}#gameScreen .booster-instruction{left:calc(var(--game-sidebar) + 18px);bottom:38px}
 #bonusModal .bonus-card{--bonus-landscape:1;--bonus-sidebar:215px;max-width:1040px;display:grid;grid-template-columns:var(--bonus-sidebar) minmax(0,1fr);grid-template-rows:42px 54px minmax(26px,1fr) 56px 42px;column-gap:15px;row-gap:7px;padding:10px}
 #bonusModal .bonus-title{grid-column:1;grid-row:1}.bonus-logo{display:block;width:39px;height:25px}#bonusModal .bonus-title h2{font-size:22px}.bonus-dashboard{grid-column:1;grid-row:2;height:54px;min-height:54px;gap:5px}.bonus-meter>small{font-size:10px}.bonus-meter>strong{font-size:24px}.bonus-meter>span{font-size:9px}
 .bonus-stage{grid-column:2;grid-row:1/-1;align-self:center;justify-self:center;margin:0}.bonus-earned{grid-column:1;grid-row:3;align-self:center}.bonus-bank{grid-column:1;grid-row:4}.bonus-actions{grid-column:1;grid-row:5}.bonus-rule img{width:23px;height:23px}.bonus-rule{padding:2px 4px}.bonus-rule strong{font-size:14px}
 #bonusModal #bonusHint{display:none}
}
.app-shell.reduced-fx .gem-high .bonus-symbol,.app-shell.reduced-fx .gem-arrival .bonus-symbol,.app-shell.reduced-fx .bonus-reveal.show{animation:none}
@media(prefers-reduced-motion:reduce){.gem-high .bonus-symbol,.gem-arrival .bonus-symbol{animation:none}.bonus-reveal.show{animation:none;display:none}}

.bonus-intro-modal{z-index:106!important;background:#150723!important;padding:0!important;overflow:hidden}.bonus-intro-modal video{width:100%;height:100%;object-fit:contain;background:#150723}.bonus-intro-controls{position:absolute;left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:6px;align-items:center;background:linear-gradient(transparent,#150723e8);padding:20px 8px 4px;pointer-events:none}.bonus-intro-controls>*{pointer-events:auto}.bonus-intro-controls p{font-size:12px;color:#fff5d3;text-shadow:0 1px 4px #000;text-align:center;margin:0}.bonus-intro-controls button{min-height:35px;font-size:14px;padding:5px 16px;width:auto;max-width:100%}.bonus-intro-controls .text-button{color:#fff5d3;text-shadow:0 1px 3px #000}

#gameScreen #gameLevelTitle{white-space:nowrap}#gameScreen #gameWorldName{max-width:100%;overflow:hidden;text-overflow:ellipsis}.wallet-hero strong{max-width:100%;font-size:clamp(25px,8vw,37px);overflow-wrap:anywhere}
