@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@500;600;700;800;900&family=Russo+One&display=swap');
:root{color-scheme:dark;--gold:#ffd78a;--teal:#79eadb;--ink:#e9f7ff;--muted:#9db7cd}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#091827}body{font:600 16px Nunito,Segoe UI,sans-serif;color:var(--ink);overflow-x:hidden}.world{position:fixed;inset:0;z-index:0;background:linear-gradient(#08142344,#08142311 65%,#08142388),url('assets/workshop.webp') center/cover no-repeat;background-color:#102d3e;pointer-events:none}.world:after{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at center,transparent 30%,#030c1c88 100%)}button,input,select{font:inherit}button{cursor:pointer;color:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:filter .16s,translate .16s,box-shadow .16s}button:disabled{cursor:default;filter:saturate(.25);opacity:.45}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #a5fff0;outline-offset:4px}button:hover:not(:disabled){filter:brightness(1.16)}button:active:not(:disabled){translate:0 3px}.square-button{display:grid;place-items:center;flex-shrink:0;width:48px;height:48px;border:1px solid #7190a7;border-bottom:4px solid #081721;border-radius:15px;background:linear-gradient(#355773,#18344c);box-shadow:inset 0 1px 0 #adcddd33,0 3px 9px #0005;font-size:27px;text-shadow:0 2px 1px #0008}.hud{position:relative;z-index:2;display:flex;align-items:center;gap:18px;padding:18px 28px;height:92px;background:linear-gradient(#071627db,#07162766,transparent)}.hud-title{display:flex;flex-direction:column}.hud-title>span{font-size:10px;font-weight:900;letter-spacing:2px;color:#a5c5d7}.hud-title strong{font-family:Russo One,Segoe UI,sans-serif;font-size:24px;font-weight:400;letter-spacing:.4px;text-shadow:0 2px 0 #0008}.wallets{display:flex;align-items:center;gap:12px;margin-left:auto}.wallet{display:flex;align-items:center;gap:10px;border:1px solid #6891a2;border-radius:15px;padding:8px 18px;min-height:45px;background:linear-gradient(#10283be6,#071c2be6);box-shadow:inset 0 2px 6px #0008,0 2px 0 #020d18;font-size:20px}.wallet b{font-weight:900;font-variant-numeric:tabular-nums}.wallet small{font-size:12px;color:#96b7cb}.stars-wallet>span{color:#ffdc86;text-shadow:0 0 12px #ffcc6477}.gem{color:#87ffe8;text-shadow:0 0 15px #38ffdc9c;font-size:25px}.gem-wallet{border-color:#3e928e}.map-screen{position:relative;z-index:1;display:grid;grid-template-columns:320px 1fr;gap:30px;max-width:1220px;min-height:calc(100dvh - 108px);margin:auto;padding:18px 35px 34px;align-items:center}.adventure-card{text-align:center;padding:30px 22px 24px;border:1px solid #a58d5e;border-radius:28px;background:linear-gradient(155deg,#153a51f2,#0c2234e8 65%);box-shadow:inset 0 0 0 5px #071727,inset 0 0 0 6px #7a755555,0 20px 60px #0006;position:relative}.tiny-label{font-size:11px;color:#a6cedb;letter-spacing:2px;font-weight:900}h1{font-family:Russo One,Segoe UI,sans-serif;color:#ffdea0;font-weight:400;font-size:43px;margin:12px 0 2px;letter-spacing:-1px;text-shadow:0 3px 0 #67472d,0 6px 16px #0008}.logo-subtitle{letter-spacing:4px;font-size:10px;color:#dfc79b;margin-top:10px}.mini-scene{height:220px;margin:0 -12px}.mini-scene canvas{width:100%;height:100%}h2{font-size:25px;margin:8px 0;font-weight:900;text-shadow:0 2px 3px #0005}.adventure-card p{font-size:14px;color:#b0cedb;line-height:1.5;min-height:42px;margin:12px 0 22px}.gold-button{width:100%;border:1px solid #ffe5ac;border-bottom:5px solid #996126;border-radius:16px;background:linear-gradient(#ffe6a5,#efb75c 70%,#db983e);color:#4b321d;padding:15px 18px;font-weight:900;font-size:17px;letter-spacing:.5px;box-shadow:inset 0 2px 0 #fff4d8,0 5px 0 #442d25,0 8px 23px #0005;text-shadow:0 1px 0 #ffffff50}.gold-button>span{margin-left:20px}.adventure-reward{display:flex;justify-content:center;gap:9px;margin:22px 0 0;color:#7ce3d2;font-size:17px}.adventure-reward>span{font-size:11px;max-width:175px;color:#8aaebf}.atlas{padding:25px 27px 19px;background:linear-gradient(145deg,#0b2033dc,#102b3bbd);border:1px solid #60829480;box-shadow:inset 0 0 0 5px #071e3144,0 20px 70px #0005;border-radius:28px}.atlas-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:25px}.atlas-heading h2{font-size:26px}.progress-medallion{white-space:nowrap;font-size:13px;background:#081a28;border:1px solid #56788d;border-radius:12px;padding:10px;color:#a7cbd6}.level-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:16px 12px}.level-cell{height:87px;position:relative;background:linear-gradient(#35516e,#20394e);border:1px solid #668da5;border-bottom:5px solid #0a192b;border-radius:18px;font-size:25px;font-weight:900;box-shadow:inset 0 2px 0 #d2eaff25,0 4px 8px #0004;text-shadow:0 2px 1px #0008}.level-cell small{display:block;font-size:13px;color:#ffd685;letter-spacing:2px;margin-top:4px}.level-cell.current{background:linear-gradient(#508895,#275366);border-color:#a6e7d3;box-shadow:inset 0 0 0 2px #a0f5d92b,0 0 20px #71eacf38}.level-cell.passed{border-color:#bb9d65;background:linear-gradient(#435766,#243a47)}.level-cell.locked{background:#102438aa;border-color:#334b5c;color:#668295;opacity:.72;box-shadow:inset 0 2px 6px #0005}.level-cell.locked small{color:#496675}.dim-star{color:#596c7c}.atlas-bottom{display:flex;align-items:center;justify-content:center;gap:18px;color:#8bafb9;font-size:12px;margin-top:22px}.atlas-bottom>span{color:#d8be7e}.game-screen{position:relative;max-width:1400px;min-height:calc(100dvh - 92px);margin:auto;display:flex;flex-direction:column}.game-screen[hidden],.map-screen[hidden]{display:none}.game-topline{display:flex;align-items:center;justify-content:space-between;padding:0 50px;min-height:80px}.moves-pill{display:flex;gap:10px;align-items:baseline;padding:10px 22px;background:#081b2cc7;border:1px solid #537387;border-radius:16px}.moves-pill b{font-size:27px;font-weight:900}.moves-pill>span{font-size:13px;color:#a3bdcc}.star-goal{text-align:center;position:absolute;left:50%;translate:-50% 0;pointer-events:none}.star-goal>div{font-size:32px;letter-spacing:7px;color:#ffd685;filter:drop-shadow(0 2px 0 #79552d)}.star-goal>span{color:#bed1d9;font-size:12px;display:block;margin-top:1px;text-shadow:0 2px 3px #000}.game-actions{display:flex;gap:10px}#arena{position:relative;flex:1;min-height:330px;height:clamp(310px,calc(100dvh - 355px),610px);isolation:isolate}#sandCanvas{position:absolute;left:0;top:-110px;width:100%;height:calc(100% + 110px);pointer-events:none}#tubeTargets{position:absolute;inset:0}.tube-target{position:absolute;border:0;background:transparent;border-radius:25px;color:transparent;touch-action:manipulation;box-shadow:none}.tube-target:hover{background:#91e6f604}.tube-target:focus-visible{outline:2px dashed #bcffeb;outline-offset:6px}.tube-target:disabled{opacity:1}.message-strip{text-align:center;position:relative;z-index:2;min-height:38px;padding:0 16px 10px;text-shadow:0 2px 4px #000;font-size:14px;color:#d4e8ec}.booster-dock{margin:5px auto 23px;position:relative;width:min(680px,calc(100% - 32px));padding:18px 24px 14px;border:1px solid #788d8e;border-bottom:4px solid #061521;border-radius:23px;background:linear-gradient(#234051ee,#102839f5);box-shadow:inset 0 1px 0 #b7d0c844,0 6px 0 #040c16,0 16px 40px #0007}.dock-caption{position:absolute;top:-11px;left:50%;translate:-50% 0;white-space:nowrap;padding:0 15px;font-size:10px;color:#c2d8d6;letter-spacing:2px;background:#203b4c;border-radius:8px}.boosters{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}.booster{background:none;border:0;padding:4px 0 0;display:flex;flex-direction:column;align-items:center;gap:4px}.booster-icon{display:grid;place-items:center;width:56px;height:53px;border-radius:16px;border:1px solid var(--boost-color);border-bottom:4px solid #0e192c;background:linear-gradient(#456076,#213447);color:var(--boost-color);font-size:30px;box-shadow:inset 0 1px 0 #fff3,0 3px 8px #0005;text-shadow:0 0 13px var(--boost-color)}.booster-name{font-size:12px;color:#dce7ed;font-weight:800}.booster-price{font-size:12px;color:#8bead6}.booster-price>span{font-size:10px}#toast{position:fixed;z-index:100;left:50%;bottom:22px;translate:-50% 14px;max-width:calc(100% - 30px);background:#0b263cf2;border:1px solid #8db6c7;border-radius:15px;padding:12px 22px;color:#e9f9ff;opacity:0;pointer-events:none;transition:.25s;text-align:center;box-shadow:0 10px 40px #0008;font-size:14px}#toast.visible{opacity:1;translate:-50% 0}#particles{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:98}dialog{position:fixed;background:linear-gradient(135deg,#234356,#102438);color:var(--ink);border:1px solid #bea56f;box-shadow:inset 0 0 0 5px #091c2d99,0 30px 120px #000b;border-radius:25px;padding:35px;width:min(460px,calc(100% - 26px));max-height:90dvh;text-align:center}dialog::backdrop{background:#020b19d6}dialog>.close.square-button{position:absolute;right:14px;top:14px;width:34px;height:34px;font-size:22px;border-radius:11px}dialog h2{font-size:29px;color:#ffdfa3;margin:10px 0 15px}dialog p{color:#b5d0dd;font-size:14px;line-height:1.6}dialog .tiny-label{font-size:10px}dialog .gold-button{margin-top:15px}.dialog-note{font-size:12px!important;color:#86a8ba!important;margin:20px 0 0}.small-button{border:1px solid #607d90;background:#152e43;border-radius:9px;padding:6px 12px;font-size:12px}.small-button[aria-pressed=true]{color:#90f9de;border-color:#90f9de}.mixer-row{display:grid;grid-template-columns:1fr auto;text-align:left;align-items:center;gap:17px;margin-top:28px}.mixer-row input{width:100%;grid-column:1/-1;accent-color:#7aead3}.text-button{display:block;margin:18px auto 0;border:0;background:none;color:#b0cbd9;padding:5px;font-size:14px}.helper-emblem{font-size:47px;color:#99f0da;text-shadow:0 0 20px #80efdc77}.color-choices{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:20px}.color-choice{width:38px;height:38px;border:3px solid #6d8793;border-radius:50%;box-shadow:inset 0 2px 5px #fff5,0 3px 9px #0005}.color-choice[aria-pressed=true]{outline:2px solid #fff2b9;outline-offset:4px;border-color:#fff2b9}.swap-choices{display:flex;justify-content:center;gap:15px;margin:20px 0}.swap-choices label{display:flex;flex-direction:column;gap:8px;font-size:12px;color:#a8c7d5}.swap-choices select{color:#f0f9ff;background:#11293d;border:1px solid #688ca1;border-radius:9px;padding:9px}#helperFeedback{color:#f3cf95;min-height:22px;margin:12px 0 0;font-size:12px}.win-stars{font-size:51px;letter-spacing:10px;color:#ffd47b;text-shadow:0 4px 0 #8e6539,0 0 30px #ffe78f55;margin:20px 0}.win-reward{display:flex;align-items:center;justify-content:center;gap:12px;padding:14px;background:#0c2835;border-radius:15px;border:1px solid #547e7c}.win-reward b{font-size:29px;color:#91f9df}.win-reward>span:last-child{font-size:13px;color:#b4dace}#winDialog{padding-top:38px}
@media(min-width:1600px){.map-screen{max-width:1430px;grid-template-columns:360px 1fr;gap:50px}.level-cell{height:106px}.mini-scene{height:260px}.adventure-card{padding:40px 25px}.atlas{padding:35px}}
@media(max-width:950px){.map-screen{grid-template-columns:250px 1fr;gap:20px;padding:10px 24px 30px}.adventure-card{padding:25px 16px}.adventure-card h1{font-size:34px}.mini-scene{height:185px}.atlas{padding:20px}.atlas-heading h2{font-size:22px}.level-grid{grid-template-columns:repeat(4,1fr);gap:11px}.level-cell{height:70px;font-size:22px}.level-cell small{font-size:11px}.atlas-bottom{font-size:11px}.hud{padding:16px 24px}.game-topline{padding:0 28px}}
@media(max-width:600px){.hud{height:76px;padding:12px 14px;gap:10px}.hud-title strong{font-size:18px}.hud-title>span{font-size:8px;letter-spacing:.8px}.square-button{width:39px;height:39px;border-radius:12px;font-size:24px}.wallets{gap:7px}.wallet{padding:6px 10px;gap:6px;min-height:37px;font-size:16px;border-radius:11px}.wallet small{display:none}.gem{font-size:19px}.stars-wallet{display:none}.map-screen{display:flex;flex-direction:column;gap:20px;padding:12px 16px 26px;min-height:calc(100dvh - 76px)}.adventure-card{width:100%;padding:22px 18px 18px;display:grid;grid-template-columns:1fr 110px;align-items:center;text-align:left;column-gap:5px}.adventure-card .tiny-label{font-size:9px}.adventure-card h1{font-size:37px;margin:7px 0}.logo-subtitle{font-size:8px;letter-spacing:2.5px;margin:0}.mini-scene{position:absolute;right:4px;top:12px;width:125px;height:165px;margin:0}.adventure-card h2{font-size:17px;grid-column:1;line-height:1.3;margin-top:20px}.adventure-card p{grid-column:1/-1;min-height:0;margin:8px 0 16px;font-size:12px;max-width:210px}.adventure-card>.tiny-label,.adventure-card>h1,.adventure-card>.logo-subtitle{grid-column:1}.adventure-card .gold-button{grid-column:1/-1;font-size:16px;padding:12px}.adventure-reward{grid-column:1/-1;margin-top:17px;align-items:center;gap:7px}.adventure-reward>span{max-width:none;font-size:10px}.atlas{width:100%;padding:20px 16px 16px;border-radius:23px}.atlas-heading{margin-bottom:18px}.atlas-heading h2{font-size:21px}.atlas-heading .tiny-label{font-size:9px}.level-grid{grid-template-columns:repeat(4,1fr);gap:12px}.level-cell{height:74px}.atlas-bottom{gap:12px;font-size:11px}.game-screen{min-height:calc(100dvh - 76px)}.game-topline{min-height:69px;padding:0 16px}.moves-pill{padding:7px 12px;gap:6px;border-radius:12px}.moves-pill b{font-size:21px}.moves-pill>span{font-size:10px}.game-actions{gap:7px}.star-goal>div{font-size:25px;letter-spacing:3px}.star-goal>span{font-size:10px}#arena{min-height:340px;height:calc(100dvh - 334px)}.message-strip{font-size:12px;min-height:34px;line-height:1.4}.booster-dock{padding:18px 10px 12px;margin-bottom:18px;width:calc(100% - 24px);border-radius:19px}.boosters{gap:6px}.booster-icon{width:46px;height:46px;font-size:26px;border-radius:13px}.booster-name{font-size:10px}.booster-price{font-size:11px}.dock-caption{font-size:9px}.game-screen:has(#arena .tube-target:nth-child(9)) #arena{min-height:470px}dialog{padding:30px 23px}.mixer-row label{font-size:14px}}
@media(max-height:620px) and (min-width:601px){.hud{height:68px;padding-block:10px}.game-screen{min-height:calc(100dvh - 68px)}.game-topline{min-height:55px}#arena{min-height:235px;height:calc(100dvh - 285px)}.booster-dock{padding-top:12px;margin-bottom:12px}.booster-icon{height:40px;width:44px;font-size:24px}.message-strip{min-height:25px;padding-bottom:4px}.mini-scene{height:160px}.map-screen{padding-top:0}.adventure-card{padding-top:20px}.level-cell{height:64px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Crystal economy, level difficulty and click magic */
.crystal-gem{display:inline-block;position:relative;width:23px;height:27px;flex:0 0 auto;background:linear-gradient(135deg,#f0fffd 0 15%,#82ffe5 16% 40%,#28b4c4 41% 68%,#c3fff3 69%);clip-path:polygon(50% 0,88% 25%,72% 78%,50% 100%,28% 78%,12% 25%);filter:drop-shadow(0 0 9px #43ffe0cc) drop-shadow(0 3px 0 #064d5d)}.crystal-gem:after{content:'';position:absolute;inset:23% 24%;background:#f3fffdc9;clip-path:polygon(50% 0,100% 100%,0 100%)}.crystal-gem.big{width:35px;height:42px}.gem-wallet{border-color:#55b9b0!important;box-shadow:inset 0 2px 6px #0008,0 0 22px #31e4c738!important}
.level-cell{height:96px}.level-cell small{margin-top:1px!important}.level-cell em{display:block;margin-top:3px;font-size:9px;line-height:1;font-style:normal;letter-spacing:.6px;text-transform:uppercase;color:#9ce8d7;text-shadow:none}.level-cell em.medium{color:#ffd78a}.level-cell em.hard{color:#ff9cae}
.rule-badge{display:inline-block;margin-top:5px;padding:3px 11px;border:1px solid #72dfc8;border-radius:999px;background:#0a2c37e8;color:#9df3df;font-size:10px;font-style:normal;font-weight:900;letter-spacing:1px;text-transform:uppercase}.rule-badge.medium{border-color:#d6ae62;color:#ffdaa0}.rule-badge.hard{border-color:#e7768d;color:#ff9caf;background:#351c35e8}
.click-rune{position:fixed;z-index:101;width:10px;height:10px;margin:-5px;pointer-events:none;border:1.5px solid #d6fff5;border-radius:50%;box-shadow:0 0 6px #6effdf;animation:rune-pop .46s cubic-bezier(.12,.75,.25,1) forwards}.click-rune:before{content:'';position:absolute;inset:-5px;border:1px solid #ffd98c99;border-radius:50%}.click-shard{position:fixed;z-index:102;width:4px;height:6px;margin:-3px -2px;pointer-events:none;background:linear-gradient(#efffff,#51eace);clip-path:polygon(50% 0,100% 45%,55% 100%,0 55%);filter:drop-shadow(0 0 3px #6affdd);animation:shard-fly .5s cubic-bezier(.12,.68,.32,1) forwards;--dx:14px;--dy:-14px}
.reward-gem{position:fixed;left:0;top:0;z-index:150;width:20px;height:25px;pointer-events:none;animation:reward-flight 1.2s cubic-bezier(.24,.75,.28,1) var(--delay) both;--sx:0px;--sy:0px;--dx:0px;--dy:0px}.wallet-pop{animation:wallet-pop .45s ease-out}
@keyframes rune-pop{0%{opacity:0;transform:scale(.3)}30%{opacity:.9}100%{opacity:0;transform:scale(2.2)}}@keyframes shard-fly{0%{opacity:1;transform:translate(0,0) rotate(0)}100%{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(270deg)}}@keyframes reward-flight{0%{opacity:0;transform:translate(var(--sx),var(--sy)) scale(.3) rotate(-40deg)}18%{opacity:1;transform:translate(var(--sx),calc(var(--sy) - 55px)) scale(1.25) rotate(15deg)}75%{opacity:1}100%{opacity:.15;transform:translate(var(--dx),var(--dy)) scale(.5) rotate(220deg)}}@keyframes wallet-pop{40%{transform:scale(1.22);box-shadow:0 0 35px #76ffe0}100%{transform:scale(1)}}
.booster[data-helper=extra] .booster-icon{font-size:31px;position:relative}.booster[data-helper=extra] .booster-icon:after{content:'+';position:absolute;right:6px;top:3px;font:900 18px Nunito,sans-serif;color:#fff6bd;text-shadow:0 0 7px #ffdf7c}
.booster-price{display:flex!important;align-items:center;justify-content:center;gap:5px}.booster-price .crystal-gem{width:10px;height:13px;filter:drop-shadow(0 0 4px #43ffe0aa)}
@media(max-width:950px){.level-cell{height:80px}.level-cell em{font-size:8px}}@media(max-width:600px){.level-cell{height:82px}.rule-badge{font-size:8px;padding:2px 7px;margin-top:3px}}
#homeBtn{width:60px;height:60px;border-radius:18px;border-color:#b79a62;background:linear-gradient(#4a6a84,#1d3a52)}#homeBtn svg{width:36px;height:36px;fill:none;stroke:#ffe9b8;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 2px 1px #0009)}
@media(max-width:600px){#homeBtn{width:50px;height:50px;border-radius:15px}#homeBtn svg{width:30px;height:30px}}
.level-cell[data-kind]{border-color:#d6b574;box-shadow:inset 0 2px 0 #ffe7b025,0 0 16px #ffd48a30,0 4px 8px #0004}.level-cell[data-kind]:after{position:absolute;top:5px;right:8px;font-size:15px;line-height:1;color:#ffe2a3;text-shadow:0 0 8px #ffcf7188}.level-cell[data-kind=scale]:after{content:'⚖'}.level-cell[data-kind=reservoir]:after{content:'⚗'}
/* Bigger HUD, helper icons, shop, daily rewards, ads, tutorials */
[hidden]{display:none!important}
.wallet{font-size:23px;padding:9px 20px;min-height:54px;gap:11px}.wallet b{font-size:25px}.stars-wallet>span{font-size:28px}.hud .crystal-gem{width:28px;height:33px}
.gem-wallet{position:relative;padding-right:44px;color:inherit;font:inherit;cursor:pointer}.gem-wallet .wallet-plus{position:absolute;right:9px;top:50%;translate:0 -50%;display:grid;place-items:center;width:26px;height:26px;border-radius:9px;background:linear-gradient(#ffe6a5,#e7a94c);color:#4b321d;font:900 20px/1 Nunito,sans-serif;box-shadow:0 2px 0 #7a4f24}
#settingsBtn{width:60px;height:60px;border-radius:18px;border-color:#b79a62;background:linear-gradient(#4a6a84,#1d3a52)}#settingsBtn svg{width:36px;height:36px;fill:none;stroke:#ffe9b8;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 2px 1px #0009)}
.ad-badge{position:relative}.ad-badge:after{content:'▶';position:absolute;right:-6px;bottom:-6px;display:grid;place-items:center;width:20px;height:20px;border-radius:7px;background:#2f8f83;border:1px solid #9df3df;font-size:9px;color:#eafffa;text-shadow:none}
.booster-icon{position:relative}.booster-icon svg{width:33px;height:33px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 5px var(--boost-color))}.booster-icon .plus{stroke:#fff3bd}.booster-icon .glyph,.chip-icon .glyph{font-weight:400}.booster[data-helper=extra] .booster-icon:after{content:none}
.booster-count{position:absolute;right:-8px;bottom:-8px;min-width:25px;height:22px;padding:0 5px;border-radius:11px;background:linear-gradient(#ff8fa6,#e0476a);color:#fff;font:900 12px/22px Nunito,sans-serif;font-style:normal;box-shadow:0 2px 0 #7b1f39,0 0 8px #ff6d8f88;text-shadow:none}.booster-price .owned{color:#ffd78a;font-size:11px;font-weight:900}
.helper-emblem svg{width:56px;height:56px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 12px currentColor)}.helper-emblem .glyph{font-size:47px}.helper-stock{font-size:13px!important;color:#ffe2a8!important;margin:4px 0 0}
.ad-button{display:block;width:100%;margin-top:12px;padding:13px 16px;border:1px solid #7ff0d2;border-bottom:4px solid #0b4c47;border-radius:16px;background:linear-gradient(#2f8f83,#16585a);color:#eafffa;font-weight:900;font-size:16px;box-shadow:0 5px 14px #0006}
#settingsDialog{width:min(560px,calc(100% - 20px));padding:44px 34px 32px}#settingsDialog h2{font-size:32px}.mixer-row{gap:14px 18px;margin-top:30px}.mixer-row label{font-size:18px;font-weight:800}.mixer-row .small-button{padding:10px 18px;min-height:46px;font-size:15px;border-radius:13px}
input[type=range]{-webkit-appearance:none;appearance:none;height:18px;margin:10px 0;border-radius:99px;border:1px solid #5d8196;background:linear-gradient(90deg,#7aead3 var(--fill,50%),#0b2233 var(--fill,50%));box-shadow:inset 0 2px 4px #0008;cursor:pointer;touch-action:none}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:36px;height:36px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff7da,#f0c166 60%,#b07a35);border:2px solid #fff1c4;box-shadow:0 3px 8px #000a}
input[type=range]::-moz-range-thumb{width:34px;height:34px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff7da,#f0c166 60%,#b07a35);border:2px solid #fff1c4;box-shadow:0 3px 8px #000a}input[type=range]::-moz-range-track{background:transparent}
dialog>.close.square-button{width:44px;height:44px;font-size:26px}
.card-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.card-action{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;padding:11px 8px;border:1px solid #6f95ab;border-bottom:4px solid #081721;border-radius:14px;background:linear-gradient(#355773,#18344c);font-weight:900;font-size:15px}.card-action svg{width:26px;height:26px;fill:none;stroke:#ffe3a3;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.notify-dot{position:absolute;top:-6px;right:-6px;width:16px;height:16px;border-radius:50%;background:#ff5d7e;border:2px solid #fff0f3;box-shadow:0 0 10px #ff5d7e;animation:dot-pulse 1.4s ease-in-out infinite}@keyframes dot-pulse{50%{transform:scale(1.25)}}
dialog.wide-dialog{width:min(860px,calc(100% - 20px));padding:34px 28px 24px;overflow:auto}
.shop-balance{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;border-radius:12px;background:#0a2231;border:1px solid #3e928e;font-weight:800;font-size:15px;color:#b4dace}.shop-balance b{font-size:20px;color:#91f9df}.shop-balance .crystal-gem{width:18px;height:22px}
.shop-heading{margin:22px 4px 12px;text-align:left;font-size:13px;letter-spacing:2px;color:#a6cedb;text-transform:uppercase}
.shop-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px}
.shop-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:28px 12px 12px;border:1px solid #6d8fa3;border-bottom:5px solid #081721;border-radius:20px;background:linear-gradient(160deg,#2a4b63,#132b3e);box-shadow:inset 0 1px 0 #ffffff22,0 8px 20px #0006;overflow:hidden}.shop-card:hover:not(:disabled){translate:0 -2px}
.shop-card.bundle{background:linear-gradient(160deg,#3d3358,#1a1e3a);border-color:#8f7fbf}.shop-card.featured{border-color:#e7c27a;box-shadow:0 0 0 1px #ffd78a66,0 0 28px #ffcf7150,inset 0 1px 0 #ffffff22}
.shop-tag{position:absolute;top:0;left:50%;translate:-50% 0;white-space:nowrap;padding:3px 12px;border-radius:0 0 10px 10px;background:linear-gradient(#ffe6a5,#e7a94c);color:#4b321d;font-size:10px;font-weight:900;letter-spacing:.6px;text-transform:uppercase}
.shop-ribbon{position:absolute;top:13px;right:-31px;rotate:45deg;width:112px;padding:3px 0;background:linear-gradient(#ff8fa6,#e0476a);color:#fff;font-size:12px;font-weight:900;text-align:center;box-shadow:0 2px 6px #0006}
.shop-art{display:flex;align-items:flex-end;justify-content:center;height:66px}.gem-pile{display:flex;flex-wrap:wrap-reverse;justify-content:center;width:96px}.gem-pile .crystal-gem{width:24px;height:29px;margin:-7px -1px 0}
.chest-art{display:grid;color:#ffe3a3}.chest-art svg{width:62px;height:62px;fill:#ffd78a22;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;filter:drop-shadow(0 0 10px #ffcf7188)}.chest-art.tier-1{color:#ffd27a}.chest-art.tier-2{color:#ffb65c}.chest-art.tier-2 svg{filter:drop-shadow(0 0 16px #ffb65c)}
.shop-title{font-weight:900;font-size:15px;color:#fff1d2}.shop-amount{display:flex;align-items:center;gap:7px;font-size:29px;color:#91f9df}.shop-amount .crystal-gem{width:22px;height:26px}.shop-bonus{font-size:12px;color:#ffd78a;font-weight:800}.shop-bonus.muted{color:#8aa9b8}
.shop-contents{display:flex;flex-wrap:wrap;justify-content:center;align-content:center;gap:5px;min-height:62px}
.chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px 3px 6px;border-radius:10px;background:#0a2231cc;border:1px solid #ffffff22;font-size:13px;font-weight:900;color:#eaf7ff}.chip .crystal-gem{width:13px;height:16px}.chip-icon{display:grid;place-items:center;width:18px;height:18px;color:var(--boost-color)}.chip-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round}.chip-icon .glyph{font-size:15px;line-height:18px}
.shop-price{display:flex;align-items:baseline;gap:8px;margin-top:4px;padding:8px 20px;border-radius:13px;background:linear-gradient(#ffe6a5,#efb75c 70%,#db983e);color:#4b321d;box-shadow:inset 0 2px 0 #fff4d8,0 3px 0 #7a4f24}.shop-price b{font-size:19px;font-weight:900}.shop-price s{font-size:13px;opacity:.6}.shop-save{font-size:12px;color:#9df3df;font-weight:800;min-height:15px}
.daily-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0 6px}
.daily-cell{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;min-height:132px;padding:12px 6px 10px;border:1px solid #55788c;border-radius:16px;background:linear-gradient(#1e3a4f,#10263a)}.daily-cell.grand{grid-column:span 2;background:linear-gradient(135deg,#5a4526,#2a1f18);border-color:#e7c27a}
.daily-day{font-size:11px;font-weight:900;letter-spacing:1.5px;color:#a6cedb;text-transform:uppercase}.daily-art{display:grid;place-items:center;height:48px;color:#ffe39c}.daily-art svg{width:42px;height:42px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.daily-art .crystal-gem.big{width:30px;height:36px}.daily-art .glyph{font-size:34px}
.daily-reward{display:flex;flex-wrap:wrap;justify-content:center;gap:4px}.daily-cell.claimed{opacity:.55;filter:saturate(.45)}.daily-check{position:absolute;top:6px;right:9px;color:#7dffcf;font-weight:900;font-size:19px}.daily-when{font-size:11px;color:#ffd78a;font-weight:800}
.daily-cell.current{border-color:#ffe3a3;animation:daily-glow 1.6s ease-in-out infinite}@keyframes daily-glow{0%,100%{box-shadow:0 0 0 2px #ffd78a88,0 0 18px #ffd78a44}50%{box-shadow:0 0 0 2px #ffd78a,0 0 34px #ffd78a99}}
.ad-screen{display:grid;place-items:center;height:180px;margin:14px 0;padding:20px;border:1px dashed #7d98ad;border-radius:16px;background:linear-gradient(135deg,#1c3550,#3a2150);color:#b8d0dd;font-weight:800}.ad-bar{height:10px;overflow:hidden;border:1px solid #4d6d80;border-radius:99px;background:#0b2233}.ad-bar i{display:block;width:0;height:100%;background:linear-gradient(90deg,#7aead3,#ffd78a);transition:width .1s linear}
.coach-steps{margin:16px 0 4px;padding-left:24px;text-align:left;color:#d5e8f0;font-size:16px;line-height:1.5}.coach-steps li{margin:9px 0}.coach-steps b{font-weight:900}
.coach-hand{position:absolute;z-index:5;left:0;top:0;translate:-30% 0;font-size:48px;line-height:1;pointer-events:none;filter:drop-shadow(0 4px 6px #000a);animation:hand-tap 1.1s ease-in-out infinite}@keyframes hand-tap{0%,100%{transform:translateY(0)}50%{transform:translateY(-14px)}}
.coach-tip{position:absolute;z-index:5;translate:-50% -100%;padding:8px 14px;border-radius:14px;background:#fff4d6;color:#3d2a17;font-weight:900;font-size:14px;white-space:nowrap;pointer-events:none;box-shadow:0 6px 18px #0008}.coach-tip:after{content:'';position:absolute;left:50%;bottom:-7px;translate:-50% 0;border:8px solid transparent;border-bottom:0;border-top-color:#fff4d6}
@media(max-width:600px){.wallet{font-size:18px;min-height:46px;padding:6px 12px}.wallet b{font-size:19px}.hud .crystal-gem{width:22px;height:26px}.gem-wallet{padding-right:36px}.gem-wallet .wallet-plus{right:7px;width:21px;height:21px;font-size:16px}#settingsBtn{width:50px;height:50px;border-radius:15px}#settingsBtn svg{width:30px;height:30px}.booster-icon svg{width:27px;height:27px}.card-actions{grid-column:1/-1}#settingsDialog{padding:38px 20px 26px}dialog.wide-dialog{padding:30px 14px 20px}.shop-grid{grid-template-columns:1fr 1fr;gap:10px}.shop-card{padding:26px 8px 10px}.shop-amount{font-size:23px}.shop-price{padding:7px 12px}.daily-grid{grid-template-columns:repeat(3,1fr);gap:8px}.daily-cell.grand{grid-column:span 3}.coach-tip{font-size:12px}}
/* Chapters, chapter II map marks, pretty sliders, points and leaderboard */
.card-actions{grid-template-columns:repeat(3,1fr);gap:8px}.card-action{flex-direction:column;gap:3px;padding:9px 4px;font-size:13px}
.points-line{display:flex;align-items:center;justify-content:space-between;margin-top:12px;padding:9px 14px;border:1px solid #7b62b8;border-radius:13px;background:linear-gradient(90deg,#2a1f45,#1a2040);font-size:13px;font-weight:800;color:#cdb8ff}.points-line b{font-size:20px;color:#efe6ff}
.atlas-side{display:flex;align-items:center;gap:10px}.chapter-tabs{display:flex;gap:6px}.chapter-tab{min-width:46px;height:40px;padding:0 12px;border:1px solid #5d8196;border-bottom:3px solid #081721;border-radius:12px;background:linear-gradient(#27465e,#132b3e);font-family:Russo One,Segoe UI,sans-serif;font-size:15px;color:#b8d3e0}.chapter-tab[aria-pressed=true]{background:linear-gradient(#ffe6a5,#e0a54f);border-color:#ffe6a5;color:#4b321d}
.level-cell[data-kind=cauldron]:after{content:'♨'}.level-cell[data-kind=key]:after{content:'🔑';font-size:13px}.level-cell[data-kind=ice]:after{content:'❄'}.level-cell[data-mod]:before{position:absolute;top:5px;left:8px;font-size:14px;line-height:1;font-weight:900;color:#cdb8ff;text-shadow:0 0 8px #9d7fe0}.level-cell[data-mod=hidden]:before{content:'?'}.level-cell[data-mod=sizes]:before{content:'↕'}
.mixer-row{padding:16px 18px 12px;border:1px solid #3f6378;border-radius:18px;background:#0b2130aa}.mixer-row label{display:flex;align-items:center;gap:10px}.mixer-value{margin-left:auto;padding:3px 10px;border-radius:10px;background:#0a1e2d;border:1px solid #3fd6c255;color:#9ff5e3;font-size:15px;font-variant-numeric:tabular-nums}
input[type=range]{height:22px;border:1px solid #6b8ea3;background:linear-gradient(90deg,#2fbfae 0,#9ff5e3 var(--fill,50%),#0a1e2d var(--fill,50%));box-shadow:inset 0 3px 6px #000a,0 0 0 4px #0d2433,0 0 18px #4fe3cf33}
input[type=range]::-webkit-slider-thumb{width:42px;height:42px;background:radial-gradient(circle,#fffbe8 0 17%,transparent 18%),conic-gradient(from 45deg,#ffe9a8,#e7a94c,#fff2c4,#c98a38,#ffe9a8);border:3px solid #fff3cc;box-shadow:0 0 0 3px #7a4f2488,0 4px 10px #000b,0 0 16px #ffd77a99;transition:transform .12s}
input[type=range]::-moz-range-thumb{width:38px;height:38px;background:radial-gradient(circle,#fffbe8 0 17%,transparent 18%),conic-gradient(from 45deg,#ffe9a8,#e7a94c,#fff2c4,#c98a38,#ffe9a8);border:3px solid #fff3cc;box-shadow:0 4px 10px #000b,0 0 16px #ffd77a99}
input[type=range]:active::-webkit-slider-thumb{transform:scale(1.12)}
.win-points{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 10px;margin-top:12px;padding:10px 14px;border:1px solid #9d7fe0;border-radius:15px;background:#231a38}.win-points span{font-size:13px;font-weight:800;color:#cdb8ff}.win-points b{font-size:27px;color:#efe6ff}.win-points small{flex-basis:100%;font-size:12px;color:#b9a6e8}
.board-me{display:inline-flex;align-items:center;gap:12px;padding:10px 18px;border:1px solid #9d7fe0;border-radius:14px;background:#231a38;font-weight:800;color:#cdb8ff}.board-me b{font-size:24px;color:#efe6ff}
.board-list{display:grid;gap:8px;margin:18px 0 12px;padding:0;list-style:none;text-align:left}.board-row{display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:10px;padding:10px 16px;border:1px solid #35586c;border-radius:14px;background:#0c2433}.board-row.you{border-color:#ffd78a;background:linear-gradient(90deg,#4a3a18,#26283a);box-shadow:0 0 18px #ffd78a33}.board-rank{font-family:Russo One,Segoe UI,sans-serif;font-size:19px;text-align:center;color:#ffd78a}.board-row.top1 .board-rank{color:#ffe27a;text-shadow:0 0 10px #ffd24d}.board-row.top2 .board-rank{color:#e3ecf5}.board-row.top3 .board-rank{color:#f0a868}.board-name{font-weight:800}.board-name small{margin-left:6px;font-size:11px;color:#7f9aa9}.board-score{font-size:18px;font-weight:900;color:#9ff5e3}
.board-rules{display:grid;gap:4px;padding:12px 16px;border-radius:14px;background:#0b1f2d;text-align:left;font-size:13px;line-height:1.5;color:#a9c4d2}.board-rules b{color:#ffe2a8}
@media(max-width:600px){.chapter-tab{min-width:40px;height:36px}.atlas-heading{flex-wrap:wrap}.card-action{font-size:12px}}
/* Section screens (shop, leaderboard, encyclopedia), 25-level chapters, bigger game controls */
.section-screen{position:relative;z-index:1;max-width:1180px;min-height:calc(100dvh - 92px);margin:auto;padding:10px 30px 40px}.section-screen[hidden]{display:none}
.section-panel{padding:26px 28px 24px;border:1px solid #60829480;border-radius:28px;background:linear-gradient(145deg,#0b2033eb,#102b3bd8);box-shadow:inset 0 0 0 5px #071e3144,0 20px 70px #0006}
.section-head{display:flex;align-items:center;flex-wrap:wrap;gap:14px 20px;margin-bottom:8px}.section-head h2{margin:4px 0 0;font-size:30px}.section-head>:last-child{margin-left:auto}
.back-button{display:flex;align-items:center;gap:8px;height:54px;padding:0 20px;border:1px solid #7190a7;border-bottom:4px solid #081721;border-radius:16px;background:linear-gradient(#355773,#18344c);font-size:17px;font-weight:900;box-shadow:inset 0 1px 0 #adcddd33,0 3px 9px #0005}
.section-note{margin:22px 0 0;text-align:center;font-size:13px;color:#86a8ba}
.board-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr);gap:20px;align-items:start}.board-layout .board-list{margin:14px 0 0}.board-layout .board-rules{margin-top:14px;gap:8px;font-size:14px}
.book-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px;margin-top:18px}
.book-card{position:relative;display:flex;flex-direction:column;gap:9px;padding:14px 16px 16px;border:1px solid #6d8fa3;border-radius:22px;background:linear-gradient(160deg,#243f55,#11263a);box-shadow:inset 0 1px 0 #ffffff1a,0 8px 20px #0005}
.book-card h3{display:flex;align-items:center;gap:10px;margin:4px 0 0;font-size:20px;color:#ffe2a8}.book-icon{display:grid;place-items:center;width:34px;height:34px;border:1px solid #e0bb6c88;border-radius:11px;background:#0b2233;font-size:18px;color:#ffe2a8}
.book-card p{margin:0;font-size:14px;line-height:1.5;color:#c9dde7}.book-card ul{margin:0;padding-left:20px;font-size:13.5px;line-height:1.55;color:#a9c4d2}.book-card .book-tip{padding:8px 10px;border-radius:12px;background:#0b1f2d;font-size:13px;color:#ffe2a8}.book-meta{margin-top:auto;font-size:12px;font-weight:800;color:#8fb0c0}
.book-art{display:grid;place-items:center;height:136px;overflow:hidden;border-radius:16px;background:radial-gradient(ellipse at 50% 100%,#1f4257,#0a1826 70%)}.book-art svg{width:100%;height:100%}
.book-card.locked{border-style:dashed;border-color:#4a6475;background:#0c1c2a;box-shadow:none}.book-card.locked .book-art{font:400 72px Russo One,Segoe UI,sans-serif;color:#35506199;background:#0a1622}.book-card.locked h3{color:#5f7d8e}
.book-art .glass{fill:#bfe9ff14;stroke:#b6e9f2aa;stroke-width:1.4}.book-art .rim{fill:#e3c486}.book-art .q{fill:#e3d7ff;font:900 12px Nunito,sans-serif;text-anchor:middle}.book-art .k{font-size:11px;text-anchor:middle}.book-art .arrow{fill:none;stroke:#ffde94;stroke-width:2;stroke-dasharray:4 3;stroke-linecap:round}.book-art .label{fill:#ffe2a8;font:800 11px Nunito,sans-serif;text-anchor:middle}.book-art .beam{stroke:#e8c783;stroke-width:5;stroke-linecap:round}.book-art .brass{fill:#b78b4d}.book-art .gem{fill:#b88aff}.book-art .weight{fill:#56616e;stroke:#9aa7b4}.book-art .lock{fill:#d7ad64}.book-art .shackle{fill:none;stroke:#fff0ba;stroke-width:2.5}.book-art .bars{stroke:#9aa6b1;stroke-width:2.5}.book-art .band{fill:#a8854c}.book-art .chain{stroke:#9c8660;stroke-width:2;stroke-dasharray:3 2}.book-art .pot{fill:#2b313a;stroke:#8c97a3}.book-art .pot-rim{fill:#77838f}.book-art .ice{fill:#bff0ff55;stroke:#fff;stroke-width:1.5}.book-art .crack{fill:none;stroke:#fff;stroke-width:1.3}.book-art .ice-badge{fill:#0c2a3fe6;stroke:#bff0ff}.book-art .ice-num{fill:#e9fbff;font:900 12px Nunito,sans-serif;text-anchor:middle}.book-art .ice-flake{fill:#e9fbff;font-size:14px;text-anchor:middle}.book-art .done{fill:none;stroke:#56e4be;stroke-width:2}
.card-actions{grid-template-columns:1fr 1fr}.card-action{flex-direction:row;gap:8px;padding:11px 8px;font-size:14px}
.level-grid{grid-template-columns:repeat(5,1fr)}.atlas-heading{flex-wrap:wrap}
.chapter-tabs{gap:10px}.chapter-tab{min-width:124px;height:56px;padding:0 20px;border-radius:17px;font-size:20px}.chapter-tab span{margin-right:6px;font-family:Nunito,Segoe UI,sans-serif;font-size:15px;font-weight:900}
.game-actions{gap:12px}.game-actions .square-button{width:64px;height:64px;border-radius:19px;font-size:35px}.ad-badge:after{right:-7px;bottom:-7px;width:25px;height:25px;font-size:11px}
.booster-dock{width:min(840px,calc(100% - 32px));padding:24px 26px 16px}.boosters{gap:16px}.booster-icon{width:72px;height:68px;border-radius:20px}.booster-icon svg{width:42px;height:42px}.booster-icon .glyph{font-size:38px}.booster-name{font-size:15px}.booster-price{font-size:15px!important}.booster-price .crystal-gem{width:13px;height:16px}.booster-count{height:26px;min-width:30px;font-size:14px;line-height:26px}.dock-caption{font-size:12px}
#arena{height:clamp(300px,calc(100dvh - 392px),610px)}
@media(max-height:820px) and (min-width:601px){.mini-scene{height:150px}.adventure-card{padding:20px 20px 18px}.adventure-card h1{font-size:36px}.adventure-card p{margin:8px 0 14px;min-height:0}.adventure-reward{display:none}.booster-dock{padding:20px 22px 12px;margin-bottom:14px}.booster-icon{width:64px;height:60px}.booster-icon svg{width:36px;height:36px}}
.hud-title{min-width:0;flex:1 1 auto}.hud-title strong,.hud-title>span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.wallets{flex-shrink:0}
@media(max-width:950px){.board-layout{grid-template-columns:1fr}}
@media(max-width:600px){.section-screen{padding:10px 12px 30px}.section-panel{padding:18px 14px}.section-head h2{font-size:22px}.back-button{height:46px;padding:0 14px;font-size:15px}.book-grid{grid-template-columns:1fr}.level-grid{gap:8px}.level-cell{height:70px;border-radius:14px;font-size:20px}.level-cell em{display:none}.chapter-tab{min-width:0;height:50px;padding:0 16px;font-size:18px}.chapter-tab span{display:none}.game-actions .square-button{width:54px;height:54px;font-size:29px}.booster-dock{padding:20px 8px 12px}.boosters{gap:4px}.booster-icon{width:60px;height:58px;border-radius:17px}.booster-icon svg{width:33px;height:33px}.booster-name{font-size:12px}.booster-price{font-size:12px!important}}
@media(prefers-reduced-motion:reduce){.click-rune,.click-shard,.reward-gem{display:none!important}.coach-hand,.coach-tip,.notify-dot,.daily-cell.current{animation:none!important}}
/* Large map navigation under the chapter levels. */
.map-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:22px}.map-action{position:relative;display:flex;min-height:92px;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:12px 8px;border:1px solid #7190a7;border-bottom:5px solid #081721;border-radius:18px;background:linear-gradient(#355773,#18344c);font-size:15px;font-weight:900;box-shadow:inset 0 1px 0 #adcddd33,0 4px 10px #0005}.map-action svg{width:38px;height:38px;fill:none;stroke:#ffe3a3;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.deadlock-dialog{border-color:#efb75c}.deadlock-dialog .helper-emblem{color:#ffd78a}.deadlock-extra{display:block;width:100%;margin-top:12px;padding:13px 16px;border:1px solid #80e8d5;border-bottom:4px solid #0b4c47;border-radius:16px;background:linear-gradient(#2f7f78,#174e52);font-weight:900}.deadlock-dialog .text-button{color:#ffdca0;font-weight:900}
@media(max-width:600px){.map-actions{grid-template-columns:repeat(2,1fr);gap:9px;margin-top:18px}.map-action{min-height:82px;font-size:14px}.map-action svg{width:34px;height:34px}.adventure-card .points-line{grid-column:1/-1}.adventure-card .card-actions{display:none}}

/* Six chapters and independent navigation panels. */
html,body{touch-action:pan-y;-webkit-text-size-adjust:100%}*,*::before,*::after{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}img,canvas,svg{-webkit-user-drag:none}button{touch-action:manipulation}
.chapter-library{min-width:0;display:grid;gap:18px}.chapter-library>.chapter-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;padding:12px;border:1px solid #60829480;border-radius:22px;background:#0b2033e8}.chapter-library .chapter-tab{min-width:0;width:100%;padding:0 8px;height:58px}.chapter-library .chapter-tab span{display:block;margin:0;font-size:12px}.chapter-library .map-actions{margin:0;padding:18px;border:1px solid #60829480;border-radius:24px;background:linear-gradient(145deg,#0b2033ed,#183747ed);box-shadow:0 12px 35px #0005}.chapter-library .atlas-heading{margin-bottom:20px}.map-screen{align-items:start}.adventure-card{align-self:center}.atlas-side{margin-left:auto}
#boardScreen{max-width:1400px}#boardScreen .section-panel{min-height:calc(100dvh - 150px)}.board-layout{grid-template-columns:minmax(0,2.5fr) minmax(270px,1fr);gap:28px}.board-row{min-height:76px;padding:16px 22px;grid-template-columns:62px 1fr auto}.board-name{font-size:19px}.board-score{font-size:24px}.board-rank{font-size:25px}.board-layout .board-rules{font-size:16px;line-height:1.7;padding:22px}
@keyframes screen-arrive{from{opacity:0}to{opacity:1}}@keyframes panel-arrive{from{opacity:0;transform:scale(.985)}to{opacity:1;transform:scale(1)}}@keyframes backdrop-arrive{from{background:#020b1900}to{background:#020b19ad}}
.map-screen:not([hidden]),.game-screen:not([hidden]),.section-screen:not([hidden]){animation:screen-arrive .22s ease-out both}dialog[open]{animation:panel-arrive .18s ease-out both}dialog[open]::backdrop{animation:backdrop-arrive .3s ease-out}
@media(max-width:950px){.chapter-library .chapter-tab{font-size:17px}.board-layout{grid-template-columns:1fr}.map-screen{grid-template-columns:230px minmax(0,1fr)}}
@media(max-width:600px){.chapter-library{width:100%;gap:12px}.chapter-library>.chapter-tabs{gap:5px;padding:9px}.chapter-library .chapter-tab{height:52px;padding:0 3px}.chapter-library .chapter-tab span{font-size:10px}.chapter-library .map-actions{padding:12px}.board-row{padding:12px;grid-template-columns:40px 1fr auto}.board-name{font-size:16px}.board-score{font-size:20px}}
@media(prefers-reduced-motion:reduce){.map-screen,.game-screen,.section-screen,dialog[open],dialog[open]::backdrop{animation:none!important}}
/* Fixed play surface: wide rows, navigation together, no lateral dragging. */
.language-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px}.language-row select{min-width:140px;padding:10px 14px;background:#10283b;border:1px solid #7ba4b7;border-radius:12px;color:#e9f7ff;font:inherit}.booster-name,.map-action span{overflow-wrap:anywhere}
.game-topline{position:relative;min-height:104px}.star-goal{position:static;translate:none;flex:1;min-width:0;padding:4px 12px}.game-actions{flex-shrink:0}.game-screen{max-width:none}.rule-badge{max-width:100%;white-space:normal}.game-screen .message-strip{min-height:28px;padding-bottom:4px}
@media(max-width:600px){.game-screen .game-topline{min-height:96px;padding:0 10px;gap:6px}.star-goal{padding:2px}.star-goal>div{font-size:22px}.game-actions{gap:5px}.game-actions .square-button{width:40px;height:42px}.moves-pill{padding:6px}.star-goal>span{font-size:10px}}
html{scrollbar-gutter:stable}dialog.wide-dialog{overflow-x:hidden;overflow-y:auto}.daily-grid{min-width:0}.daily-cell{min-width:0}

@keyframes resume-pulse{0%,100%{transform:scale(1);box-shadow:0 10px 28px #0008,0 0 0 0 #ffd66a55}50%{transform:scale(1.025);box-shadow:0 13px 34px #0009,0 0 0 10px #ffd66a00}}
#playBtn.resume-pulse{animation:resume-pulse 1.45s ease-in-out infinite}
.daily-panel{width:min(980px,100%);margin:0 auto}.daily-lead{text-align:center;color:#d9e9f2;font-size:17px}.daily-claim{display:block;width:min(520px,100%);margin:24px auto 0}
@media(prefers-reduced-motion:reduce){#playBtn.resume-pulse{animation:none}}
@keyframes section-fade{from{opacity:0}to{opacity:1}}.section-screen:not([hidden]){animation:section-fade .2s ease-out}.board-list{min-height:760px}#boardList{min-height:760px;overflow-anchor:none}
@media(max-width:600px){.map-screen>.adventure-card{display:grid;order:2}.chapter-library{order:1}}
html,body{width:100%;max-width:100%;overflow-x:clip;overscroll-behavior:none}body{margin:0}dialog{max-width:calc(100vw - 24px);overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;-webkit-app-region:no-drag}*,*::before,*::after{-webkit-app-region:no-drag}
.game-screen{height:calc(100dvh - 92px);min-height:0;width:100%;max-width:1800px;overflow:hidden}.game-screen #arena,.game-screen:has(#arena .tube-target:nth-child(9)) #arena{height:auto;min-height:0!important;flex:1 1 0}.game-topline,.booster-dock,.message-strip{flex-shrink:0}.booster-dock{padding:12px 18px 10px;margin-bottom:8px}.booster-icon{height:52px;width:58px}.booster-icon svg{width:32px;height:32px}.dock-caption{margin-top:6px}
.chapter-library{gap:10px}.chapter-library .map-actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:10px}.chapter-library .map-action{min-height:64px;flex-direction:row;gap:7px;padding:8px;font-size:14px}.chapter-library .map-action svg{width:28px;height:28px}.chapter-library>.chapter-tabs{padding:8px}.chapter-library .chapter-tab{height:48px}.chapter-library .atlas{padding:16px}.chapter-library .atlas-heading{margin-bottom:10px}.chapter-library .level-cell{height:clamp(44px,calc((100dvh - 330px)/5),87px)}
@media(max-width:600px){.game-screen{height:calc(100dvh - 76px)}.game-topline{min-height:56px}.booster-dock{padding:8px 6px;margin-bottom:5px}.booster-icon{width:46px;height:42px}.booster-name{font-size:11px}.booster-price{font-size:11px!important}.dock-caption{display:none}.map-screen{padding-top:6px;gap:10px}.adventure-card{display:none}.chapter-library .map-action{flex-direction:column;font-size:12px;min-height:60px;gap:3px}.chapter-library .map-action svg{width:24px;height:24px}.chapter-library .level-cell{height:clamp(44px,calc((100dvh - 310px)/5),74px)}.chapter-library .chapter-tab span{font-size:10px}}
@media(max-height:620px) and (min-width:601px){.game-screen{height:calc(100dvh - 68px)}.booster-dock{padding:6px 12px}.booster-icon{height:36px;width:42px}.booster-name{font-size:11px}.dock-caption{display:none}}

/* Board first: the game screen fills the viewport exactly and the arena takes every pixel left over. */
.game-screen{height:calc(100dvh - 92px);min-height:0}
#arena{height:auto!important;min-height:0!important;flex:1 1 0!important}
.game-screen.crowded .game-topline{min-height:58px}
.game-screen.crowded .star-goal>span{display:none}
.game-screen.crowded .star-goal>div{font-size:24px;letter-spacing:4px}
.game-screen.crowded .rule-badge{margin-top:2px;padding:2px 9px;font-size:9px}
.game-screen.crowded .moves-pill{padding:6px 14px}
.game-screen.crowded .moves-pill b{font-size:21px}
.game-screen.crowded .message-strip{min-height:20px;padding-bottom:4px;font-size:12px;line-height:1.3}
.game-screen.crowded .booster-dock{margin:2px auto 10px;padding:14px 18px 8px}
.game-screen.crowded .dock-caption{top:-8px;font-size:9px}
.game-screen.crowded .boosters{gap:10px}
.game-screen.crowded .booster-icon{width:54px;height:50px;border-radius:15px}
.game-screen.crowded .booster-icon svg{width:30px;height:30px}
.game-screen.crowded .booster-icon .glyph{font-size:28px}
.game-screen.crowded .booster-name{font-size:12px}
.game-screen.crowded .booster-price{font-size:12px!important}
.game-screen.crowded .game-actions .square-button{width:52px;height:52px;font-size:28px}
@media(max-width:600px){.game-screen{height:calc(100dvh - 76px)}.game-screen.crowded .booster-icon{width:48px;height:46px}.game-screen.crowded .booster-icon svg{width:26px;height:26px}.game-screen.crowded .booster-name{font-size:11px}.game-screen.crowded .game-actions .square-button{width:46px;height:46px;font-size:24px}}
@media(max-height:620px) and (min-width:601px){.game-screen{height:calc(100dvh - 68px)}}

/* Crowded boards scroll instead of shrinking below a tappable size; landscape phones get a slim chrome. */
#arena{overflow:visible}
#arena.scrolling{overflow-y:auto;overscroll-behavior:contain}
@media(max-height:520px){.hud{height:60px;padding:8px 14px}.game-screen{height:calc(100dvh - 60px)}.hud-title strong{font-size:17px}.hud-title>span{display:none}.game-topline{min-height:46px;padding:0 14px}.star-goal>span{display:none}.star-goal>div{font-size:20px;letter-spacing:3px}.message-strip{min-height:0;padding-bottom:2px;font-size:11px}.booster-dock{margin:0 auto 6px;padding:10px 14px 6px}.dock-caption{display:none}.boosters{gap:8px}.booster-icon{width:44px;height:40px;border-radius:12px}.booster-icon svg{width:24px;height:24px}.booster-name{display:none}.booster-price{font-size:11px!important}.game-actions .square-button{width:44px;height:44px;font-size:24px}}

/* Volume sliders: a glass tube filling with sand, crystal handle */
input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:26px;margin:12px 0 2px;border:1px solid #86b0c4;border-radius:999px;background-image:repeating-linear-gradient(115deg,#ffffff14 0 2px,#00000014 2px 5px),linear-gradient(90deg,#ffdf9e 0,#f0b95c var(--fill,50%),#0a1e2d var(--fill,50%));box-shadow:inset 0 3px 9px #000b,inset 0 -2px 0 #ffffff12,0 0 0 4px #0d2433,0 0 22px #ffcf7126;cursor:pointer;touch-action:none}
input[type=range]:focus-visible{outline:3px solid #a5fff0;outline-offset:6px}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:28px;height:34px;margin-top:-5px;border:0;background:linear-gradient(135deg,#fffdf2 0 14%,#ffeaae 15% 42%,#e0a94c 43% 70%,#fff4d2 71%);clip-path:polygon(50% 0,88% 26%,73% 100%,27% 100%,12% 26%);filter:drop-shadow(0 0 9px #ffd77aaa) drop-shadow(0 2px 0 #6d4a20);transition:transform .12s}
input[type=range]::-moz-range-thumb{width:26px;height:32px;border:0;background:linear-gradient(135deg,#fffdf2 0 14%,#ffeaae 15% 42%,#e0a94c 43% 70%,#fff4d2 71%);clip-path:polygon(50% 0,88% 26%,73% 100%,27% 100%,12% 26%);filter:drop-shadow(0 0 9px #ffd77aaa)}
input[type=range]::-moz-range-track{height:26px;background:transparent}
input[type=range]:active::-webkit-slider-thumb{transform:scale(1.12)}

/* Loading screen: shown until fonts and the background are ready, so nothing jumps afterwards */
.boot{position:fixed;inset:0;z-index:200;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 40%,#123147,#060f1c 72%);transition:opacity .45s ease}
.boot.done{opacity:0;pointer-events:none}
.boot-card{opacity:0;transition:opacity .25s ease;display:grid;justify-items:center;gap:8px;padding:0 20px;text-align:center}
.boot-logo{font-family:Russo One,Segoe UI,sans-serif;font-size:clamp(28px,7vw,44px);color:#ffdea0;letter-spacing:-.5px;text-shadow:0 3px 0 #67472d,0 6px 20px #0009}
.boot-sub{font-size:11px;font-weight:900;letter-spacing:5px;color:#dfc79b}
.boot-bar{width:min(320px,70vw);height:12px;margin-top:16px;overflow:hidden;border:1px solid #5d8196;border-radius:99px;background:#0a1e2d;box-shadow:inset 0 2px 6px #000a}
.boot-bar i{display:block;width:0;height:100%;border-radius:99px;background:linear-gradient(90deg,#7aead3,#ffd78a);transition:width .3s ease}
.boot-note{font-size:12px;color:#9db7cd}
.boot.ready .boot-card{opacity:1}
.chapter-tab.locked{background:#102438aa;border-color:#334b5c;color:#668295}

/* App-like window: the page itself never scrolls and never shows a scrollbar.
   Screens scale down to the window instead, the way a game canvas does. */
html,body{height:100%;max-height:100%;overflow:hidden;overscroll-behavior:none}
html{scrollbar-gutter:auto}
#app{display:flex;flex-direction:column;height:100dvh;max-height:100dvh;overflow:hidden}
/* The scaled screen must not clip itself: #app does the clipping, so a shrunk
   screen keeps showing all of its content instead of cutting it at the old height. */
.map-screen,.section-screen,.game-screen{flex:1 1 auto;min-height:0;width:100%;align-self:stretch}
.map-screen{align-content:start;align-items:start;padding-top:8px;padding-bottom:8px;transform:scale(var(--fit,1));transform-origin:top center}
.section-screen{padding-bottom:10px}
/* Sections shrink a little, then scroll inside their own panel — never the page. */
.section-screen>.section-panel{min-height:0;max-height:calc(100dvh - 108px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#4d7488 transparent}
.section-panel::-webkit-scrollbar{width:8px}
.section-panel::-webkit-scrollbar-thumb{background:#4d7488;border-radius:99px}
.section-panel::-webkit-scrollbar-track{background:transparent}
/* The leaderboard list scrolls inside the panel, not the whole page. */
/* The list fills the panel down to the bottom and scrolls inside itself. */
.board-layout{align-items:stretch}
.board-list,#boardList{min-height:0;height:100%;max-height:none;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#4d7488 transparent}
#boardScreen>.section-panel{display:flex;flex-direction:column;overflow:hidden}
#boardScreen .board-layout{flex:1 1 auto;min-height:0}
#boardList::-webkit-scrollbar{width:8px}
#boardList::-webkit-scrollbar-thumb{background:#4d7488;border-radius:99px}
#boardList::-webkit-scrollbar-track{background:transparent}
dialog.wide-dialog{scrollbar-width:thin;scrollbar-color:#4d7488 transparent}

/* Locked map cells and chapters: a padlock and nothing else. */
.level-cell.locked{display:grid;place-items:center;color:#7d9db1}
.level-cell.locked .lock-icon{width:30px;height:30px}
.chapter-tab.locked .lock-icon{width:17px;height:17px;vertical-align:-3px}
/* One-off perks shelf in the shop. */
.perks-grid{grid-template-columns:minmax(0,1fr)}
.shop-card.perk{flex-direction:row;align-items:center;gap:16px;text-align:left;padding:18px 22px}
.shop-card.perk .perk-art{display:grid;place-items:center;width:58px;height:58px;flex-shrink:0;border-radius:16px;border:1px solid #9fd0c5;background:linear-gradient(#2f5568,#16303f);color:#9ff0dd}
.shop-card.perk .perk-art svg{width:32px;height:32px}
.shop-card.perk .shop-title{font-size:19px}
.shop-card.perk .perk-text{font-size:13px;color:#a9c8d6;font-weight:600;line-height:1.45}
.shop-card.perk .shop-price{margin-left:auto;flex-shrink:0}
.shop-card.owned{filter:saturate(.5);opacity:.72}
.shop-card.owned .shop-price b{color:#8ceccd}

/* Gap between the top of the board and the rows around the player. */
.board-gap{text-align:center;letter-spacing:6px;color:#6d90a6;font-size:18px;padding:2px 0 6px}

/* The encyclopedia is a wide shelf, not a narrow column: more cards per row and
   shorter cards, so the panel fits the window at full size instead of shrinking. */
#bookScreen{max-width:1720px}
#bookScreen .section-panel{padding:22px 26px 20px}
#bookScreen .book-grid{grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:16px;margin-top:14px}
#bookScreen .book-card{padding:12px 15px 14px;gap:7px}
#bookScreen .book-art{height:82px}
@media(max-width:820px){#bookScreen .book-grid{grid-template-columns:1fr}}

/* Leaderboard rows carry the player's avatar, like the Yandex Games profile. */
.board-player{display:flex;align-items:center;gap:12px;min-width:0}
.board-avatar{display:grid;place-items:center;flex-shrink:0;width:38px;height:38px;border-radius:50%;border:1px solid #6d93a8;background:#123047 center/cover no-repeat;color:#bcdcea;font-size:16px;font-weight:900;font-style:normal}
.board-row.you .board-avatar{border-color:#ffd78a}
.board-player .board-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.board-place{margin-left:12px;padding:4px 10px;border:1px solid #6d93a8;border-radius:10px;font-size:13px;color:#cfe6f2}

/* Premium alchemist map — rebuilt from independent sprite assets. */
:root{--violet-ink:#1b0736;--violet-deep:#260949;--violet-panel:#3d1768;--violet-panel-2:#52227f;--violet-edge:#9e51ed;--lavender:#d8bdff;--cream:#fff2d2;--gold:#ffd45b;--gold-deep:#f39a23;--wine:#5c191d}
body{color:var(--cream);background:#1a0732;font-family:"Trebuchet MS","Segoe UI",sans-serif}
.world{background-image:linear-gradient(180deg,#1d073a99 0,#26084655 36%,#18052fc7 100%),url(assets/workshop.webp);background-position:center;background-size:cover;filter:saturate(1.32) contrast(1.06) hue-rotate(10deg);transform:scale(1.035)}
.world::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 34%,transparent 0 27%,#16032855 65%,#10011ebd 100%),linear-gradient(180deg,#22063a4d,#42136a26 45%,#16042899);box-shadow:inset 0 0 150px #160125}
#app{isolation:isolate}
button{font-family:inherit}
.hud{box-sizing:border-box;display:grid;grid-template-columns:76px minmax(0,1fr) auto 76px;align-items:center;gap:18px;width:min(1120px,calc(100% - 40px));height:112px;margin:0 auto;padding:16px 0;background:transparent;border:0;box-shadow:none;z-index:20}
.hud-title{min-width:0;text-align:left;text-shadow:0 3px 9px #130021}.hud-title span{color:#d8c0ff}.hud-title strong{color:#fff2d0}
.hud .square-button{width:68px;height:68px;padding:7px;border:2px solid #9b49e8;border-radius:22px;background:linear-gradient(145deg,#6f2aad,#34135e);box-shadow:inset 0 2px 3px #e4b7ff5e,inset 0 -6px 12px #19062d99,0 7px 15px #1200228c,0 0 0 4px #2b0b4f}
.hud .square-button:hover{filter:brightness(1.12);transform:translateY(-2px)}
.hud .square-button img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 3px #17002899)}
.hud .home-button{font-size:37px;color:#fff0ce}.hud .home-button span{transform:translateY(-2px)}
.wallets{display:flex;align-items:center;justify-content:flex-end;gap:18px}
.wallet{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:flex-start;gap:10px;min-width:184px;height:66px;padding:6px 52px 6px 18px;border:2px solid #6b309c;border-radius:24px;background:linear-gradient(180deg,#35135d,#260a49);color:white;box-shadow:inset 0 2px 4px #b76ff641,inset 0 -5px 12px #14032180,0 6px 16px #10001fa3}
.wallet img{width:54px;height:54px;margin-left:-10px;object-fit:contain;filter:drop-shadow(0 3px 4px #10001d)}
.wallet b{font-family:"Russo One","Trebuchet MS",sans-serif;font-size:27px;line-height:1;text-shadow:0 3px 0 #160525;white-space:nowrap}
.wallet small{color:#bba5eb;font-weight:900;font-size:17px;margin-left:-3px;white-space:nowrap}
.wallet-plus{position:absolute;right:9px;top:50%;display:grid;place-items:center;width:38px;height:38px;transform:translateY(-50%);border:2px solid #fff0ac;border-radius:12px;background:linear-gradient(#ffe47b,#f2a62d);color:#66220f;font-size:27px;font-weight:1000;line-height:1;box-shadow:inset 0 2px 2px #fff8ce,0 3px 0 #9c5217,0 0 12px #ffc44355}
.stars-wallet{padding-right:18px}.stars-wallet img{width:58px;height:58px}.coin-wallet img{width:59px;height:59px}.coin-wallet,.gem-wallet{cursor:pointer}
.mail-button{position:relative}.mail-button .notify-dot{position:absolute;right:-5px;top:-7px;width:22px;height:22px;border:2px solid #ffc1ca;border-radius:50%;background:#ff4d63;box-shadow:0 2px 0 #7a1730,0 0 14px #ff4c6a}
body:has(#mapScreen:not([hidden])) .hud-title{visibility:hidden}
body:has(#mapScreen:not([hidden])) #homeBtn{display:none}
body:not(:has(#mapScreen:not([hidden]))) .hud{grid-template-columns:76px 76px minmax(0,1fr) auto 76px}

.map-screen{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;align-content:unset;gap:18px;width:min(960px,calc(100% - 28px));margin:0 auto;padding:6px 0 22px;transform:scale(var(--fit,1));transform-origin:top center;overflow:visible}
.map-screen>*{flex-shrink:0}
.chapter-tabs{display:flex;gap:16px;width:100%;height:112px;padding:4px 6px 10px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;mask-image:linear-gradient(90deg,transparent,#000 2%,#000 98%,transparent)}
.chapter-tabs::-webkit-scrollbar,.level-grid::-webkit-scrollbar{display:none}
.chapter-tab{box-sizing:border-box;position:relative;flex:0 0 215px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;height:94px;padding:12px 16px;border:2px solid #7135a4;border-radius:27px;background:linear-gradient(150deg,#4f217a,#321255);color:#eee1ff;box-shadow:inset 0 3px 5px #bf78fa33,inset 0 -8px 12px #1b073399,0 7px 14px #12002094;scroll-snap-align:center;transition:.18s ease}
.chapter-tab span{font-size:23px;font-weight:1000;line-height:1}.chapter-tab small{font-size:15px;color:#d4bdf5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-weight:700}
.chapter-tab[aria-pressed=true]{border-color:#ffdc6b;background:linear-gradient(145deg,#ffe881 0,#ffc947 52%,#f3a12c 100%);color:#591b19;box-shadow:inset 0 4px 4px #fffbd2,inset 0 -8px 12px #c56c1f55,0 5px 0 #d17626,0 0 22px #ffd656b8;transform:scale(1.03)}
.chapter-tab[aria-pressed=true] small{color:#69271e}.chapter-tab.locked{background:linear-gradient(145deg,#4b1d73,#2b104a);border-color:#683193;color:#cdb9e9;opacity:.82}
.chapter-tab .sprite-lock{position:absolute;top:-15px;width:38px;height:38px;object-fit:contain;filter:drop-shadow(0 3px 3px #170024)}

.adventure-card{box-sizing:border-box;position:relative;display:flex;flex-direction:column;align-items:center;width:min(760px,92vw);min-height:635px;padding:27px 54px 30px;border:5px solid #9a43e3;border-radius:78px 78px 70px 70px;background:linear-gradient(180deg,#35125fd9 0,#21093ee8 75%),radial-gradient(circle at 50% 36%,#6c2b94,#1f0739 73%);box-shadow:inset 0 0 0 5px #d59bff55,inset 0 0 42px #7c32bd5c,0 0 0 9px #301052,0 15px 38px #11001da8,0 0 32px #974df973;overflow:visible;text-align:center}
.adventure-card::before,.adventure-card::after{content:"";position:absolute;z-index:-1;top:54px;width:80px;height:64px;border:8px solid #a04ceb;background:#2c0d50}.adventure-card::before{left:-62px;border-right:0;border-radius:38px 0 0 38px}.adventure-card::after{right:-62px;border-left:0;border-radius:0 38px 38px 0}
.card-sparkle{position:absolute;z-index:4;width:55px;height:55px;object-fit:contain;filter:drop-shadow(0 0 12px #ffd951)}.card-sparkle-top{top:-34px;left:calc(50% - 27px)}.card-sparkle-bottom{bottom:-32px;left:calc(50% - 27px)}
.level-title-frame{box-sizing:border-box;width:min(470px,83%);margin-top:-7px;padding:12px 32px 14px;border:3px solid #a649d8;border-radius:48px;background:linear-gradient(180deg,#48166f,#2b0c4b);box-shadow:inset 0 3px 8px #e5b0ff4f,inset 0 -5px 8px #180429b8,0 5px 0 #1b052f,0 0 20px #9f3cea61}
.level-title-frame h2{margin:0;color:#fff4d5;font-family:"Russo One","Trebuchet MS",sans-serif;font-size:42px;line-height:1.08;text-shadow:0 4px 0 #4d2753,0 0 12px #fff2ba4a}
.adventure-card .logo-subtitle{margin:14px 0 1px;color:#eee3ff;font-size:24px;font-weight:1000;letter-spacing:.01em;text-shadow:0 3px 5px #120021}
.mini-scene{position:relative;width:100%;height:285px;margin:-12px 0 -11px;background:none;border:0;box-shadow:none;overflow:visible}
.mini-scene canvas{display:none}.level-hero-art{width:100%;height:100%;object-fit:contain;filter:saturate(1.12) contrast(1.04) drop-shadow(0 9px 18px #100019);mask-image:radial-gradient(ellipse 70% 68% at 50% 50%,#000 38%,#000c 67%,transparent 89%)}
.adventure-card>p{box-sizing:border-box;width:calc(100% + 24px);margin:0 -12px 8px;padding:13px 20px 15px;border:2px solid #7d35b2;border-radius:34px;background:linear-gradient(180deg,#401265,#2d0c4d);color:#fff5dd;font-size:21px;font-weight:800;box-shadow:inset 0 2px 4px #c97cf22e,0 4px 9px #15002780}
.goal-panel{box-sizing:border-box;width:100%;padding:10px 20px 15px;border:2px solid #67308f;border-radius:26px;background:#331052c7;box-shadow:inset 0 3px 12px #11002287}
.goal-heading{display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:5px;color:#f6eaff;font-size:18px;font-weight:900}.goal-heading i{width:80px;height:2px;background:linear-gradient(90deg,transparent,#a95ced)}.goal-heading i:last-child{background:linear-gradient(90deg,#a95ced,transparent)}
.preview-goals{display:flex;justify-content:center;gap:14px}.preview-goal{display:flex;align-items:center;gap:9px;min-width:120px;height:58px;padding:4px 14px;border:2px solid #5f288d;border-radius:20px;background:linear-gradient(#2c0d4c,#401468);box-shadow:inset 0 2px 5px #b864ef31}.preview-goal img{width:49px;height:49px;object-fit:contain;filter:drop-shadow(0 2px 5px #0e001a)}.preview-goal b{font-size:20px;color:#fff7e4;text-shadow:0 2px 3px #160023}
.adventure-card .play-button{width:88%;min-height:84px;margin:18px 0 0;border:3px solid #fff1a4;border-radius:43px;background:linear-gradient(180deg,#ffe976 0,#ffc54b 54%,#f19a26 100%);color:#5a1716;font-family:"Russo One","Trebuchet MS",sans-serif;font-size:44px;text-transform:none;text-shadow:0 2px 0 #fff1a2;box-shadow:inset 0 5px 4px #fffbd4,inset 0 -7px 8px #c86c1e4f,0 6px 0 #b75a1f,0 0 25px #ffd55380}
.adventure-card .play-button span{margin-left:26px;font-size:39px}.adventure-card .play-button:hover{filter:brightness(1.08);transform:translateY(-2px)}
.adventure-card .points-line{position:absolute;top:31px;right:35px;display:none}.adventure-reward{display:none}

.atlas{box-sizing:border-box;width:100%;padding:0;background:none;border:0;box-shadow:none}.atlas-heading{display:flex;align-items:center;justify-content:center;gap:15px;height:34px;margin-bottom:7px}.atlas-heading>div:first-child{display:flex;align-items:center;gap:10px}.atlas-heading h2{margin:0;color:#efe2ff;font-size:17px}.atlas-heading .tiny-label{color:#ffd968}.progress-medallion{padding:5px 12px;border-color:#7c3cb1;background:#341253;color:#ffe16e}
.level-carousel{display:grid;grid-template-columns:74px minmax(0,1fr) 74px;align-items:center;gap:8px;width:100%}.carousel-arrow{width:68px;height:68px;padding:4px;border:2px solid #9a4de4;border-radius:50%;background:linear-gradient(145deg,#6827a0,#35125e);box-shadow:inset 0 3px 4px #e2b4ff4d,inset 0 -6px 9px #19052d,0 6px 11px #10001e}.carousel-arrow img{width:100%;height:100%;object-fit:contain}.carousel-arrow:hover{filter:brightness(1.15);transform:scale(1.04)}
.level-grid{display:flex;align-items:center;gap:13px;width:100%;height:122px;padding:6px 8px;overflow-x:auto;overflow-y:visible;scroll-snap-type:x mandatory;scrollbar-width:none}
.level-cell{box-sizing:border-box;position:relative;flex:0 0 106px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:102px;padding:10px 5px;border:2px solid #7c38b7;border-radius:24px;background:linear-gradient(155deg,#5a2688,#331151);color:#f2eaff;box-shadow:inset 0 3px 5px #d798ff30,inset 0 -7px 10px #1a062e,0 6px 12px #110020;scroll-snap-align:center}
.level-cell>span{font-family:"Russo One","Trebuchet MS",sans-serif;font-size:27px}.level-cell small{height:21px;color:#ffd331;font-size:19px;line-height:1;white-space:nowrap;text-shadow:0 2px 3px #42130a}.level-cell em{display:block;max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#ccb6e8;font-size:10px;font-style:normal;font-weight:800}.level-cell.current{height:116px;border-color:#fff085;background:linear-gradient(150deg,#ffd95e,#f4ac31);color:#652318;box-shadow:inset 0 4px 5px #fffbd0,inset 0 -8px 10px #c36722,0 6px 0 #a54b1d,0 0 24px #ffd74ca6}.level-cell.current small{color:#74431e;text-shadow:none}.level-cell.current em{color:#7c331b}.level-cell.passed:not(.current){border-color:#ac58e5}.level-cell.locked{opacity:.75;color:#bca2dd}.level-cell.locked>span{opacity:.48}.level-cell.locked .sprite-lock{width:44px;height:44px;object-fit:contain;margin-top:-7px;filter:drop-shadow(0 3px 4px #120020)}

.map-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:22px;width:min(900px,100%);height:154px;margin-top:2px;padding:0;background:none;border:0;box-shadow:none}
.map-action{box-sizing:border-box;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:0;height:148px;padding:78px 10px 15px;border:2px solid #7737b0;border-radius:30px;background:linear-gradient(165deg,#55217f,#341151);color:#f6efff;box-shadow:inset 0 3px 5px #d59cff3d,inset 0 -8px 11px #1b0630,0 8px 15px #120020a8;overflow:visible}
.map-action>img{position:absolute;left:8%;top:-13px;width:84%;height:105px;object-fit:contain;filter:drop-shadow(0 7px 8px #12001d);mask-image:radial-gradient(ellipse 67% 66% at 50% 50%,#000 45%,#000b 69%,transparent 91%)}
.map-action>span{position:relative;z-index:2;font-family:"Russo One","Trebuchet MS",sans-serif;font-size:21px;text-shadow:0 3px 3px #170025}.map-action.active{border-color:#ffe56b;box-shadow:inset 0 3px 5px #f0b9ff52,inset 0 -8px 11px #1b0630,0 5px 0 #ac5a24,0 0 20px #ffd83f}.map-action:hover{filter:brightness(1.12);transform:translateY(-2px)}.map-action .notify-dot{position:absolute;right:10px;top:9px;z-index:3;width:16px;height:16px;border-radius:50%;background:#ff4e64;box-shadow:0 0 10px #ff3f5d}

/* Match the new purple-gold language on secondary screens and gameplay chrome. */
.game-topline,.message-strip,.booster-dock,.section-panel,dialog{border-color:#8542c2;background:linear-gradient(180deg,#35125ee8,#21083ee8);box-shadow:inset 0 0 25px #8e42cb2b,0 12px 35px #10001f99}.moves-pill,.star-goal,.booster,.shop-card,.daily-cell,.book-card,.board-rules{border-color:#6f329f;background:linear-gradient(155deg,#4b1b73,#2b0d49)}
.gold-button{border-color:#fff0a2;background:linear-gradient(#ffe879,#ffc448 58%,#ef9624);color:#5b1b17;box-shadow:inset 0 3px 3px #fffbd2,0 4px 0 #ab561d,0 0 20px #ffd45266}
.section-head h2,dialog h2{color:#fff1ce}.back-button,.text-button{color:#e2caff}.tiny-label{color:#f6d367}

@media(max-width:900px){
  .hud{grid-template-columns:62px minmax(0,1fr) 62px;gap:9px;width:calc(100% - 20px);height:94px;padding:10px 0}.hud .square-button{width:57px;height:57px;border-radius:18px}.hud-title{display:none}.wallets{justify-content:center;gap:8px}.wallet{min-width:0;width:auto;height:55px;padding:4px 42px 4px 11px;border-radius:19px}.wallet img{width:45px;height:45px}.wallet b{font-size:22px}.wallet small{font-size:13px}.wallet-plus{right:6px;width:31px;height:31px;border-radius:10px;font-size:22px}.stars-wallet{padding-right:10px}.coin-wallet{display:flex}.map-screen{gap:14px}.chapter-tabs{height:102px}.chapter-tab{flex-basis:202px;height:88px}.map-actions{gap:12px}.map-action>span{font-size:18px}
}
@media(max-width:600px){
  .hud{grid-template-columns:48px minmax(0,1fr) 48px;width:calc(100% - 12px);height:76px;gap:5px;padding:7px 0}.hud .square-button{width:45px;height:45px;padding:5px;border-width:1px;border-radius:14px}.wallets{gap:4px}.wallet{height:44px;padding:3px 30px 3px 7px;border-width:1px;border-radius:15px;gap:2px}.wallet img{width:37px;height:37px;margin-left:-5px}.wallet b{font-size:16px}.wallet small{font-size:10px}.wallet-plus{right:4px;width:24px;height:24px;border-width:1px;border-radius:7px;font-size:17px}.stars-wallet{padding-right:6px}.coin-wallet{padding-right:30px}.mail-button .notify-dot{width:14px;height:14px;right:-3px;top:-4px}.map-screen{display:flex;width:calc(100% - 16px);gap:10px;padding-top:2px}.chapter-tabs{height:82px;gap:9px;padding:2px 3px 7px}.chapter-tab{flex-basis:150px;height:70px;padding:8px 10px;border-radius:20px}.chapter-tab span{font-size:17px}.chapter-tab small{font-size:11px}.chapter-tab .sprite-lock{top:-10px;width:29px;height:29px}.adventure-card{display:flex;width:calc(100% - 36px);min-height:500px;padding:22px 20px 23px;border-width:3px;border-radius:48px}.adventure-card::before,.adventure-card::after{top:44px;width:46px;height:44px;border-width:5px}.adventure-card::before{left:-35px}.adventure-card::after{right:-35px}.card-sparkle{width:40px;height:40px}.card-sparkle-top{top:-25px;left:calc(50% - 20px)}.card-sparkle-bottom{bottom:-25px;left:calc(50% - 20px)}.level-title-frame{padding:9px 20px;border-width:2px}.level-title-frame h2{font-size:28px}.adventure-card .logo-subtitle{margin:9px 0 0;font-size:18px}.mini-scene{height:214px;margin:-7px 0 -8px}.adventure-card>p{font-size:15px;padding:10px 12px;margin-bottom:6px}.goal-panel{padding:7px 8px 10px}.goal-heading{font-size:14px;gap:8px}.goal-heading i{width:42px}.preview-goals{gap:6px}.preview-goal{box-sizing:border-box;min-width:0;width:31%;height:45px;padding:2px 5px;gap:2px;border-radius:14px}.preview-goal img{width:36px;height:36px}.preview-goal b{font-size:14px}.adventure-card .play-button{min-height:63px;margin-top:12px;font-size:30px}.adventure-card .play-button span{margin-left:14px;font-size:26px}.atlas-heading{display:none}.level-carousel{grid-template-columns:52px minmax(0,1fr) 52px}.carousel-arrow{width:48px;height:48px}.level-grid{height:91px;gap:7px;padding:4px}.level-cell{flex-basis:74px;height:79px;border-radius:18px}.level-cell.current{height:88px}.level-cell>span{font-size:21px}.level-cell small{font-size:14px;height:15px}.level-cell em{display:none}.level-cell.locked .sprite-lock{width:32px;height:32px}.map-actions{gap:7px;height:110px}.map-action{height:105px;padding:57px 4px 9px;border-radius:20px}.map-action>img{top:-8px;height:75px}.map-action>span{font-size:13px}.section-screen>.section-panel{max-height:calc(100dvh - 80px)}
}
@media(max-width:390px){.coin-wallet{display:none}.chapter-tab{flex-basis:138px}.adventure-card{width:calc(100% - 28px)}.map-action>span{font-size:12px}}

/* True portrait foundation: the game is always a 9:16 mobile surface.
   Wide screens keep the illustrated workshop visible as side scenery. */
html,body{width:100%;height:100%;background:#150329}
body{display:flex;justify-content:center}
#app{position:relative;width:min(100vw,56.25dvh);height:100dvh;max-width:100vw;margin:0 auto;background:linear-gradient(180deg,#2507437d 0,#3a0c5e3b 35%,#180329b8 100%);box-shadow:-22px 0 55px #12001b9c,22px 0 55px #12001b9c,inset 1px 0 #ad68e536,inset -1px 0 #ad68e536;container:alchemist / inline-size}
#app::after{content:"";position:absolute;z-index:150;inset:0;pointer-events:none;box-shadow:inset 0 0 40px #1300215e}
.world{background-position:center;background-size:cover}

/* Compact reference-like top bar inside the portrait surface. */
.hud{box-sizing:border-box;flex:0 0 70px;display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:center;gap:6px;width:100%;height:70px;margin:0;padding:8px 9px;background:linear-gradient(180deg,#1f063cdb,transparent);overflow:visible}
.hud-title{display:none!important}
.hud .square-button{box-sizing:border-box;width:46px;height:46px;padding:3px;border:2px solid #954de0;border-radius:15px;background:linear-gradient(145deg,#6828a3,#351052);box-shadow:inset 0 2px 3px #dfb2ff65,inset 0 -5px 8px #170326,0 4px 0 #1d0730,0 0 11px #8b37da4a}
.hud .square-button img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 3px #13001e)}
#settingsBtn{padding:4px;background:linear-gradient(145deg,#63249d,#351052)}
#settingsBtn img{transform:scale(.9)}
.hud .home-button{padding:7px}.hud .home-button img{transform:scale(.88)}
.wallets{display:flex;align-items:center;justify-content:stretch;gap:4px;width:100%;min-width:0;margin:0}
.wallet{box-sizing:border-box;flex:1 1 0;min-width:0;width:auto;height:45px;padding:3px 23px 3px 3px;gap:0;border:1.5px solid #7134a6;border-radius:15px;background:linear-gradient(180deg,#37125f,#260940);box-shadow:inset 0 2px 3px #c279f240,inset 0 -4px 7px #140121,0 3px 7px #100019}
.wallet img,.stars-wallet img,.coin-wallet img{flex:0 0 34px;width:34px;height:34px;margin:0;object-fit:contain;filter:drop-shadow(0 2px 2px #160020)}
.wallet b{min-width:0;font-size:15px;text-shadow:0 2px 0 #160021;overflow:hidden;text-overflow:ellipsis}
.wallet small{font-size:8px;margin-left:1px;color:#baa6dd}.wallet-plus{right:3px;width:19px;height:22px;border-width:1px;border-radius:7px;font-size:15px;box-shadow:inset 0 1px 1px #fff7c8,0 2px 0 #8e4617}
.stars-wallet{padding-right:4px}.stars-wallet img{flex-basis:36px;width:36px;height:36px}
.mail-button .notify-dot{width:14px;height:14px;right:-3px;top:-4px;border-width:1px}
body:not(:has(#gameScreen:not([hidden]))) #homeBtn{display:none}
body:has(#gameScreen:not([hidden])) .hud{grid-template-columns:46px 46px minmax(0,1fr) 46px;gap:4px}

/* Portrait map matching the reference hierarchy. */
.map-screen{box-sizing:border-box;position:relative;flex:1 0 auto;display:flex;flex-direction:column;align-items:center;gap:7px;width:100%;min-height:0;margin:0;padding:1px 5px 11px;overflow:visible;transform:scale(var(--fit,1));transform-origin:top center}
.map-screen>*{flex-shrink:0}
.chapter-tabs{box-sizing:border-box;display:flex;gap:7px;width:calc(100% - 8px);height:67px;padding:3px 2px 6px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;mask-image:linear-gradient(90deg,transparent,#000 2%,#000 98%,transparent)}
.chapter-tab{box-sizing:border-box;flex:0 0 106px;height:57px;min-width:106px;padding:7px 7px 6px;gap:3px;border:1.5px solid #7136a8;border-radius:17px;background:linear-gradient(155deg,#52207c,#31104e);box-shadow:inset 0 2px 3px #d49aff3b,inset 0 -5px 7px #19042a,0 4px 7px #11001e}
.chapter-tab span{display:block!important;margin:0;font-size:14px;line-height:1;font-weight:1000}.chapter-tab small{font-size:9px;line-height:1.2;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.chapter-tab[aria-pressed=true]{border-color:#ffe67a;background:linear-gradient(145deg,#ffe679,#ffc847 58%,#ee9829);box-shadow:inset 0 3px 3px #fffbd4,inset 0 -5px 8px #c36920,0 4px 0 #b2541e,0 0 15px #ffd64f8f;transform:none}
.chapter-tab .sprite-lock{top:-8px;width:24px;height:24px}
.chapter-pagination{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;height:14px}.chapter-pagination i{display:block;width:9px;height:9px;border:1px solid #9671d2;border-radius:50%;background:#604196;box-shadow:inset 0 1px 2px #180224}.chapter-pagination i.active{background:#ffd84c;border-color:#fff18a;box-shadow:0 0 8px #ffd742}
.adventure-card{box-sizing:border-box;position:relative;display:flex;width:calc(100% - 43px);min-height:492px;padding:18px 18px 19px;border:3px solid #a755ef;border-radius:49px 49px 43px 43px;background:linear-gradient(180deg,#34105be8,#1e0639f2 78%);box-shadow:inset 0 0 0 3px #dbadff4a,inset 0 0 25px #8433bd57,0 0 0 5px #2d0b4c,0 8px 23px #11001aa6,0 0 21px #9749e86b}
.adventure-card::before,.adventure-card::after{top:35px;width:35px;height:35px;border-width:4px}.adventure-card::before{left:-29px;border-radius:22px 0 0 22px}.adventure-card::after{right:-29px;border-radius:0 22px 22px 0}
.card-sparkle{width:36px;height:36px}.card-sparkle-top{top:-23px;left:calc(50% - 18px)}.card-sparkle-bottom{bottom:-22px;left:calc(50% - 18px)}
.level-title-frame{width:75%;margin-top:-3px;padding:8px 12px 9px;border-width:2px}.level-title-frame h2{font-size:28px}.adventure-card .logo-subtitle{margin:8px 0 0;font-size:16px;letter-spacing:.02em}
.mini-scene{width:calc(100% + 24px);height:231px;margin:-3px -12px -8px}.level-hero-art{width:100%;height:100%;object-fit:contain;mask-image:radial-gradient(ellipse 78% 75% at 50% 49%,#000 53%,#000e 72%,transparent 94%);filter:saturate(1.08) contrast(1.03) drop-shadow(0 5px 9px #0b0012)}
.adventure-card>p{width:calc(100% + 6px);min-height:0;margin:0 -3px 6px;padding:8px 9px 9px;border-width:1.5px;border-radius:22px;font-size:13px;line-height:1.22}
.goal-panel{width:100%;padding:6px 6px 8px;border-width:1.5px;border-radius:19px}.goal-heading{gap:6px;margin-bottom:2px;font-size:12px}.goal-heading i{width:35px}.preview-goals{gap:5px}.preview-goal{box-sizing:border-box;min-width:0;width:31.5%;height:43px;padding:1px 4px;gap:1px;border-width:1px;border-radius:12px}.preview-goal img{width:33px;height:33px}.preview-goal b{font-size:13px}
.adventure-card .play-button{width:90%;min-height:62px;margin-top:11px;border-width:2px;border-radius:32px;font-size:29px;box-shadow:inset 0 4px 3px #fffbd4,inset 0 -5px 7px #c86c1e4f,0 4px 0 #a94d19,0 0 18px #ffd5536b}.adventure-card .play-button span{margin-left:14px;font-size:25px}
.card-leaves{position:absolute;z-index:5;bottom:-12px;width:94px;height:94px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 4px 5px #0e0018)}.card-leaves-left{left:-42px}.card-leaves-right{right:-42px}
.atlas{width:100%;height:89px;padding:0}.atlas-heading{display:none}.level-carousel{grid-template-columns:43px minmax(0,1fr) 43px;gap:2px;width:100%;height:89px}.carousel-arrow{width:41px;height:41px;padding:1px;border-width:1.5px}.level-grid{height:88px;gap:5px;padding:3px 2px}.level-cell{flex:0 0 64px;height:72px;padding:5px 2px;gap:1px;border-width:1.5px;border-radius:15px}.level-cell.current{height:82px}.level-cell>span{font-size:18px}.level-cell small{height:14px;font-size:12px;letter-spacing:0}.level-cell em{display:none}.level-cell.locked .sprite-lock{width:27px;height:27px;margin-top:-3px}
.map-actions{box-sizing:border-box;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;width:calc(100% - 12px);height:104px;margin:1px 0 0;padding:0}.map-action{height:100px;min-height:0;padding:59px 2px 8px;border-width:1.5px;border-radius:18px}.map-action>img{left:3%;top:-9px;width:94%;height:73px;object-fit:contain;mask-image:none;filter:drop-shadow(0 4px 4px #100019)}.map-action>span{font-size:12px}.map-action.active{box-shadow:inset 0 2px 3px #efbdff4d,inset 0 -5px 7px #1a052c,0 3px 0 #9c451b,0 0 14px #ffd83f}.map-action .notify-dot{right:5px;top:5px;width:11px;height:11px}
#mainNav{position:absolute;z-index:20;left:6px;right:6px;bottom:5px;width:auto;height:104px;margin:0}#mainNav[hidden]{display:none!important}

/* Every playable level now uses the same portrait space instead of a wide board. */
.game-screen{box-sizing:border-box;flex:1 1 auto;width:100%;height:calc(100dvh - 70px);min-height:0;max-width:none;margin:0;padding:0 5px 5px;overflow:hidden}
.game-topline{box-sizing:border-box;position:relative;flex:0 0 78px;min-height:78px;margin:0;padding:7px 7px;border:1px solid #7132a6;border-radius:19px;background:linear-gradient(180deg,#3d1267,#290942);box-shadow:inset 0 2px 8px #a64ae343,0 5px 12px #100019}
.moves-pill{gap:3px;padding:7px 9px;border-radius:12px}.moves-pill b{font-size:21px}.moves-pill>span{font-size:9px}.star-goal>div{font-size:23px;letter-spacing:2px}.star-goal>span{font-size:9px}.rule-badge{font-size:8px!important;padding:2px 6px!important}.game-actions{gap:4px}.game-actions .square-button{width:43px;height:43px;border-radius:13px;font-size:24px}.ad-badge:after{width:18px;height:18px;right:-4px;bottom:-4px;font-size:8px}
#arena{box-sizing:border-box;flex:1 1 auto;width:100%;height:auto;min-height:0!important;margin:5px 0 3px;border:1px solid #592287;border-radius:25px;background:radial-gradient(ellipse at 50% 42%,#55177d5c,transparent 68%);overflow-y:auto;overflow-x:hidden;scrollbar-width:none}#arena::-webkit-scrollbar{display:none}#sandCanvas{top:-110px;height:calc(100% + 110px)}
.message-strip{box-sizing:border-box;flex:0 0 30px;min-height:30px;margin:0;padding:6px 8px;border:1px solid #642793;border-radius:14px;background:#350a59e8;font-size:10px;line-height:1.35}
.booster-dock{box-sizing:border-box;flex:0 0 105px;width:100%;height:105px;margin:5px 0 0;padding:14px 5px 6px;border-width:1.5px;border-radius:19px}.dock-caption{top:-8px;padding:1px 9px;font-size:7px;letter-spacing:1px;background:#3a105f}.boosters{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}.booster{min-width:0;gap:1px;padding:0}.booster-icon{width:42px;height:40px;border-radius:12px}.booster-icon svg{width:25px;height:25px}.booster-icon .glyph{font-size:24px}.booster-name{max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px}.booster-price{font-size:8px!important}.booster-price .crystal-gem{width:8px;height:10px}.booster-count{right:-5px;bottom:-5px;min-width:18px;height:18px;line-height:18px;font-size:9px}

/* Collection, rewards, shop and leaderboard are native portrait pages. */
.section-screen,#bookScreen,#boardScreen{box-sizing:border-box;flex:1 1 auto;width:100%;height:auto;min-height:0;max-width:none;margin:0;padding:5px 6px 112px;overflow:hidden}
#boardScreen{padding-bottom:8px}
.section-screen>.section-panel,#bookScreen>.section-panel,#boardScreen>.section-panel{box-sizing:border-box;position:relative;width:100%;height:100%;min-height:0;max-height:none;padding:13px 10px 16px;border:2px solid #7c37b4;border-radius:27px;background:linear-gradient(180deg,#3a1263f2,#21073df7);box-shadow:inset 0 0 0 3px #a65de438,inset 0 0 26px #6d269f42,0 8px 24px #0f0019;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#8542bd transparent}
.section-panel::before{content:"";position:absolute;z-index:0;right:6px;top:3px;width:102px;height:102px;background:center/contain no-repeat;pointer-events:none;filter:drop-shadow(0 5px 6px #100019)}
#shopScreen .section-panel::before{background-image:url(assets/ui/illustrations/shop.webp)}#dailyScreen .section-panel::before{background-image:url(assets/ui/illustrations/rewards.webp)}#bookScreen .section-panel::before{background-image:url(assets/ui/illustrations/collection.webp)}
.section-panel>*{position:relative;z-index:1}.section-head{box-sizing:border-box;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:7px 9px;min-height:88px;margin:0 0 7px;padding-right:92px}.section-head>:last-child{margin:0}.section-head>div{min-width:0}.section-head h2{margin:2px 0 0;font-size:23px}.section-head .tiny-label{font-size:7px;letter-spacing:1px}.back-button{height:38px;padding:0 9px;border-width:1px;border-radius:12px;font-size:11px}.shop-balance,.board-me,.section-head>.progress-medallion{grid-column:1/-1;width:max-content;max-width:100%;margin:0;padding:5px 9px;font-size:10px}.shop-balance b,.board-me b{font-size:15px}
.shop-heading{margin:14px 2px 7px;font-size:10px;letter-spacing:1.2px;color:#ebd3ff}.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.shop-card{min-width:0;padding:22px 5px 8px;gap:3px;border-color:#7737aa;border-bottom-width:3px;border-radius:16px;background:linear-gradient(155deg,#522079,#2d0d49)}.shop-card.perk{grid-column:1/-1;gap:7px;padding:10px}.shop-art{height:50px}.shop-title{font-size:11px}.shop-amount{font-size:19px}.shop-contents{min-height:46px}.shop-price{padding:5px 10px;border-radius:10px}.shop-price b{font-size:14px}.shop-bonus,.shop-save{font-size:8px}.shop-tag{font-size:7px}.shop-ribbon{font-size:8px}
.daily-lead{margin:5px 2px 10px;font-size:11px;line-height:1.4;color:#e2d1f4}.daily-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:8px 0}.daily-cell{min-height:105px;padding:8px 4px;border-color:#6e319d;border-radius:15px;background:linear-gradient(#4e1d72,#2c0d48)}.daily-cell.grand{grid-column:span 2}.daily-day{font-size:8px}.daily-art{height:38px}.daily-claim{min-height:52px;margin-top:9px;font-size:14px}
#bookScreen .book-grid{grid-template-columns:1fr;gap:8px;margin:6px 0}#bookScreen .book-card{display:grid;grid-template-columns:105px 1fr;padding:8px;gap:5px 9px;border-color:#71349e;border-radius:17px;background:linear-gradient(155deg,#4b1b70,#290d45)}#bookScreen .book-art{grid-row:1/6;width:105px;height:105px;border-radius:13px}#bookScreen .book-card h3{font-size:15px}#bookScreen .book-card p,#bookScreen .book-card ul{font-size:10px;line-height:1.35}#bookScreen .book-card ul{padding-left:15px}#bookScreen .book-card .book-tip{padding:5px 7px;font-size:9px}.book-meta{font-size:8px}
#boardScreen .board-layout{grid-template-columns:1fr;gap:7px;min-height:0}#boardList{height:auto;min-height:180px;max-height:none;margin:4px 0}.board-row{min-height:52px;padding:7px 8px;grid-template-columns:34px 1fr auto}.board-rank{font-size:16px}.board-name{font-size:12px}.board-score{font-size:14px}.board-avatar{width:30px;height:30px}.board-rules{padding:9px;font-size:9px!important;line-height:1.4!important}
.section-screen::before,.section-screen::after{content:"";position:absolute;z-index:4;bottom:-16px;width:74px;height:74px;background:center/contain no-repeat;pointer-events:none;filter:drop-shadow(0 4px 5px #100019)}.section-screen::before{left:-15px;background-image:url(assets/ui/icons/leaves-left.webp)}.section-screen::after{right:-15px;background-image:url(assets/ui/icons/leaves-right.webp)}

@container alchemist (max-width:390px){.coin-wallet{display:none}.hud{grid-template-columns:44px minmax(0,1fr) 44px}.chapter-tab{flex-basis:100px;min-width:100px}.adventure-card{width:calc(100% - 35px)}.map-action>span{font-size:10px}.card-leaves{width:79px;height:79px}.card-leaves-left{left:-34px}.card-leaves-right{right:-34px}}
