@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Nunito:wght@600;700;800;900&display=swap');
:root{font-family:Nunito,system-ui,sans-serif;color:#365159;background:#bce9e7;font-synthesis:none}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,select{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible,select:focus-visible{outline:3px solid #d52a88;outline-offset:4px}button:disabled{cursor:wait;opacity:.6}#game{position:relative;width:100%;height:100dvh;min-height:600px;overflow:hidden;background:radial-gradient(ellipse at 40% 22%,#eaffed 0,#c7efe7 45%,#85ced8 100%)}#world{position:absolute;inset:0 290px 0 0;touch-action:none;user-select:none}#world canvas{width:100%;height:100%;display:block;outline:none}.sky-vignette{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 -55px 80px #38879312}.topbar{position:absolute;top:22px;left:28px;right:25px;display:flex;align-items:center;justify-content:space-between;gap:20px;pointer-events:none;z-index:3}.topbar>*{pointer-events:auto}.brand{display:flex;align-items:center;gap:14px}.brand>img{width:83px;height:68px;object-fit:contain;border-radius:17px;transform:rotate(-6deg);box-shadow:0 5px 20px #266a7310}.brand h1{font:800 41px/.97 'Baloo 2',system-ui;letter-spacing:-1.6px;margin:0;color:#078d9c;text-shadow:0 2px white,2px 0 white,-2px 0 white}.brand h1 span{color:#e84b9e}.brand p{font-size:9px;font-weight:900;letter-spacing:2px;margin:7px 0 0 2px;color:#508b8f}nav{display:flex;gap:8px;align-items:center}.icon-btn,.small-btn{border:1px solid #fff9;background:#ffffffbf;color:#35646d;border-radius:13px;box-shadow:0 3px 0 #64959b17;font-weight:900;height:40px;min-width:40px;padding:0 12px}.icon-btn{font-size:22px;position:relative}.small-btn{font-size:13px}.slash{position:absolute;inset:7px 0 0 8px;font-weight:400;color:#e74199}.map-tools{position:absolute;top:114px;left:30px;display:flex;gap:6px;z-index:2}.map-tools button{border:1px solid #fff9;background:#ffffffba;color:#47777e;border-radius:12px;padding:8px 11px;font-weight:900;font-size:16px;backdrop-filter:blur(8px)}.map-tools span{font-size:12px;margin-left:4px}.place-label{position:absolute;left:30px;bottom:197px;pointer-events:none;display:flex;flex-direction:column;gap:4px;text-shadow:0 2px #f4ffed}.place-label span{font-size:9px;font-weight:900;letter-spacing:2px;color:#4d8a85}.place-label strong{font:800 23px/1 'Baloo 2',system-ui;color:#267b7d}.play-panel{position:absolute;right:25px;top:110px;bottom:65px;width:278px;max-height:720px;overflow:auto;scrollbar-width:thin;background:#fffdf4ed;border:2px solid #fff;border-radius:27px;padding:21px 20px;box-shadow:0 7px 0 #77afb632,0 15px 45px #397e8520;backdrop-filter:blur(15px)}.turn-heading{display:flex;align-items:center;gap:9px}.turn-avatar{width:44px;height:49px;border:2px solid #29baba;border-radius:14px;background:white;overflow:hidden;flex-shrink:0}.turn-avatar img{width:100%;height:100%;object-fit:cover}.eyebrow{font-size:8px;letter-spacing:1.1px;font-weight:900;color:#6f8c88}h2{font:800 28px/1.15 'Baloo 2',system-ui;margin:6px 0;color:#36505c}.turn-heading h2{font-size:25px;white-space:nowrap;letter-spacing:-.5px;margin:3px 0}.turn-count{font-size:13px;font-weight:900;color:#a5b6a7;margin-left:auto}.spinner-area{position:relative;width:210px;height:210px;margin:25px auto 10px;filter:drop-shadow(0 7px 0 #b4bba336)}.wheel{width:100%;height:100%;border-radius:50%;background:conic-gradient(#f270af 0deg 60deg,#ffb349 60deg 120deg,#63cbea 120deg 180deg,#b58ce3 180deg 240deg,#9bd267 240deg 300deg,#f6db55 300deg 360deg);border:9px solid #fff;box-shadow:0 0 0 2px #e9e6d5,inset 0 0 0 5px #ffffff30;position:relative;will-change:transform}.wheel>span{position:absolute;left:calc(50% - 16px);top:calc(50% - 16px);width:32px;height:32px;text-align:center;line-height:32px;font-size:26px;color:#fff;text-shadow:0 2px 0 #41494d30;transform:rotate(var(--a)) translateY(-67px) rotate(calc(-1 * var(--a)))}.spinner-hub{position:absolute;top:calc(50% - 33px);left:calc(50% - 33px);width:66px;height:66px;border-radius:50%;background:#fffcf2;box-shadow:0 4px 8px #5b638326,0 0 0 5px #fff8;display:grid;place-items:center;font:800 38px 'Baloo 2',system-ui;color:#ed48a0;transform:rotate(-8deg)}.spinner-hub span{position:absolute;font-size:16px;right:9px;top:5px;color:#24b1b3}.spinner-pointer{position:absolute;z-index:2;top:-14px;left:calc(50% - 14px);width:28px;height:35px;clip-path:polygon(8% 0,92% 0,100% 28%,50% 100%,0 28%);background:#fff9db;filter:drop-shadow(0 2px 2px #764727);transform-origin:50% 0}.spin-result{font-size:15px;font-weight:900;color:#6b807e;text-align:center;margin:12px 0 15px}.spin-btn{display:flex;justify-content:center;align-items:center;gap:12px;width:100%;min-height:51px;padding:11px 14px;border:0;border-radius:16px;background:#eb419c;box-shadow:0 5px 0 #bf2c7b,0 9px 17px #da2a8a1a;color:white;font-size:17px;font-weight:900;transition:filter .15s,transform .15s}.spin-btn>span:last-child:not(:first-child){font-size:25px;line-height:1}.spin-btn:hover:not(:disabled){filter:brightness(1.08);transform:translateY(-2px)}.spin-btn:active:not(:disabled){transform:translateY(3px);box-shadow:0 2px 0 #bf2c7b}.turn-hint{font-size:12px;line-height:1.5;text-align:center;color:#80928c;margin:16px 0 18px}.crew-title{display:flex;justify-content:space-between;border-top:1px dashed #d7dfd1;padding-top:17px;font-size:8px;font-weight:900;letter-spacing:1px;color:#79938f}.crew{margin-top:9px}.crew-player{display:flex;align-items:center;padding:8px 6px;gap:9px;border-radius:13px;margin-top:3px;border:1px solid transparent}.crew-player.active{background:#e7f5e7;border-color:#d3e5d5}.crew-player img{width:30px;height:35px;object-fit:cover;border-radius:9px;background:white}.crew-player .name{font-size:13px;font-weight:900}.crew-player small{display:block;font-size:10px;color:#8a9a8b;margin-top:1px}.crew-player .score{margin-left:auto;text-align:right;font-size:12px;font-weight:900;color:#537970}.pouch-panel{position:absolute;left:28px;bottom:38px;width:min(465px,calc(100% - 370px));background:#fffdf3e8;border:2px solid #fff;border-radius:22px;padding:15px 19px;box-shadow:0 5px 0 #76aeb526,0 8px 30px #34818813;backdrop-filter:blur(10px)}.pouch-heading{display:flex;align-items:center;gap:11px}.pouch-icon{width:34px;height:36px;display:grid;place-items:center;border-radius:10px;background:#fce1ad;color:#c88b29;font-size:25px}.pouch-heading h3{margin:0;font-size:15px;font-weight:900}.pouch-heading p{font-size:11px;margin:3px 0 0;color:#8a9884}.pouch-heading b{margin-left:auto;font-size:20px;color:#da4190}.inventory{display:flex;gap:7px;margin-top:10px;min-height:37px;overflow-x:auto;align-items:center}.empty-pouch{font-size:12px;color:#a1a99b}.treat-chip{border:1px solid #eadfcd;background:#fff6df;border-radius:12px;min-width:40px;height:36px;display:grid;place-items:center;font-size:23px;position:relative;flex-shrink:0}.treat-chip.bad{background:#e7efce;border-color:#cdd9b4}.treat-chip small{position:absolute;font-size:8px;bottom:-1px;right:2px;background:#fff8;border-radius:3px;color:#68734c;font-weight:900}.toast{position:absolute;left:calc((100% - 290px)/2);top:105px;transform:translate(-50%,-20px);opacity:0;pointer-events:none;max-width:420px;width:max-content;display:flex;gap:12px;align-items:center;padding:15px 23px;border:2px solid #fff;border-radius:20px;background:#fffaf1f2;box-shadow:0 8px 25px #25637120;transition:transform .3s,opacity .3s;z-index:4}.toast.visible{opacity:1;transform:translate(-50%,0)}.toast>span{font-size:31px;color:#ec4198}.toast.sour>span{color:#7b9d29}.toast strong{font-size:17px}.toast p{font-size:13px;margin:3px 0 0;color:#77917b}.world-hint{position:absolute;bottom:15px;left:30px;font-size:8px;letter-spacing:1.5px;font-weight:900;color:#4e8c91;pointer-events:none}.world-hint i{margin:0 8px}.loading{position:absolute;inset:0;z-index:8;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#cdeee5;transition:opacity .5s}.loading.hidden{opacity:0;pointer-events:none}.loading-star{color:#e7439c;font-size:70px;animation:twirl 2s ease-in-out infinite}.loading p{color:#68928f;font-size:14px}.loading.error{padding:30px;text-align:center}dialog{border:2px solid white;border-radius:29px;padding:35px;max-width:520px;width:calc(100% - 30px);max-height:90dvh;background:#fffdf4;color:#385762;box-shadow:0 25px 80px #235f6960}dialog::backdrop{background:#326b7880;backdrop-filter:blur(10px)}dialog h2{font-size:33px;letter-spacing:-.6px;margin:12px 0}dialog p{font-size:15px;line-height:1.55;color:#83958a}dialog .close{position:absolute;right:16px;top:12px;border:0;background:transparent;font-size:29px;color:#8b9c92}.modal-kicker{font-size:10px;letter-spacing:1.4px;font-weight:900;color:#d54b96}.field-label{font-size:14px;font-weight:900;display:block;margin:22px 0 10px}.character-options{display:flex;gap:10px}.character{width:33.333%;background:white;border:2px solid #edece0;border-radius:16px;padding:9px 6px 10px;color:#55706e}.character img{width:70px;height:82px;object-fit:cover;border-radius:10px}.character strong{display:block;font-size:14px}.character span{font-size:9px}.character.selected{border-color:#ed54a8;background:#fff0f7;box-shadow:0 3px 0 #f5d5e4}select{width:100%;border:1px solid #d8ddce;border-radius:13px;padding:13px;color:#526f6d;background:#fff;font-size:15px}dialog .spin-btn{margin-top:24px}dialog .modal-note{font-size:11px;text-align:center;margin:17px 0 0}.rules{padding-left:23px;color:#7c9085;font-size:15px;line-height:1.6}.rules li{margin-bottom:13px}.rules b{color:#426767}.treat-guide{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:20px 0}.treat-guide span{background:#f1f2e4;border-radius:8px;padding:9px;font-size:12px}.treat-guide b{color:#ce418c}#winner{text-align:center}#exploreBtn{margin-top:20px}.winner-treats{font-size:32px;letter-spacing:5px;overflow-wrap:anywhere}@keyframes twirl{50%{transform:rotate(130deg) scale(.7)}100%{transform:rotate(360deg)}}
@media(min-width:1600px){.play-panel{right:40px;width:310px;padding:26px;top:120px}.spinner-area{width:235px;height:235px;margin-top:35px}.wheel>span{transform:rotate(var(--a)) translateY(-79px) rotate(calc(-1 * var(--a)))}#world{right:330px}.topbar{left:40px;right:40px}.pouch-panel{left:40px;bottom:45px}.place-label{left:40px;bottom:210px}}
@media(max-height:780px) and (min-width:761px){.play-panel{top:97px;bottom:25px;padding:15px 18px}.spinner-area{width:172px;height:172px;margin:15px auto 7px}.wheel>span{transform:rotate(var(--a)) translateY(-52px) rotate(calc(-1 * var(--a)));font-size:22px}.spin-result{margin:10px 0}.turn-hint{margin:12px 0}.crew-title{padding-top:12px}.crew-player{padding:5px}.topbar{top:17px}.pouch-panel{bottom:35px}}
@media(max-width:760px){#game{min-height:560px}#world{inset:0 0 110px}.topbar{top:14px;left:15px;right:15px;gap:5px}.brand{gap:8px}.brand>img{width:55px;height:48px;border-radius:12px}.brand h1{font-size:29px;letter-spacing:-1px}.brand p{font-size:6px;letter-spacing:1.4px;margin-top:4px}nav{gap:5px}.icon-btn,.small-btn{height:33px;min-width:32px;border-radius:10px;padding:0 8px;font-size:12px}.icon-btn{font-size:19px}#fullBtn{display:none}.map-tools{left:15px;top:79px;gap:4px}.map-tools button{font-size:15px;padding:6px 9px}.map-tools span{font-size:10px}.play-panel{top:auto;bottom:max(12px,env(safe-area-inset-bottom));left:12px;right:12px;width:auto;height:165px;max-height:none;border-radius:23px;overflow:visible;padding:13px 15px 12px 155px;display:flex;flex-direction:column}.turn-heading{gap:7px}.turn-avatar{width:32px;height:35px;border-radius:10px}.eyebrow{font-size:7px}.turn-heading h2{font-size:21px}.turn-count{font-size:11px}.spinner-area{position:absolute;left:13px;top:18px;width:129px;height:129px;margin:0}.wheel{border-width:6px}.wheel>span{font-size:18px;transform:rotate(var(--a)) translateY(-40px) rotate(calc(-1 * var(--a)))}.spinner-hub{width:42px;height:42px;left:calc(50% - 21px);top:calc(50% - 21px);font-size:29px;box-shadow:0 3px 5px #51635c20,0 0 0 3px #fff8}.spinner-hub span{font-size:10px;right:4px;top:3px}.spinner-pointer{width:20px;height:27px;left:calc(50% - 10px);top:-8px}.spin-result{font-size:12px;margin:6px 0 9px;text-align:left}.spin-btn{min-height:39px;padding:7px 10px;font-size:14px;border-radius:11px;box-shadow:0 4px 0 #bf2c7b;gap:7px}.spin-btn>span:last-child:not(:first-child){font-size:20px}.turn-hint{font-size:9px;margin:9px 0 0;text-align:left;line-height:1.25}.crew-title{display:none}.crew{position:absolute;right:0;bottom:183px;display:flex;gap:5px;margin:0}.crew-player{padding:5px 7px;background:#fffdf0c9;border:1px solid white;gap:4px;box-shadow:0 3px 0 #69999522;backdrop-filter:blur(5px)}.crew-player img{width:23px;height:28px;border-radius:7px}.crew-player .name{font-size:10px}.crew-player small{font-size:8px}.crew-player .score{font-size:9px;margin-left:4px}.crew-player.active{background:#efffea}.pouch-panel{left:15px;bottom:238px;padding:8px 10px;width:140px;max-height:106px;border-radius:15px}.pouch-heading{gap:5px}.pouch-icon{display:none}.pouch-heading h3{font-size:10px}.pouch-heading p{display:none}.pouch-heading b{font-size:14px}.inventory{min-height:27px;margin-top:6px;gap:4px}.treat-chip{min-width:27px;height:26px;font-size:17px;border-radius:8px}.treat-chip small{font-size:6px}.empty-pouch{font-size:9px;line-height:1.2}.place-label{left:16px;bottom:350px}.place-label span{font-size:7px;letter-spacing:1px}.place-label strong{font-size:16px}.world-hint{display:none}.toast{top:125px;left:50%;max-width:calc(100% - 30px);padding:10px 15px;border-radius:15px}.toast>span{font-size:24px}.toast strong{font-size:14px}.toast p{font-size:11px}dialog{padding:26px 23px}dialog h2{font-size:29px}.character img{width:58px;height:72px}.character span{font-size:8px}.treat-guide{grid-template-columns:1fr}.modal-kicker{font-size:9px}}
@media(max-width:390px){.brand>img{display:none}.play-panel{padding-left:139px}.spinner-area{width:113px;height:113px;top:26px}.wheel>span{transform:rotate(var(--a)) translateY(-34px) rotate(calc(-1 * var(--a)));font-size:16px}.turn-heading h2{font-size:18px}.turn-count{display:none}.turn-hint{font-size:8px}.pouch-panel{width:120px}.crew-player .score{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important}}

/* Treat reveal cards pause the race until the player is ready. */
#treatResult{--result-accent:#e83f9b;--result-soft:#ffe5f3;width:min(430px,calc(100% - 28px));padding:28px 30px 25px;text-align:center;overflow-x:hidden;background:linear-gradient(165deg,#fffdf4 20%,#fff2fa 100%);border:4px solid #fff;box-shadow:0 22px 75px #294d7160,0 0 0 5px #ffffff45}
#treatResult[open]{animation:card-reveal .45s cubic-bezier(.18,.85,.32,1.15)}
#treatResult.sour{--result-accent:#748e2e;--result-soft:#e7edc5;background:linear-gradient(165deg,#fffdf4 20%,#f1f7d9 100%)}
#treatResult::backdrop{background:#30516f91;backdrop-filter:blur(9px)}
.result-eyebrow{font-size:11px;font-weight:900;letter-spacing:2px;color:var(--result-accent);padding:0 16px}
#treatResult h2{font-size:35px;line-height:1.1;margin:10px 0 0;color:#3b5362}
.result-art{position:relative;height:220px;width:100%;margin:5px 0 -12px;background:radial-gradient(ellipse at center,var(--result-soft),transparent 67%);overflow:hidden}
.result-art canvas{position:absolute;inset:0;display:block;width:100%;height:100%}
#resultFallback{display:block;height:180px;width:150px;object-fit:contain;margin:20px auto;border-radius:30px;animation:result-bounce 1.1s ease-in-out infinite}
#resultFallback[hidden]{display:none}
.result-move{position:relative;display:inline-flex;align-items:center;gap:12px;background:white;border:2px solid var(--result-soft);border-radius:20px;padding:5px 18px;box-shadow:0 4px 0 var(--result-soft)}
.result-move strong{font:800 47px/1.2 'Baloo 2',system-ui;color:var(--result-accent)}
.result-move span{font-size:11px;letter-spacing:1px;line-height:1.4;font-weight:900;max-width:95px;text-align:left;color:var(--result-accent)}
#treatResult #resultDescription{font-size:16px;color:#617b80;margin:19px 0 5px;line-height:1.45}
#treatResult .result-player{font-size:12px;color:#8b9c8f;margin:0}
#treatResult .spin-btn{margin-top:20px;min-height:48px;background:var(--result-accent)}
#treatResult.sour .spin-btn{box-shadow:0 5px 0 #556b20}
@keyframes card-reveal{from{opacity:0;transform:translateY(35px) rotate(-8deg) scale(.82)}to{opacity:1;transform:translateY(0) rotate(0) scale(1)}}
@keyframes result-bounce{50%{transform:translateY(-10px) rotate(4deg)}}
@media(max-height:650px){#treatResult{padding:18px 25px}.result-art{height:145px}#treatResult h2{font-size:28px}.result-move strong{font-size:36px}#treatResult #resultDescription{font-size:14px;margin-top:12px}#treatResult .spin-btn{margin-top:13px}#resultFallback{height:125px;margin:10px auto}}
@media(prefers-reduced-motion:reduce){#treatResult[open],#resultFallback{animation:none}}
/* Kandy Stash and factory celebration extend the existing candy-world skin. */
.pouch-heading{width:100%;text-align:left;border:0;background:none;color:inherit;padding:0;border-radius:12px;min-height:44px}.pouch-heading:hover{background:#ffe6f380}.pouch-heading:active{transform:scale(.98)}.pouch-heading:disabled{opacity:1;cursor:wait}.pouch-panel{border-color:#fff}.pouch-heading p{color:#527478}.empty-pouch{color:#627d79}.inventory{pointer-events:none}.treat-chip small{font-size:11px}.rarity-common{--rarity:#557f86;--wash:#edf6f5}.rarity-uncommon{--rarity:#14794d;--wash:#e4fbe9}.rarity-rare{--rarity:#8643b9;--wash:#f1e4ff}.rarity-legendary{--rarity:#9a6400;--wash:#fff3bf}.treat-chip{border:2px solid var(--rarity,#abc);background:var(--wash,#fff)}#shieldStatus{font-size:13px;font-weight:900;color:#8650b8}#stash{width:min(620px,calc(100% - 24px))}.stash-item{display:flex;align-items:center;gap:16px;background:var(--wash);border:2px solid var(--rarity);border-radius:19px;padding:15px;margin:12px 0}.stash-art{font-size:40px;width:50px;text-align:center;flex-shrink:0}.stash-item small{font-size:12px;color:var(--rarity);font-weight:900;letter-spacing:1px}.stash-item h3{font-size:18px;margin:4px 0;color:#344f63}.stash-item p{font-size:14px;line-height:1.4;color:#526b78;margin:0}.stash-item b{margin-left:auto;font-size:24px;color:var(--rarity)}.stash-empty{padding:35px 15px;border:2px dashed #dccce6;border-radius:20px;text-align:center}.winner-portrait{width:95px;height:110px;object-fit:cover;border-radius:28px;border:5px solid #ffda65;box-shadow:0 8px 0 #efbace;animation:result-bounce 3s ease-in-out infinite}.winner-treats{display:grid;grid-template-columns:1fr 1fr;gap:12px;letter-spacing:0;margin:24px 0}.winner-treats>div{display:flex;align-items:center;flex-direction:column;border-radius:18px;background:#e3f9f6;padding:12px}.winner-treats strong{font:800 30px 'Baloo 2',system-ui;color:#ad3080}.winner-treats small{font-size:13px;color:#3d6871}.winner-treats span{font-size:24px}#winnerStash,.arcade-link,#exploreBtn{display:inline-flex;align-items:center;justify-content:center;margin:18px 3px 0;min-height:44px;text-decoration:none}#exploreBtn{display:none}.cinematic .topbar,.cinematic .play-panel,.cinematic .pouch-panel,.cinematic .map-tools,.cinematic .place-label,.cinematic .world-hint{opacity:0;pointer-events:none}.cinematic #world{inset:0}.cinematic .sky-vignette{box-shadow:inset 0 65px #19324a80,inset 0 -65px #19324a80}#finaleOverlay{position:absolute;inset:auto 15px 8%;z-index:6;text-align:center;pointer-events:none;color:white;text-shadow:0 3px 0 #76366e,0 4px 18px #48214e}#finaleOverlay[hidden]{display:none}#finaleOverlay h2{font:800 clamp(35px,6vw,76px)/1 'Baloo 2',system-ui;color:#fff4a0;margin:10px 0}#finaleOverlay p{font-size:clamp(16px,2vw,24px);font-weight:900}#treatResult[data-animation="sourBounce"] .result-art{animation:sour-jiggle .35s ease-in-out 3}#treatResult[data-animation="mystery"] .result-art{background:radial-gradient(ellipse,#d4b9ff,transparent 68%)}@keyframes sour-jiggle{25%{transform:rotate(-2deg)}75%{transform:rotate(2deg)}}
.topbar{top:max(18px,env(safe-area-inset-top))}.turn-hint{color:#547571;font-size:14px}.eyebrow,.crew-title,.place-label span{font-size:12px}.crew-player .name{font-size:14px}.crew-player small{font-size:12px}.pouch-heading p{font-size:13px}.map-tools button{min-height:44px}.small-btn,.icon-btn{min-height:44px}.modal-kicker,.result-eyebrow{font-size:12px}.result-move span{font-size:13px}#treatResult{width:min(500px,calc(100% - 24px))}#treatResult h2{font-size:clamp(27px,5vw,38px)}
@media(max-width:760px){#game{min-height:0}.topbar{top:max(10px,env(safe-area-inset-top))}.play-panel{height:188px;padding-top:13px;padding-bottom:12px;bottom:max(12px,env(safe-area-inset-bottom))}.turn-hint{font-size:12px;line-height:1.35;margin-top:9px}.eyebrow{font-size:10px;letter-spacing:.2px}.turn-heading h2{font-size:20px}.spin-btn{min-height:44px}.spin-result{font-size:14px}.crew{bottom:201px}.crew-player .name{font-size:12px}.crew-player small{font-size:10px}.pouch-panel{bottom:calc(262px + env(safe-area-inset-bottom));width:175px;max-height:106px}.pouch-heading h3{font-size:13px}.pouch-heading b{font-size:18px}.pouch-heading{min-height:44px}.empty-pouch{font-size:12px}.inventory{margin-top:2px}.place-label{bottom:calc(382px + env(safe-area-inset-bottom))}.place-label span{font-size:10px}.map-tools{top:82px}.map-tools span{font-size:12px}.spinner-area{top:30px}.stash-item{gap:9px;padding:10px}.stash-art{font-size:30px;width:35px}.stash-item h3{font-size:16px}.stash-item p{font-size:13px}.stash-item b{font-size:19px}#world{bottom:170px}.brand p{display:none}.brand h1{font-size:27px}.brand>img{width:46px;height:45px}nav{gap:4px}.icon-btn,.small-btn{padding:0 8px}.result-art{height:min(210px,28dvh)}#treatResult{max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:23px 20px}.result-move strong{font-size:38px}#treatResult #resultDescription{margin-top:14px}dialog{max-height:calc(100dvh - 30px);overflow-y:auto}.winner-treats{gap:8px;margin:14px 0}.winner-portrait{width:70px;height:80px}}
@media(max-width:390px){.play-panel{padding-left:130px;padding-right:10px}.spinner-area{left:8px;width:110px;height:110px;top:38px}.turn-heading h2{font-size:18px}.turn-avatar{display:none}.pouch-panel{width:166px}.turn-hint{font-size:12px}.spin-btn{font-size:13px}}
@media(max-height:600px) and (orientation:landscape){#game{min-height:0}.play-panel{overflow:auto;bottom:10px;top:85px}.pouch-panel{bottom:20px}.place-label{bottom:170px}}
.friend-dock{position:absolute;top:172px;left:30px;width:min(310px,calc(100% - 350px));z-index:3;pointer-events:none}.friend-controls{display:flex;gap:6px;pointer-events:auto}.friend-controls button{min-height:44px;border:2px solid white;border-radius:13px;background:#fff9ee;color:#663a70;font-size:13px;font-weight:900;padding:8px 10px;box-shadow:0 3px 0 #b995c335}.friend-controls button:hover{background:#ffe4f4}.friend-controls button[aria-pressed=true]{background:#e0f9ec;color:#24664f}#friendCaption{margin-top:9px;border:2px solid white;border-radius:18px;padding:12px 15px;background:#fff9f5f5;box-shadow:0 6px 20px #78377a22;color:#573d67;max-width:310px}#friendCaption[hidden]{display:none}#friendCaption strong{font-size:14px;color:#af3287}#friendCaption p{font-size:15px;line-height:1.4;margin:4px 0 0}.friend-result{font-size:13px!important;color:#9a3981!important;font-style:italic}.cinematic .friend-dock{display:none}@media(max-width:760px){.friend-dock{top:139px;left:15px;width:calc(100% - 30px)}.friend-controls button{font-size:12px;min-height:40px}#friendCaption{padding:9px 12px;max-width:280px}#friendCaption p{font-size:14px}}@media(max-height:700px) and (max-width:760px){#friendCaption{max-width:calc(100% - 70px)}.friend-dock{top:134px}}
@media(max-width:760px){#game:has(#friendCaption:not([hidden])) .place-label{visibility:hidden}}

/* Custom names share the setup controls and stay within the existing HUD. */
.player-names input{font:inherit;font-size:16px;width:100%;min-height:48px;border:1px solid #d8ddce;border-radius:13px;padding:12px 13px;color:#365159;background:#fff}
.player-names input:focus-visible{outline:3px solid #d52a88;outline-offset:3px}
.player-names input::placeholder{color:#6b807e}
#nameHint{font-size:12px;color:#527478;margin:10px 0 0}
.turn-heading>div:not(.turn-avatar){min-width:0;flex:1}
.turn-heading h2{overflow:hidden;text-overflow:ellipsis}
.crew-player{min-width:0}.crew-player>div:not(.score){min-width:0}.crew-player .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crew-player img,.crew-player .score,.turn-count{flex-shrink:0}
.pouch-heading>div{min-width:0}.pouch-heading h3{overflow-wrap:anywhere}
#stashTitle,#winnerName,#friendText,.result-player,.friend-result,.turn-hint{overflow-wrap:anywhere}
@media(max-width:760px){.crew{max-width:100%}.crew-player{flex:1}.turn-hint{max-height:3.9em;overflow:auto}}

/* Launch choices reuse the game's modal and button styling. */
#launch{text-align:center;width:min(520px,calc(100vw - 32px))}
.launch-logo{display:block;width:150px;max-width:50%;height:auto;margin:0 auto 24px}
.launch-actions{display:grid;gap:14px;margin-top:28px}
.launch-actions .spin-btn{margin:0}
.launch-actions .small-btn{min-height:48px}

/* Mobile panels can be tucked away while the race controls stay available. */
.settings-toggle{display:none}
@media(max-width:760px), (max-width:960px) and (max-height:500px){
  .settings-toggle{position:absolute;top:76px;left:15px;z-index:4;display:flex;align-items:center;gap:12px;min-height:44px;background:#ffffffb3;border:2px solid #ffffffcc;color:#663a70}
  .settings-toggle svg{flex-shrink:0}
  .settings-toggle svg [hidden]{display:none}
  .settings-toggle:hover{background:#ffffffd9}
  .settings-toggle:active{transform:translateY(2px)}
  .map-tools{top:128px}
  .friend-dock{top:180px}
  .friend-controls{flex-wrap:wrap}
  .settings-collapsed .map-tools,.settings-collapsed .friend-dock,.settings-collapsed .pouch-panel{display:none}
  .cinematic .settings-toggle{display:none}
}

/* Player chips also open their individual collections. */
button.crew-player{width:100%;text-align:left;color:inherit;font:inherit}
button.crew-player:hover:not(:disabled){border-color:#d94b9b;background:#fff1f8}
button.crew-player:active:not(:disabled){transform:translateY(1px)}
button.crew-player:disabled{opacity:1}
@media(max-width:760px){button.crew-player{width:auto;min-height:44px}}
