/* Reference B is the unchanged photograph; the surface owns readability. */
html:not([data-visual-style="sketch"]) #intro{background-color:#eddfc8;background-image:linear-gradient(90deg,#f9eedb 0%,#f9eedb calc(100% - 56.25svh),transparent calc(100% - 56.25svh + 110px)),url('../home-mediterranean.webp');background-size:100% 100%,auto 100%;background-position:center,right top;background-repeat:no-repeat}
#intro{overflow-y:auto;padding:100px 6% 30px;display:flex;align-items:flex-start}
#intro .intro-copy{position:relative;inset:auto;width:440px;max-width:48%;margin:0;background:none;padding:0 0 12px}
#intro h1{font-size:clamp(56px,6.5vw,100px);letter-spacing:-3px;margin:0 0 10px;line-height:1}
#intro .tagline{font-size:18px;line-height:1.35;margin:0 0 14px;max-width:330px;color:#244e50}
#intro .style-toggle{margin:0 0 14px;display:inline-flex}
#intro #styleStatus:empty{display:none}
#intro .retention-home{width:100%;max-width:300px;margin:0 0 18px;padding:14px 16px 6px;border-radius:24px;background:#fff9ecef;box-shadow:0 6px 24px #214b4910;color:#245557;text-shadow:none}
.home-level{padding:0 0 12px}.shell-level{display:block;font-family:Fredoka,sans-serif;font-size:21px;font-weight:500;overflow-wrap:anywhere}.home-level progress{display:block;appearance:none;width:100%;height:6px;margin-top:7px;border:0;border-radius:9px;overflow:hidden;background:#28595920;accent-color:#285959}.home-level progress::-webkit-progress-bar{background:#28595920}.home-level progress::-webkit-progress-value{background:#285959;border-radius:9px}.home-level progress::-moz-progress-bar{background:#285959}
.retention-home details{border-top:1px solid #28595918}
.retention-home summary,#intro .retention-home #historyOpen{display:flex;align-items:center;gap:9px;min-height:57px;width:100%;padding:8px 0;cursor:pointer;color:inherit;text-align:left;font:inherit;list-style:none;background:none;border:0;border-radius:0;margin:0;box-shadow:none}
.retention-home summary::-webkit-details-marker{display:none}.retention-home summary>span:nth-child(2),#historyOpen>span:nth-child(2){flex:1;min-width:0}.retention-home summary strong,#historyOpen strong{display:block;font-weight:700;font-size:16px;line-height:1.2}.retention-home summary small,#historyOpen small{display:block;font-size:12px;line-height:1.3;margin-top:3px}.home-symbol{width:24px;flex:none;text-align:center;font-size:23px;color:#b48421}.home-week .home-symbol,#historyOpen .home-symbol{color:#285959}.home-chevron{font-size:25px;line-height:1;flex:none}.retention-home details[open]>summary .home-chevron{transform:rotate(90deg)}
#intro .retention-home #historyOpen{border-top:1px solid #28595918}
.home-missions{list-style:none;margin:0;padding:0 0 8px}.shell-objective{position:relative;padding:8px 0;border-top:1px dashed #28595925}.shell-objective small{display:block;font-size:11px;font-weight:700;margin-bottom:3px}.shell-objective b{display:block;font-size:13px;line-height:1.35;font-weight:500}.mission-count{display:block;font-size:12px;font-weight:700;margin-top:4px;font-variant-numeric:tabular-nums}.mission-mark{position:absolute;right:0;bottom:8px;color:#287b78;font-weight:bold}
.home-week-detail{padding:0 0 12px;font-size:13px;line-height:1.35}.shell-weekly{margin:4px 0 8px}.weekly-count{font-variant-numeric:tabular-nums}.home-milestones{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px;font-size:10px}.home-milestones span{border-bottom:2px solid #28595930;padding-bottom:3px}.home-milestones [data-complete=true]{color:#287b78;border-color:#287b78;font-weight:700}
#intro #start{width:100%;min-height:60px;font-size:21px}
#intro .home-secondary-actions{margin-top:18px}
#intro .instructions{font-size:12px;gap:6px;margin-top:18px;background:#fff8e9cf;width:fit-content;padding:7px 10px;border-radius:10px;color:#244e50}
#intro .best-intro{font-size:14px;margin-top:12px;background:#fff8e9cf;width:fit-content;padding:5px 10px;border-radius:10px;color:#244e50}
@media(min-width:761px){.retention-moment{left:35px;top:25px;width:calc(50% - 235px)}}
@media(max-width:760px){
 html:not([data-visual-style="sketch"]) #intro{background-image:linear-gradient(0deg,#eddfc8 0,transparent 7%),url('../home-mediterranean.webp');background-size:100% 100%,cover;background-position:center,center top}
 #intro{padding:calc(90px + env(safe-area-inset-top)) 6% calc(30px + env(safe-area-inset-bottom));align-items:flex-start}
 #intro .intro-copy{width:100%;max-width:none;margin:0}
 #intro h1{font-size:clamp(45px,12.2vw,77px);margin:0 0 8px;letter-spacing:-2px}
 #intro .tagline{font-size:15px;max-width:75%;line-height:1.3;margin:0 0 12px}
 #intro .style-toggle{margin-bottom:14px;font-size:13px;min-height:36px}
 #intro .style-toggle button{padding:8px 17px;font-size:13px;min-height:36px}
 #intro .retention-home{width:54%;min-width:160px;padding:12px 12px 4px;border-radius:21px;margin-bottom:16px}
 .shell-level{font-size:19px}.home-level{padding-bottom:9px}
 .retention-home summary,#intro .retention-home #historyOpen{gap:7px;min-height:54px}
 .retention-home summary strong,#historyOpen strong{font-size:14px}.retention-home summary small,#historyOpen small{font-size:11px}.home-symbol{width:18px;font-size:20px}.home-chevron{font-size:22px}
 #intro #start{font-size:19px;min-height:58px;margin-top:max(0px,calc(60svh - 500px))}#intro .instructions{margin-top:16px}
}
@media(max-width:350px){#intro .tagline{font-size:14px;max-width:85%}#intro .retention-home{min-width:152px;width:54%;padding-left:10px;padding-right:10px}.home-symbol{width:16px;font-size:18px}.retention-home summary,#intro .retention-home #historyOpen{gap:5px}.retention-home summary small,#historyOpen small{font-size:11px}}
/* Events borrow only the wordmark's header space, away from lanes and core HUD. */
.retention-moment{position:fixed;z-index:6;top:calc(13px + env(safe-area-inset-top));left:16px;width:calc(100% - 194px);max-width:285px;max-height:65px;display:flex;gap:5px;align-items:center;pointer-events:none;color:#fff8e7;text-shadow:0 1px 3px #164b4b,0 0 8px #164b4b;font-size:11px;line-height:1.15}
.retention-moment>div{min-width:0;flex:1}.retention-moment strong{display:block;font-family:Fredoka,sans-serif;font-size:17px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.moment-detail{display:block;font-size:10px;line-height:1.2;margin:2px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.retention-moment small{display:block;font-size:8px;white-space:nowrap;opacity:.9}
.moment-icon{font-family:Fredoka,sans-serif;color:#ffd275;font-size:29px;line-height:1;flex:none;filter:drop-shadow(0 2px 2px #18534b66)}
.retention-moment[data-kind=progress] .moment-icon{font-size:18px}.retention-moment[data-kind=progress] strong{font-size:13px}.retention-moment[data-kind=all] .moment-icon,.retention-moment[data-kind=level] .moment-icon{font-size:34px}
body.playing.retention-speaking .wordmark{visibility:hidden}
[data-visual-style=sketch] .retention-moment{color:#245b5b;text-shadow:0 1px 4px #fff8e7,0 0 8px #fff8e7}
/* The summary uses typography and a golden rule, not another report card. */
.run-progress{text-align:left;border-left:3px solid #d9ad4f;padding:0 0 0 12px;margin:16px 0 10px;font-size:12px;color:#28595b}.run-progress-title{font-family:Fredoka,sans-serif;font-size:17px;font-weight:500}.run-progress ul{list-style:none;padding:0;margin:6px 0 0;line-height:1.45;display:grid;gap:4px}.run-progress li{overflow-wrap:anywhere}.run-progress li[data-kind=level]{font-family:Fredoka,sans-serif;font-size:19px}.run-progress li[data-kind=complete],.run-progress li[data-kind=closet]{font-weight:700}#over #historyOver{margin:5px auto;font-size:12px;min-height:40px}
@media(max-width:370px){.retention-moment{left:12px;width:calc(100% - 173px)}.retention-moment strong{font-size:15px}.moment-icon{font-size:23px}.retention-moment[data-kind=all] .moment-icon,.retention-moment[data-kind=level] .moment-icon{font-size:25px}}
@media(prefers-reduced-motion:reduce){.retention-moment{animation:none}}
/* Short, energetic celebrations remain inside the existing header space. */
.retention-moment:not([data-kind=progress]){filter:drop-shadow(0 2px 4px #174e5844)}
.retention-moment:not([data-kind=progress]) strong{color:#fff2a8;text-shadow:0 2px 0 #275759,0 0 9px #eab94099}
.retention-moment .moment-detail{white-space:normal;line-height:1.15;font-weight:700;color:inherit}
.retention-moment:not([data-kind=progress])::before,.retention-moment:not([data-kind=progress])::after{content:'✦';position:absolute;color:#ffd66e;font-size:21px;pointer-events:none;animation:lexySpark 1s ease-out 2}
.retention-moment::before{left:-9px;top:-5px}.retention-moment::after{right:0;bottom:-7px;animation-delay:.2s!important}
.retention-moment[data-kind=all] .moment-icon,.retention-moment[data-kind=weekly] .moment-icon{animation:lexyMedal .65s ease-out 2}
@keyframes lexySpark{0%{opacity:0;transform:scale(.2) rotate(0)}45%{opacity:1;transform:scale(1.3) rotate(50deg)}100%{opacity:0;transform:translateY(-8px) scale(.4) rotate(90deg)}}
@keyframes lexyMedal{50%{transform:rotate(-14deg) scale(1.3)}}
html[data-visual-style=sketch] .retention-moment:not([data-kind=progress]) strong{color:#245b5b;text-shadow:0 1px 0 #fff4cf,0 0 9px #ffdfa6}
#over .card{padding:20px 24px}#over .card h2{font-size:38px;margin:5px 0}#over #outfitPortrait{width:110px;height:101px;margin:3px auto}#over #finalLook{margin:4px 0;font-size:16px}#over #overReason{margin:3px 0;font-size:13px}#over .results{margin:12px 0;gap:25px}#over .results strong{font-size:30px}#over .results small{font-size:11px}
#over .score-form{border-top:0;margin:10px 0 14px;padding:0;text-align:left}#over .score-form label{font-size:12px;margin-bottom:6px;display:block}#over .submit-row{gap:7px}#over #playerName{font-size:16px;min-width:0;padding:10px;min-height:44px}#over #submitScore{font-size:13px;padding:10px;min-height:44px}#over #submissionStatus:empty{display:none}#over #submissionStatus{font-size:12px;margin:6px 0}#over #again{width:100%;min-height:52px;padding:13px 20px}
#over .run-progress li[data-kind=level]{font-size:16px}#over .run-progress{margin-top:15px;font-size:12px}#over .run-progress ul{gap:7px}
#lexyHistory .history-save-row [role=status]:empty{display:none}#lexyHistory .history-save-row{justify-content:flex-end}
@media(prefers-reduced-motion:reduce){.retention-moment::before,.retention-moment::after,.retention-moment .moment-icon{animation:none!important}}

#leaderboardJoined{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}#leaderboardStop{font-size:11px;padding:6px;background:transparent;color:inherit}#leaderboardRetryScores{font-size:13px;padding:7px}#submissionStatus{font-size:12px;line-height:1.3;margin:5px 0}.retention-moment[hidden]{display:none}

#leaderboardJoined[hidden]{display:none}

/* One secondary homepage action; no empty installation slot at any breakpoint. */
#intro .home-secondary-actions{display:flex;justify-content:center;margin:14px 0 0}
#intro #leaderboardOpen{flex:none;width:100%;max-width:100%;min-width:0;margin:0;padding:12px 18px;min-height:48px;font-size:16px;line-height:1.3;border-radius:22px}
/* Focused objective popups keep the homepage composition still. */
#intro .home-challenge-open{display:flex;align-items:center;gap:9px;width:100%;min-height:57px;padding:8px 0;border:0;border-top:1px solid #28595918;border-radius:0;background:none;box-shadow:none;color:inherit;text-align:left;font:inherit;cursor:pointer}
.home-challenge-open>span:nth-child(2){flex:1;min-width:0}.home-challenge-open strong{display:block;font-size:16px}.home-challenge-open small{display:block;font-size:12px;margin-top:3px}
.challenge-dialog{box-sizing:border-box;width:min(460px,calc(100% - 28px));max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:0 22px 20px;border:0;border-radius:28px;background:#fff8e8;color:#28595b;overflow-y:auto;box-shadow:0 18px 60px #133d4933}
.challenge-dialog::backdrop{background:#173e4b65;backdrop-filter:blur(4px)}
.challenge-dialog header{pointer-events:auto;position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:22px 0 14px;background:#fff8e8}
.challenge-eyebrow{font-size:11px;letter-spacing:1px;font-weight:700;color:#a37922}.challenge-dialog h2{font:500 28px/1.1 Fredoka,sans-serif;margin:5px 0 0}
.challenge-close{flex:none;width:44px;height:44px;border:0;border-radius:50%;background:#28595b;color:#fff8e8;font-size:23px}.challenge-reset,.challenge-status{font-size:12px;line-height:1.4;margin:0 0 12px}.challenge-status:empty{display:none}
.challenge-dialog .home-missions{padding:0;counter-reset:mission}
.challenge-dialog .shell-objective{padding:18px 28px 18px 48px;border-top:1px solid #28595920;counter-increment:mission}
.challenge-dialog .shell-objective::before{content:counter(mission);position:absolute;left:0;top:20px;width:33px;height:33px;display:grid;place-items:center;border-radius:50%;background:#efd891;color:#28595b;font:500 20px Fredoka,sans-serif}
.challenge-dialog .shell-objective[data-complete=true]::before{content:'✓';background:#cce5db}.challenge-dialog .shell-objective small{font-size:12px;color:#6e7770}.challenge-dialog .shell-objective b{font:500 21px/1.2 Fredoka,sans-serif;margin:5px 0}.challenge-dialog .mission-count{font-size:16px}.challenge-dialog .mission-mark{display:none}
.challenge-dialog .shell-weekly{font:500 28px/1.2 Fredoka,sans-serif;margin:18px 0}.challenge-dialog .weekly-count{display:block;font:500 36px Fredoka,sans-serif;color:#b08021}
.challenge-dialog .home-milestones{justify-content:space-between;gap:8px;margin:24px 0 12px}.challenge-dialog .home-milestones>span{font-size:14px;text-align:center;flex:1;border-bottom:4px solid #dfd7be;padding:12px 0}.challenge-dialog .home-milestones [data-complete=true]{border-color:#2f8981}
.challenge-reward{font-size:13px;line-height:1.5;text-align:center;margin:15px 0}.challenge-done{display:block;width:100%;min-height:46px;border:0;border-radius:24px;background:#28595b;color:#fff8e8;font:500 18px Fredoka,sans-serif}
@media(max-width:760px){#intro .home-challenge-open{gap:7px;min-height:54px}.home-challenge-open strong{font-size:14px}.home-challenge-open small{font-size:11px}}
/* A compact end-of-run keepsake, with a clear Level highlight and quieter details. */
#over .run-progress{border:0;padding:0;margin:18px 0 12px;text-align:left}
#over .run-progress-title{display:block;font-size:19px;letter-spacing:-.02em;margin-bottom:10px}
#over .run-progress ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px;margin:0}
#over .run-progress li{display:flex;align-items:flex-start;gap:8px;min-width:0;font-size:14px;line-height:1.35}
#over .run-change-icon{flex:0 0 26px;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#f6df9e;color:#845227;font-size:19px}
#over .run-change-body{min-width:0;flex:1}
#over .run-change-label{display:block;font:600 10px/1.4 system-ui,sans-serif;letter-spacing:.055em;color:#61766c;margin-bottom:3px;overflow-wrap:anywhere}
#over .run-change-value{display:block;font:500 16px/1.25 Fredoka,sans-serif;overflow-wrap:anywhere}
#over .run-change-detail{display:block;font-size:12px;color:#58736d;margin-top:4px;overflow-wrap:anywhere}
#over .run-progress li[data-kind=level]{grid-column:1 / -1;background:linear-gradient(110deg,#f4e1a8,#fff0ce);border-radius:18px 5px 18px 5px;padding:12px;align-items:center}
#over .run-progress li[data-kind=level] .run-change-icon{background:transparent;font-size:32px;flex-basis:36px}
#over .run-progress li[data-kind=level] .run-change-value{font-size:24px}
#over .run-progress li[data-kind=level] progress{display:block;width:100%;height:5px;border:0;margin:8px 0 5px;accent-color:#287b78;border-radius:5px;overflow:hidden}
#over .run-progress progress::-webkit-progress-bar{background:#fff9ea}
#over .run-progress progress::-webkit-progress-value{background:#287b78}
#over .run-progress li[data-kind=complete],#over .run-progress li[data-kind=closet],#over .run-progress li[data-kind=status]{grid-column:1 / -1}
#over .run-progress li[data-kind=complete] .run-change-icon{background:#28595b;color:#fff9ea}
#over #historyOver{font-size:14px;margin:12px auto 0;padding:9px 18px}
@media(max-width:350px){#over .run-progress ul{grid-template-columns:minmax(0,1fr)}#over .run-progress li[data-kind=level] .run-change-value{font-size:22px}}
.home-outfit{display:block;font-size:11px;line-height:1.3;margin-top:7px;color:#58736d;overflow-wrap:anywhere}
/* Reuse the wordmark slot; no additional HUD row or playfield displacement. */
.profile-identity{display:none;position:fixed;z-index:5;left:16px;top:calc(19px + env(safe-area-inset-top));width:calc(100% - 202px);max-width:260px;pointer-events:none;color:#fff9ea;text-shadow:0 1px 3px #174d4d,0 0 7px #174d4d;line-height:1.2}
body.playing .profile-identity{display:block}body.playing .wordmark{visibility:hidden}
.profile-identity strong{display:block;font:500 18px/1.2 Fredoka,sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-identity span{display:block;font-size:11px;line-height:1.2;margin-top:3px;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

html[data-visual-style=sketch] .profile-identity{color:#245b5b;text-shadow:0 1px 4px #fff8e7,0 0 8px #fff8e7}
@media(min-width:761px){.profile-identity{left:42px;top:28px;width:260px}}
/* The homepage is a game shell: full-width player rail, open hero, shared action dock. */
#intro .intro-copy{width:100%;max-width:none}
#intro #homeIdentity{font:inherit;text-align:left;cursor:pointer;border-inline:0;display:flex;align-items:center;gap:12px;width:calc(100% + 12vw);max-width:none;margin:0 -6vw 22px;padding:6px 6vw;border-radius:0;background:#fff9ece8;border-block:1px solid #28595b18;color:#245557;min-height:64px;box-shadow:none}
#homeIdentity canvas{position:static;inset:auto;width:53px;height:49px;flex:none;touch-action:auto}
#homeIdentity .home-level{display:grid;grid-template-columns:minmax(85px,150px) minmax(0,1fr);align-items:center;gap:4px 20px;min-width:0;padding:0;flex:1;max-width:700px}
#homeIdentity .shell-level{grid-column:1;font-size:21px;line-height:1.15}
#homeIdentity .home-level progress{grid-column:1;grid-row:2;height:4px;margin:0}
#homeIdentity .home-outfit{grid-column:2;grid-row:1 / 3;font-size:14px;line-height:1.25;margin:0;padding-left:18px;border-left:1px solid #28595b25;color:#28595b}
#intro .retention-home{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;max-width:560px;min-width:0;margin:clamp(60px,12svh,130px) 0 14px;padding:12px 0;border-radius:0;background:#fff9eceb;border-block:1px solid #28595b18;box-shadow:none}
#intro .retention-home .home-challenge-open,#intro .retention-home #historyOpen{display:flex;flex-direction:column;justify-content:center;text-align:center;align-items:center;gap:4px;width:100%;min-width:0;min-height:75px;padding:3px 8px;border:0;margin:0;border-radius:0;background:transparent}
#intro .retention-home #open-week,#intro .retention-home #historyOpen{border-left:1px solid #28595b20}
#intro .retention-home .home-chevron{display:none}
#intro .retention-home .home-symbol{font-size:24px;width:auto;line-height:1}
#intro .retention-home strong{font-size:15px;line-height:1.2}
#intro .retention-home small{font-size:11px;line-height:1.25;margin-top:3px}
#intro .retention-home #historyOpen>span:nth-child(2){flex:0}
#intro #start,#intro .home-secondary-actions{max-width:560px}
#intro #start{margin-top:0}
@media(max-width:760px){
 #intro{padding-top:calc(82px + env(safe-area-inset-top))}
 #intro #homeIdentity{margin-bottom:18px}
 #homeIdentity .home-level{grid-template-columns:minmax(75px,110px) minmax(0,1fr);gap:4px 12px}
 #homeIdentity .home-outfit{font-size:12px;padding-left:12px}
 #homeIdentity .shell-level{font-size:20px}
 #intro h1{font-size:clamp(44px,12vw,64px);max-width:80%}
 #intro .tagline{max-width:76%}
 #intro .retention-home{margin-top:clamp(65px,12svh,120px);margin-bottom:12px}
 #intro .home-secondary-actions{margin-top:12px}
}
@media(max-width:350px){
 #homeIdentity canvas{width:43px;height:40px}
 #homeIdentity .home-level{grid-template-columns:80px minmax(0,1fr);gap:4px 8px}
 #homeIdentity .shell-level{font-size:18px}
 #homeIdentity .home-outfit{font-size:11px;padding-left:8px}
 #intro .retention-home strong{font-size:13px}
 #intro .retention-home small{font-size:10px}
}
/* One in-flow homepage rail: no floating controls above scrolling content. */
body.home-shell #game>header{display:none}
#intro{padding-top:env(safe-area-inset-top)}
#homePlayerBar{display:flex;align-items:center;gap:12px;width:calc(100% + 12vw);margin:0 -6vw 24px;padding:10px 6vw;background:#f3f0e6;border-bottom:1px solid #28595b18;position:static;isolation:isolate}
#intro #homeIdentity{flex:1;min-width:0;width:auto;min-height:52px;margin:0;padding:0;border:0;background:transparent;gap:9px}
#homeIdentity .home-level{display:flex;flex-direction:column;align-items:flex-start;gap:3px;max-width:240px}
#homeIdentity .home-level progress{width:100%;max-width:150px;flex:none}
#homeIdentity .home-outfit{font-size:11px;padding:0;border:0;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#homeUtilities{display:flex;align-items:center;gap:8px;flex:none;border-left:1px solid #28595b35;padding-left:8px}
#homeUtilities .instagram-profile{position:static;height:44px;min-width:58px;padding:4px;gap:3px;background:transparent;border-radius:12px;flex-wrap:wrap;justify-content:center}
#homeUtilities .instagram-copy{display:none}
#homeUtilities .instagram-avatar{width:28px;height:28px;flex:none}
#homeUtilities .instagram-profile svg{width:16px;height:16px;opacity:1}
:is(#homeUtilities,.header-controls) #sound{width:52px;height:44px;min-width:52px;padding:0 0 0 8px;font-size:0;border:0;border-left:1px solid #28595b35;border-radius:0;background:transparent;box-shadow:none}
:is(#homeUtilities,.header-controls) #sound::before{content:'🔊';font-size:24px}
:is(#homeUtilities,.header-controls) #sound[aria-label="Turn sound on"]::before{content:'🔇'}
#homeUtilities a:focus-visible,#homeUtilities button:focus-visible,#homeIdentity:focus-visible{outline:3px solid #db6749;outline-offset:3px}
@media(max-width:760px){#intro{padding-top:env(safe-area-inset-top)}#intro #homeIdentity{margin:0}#homePlayerBar{gap:8px;margin-bottom:20px}#homeIdentity canvas{width:44px;height:44px}#homeIdentity .shell-level{font-size:19px}}
@media(max-width:350px){#homePlayerBar{gap:4px}#homeUtilities{gap:2px}#homeIdentity canvas{width:36px;height:38px}#homeIdentity .shell-level{font-size:17px}#homeIdentity .home-outfit{font-size:10px}}

/* Blend the portrait’s pale paper backing into this rail only; keep source art intact. */
#homePlayerBar #homeIdentity canvas{mix-blend-mode:darken;background:transparent}
/* Art gets its own stage. Mission launchers belong to the action area below it. */
html:not([data-visual-style="sketch"]) #intro,html[data-visual-style="sketch"] #intro{background:#f5eddc;background-image:none}
#intro .intro-copy::before{display:none}
#homePlayerBar{margin-bottom:0}
.home-hero{aspect-ratio:9 / 16;height:auto;width:calc(100% + 12vw);margin:0 -6vw;padding:24px 6vw;box-sizing:border-box;background-color:#f5eddc;background-image:url('../home-mediterranean.webp');background-size:100% 100%;background-position:center;background-repeat:no-repeat}
#intro .home-hero h1{font-size:clamp(44px,8vw,80px)}
#intro .home-hero .tagline{font-size:15px;max-width:300px}
#intro .retention-home{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:calc(100% + 12vw);max-width:none;min-width:0;margin:0 -6vw 16px;padding:12px 6vw;background:#fff9ea;border-block:1px solid #28595b25;gap:0;box-shadow:none}
#intro .retention-home .home-challenge-open,#intro .retention-home #historyOpen{flex-direction:column;text-align:center;justify-content:center;gap:5px;min-height:68px;padding:0 8px;border:0;border-radius:0;background:none}
#intro .retention-home #open-week,#intro .retention-home #historyOpen{border-left:1px solid #28595b25}
#intro .retention-home strong{font:500 16px/1.15 Fredoka,sans-serif}
#intro .retention-home small{font-size:11px}
#intro .retention-home .home-symbol{font-size:24px}
#intro .retention-home #historyOpen small{display:block}

@media(max-width:760px){
 #homePlayerBar{margin-bottom:0}
 #intro .home-hero h1{max-width:100%;font-size:clamp(43px,11.5vw,64px)}
 #intro .home-hero .tagline{max-width:85%;font-size:14px;line-height:1.25}
 #intro .home-hero .style-toggle{margin-top:0}
 
}
@media(max-width:350px){#intro .retention-home .home-challenge-open{padding:8px;gap:5px}#intro .retention-home strong{font-size:14px}}

/* Keep the supplied portrait photograph whole, including on wide displays. */
@media(min-width:761px){
 #intro .home-hero{width:min(100%,560px);margin-inline:auto;padding:28px;}
 #intro .home-hero h1{font-size:64px}
 #intro .retention-home{width:min(100%,560px);margin:0 auto 16px;padding:12px 0}
 #intro #start,#intro .home-secondary-actions{display:block;margin-left:auto;margin-right:auto}
 #intro .best-intro{margin-left:auto;margin-right:auto}
}
/* Fit the complete home shell to Safari's visible viewport; details use dialogs. */
html #intro{height:100%;height:100dvh;padding:env(safe-area-inset-top) 0 calc(22px + env(safe-area-inset-bottom));overflow-y:auto;box-sizing:border-box}
#intro .intro-copy{display:flex;flex-direction:column;min-height:0;height:100%;width:100%;max-width:none;padding:0;margin:0}
#intro #homePlayerBar{flex:none;width:100%;margin:0;padding:7px 5%;min-height:62px}
#intro .home-hero{flex:1;min-height:145px;width:100%;max-width:none;height:auto;aspect-ratio:auto;margin:0;padding:18px 5%;background-size:cover;background-position:center bottom;background-color:#83c8ed}
#intro .home-hero h1{font-size:clamp(36px,10vw,56px);max-width:100%;margin-bottom:7px}
#intro .home-hero .tagline{font-size:13px;line-height:1.25;margin-bottom:10px}
#intro .home-hero .style-toggle{min-height:32px;margin:0}
#intro .home-hero .style-toggle button{min-height:32px;padding:6px 14px;font-size:12px}
#intro .retention-home{flex:none;width:100%;max-width:none;margin:0;padding:8px 4%;min-height:76px}
#intro .retention-home .home-challenge-open,#intro .retention-home #historyOpen{min-height:58px;padding:0 5px;gap:3px}
#intro .retention-home .home-symbol{font-size:20px}
#intro .retention-home strong{font-size:14px}
#intro .retention-home small{font-size:10px}
#intro .home-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.55fr);gap:10px;flex:none;margin:10px 5% 6px}
#intro .home-actions #start,#intro .home-actions #leaderboardOpen{min-width:0;width:100%;max-width:none;min-height:52px;margin:0;padding:12px 8px;white-space:nowrap}
#intro .home-actions #start{font-size:19px}
#intro .home-actions #start span{margin-left:8px}
#intro .home-actions #leaderboardOpen{font-size:14px}
#intro .best-intro{flex:none;text-align:center;font-size:11px;line-height:1.2;margin:5px auto 0;padding:0;background:none}
#intro .best-intro strong{font-size:13px}

@media(min-width:761px){#intro .home-hero{padding-left:8%;background-position:70% center}#intro .home-actions{width:min(560px,90%);margin-left:auto;margin-right:auto}#intro .retention-home{padding-inline:max(5%,calc((100% - 560px)/2))}}
@media(max-height:620px){#intro #homeIdentity{min-height:44px}#intro #homePlayerBar{min-height:54px;padding-block:5px}#intro .home-hero{padding-top:10px}#intro .home-hero h1{font-size:36px}#intro .retention-home{padding-block:6px;min-height:65px}#intro .retention-home .home-challenge-open,#intro .retention-home #historyOpen{min-height:50px}#intro .home-actions{margin-top:8px}#intro .home-actions #start,#intro .home-actions #leaderboardOpen{min-height:46px;padding:9px 6px}}
/* Defined, balanced hit targets in the player bar. */
#intro #homePlayerBar{gap:8px;background:#f3f0e6}
#intro #homeIdentity{background:#fff9ea;border:1px solid #28595b16;border-radius:14px;padding:5px 8px;min-height:52px;gap:7px}
#homeUtilities{border:0;padding:0;gap:8px}
#homeUtilities .instagram-profile,:is(#homeUtilities,.header-controls) #sound{display:flex;align-items:center;justify-content:center;box-sizing:border-box;height:48px;min-height:48px;padding:0;border:1px solid #28595b16;border-radius:14px;background:#fff9ea;box-shadow:0 2px 0 #28595b10}
#homeUtilities .instagram-profile{width:62px;min-width:62px;gap:3px;flex-wrap:nowrap}
:is(#homeUtilities,.header-controls) #sound{width:48px;min-width:48px;line-height:1}
:is(#homeUtilities,.header-controls) #sound::before{display:block;line-height:1}
#homeUtilities a:hover,#homeUtilities button:hover,#intro #homeIdentity:hover{background:#fffdf5}
#homeUtilities a:active,#homeUtilities button:active,#intro #homeIdentity:active{transform:translateY(1px)}
@media(max-width:350px){#intro #homePlayerBar{padding-inline:12px;gap:6px}#homeUtilities{gap:6px}#homeUtilities .instagram-profile{width:56px;min-width:56px}#intro #homeIdentity{padding-inline:5px;gap:5px}}
:is(#homeUtilities,.header-controls) #sound::before{content:'';width:23px;height:23px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4 5 9H2v6h3l6 5zM15 8a6 6 0 0 1 0 8M18 5a10 10 0 0 1 0 14'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat}
:is(#homeUtilities,.header-controls) #sound[aria-label="Turn sound on"]::before{content:'';mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4 5 9H2v6h3l6 5zM16 9l6 6m0-6-6 6'/%3E%3C/g%3E%3C/svg%3E")}
/* On taller phones, trim spare sky rather than introducing side bands. */
@media(min-height:650px) and (max-width:760px){
 html:not([data-visual-style="sketch"]) #intro .home-hero{background-size:cover;background-position:center bottom}
 #intro .home-hero h1{font-size:36px;max-width:190px}
 #intro .home-hero .tagline{max-width:170px;font-size:12px}
 #intro .home-hero .style-toggle button{padding-inline:12px}
}
/* Each mission has its own target-scaled, confirmed progress meter. */
.challenge-dialog .mission-progress{display:block;appearance:none;-webkit-appearance:none;width:100%;height:12px;margin:12px 0 7px;border:0;border-radius:8px;overflow:hidden;background:#28595b16;accent-color:#dbaa39}
.challenge-dialog .mission-progress::-webkit-progress-bar{background:#28595b16;border-radius:8px}
.challenge-dialog .mission-progress::-webkit-progress-value{background:linear-gradient(90deg,#e4b348,#f0cc6e);border-radius:8px;transition:width .25s ease}
.challenge-dialog .mission-progress::-moz-progress-bar{background:#e4b348;border-radius:8px}
.challenge-dialog [data-complete=true] .mission-progress{accent-color:#287b78}
.challenge-dialog [data-complete=true] .mission-progress::-webkit-progress-value{background:#287b78}
.challenge-dialog [data-complete=true] .mission-progress::-moz-progress-bar{background:#287b78}
.challenge-dialog [data-complete=true] .mission-count{color:#287b78}
@media(prefers-reduced-motion:reduce){.challenge-dialog .mission-progress::-webkit-progress-value{transition:none}}
.challenge-dialog .weekly-progress{display:block;appearance:none;-webkit-appearance:none;width:100%;height:14px;margin:14px 0 8px;border:0;border-radius:9px;overflow:hidden;background:#28595b16;accent-color:#287b78}
.challenge-dialog .weekly-progress::-webkit-progress-bar{background:#28595b16}
.challenge-dialog .weekly-progress::-webkit-progress-value{background:#287b78;border-radius:9px}
.challenge-dialog .weekly-progress::-moz-progress-bar{background:#287b78;border-radius:9px}
.challenge-dialog .weekly-next{font-size:14px;color:#28595b;font-weight:600;margin:8px 0 16px;line-height:1.4}
.challenge-dialog .home-milestones{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}
.challenge-dialog .home-milestones>span{white-space:pre-line;font-size:11px;line-height:1.65;padding:8px 4px;border:0;border-top:4px solid #dfd7be;border-radius:4px 4px 0 0;overflow-wrap:anywhere}
.challenge-dialog .home-milestones>span::first-line{font-size:16px;font-weight:700}
.challenge-dialog .home-milestones [data-complete=true]{border-top-color:#287b78;background:#287b780b}
.challenge-dialog .home-milestones [data-next=true]{border-top-color:#dbaa39;background:#edcd7220}

/* Sketch uses the original lower-positioned composition in the new bounded hero. */
html[data-visual-style="sketch"] #intro .home-hero{background-color:#f1e8d7;background-image:url('../home-sketch-wide.webp');background-size:cover;background-position:center bottom;background-repeat:no-repeat}
@media(max-width:760px){html[data-visual-style="sketch"] #intro .home-hero{background-image:url('../home-sketch-portrait.webp');background-position:center bottom}}

/* Short visual guide: one symbol key, collections, hazards, then bonuses. */
#tutorial .tutorial-content{padding:20px}
#tutorial h2{font-size:27px;margin:0 0 10px}
#tutorial .points-key{display:flex;justify-content:center;gap:22px;margin:0 0 18px;font-size:13px;line-height:1.4}
#tutorial .points-key span{display:flex;align-items:center;gap:6px}
#tutorial .points-key b{font-size:19px;color:#287477}
#tutorial .points-key span+span b{color:#287477}
#tutorial .guide-group{padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid #28595b20}
#tutorial .guide-group h3{font-size:17px;align-items:center;margin-bottom:8px}
#tutorial .guide-group h3 span{font-size:12px}
#tutorial .guide-items figcaption{font-size:12px;line-height:1.4}
#tutorial .good-items .guide-item{width:51px;height:51px}
#tutorial .bad-items{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
#tutorial .bad-items .guide-item{width:38px;height:38px}
#tutorial .guide-bonus{padding:8px 10px}
#tutorial .guide-controls{font-size:12px;margin:12px 0}
#tutorial #tutorialStart{width:100%;margin:0;font-size:18px}
@media(min-width:600px){#tutorial .bad-items{grid-template-columns:repeat(8,minmax(0,1fr))}}

#tutorial .good-items figcaption{white-space:pre-line}
/* Help is a home utility, never a gameplay overlay. */
#homeUtilities #helpOpen{display:grid;place-items:center;width:44px;min-width:44px;height:48px;padding:0;border:1px solid #28595b16;border-radius:14px;background:#fff9ea;color:#28595b;font:700 23px Nunito,sans-serif;box-shadow:0 2px 0 #28595b10}
#homeUtilities #helpOpen span{display:grid;place-items:center;width:25px;height:25px;border:2px solid currentColor;border-radius:50%;font-size:18px}
@media(max-width:430px){#homeUtilities{gap:4px}#homeUtilities .instagram-profile{width:48px;min-width:48px}#homeUtilities .instagram-avatar{width:24px;height:24px}:is(#homeUtilities,.header-controls) #sound{width:44px;min-width:44px}#intro #homeIdentity{padding-inline:5px;gap:5px}#homeIdentity canvas{width:36px;height:38px}#homeIdentity .shell-level{font-size:18px}#homeIdentity .home-outfit{font-size:10px}}
#gameHelp{width:min(540px,calc(100% - 28px));max-height:calc(100dvh - 28px);padding:0;border:0;border-radius:24px;background:#fff9ea;color:#28595b;overflow:auto;box-shadow:0 20px 70px #173f4b44}
#gameHelp::backdrop{background:#21494c70}
#gameHelp header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff9ea;padding:18px 20px 12px}
#gameHelp h2{margin:0;font-size:25px}#gameHelp h3{margin:0 0 5px;font-size:17px}
#gameHelp header .help-close{min-width:44px;min-height:44px;border:0;border-radius:50%;background:#28595b;color:#fff;font-size:19px}
#gameHelp .help-body{padding:0 20px 20px}#gameHelp p{font-size:14px;line-height:1.5;margin:6px 0 12px}
#gameHelp .help-lead{font-size:15px}#gameHelp .help-move{display:flex;align-items:center;gap:14px;border-block:1px solid #28595b22;padding:8px 0;margin-bottom:12px}#gameHelp .help-move>span{white-space:nowrap;font-size:22px}
#gameHelp .help-picture-row{display:grid;grid-template-columns:64px 1fr;gap:12px;align-items:center;margin:12px 0}#gameHelp canvas{width:64px;height:64px}
#gameHelp section,#gameHelp details{border-top:1px solid #28595b22;padding:14px 0 0;margin-top:14px}
#gameHelp summary{cursor:pointer;font-weight:700;min-height:36px}#gameHelp .help-draft{font-size:12px;color:#76634b}
#gameHelp .help-done{display:block;width:100%;border-radius:16px;margin-top:18px}
.mission-art{display:block;object-fit:contain;pointer-events:none}
#challenge-today .shell-objective{grid-template-columns:58px minmax(0,1fr) auto;column-gap:12px}
#challenge-today .shell-objective>.mission-art{width:58px;height:66px;grid-column:1;grid-row:1 / 5}
#challenge-today .shell-objective>div,#challenge-today .shell-objective>.mission-progress,#challenge-today .shell-objective>.mission-count{grid-column:2 / 4}
#challenge-today .shell-objective small,#lexyHistory .daily-card>strong{display:table;width:auto;padding:3px 9px;border-radius:7px;font-size:12px;font-weight:800;background:var(--tier-bg);color:var(--tier-ink);margin-bottom:7px}
[data-difficulty="easy"]{--tier-bg:#dfeddc;--tier-ink:#315b38}
[data-difficulty="medium"]{--tier-bg:#f8e8b4;--tier-ink:#765616}
[data-difficulty="hard"]{--tier-bg:#f5d9ce;--tier-ink:#873d2c}
#lexyHistory .daily-token.mission-art{width:58px;height:66px;padding:0;background:none;border-radius:0}
#challenge-week .weekly-art,#lexyHistory .weekly-art{width:100px;height:100px;margin:10px auto}
.challenge-reward:empty{display:none}
#challenge-today .shell-objective{display:grid;padding:14px 0}
#challenge-today .shell-objective::before{display:none}
#lexyHistory .daily-card{grid-template-columns:58px minmax(0,1fr)}
#lexyHistory .daily-token.mission-art{transform:none}
#gameHelp a{color:#256567;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
#gameHelp canvas{position:static;display:block;inset:auto;pointer-events:none;touch-action:auto}
#gameHelp .help-picture-row>div{grid-column:2;min-width:0}
.mission-art{position:static;inset:auto;touch-action:auto}
#gameHelp header,#gameHelp .help-close{pointer-events:auto}
#lexyHistory #avatarEdit{grid-column:2;justify-self:start;border:0;border-bottom:1px solid currentColor;background:none;padding:4px 0;color:#28595b;font:700 13px Nunito,sans-serif;min-height:32px;margin-bottom:6px}
#lexyHistory .history-avatar{grid-row:1 / 6}
#avatarPicker{width:min(520px,calc(100% - 28px));max-height:calc(100dvh - 28px);border:0;border-radius:24px;padding:0 18px 18px;background:#fff9ea;color:#28595b;overflow:auto}
#avatarPicker::backdrop{background:#21494c70}
#avatarPicker header{position:sticky;top:0;z-index:1;pointer-events:auto;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff9ea;padding:18px 0 12px}
#avatarPicker h2{font-size:23px;margin:0}#avatarPicker p{font-size:14px;line-height:1.4}
#avatarClose{width:44px;min-width:44px;height:44px;pointer-events:auto;border:0;border-radius:50%;background:#28595b;color:white}
.avatar-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.avatar-options button{position:relative;border:2px solid transparent;border-radius:14px;padding:6px;background:#f3ead2;color:#28595b;font:700 12px Nunito,sans-serif;min-width:0}
.avatar-options button[aria-pressed=true]{border-color:#287477;background:#deeee5}
.avatar-options button[aria-pressed=true]::after{content:'✓';position:absolute;right:6px;top:4px;color:#287477;font-weight:900}
.avatar-options canvas{position:static;display:block;width:100%;height:auto;mix-blend-mode:multiply;pointer-events:none}
#avatarSave{display:block;width:100%;min-height:46px;border:0;border-radius:16px;background:#28595b;color:white;font:700 16px Nunito,sans-serif}
#avatarSave:disabled{opacity:.5}.run-outfit-label{display:block;font-size:12px;color:#68786b;margin-top:6px}
/* Explicit cumulative XP and destination of the Level meter. */
#homeIdentity .home-xp{font-size:11px;font-weight:800;color:#28595b;line-height:1.2}
#homeIdentity .home-next{font-size:10px;color:#526c66;line-height:1.2}
#homeIdentity .home-level{min-width:0}
#homeIdentity .home-xp{overflow-wrap:anywhere}
.xp-flight{position:fixed;left:0;top:0;z-index:100;pointer-events:none;color:#d6a236;font-size:22px;text-shadow:0 1px 3px #fff9ea}
.xp-arrival{position:fixed;z-index:100;pointer-events:none;background:#fff5ce;color:#28595b;border-radius:18px;padding:8px 12px;font:800 14px Nunito,sans-serif;box-shadow:0 3px 12px #28595b22}
#intro #homeIdentity.xp-received{box-shadow:0 0 0 3px #e6bb56;background:#fff5ce}

#lexyHistory #avatarEdit{justify-self:start;min-height:36px;min-width:64px;padding:7px 16px;border:1px solid #28595b28;border-radius:999px;background:#fff9ea;color:#28595b;font:800 13px Nunito,sans-serif;box-shadow:0 2px 0 #28595b14;text-decoration:none;cursor:pointer}
#lexyHistory #avatarEdit:hover{background:#fffdf5;border-color:#28595b66}
#lexyHistory #avatarEdit:active{transform:translateY(1px);box-shadow:none}
#lexyHistory #avatarEdit:focus-visible{outline:3px solid #d66b4a;outline-offset:3px}

/* Compact profile chrome: destination beside Level, one XP line below the meter. */
#homeIdentity .home-level{display:grid;grid-template-columns:auto 1fr;gap:3px 8px;align-items:center;flex:1;max-width:240px}
#homeIdentity .shell-level{grid-column:1;grid-row:1;white-space:nowrap}
#homeIdentity .home-next{grid-column:2;grid-row:1;justify-self:end;font-size:11px;white-space:nowrap}
#homeIdentity .home-level progress{grid-column:1 / -1;grid-row:2;max-width:none;width:100%;height:5px}
#homeIdentity .home-xp{grid-column:1 / -1;grid-row:3;font-size:11px}
#homePlayerBar #homeIdentity .home-outfit{display:none}

.leaderboard-level{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;min-width:25px;height:25px;padding:0 4px;box-sizing:border-box;margin-right:6px;border-radius:50%;background:#28595b;color:#fff9ea;font:800 12px Nunito,sans-serif;border:2px solid #e7c67b;font-variant-numeric:tabular-nums}

/* Rank leads every row; profile Level remains a separate small badge. */
#leaderboardList li{grid-template-columns:minmax(26px,auto) 46px minmax(0,1fr) auto;gap:8px;padding:12px 8px;margin-bottom:5px}
#leaderboardList .rank{position:static;background:none;box-shadow:none;border-radius:0;width:auto;height:auto;font:700 23px Fredoka,sans-serif;color:#28595b;font-variant-numeric:tabular-nums}
#leaderboardList .leaderboard-avatar{width:46px;height:48px;box-shadow:none;background:transparent}
#leaderboardList .leaderboard-avatar canvas{width:46px;height:43px;mix-blend-mode:darken}
#leaderboardList .leaderboard-level{margin:0 0 0 5px;min-width:22px;height:22px;font-size:11px}
@media(max-width:350px){#leaderboardList li{grid-template-columns:minmax(22px,auto) 34px minmax(0,1fr) auto;gap:5px;padding-inline:4px}#leaderboardList .leaderboard-avatar,#leaderboardList .leaderboard-avatar canvas{width:34px;height:34px}#leaderboardList strong,#leaderboardList .rank-score{font-size:14px}}

#leaderboardList .leaderboard-level{border-radius:7px;padding:2px 6px;width:auto;min-width:35px;height:22px;border:1px solid #28595b22;background:#e0ece6;color:#28595b;font-size:11px;white-space:nowrap}

/* Compact gameplay sibling of the Home bar, inside the game's popup stack. */
body.playing #game>header{padding:8px 16px;min-height:64px;gap:10px;background:#fff9eaeF;border-bottom:1px solid #28595b14}
body.playing #game>header .wordmark{display:none}
body.playing .profile-identity{position:static;display:flex;align-items:center;gap:7px;flex:1;min-width:0;max-width:none;width:auto;color:#28595b;text-shadow:none;visibility:visible}
.profile-identity canvas{position:static;inset:auto;width:42px;height:44px;flex:0 0 42px;mix-blend-mode:darken}
.profile-identity>div{min-width:0}.profile-identity strong{font-size:18px}.profile-identity span{font-size:10px;white-space:nowrap;display:block;text-overflow:ellipsis;overflow:hidden}
body.playing .header-controls{gap:6px}body.playing #pause{border-radius:14px;background:#fff9ea;border:1px solid #28595b16;box-shadow:0 2px 0 #28595b10;padding:0 12px;height:44px;min-height:44px}
body.playing .header-controls #sound{width:44px;height:44px;min-width:44px;min-height:44px}
body[data-run-mode=over] #game>header{pointer-events:none}
/* Feedback sits below the existing HUD; it never replaces the player's identity. */
.retention-moment{left:50%;top:218px;transform:translateX(-50%);width:max-content;max-width:min(340px,calc(100% - 32px));max-height:none;padding:7px 14px;gap:9px;border-radius:30px;background:#fff9eaf2;color:#28595b;text-shadow:none;box-shadow:0 3px 12px #174e5822;z-index:6}
.retention-moment strong{font-size:18px}.retention-moment .moment-detail{font-size:12px}.retention-moment:not([data-kind=progress]) strong{color:#28595b;text-shadow:none}.retention-moment:not([data-kind=progress]){background:#ffedb7f5;border:1px solid #e6bb5d}.retention-moment[data-kind=progress] strong{font-size:14px}
@media(min-width:961px){.retention-moment{top:174px}}
#over .card{padding:16px 20px}#over .card h2{font-size:28px;margin:2px 0}#over #outfitPortrait{width:78px;height:72px;margin:0 auto}#over #finalLook{font-size:15px;margin:2px 0}#over #overReason{font-size:12px;margin:2px 0;line-height:1.3}#over .results{margin:8px 0;gap:24px}#over .results strong{font-size:28px}
#over .score-form{margin:8px 0 10px}#over .run-progress{margin:12px 0 8px}#over .run-progress-title{font-size:17px;margin-bottom:7px}#over .run-progress ul{gap:8px 10px}#over .run-progress li[data-kind=level]{padding:8px 10px;border-radius:12px}#over .run-progress li[data-kind=level] .run-change-value{font-size:20px}#over .run-change-label{margin-bottom:1px;font-size:9px}#over .run-change-value{font-size:14px}#over .run-change-detail{font-size:11px;margin-top:2px}#over .run-progress li[data-kind=level] progress{margin:5px 0 3px}#over #historyOver{margin-top:6px;min-height:40px}
#lexyHistory #avatarEdit[data-pointer-focus]:focus{outline:none}
body.playing.retention-speaking #callout{top:280px}
@media(min-width:961px){body.playing.retention-speaking #callout{top:238px}}

/* One short pickup pulse; current counts also remain visible during celebrations. */
.retention-moment[data-kind=progress]{background:#fff2c9f5;border:1px solid #e6bb5d;box-shadow:0 2px 10px #ad713729}
.retention-moment[data-kind=progress] .moment-icon{display:none}
.retention-moment[data-kind=progress] strong{font-size:16px}
.retention-moment .moment-live{display:block;font-size:11px;line-height:1.3;margin-top:4px;padding-top:4px;border-top:1px solid #28595b24;font-weight:700;color:#28595b}
.retention-moment .moment-live[hidden]{display:none}

#tutorial .guide-xp{display:flex;align-items:center;gap:12px;text-align:left;margin:0 0 12px;padding:10px 12px;background:#e7efe1;border-radius:14px}
#tutorial .guide-xp>b{font-size:27px;color:#287477}
#tutorial .guide-xp strong{font-size:15px}#tutorial .guide-xp p{font-size:12px;line-height:1.4;margin:3px 0 0}
#over .run-change-source{display:block;font-size:12px;font-weight:700;line-height:1.4;margin-top:5px;color:#28595b}

/* Completed objectives are visibly settled; unfinished rows keep the emphasis. */
#challenge-today .shell-objective[data-complete=true],#lexyHistory .daily-card.complete{background:#e5eddf;border-radius:14px;padding:14px 10px;border-bottom-color:transparent;box-shadow:inset 3px 0 #7b9d72}
#challenge-today .shell-objective[data-complete=true] small,#lexyHistory .daily-card.complete>strong{background:var(--tier-bg);color:var(--tier-ink)}
#challenge-today .shell-objective[data-complete=true] b,#lexyHistory .daily-card.complete>p{color:#52694b;font-weight:500}
#challenge-today .shell-objective[data-complete=true] .mission-art,#lexyHistory .daily-card.complete .daily-token{background:transparent;filter:saturate(.7);opacity:.85}
#challenge-today .shell-objective[data-complete=true] .mission-progress{accent-color:#77966c}
#challenge-today .shell-objective[data-complete=true] .mission-progress::-webkit-progress-value{background:#77966c}
#challenge-today .shell-objective[data-complete=true] .mission-progress::-moz-progress-bar{background:#77966c}
#challenge-week .home-week-detail[data-complete=true],#lexyHistory .history-weekly[data-complete=true]{background:#e5eddf;border-radius:16px;padding:14px 12px;box-shadow:inset 3px 0 #7b9d72}
#challenge-week .home-week-detail[data-complete=true] .weekly-next,#lexyHistory .history-weekly[data-complete=true] .weekly-message{color:#345b35;font-weight:700}

#challenge-today .shell-objective[data-complete=true],#lexyHistory .daily-card.complete{position:relative;padding-right:44px}
#challenge-today .shell-objective[data-complete=true] .mission-mark,#lexyHistory .daily-card.complete .mission-done{position:absolute;right:10px;top:15px;display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#427447;color:#fff9ea;font-size:17px;font-weight:800;line-height:1;margin:0}
#challenge-week .home-week-detail[data-complete=true],#lexyHistory .history-weekly[data-complete=true]{position:relative}
#lexyHistory .history-weekly[data-complete=true]>h3{padding-right:32px}
#challenge-week .home-week-detail[data-complete=true]::after,#lexyHistory .history-weekly[data-complete=true]::after{content:'✓';position:absolute;right:12px;top:15px;display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#427447;color:#fff9ea;font-size:17px;font-weight:800;line-height:1}

/* Shared completion palette across current objectives, milestones and history. */
:root{--completed-surface:#e5eddf;--completed-badge:#427447;--completed-ink:#345b35;--completed-track:#77966c}
#challenge-today .shell-objective[data-complete=true],#lexyHistory .daily-card.complete,#challenge-week .home-week-detail[data-complete=true],#lexyHistory .history-weekly[data-complete=true]{background:var(--completed-surface);border-color:transparent;box-shadow:none}
#challenge-today .shell-objective[data-complete=true] .mission-mark,#lexyHistory .daily-card.complete .mission-done,#challenge-week .home-week-detail[data-complete=true]::after,#lexyHistory .history-weekly[data-complete=true]::after,#lexyHistory .reached .weekly-marker{background:var(--completed-badge);border:0;color:#fff9ea;font-weight:800;box-shadow:none}
#lexyHistory .weekly-milestones .reached,#lexyHistory .weekly-milestones .reached small{color:var(--completed-ink)}
.challenge-dialog .home-milestones [data-complete=true]{background:var(--completed-surface);color:var(--completed-ink);border-color:transparent;border-radius:12px}
#challenge-week .home-week-detail[data-complete=true] .weekly-progress,#lexyHistory .history-weekly[data-complete=true] progress{accent-color:var(--completed-track)}
#challenge-week .home-week-detail[data-complete=true] .weekly-progress::-webkit-progress-value,#lexyHistory .history-weekly[data-complete=true] progress::-webkit-progress-value{background:var(--completed-track)}
#challenge-week .home-week-detail[data-complete=true] .weekly-progress::-moz-progress-bar,#lexyHistory .history-weekly[data-complete=true] progress::-moz-progress-bar{background:var(--completed-track)}
#retentionHome button[data-complete=true] .home-symbol{color:var(--completed-badge)}
#retentionHome button[data-complete=true] small{color:var(--completed-ink);font-weight:700}
#over .run-progress li[data-kind=complete]{background:var(--completed-surface);border-radius:12px;padding:8px}
#over .run-progress li[data-kind=complete] .run-change-icon{background:var(--completed-badge);border:0;color:#fff9ea}
.retention-moment[data-kind=daily] .moment-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--completed-badge);color:#fff9ea;border:0;text-shadow:none;font-size:22px}

.challenge-dialog .home-milestones [data-complete=true]::before{content:'✓';display:grid;place-items:center;width:25px;height:25px;margin:0 auto 5px;border-radius:50%;border:0;background:var(--completed-badge);color:#fff9ea;font-size:17px;font-weight:800;line-height:1}

/* Compact action targets: shared theme artwork, counts and XP instead of repeated nouns. */
.challenge-dialog .home-milestones>span{white-space:normal}
.challenge-dialog .home-milestones b{display:block;font-size:16px}
.challenge-dialog .home-milestones small{display:block;margin-top:5px;font-size:12px}
.milestone-quantity,#lexyHistory .weekly-milestone-target{display:flex;align-items:center;justify-content:center;gap:3px;margin:5px 0;font-style:normal}
.milestone-quantity em,#lexyHistory .weekly-milestone-target em{font-style:normal;font-weight:700;font-size:13px}
.milestone-quantity .milestone-icon,#lexyHistory .weekly-milestone-target .milestone-icon{width:25px;height:30px;flex:0 0 25px}

/* The pre-run tutorial fits the visible screen in either theme. */
#tutorial{box-sizing:border-box;width:min(560px,calc(100vw - 20px));max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);overflow:hidden}
#tutorial .tutorial-content{box-sizing:border-box;min-width:0;padding:16px;display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
#tutorial .tutorial-content>*{min-width:0;margin:0}
#tutorial h2{font-size:25px;line-height:1.15;margin:0}
#tutorial .points-key{margin:0;gap:18px}
#tutorial .guide-group{padding:0 0 7px;margin:0}
#tutorial .guide-group h3{margin:0 0 4px;font-size:15px}
#tutorial .guide-items{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
#tutorial .guide-item{max-width:100%}
#tutorial .good-items .guide-item{width:42px;height:42px}
#tutorial .bad-items .guide-item{width:30px;height:30px}
#tutorial .guide-items figcaption{font-size:11px;line-height:1.15;overflow-wrap:anywhere}
#tutorial .guide-xp{margin:0;padding:7px 10px;gap:8px}
#tutorial .guide-xp strong{font-size:14px}
#tutorial .guide-xp p{font-size:12px;line-height:1.25}
#tutorial .guide-bonuses{gap:8px}
#tutorial .guide-bonus{padding:6px 9px;min-width:0}
#tutorial .guide-bonus strong{min-height:26px;font-size:13px}
#tutorial .guide-bonus .guide-item,#tutorial .guide-bonus-icon{width:26px;height:26px;flex-basis:26px;font-size:23px}
#tutorial .guide-bonus p{font-size:12px;line-height:1.2}
#tutorial .guide-controls{font-size:12px;margin:0}
#tutorial .tutorial-actions{display:grid;grid-template-columns:1fr 2fr;gap:10px;align-items:stretch}
#tutorial #tutorialStart,#tutorial #tutorialBack{box-sizing:border-box;min-width:0;min-height:44px;width:100%;margin:0;padding:10px 12px;font-size:16px;line-height:1.2}
#tutorial #tutorialBack{grid-column:1;grid-row:1;border-radius:22px;background:#e2ebe0;color:#28595b;text-decoration:none}
#tutorial #tutorialStart{grid-column:2;grid-row:1}
@media(max-height:650px){
 #tutorial .tutorial-content{padding:12px;gap:7px}
 #tutorial h2{font-size:22px}
 #tutorial .points-key{display:none}
 #tutorial .good-items .guide-item{width:34px;height:34px}
 #tutorial .bad-items .guide-item{width:26px;height:26px}
 #tutorial .guide-group{padding-bottom:5px}
 #tutorial .guide-xp{padding:5px 8px}
}
@media(max-height:510px){
 #tutorial .tutorial-content{gap:5px;padding:10px}
 #tutorial .bad-items{grid-template-columns:repeat(8,minmax(0,1fr));gap:2px}
 #tutorial .bad-items figcaption{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #tutorial .guide-xp p br{display:none}
}

/* Quiet edge feedback, clear completion colour, no centre-screen celebration. */
.retention-moment{left:12px;right:auto;transform:none;top:218px;width:max-content;max-width:min(240px,calc(100% - 28px));padding:5px 9px;gap:6px;border-radius:10px;box-shadow:none;filter:none;text-align:left}
.retention-moment[data-kind=progress]{background:#fff9eadd;border:0;box-shadow:none}
.retention-moment strong,.retention-moment[data-kind=progress] strong{font:700 12px/1.25 Nunito,sans-serif;white-space:normal}
.retention-moment .moment-detail{font:600 11px/1.3 Nunito,sans-serif;margin:2px 0 0}
.retention-moment:not([data-kind=progress]){background:#e5eddfef;border:0;filter:none}
.retention-moment::before,.retention-moment::after{display:none!important}
.retention-moment .moment-icon,.retention-moment[data-kind=all] .moment-icon,.retention-moment[data-kind=level] .moment-icon,.retention-moment[data-kind=daily] .moment-icon{animation:none;width:20px;height:20px;font-size:17px;filter:none}
.retention-moment .moment-live{display:none}
@media(min-width:961px){.retention-moment{top:174px;left:24px}}
/* The result foregrounds score, replay, XP and completed achievements. */
#runProgress .run-progress-title{display:none}
#runProgress{margin-top:12px}
#runProgress li{padding:7px 0;gap:8px}
#runProgress .run-change-label{font-size:10px}
#runProgress .run-change-value{font-size:16px;line-height:1.25}
#runProgress .run-change-icon{font-size:21px;width:26px;min-width:26px}
#runProgress li[data-kind=level]{padding:10px 12px;border-radius:14px}
#runProgress .run-change-source{font-size:11px;margin-top:5px}
#runProgress .run-change-detail{font-size:12px}
#over .run-outfit-label,#over #overReason{display:none}

/* Unseen avatar discoveries: a quiet breadcrumb, never an in-run distraction. */
#homeIdentity,#historyOpen,#avatarEdit{position:relative}
.avatar-new-dot{position:absolute;top:5px;right:5px;width:10px;height:10px;border-radius:2px;transform:rotate(45deg);background:#c3a356;box-shadow:0 0 0 2px #fff9ea;pointer-events:none}
.avatar-new-dot[hidden]{display:none}
#avatarEdit .avatar-new-dot{top:-3px;right:-6px}
.avatar-new-badge{position:absolute;top:6px;left:6px;border-radius:10px;background:#efe7cf;color:#6e6444;font:700 10px/1 Nunito,sans-serif;padding:4px 7px;pointer-events:none}

/* Distinguish cumulative requirements from XP awarded at each milestone. */
.home-milestones .milestone-target-label,#lexyHistory .weekly-milestones .milestone-target-label{font-size:11px;font-weight:600;color:#52675e;margin-top:7px;line-height:1.25}
.home-milestones .milestone-reward,#lexyHistory .weekly-milestones .milestone-reward{background:#f2e4b9;border-radius:8px;padding:6px 2px;margin:7px 1px 0;color:#684b20}
.home-milestones .milestone-reward-label,#lexyHistory .weekly-milestones .milestone-reward-label{font-size:11px;line-height:1.2;font-weight:600}
.challenge-dialog .home-milestones .milestone-reward small,#lexyHistory .weekly-milestones .milestone-reward small{margin-top:3px;font-size:12px;font-weight:800;color:inherit}
.home-milestones [data-complete=true] .milestone-reward,#lexyHistory .weekly-milestones .reached .milestone-reward{background:var(--completed-surface);color:var(--completed-ink)}

/* Match each mission header to its dialog surface, including Sketch paper. */
.challenge-dialog{--mission-surface:#fff8e8;background-color:var(--mission-surface)}
html[data-visual-style="sketch"] .challenge-dialog{--mission-surface:#f5eddd;background-color:var(--mission-surface)}
.challenge-dialog>header{background:var(--mission-surface)}
.challenge-dialog h2{margin:0}

/* A few attainable next outfits, separate from selectable profile pictures. */
.avatar-unlocks{margin-top:20px;padding-top:14px;border-top:1px solid #28595b20}
#avatarPicker .avatar-unlocks h3{margin:0 0 9px;font:600 18px Fredoka,sans-serif}
.avatar-locked-previews{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.avatar-locked-previews figure{min-width:0;margin:0;text-align:center;background:#f1e8d1;border-radius:12px;padding:5px 4px 9px}
.avatar-locked-previews canvas{position:static;display:block;width:100%;height:auto;mix-blend-mode:darken;pointer-events:none}
.avatar-locked-previews strong{display:block;font-size:12px;line-height:1.2}
.avatar-locked-previews small{display:block;margin-top:5px;font-size:10px;line-height:1.3;color:#52675e}
#avatarPicker .avatar-play{display:block;width:100%;min-height:46px;margin-top:12px;border:0;border-radius:23px;background:#d96a49;color:#fff9ea;font:700 16px Nunito,sans-serif;box-shadow:0 3px 0 #ac4f38}
/* Movement uses the same icon gutter as every illustrated help row. */
#gameHelp .help-move{display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px;align-items:center}
#gameHelp .help-move>span{display:grid;place-items:center;width:64px;min-width:0;font-size:16px;letter-spacing:-1px}
#gameHelp .help-move>p{min-width:0;margin:0}
#gameHelp .help-picture-row{grid-template-columns:64px minmax(0,1fr)}

#gameHelp .help-move>div{min-width:0}
#gameHelp .help-move h3{margin:0 0 5px}
#gameHelp .help-move p{margin:0}

.avatar-name{margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid #28595b20}
.avatar-name label{display:block;font-size:14px;font-weight:800;margin-bottom:6px}
.avatar-name>div{display:flex;gap:8px}
.avatar-name input{box-sizing:border-box;min-width:0;width:100%;flex:1;border:1px solid #28595b44;border-radius:12px;padding:10px;font:16px Nunito,sans-serif;color:#28595b;background:#fffdf6}
.avatar-name button{border:0;border-radius:12px;background:#28595b;color:#fff9ea;padding:10px;font:700 13px Nunito,sans-serif;max-width:42%}
#avatarPicker .avatar-name p{font-size:12px;line-height:1.35;margin:7px 0 0}
#avatarPicker .avatar-name p:empty{display:none}
#leaderboardJoined{flex-wrap:wrap}#leaderboardEdit{background:transparent;color:#28595b;padding:6px;font-size:12px;text-decoration:underline}

/* Compact homepage identity: nickname, level, progress and XP. */
#homeIdentity .home-level{grid-template-columns:minmax(0,1fr) auto;gap:2px 6px;max-width:none}
#homeIdentity .profile-nickname{grid-column:1;grid-row:1;font-size:13px;font-weight:800;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#homeIdentity .shell-level{grid-column:2;grid-row:1;font-size:13px!important}
#homeIdentity .home-next{display:none}
#homeIdentity .home-level progress{grid-row:2}
#homeIdentity .home-xp{grid-row:3;font-size:10px}
#lexyHistory .profile-name-edit{grid-column:2;justify-self:start;max-width:100%;padding:0;margin:0 0 4px;border:0;background:transparent;color:#28595b;font:800 18px/1.25 Nunito,sans-serif;text-align:left;overflow-wrap:anywhere}
#lexyHistory .profile-name-edit:focus-visible{outline:2px solid #28595b;outline-offset:4px}
#lexyHistory .history-outfit{font-size:12px;font-weight:500;margin:0 0 6px}

/* Automatic nicknames are suggestions; confirmed names retain the bold identity style. */
#homeIdentity .profile-nickname[data-generated="true"],.profile-identity span[data-generated="true"]{font-weight:600;font-style:italic;color:#607977}
#lexyHistory .profile-name-edit[data-generated="true"]{font-weight:600;font-style:italic;color:#607977}
#lexyHistory .profile-name-edit[data-generated="true"]::after{content:'Auto';display:inline-block;vertical-align:middle;margin-left:7px;padding:3px 7px;border-radius:7px;background:#f4e7bd;color:#796333;font:800 10px/1 Nunito,sans-serif}
.nickname-origin{display:inline-block;margin-left:8px;color:#796333;font:700 11px/1.3 Nunito,sans-serif}
#avatarNickname[data-generated="true"],#playerName[data-generated="true"]{background:#fff7df;color:#607977;font-style:italic;font-weight:500}

.avatar-name button[data-state="saved"]{background:#deeddd;color:#28704b;opacity:1;box-shadow:none;cursor:default}

/* Live profile fits the existing 64px gameplay header. */
.profile-identity>div{flex:1;min-width:0}
.profile-identity .run-identity-line{display:flex;align-items:baseline;gap:6px;min-width:0}
.profile-identity .run-identity-line strong{font:800 14px/1.2 Nunito,sans-serif;flex-shrink:0}
.profile-identity .run-identity-line span{font-size:10px;margin:0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-identity .run-level-progress{display:block;appearance:none;width:100%;height:5px;margin:4px 0;border:0;border-radius:5px;overflow:hidden;background:#28595b22}
.run-level-progress::-webkit-progress-bar{background:#28595b22;border-radius:5px}.run-level-progress::-webkit-progress-value{background:#287b79;border-radius:5px;transition:width .2s ease-out}.run-level-progress::-moz-progress-bar{background:#287b79;border-radius:5px}
.profile-identity .run-xp{display:block;font:600 9px/1.2 Nunito,sans-serif;white-space:nowrap;color:#52736d}
@media(max-width:350px){body.playing #game>header{padding-inline:10px;gap:6px}.profile-identity canvas{width:32px;height:38px;flex-basis:32px}.profile-identity .run-identity-line span{display:none}.profile-identity .run-xp{font-size:8px}}
@media(prefers-reduced-motion:reduce){.run-level-progress::-webkit-progress-value{transition:none}}

/* Results: run → leaderboard → progression, with a stable action footer. */
#over .results-card{padding:20px 20px 0;border-radius:28px;text-align:left;max-width:460px;max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
#over .result-hero{position:static;inset:auto;display:flex;align-items:center;justify-content:flex-start;gap:14px;width:auto;height:auto;min-height:0;margin:0;padding:0;background:none;border:0;z-index:auto}
#over .result-hero>div{min-width:0}#over .result-hero .eyebrow{font:800 10px/1.3 Nunito,sans-serif;letter-spacing:.08em;color:#6b8177}#over .result-hero h2{font:500 29px/1.1 Fredoka,sans-serif;margin:4px 0}
#over #outfitPortrait{width:82px;height:76px;flex:0 0 82px;margin:0;mix-blend-mode:darken}#over #finalLook{font:700 13px/1.3 Nunito,sans-serif;margin:4px 0;color:#547570}
#over .results{display:grid;grid-template-columns:1.3fr 1fr;align-items:center;gap:16px;margin:16px 0 20px;padding:0;background:none}
#over .results small{font:800 10px/1.3 Nunito,sans-serif;letter-spacing:.045em;color:#627c74}#over .results .result-score strong{font:600 38px/1.1 Fredoka,sans-serif;display:block;margin-top:3px;color:#227a80}#over .results .result-best{border-left:1px solid #28595b25;padding-left:18px}#over .results .result-best strong{font:600 25px/1.2 Fredoka,sans-serif;display:block;margin-top:4px;color:#547570}
#over .result-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}#over .result-section-heading h3,#over .result-section-heading .run-progress-title{display:block;margin:0;font:800 15px/1.3 Nunito,sans-serif;color:#28595b}
#over .result-section-heading button{border:0;border-radius:9px;padding:7px 9px;min-height:34px;margin:0;font:800 11px/1.2 Nunito,sans-serif;background:#28595b0c;color:#286e69;white-space:nowrap;text-decoration:none}
#over .result-leaderboard{padding:14px;border-radius:17px;background:#e8efe6;border:1px solid #28595b14;margin:0 0 20px}
#over .score-form{margin:0;padding:0;border:0}#over #leaderboardJoinLabel{font:600 11px/1.3 Nunito,sans-serif;margin:0 0 5px;color:#57736b}#over .submit-row{gap:7px}#over #playerName{min-width:0;height:40px;padding:8px 10px;border:1px solid #28595b25;border-radius:10px;font:600 14px Nunito,sans-serif;background:#fffaf0}
#over #submitScore{height:40px;min-height:40px;padding:8px 12px;border:0;border-radius:10px;background:#28595b;color:#fff9ea;font:800 12px Nunito,sans-serif;white-space:nowrap}
#over #leaderboardJoined{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:10px}#over #leaderboardJoined[hidden],#over #leaderboardJoin[hidden],#over #leaderboardJoinLabel[hidden]{display:none}#over #leaderboardMember{font:700 13px Nunito,sans-serif;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#over .leaderboard-options{position:relative;flex-shrink:0}#over .leaderboard-options summary{font:600 11px Nunito,sans-serif;color:#617971;cursor:pointer;list-style:none;padding:6px}#over .leaderboard-options summary::-webkit-details-marker{display:none}#over .leaderboard-options[open]>div{position:absolute;right:0;top:100%;z-index:4;padding:6px;border-radius:12px;background:#fff9ea;box-shadow:0 5px 20px #28595b30;min-width:145px}
#over .leaderboard-options button{display:block;border:0;background:none;padding:10px;text-decoration:none;font:700 12px Nunito,sans-serif;text-align:left;width:100%;color:#28595b}
#over #submissionStatus{margin:6px 0 0;font:500 11px/1.4 Nunito,sans-serif;color:#57736b}#over #submissionStatus:empty{display:none}
#over .run-progress{margin:0 0 12px;padding:0;border:0}#over .run-progress ul{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}#over .run-progress li{gap:7px;padding:10px;background:#f1eddb;border-radius:12px;align-items:flex-start}#over .run-progress li[data-kind=level]{background:#e1eeE7;border-radius:13px;padding:12px}#over .run-progress li[data-kind=level] .run-change-icon{display:none}#over .run-progress .run-change-body{width:100%;min-width:0}#over .run-change-label{font:800 9px/1.3 Nunito,sans-serif;letter-spacing:.03em;color:#728077}#over .run-change-value{font:800 13px/1.3 Nunito,sans-serif}#over .run-progress li[data-kind=level] .run-change-value{font-size:18px}#over .run-change-source,#over .run-change-detail{font:500 11px/1.4 Nunito,sans-serif;margin-top:4px}#over .run-change-icon{font-size:17px;width:24px;flex:0 0 24px;height:24px}
#over .run-progress li[data-kind=complete]{background:#e2efdd}#over .run-progress li[data-kind=closet]{background:#f5eacb}
#over .result-actions{display:grid;grid-template-columns:1fr 2fr;gap:10px;position:sticky;bottom:0;padding:12px 0 16px;background:#fff9ea;margin-top:8px;border-top:1px solid #28595b16;z-index:5}
#over .result-actions #homeAfter{min-height:48px;border:1px solid #28595b22;border-radius:16px;background:#fff9ea;color:#28595b;font:800 14px Nunito,sans-serif;margin:0;padding:10px}
#over .result-actions #again{width:auto;margin:0;min-height:48px;padding:10px 16px;border-radius:16px;font:800 17px Nunito,sans-serif;box-shadow:0 4px 0 #ac4b35}#over #again span{margin-left:8px;font-size:16px}
@media(max-width:350px){#over .results-card{padding:16px 14px 0}#over .result-leaderboard{padding:11px}#over .result-section-heading{gap:6px}#over .run-progress ul{grid-template-columns:1fr}#over .results .result-score strong{font-size:33px}}

#over .score-form[data-state="saved"] #submissionStatus{color:#28704b;font-weight:800}

/* Two compact mission launchers; profile lives in the player bar. */
#intro .retention-home{grid-template-columns:repeat(2,minmax(0,1fr));min-height:64px;padding-block:8px}
#intro .retention-home .home-challenge-open{flex-direction:row;justify-content:center;text-align:left;gap:12px;min-height:48px;padding:4px 12px}
#intro .retention-home .home-challenge-open>span:nth-child(2){flex:0 1 auto;min-width:0}
#intro .retention-home .home-symbol{width:28px;font-size:26px}
#intro .retention-home strong{font-size:15px;line-height:1.2}
#intro .retention-home small{font-size:11px;line-height:1.3;margin-top:3px}
@media(max-width:350px){#intro .retention-home .home-challenge-open{gap:7px;padding-inline:6px}#intro .retention-home strong{font-size:13px}#intro .retention-home .home-symbol{width:22px;font-size:23px}}

#avatarPicker:not(.avatar-confirm) .avatar-options{display:block}
#avatarPicker:not(.avatar-confirm) .avatar-options button{display:flex;align-items:center;width:100%;gap:14px;text-align:left;border:0;background:#e7eee3;padding:10px 14px;pointer-events:none}
#avatarPicker:not(.avatar-confirm) .avatar-options canvas{width:72px;flex:none}
#avatarPicker .avatar-choose-closet{display:block;width:100%;min-height:46px;border:1px solid #28595b25;border-radius:14px;background:#e7eee3;color:#28595b;font:700 15px Nunito,sans-serif;margin:12px 0}

html,body,#game{touch-action:pan-x pan-y}
button,a{touch-action:manipulation}
#beach,.lane-controls,.lane-controls button{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#avatarPicker input{font-size:16px}

.avatar-new-dot{width:14px;height:14px;border-radius:0;transform:none;background:none;box-shadow:none;color:#ad914b;font:700 14px/1 Nunito,sans-serif}
.avatar-new-dot::after{content:'✦'}

/* Share the score/Zoomies panel geometry; keep notices within its left third. */
:root{--lexy-hud-width:360px;--lexy-hud-gutter:16px}
.hud-top{width:var(--lexy-hud-width);max-width:calc(100% - 2 * var(--lexy-hud-gutter))}
.retention-moment{box-sizing:border-box;left:max(var(--lexy-hud-gutter),calc((100vw - var(--lexy-hud-width)) / 2));width:calc(min(var(--lexy-hud-width),100vw - 2 * var(--lexy-hud-gutter)) / 3 - 8px);max-width:180px;min-width:0;height:28px;max-height:28px;padding:4px 5px;overflow:hidden;gap:0}
.retention-moment>div{min-width:0;width:100%;overflow:hidden}
.retention-moment strong,.retention-moment[data-kind=progress] strong{display:block;font:700 11px/20px Nunito,sans-serif;white-space:nowrap;text-overflow:clip;overflow:hidden}
.retention-moment .moment-icon,.retention-moment .moment-detail,.retention-moment small,.retention-moment .moment-live{display:none!important}


#intro .home-actions #start{box-sizing:border-box;overflow:hidden;text-overflow:ellipsis}

/* Anchor the notice to the portrait without changing the profile layout. */
#homeIdentity .home-avatar{position:relative;display:inline-flex;flex:none;align-items:center;justify-content:center}
#homeIdentity .home-avatar canvas{display:block}
#homeIdentity .home-avatar .avatar-new-dot{position:absolute;top:0;right:-2px;width:9px;height:9px;border-radius:50%;background:#d8a735;box-shadow:0 0 0 2px #fff9ea;transform:none;margin:0;pointer-events:none}
#homeIdentity .home-avatar .avatar-new-dot::after{content:none}
#homeIdentity .avatar-new-dot[hidden]{display:none}

/* One unseen-outfit indicator across the profile, Closet and avatar chooser. */
.avatar-new-badge,.avatar-new-dot{width:9px;height:9px;min-width:9px;padding:0;border:0;border-radius:50%;background:#d8a735;box-shadow:0 0 0 2px #fff9ea;transform:none;pointer-events:none}
.avatar-new-badge{position:absolute;top:8px;right:8px;left:auto}
.avatar-new-dot::after{content:none}

/* Reserve the real profile layout until name, state and portrait are ready together. */
#homeIdentity[data-profile-loading=true] .home-avatar,#homeIdentity[data-profile-loading=true] .home-level{visibility:hidden}
#homeIdentity[data-profile-loading=true]::after{content:'Loading profile…';position:absolute;inset:0;display:flex;align-items:center;padding:0 10px;color:#607977;font:600 12px Nunito,sans-serif;pointer-events:none}

/* Align message text as well as its container with the score panel content. */
:root{--lexy-hud-content-inset:20px}
@media(max-width:760px){:root{--lexy-hud-content-inset:14px}}
@media(max-width:370px){:root{--lexy-hud-content-inset:10px}}
.hud-top .stats{padding-inline:var(--lexy-hud-content-inset)}
.retention-moment{padding-left:calc(var(--lexy-hud-content-inset) + 1px)}
#adventureNote{left:max(var(--lexy-hud-gutter),calc((100% - var(--lexy-hud-width)) / 2));max-width:calc(min(var(--lexy-hud-width),100% - 2 * var(--lexy-hud-gutter)));padding-inline:calc(var(--lexy-hud-content-inset) + 1px);box-sizing:border-box}
.analytics-choice{display:flex;align-items:center;justify-content:center;gap:7px;font:600 12px/1.3 Nunito,sans-serif;color:#28595b;cursor:pointer}
#intro>.analytics-choice{flex:none;min-height:32px;margin:0 5% 5px;background:#fff9eae8;border-radius:12px}
.analytics-choice input{width:18px;height:18px;accent-color:#28595b;margin:0;flex:none}
.analytics-choice small{font-size:10px;font-weight:400}
.analytics-settings .analytics-choice{justify-content:flex-start;min-height:44px}

#v2Welcome{box-sizing:border-box;width:min(540px,calc(100% - 24px));max-height:calc(100dvh - 20px);margin:auto;padding:22px;border:1px solid #fff9;border-radius:28px;background:#fff9ea;color:#28595b;box-shadow:0 20px 70px #173e4933;font-family:Nunito,sans-serif;overflow-y:auto}
#v2Welcome .welcome-preview{position:static;inset:auto;pointer-events:none}.welcome-portraits .welcome-preview{mix-blend-mode:darken}
#v2Welcome::backdrop{background:#234c4e85;backdrop-filter:blur(5px)}
.welcome-heading{text-align:center}.welcome-heading h2{font:600 36px/1.1 Fredoka,sans-serif;margin:0 0 12px;color:#206c6d}
.welcome-updates{list-style:none;padding:0;margin:0 0 12px;display:grid;gap:0}
.welcome-updates>li{padding:9px 0;border-bottom:1px solid #28595b20;min-width:0}
.welcome-updates>li:last-child{border-bottom:0;padding-bottom:0}
.welcome-updates h3{display:flex;align-items:center;gap:9px;margin:0;font:800 15px/1.25 Nunito,sans-serif;color:#28595b;text-align:left;word-break:normal;overflow-wrap:normal}
.welcome-number{display:inline-flex;align-items:center;justify-content:center;flex:0 0 23px;height:23px;border-radius:8px;background:#28595b;color:#fff;font:800 12px/1 Nunito,sans-serif}
.welcome-wardrobe{background:radial-gradient(ellipse at 50% 75%,#f4e6b7 0%,#fff9ea00 72%)}
.welcome-portraits{display:flex;justify-content:center;align-items:end;height:clamp(70px,14dvh,115px);margin-top:3px}
.welcome-portraits .welcome-preview{width:30%;height:100%;object-fit:contain;min-width:0}
.welcome-portraits .welcome-preview:nth-child(3),.welcome-portraits .welcome-preview:nth-child(4){transform:scale(1.06);transform-origin:bottom}
.welcome-routes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:7px 0 0}
.welcome-routes>div{position:relative;overflow:hidden;border-radius:11px;background:#234c4e;height:clamp(58px,10dvh,85px);isolation:isolate}
.welcome-routes .welcome-preview{width:100%;height:100%;object-fit:cover;display:block}
.welcome-routes>div:after{content:'';position:absolute;inset:25% 0 0;background:linear-gradient(transparent,#173d49e8);z-index:0}
.welcome-routes strong{position:absolute;left:0;right:0;bottom:7px;padding:0 3px;text-align:center;color:#fff;font:800 12px/1.2 Nunito,sans-serif;z-index:1;text-shadow:0 1px 2px #173d49;white-space:nowrap}
.welcome-feature-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:41px;box-sizing:border-box}
.welcome-feature-row h3{flex:1;min-width:0}
.welcome-feature-art{width:58px;height:37px;flex:none;border-radius:9px;overflow:hidden}
.welcome-feature-art .welcome-preview{width:100%;height:100%;object-fit:cover}
.welcome-feature-row>.welcome-preview{width:48px;height:33px;object-fit:contain;flex:none}
.welcome-level-art{width:48px;flex:none;display:flex;align-items:center;gap:4px;font-size:18px;color:#298080}
.welcome-example-meter{display:block;flex:1;height:6px;border-radius:9px;background:#dce7de;overflow:hidden}.welcome-example-meter i{display:block;height:100%;width:72%;background:#298080}
.welcome-choices{border-top:1px solid #28595b20;padding-top:13px;display:grid;gap:12px}.welcome-choices label,.welcome-terms{display:flex;gap:10px;align-items:flex-start;font-size:13px;line-height:1.35}.welcome-choices input{width:20px;height:20px;flex:0 0 20px;margin:0;accent-color:#28595b}.welcome-choices small{display:block;font-size:11px;color:#617775;margin-top:3px}.welcome-choices button{display:inline;border:0;border-radius:0;padding:0;background:transparent;color:#28595b;font:inherit;text-decoration:underline;text-underline-offset:3px}
#welcomeContinue{display:block;width:100%;min-height:48px;margin-top:16px;border:0;border-radius:16px;background:#d96948;color:#fff9ea;font:800 17px Nunito,sans-serif;box-shadow:0 4px 0 #ad4b36}#welcomeContinue:disabled{background:#d8dfd6;color:#6b8077;box-shadow:none;cursor:default}
@media(max-height:760px){
 #v2Welcome{padding:14px}.welcome-heading h2{font-size:29px;margin-bottom:4px}
 .welcome-updates{margin-bottom:8px}.welcome-updates>li{padding-block:6px}.welcome-updates h3{font-size:13px;gap:7px}
 .welcome-number{flex-basis:21px;height:21px;font-size:11px}.welcome-portraits{height:70px}
 .welcome-routes{margin-top:5px}.welcome-routes>div{height:58px}
 .welcome-feature-art{width:49px;height:31px}.welcome-feature-row>.welcome-preview{height:27px}.welcome-feature-row{min-height:35px}
 .welcome-choices{padding-top:9px;gap:8px}.welcome-choices label,.welcome-terms{font-size:12px}.welcome-choices small{font-size:10px;margin-top:2px}
 #welcomeContinue{margin-top:10px;min-height:42px}
}
@media(max-width:350px){#v2Welcome{width:calc(100% - 14px);padding:12px}.welcome-updates h3{font-size:12px}.welcome-routes strong{font-size:11px}.welcome-choices label,.welcome-terms{font-size:12px}.welcome-choices small{font-size:10px}}

/* Milestone typography must not inherit the outer tile's padding or word breaks. */
.challenge-dialog .home-milestones>span,#lexyHistory .weekly-milestones li{overflow-wrap:normal;word-break:normal;hyphens:none;min-width:0}
.challenge-dialog .home-milestones .milestone-reward-label,#lexyHistory .weekly-milestones .milestone-reward-label{font-size:11px;line-height:1.2;white-space:nowrap}
.challenge-dialog .home-milestones .milestone-reward small,#lexyHistory .weekly-milestones .milestone-reward small{white-space:nowrap}
.challenge-dialog .home-milestones .milestone-reward{display:block;border:0;padding:6px 2px}
.challenge-dialog h2,.challenge-dialog .shell-weekly{overflow-wrap:normal;word-break:normal;hyphens:none}
@media(max-width:360px){
 .challenge-dialog{padding-inline:14px}
 .challenge-dialog .home-milestones{gap:4px}
 .challenge-dialog .home-milestones>span{padding-inline:0}
}
@media(max-height:500px) and (orientation:landscape){
 #intro .home-hero{padding-block:6px;min-height:100px}
 #intro .home-hero h1{font-size:28px;margin-bottom:3px}
 #intro .home-hero .tagline{font-size:11px;margin-bottom:5px}
 #intro .retention-home{min-height:54px;padding-block:2px}
 #intro .retention-home .home-challenge-open{min-height:48px}
 #intro .home-actions{margin-block:5px}
}

@media(max-height:649px) and (max-width:760px){html:not([data-visual-style="sketch"]) #intro .home-hero{background-position:center 60%}}

/* Mission rewards stay legible and milestone rows retain identical baselines. */
#over .run-change-reward{display:block;margin-top:5px;font:800 15px/1.3 Nunito,sans-serif;color:#345b35}
.challenge-dialog .home-milestones>span{display:flex;flex-direction:column;align-items:center;border-top:0;padding:10px 3px}
.challenge-dialog .home-milestones>span::before{content:'·';display:grid;place-items:center;width:25px;height:25px;margin:0 auto 5px;border-radius:50%;color:#8c927b;font-size:17px;line-height:1}
.challenge-dialog .home-milestones .milestone-reward{margin-top:auto}
.home-milestones [data-retained=true] .milestone-quantity,#lexyHistory [data-retained=true] .weekly-milestone-target{visibility:hidden}
.weekly-adjusted{font:600 12px/1.4 Nunito,sans-serif;color:#68786b;margin:8px 0}
#challenge-today .home-missions{gap:8px}
#challenge-today .shell-objective{padding-block:12px}
#challenge-today .shell-objective b{font-size:19px}

#challenge-week .weekly-art{width:76px;height:76px;margin-block:8px}
#challenge-week .weekly-adjusted{font-size:11px;line-height:1.35}
#challenge-week .shell-weekly{font-size:24px;line-height:1.2}

body.playing #callout:not(:empty){color:#fff;font-weight:600;-webkit-text-stroke:3px #172d32;paint-order:stroke fill;text-shadow:0 2px 3px #0008}
body.playing #callout[data-tone=unlock]{color:#ffda62}

html:not([data-visual-style="sketch"]) #v2Welcome .welcome-preview-sketch,html[data-visual-style="sketch"] #v2Welcome .welcome-preview-original{display:none}

/* Five daily goals and two weekly cards share the available dialog height. */
#challenge-today .home-missions{display:grid;gap:6px;margin:8px 0;padding:0}
#challenge-today .shell-objective,#challenge-today .shell-objective[data-complete=true]{grid-template-columns:40px minmax(0,1fr) 24px;gap:3px 10px;padding:8px 10px;min-height:0}
#challenge-today .shell-objective .mission-art{width:38px;height:38px;grid-row:1 / 4}
#challenge-today .shell-objective>div{grid-column:2;min-width:0}
#challenge-today .shell-objective small{font-size:10px;margin:0 0 2px;padding:2px 6px}
#challenge-today .shell-objective b{font-size:15px;line-height:1.15;overflow-wrap:normal;word-break:normal}
#challenge-today .shell-objective .mission-progress{grid-column:2;height:5px;margin:0}
#challenge-today .shell-objective .mission-count{grid-column:2;font-size:11px;margin:0}
#challenge-today .mission-mark{grid-column:3;grid-row:1 / 4;align-self:center}
#challenge-today .challenge-reward{font-size:12px;line-height:1.3;margin:8px 0}
#challenge-week .home-week-detail{display:grid;grid-template-columns:48px minmax(0,1fr);gap:4px 10px;padding:10px!important;border:1px solid #28595b20;border-radius:16px;margin:8px 0}
#challenge-week .home-week-detail .weekly-art{width:48px;height:48px;grid-column:1;grid-row:1 / 3;margin:0}
#challenge-week .shell-weekly{grid-column:2;font-size:17px;line-height:1.2;margin:0}
#challenge-week .weekly-count{grid-column:2;font-size:20px;line-height:1.15;margin:0}
#challenge-week .weekly-progress,#challenge-week .weekly-next,#challenge-week .home-milestones{grid-column:1 / -1}
#challenge-week .weekly-progress{height:7px;margin:3px 0}
#challenge-week .weekly-next{font-size:11px;line-height:1.2;margin:0}
#challenge-week .home-milestones{margin:3px 0 0;gap:4px}
#challenge-week .home-milestones>span{padding:5px 2px!important;font-size:11px;border-radius:8px}
#challenge-week .home-milestones b{font-size:12px}
#challenge-week .home-milestones .milestone-target-label,#challenge-week .home-milestones .milestone-reward-label{font-size:9px;margin:2px 0}
#challenge-week .milestone-quantity{margin:0;gap:3px}
#challenge-week .milestone-icon{width:17px;height:17px}
#challenge-week .home-milestones em,#challenge-week .home-milestones small{font-size:11px}
#challenge-week .milestone-reward{padding:3px 1px;margin-top:3px}
#challenge-week .home-week-detail[data-complete=true]::after{width:18px;height:18px;font-size:12px;right:7px;top:7px}
@media(max-height:650px){.challenge-dialog{padding:14px!important}.challenge-dialog h2{font-size:26px!important}.challenge-dialog header{margin-bottom:5px}.challenge-reset{font-size:11px;margin:4px 0}.challenge-dialog .challenge-done{min-height:40px;margin-top:6px}#challenge-today .shell-objective,#challenge-today .shell-objective[data-complete=true]{padding-block:6px}#challenge-week .home-week-detail{padding:7px!important}}
.challenge-dialog header{padding:8px 0;margin:0 0 4px}
.challenge-dialog .challenge-reward:empty{display:none}
#challenge-today .home-missions{gap:3px;margin:4px 0}
#challenge-today .shell-objective b{margin:0;line-height:1.15}
#challenge-today .shell-objective .mission-count{line-height:14px}
#challenge-week .home-milestones>span::before{display:none}
#challenge-week .home-milestones>span[data-complete=true] b::before{content:'✓ ';color:#427447}
@media(max-height:600px){
 #challenge-today .shell-objective,#challenge-today .shell-objective[data-complete=true]{padding-block:4px}
 #challenge-today .shell-objective b{font-size:14px}
 #challenge-week .home-week-detail{gap:2px 7px;margin:5px 0}
 #challenge-week .home-milestones>span{display:grid;grid-template-columns:1fr;gap:1px;padding:3px 1px!important}
 #challenge-week .home-milestones .milestone-target-label,#challenge-week .home-milestones .milestone-reward-label{margin:0;line-height:11px}
 #challenge-week .home-milestones .milestone-reward{margin:0;padding:1px}
 #challenge-week .shell-weekly{font-size:15px}
 #challenge-week .weekly-count{font-size:18px}
}

#challenge-today .shell-objective small,#lexyHistory .daily-card>strong{background:transparent;color:#58776e;padding:0;border-radius:0}
#challenge-today .shell-objective[data-complete=true] small,#lexyHistory .daily-card.complete>strong{background:transparent;color:#427447}
@media(max-height:600px){
 .challenge-dialog header{padding-block:3px}
 #challenge-today .shell-objective small{line-height:12px}
 #challenge-today .shell-objective b{line-height:16px}
 #challenge-today .challenge-reward{margin-block:5px}
 #challenge-week .home-milestones>span{line-height:13px}
}

/* Approved clean Original / warm Sketch design. */

html:not([data-visual-style="sketch"]) #intro{background:#f5f9f9}
html:not([data-visual-style="sketch"]) #intro #homePlayerBar{background:linear-gradient(130deg,#ffffffed,#e7f5f4c9);border:1px solid #ffffffb8;border-radius:22px;box-shadow:0 5px 24px #184e5815;backdrop-filter:blur(16px);margin:8px 10px!important;padding:9px 12px!important;width:calc(100% - 20px)!important}
html:not([data-visual-style="sketch"]) #intro .retention-home{background:#ffffffed;border:0;box-shadow:0 -3px 18px #204e5010}
html:not([data-visual-style="sketch"]) #homeUtilities>*{background:#ffffffdd!important;border:1px solid #ffffffbb!important;box-shadow:0 2px 7px #123b4310;border-radius:16px}
html:not([data-visual-style="sketch"]) #intro #leaderboardOpen{background:#ffffff;border:1px solid #e0e9e8;box-shadow:0 3px 8px #173f4910}
#intro #start{background:#d96948!important;color:#fff!important;border:0!important;box-shadow:0 4px 0 #b94e36!important;border-radius:23px!important}
html[data-visual-style="sketch"] #intro #homePlayerBar{background:#fff5df;border:1px solid #bcb09a;border-radius:20px;margin:8px 10px!important;padding:9px 12px!important;width:calc(100% - 20px)!important;box-shadow:2px 3px 0 #bdb7a330}
html[data-visual-style="sketch"] #homeUtilities>*{background:#fff9ec;border:1px solid #c1b6a0;box-shadow:1px 2px 0 #b4ac9733}
#intro #homePlayerBar #homeIdentity{border:0;box-shadow:none;background:transparent}

html:not([data-visual-style="sketch"]) :is(#lexyHistory,.challenge-dialog,#gameHelp,#v2Welcome,#avatarPicker,#tutorial,#over .results-card){background:#fff;color:#28595b}
html:not([data-visual-style="sketch"]) :is(#lexyHistory,.challenge-dialog,#gameHelp) header{background:#fff}
html:not([data-visual-style="sketch"]) :is(.history-level,.history-stat,.run-change-body){border-color:#dce8e7}
html:not([data-visual-style="sketch"]) #v2Welcome .welcome-wardrobe{background:radial-gradient(ellipse at 50% 55%,#e5f3f1,transparent 72%)}
html:not([data-visual-style="sketch"]) #homeUtilities>*{background:#ffffffdd!important;border:1px solid #ffffffbb!important}
:is(#intro #start,#over #again,#welcomeContinue){background:#d96948!important;border:0!important;border-radius:23px;color:#fff!important;box-shadow:0 4px 0 #b94e36!important}
html[data-visual-style="sketch"] :is(#intro #start,#over #again,#welcomeContinue){outline:none;box-shadow:0 4px 0 #b94e36!important;border:0!important}

html #v2Welcome #welcomeContinue:disabled{background:#a9b6b2!important;box-shadow:none!important;color:#f6f9f7!important;cursor:not-allowed}


.home-avatar .profile-preview-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
#homeIdentity[data-profile-preview=true] .home-avatar canvas{visibility:hidden}

#gameHelp .analytics-settings{margin:4px 0 18px;padding:14px;border:1px solid #28595b25;border-radius:16px;background:#e8f3f1}
#gameHelp .analytics-settings h3{margin:0 0 4px;font-size:17px}
#gameHelp .analytics-settings .analytics-choice{justify-content:flex-start;font-size:15px;font-weight:800;gap:10px}
#gameHelp .analytics-settings p{margin:5px 0 0;font-size:12px;line-height:1.45;color:#4d6865}
html[data-visual-style="sketch"] #gameHelp .analytics-settings{background:#f2ead6;border-color:#baa47b70}

#lexyHistory .stat-icon canvas{position:static;width:25px;height:25px;pointer-events:none}
canvas.inline-treat-icon{position:static;display:inline-block;width:1.35em;height:1.35em;vertical-align:middle;pointer-events:none}

.retention-moment canvas.inline-treat-icon{width:18px;height:18px;vertical-align:-4px;filter:none;opacity:1;margin-inline:1px}

/* Shared menu palette. All dialogs, including dynamically created menus, inherit
   the active skin instead of retaining a hard-coded cream background. */
:root{--menu-surface:#fff;--menu-soft:#f1f6f5;--menu-field:#f7faf9;--menu-edge:#dce8e7}
html[data-visual-style="sketch"]{--menu-surface:#fff9ea;--menu-soft:#f1e8d1;--menu-field:#fffdf6;--menu-edge:#c9bda5}
html body dialog,html body :is(#paused,#over)>.card{background:var(--menu-surface)!important;color:#28595b}
html body dialog>header,html body #testTools .test-tools-heading,html body #over .result-actions,html body #over .leaderboard-options[open]>div{background:var(--menu-surface)!important}
html body :is(#homeAfter,#leaderboardClose,.closet-details-back){background:var(--menu-surface);border-color:var(--menu-edge)}
html body :is(.avatar-name input,#over #playerName,#avatarNickname[data-generated="true"],#playerName[data-generated="true"]){background:var(--menu-field)}
html body :is(.history-closet li,.avatar-locked-previews figure){background:var(--menu-soft)}
html body #over .run-progress li:not([data-kind="level"]):not([data-kind="complete"]){background:var(--menu-soft)}
html body #over #homeAfter{background:var(--menu-surface)}
html body #rotate-screen::backdrop{background:var(--menu-surface)}
html body #lexyHistory progress,html body #lexyHistory progress::-webkit-progress-bar,html body #over .run-progress progress::-webkit-progress-bar{background:var(--menu-surface)}
html:not([data-visual-style="sketch"]) :is(#leaderboardList .rank,.level-reward-summary button){background:var(--menu-surface)}
html:not([data-visual-style="sketch"]) .history-closet .locked{background:#eef2f1}

#tutorial .guide-look{font:600 11px/1.25 Nunito,sans-serif;margin:3px 0 7px;color:#58756f;text-align:center}
/* Clothing-only unlock flies along the edge; never receives gameplay touches. */
.outfit-flight{position:fixed;inset:0 auto auto 0;width:80px;height:98px;z-index:25;pointer-events:none;transform-origin:40px 40px;will-change:transform,opacity}
.outfit-flight[hidden]{display:none}
.run-progress li[data-kind=loading]{grid-column:1/-1;min-height:96px;display:flex;align-items:center;justify-content:center;background:transparent}
.summary-spinner{width:26px;height:26px;border:3px solid rgba(40,116,119,.16);border-top-color:#287477;border-radius:50%;animation:summary-loading .8s linear infinite}
@keyframes summary-loading{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.summary-spinner{animation:none;border-style:dotted}}
/* Reserve loading and hydrated content identically: never resize the hero. */
#intro #homePlayerBar{height:66px;min-height:66px;box-sizing:border-box}
#intro #homeIdentity{height:52px;min-height:52px;box-sizing:border-box;overflow:hidden}
#homeIdentity .home-xp{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#intro #homePowers{height:42px;min-height:42px;box-sizing:border-box;overflow:hidden}
#intro #homePowers button{min-width:0;overflow:hidden;text-overflow:ellipsis}

/* The snapshot is the same canvas bitmap: use the identical pixel box and
   fitting mode, rather than fitting one into a different aspect ratio. */
#homeIdentity .home-avatar canvas{object-fit:contain}
#homeIdentity .home-avatar .profile-preview-image{object-fit:contain}
#retentionHome :is(.daily-summary,.weekly-summary):empty{display:block;min-height:1.2em}
#retentionHome :is(.daily-summary,.weekly-summary):empty::after{content:"";display:block;width:72px;height:5px;margin-top:7px;border-radius:5px;background:linear-gradient(90deg,#267b7d33,#267b7d88,#267b7d33);background-size:200% 100%;animation:home-load 1.2s linear infinite}
@keyframes home-load{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){#retentionHome :is(.daily-summary,.weekly-summary):empty::after{animation:none}}

#intro #homePowers{height:90px;min-height:90px;display:flex;flex-direction:column;gap:3px;padding:5px 5%;align-items:stretch}
#homePowers .power-home-heading{display:flex;justify-content:space-between;min-height:22px}
#homePowers .power-home-heading button{padding:2px 0;font-size:11px;text-align:left}
#homePowers .power-inventory{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
#homePowers .power-inventory button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:1px solid #28595b22;border-radius:12px;background:var(--menu-soft,#edf4f1);height:49px;padding:3px;font-size:17px}
#homePowers .power-inventory small{font-size:10px}
#homePowers .power-inventory button[aria-pressed=true]{background:#d9eeea;border:2px solid #267b7d;box-shadow:inset 0 -3px #267b7d}
#homePowers .power-inventory button:disabled{opacity:.5}
#over .run-progress li[data-level-up=true]{background:linear-gradient(120deg,#ffedb4,#fff6d9 50%,#d7eee8);border:1px solid #d5a746;padding:18px;box-shadow:0 4px 18px #b1852520;position:relative}
#over .run-progress li[data-level-up=true] .run-change-label{color:#8b5a0d;font-size:13px;letter-spacing:.1em}
#over .run-progress li[data-level-up=true] .run-change-value{font-size:28px;color:#235f61}
#over .run-progress li[data-level-up=true] .run-change-icon{display:block;color:#c99224;font-size:30px;width:32px;flex-basis:32px}
#over .level-reward-summary{background:transparent;padding:0;margin:14px 0;list-style:none}
#over .reward-group{padding:14px 0;border-top:1px solid #28595b22}
#over .reward-group h3{font-size:19px;margin:0 0 6px}
#over .reward-group p{font-size:12px;line-height:1.4;margin:0;color:#607676}
#over .reward-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 0}
#over .reward-item{flex-direction:column;gap:6px;text-align:center;padding:12px 7px;min-width:0;background:var(--menu-soft,#edf4f1)}
#over .reward-item strong{font-size:13px;overflow-wrap:normal}
#over .reward-item small{font-size:11px}
#over .reward-item>span{font-size:34px}
#over .result-power-choice{border:1px solid #28595b33;background:transparent;color:#28595b;border-radius:14px;padding:10px 14px;font:700 13px Nunito,sans-serif;margin:6px 0 12px}
#retentionMoment[data-kind=level]{border-color:#e0b454;background:#fff4cd;color:#28595b}

#over .run-progress li[data-level-up=true]{animation:level-celebrate .65s ease-out both}
@keyframes level-celebrate{from{transform:scale(.96);box-shadow:0 0 0 7px #e8c35b66}to{transform:scale(1);box-shadow:0 4px 18px #b1852520}}
@media(prefers-reduced-motion:reduce){#over .run-progress li[data-level-up=true]{animation:none}}
#over .results-card{scroll-padding-bottom:90px}
#over .reward-item{scroll-margin-bottom:90px}
/* Frame the photograph around Lexy's face rather than the bottom edge.
   Keep enough height for the complete head even with the power-up inventory. */
@media(max-width:760px){
 html:not([data-visual-style="sketch"]) #intro .home-hero{background-position:center 48%;min-height:max(180px,38vw)}
}

#lexyHistory #homePowers{display:flex;flex-direction:column;align-items:stretch;padding:16px 0;margin:16px 0;border-top:1px solid #28595b22;gap:8px}
#lexyHistory .power-inventory{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
#lexyHistory .power-home-heading{display:flex;justify-content:space-between;gap:6px}
#lexyHistory .power-home-heading button{white-space:normal;text-align:left;padding:2px;font-size:12px}
#lexyHistory .power-inventory button{display:flex;flex-direction:column;align-items:center;gap:5px;border:1px solid #28595b22;background:var(--menu-soft,#edf4f1);border-radius:12px;padding:10px 3px;font-size:21px}
#lexyHistory .power-inventory small{font-size:11px}
#lexyHistory .power-inventory [aria-pressed=true]{border:2px solid #267b7d;background:#d9eeea}
#lexyHistory .power-inventory button:disabled{opacity:.5}
#runPowers #powerStartRun{margin-top:10px;background:#df6b4d;color:white;min-height:48px;font-size:15px}
#runPowers .power-setup-status:empty{display:none}
#runPowers .power-setup-status{color:#ad4535}
#runPowers>button[aria-pressed=true]{background:#d9eeea;color:#28595b}
@media(max-height:700px){
 #runPowers{max-height:calc(100dvh - 24px);padding:16px}
 #runPowers>p{margin-top:10px;font-size:12px}
 #runPowers .power-cards{margin:12px 0;gap:8px}
 #runPowers .power-cards button{padding:9px 7px;gap:5px}
 #runPowers .power-cards button>span{font-size:26px}
 #runPowers .power-cards strong{font-size:13px}
 #runPowers .power-cards small{font-size:11px;line-height:1.3}
 #runPowers>button{padding:11px}
}

#runPowers>header,#runPowers>header button{pointer-events:auto}
#runPowers>header h2{font-size:22px;white-space:nowrap}
/* Fit the full subject (head through paws), cropping only spare sky.
   Size by the available height so shorter phones never crop her legs. */
html:not([data-visual-style="sketch"]) #intro .home-hero{
 background-size:auto min(155%,177.7778vw);background-position:center bottom;background-color:#eaf4f2;
}

@media(max-width:760px){html[data-visual-style="sketch"] #intro .home-hero{background-size:auto min(155%,177.6833vw);background-position:center bottom;background-color:#f1e8d7}}
@media(min-width:761px){html[data-visual-style="sketch"] #intro .home-hero{background-size:contain;background-position:center bottom}}
/* Inventory explains stored powers; the pre-run chooser alone equips them. */
#lexyHistory .power-home-heading h3{margin:0;font-size:18px}
#lexyHistory .power-inventory button{display:grid;grid-template-columns:1fr;justify-items:center;align-content:center;text-align:center;gap:4px;min-height:104px}
#lexyHistory .inventory-power-icon{display:grid;place-items:center;width:36px;height:36px;font-size:29px;line-height:1}
#lexyHistory .power-inventory strong{font-size:15px;line-height:1.2}
#lexyHistory .power-inventory button[aria-expanded="true"]{border-color:var(--teal,#287676);background:var(--menu-soft,#e6f0ed)}
.power-inventory-tip{margin:0;padding:12px;border-radius:12px;background:var(--menu-soft,#e6f0ed);font-size:14px;line-height:1.4}
.power-inventory-tip strong,.power-inventory-tip span{display:block}
#powerStartRun{display:flex;align-items:center;justify-content:center;gap:12px}
#powerStartRun[hidden]{display:none}
#runPowers .power-cards button[aria-pressed="true"]{border:3px solid #287676;box-shadow:0 0 0 2px #fff inset;background:#dceee8}
#runPowers[aria-busy="true"] #powerStartRun{opacity:.7}
#runPowers[aria-busy="true"] .power-setup-status::before{content:'';display:inline-block;width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;margin-right:8px;animation:power-start-spin .7s linear infinite}
@keyframes power-start-spin{to{transform:rotate(360deg)}}
#lexyHistory .power-inventory button{color:#28595c}
#open-today,#open-week,.shell-objective,.home-week-detail{position:relative}
.mission-new-dot{position:absolute;top:9px;right:9px;width:9px;height:9px;border-radius:50%;background:#d8a735;box-shadow:0 0 0 2px var(--menu-bg,#fff);pointer-events:none;z-index:2}
.mission-new-dot[hidden]{display:none}
.mission-arrival{position:fixed;z-index:2000;pointer-events:none;color:#c88f23;font-size:32px;text-shadow:0 2px 6px #fff}
#retentionMoment[data-complete="true"]{background:#fff0b8;border:2px solid #d8a735;box-shadow:0 3px 12px #805b2630;color:#3c532f}
#retentionMoment[data-complete="true"] strong{font-weight:900;color:#365331}
#retentionMoment[data-complete="true"] .moment-icon{background:#d8a735;color:#fff}

/* One focus treatment across themes: no tap rings, a warm keyboard marker. */
html :is(button,a,summary,[role="button"]):focus{outline:none!important}
html[data-input-mode="keyboard"] :is(button,a,summary,[role="button"]):focus-visible{outline:2px dashed #6b5144!important;outline-offset:4px}
/* A collected reward chooser, with a useful first-player empty state. */
#runPowers>header{gap:12px;align-items:flex-start}
#runPowers>header h2{white-space:normal;font-size:clamp(21px,5.5vw,26px);line-height:1.12;text-wrap:balance;max-width:290px}
#runPowers>header button{border-radius:50%;background:var(--menu-soft,#edf4f1);font-size:22px;width:36px;height:36px}
#runPowers .power-cards button{position:relative;border:2px solid transparent;padding:14px 9px 12px;gap:7px;background:linear-gradient(145deg,#f4f8f6,#e7f0ed);box-shadow:0 2px 5px #284d4d09}
#runPowers .power-cards button>.power-card-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;font-size:32px;background:#fff9;margin-bottom:2px}
#runPowers .power-cards button>.power-stock{position:absolute;right:9px;top:9px;font-size:12px;font-weight:800;color:#356568;background:#fff9;padding:3px 6px;border-radius:10px}
#runPowers .power-cards button>.power-selected-check{display:none;position:absolute;left:8px;top:8px;background:#a96b18;color:white;border-radius:50%;width:19px;height:19px;font-size:12px;line-height:19px}
#runPowers .power-cards button[aria-pressed=true]{border:2px solid transparent;background:#fff0c4;box-shadow:inset 0 0 0 2px #d5a448}
#runPowers .power-cards button[aria-pressed=true]>.power-selected-check{display:block}
#runPowers .power-cards button:disabled{opacity:.45;box-shadow:none}
.power-empty{text-align:center;margin:22px 0;padding:26px 14px;border-radius:20px;background:var(--menu-soft,#edf4f1)}
.power-empty>div{font-size:29px;letter-spacing:4px;line-height:1.6}
.power-empty h3{font-size:21px;margin:14px 0 8px}
#runPowers .power-empty p{max-width:260px;margin:0 auto;font-size:14px;line-height:1.5}
html[data-visual-style=sketch] #runPowers .power-cards button{background:linear-gradient(145deg,#fcf4de,#f1e8d1)}
html[data-visual-style=sketch] #runPowers .power-cards button[aria-pressed=true]{background:#ffe9af}
@media(max-height:700px){#runPowers .power-cards button{padding:9px 7px;gap:5px}#runPowers .power-cards button>.power-card-icon{width:37px;height:37px;font-size:27px}#runPowers .power-cards button>.power-stock{top:6px;right:6px;font-size:11px}}

/* Mission completion: compact, borderless and distinct from quiet counters. */
#retentionMoment[data-complete="true"]{border:0;background:linear-gradient(115deg,#287e78,#195c62);color:#fff;box-shadow:0 4px 14px #205b6033;height:32px;max-height:32px;animation:mission-complete-pulse .75s ease-in-out 2}
#retentionMoment[data-complete="true"] strong{color:#fff;font-weight:900;line-height:24px;text-shadow:none}
#retentionMoment[data-complete="true"]::after{content:''!important;display:block!important;position:absolute;inset:-30% -50%;background:linear-gradient(105deg,transparent 40%,#ffffff60 50%,transparent 60%);pointer-events:none;transform:translateX(-100%);animation:mission-complete-sheen .9s ease-out 2}
@keyframes mission-complete-pulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.25)}}
@keyframes mission-complete-sheen{to{transform:translateX(100%)}}
@media(prefers-reduced-motion:reduce){#retentionMoment[data-complete="true"],#retentionMoment[data-complete="true"]::after{animation:none}}

/* Never truncate a mission beat, even with large progress totals. */
#retentionMoment,#retentionMoment[data-complete="true"]{height:auto;min-height:28px;max-height:none}
#retentionMoment[data-complete="true"]{min-height:32px}
#retentionMoment>div{overflow:visible}
#retentionMoment strong{overflow:visible;text-overflow:unset;white-space:nowrap}
#retentionMoment[data-wrapped="true"]{padding-top:6px;padding-bottom:6px}
#retentionMoment[data-wrapped="true"] strong{white-space:normal;word-break:normal;overflow-wrap:normal;line-height:1.35}

/* Four full hearts share the same HUD space when Spare Heart is equipped. */
#hearts[data-bonus="true"]{font-size:19px;letter-spacing:0}
#hearts .bonus-heart{color:inherit;-webkit-text-stroke:0;text-shadow:none;font-size:inherit}
@media(max-width:370px){#hearts[data-bonus="true"]{font-size:16px}}
/* Owned quantities belong to the icon, separate from names and descriptions. */
#runPowers .power-card-icon,#lexyHistory .inventory-power-icon{position:relative;overflow:visible}
#runPowers .power-quantity,#lexyHistory .power-quantity{position:absolute;top:-5px;right:-9px;display:grid;place-items:center;min-width:24px;height:24px;padding:0 5px;border-radius:12px;background:#285f61;color:#fff;font:800 13px/1 Nunito,sans-serif;letter-spacing:0;box-shadow:0 0 0 2px var(--menu-bg,#fff);text-shadow:none}
#runPowers .power-quantity[data-empty=true],#lexyHistory .power-quantity[data-empty=true]{background:#dae2df;color:#586e69}
#lexyHistory .power-inventory button{gap:10px;min-height:96px;padding-top:14px}
#runPowers .power-cards button>.power-card-icon{margin-top:5px}
/* Small counts sit beside the artwork, never across the heart or other icons. */
#runPowers .power-quantity,#lexyHistory .power-quantity{min-width:18px;width:18px;height:18px;padding:0;border-radius:9px;font-size:11px;top:-6px;right:-14px;box-shadow:0 0 0 1.5px var(--menu-bg,#fff)}
#lexyHistory .inventory-power-icon{display:flex;align-items:center;justify-content:center;gap:3px;width:auto;font-size:27px}
#lexyHistory .inventory-power-icon .power-quantity{position:static;flex:none;align-self:flex-start;margin-top:0}
#lexyHistory .power-inventory button{position:relative}
#lexyHistory .power-new-dot{position:absolute;top:7px;right:7px;width:7px;height:7px;border-radius:50%;background:#d8a735;box-shadow:0 0 0 2px var(--menu-bg,#fff);pointer-events:none}
#lexyHistory .power-new-dot[hidden]{display:none}
/* All four powers belong to one clear, player-facing help section. */
#gameHelp .help-power-list{list-style:none;display:grid;gap:13px;padding:14px;margin:12px 0 0;border-radius:16px;background:var(--menu-soft,#edf4f1)}
#gameHelp .help-power-list li{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;align-items:start}
#gameHelp .help-power-list li>span{font-size:24px;line-height:1.25;text-align:center}
#gameHelp .help-power-list h4{font-size:14px;line-height:1.3;margin:0 0 3px;font-weight:800}
#gameHelp .help-power-list p{font-size:13px;line-height:1.45;margin:0}
html[data-visual-style="sketch"] #gameHelp .help-power-list{background:#f2ead6}

#intro #start:disabled{opacity:1}
#lexyHistory .power-inventory-tip{min-height:84px;box-sizing:border-box}
#runProgress .level-reward-summary{grid-column:1 / -1;width:100%;margin:0 0 8px}

.power-arrival{position:fixed;left:0;top:0;z-index:100;pointer-events:none;font-size:28px;filter:drop-shadow(0 2px 5px #ffffff);color:#28595b}
#runProgress li.level-reward-summary{display:block;padding:0;list-style:none}

.power-home-heading h3{position:relative;padding-right:17px;width:max-content}
.power-home-heading h3 .power-new-dot{right:0;top:7px}

/* Podium recognition belongs to the rank medal; only the player's row is tinted. */
#leaderboardList li,#leaderboardList li.podium{background:var(--menu-soft,#f2f6f5);border:0;border-radius:16px;padding:12px 9px;margin-bottom:8px;box-shadow:none;grid-template-columns:34px 46px minmax(0,1fr) auto}
#leaderboardList .rank{background:transparent!important;text-align:center;font-size:18px;justify-self:center}
#leaderboardList li.podium .rank{position:relative;width:32px;height:38px;display:grid;place-items:start center;padding-top:3px;box-sizing:border-box;font-size:16px;color:#28595b;background:transparent!important;isolation:isolate}
#leaderboardList li.podium .rank::before{content:'';position:absolute;inset:0;z-index:-1;background:currentColor;opacity:.22;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 38'%3E%3Cpath d='M7 23 4 37l9-4 3-7 3 7 9 4-3-14'/%3E%3Ccircle cx='16' cy='14' r='13' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat}
#leaderboardList li.is-me{background:linear-gradient(120deg,#d7eeea,#edf7f4);box-shadow:inset 3px 0 #287c76,0 3px 10px #28595b0a}
html[data-visual-style=sketch] #leaderboardList li.is-me{background:linear-gradient(120deg,#f5e6b8,#fff5dc);box-shadow:inset 3px 0 #b39045,0 3px 10px #28595b0a}
#leaderboardList li.is-me strong{color:#175f5d}
#leaderboardList .leaderboard-own-marker{position:absolute;right:-1px;bottom:0;display:grid;place-items:center;width:15px;height:15px;border-radius:50%;background:#287c76;color:white;font:800 10px/1 Nunito,sans-serif;box-shadow:0 0 0 2px var(--menu-surface,#fff)}
#leaderboardList .leaderboard-level{display:block;width:max-content;margin:4px 0 0;height:18px;padding:1px 6px;border:0;border-radius:6px;font-size:10px;background:#28595b0d;color:#54716e}
@media(max-width:350px){#leaderboardList li{grid-template-columns:28px 32px minmax(0,1fr) auto;gap:5px;padding:11px 7px}#leaderboardList li.podium .rank{width:27px;height:34px;font-size:14px}#leaderboardList .rank-score{font-size:13px}}

.mission-arrival{width:48px;height:48px;filter:drop-shadow(0 2px 3px #ffffffb3);text-shadow:none}
.mission-arrival svg{display:block;width:100%;height:100%}
.mission-arrival i{position:absolute;color:#d5a434;font:18px/1 sans-serif;left:-8px;top:12px;animation:mission-twinkle .7s ease-in-out both}
.mission-arrival i:nth-of-type(2){left:39px;top:-6px;font-size:23px;animation-delay:.12s}
.mission-arrival i:nth-of-type(3){left:45px;top:35px;font-size:12px;animation-delay:.22s}
@keyframes mission-twinkle{0%,100%{opacity:0;transform:scale(.3)}45%{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.mission-arrival i{animation:none;display:none}}

/* Always pair the remaining XP with the destination level at the bar end. */
#homeIdentity .home-xp{grid-column:1;grid-row:3;overflow:visible;white-space:nowrap;font-size:9px}
#homeIdentity .home-next{display:block;grid-column:2;grid-row:3;justify-self:end;font-size:9px;font-weight:800;white-space:nowrap}
.profile-identity .run-xp{display:flex;justify-content:space-between;gap:4px}
@media(max-width:360px){
 html #intro #homePlayerBar#homePlayerBar{padding-inline:6px!important;gap:4px}
 #intro #homePlayerBar #homeIdentity{padding-inline:0;gap:3px}
 #homeIdentity .home-xp{grid-column:1 / -1;justify-self:start}
}

#profileIdentity[role=button]{pointer-events:auto;cursor:pointer;border-radius:14px}
#paused .card{background:var(--menu-surface);color:#28595b;border-radius:26px;width:min(420px,calc(100vw - 32px))}
.pause-look{display:grid;grid-template-columns:64px minmax(0,1fr);grid-template-rows:64px 40px;align-items:center;gap:6px 12px;box-sizing:border-box;height:134px;padding:12px;margin:16px 0;background:var(--menu-soft);border-radius:18px;text-align:left}
.pause-look canvas{position:static;grid-row:1/-1;width:64px;height:66px;object-fit:contain}
.pause-look>div{min-width:0}.pause-look small,.pause-look strong{display:block}.pause-look small{font-size:11px;color:#59746f}.pause-look strong{font-size:15px;line-height:1.2;overflow-wrap:anywhere}
.pause-look button{grid-column:2;justify-self:start;max-width:100%;min-height:40px;box-sizing:border-box;border:0;border-radius:12px;padding:8px 12px;background:var(--menu-surface);color:#28595b;font-size:14px;font-weight:800;white-space:nowrap}
#lexyHistory.pause-closet .closet-back,#lexyHistory.pause-closet #homePowers,#lexyHistory.closet-expanded #homePowers{display:none}

#over .reward-category h4{font:800 12px/1.3 Nunito,sans-serif;color:#52736d;margin:14px 0 6px}
#over .reward-category .reward-items{margin-top:0}
#over .reward-item[data-reward-kind=outfit] canvas{width:100px!important;height:92px!important;max-width:100%;object-fit:contain;inset:auto}
#over .reward-item[data-reward-kind=outfit]{justify-content:flex-start}



#over .result-leaderboard[data-joined=false] #leaderboardJoin{display:flex;flex-direction:column;gap:10px}
#over .result-leaderboard[data-joined=false] #submitScore{width:100%;background:#d96948;color:white;border:0;border-radius:15px;padding:13px;font:800 16px Nunito,sans-serif;box-shadow:0 3px 0 #b94e36}
#over .result-leaderboard.join-invitation[data-joined=false] #submitScore{animation:join-invite 1.3s ease-out 1}
@keyframes join-invite{0%,100%{box-shadow:0 3px 0 #b94e36}45%{box-shadow:0 3px 0 #b94e36,0 0 0 5px #efb64b50,0 0 20px #efb64b60}}
@media(prefers-reduced-motion:reduce){#over .result-leaderboard.join-invitation #submitScore{animation:none}}

#over .result-leaderboard[data-joined=false] .submit-row{display:flex;flex-direction:column;gap:10px}#over .result-leaderboard[data-joined=false] #playerName{width:100%;box-sizing:border-box}

#runPowers .power-card-icon,#lexyHistory .inventory-power-icon{display:flex;flex-direction:column;align-items:center;gap:5px}
#runPowers .power-quantity,#lexyHistory .power-quantity,#lexyHistory .inventory-power-icon .power-quantity{position:static;align-self:center;width:auto;min-width:32px;height:18px;padding:0 5px;white-space:nowrap;font-size:10px;border-radius:7px;box-shadow:none}

#over .level-reward-summary{padding:14px!important;background:var(--menu-soft)!important;border-radius:18px;margin:12px 0!important}
#over .result-level-labels{display:flex;justify-content:space-between;gap:8px;font-size:11px;margin:10px 0 4px}#over .result-level-labels strong{font-size:11px}
#over #runProgress li.run-rewards-section{display:block;grid-column:1 / -1;padding:14px;background:var(--menu-soft);border-radius:18px}
#over .run-rewards-section h3{margin:0 0 10px;font-size:18px}#over .run-rewards-section ul{padding:0;list-style:none}
#over .run-rewards-section li[data-kind=closet]{display:block;grid-column:1 / -1;padding:10px 0;background:transparent}
#over .run-outfit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:290px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;margin-top:10px}
#over .run-outfit-grid>div{background:var(--menu-surface);border-radius:12px;padding:8px;text-align:center;font-size:12px;font-weight:800}
#over .run-outfit-grid canvas{position:static;width:100%;height:92px;object-fit:contain;display:block}

#runPowers .power-cards button>.power-card-icon{display:flex;flex-direction:column;width:auto;height:auto;min-height:54px;gap:4px;line-height:1;background:transparent;border-radius:0;margin:0}

/* The mission supplies the action; milestones only need target and XP. */
.home-milestones .milestone-target-label:empty,.home-milestones .milestone-reward-label:empty,
#lexyHistory .weekly-milestones .milestone-target-label:empty,#lexyHistory .weekly-milestones .milestone-reward-label:empty{display:none}
#challenge-week .home-milestones .milestone-reward small{font-size:10px}

#challenge-week .home-week-detail .shell-weekly{padding-right:20px}

#pauseOutfitEdit{position:relative}#pauseOutfitEdit .avatar-new-dot{position:absolute;right:-3px;top:-3px}

/* One aligned tile per milestone: state, objective quantity, XP reward. */
#challenge-week .home-milestones,#lexyHistory .weekly-milestones{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:8px}
#lexyHistory .weekly-milestones:before{display:none}
#challenge-week .home-milestones>span,#lexyHistory .weekly-milestones li{display:grid;grid-template-rows:18px 28px 25px;align-items:center;justify-items:stretch;gap:3px;padding:7px 3px!important;background:var(--menu-surface,#fff);border:1px solid #28595b18;border-radius:10px;text-align:center;min-width:0}
#challenge-week .home-milestones>span[data-complete=true],#lexyHistory .weekly-milestones li.reached{background:#f1f8ef;border-color:#4c805530}
#challenge-week .home-milestones>span[data-next=true]{background:#fff7df;border-color:#d2a93c66}
#challenge-week .home-milestones b,#lexyHistory .weekly-milestones li>strong{font-size:10px;line-height:18px;white-space:nowrap}
#challenge-week .home-milestones>span[data-complete=true] b::before{content:none}
#challenge-week .milestone-quantity,#lexyHistory .weekly-milestone-target{visibility:visible!important;margin:0;gap:3px;display:flex;align-items:center;justify-content:center}
#challenge-week .home-milestones em,#lexyHistory .weekly-milestone-target em{font-size:11px;font-variant-numeric:tabular-nums}
#challenge-week .milestone-icon,#lexyHistory .weekly-milestone-target .milestone-icon{width:17px;height:20px;flex:0 0 17px}
#challenge-week .home-milestones .milestone-reward,#lexyHistory .weekly-milestones .milestone-reward{background:transparent;border-radius:0;border-top:1px solid #28595b18;padding:4px 0 0;margin:0;color:#28595b;align-self:stretch}
#challenge-week .home-milestones .milestone-reward small,#lexyHistory .weekly-milestones .milestone-reward small{font-size:10px;line-height:18px;margin:0;display:block;white-space:nowrap}

html.menu-scroll-locked{overflow:hidden;overscroll-behavior:none}
dialog[open],#paused:not([hidden]),#over:not([hidden]){overscroll-behavior:contain}
dialog canvas,#paused canvas,#over canvas{touch-action:pan-x pan-y}
#leaderboardList,.help-body,.history-body{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}

/* One compact row: live score, two secondary records, and hearts. */
.hud-top .stats{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) auto;grid-template-rows:auto;gap:8px;align-items:center;padding:8px 12px}
.hud-current-score{grid-column:1;grid-row:1}.hud-personal-best{grid-column:2;grid-row:1}.hud-leaderboard-best{grid-column:3;grid-row:1}
.hud-top .stats #hearts{grid-column:4;grid-row:1;width:76px;font-size:16px;letter-spacing:0;text-align:right}
.hud-top .stats .hud-current-score strong{font-size:clamp(22px,6vw,28px);line-height:1.05}
.hud-top .stats .hud-current-score small{font-size:9px;line-height:1.1;margin-bottom:3px;letter-spacing:.4px}
.hud-top .stats .hud-personal-best small,.hud-top .stats .hud-leaderboard-best small{font-size:9px;line-height:1.1;letter-spacing:0;margin:0 0 3px;text-transform:none;white-space:nowrap;color:#547471}
.hud-top .stats .hud-personal-best strong,.hud-top .stats .hud-leaderboard-best strong{display:block;font:700 13px/1.1 Nunito,sans-serif;font-variant-numeric:tabular-nums;color:#426563;white-space:nowrap}
@media(max-width:350px){.hud-top .stats{gap:5px;padding:8px 9px}.hud-top .stats #hearts{width:66px;font-size:13px}.hud-top .stats .hud-current-score strong{font-size:20px}.hud-top .stats .hud-personal-best small,.hud-top .stats .hud-leaderboard-best small{font-size:8px}.hud-top .stats .hud-personal-best strong,.hud-top .stats .hud-leaderboard-best strong{font-size:12px}}

/* Follow the actual score/Zoomies height instead of a fixed screen offset. */
.hud-top #retentionMoment{position:absolute;top:calc(100% + 10px);left:0;right:auto;transform:none}
body.playing .hud-top #callout{top:calc(100% + 10px)}
body.playing .hud-top:has(#retentionMoment:not([hidden])) #callout{top:calc(100% + 78px)}

/* Name validation is distinct from help text and the outfit picker. */
#avatarPicker .avatar-name #avatarNameStatus[data-state="error"]{display:block;margin:12px 0 8px;padding:12px 14px;border-radius:12px;background:#fff0ee;color:#a32825;font-size:14px;font-weight:800;line-height:1.4}
#avatarPicker #avatarNickname[aria-invalid="true"]{border:2px solid #b63730;box-shadow:0 0 0 2px #b6373018}
#avatarPicker .avatar-name:has([data-state="error"]){padding-bottom:20px;margin-bottom:20px}

#outfitSavedNotice{position:sticky;bottom:12px;z-index:20;width:max-content;max-width:100%;box-sizing:border-box;margin:12px auto;padding:12px 20px;border-radius:18px;background:var(--menu-soft,#e2eee7);color:#28595b;font:800 14px/1.3 Nunito,sans-serif;box-shadow:0 2px 8px #163f4014;text-align:center}
#outfitSavedNotice[hidden]{display:none}
#avatarPicker[aria-busy="true"] #avatarSave{opacity:1;background:#527777;color:white}

#styleStatus:not(:empty){box-sizing:border-box;max-width:190px;padding:8px 12px;border-radius:14px;background:#ffffffed;color:#28595b;font:700 12px/1.35 Nunito,sans-serif;margin-top:8px}

/* Mode is context; Leaderboard remains the primary label. */
#intro #leaderboardOpen{display:flex;align-items:center;justify-content:center;gap:6px}
.leaderboard-mode-title{display:block;text-align:center;font-weight:800}
.leaderboard-mode-title small,.leaderboard-mode-caption{display:block;font-family:Nunito,sans-serif;font-size:11px;font-weight:700;line-height:1.2;letter-spacing:.2px;margin:3px 0 0;opacity:.8}
#leaderboardDialog h2 .leaderboard-mode-caption{font-size:14px;margin:5px 0 0}

/* Approved compact, single-line mode tabs. */
#intro .home-hero .style-toggle{width:166px;padding:3px;gap:2px;border-radius:24px}
#intro .home-hero .style-toggle button{flex:1;display:flex;align-items:center;justify-content:center;gap:4px;padding:6px 5px;min-height:32px;border-radius:20px;font-size:12px;line-height:1.15}
#intro .home-hero .style-toggle svg{width:14px;height:14px;flex:none}
#intro .home-hero .style-toggle button[aria-pressed=true]{background:#28595b;color:#fff}
#intro .home-hero .style-toggle button[aria-pressed=false]{color:#214b4d}

/* Whole consent rows are touch targets; policy buttons stay independent. */
.welcome-choices>label{min-height:44px;box-sizing:border-box;padding-block:4px;cursor:pointer}
.welcome-choices>label input{cursor:pointer}
.welcome-choices>label button{position:relative;cursor:pointer}

/* Recognizable game objects, not tiny scene thumbnails. */
.welcome-bonus .welcome-feature-art{width:86px;height:48px;overflow:visible;background:none;border-radius:0}
.welcome-bonus .welcome-feature-art .welcome-preview{object-fit:contain}
.welcome-mission-icons{display:flex;align-items:center;justify-content:center;gap:8px;width:78px;flex:none;font-size:28px;line-height:1;color:#bc9130}
.welcome-power-icons{display:grid;grid-template-columns:repeat(2,22px);gap:1px 5px;flex:none;font-size:20px;line-height:1.1;text-align:center;width:49px}
@media(max-height:650px){.welcome-bonus .welcome-feature-art{width:76px;height:38px}.welcome-mission-icons{font-size:25px}.welcome-power-icons{font-size:17px}}

/* Results read as level, this run's earnings, then the next goal. */
#over #runProgress li[data-kind=level]>.run-change-body{width:100%}
#over .result-xp-earned{display:block;font:800 18px/1.3 Nunito,sans-serif;margin-top:8px;color:#287477}
#over .result-level-labels{margin-top:16px;font-size:12px}#over .result-level-labels strong{font-size:12px}
#over .run-rewards-section>h3{font-size:17px}
#over .run-rewards-section>ul{display:grid;grid-template-columns:1fr;gap:10px}
#over #runProgress .result-mission{display:block;padding:12px;background:var(--menu-surface,#fff);border-radius:13px;min-width:0}
.result-mission-header,.result-mission-numbers{display:flex;justify-content:space-between;align-items:center;gap:8px}
.result-mission-header small{font:800 11px Nunito,sans-serif;color:#607674}.result-mission-header>strong{font:800 11px Nunito,sans-serif;color:#347747}
.result-mission-goal{display:flex;align-items:center;gap:6px;margin:7px 0}.result-mission-goal>strong{font:800 15px/1.3 Nunito,sans-serif}
#over .result-mission canvas{position:static;inset:auto;width:30px;height:30px;flex:none}
.result-mission-numbers{font:600 12px/1.3 Nunito,sans-serif;margin:7px 0 5px}.result-mission-numbers>strong{color:#287477}.result-mission-numbers>span{white-space:nowrap}
#over .result-mission progress{display:block;width:100%;height:7px;border:0;border-radius:8px;overflow:hidden;accent-color:#287477;background:#e5eeeb}
#over .result-mission progress::-webkit-progress-bar{background:#e5eeeb;border-radius:8px}#over .result-mission progress::-webkit-progress-value{background:#287477;border-radius:8px}
#over .result-mission[data-complete=true]{background:#e7f2e8}#over .result-mission[data-complete=true] progress::-webkit-progress-value{background:#4c8654}
.result-mission-earned{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px;margin-top:8px;font:800 12px Nunito,sans-serif;color:#347747}.result-mission-earned small{font-weight:600}

/* Compact results: one aligned row per changed mission. */
#over .run-rewards-section>ul{gap:0}
#over #runProgress .result-mission{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:8px;padding:10px 0;border-radius:0;background:transparent;border-bottom:1px solid #28595b16}
#over #runProgress .result-mission:last-child{border-bottom:0}
#over .result-mission canvas{width:28px;height:28px}
.result-mission-copy{min-width:0;display:grid;gap:3px}
#over .result-mission-title{font:800 13px/1.25 Nunito,sans-serif}
.result-mission-copy small{font:600 11px/1.3 Nunito,sans-serif;color:#607674}
.result-mission-gain{display:grid;gap:3px;text-align:right;color:#287477;white-space:nowrap;font:800 14px Nunito,sans-serif}
.result-mission-gain small{font-size:11px;color:#347747}
#over .result-level-labels{margin-top:9px}
/* Each supporting feature uses the same reserved artwork box. */
#v2Welcome .welcome-feature-row{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:10px;min-height:52px}
#v2Welcome .welcome-feature-row>:last-child{box-sizing:border-box;width:76px;height:44px;margin:0;justify-self:center;align-self:center;align-content:center;justify-content:center;background:#eaf2f180;border-radius:10px}
#v2Welcome .welcome-mission-icons{font-size:24px;gap:7px}
#v2Welcome .welcome-power-icons{grid-template-columns:repeat(2,20px);font-size:18px;gap:2px 6px}
#v2Welcome .welcome-bonus .welcome-feature-art .welcome-preview{width:100%;height:100%;object-fit:contain}
#v2Welcome .welcome-portraits .welcome-preview{transform:none;width:30%;height:100%}
@media(max-width:350px){#v2Welcome .welcome-feature-row{grid-template-columns:minmax(0,1fr) 66px;gap:6px}#v2Welcome .welcome-feature-row>:last-child{width:66px}}

#tutorial .good-items{grid-template-columns:repeat(5,minmax(0,1fr))}
#tutorial .good-items figcaption{font-size:11px}
.reference-modes,.reference-tabs{display:flex;gap:4px;margin:8px 0}
.reference-modes button,.reference-tabs button{flex:1;border:0;border-radius:9px;background:#e9f0ef;color:#28595b;padding:8px 3px;font:800 12px Nunito,sans-serif;min-width:0}
.reference-modes button[aria-pressed=true],.reference-tabs button[aria-pressed=true]{background:#28595b;color:#fff}
#gameHelp .reference-mode-note,#gameHelp .reference-key{font-size:11px;margin:4px 0;text-align:center}
#gameHelp .reference-panel p{font-size:12px;line-height:1.35;margin:8px 0}
.reference-panel h4{display:flex;justify-content:space-between;margin:10px 0 4px;font-size:13px}.reference-panel h4 small{font-weight:600}
.reference-pickups{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}.reference-hazards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
.reference-panel figure{margin:0;min-width:0;text-align:center;font:600 10px/1.2 Nunito,sans-serif}
#gameHelp .reference-panel canvas{position:static;width:100%;height:42px;object-fit:contain;display:block}
.reference-panel figcaption strong,.reference-panel figcaption small{display:block;margin-top:3px;font-size:11px;color:#28595b}
.reference-extras{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:10px;font-size:11px;text-align:center}.reference-extras span{padding:7px;background:#edf3ef;border-radius:9px}
#gameHelp .reference-foot{font-size:11px;color:#526d6b}
.route-reference{grid-template-columns:repeat(4,minmax(0,1fr))}.bonus-reference{grid-template-columns:repeat(2,minmax(0,1fr))}
#gameHelp .route-reference canvas,#gameHelp .bonus-reference canvas{height:70px}
#gameHelp .help-controls{font-size:12px;line-height:1.4}

#tutorial .good-items .guide-item{max-width:100%;object-fit:contain}

@media(max-width:350px){.reference-tabs button{font-size:10px;padding:8px 1px;overflow-wrap:anywhere}}

/* Match the clear collect/avoid grouping of the first-play guide. */
.reference-collect-group,.reference-avoid-group{padding:10px 8px;border-radius:13px;margin:10px 0;background:#edf5ef}
.reference-avoid-group{background:#fbf0ec}
.reference-collect-group h4,.reference-avoid-group h4{margin:0 0 7px}
.reference-avoid-group h4{color:#9b4a39}
#gameHelp .reference-panel figure{display:flex;flex-direction:column;align-items:center}
#gameHelp .reference-panel canvas{height:46px;width:100%;object-fit:contain;margin:auto}
.reference-panel figcaption{display:grid;width:100%;grid-template-rows:minmax(24px,auto);align-items:center;text-align:center}
.reference-panel figcaption strong,.reference-panel figcaption small{align-self:center;margin-top:2px;line-height:14px}
.reference-hazards{row-gap:7px}
#gameHelp .route-reference canvas,#gameHelp .bonus-reference canvas{height:70px}

.route-hazards{grid-template-columns:repeat(2,minmax(0,1fr));max-width:190px;margin:auto}.bonus-hazard{grid-template-columns:1fr;max-width:100px;margin:auto}

.reference-extras .reference-near{grid-column:1/-1;padding:3px;background:transparent}

/* Mode settings and area navigation have distinct visual hierarchies. */
#gameHelp .reference-modes{padding:4px;border-radius:13px;background:#e9f0ef;gap:4px;margin:9px 0 13px}
#gameHelp .reference-modes button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:8px 5px;border-radius:10px;background:transparent;color:#526d6b;min-height:58px}
#gameHelp .reference-modes button[aria-pressed=true]{background:#fff;color:#28595b;box-shadow:0 1px 4px #28595b20}
#gameHelp .reference-modes strong{font-size:14px;line-height:1.2}
#gameHelp .reference-modes small{font-size:10px;font-weight:600;line-height:1.35;text-align:center;max-width:140px}
#gameHelp .reference-tabs{gap:0;border-bottom:1px solid #28595b25;margin:0 0 9px}
#gameHelp .reference-tabs button{background:transparent;border-radius:0;color:#607674;padding:9px 2px;border-bottom:3px solid transparent;font-size:11px;min-height:36px}
#gameHelp .reference-tabs button[aria-pressed=true]{background:transparent;color:#206c6d;border-bottom-color:#206c6d}
@media(max-width:350px){#gameHelp .reference-tabs button{font-size:10px}#gameHelp .reference-modes strong{font-size:13px}}

.bonus-reference-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.bonus-reference-actions>div{margin:0;min-width:0}
#gameHelp .bonus-reference-item canvas{height:68px;max-width:100px}
#gameHelp .bonus-failure{font-size:10px;color:#9b4a39;text-align:center;margin:5px 0 0}
.bonus-finish{display:flex;align-items:center;gap:10px;margin-top:10px;padding:9px;background:#edf3f2;border-radius:12px}
#gameHelp .bonus-finish canvas{width:62px;height:52px;flex:none;margin:0}
.bonus-finish>div{display:grid;gap:3px;font-size:12px}.bonus-finish span{font-size:11px}.bonus-finish b{font-size:12px;color:#287477}

#gameHelp .help-bullets{padding-left:18px;margin:10px 0;display:grid;gap:7px;font-size:13px;line-height:1.45}
#gameHelp .help-visual-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
.help-visual-pair>div{display:flex;flex-direction:column;align-items:center;gap:4px;background:#edf4f0;border-radius:12px;padding:10px 5px;text-align:center}
.help-visual-pair b{font-size:28px;color:#287477;line-height:1.2}.help-visual-pair strong{font-size:13px}.help-visual-pair small{font-size:10px}
#gameHelp .help-outfit-examples{display:block;margin:12px 0;background:transparent}
#gameHelp .help-outfit-examples .welcome-preview{position:static;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain}
.help-leaderboard-example{display:flex;align-items:center;gap:12px;padding:10px;background:#edf4f0;border-radius:12px;margin:10px 0}
#gameHelp .help-profile-example{display:flex;flex-direction:column;align-items:center;gap:4px;margin:12px 0;background:transparent}
#gameHelp .help-profile-example .welcome-preview{position:static;width:108px;height:99px;object-fit:contain;flex:none}
#gameHelp .help-profile-example figcaption{font-size:14px;font-weight:700;text-align:center}
.help-leaderboard-example>div{display:grid;gap:4px;font-size:14px}
.help-leaderboard-example span{font-size:11px}
.help-leaderboard-example>b{font-size:38px;line-height:1.2}

#gameHelp .welcome-preview-sketch{display:none}
html[data-visual-style="sketch"] #gameHelp .welcome-preview-original{display:none}
html[data-visual-style="sketch"] #gameHelp .welcome-preview-sketch{display:block}
#gameHelp .help-outfit-examples .welcome-preview{min-width:0}
#gameHelp details>section{border-top:0;margin-top:0;padding-top:2px}

/* Labels reserve two lines; rewards stay on a shared baseline. */
#tutorial .good-items figcaption{display:flex;flex-direction:column;gap:3px;white-space:normal;line-height:1.2}
#tutorial .guide-item-name{display:flex;align-items:center;justify-content:center;min-height:2.4em;line-height:1.2;overflow-wrap:normal}
#tutorial .guide-item-reward{display:block;white-space:nowrap;line-height:1.2}
#gameHelp .reference-item-name{display:flex;align-items:center;justify-content:center;min-height:2.4em;line-height:1.2;overflow-wrap:normal}

/* Unseen outfits stay discoverable from the in-run avatar without moving the HUD. */
body.playing #profileIdentity{position:relative;inset:auto}
#profileIdentity>.avatar-new-dot{position:absolute;left:35px;top:1px;margin:0;width:9px;height:9px;min-width:9px;box-shadow:0 0 0 2px #fff;z-index:1}
@media(max-width:350px){#profileIdentity>.avatar-new-dot{left:25px}}

#over #runProgress>ul>li[data-kind=closet]{display:block;grid-column:1/-1;padding:12px 14px;border-radius:18px;background:var(--menu-soft);min-width:0}

/* 16px prevents iPhone's automatic input-focus zoom; pinch zoom stays available. */
#over #playerName{font-size:16px;line-height:1.25;scroll-margin-block:16px}
#over[data-editing-name]{position:fixed;inset:var(--results-visible-top,0px) 0 auto;height:var(--results-visible-height,100dvh);box-sizing:border-box;padding:8px 0}
#over[data-editing-name] .results-card{max-height:calc(var(--results-visible-height,100dvh) - 16px);scroll-padding-top:12px;scroll-padding-bottom:88px}
#over .result-actions{grid-template-columns:minmax(0,1fr) minmax(0,2fr)}
#over .result-actions #again,#over .result-actions #homeAfter{min-width:0}

#gameHelp .reference-mode-note{font-size:12px;line-height:1.45;margin:0 0 12px}
#gameHelp .help-basics{margin:0 0 16px;padding:0}
#gameHelp .help-basics-intro{padding:16px;border:1px solid #28595b0c;border-radius:18px;background:var(--menu-soft,#f3f5f6)}
#gameHelp .help-basics-intro .help-bullets{margin-bottom:0}
#gameHelp .help-basics h3{margin:0 0 7px}
#gameHelp .help-basics p{font-size:13px;line-height:1.5;margin:0 0 8px}

/* Compact result membership: rank and player together, actions secondary. */
#over .result-leaderboard{padding:12px 14px;background:#edf4f1;border:0;border-radius:16px}
#over .result-leaderboard .result-section-heading{margin-bottom:12px;align-items:center}
#over .result-leaderboard .leaderboard-mode-caption{font-size:10px;font-weight:600;margin-top:2px;color:#637c76}
#over .result-leaderboard #leaderboardAfter{background:transparent;font-size:12px;padding:8px 0 8px 10px}
#over #leaderboardJoined{gap:10px}
#over #leaderboardRank{display:flex;align-items:center;justify-content:center;flex:none;min-width:46px;height:42px;padding:0 7px;box-sizing:border-box;border-radius:12px;background:#285f60;color:white;font:600 21px/1 Fredoka,sans-serif}
#over #leaderboardRank[hidden]{display:none}
#over #leaderboardMember{flex:1;font-size:14px}
#over .leaderboard-options summary{min-height:32px;display:flex;align-items:center;padding:4px 0 4px 8px}
#over .result-leaderboard[data-ranked=true] #submissionStatus{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

#over .leaderboard-options summary{width:36px;min-height:36px;box-sizing:border-box;justify-content:center;padding:0;border-radius:50%;background:#28595b09}
#over .leaderboard-options summary span{font:700 23px/1 Nunito,sans-serif;color:#28595b}

#paused #pauseHelp{display:block;width:100%;min-height:42px;margin:10px 0 0;padding:10px 16px;border:0;border-radius:14px;background:var(--menu-soft,#e2eee7);color:#28595b;font:800 16px/1.3 Nunito,sans-serif}

#outfitSavedNotice,#lexyHistory #outfitSavedNotice{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 64px);margin:0;padding:12px 20px;background:#fff;color:#28595b;border:0;border-radius:14px;font:800 15px/1.4 Nunito,sans-serif;box-shadow:0 4px 20px #153e4633;z-index:50;pointer-events:none}

/* Give every heart its own cell; bonus hearts never spill out of the HUD. */
.hud-top .stats #hearts{display:grid;grid-template-columns:repeat(var(--heart-count,3),minmax(0,1fr));gap:2px;align-items:center;min-width:0;line-height:1.2}
.hud-top .stats #hearts>span{display:block;min-width:0;text-align:center;font-size:inherit;line-height:inherit;margin:0;padding:0}
.hud-top .stats #hearts[data-bonus="true"]{font-size:14px}
@media(max-width:350px){.hud-top .stats #hearts[data-bonus="true"]{font-size:12px}}

#paused .card{position:relative}
#paused #pauseHelp{position:absolute;right:18px;top:18px;display:grid;place-items:center;width:42px;height:42px;min-height:42px;margin:0;padding:0;border-radius:50%;font:800 25px/1 Nunito,sans-serif}
#paused h2{padding:0;margin:0 64px 28px 0;font-size:30px;line-height:1.2;text-align:left}
#paused #resume{width:100%;margin-top:16px}
#paused #homePaused{display:block;width:100%;margin-top:12px;min-height:44px}
#leaveRunDialog .remember-quit{display:flex;align-items:center;gap:10px;padding:12px 0 18px;font:700 15px/1.4 Nunito,sans-serif;cursor:pointer}
#rememberQuit{width:22px;height:22px;flex:none;margin:0;accent-color:#28595b}

#paused #pauseHelp{top:12px;right:12px;width:68px;height:58px;gap:3px;align-content:center;background:transparent;border-radius:12px}
#paused #pauseHelp span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--menu-soft,#e2eee7);font:800 22px/1 Nunito,sans-serif}
#paused #pauseHelp small{font:800 10px/1.2 Nunito,sans-serif;white-space:nowrap}

.hud-leaderboard-best{position:relative}
.hud-top-dog-you{position:absolute;right:0;top:-2px;padding:1px 4px;border-radius:5px;background:#e4f1eb;color:#28595b;font:800 8px/1.2 Nunito,sans-serif}
.hud-top-dog-you[hidden]{display:none}
.hud-leaderboard-best[data-mine=true]>small{padding-right:23px}
#over .leaderboard-options summary{width:40px;min-height:40px;border-radius:12px;background:#edf3f2;color:#28595b}
#over .leaderboard-options summary svg{display:block;flex:none}
@keyframes results-reveal{from{opacity:0}to{opacity:1}}
#over:not([hidden]){animation:results-reveal 180ms ease-out both}
@media(prefers-reduced-motion:reduce){#over:not([hidden]){animation:none}}
.hud-personal-best,.hud-leaderboard-best{position:relative}
.record-sparkles{position:absolute;right:0;bottom:-2px;color:#c59824;font-size:16px;line-height:1;pointer-events:none;animation:record-sparkle .65s ease-in-out 4}
.hud-top .stats .record-beaten strong{color:#247975;text-shadow:0 0 8px #efc95866}
.record-beaten{animation:record-glow .7s ease-in-out 3}
.record-announcement{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@keyframes record-sparkle{0%,100%{transform:translateY(0) scale(.7);opacity:.5}50%{transform:translateY(-4px) scale(1.2);opacity:1}}
@keyframes record-glow{50%{background:#f6d96930;border-radius:6px}}
@media(prefers-reduced-motion:reduce){.record-sparkles,.record-beaten{animation:none}}
.record-sparkles{top:-2px;bottom:auto;font-size:13px}
.record-beaten .hud-top-dog-you{visibility:hidden}
/* Keep both photographs painted: opacity reverses smoothly even on rapid taps. */
#intro .home-hero{isolation:isolate}
#intro .home-hero::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:url('../home-breezy.webp');background-size:inherit;background-position:inherit;background-repeat:no-repeat;opacity:0;transition:opacity 520ms cubic-bezier(.4,0,.2,1)}
html[data-play-mode="breezy"] #intro .home-hero::before{opacity:1}
@media(prefers-reduced-motion:reduce){#intro .home-hero::before{transition:none}}
#tutorial .guide-toilet{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:7px}
#tutorial .guide-toilet .guide-item{width:32px;height:40px;margin:0;position:static}
#tutorial .guide-toilet strong{min-height:0;display:block}
#tutorial .guide-toilet p{margin:4px 0 0}
#gameHelp .reference-extras .reference-toilet{display:flex;align-items:center;justify-content:center;gap:7px}
#gameHelp .reference-toilet>span{padding:0;background:none!important;border:0}
#gameHelp .reference-toilet .reference-toilet-icon{font-size:26px;flex:none}
/* A quiet editorial caption, separate from the mode controls. */
#intro .home-hero{position:relative}
#intro .home-hero #styleStatus{position:absolute;isolation:isolate;left:calc(5% + 16px);top:46%;box-sizing:border-box;width:min(calc(36vw - 12px),158px);height:132px;min-height:132px;max-width:none;margin:0;padding:0;border-radius:0;background:none;backdrop-filter:none;color:#28595b;font:500 12px/1.4 Nunito,sans-serif;text-align:left;box-shadow:none;border:0}
#intro .home-hero #styleStatus::before{content:"";position:absolute;z-index:-1;inset:-22px -16px;background:radial-gradient(ellipse at 40% 45%,#ffffffeb 0%,#ffffffc9 40%,#ffffff65 65%,#ffffff00 78%);pointer-events:none}
#styleStatus>strong{display:block;font:900 11px/1.25 Nunito,sans-serif;letter-spacing:.7px;margin:0 0 7px}
#styleStatus>span{display:block;font:500 12px/1.4 Nunito,sans-serif;margin:0 0 8px}
#styleStatus>small{display:block;font:700 10px/1.35 Nunito,sans-serif;color:#426764}
@media(min-width:761px){#intro .home-hero #styleStatus{left:calc(8% + 16px);width:194px;height:140px}#styleStatus>strong{font-size:12px}#styleStatus>span{font-size:14px}#styleStatus>small{font-size:12px}}
/* Quiet only the sea behind the wordmark, without shifting the photograph. */
#intro .home-hero::after{content:"";position:absolute;left:0;top:0;width:min(76%,340px);height:145px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse 180px 95px at 45px 25px,#ffffffdf 0%,#ffffffa8 35%,#ffffff00 100%);opacity:0;transition:opacity 520ms cubic-bezier(.4,0,.2,1)}
html[data-play-mode="breezy"] #intro .home-hero::after{opacity:1}
@media(prefers-reduced-motion:reduce){#intro .home-hero::after{transition:none}}

#gameHelp .help-done{width:100%;min-height:46px;box-sizing:border-box;border-radius:14px;padding:12px 20px;border:0;background:var(--menu-soft,#f3f5f6);color:#28595b;font:800 16px/1.25 Nunito,sans-serif;box-shadow:none;flex-shrink:0}

#challenge-week .weekly-count-row{grid-column:2;display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0}
#challenge-week .weekly-count-row .weekly-count{min-width:0;white-space:nowrap}
.weekly-total{font:800 11px/1.2 Nunito,sans-serif;color:#28595b;white-space:nowrap;font-variant-numeric:tabular-nums}
#lexyHistory .weekly-count{display:flex;align-items:center;justify-content:space-between;gap:8px}
@media(max-width:350px){#challenge-week .weekly-count-row .weekly-count{font-size:16px}.weekly-total{font-size:10px}}

#styleStatus .mode-unit{white-space:nowrap;font-weight:inherit}

#runLoading{box-sizing:border-box;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:24px;border:0;border-radius:0!important;background:rgba(255,255,255,.96);color:#28595b;text-align:center;box-shadow:none;overflow:hidden}
#runLoading[open]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px}
#runLoading::backdrop{background:#ffffffa8;backdrop-filter:blur(12px)}
#runLoading .run-loading-logo{font:500 clamp(36px,10vw,48px)/1.1 Fredoka,system-ui,sans-serif;letter-spacing:-1px;color:#247b7b}
#runLoading .run-loading-logo span{color:#dc6847}
#runLoading h2{margin:0;font:800 22px/1.3 Nunito,system-ui,sans-serif}
.run-loading-spinner{width:44px;height:44px;border:4px solid #28595b20;border-top-color:#28595b;border-radius:50%;animation:run-loading-turn .85s linear infinite}
@keyframes run-loading-turn{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.run-loading-spinner{animation-duration:2s}}
/* Area tabs: a filled active tab stays distinct from the white mode selector. */
#gameHelp .reference-tabs{gap:4px;border-bottom:2px solid #28595b;margin-top:2px}
#gameHelp .reference-tabs button{border-radius:8px 8px 0 0;border-bottom:0;min-height:40px;padding:10px 3px}
#gameHelp .reference-tabs button[aria-pressed=true]{background:#28595b;color:#fff;box-shadow:none}
#gameHelp .reference-tabs button:focus-visible{outline:2px solid #dd6946;outline-offset:2px}
#instagramConfirm{width:min(420px,calc(100vw - 32px));box-sizing:border-box;padding:24px;max-height:calc(100dvh - 32px)}
#instagramConfirm h2{margin:0 0 14px;font-size:26px;line-height:1.15}
#instagramConfirm p{margin:0 0 24px;font-size:16px;line-height:1.5}
.instagram-confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#instagramConfirm button{min-height:48px;padding:12px 8px;font-size:15px;line-height:1.25}
#instagramConfirm .instagram-confirm-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
#instagramConfirm button{min-width:0;width:100%;white-space:normal;overflow-wrap:normal}
#resultSaveStatus{font-size:13px;line-height:1.4;color:#526d6b;margin:12px 0 0}

/* Fill the steering row inward while retaining the existing outer margins. */
.lane-controls{gap:8px}
.lane-controls button{flex:1 1 0;width:auto;min-width:0;max-width:none}
.lane-controls button:active{transform:none}

/* Shared account-owned visibility switch in profile, leaderboard and results. */
.leaderboard-visibility{margin:14px 0;text-align:left;color:#28595b}
.visibility-row{position:relative;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;cursor:pointer;font-size:15px;font-weight:700}
.visibility-row input{position:absolute;right:0;width:48px;height:44px;margin:0;opacity:0;cursor:pointer;z-index:1}
.visibility-track{display:block;position:relative;width:46px;height:26px;border-radius:20px;background:#a5b3b4;flex:none;transition:background .15s}
.visibility-track:after{content:'';position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:white;box-shadow:0 1px 3px #0002;transition:transform .15s}
.visibility-row input:checked+.visibility-track{background:#287d7c}
.visibility-row input:checked+.visibility-track:after{transform:translateX(20px)}
.visibility-row input:focus-visible+.visibility-track{outline:3px solid #28595b;outline-offset:4px}
.visibility-row input:disabled+.visibility-track{opacity:.5}
html body .leaderboard-visibility .visibility-help,html body .leaderboard-visibility .visibility-status{font-size:12px;line-height:1.45;margin:3px 0 0;color:#607779;font-weight:400}
.visibility-status:empty{visibility:hidden}
html body .visibility-gear{display:grid;place-items:center;flex:none;width:44px;height:44px;min-height:44px;padding:0;background:#f1f4f4;color:#28595b;border:0;border-radius:50%;box-shadow:none}
.leaderboard-heading h2{flex:1}
html body .leaderboard-settings-dialog{width:min(360px,calc(100vw - 32px));box-sizing:border-box;border:0;border-radius:24px;padding:24px;color:#28595b;background:white}
.leaderboard-settings-dialog::backdrop{background:#193e4166;backdrop-filter:blur(5px)}
.leaderboard-settings-dialog h2{margin:0 0 18px;font-size:25px}
html body .visibility-back{margin-top:16px;width:100%;min-height:44px;background:#f1f4f4;color:#28595b;box-shadow:none}

html body .leaderboard-visibility .visibility-status{box-sizing:border-box;min-height:44px;display:flex;align-items:center;margin:12px 0 0;padding:10px 12px;border-radius:10px;background:#e7f2eb;color:#307653;font-size:12px;font-weight:700;line-height:1.4}
html body .leaderboard-visibility .visibility-status[data-kind=error]:not(:empty){background:#fff0e9;color:#9d482c}

html body .leaderboard-name-edit{min-height:44px;padding:8px 12px;background:transparent;color:#28595b;box-shadow:none;font-size:12px;margin-left:auto}

/* Feedback occupies a stable slot: no re-centering or movement on toggle. */
html body #over #submissionStatus,html body #over .result-leaderboard[data-ranked=true] #submissionStatus{position:static;display:block;box-sizing:border-box;min-height:31px;width:auto;height:auto;margin:6px 0 0;padding:0;clip-path:none;white-space:normal;overflow:visible}
#over #leaderboardJoined{min-height:44px}

.leaderboard-visibility[data-confirm=false]{position:relative}
html body .leaderboard-visibility[data-confirm=false] .visibility-status{position:static;min-height:48px;margin:8px 0 0;box-shadow:none}
html body #over #submissionStatus:empty{display:block;min-height:31px}

html body .leaderboard-visibility .visibility-status[data-kind=neutral]:not(:empty){background:#eef1f1;color:#607779}

html body .leaderboard-visibility .visibility-retry{width:auto;min-height:32px;margin:0 0 0 auto;padding:4px 10px;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;font:inherit;box-shadow:none;flex-shrink:0}

/* Desktop keeps touch targets compact and the score below the profile rail. */
@media(min-width:761px){
 .lane-controls{left:50%;right:auto;transform:translateX(-50%);width:min(480px,calc(100% - 32px));justify-content:space-between}
 .lane-controls button{flex:0 0 150px;width:150px;max-width:150px;height:80px}
 .hud-top{top:84px}
 body.playing .profile-identity{max-width:480px}
}

/* Results have no success confirmation; empty feedback must not reserve a row. */
html body #over .leaderboard-visibility[data-confirm=false] .visibility-status:empty,
html body #over #submissionStatus:empty{display:none;min-height:0;margin:0;padding:0}

/* Inline feedback uses the same readable status treatment across account flows. */
html body :is(#avatarNameStatus,.lexy-account-dialog > [role=status],#accountSetup [role=status],#accountEntry [data-entry-note],[data-choice-status],#over #submissionStatus,#resultSaveStatus):not(:empty):not([hidden]){
 display:block;box-sizing:border-box;padding:10px 12px;margin:10px 0;border-radius:10px;background:#eef1f1;color:#526d6b;font:700 12px/1.45 Nunito,sans-serif;overflow-wrap:anywhere;text-align:left;
}
html body #avatarPicker .avatar-name #avatarNameStatus[data-state=saved],
html body [data-choice-status][data-kind=success]{background:#e7f2eb;color:#307653}
html body #avatarPicker .avatar-name #avatarNameStatus[data-state=error],
html body :is(.lexy-account-dialog > [role=status],[data-choice-status],#over #submissionStatus)[data-kind=error],
html body #accountSetup [role=status]:not(:empty){background:#fff0e9;color:#9d482c}
html body #avatarNameStatus:empty{display:none}

/* No confirmation slot: the switch conveys off, saving and on without reflow. */
html body .leaderboard-visibility .visibility-status:empty{display:none;min-height:0;margin:0;padding:0}
.leaderboard-visibility[aria-busy=true] .visibility-track:after{box-sizing:border-box;border:3px solid #dce8e8;border-top-color:#28595b;animation:visibility-saving .7s linear infinite}
@keyframes visibility-saving{to{rotate:360deg}}
@media(prefers-reduced-motion:reduce){.leaderboard-visibility[aria-busy=true] .visibility-track:after{animation:none}}
