:root{--bh:0px;--ink:#3b2160;--pink:#ff6fae;--mint:#3fe0b0;--sat:env(safe-area-inset-top,0px);--sab:env(safe-area-inset-bottom,0px);--ban:56px}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
html,body{margin:0;height:100%;overflow:hidden;background:#ffd6ea;font-family:Fredoka,'Arial Rounded MT Bold',system-ui,sans-serif;color:#fff;touch-action:none;overscroll-behavior:none}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer;padding:0}
#app{position:fixed;inset:0;overflow:hidden;max-width:620px;margin:0 auto}
@media(min-width:621px){html,body{background:linear-gradient(160deg,#ffc2e0,#c8b6ff 60%,#9fe8ff)}#app{box-shadow:0 0 60px #6a3a9a55}}
#c{position:absolute;inset:0;width:100%;height:100%;display:block}
.hide{display:none!important}
.coin{display:inline-block;width:1.15em;height:1.15em;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff6b0,#ffd23a 40%,#f0a400 75%,#c97a00);box-shadow:inset 0 -2px 0 #b86d00,0 1px 0 #0002;position:relative;vertical-align:middle}
.coin::after{content:'';position:absolute;inset:26%;border-radius:50%;border:2px solid #fff3;box-shadow:inset 0 0 0 1px #c97a0055}
.coin.big{width:46px;height:46px}
.gem{display:inline-block;width:1.1em;height:1.1em;background:linear-gradient(135deg,#bff6ff,#3cc8ff 45%,#7a5cff);clip-path:polygon(50% 0,100% 38%,50% 100%,0 38%);vertical-align:middle}
.cnt{font-weight:700}
/* labels above crowds */
#labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.lab{position:absolute;left:0;top:0;padding:1px 10px 2px;border-radius:12px;font-weight:700;font-size:19px;line-height:1.15;background:#1f4fe0;box-shadow:0 2px 0 #12308f,0 3px 8px #0003;transform:translate(-50%,-100%);white-space:nowrap;will-change:transform}
.lab::after{content:'';position:absolute;left:50%;bottom:-6px;margin-left:-6px;border:6px solid transparent;border-top-color:#1f4fe0;border-bottom:0}
.lab.e{background:#d81f48;box-shadow:0 2px 0 #8a0f2b,0 3px 8px #0003}.lab.e::after{border-top-color:#d81f48}
.lab.pop{animation:lpop .25s}
@keyframes lpop{50%{scale:1.3}}
.fx{position:absolute;font-weight:700;font-size:26px;pointer-events:none;text-shadow:0 2px 0 #3b2160,0 0 8px #0005;animation:fxup 1s ease-out forwards;transform:translate(-50%,-50%)}
@keyframes fxup{to{translate:0 -70px;opacity:0}}
/* HUD */
#hud{position:absolute;inset:0;pointer-events:none}
#hud>*{pointer-events:auto}
.round{position:absolute;width:46px;height:46px;border-radius:50%;background:#ffffffd9;box-shadow:0 3px 0 #c59ad8,0 4px 10px #0002;display:grid;place-items:center}
#bPause{left:12px;top:calc(10px + var(--sat))}
.ic-pause{width:16px;height:18px;border-left:6px solid var(--ink);border-right:6px solid var(--ink)}
#prog{position:absolute;left:50%;top:calc(18px + var(--sat));transform:translateX(-50%);display:flex;align-items:center;gap:0;width:58%;max-width:300px}
#prog .bar{flex:1;height:12px;border-radius:8px;background:#ffffffaa;box-shadow:inset 0 2px 0 #0001;overflow:hidden;margin:0 -4px}
#prog .bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#ff6fae,#ffb347);border-radius:8px}
#progL{z-index:1;width:30px;height:30px;border-radius:50%;background:#ff6fae;display:grid;place-items:center;font-weight:700;font-size:15px;box-shadow:0 2px 0 #c43f80;border:3px solid #fff}
#prog .flag{z-index:1;width:30px;height:30px;border-radius:50%;border:3px solid #fff;background:conic-gradient(#3b2160 0 25%,#fff 0 50%,#3b2160 0 75%,#fff 0);background-size:12px 12px;box-shadow:0 2px 0 #0003}
.pills{position:absolute;right:12px;top:calc(12px + var(--sat));display:flex;gap:6px}
.pills.col{flex-direction:column;align-items:flex-end;position:static}
.pill{display:flex;align-items:center;gap:6px;padding:3px 6px 3px 14px;min-width:92px;justify-content:flex-end;border-radius:20px;background:#1d1240cc;border:1px solid #ffffff30;font-size:19px;box-shadow:inset 0 -2px 0 #0003}
.pill em{font-style:normal;width:22px;height:22px;border-radius:50%;background:#ffd24a;display:grid;place-items:center;font-size:18px;line-height:1;color:#5a3300;font-weight:700;margin-left:2px}
#bossBar{position:absolute;left:50%;top:calc(60px + var(--sat));transform:translateX(-50%);width:62%;text-align:center;font-weight:700;font-size:14px;text-shadow:0 2px 0 #3b2160}
#bossBar .bar{height:14px;border-radius:9px;background:#3b2160aa;border:2px solid #fff;overflow:hidden;margin-top:3px}
#bossBar i{display:block;height:100%;width:100%;background:linear-gradient(#c77dff,#8d3bd6);transition:width .15s}
/* menu */
#menu{position:absolute;inset:0;pointer-events:none}
#menu button,#menu .ups{pointer-events:auto}
.mtop{position:absolute;left:0;right:0;top:calc(10px + var(--sat));display:flex;justify-content:space-between;align-items:flex-start;padding:0 12px}
.mtop .round{position:static}
.ic-gear{width:24px;height:24px;border-radius:50%;border:6px dotted var(--ink);box-shadow:inset 0 0 0 3px var(--ink)}
.mlevel{text-align:center;margin-top:2px;text-shadow:0 2px 0 #b2417c,0 0 10px #0003}
.mlevel small{display:block;font-size:13px;letter-spacing:.12em;opacity:.95}
.mlevel b{font-size:30px;letter-spacing:.03em}
#stages{position:absolute;left:50%;top:calc(76px + var(--sat));transform:translateX(-50%);display:flex;align-items:center;gap:6px;padding:6px 10px;border-radius:18px;background:#3b216099}
#stages i{width:22px;height:12px;border-radius:6px;background:#ffffff55}
#stages i.done{background:#ffd24a}#stages i.cur{background:#fff;box-shadow:0 0 0 2px #ff6fae}
#stages .boss{width:30px;height:30px;border-radius:50%;background:#8d3bd6;border:2px solid #fff;display:grid;place-items:center;font-size:16px}
#stages .boss.cur{box-shadow:0 0 0 3px #ff6fae,0 0 12px #ff6fae}
.rails{position:absolute;left:0;right:0;top:calc(132px + var(--sat));display:flex;justify-content:space-between;padding:0 8px}
.rail{display:flex;flex-direction:column;gap:10px}
.rb{position:relative;width:78px;height:74px;border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding-bottom:5px;font-size:13px;letter-spacing:.03em;box-shadow:inset 0 -5px 0 #0002,0 3px 0 #0003,0 6px 12px #0002;text-shadow:0 1px 0 #0004}
.rb:active,.btn:active,.up:active{transform:translateY(2px)}
.rbi{width:40px;height:38px;margin-bottom:3px;background:center/contain no-repeat}
.c-pink{background:linear-gradient(#ff8fc4,#f2569c)}.c-orange{background:linear-gradient(#ffb26b,#ff7a3d)}.c-teal{background:linear-gradient(#5ff0d0,#18b79b)}
.c-lime{background:linear-gradient(#b8f26a,#5cc52f)}.c-violet{background:linear-gradient(#b59cff,#7a55e8)}.c-gold{background:linear-gradient(#ffe06a,#ffb000)}
.dot{position:absolute;right:-4px;top:-4px;width:18px;height:18px;border-radius:50%;background:#ff3b5c;border:2px solid #fff;animation:pul 1s infinite}
@keyframes pul{50%{scale:1.2}}
.ic-drop{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cdefs%3E%3CradialGradient id='g' cx='.35' cy='.35'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.3' stop-color='%23ffe066'/%3E%3Cstop offset='.6' stop-color='%23ff6fae'/%3E%3Cstop offset='1' stop-color='%237a55e8'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M20 3C27 13 33 19 33 26a13 13 0 0 1-26 0c0-7 6-13 13-23z' fill='url(%23g)' stroke='%23fff' stroke-width='2.5'/%3E%3C/svg%3E")}
.ic-noads{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='16' fill='none' stroke='%23fff' stroke-width='4'/%3E%3Ctext x='20' y='25' font-family='Arial' font-weight='bold' font-size='13' fill='%23fff' text-anchor='middle'%3EADS%3C/text%3E%3Cpath d='M9 9l22 22' stroke='%23fff' stroke-width='4'/%3E%3C/svg%3E")}
.ic-wheel{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg stroke='%23fff' stroke-width='2'%3E%3Cpath d='M20 20L20 3A17 17 0 0 1 37 20z' fill='%23ff6fae'/%3E%3Cpath d='M20 20L37 20A17 17 0 0 1 20 37z' fill='%23ffe066'/%3E%3Cpath d='M20 20L20 37A17 17 0 0 1 3 20z' fill='%237a55e8'/%3E%3Cpath d='M20 20L3 20A17 17 0 0 1 20 3z' fill='%232f63ff'/%3E%3C/g%3E%3Ccircle cx='20' cy='20' r='4' fill='%23fff'/%3E%3C/svg%3E")}
.ic-hat{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M8 36c0-12 5-21 12-21s12 9 12 21z' fill='%238fb0ff' stroke='%23fff' stroke-width='2.5'/%3E%3Ccircle cx='16' cy='25' r='3' fill='%23fff'/%3E%3Ccircle cx='24' cy='25' r='3' fill='%23fff'/%3E%3Cpath d='M11 15l3-9 6 6 6-6 3 9z' fill='%23ffd23a' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E")}
.ic-castle{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M5 37V16h6v4h4v-4h3v-5h4v5h3v4h4v-4h6v21z' fill='%23ffd6f0' stroke='%23fff' stroke-width='2'/%3E%3Cpath d='M17 37v-8a3 3 0 0 1 6 0v8z' fill='%237a55e8'/%3E%3Cpath d='M20 11V3l6 3-6 3' fill='%23ff6fae' stroke='%23fff'/%3E%3C/svg%3E")}
.ic-bag{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M7 14h26l-2 22H9z' fill='%23fff7d6' stroke='%23fff' stroke-width='2'/%3E%3Cpath d='M14 14a6 6 0 0 1 12 0' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Ccircle cx='20' cy='25' r='6' fill='%23ffd23a' stroke='%23f0a400' stroke-width='2'/%3E%3C/svg%3E")}
#hint{position:absolute;left:50%;top:41%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;font-size:22px;text-shadow:0 2px 0 #b2417c;white-space:nowrap}
#hint .arr{font-size:40px;line-height:1;animation:arr 1s infinite alternate}
#hint .arr:first-child{animation-direction:alternate-reverse}
@keyframes arr{to{translate:6px}}
#hint .hand{position:absolute;left:50%;top:34px;width:36px;height:42px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 42'%3E%3Cpath d='M13 4a3 3 0 0 1 6 0v14l2-1a3 3 0 0 1 4 2l1 1a3 3 0 0 1 4 2v1a3 3 0 0 1 3 3v6c0 6-4 10-10 10h-4c-4 0-7-2-9-5l-7-10a3 3 0 0 1 4-4l6 4z' fill='%23fff' stroke='%233b2160' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;animation:hand 1.6s ease-in-out infinite}
@keyframes hand{0%,100%{translate:-90%}50%{translate:-10%}}
.ups{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(var(--ban) + var(--sab) + var(--bh) + 14px);display:flex;gap:14px}
.up{width:118px;border-radius:16px;background:linear-gradient(#5b86ff,#1f4fe0);box-shadow:inset 0 -5px 0 #0002,0 4px 0 #12308f,0 8px 14px #0003;padding:6px 6px 0;position:relative;text-align:left;overflow:hidden}
.up.gold{background:linear-gradient(#ffc24a,#ff8a1f);box-shadow:inset 0 -5px 0 #0002,0 4px 0 #c35d00,0 8px 14px #0003}
.ul{font-size:12px;line-height:1}.ul b{display:block;font-size:22px}
.uic{position:absolute;right:6px;top:4px;width:58px;height:62px;background:center/contain no-repeat}
.uic.jelly{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 60'%3E%3Cdefs%3E%3CradialGradient id='g' cx='.35' cy='.3'%3E%3Cstop offset='0' stop-color='%23d6e2ff'/%3E%3Cstop offset='.5' stop-color='%232f63ff'/%3E%3Cstop offset='1' stop-color='%23122f9e'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M6 56c-3-16 3-46 19-46s22 30 19 46z' fill='url(%23g)'/%3E%3Ccircle cx='18' cy='30' r='5' fill='%23fff'/%3E%3Ccircle cx='32' cy='30' r='5' fill='%23fff'/%3E%3Ccircle cx='19' cy='31' r='2.6' fill='%233b2160'/%3E%3Ccircle cx='31' cy='31' r='2.6' fill='%233b2160'/%3E%3Cpath d='M20 40q5 4 10 0' stroke='%233b2160' stroke-width='2' fill='none'/%3E%3C/svg%3E")}
.uic.coins{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 60'%3E%3Cg stroke='%23c97a00' stroke-width='2'%3E%3Ccircle cx='30' cy='36' r='15' fill='%23ffd23a'/%3E%3Ccircle cx='16' cy='22' r='10' fill='%23ffe066'/%3E%3Ccircle cx='38' cy='12' r='7' fill='%23ffe066'/%3E%3C/g%3E%3Ctext x='30' y='42' font-family='Arial' font-weight='bold' font-size='16' fill='%23c97a00' text-anchor='middle'%3E$%3C/text%3E%3C/svg%3E")}
.un{font-size:15px;margin-top:20px;text-shadow:0 1px 0 #0003}
.uc{margin:5px -6px 0;padding:5px 8px;background:linear-gradient(#fff3c2,#ffd24a);display:flex;align-items:center;justify-content:center;gap:5px;font-size:18px;color:#5a3300}
.uc i{font-style:normal;font-size:14px}
.up.off .uc{background:#c9c2d6;color:#6a5f7a}
.up.max .uc{background:#ffd23a}
/* panels */
#panel{position:absolute;inset:0;background:#2a124acc;display:grid;place-items:center;padding:16px;padding-bottom:calc(var(--ban) + var(--sab) + 16px);z-index:20;animation:fade .2s}
@keyframes fade{from{opacity:0}}
.pbox{width:100%;max-width:420px;max-height:100%;overflow:auto;border-radius:24px;background:linear-gradient(#fff,#fff1f8);color:var(--ink);box-shadow:0 8px 0 #c59ad8,0 16px 40px #0005;padding:0 16px 18px;animation:popin .25s cubic-bezier(.3,1.6,.5,1)}
@keyframes popin{from{scale:.7}}
.phead{position:sticky;top:0;display:flex;align-items:center;justify-content:center;padding:14px 0 10px;background:inherit;z-index:2}
.phead h2{margin:0;font-size:26px;color:#ff4d9a;text-shadow:0 2px 0 #ffd0e6}
.x{position:absolute;right:-4px;top:10px;width:38px;height:38px;border-radius:50%;background:#ff6fae;color:#fff;font-size:18px;box-shadow:0 3px 0 #c43f80}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.tile{border-radius:16px;background:#f4ecff;padding:8px 4px 6px;text-align:center;font-size:13px;position:relative;box-shadow:inset 0 -3px 0 #0001;min-height:110px;display:flex;flex-direction:column;align-items:center;justify-content:space-between}
.tile.sel{box-shadow:0 0 0 3px #1f4fe0,inset 0 -3px 0 #0001;background:#e8eeff}
.tile canvas{width:72px;height:72px}
.tile .sw{width:56px;height:56px;border-radius:50% 50% 46% 46%/60% 60% 40% 40%;margin:6px auto;box-shadow:inset -6px -8px 0 #0002,inset 6px 6px 0 #fff6}
.tile .pr{display:flex;align-items:center;gap:3px;font-weight:700;font-size:15px}
.tile .tag{position:absolute;left:6px;top:6px;font-size:10px;background:#ff6fae;color:#fff;border-radius:8px;padding:1px 6px}
.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;border-radius:18px;font-size:21px;font-weight:700;color:#fff;margin-top:10px;text-shadow:0 2px 0 #0003}
.btn.big{min-height:62px;font-size:25px}
.btn.green{background:linear-gradient(#5b86ff,#1f4fe0);box-shadow:inset 0 -5px 0 #0002,0 4px 0 #12308f}
.btn.blue{background:linear-gradient(#a98cf2,#6c4ad6);box-shadow:inset 0 -5px 0 #0002,0 4px 0 #43289a}
.btn.pink{background:linear-gradient(#ff9ccc,#f2569c);box-shadow:inset 0 -5px 0 #0002,0 4px 0 #b9306e}
.btn.gold{background:linear-gradient(#ffe06a,#ffaa00);box-shadow:inset 0 -5px 0 #0002,0 4px 0 #c27a00;color:#5a3300;text-shadow:none}
.btn[disabled]{filter:grayscale(1);opacity:.6}
.ic-video{width:28px;height:20px;border-radius:5px;background:#fff;position:relative}
.ic-video::after{content:'';position:absolute;left:10px;top:5px;border:5px solid transparent;border-left:8px solid #1f4fe0}
.link{display:block;margin:12px auto 0;font-size:17px;color:#fff;opacity:.85;text-decoration:underline}
.pbox .link{color:var(--ink)}
.row{display:flex;align-items:center;gap:10px;padding:10px;border-radius:16px;background:#f4ecff;margin-top:8px}
.row .t{flex:1;font-weight:600}.row .t small{display:block;font-weight:500;opacity:.7;font-size:12px}
.row .btn{width:auto;min-width:96px;margin:0;min-height:44px;font-size:17px;padding:0 12px}
.tog{width:58px;height:32px;border-radius:16px;background:#c9c2d6;position:relative;transition:.2s}
.tog::after{content:'';position:absolute;left:3px;top:3px;width:26px;height:26px;border-radius:50%;background:#fff;transition:.2s;box-shadow:0 2px 3px #0003}
.tog.on{background:#1f4fe0}.tog.on::after{left:29px}
.seg{display:flex;gap:4px}.seg button{padding:6px 9px;border-radius:10px;background:#fff;font-size:13px;font-weight:600}.seg button.on{background:#ff6fae;color:#fff}
.links{display:flex;justify-content:center;gap:16px;margin-top:14px;font-size:14px}.links a{color:#7a55e8}
/* build */
.kingdom{position:relative;width:100%;aspect-ratio:2/3;max-height:46vh;border-radius:18px;overflow:hidden;background:#ffe7f3;margin:0 auto}
.kingdom img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.kingdom .ghost{filter:grayscale(1) brightness(1.3);opacity:.35}
.kingdom .lvl{position:absolute;left:10px;top:10px;background:#3b2160cc;color:#fff;border-radius:12px;padding:3px 10px;font-weight:700;font-size:14px}
.kbar{height:14px;border-radius:8px;background:#eadcf8;overflow:hidden;margin:10px 0 4px}.kbar i{display:block;height:100%;background:linear-gradient(90deg,#3fe0b0,#7a55e8)}
/* wheel */
.wheel{position:relative;width:260px;height:260px;margin:6px auto}
.wheel canvas{width:100%;height:100%;transition:transform 4s cubic-bezier(.15,.9,.2,1)}
.wheel::after{content:'';position:absolute;left:50%;top:-6px;margin-left:-14px;border:14px solid transparent;border-top:26px solid #3b2160;border-bottom:0}
/* results */
.res{position:absolute;inset:0;display:grid;place-items:center;background:radial-gradient(circle,#3b216066,#2a124ad9);z-index:15;padding:16px;padding-bottom:calc(var(--ban) + var(--sab) + 12px);animation:fade .3s}
.rbox{width:100%;max-width:360px;text-align:center}
.rbox.small{max-width:300px}
.ribbon{display:inline-block;padding:10px 26px;font-size:28px;font-weight:700;background:linear-gradient(#ff8fc4,#f2569c);border-radius:14px;box-shadow:0 5px 0 #b9306e;transform:rotate(-2deg);margin-bottom:10px}
.ribbon.red{background:linear-gradient(#b59cff,#7a55e8);box-shadow:0 5px 0 #4f2fb0}
.chest{width:210px;height:200px;margin:0 auto;background:url(a/ui/chest.webp?v=1) center/contain no-repeat;animation:bob 1.6s ease-in-out infinite;filter:drop-shadow(0 10px 24px #ffb30066)}
.sad{width:120px;height:130px;margin:8px auto;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 60'%3E%3Cdefs%3E%3CradialGradient id='g' cx='.35' cy='.3'%3E%3Cstop offset='0' stop-color='%23d6e2ff'/%3E%3Cstop offset='.5' stop-color='%232f63ff'/%3E%3Cstop offset='1' stop-color='%23122f9e'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M4 58c-1-20 5-40 21-40s22 20 21 40z' fill='url(%23g)'/%3E%3Ccircle cx='18' cy='34' r='5' fill='%23fff'/%3E%3Ccircle cx='32' cy='34' r='5' fill='%23fff'/%3E%3Ccircle cx='18' cy='36' r='2.6' fill='%233b2160'/%3E%3Ccircle cx='32' cy='36' r='2.6' fill='%233b2160'/%3E%3Cpath d='M19 48q6-5 12 0' stroke='%233b2160' stroke-width='2' fill='none'/%3E%3Cpath d='M14 41q-1 4 1 6' stroke='%2366d0ff' stroke-width='3' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;animation:bob 2s ease-in-out infinite}
@keyframes bob{50%{translate:0 -8px}}
.earn{display:flex;align-items:center;justify-content:center;gap:10px;font-size:52px;font-weight:700;text-shadow:0 3px 0 #b2417c}
.mult{font-size:18px;opacity:.95;margin-bottom:4px}
.extra{display:flex;justify-content:center;gap:12px;font-size:18px;margin-bottom:4px}
.res p{font-size:17px;line-height:1.35;margin:8px 0}
/* banner */
#banner{position:absolute;left:0;right:0;bottom:var(--sab);height:var(--ban);display:flex;align-items:center;justify-content:center;z-index:30;pointer-events:none}
body.nob #banner,body.native #banner{display:none}
body.nob,body.native{--ban:0px}
body.native:not(.bnr){--bh:0px}
#houseAd{pointer-events:auto;display:flex;align-items:center;gap:8px;width:min(330px,94%);height:50px;border-radius:8px;background:#fff;color:#222;text-decoration:none;padding:4px 8px 4px 4px;box-shadow:0 2px 8px #0003;font-size:13px;position:relative;overflow:hidden}
#houseAd img{width:42px;height:42px;border-radius:9px;object-fit:cover}
#houseAd b{display:block;font-size:14px}#houseAd small{color:#666}
#houseAd .go{margin-left:auto;background:#1f4fe0;color:#fff;border-radius:14px;padding:5px 12px;font-weight:700}
#houseAd .adl{position:absolute;right:2px;top:1px;font-size:9px;color:#1a73e8;border:1px solid #1a73e8;border-radius:3px;padding:0 2px;line-height:1.2}
#adBox{position:absolute;inset:0;z-index:50;background:#120822f2;display:grid;place-items:center;text-align:center}
.adn{font-size:80px;font-weight:700;margin:16px}
#adSkip{opacity:.7;text-decoration:underline}
#toast{position:absolute;left:50%;top:42%;transform:translateX(-50%);background:#3b2160ee;padding:12px 18px;border-radius:16px;font-size:17px;z-index:60;text-align:center;max-width:86%}
#loader{position:absolute;inset:0;z-index:70;overflow:hidden;background:radial-gradient(120% 80% at 50% 38%,#3f6cff 0%,#2337b8 38%,#160d5c 75%,#0d0638 100%);transition:opacity .45s}
#loader.out{opacity:0;pointer-events:none}
#loader .lglow{position:absolute;left:50%;top:42%;width:150vw;height:90vw;max-width:900px;max-height:560px;transform:translate(-50%,-50%);background:radial-gradient(closest-side,#ff6fae40,#7aa0ff26 55%,transparent);animation:lglow 3s ease-in-out infinite}
@keyframes lglow{50%{opacity:.55;scale:1.08}}
#loader .lg{position:absolute;left:50%;top:42%;width:min(80vw,340px);height:auto;transform:translate(-50%,-50%);filter:drop-shadow(0 10px 18px #05021d99);animation:lbreathe 2.6s ease-in-out infinite}
@keyframes lbreathe{50%{scale:1.035}}
#loader .sp{position:absolute;width:14px;height:14px;opacity:0;background:conic-gradient(from 45deg,transparent 0 10%,#fff 12%,transparent 14% 35%,#fff 37%,transparent 39% 60%,#fff 62%,transparent 64% 85%,#fff 87%,transparent 89%);border-radius:50%;filter:drop-shadow(0 0 4px #fff);animation:ltw 2.8s ease-in-out infinite}
#loader .sp::after{content:"";position:absolute;inset:4px;border-radius:50%;background:#fff}
@keyframes ltw{0%,100%{opacity:0;scale:.3}40%{opacity:.95;scale:1}70%{opacity:0;scale:.5}}
#loader .lfoot{position:absolute;left:0;right:0;top:calc(42% + min(80vw,340px)*.32 + 30px);display:flex;flex-direction:column;align-items:center;gap:12px}
.lbar{position:relative;width:min(66vw,270px);height:26px;padding:4px;border-radius:999px;background:linear-gradient(#0a0630,#251b66);box-shadow:0 0 0 3px #ffd45e,0 0 0 5px #8a5a00,inset 0 3px 7px #000a,0 10px 24px #0007}
.lbar i,#lbarF{display:block;height:100%;width:100% !important;border-radius:999px;transform-origin:0 50%;transform:scaleX(0);background:repeating-linear-gradient(-45deg,#ff4f93 0 8px,#ff8fbf 8px 16px);background-size:22.6px 22.6px;box-shadow:inset 0 -3px 0 #c01d63aa;animation:lstripe .6s linear infinite;position:relative;overflow:hidden}
#lbarF::after{content:"";position:absolute;left:4px;right:4px;top:2px;height:40%;border-radius:999px;background:linear-gradient(#ffffffaa,#fff0)}
@keyframes lstripe{to{background-position:22.6px 0}}
#lpct{position:absolute;inset:0;display:grid;place-items:center;font-size:14px;color:#fff;letter-spacing:.04em;text-shadow:0 1px 0 #3b0f2c,0 0 6px #0008}
#loader small{font-size:14px;color:#d6defe;letter-spacing:.02em;text-shadow:0 1px 0 #0006;padding:0 24px;text-align:center}
#fatal{position:absolute;inset:0;z-index:80;background:#3b2160;display:grid;place-items:center;text-align:center;padding:24px}
#fatal button{background:#3fe0b0;color:#0c4f3d;padding:12px 30px;border-radius:16px;font-weight:700;font-size:20px}
@media(max-height:640px){.rb{width:66px;height:60px;font-size:11px}.rbi{width:32px;height:30px}.rails{top:calc(118px + var(--sat))}.up{width:104px}.un{margin-top:12px}}

/* victory: the real 3D chest stays visible in the middle, title on top, reward at the bottom */
#win{display:flex;flex-direction:column;align-items:center;justify-content:space-between;background:linear-gradient(180deg,#1a0b3a99 0%,#1a0b3a00 18%,#1a0b3a00 46%,#1a0b3acc 72%,#1a0b3af2 100%);padding-top:calc(70px + var(--sat))}
#win .ribbon.top{font-size:30px;animation:popin .45s cubic-bezier(.3,1.6,.5,1)}
#win .rbox{animation:rise .45s .15s both}
@keyframes rise{from{transform:translateY(40px);opacity:0}}
#win .earn{text-shadow:0 3px 0 #b2417c,0 0 18px #ffc93c88}

/* ---------------- main menu, world map, bottom bar ---------------- */
:root{--nav:68px}
.ic-house,.ic-map,.ic-back,.ic-gift{display:inline-block;background:center/contain no-repeat}
.ic-house{width:24px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11L12 3l9 8v10h-6v-6H9v6H3z' fill='%233b2160'/%3E%3C/svg%3E")}
.ic-map{width:24px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5l6-2 8 3 6-2v15l-6 2-8-3-6 2z' fill='%233b2160'/%3E%3Cpath d='M8 3v15M16 6v15' stroke='%23fff' stroke-width='1.6'/%3E%3Ccircle cx='12' cy='10' r='2.3' fill='%23ff4d9a'/%3E%3C/svg%3E")}
.ic-back{width:22px;height:22px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 4l-8 8 8 8' fill='none' stroke='%233b2160' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
.ic-gift{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect x='5' y='15' width='30' height='22' rx='3' fill='%23ff4d9a' stroke='%23fff' stroke-width='2'/%3E%3Crect x='3' y='10' width='34' height='8' rx='2' fill='%23ff74c0' stroke='%23fff' stroke-width='2'/%3E%3Crect x='17' y='10' width='6' height='27' fill='%23ffd24a'/%3E%3Cpath d='M20 10c-4-8-12-6-9-1 2 2 9 1 9 1zm0 0c4-8 12-6 9-1-2 2-9 1-9 1z' fill='%23ffd24a' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E")}
.mtl{display:flex;gap:8px}.mtl .round{position:static;width:42px;height:42px}
#home,#map{position:absolute;inset:0;z-index:12}
#home{pointer-events:none;background:linear-gradient(180deg,#1a0b3a88 0%,#1a0b3a00 34%,#1a0b3a00 58%,#1a0b3ab0 100%)}
#home button{pointer-events:auto}
.htop{position:absolute;left:0;right:0;top:calc(10px + var(--sat));display:flex;justify-content:space-between;align-items:flex-start;padding:0 12px}
.htop .round{position:static}
.hlogo{position:absolute;left:50%;top:calc(58px + var(--sat));transform:translateX(-50%);width:min(76vw,340px);height:auto;filter:drop-shadow(0 10px 16px #1a0b3a77);animation:logoIn .7s cubic-bezier(.3,1.6,.5,1),bob 3s 1s ease-in-out infinite}
@keyframes logoIn{from{transform:translateX(-50%) scale(.4);opacity:0}}
.hside{position:absolute;top:calc(258px + var(--sat));display:flex;flex-direction:column;gap:12px}
.hside.l{left:10px}.hside.r{right:10px}
.hb{position:relative;width:76px;padding:8px 2px 6px;border-radius:18px;background:#ffffffe6;color:var(--ink);font-size:10.5px;letter-spacing:.02em;box-shadow:0 4px 0 #c59ad8,0 8px 16px #0003;display:flex;flex-direction:column;align-items:center;gap:3px}
.hb:active,.btn.play:active,#nav button:active{transform:translateY(2px)}
.hbi{width:40px;height:38px}
.hb .ic-drop,.hb .ic-noads{border-radius:12px}
.hb .ic-noads{background-color:#ff7a3d}
.hplay{position:absolute;left:0;right:0;bottom:calc(var(--ban) + var(--sab) + var(--bh) + var(--nav) + 16px);display:flex;flex-direction:column;align-items:center;gap:8px;padding:0 24px}
.hworld{font-size:15px;letter-spacing:.08em;text-shadow:0 2px 0 #3b2160,0 0 12px #0006}
.btn.play{width:min(78%,300px);flex-direction:column;gap:0;min-height:76px;border-radius:26px;background:linear-gradient(#ffe06a,#ffb000);color:#5a3300;text-shadow:0 1px 0 #fff8;box-shadow:inset 0 -6px 0 #0002,0 6px 0 #c27a00,0 14px 30px #0005;margin:0;animation:pulse 1.6s ease-in-out infinite}
.btn.play span{font-size:34px;line-height:1}.btn.play small{font-size:15px;opacity:.85}
@keyframes pulse{50%{transform:scale(1.04)}}
.hprog{width:min(70%,260px);height:12px;border-radius:8px;background:#ffffff44;border:2px solid #fff;overflow:hidden}.hprog i{display:block;height:100%;background:linear-gradient(90deg,#ff74c0,#ffd24a)}
.hprogt{font-size:13px;text-shadow:0 1px 0 #3b2160}
#nav{position:absolute;left:0;right:0;bottom:0;height:calc(var(--nav) + var(--ban) + var(--bh) + var(--sab));padding-bottom:calc(var(--ban) + var(--bh) + var(--sab) + 6px) !important;z-index:13;display:flex;align-items:flex-end;justify-content:space-around;padding:0 6px 6px;background:linear-gradient(#ffffffee,#f3e9ff);border-radius:22px 22px 0 0;box-shadow:0 -6px 20px #1a0b3a40}
#nav button{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;color:#6d5f8a;font-size:10.5px;letter-spacing:.03em;padding-top:8px}
#nav button i{width:28px;height:28px;background-size:contain}
#nav button.on{color:#1f4fe0}
#nav button.mid i{width:58px;height:58px;border-radius:50%;background-color:#1f4fe0;background-size:28px;border:4px solid #fff;box-shadow:0 4px 12px #1f4fe066;margin-top:-30px;filter:none}
#nav button.mid.on i,#nav button.mid i{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11L12 3l9 8v10h-6v-6H9v6H3z' fill='%23fff'/%3E%3C/svg%3E")}
#nav .dot{right:16%;top:0}
/* map */
#map{background:#1a0b3a;display:flex;flex-direction:column}
.mhead{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:calc(10px + var(--sat)) 12px 10px;background:linear-gradient(#1a0b3a,#1a0b3a00)}
.mhead .round{position:static}.mhead b{font-size:24px;letter-spacing:.05em;text-shadow:0 2px 0 #b2417c}
.mhead .pills{position:static}
#mScroll{position:absolute;inset:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;scrollbar-width:none}
#mScroll::-webkit-scrollbar{display:none}
#mList{display:flex;flex-direction:column-reverse;padding:80px 0 calc(var(--ban) + var(--sab) + var(--bh) + var(--nav) + 110px)}
.msec{position:relative;width:100%;aspect-ratio:2/3;background:center/cover no-repeat}
.msec.lock{filter:grayscale(.55) brightness(.7)}
.msec svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.msec .wlab{position:absolute;left:50%;top:3%;transform:translateX(-50%);padding:5px 16px;border-radius:16px;background:#1a0b3acc;font-size:14px;letter-spacing:.06em;white-space:nowrap;border:2px solid #ffffff55}
.mn{position:absolute;width:15%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;display:grid;place-items:center;font-size:clamp(16px,5vw,24px);font-weight:700;color:#fff;background:radial-gradient(circle at 35% 30%,#8fb0ff,#1f4fe0 60%,#12308f);border:4px solid #fff;box-shadow:0 5px 0 #0b1f66,0 8px 16px #0006}
.mn.done{background:radial-gradient(circle at 35% 30%,#fff3b0,#ffc93c 55%,#c88a12);color:#5a3300;box-shadow:0 5px 0 #8a5a00,0 8px 16px #0006}
.mn.lock{background:radial-gradient(circle at 35% 30%,#d8d0e6,#8d84a3);color:#fff9;box-shadow:0 5px 0 #5d5672}
.mn.cur{animation:pulse 1.2s ease-in-out infinite;box-shadow:0 5px 0 #0b1f66,0 0 0 6px #ffd24a88,0 0 26px #ffd24a}
.mn.boss{width:21%;font-size:clamp(14px,4vw,20px)}
.mn.boss::before{content:'';position:absolute;inset:-34% -20% 52%;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Cpath d='M6 38V14h7v5h5v-5h4V6h6v8h4v5h5v-5h7v24z' fill='%23ffd6f0' stroke='%23fff' stroke-width='2'/%3E%3Cpath d='M26 38v-9a4 4 0 0 1 8 0v9z' fill='%237a55e8'/%3E%3Cpath d='M30 6V0l7 3-7 3' fill='%23ff4d9a'/%3E%3C/svg%3E") center/contain no-repeat}
.mn .st{position:absolute;left:50%;bottom:-38%;transform:translateX(-50%);display:flex;gap:1px;font-size:13px;color:#ffd24a;text-shadow:0 1px 0 #8a5a00,0 0 4px #0008;white-space:nowrap}
.mn .st i{font-style:normal;color:#ffffff55}.mn .st i.on{color:#ffd24a}
.mav{position:absolute;width:20%;aspect-ratio:1;transform:translate(-50%,-112%);background:center/contain no-repeat;pointer-events:none;filter:drop-shadow(0 6px 8px #0007);transition:left .9s cubic-bezier(.4,0,.2,1),top .9s cubic-bezier(.4,0,.2,1);animation:hopav .7s ease-in-out infinite;z-index:3}
@keyframes hopav{50%{margin-top:-6px}}
#mPlay{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(var(--ban) + var(--sab) + var(--bh) + var(--nav) + 14px);z-index:3;animation:none}
#mList{position:relative}
.ic-up{display:inline-block;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l8 8h-5v9H9v-9H4z' fill='%233b2160'/%3E%3C/svg%3E")}
#nav button.on .ic-up{filter:invert(24%) sepia(90%) saturate(3000%) hue-rotate(220deg)}
.ic-factory{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M4 36V18l9 5v-5l9 5v-5l9 5V6h5v30z' fill='%23ff74c0' stroke='%23fff' stroke-width='2'/%3E%3Crect x='9' y='28' width='5' height='5' fill='%23ffd24a'/%3E%3Crect x='18' y='28' width='5' height='5' fill='%23ffd24a'/%3E%3Crect x='27' y='28' width='5' height='5' fill='%23ffd24a'/%3E%3Ccircle cx='33' cy='4' r='3' fill='%23fff'/%3E%3C/svg%3E")}
.hb small{font-size:12px;color:#c27a00;font-weight:700}
.up.more{width:88px;background:linear-gradient(#b59cff,#6c4ad6);box-shadow:inset 0 -5px 0 #0002,0 4px 0 #43289a,0 8px 14px #0003;text-align:center}
.up.more .un{margin-top:52px;font-size:13px;line-height:1.1}.up.more .uc{font-size:13px;background:#ffffffd9;color:#43289a}
.uic.ups3{left:50%;right:auto;transform:translateX(-50%);width:44px;height:48px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 44'%3E%3Cpath d='M20 2l14 14h-8v12H14V16H6z' fill='%23ffd24a' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3Crect x='8' y='32' width='24' height='5' rx='2.5' fill='%23fff'/%3E%3Crect x='11' y='39' width='18' height='4' rx='2' fill='%23ffffffaa'/%3E%3C/svg%3E")}
.ups{gap:10px}.ups .up:not(.more){width:112px}
.boosts{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(var(--ban) + var(--sab) + var(--bh) + 162px);display:flex;gap:10px;pointer-events:auto}
.bst{position:relative;width:54px;height:54px;border-radius:16px;background:#ffffffcc;box-shadow:0 3px 0 #c59ad8;display:grid;place-items:center;font-size:24px;opacity:.75}
.bst.on{background:linear-gradient(#fff3c2,#ffd24a);box-shadow:0 3px 0 #c27a00,0 0 0 3px #fff;opacity:1}
.bst b{position:absolute;right:-6px;top:-6px;min-width:22px;height:22px;border-radius:11px;background:#1f4fe0;color:#fff;font-size:13px;display:grid;place-items:center;border:2px solid #fff}
.ug .ugi{width:44px;height:44px;border-radius:14px;background:#fff;display:grid;place-items:center;font-size:24px;box-shadow:0 2px 0 #e2d4f5;flex:none}
.ug .t{font-size:16px}.ugv{color:#6c4ad6!important;opacity:1!important}.ugv b{color:#1f4fe0}
.ug .btn{min-width:92px;font-size:15px;gap:4px}
.ugh{margin:16px 0 4px;font-size:18px;color:#ff4d9a}.ugh small{display:block;font-size:12px;color:#6d5f8a;font-weight:500}
.ug .bb{display:flex;flex-direction:column;gap:6px}.ug .bb .btn{min-height:38px;min-width:86px}
.days{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:6px}
.day{border-radius:14px;background:#f4ecff;padding:6px 2px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:13px}
.day b{font-size:18px}.day em{font-style:normal;font-size:12px;display:flex;align-items:center;gap:2px}
.day.big{grid-column:span 2;background:linear-gradient(#fff3c2,#ffe08a)}
.day.got{opacity:.45}.day.got::after{content:'✓';color:#1f4fe0;font-weight:700}
.day.now{box-shadow:0 0 0 3px #1f4fe0;background:#e8eeff;animation:pulse 1.2s infinite}
.wst{display:block;font-size:34px;letter-spacing:4px;margin-bottom:2px}.wst i{font-style:normal;color:#ffffff44}.wst i.on{color:#ffd24a;text-shadow:0 2px 0 #c27a00,0 0 12px #ffd24a}
/* fixes 29 Nov: icons keep their pictures, boosters on the right column, nav icon colours, candy seam between map worlds */
.hbi{background-size:contain!important;background-position:center!important;background-repeat:no-repeat!important;background-color:transparent}
.hb .ic-noads{background-color:#ff7a3d!important}
.hb .ic-drop{background-color:transparent}
.boosts{left:auto;right:12px;transform:none;top:calc(402px + var(--sat));bottom:auto;flex-direction:column;gap:12px}
@media(max-height:640px){.boosts{top:calc(350px + var(--sat))}.bst{width:46px;height:46px;font-size:20px}}
#nav [data-nav=shop] i{background-color:#ffb000;border-radius:10px;background-size:80%;background-repeat:no-repeat;background-position:center}
#nav [data-nav=build] i{background-color:#8b6cf0;border-radius:10px;background-size:80%;background-repeat:no-repeat;background-position:center}
.msec::before{content:'';position:absolute;left:0;right:0;top:-9px;height:18px;background:repeating-linear-gradient(115deg,#ff74c0 0 14px,#fff 14px 28px);z-index:1;box-shadow:0 3px 10px #0006}
.msec:last-child::before{display:none}

/* ================= premium candy-glass theme for every panel (29 Nov) ================= */
#panel{background:radial-gradient(circle at 50% 30%,#3a1f8899,#0d0526e6)}
.pbox{position:relative;max-width:440px;color:#fff;padding:0 14px 18px;border-radius:28px;background:radial-gradient(130% 55% at 50% 0%,#6a48e8 0%,#3a1f99 38%,#22105e 75%,#1a0b48 100%);border:2px solid #ffffff38;box-shadow:inset 0 2px 0 #ffffff40,inset 0 0 40px #8a6cff40,0 0 0 5px #ffffff12,0 24px 60px #000a}
.pbox::before{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:radial-gradient(circle at 12% 8%,#ffffff22 0 2px,transparent 3px) 0 0/46px 46px,radial-gradient(circle at 70% 60%,#ffffff18 0 1.5px,transparent 2.5px) 0 0/38px 38px;opacity:.7}
.phead{padding:16px 0 12px;background:linear-gradient(#2e1880 0 70%,#2e188000)}
.phead h2{color:#fff;font-size:24px;letter-spacing:.04em;padding:8px 30px 9px;border-radius:16px;background:linear-gradient(#ff9fd0,#e8467f);box-shadow:inset 0 -4px 0 #0002,0 5px 0 #a3205e,0 10px 24px #e8467f66;text-shadow:0 2px 0 #a3205e}
.x{right:-2px;top:14px;background:linear-gradient(#ff9fd0,#e8467f);box-shadow:0 4px 0 #a3205e,0 0 0 3px #ffffff55}
.pbox .row{background:linear-gradient(135deg,#ffffff24,#ffffff0a);border:1px solid #ffffff26;color:#fff;border-radius:18px}
.pbox .row .t small{color:#d8ccff;opacity:1}
.pbox .link{color:#d8ccff}
.pbox p{color:#efe8ff}
.btn.dim{background:linear-gradient(#8b7bb8,#5d4f8a);box-shadow:inset 0 -4px 0 #0002,0 4px 0 #3b2f60;color:#e8e0ff}
.tile{background:linear-gradient(160deg,#ffffff26,#ffffff08);border:1px solid #ffffff2a;color:#fff;box-shadow:none}
.tile.sel{box-shadow:0 0 0 3px #ffd24a,0 0 18px #ffd24a66;background:linear-gradient(160deg,#ffd24a40,#ffffff10)}
.tile .tag{background:linear-gradient(#ff9fd0,#e8467f)}
.tile img{filter:drop-shadow(0 6px 8px #0006)}
.seg button{background:#ffffff1f;color:#fff}.seg button.on{background:linear-gradient(#ffe06a,#ffb000);color:#5a3300}
.links a{color:#ffd24a}
.kbar{background:#ffffff22}.kingdom{box-shadow:0 10px 30px #0006;border:2px solid #ffffff30}
.day{background:linear-gradient(160deg,#ffffff26,#ffffff08);border:1px solid #ffffff2a;color:#fff}
.day.big{background:linear-gradient(160deg,#ffe06a,#ff9f1c);color:#5a3300}
.day.now{box-shadow:0 0 0 3px #ffd24a,0 0 20px #ffd24a88;background:linear-gradient(160deg,#ffd24a44,#ffffff10)}
.day.got::after{color:#7ff0ff}
.wheel::after{border-top-color:#fff;filter:drop-shadow(0 3px 3px #0008)}
.wheel canvas{border-radius:50%;box-shadow:0 0 0 8px #ffd24a,0 0 0 12px #fff3,0 0 40px #ffd24a88}
/* shop */
.shopx img{object-fit:contain;filter:drop-shadow(0 8px 10px #0007)}
.sfree{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:22px;background:linear-gradient(120deg,#ff74c0,#7a55e8);box-shadow:inset 0 2px 0 #ffffff55,0 10px 24px #ff74c055;margin-top:4px}
.sfree img{width:66px;height:66px;flex:none}.sfree .t{flex:1}.sfree b{font-size:19px;display:block}.sfree small{font-size:12px;color:#fff;opacity:.9}
.sfree .btn{width:auto;margin:0;min-height:46px;font-size:17px;padding:0 12px}
.sh{margin:18px 2px 10px;font-size:14px;letter-spacing:.14em;color:#ffd24a;display:flex;align-items:center;gap:8px}
.sh::after{content:'';flex:1;height:2px;background:linear-gradient(90deg,#ffd24a88,transparent)}
.packs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.pack{position:relative;border-radius:20px;background:linear-gradient(180deg,#ffffff2a,#ffffff08);border:1px solid #ffffff2e;padding:16px 6px 8px;display:flex;flex-direction:column;align-items:center;text-align:center}
.pack img{width:84px;height:84px}
.pack b{font-size:22px;line-height:1.1;display:flex;align-items:center;gap:4px}.pack small{font-size:11px;color:#d8ccff}
.pack .btn{min-height:40px;font-size:15px;margin-top:8px}
.pack .rib{position:absolute;top:-9px;left:50%;transform:translateX(-50%);background:linear-gradient(#ff9fd0,#e8467f);font-size:10.5px;font-weight:700;letter-spacing:.05em;padding:3px 10px;border-radius:10px;white-space:nowrap;box-shadow:0 3px 0 #a3205e}
.pack.best{background:linear-gradient(180deg,#ffd24a55,#ffffff0a);border-color:#ffd24aaa;box-shadow:0 0 24px #ffd24a44}
.pack.best .rib{background:linear-gradient(#ffe06a,#ffb000);color:#5a3300;box-shadow:0 3px 0 #c27a00}
.gemrow{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.noadsx{display:flex;align-items:center;gap:10px;margin-top:16px;padding:10px 12px;border-radius:22px;background:linear-gradient(120deg,#ff8a3d,#e8467f);box-shadow:inset 0 2px 0 #ffffff55,0 10px 24px #e8467f55}
.noadsx img{width:62px;height:62px;flex:none}.noadsx .t{flex:1}.noadsx b{font-size:18px;display:block}.noadsx small{font-size:11.5px}
.noadsx .btn{width:auto;margin:0;padding:0 14px;min-height:46px;font-size:16px}
/* upgrades */
.ugtabs{display:flex;background:#00000040;border-radius:18px;padding:4px;margin:2px 0 14px;box-shadow:inset 0 2px 6px #0006}
.ugtabs button{flex:1;padding:10px;border-radius:14px;font-weight:700;color:#cfc3ff;letter-spacing:.05em}
.ugtabs button.on{background:linear-gradient(#ffe06a,#ffb000);color:#5a3300;box-shadow:0 3px 0 #c27a00}
.ugrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ugc{position:relative;border-radius:22px;padding:14px 8px 10px;background:linear-gradient(165deg,#ffffff2a,#ffffff08 60%);border:1px solid #ffffff2e;text-align:center;display:flex;flex-direction:column;align-items:center;gap:4px;overflow:hidden}
.ugc::before{content:'';position:absolute;left:50%;top:6px;width:110px;height:110px;margin-left:-55px;border-radius:50%;background:radial-gradient(circle,var(--c) 0%,transparent 68%);opacity:.45;pointer-events:none}
.ugc img{position:relative;width:82px;height:82px;object-fit:contain;filter:drop-shadow(0 8px 10px #0008)}
.ugc h4{position:relative;margin:2px 0 0;font-size:16px}
.ugc p{margin:0;font-size:11.5px;color:#d9ceff!important;line-height:1.25;min-height:29px}
.lvb{position:absolute;left:8px;top:8px;font-size:11px;font-weight:700;background:#00000050;border-radius:9px;padding:2px 8px;z-index:1}
.pips{display:flex;gap:3px;margin:3px 0 1px}.pips i{width:10px;height:6px;border-radius:3px;background:#ffffff2a}.pips i.on{background:linear-gradient(#ffe06a,#ffb000);box-shadow:0 0 6px #ffd24a}
.eff{font-size:13px}.eff b{color:#7ff0ff}
.ugc .btn{min-height:42px;font-size:16px;margin-top:6px;gap:4px}
.ugnote{font-size:13px;text-align:center;margin:0 0 10px;color:#d8ccff!important}
.bgrid{display:flex;flex-direction:column;gap:10px}
.bgc{position:relative;display:flex;align-items:center;gap:10px;padding:10px;border-radius:22px;background:linear-gradient(135deg,#ffffff2a,#ffffff08);border:1px solid #ffffff2e}
.bgc img{width:72px;height:72px;object-fit:contain;flex:none;filter:drop-shadow(0 6px 8px #0008)}
.bgc .own{position:absolute;left:62px;top:8px;background:#1f4fe0;border:2px solid #fff;border-radius:11px;padding:0 7px;font-size:13px;font-weight:700}
.bgc .t{flex:1}.bgc h4{margin:0;font-size:16px}.bgc p{margin:2px 0 0;font-size:12px;color:#d9ceff!important}
.bgc .bb{display:flex;flex-direction:column;gap:6px}.bgc .bb .btn{min-height:38px;min-width:88px;margin:0;font-size:15px;gap:4px}
.bst img{width:36px;height:36px;object-fit:contain}
/* map polish: glossy nodes, real castle on boss levels, ribbon labels */
.mn::after{content:'';position:absolute;left:16%;top:10%;width:42%;height:30%;border-radius:50%;background:linear-gradient(#ffffffb0,#ffffff00);pointer-events:none}
.mn.boss{width:24%;background:#2a1468 url(a/ui/castle.webp?v=1) center 30%/cover;font-size:0;border-color:#ffd24a;box-shadow:0 5px 0 #8a5a00,0 0 0 4px #ffffff55,0 10px 24px #0008}
.mn.boss::before{display:none}
.mn.boss.lock{filter:grayscale(.8) brightness(.75)}
.mn.boss .bn{position:absolute;left:50%;bottom:-16%;transform:translateX(-50%);font-size:13px;padding:1px 9px;border-radius:10px;background:linear-gradient(#ff9fd0,#e8467f);color:#fff;white-space:nowrap;box-shadow:0 2px 0 #a3205e}
.mn.boss.cur{box-shadow:0 5px 0 #8a5a00,0 0 0 6px #ffd24a,0 0 30px #ffd24a}
.mn.boss .st{bottom:-46%}
.msec .wlab{background:linear-gradient(#ff9fd0,#e8467f);border:2px solid #fff;box-shadow:0 4px 0 #a3205e,0 8px 18px #0006;font-weight:700;z-index:2}
.mhead{background:linear-gradient(#1a0b3af0,#1a0b3a00)}
.mstars{display:flex;align-items:center;gap:4px;padding:3px 12px;border-radius:20px;background:#1d1240cc;border:1px solid #ffffff30;font-size:17px;font-weight:700}.mstars i{font-style:normal;color:#ffd24a}
.hb img,.hbi img{width:100%;height:100%;object-fit:contain}
.rbi img,.uic img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 4px #0005)}
.day img{width:46px;height:46px;object-fit:contain;filter:drop-shadow(0 4px 5px #0006)}.day.big img{width:64px;height:64px}

/* ---------- live ops: home buttons, starter pack, missions, pet, league, key chests ---------- */
.hside{gap:8px;top:calc(236px + var(--sat))}
.hb{width:70px;padding:5px 2px 4px;font-size:9.5px;border-radius:16px}
.hbi{width:36px;height:34px}
@media(max-height:760px){.hside{top:calc(212px + var(--sat))}.hb{width:62px;padding:3px 1px}.hbi{width:30px;height:28px}.hlogo{width:min(64vw,290px)}}
.hoffer{position:absolute;left:10px;top:calc(66px + var(--sat));width:72px;padding:4px 2px 5px;border-radius:16px;background:linear-gradient(#ffe06a,#ff9f1c);color:#5a3300;display:flex;flex-direction:column;align-items:center;font-size:11px;box-shadow:0 4px 0 #c27a00,0 0 20px #ffd24a99;animation:pulse 1.4s infinite;z-index:2}
.hoffer img{width:46px;height:42px;object-fit:contain}.hoffer small{font-size:10px;font-weight:700}
.stp{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:14px;border-radius:24px;background:radial-gradient(circle at 50% 20%,#ffe06a55,#ffffff08 60%),linear-gradient(160deg,#ff74c0,#7a55e8);border:2px solid #ffd24a;box-shadow:0 0 30px #ffd24a55}
.stp img{width:150px;height:150px;object-fit:contain;filter:drop-shadow(0 10px 14px #0008);animation:bob 2s infinite}
.stp .t b{font-size:28px;display:block;text-shadow:0 3px 0 #a3205e}.stp ul{list-style:none;padding:0;margin:6px 0;display:grid;grid-template-columns:1fr 1fr;gap:4px 10px;font-size:13px;text-align:left}
.stp .stag{display:inline-block;font-size:11px;padding:3px 10px;border-radius:10px;background:#00000040;margin-bottom:4px}
.stp .btn s{opacity:.6;font-size:15px;margin-right:6px}
.msl{display:flex;flex-direction:column;gap:10px}
.msn{display:flex;align-items:center;gap:10px;padding:12px;border-radius:20px;background:linear-gradient(135deg,#ffffff24,#ffffff08);border:1px solid #ffffff26}
.msn .t{flex:1}.msn b{font-size:15px}.msn small{font-size:12px;color:#d8ccff}
.mbar{height:10px;border-radius:6px;background:#00000040;margin:6px 0 2px;overflow:hidden}.mbar i{display:block;height:100%;background:linear-gradient(90deg,#7ff0ff,#1f4fe0)}
.msn.ok{border-color:#ffd24a;box-shadow:0 0 16px #ffd24a44}.msn.ok .mbar i{background:linear-gradient(90deg,#ffe06a,#ffb000)}
.msn.got{opacity:.6}.chk{font-size:26px;color:#7ff0ff;width:60px;text-align:center}
.msn .btn{width:auto;margin:0;min-width:86px;min-height:44px;font-size:16px;gap:4px}
.mall{display:flex;align-items:center;gap:10px;margin-top:14px;padding:10px 12px;border-radius:20px;background:linear-gradient(120deg,#7a55e8,#3a1f99);border:1px dashed #ffffff55}
.mall.ok{background:linear-gradient(120deg,#ffb000,#e8467f);border-style:solid;animation:pulse 1.4s infinite}
.mall img{width:58px;height:58px;object-fit:contain}.mall .t{flex:1}.mall small{display:block;font-size:12px}
.mall .btn{width:auto;margin:0;min-width:80px;min-height:44px}
.petx{text-align:center}.pethero{display:flex;align-items:center;gap:12px;padding:12px;border-radius:22px;background:radial-gradient(circle at 25% 50%,#ffd24a44,transparent 60%),linear-gradient(135deg,#ffffff24,#ffffff08);border:1px solid #ffffff2a;text-align:left}
.pethero img{width:110px;height:110px;flex:none;animation:bob 1.8s infinite}.pethero b{font-size:20px;display:block}.pethero small{font-size:12px;color:#d8ccff}
.pips.big{justify-content:center;margin:12px 0}.pips.big i{width:22px;height:9px;border-radius:5px}
.lbp{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.lbp img{width:120px;height:120px;object-fit:contain;filter:drop-shadow(0 10px 14px #0008)}.lbp b{font-size:22px}.lbp small{font-size:12px;color:#d8ccff}
.lbp input{width:100%;font:700 22px Fredoka,sans-serif;text-align:center;padding:12px;border-radius:16px;border:2px solid #ffd24a;background:#00000040;color:#fff;user-select:text;-webkit-user-select:text}
.lbh{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:20px;background:linear-gradient(135deg,#ffd24a40,#ffffff08);border:1px solid #ffd24a88}
.lbh img{width:70px;height:70px;object-fit:contain}.lbh b{font-size:20px;display:block}.lbh small{display:block;font-size:12px;color:#fff3c2}
.lbprz{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:10px 0}.lbprz div{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 2px;border-radius:14px;background:#00000033;font-size:12px}.lbprz b{color:#ffd24a;font-size:13px}.lbprz i{width:14px;height:14px}
.lbl{display:flex;flex-direction:column;gap:6px}
.lbr{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:14px;background:linear-gradient(135deg,#ffffff1f,#ffffff08)}
.lbr b{width:30px;text-align:center}.lbr .nm{flex:1;font-weight:600}.lbr .sc{font-weight:700;color:#7ff0ff}
.lbr.t1{background:linear-gradient(135deg,#ffd24a66,#ffffff10)}.lbr.t2{background:linear-gradient(135deg,#d8d8f066,#ffffff10)}.lbr.t3{background:linear-gradient(135deg,#e0985066,#ffffff10)}
.lbr.me{box-shadow:0 0 0 2px #7ff0ff}
.kkeys{display:flex;justify-content:center;gap:10px;margin:2px 0 10px}.kkeys span{width:52px;height:52px;opacity:.25;filter:grayscale(1)}.kkeys span.on{opacity:1;filter:none;animation:pulse 1.4s infinite}.kkeys img{width:100%;height:100%;object-fit:contain}
.kgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.kc{aspect-ratio:1;border-radius:20px;background:linear-gradient(160deg,#ffffff24,#ffffff08);border:1px solid #ffffff2a;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;transition:transform .2s}
.kc img{width:72%;height:62%;object-fit:contain;filter:drop-shadow(0 6px 8px #0008)}
.kc:not(.open):active{transform:scale(.92)}
.kc.open{background:radial-gradient(circle,#ffd24a55,#ffffff08 70%);animation:popin .35s cubic-bezier(.3,1.6,.5,1)}.kc.open b{font-size:18px}
.kc.big{box-shadow:0 0 0 3px #ffd24a,0 0 30px #ffd24a}
.wkeys{display:inline-flex;gap:4px;vertical-align:middle}.wkeys img{width:30px;height:30px;opacity:.3;filter:grayscale(1)}.wkeys img.on{opacity:1;filter:none}
.tile .tag.w{background:linear-gradient(#9fd8ff,#3f6bff)}.tile .tag.p{background:linear-gradient(#ffe06a,#ff9f1c);color:#5a3300}

#bossBar{width:70%;padding-left:52px;position:absolute}
#bossBar img{position:absolute;left:0;top:-6px;width:50px;height:50px;border-radius:50%;border:3px solid #ffd24a;object-fit:cover;background:#3a0b5e;box-shadow:0 4px 10px #0006}
#bossBar .bar{height:16px;background:#1a0b3acc;border:2px solid #ffd24a;box-shadow:0 0 12px #8a2fd088}
#bossBar i{background:linear-gradient(#e07dff,#8a2fd0 60%,#5a1890)}

/* bottom dock: the ad sits INSIDE the dock under the tabs (owner 29 Nov: menu floated up with the AdMob banner under it) */
#nav::after{content:"";position:absolute;left:0;right:0;bottom:calc(var(--sab));height:calc(var(--ban) + var(--bh));background:linear-gradient(#e9defa,#f6f0ff);box-shadow:inset 0 2px 0 #d7c6f0,inset 0 3px 6px #5a3a9a22;pointer-events:none}
#adDock{position:absolute;left:0;right:0;bottom:0;height:calc(var(--ban) + var(--bh) + var(--sab));z-index:12;pointer-events:none;display:none;background:linear-gradient(#24124a,#140a30);box-shadow:0 -2px 0 #ffd45e88,0 -8px 18px #0006}
body:not(.native):not(.nob) #adDock,body.native.bnr #adDock{display:block}
