/* Shared interface theme. Gameplay artwork and reward/status icons keep their colours. */
:root,html[data-visual-style="sketch"]{
 --menu-surface:#fff;--menu-soft:#f3f6f6;--menu-field:#f8fafa;--menu-edge:#e0e8e8;
 --ui-ink:#28595b;--ui-muted:#617777;--ui-orange:#d96948;--ui-orange-down:#c65a3b;
 --ui-glass:rgba(255,255,255,.88);--ui-backdrop:rgba(20,51,55,.36);
}
html body :is(dialog,.modal>.card){background:var(--menu-surface)!important;color:var(--ui-ink)!important;border:0!important;border-radius:26px!important;box-shadow:0 16px 48px #173c4426}
html body dialog::backdrop,html body .modal{background:var(--ui-backdrop);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
html body dialog>header,html body #over .result-actions,html body #over .leaderboard-options[open]>div{background:var(--menu-surface)!important}
html body :is(dialog,.modal) :is(h1,h2,h3,h4){color:var(--ui-ink)}
html body :is(dialog,.modal) :is(button,input,select,textarea){font-family:Nunito,sans-serif}
/* Secondary actions share a neutral surface; preserve each control's layout and size. */
html body :is(dialog,.modal) button{background:var(--menu-soft)!important;background-image:none!important;color:var(--ui-ink)!important;border:0!important;box-shadow:none!important;font-weight:800;border-radius:14px!important}
html body :is(dialog,.modal) button:not(:disabled):hover{filter:brightness(.98)}
html body :is(button,a,input,summary):focus-visible{outline:2px solid #287477;outline-offset:3px}
html body button:focus:not(:focus-visible){outline:none}
html body :is(#intro,#over,#lexyHistory,#closetDetail,#game,dialog,.modal) :is(.primary,.avatar-name button[type=submit],#start,#again,#resume,#tutorialStart,#welcomeContinue,#powerStartRun,#avatarSave,#submitScore,.closet-wear-button,.closet-detail-wear,#adventureJump){background:var(--ui-orange)!important;background-image:none!important;color:white!important;border:0!important;border-radius:16px!important;box-shadow:0 3px 0 #b84f34!important;text-shadow:none;font-family:Nunito,sans-serif;font-weight:800}
html body :is(#intro,#over,#lexyHistory,#closetDetail,#game,dialog,.modal) :is(.primary,.avatar-name button[type=submit],#start,#again,#resume,#tutorialStart,#welcomeContinue,#powerStartRun,#avatarSave,#submitScore,.closet-wear-button,.closet-detail-wear,#adventureJump):active{background:var(--ui-orange-down)!important;box-shadow:0 1px 0 #b84f34!important;transform:translateY(2px)}
html body :is(dialog,.modal) button:disabled,html body .primary:disabled{background:#e6ebeb!important;color:#718181!important;box-shadow:none!important;opacity:1;cursor:default}
html body :is(#confirmLeaveRun,#leaderboardStop){background:transparent!important;color:#a63e35!important}
/* Quiet icon actions and close buttons, with identical white/teal treatment. */
html body :is(.history-close,.help-close:not(.help-done),.challenge-close,#avatarClose,#installClose,.closet-detail-close,.closet-info-button,.closet-detail-prev,.closet-detail-next){background:var(--menu-soft)!important;color:var(--ui-ink)!important;border:0!important;box-shadow:none!important;border-radius:50%!important}
html body :is(.closet-face,.profile-name-edit,.time-reveal,#leaderboardScrollHint,#pauseHelp,#homePaused){background:transparent!important;box-shadow:none!important}
html body :is(.reference-tabs button){background:transparent!important;border-radius:0!important}
html body :is(.reference-modes button[aria-pressed=true],.avatar-options button[aria-pressed=true]){background:white!important;box-shadow:inset 0 0 0 2px #287477!important}
html body #runPowers .power-cards button[aria-pressed=true],html body #lexyHistory .power-inventory button[aria-pressed=true]{background:white!important;box-shadow:inset 0 0 0 2px #287477!important}
html body #runPowers .power-selected-check{background:#287477;color:white}
/* All content groups use the same neutral surface; colour lives in their icons and progress. */
html body :is(.history-level,.history-stats>div,.history-closet li,.avatar-locked-previews figure,.avatar-current,.pause-look,.power-empty,.power-inventory-tip,.reward-item,.reward-items p,.level-reward-summary,.run-log-entry,.result-leaderboard,.reference-extras span,.reference-collect-group,.reference-avoid-group,.bonus-finish,.help-visual-pair>div,.help-leaderboard-example,.guide-zoom,.guide-bonus,.analytics-settings,.help-power-list){background:var(--menu-soft)!important;background-image:none!important;border-color:var(--menu-edge)!important;color:var(--ui-ink)}
html body #over #runProgress :is(li,.result-mission,.run-rewards-section){background:var(--menu-soft)!important;background-image:none!important;border-color:var(--menu-edge)!important}
html body #over #runProgress li[data-kind=level]{border-radius:18px;box-shadow:none!important}
html body #over #runProgress li[data-level-up=true],html body #over #runProgress li.level-up{background:white!important;box-shadow:inset 0 3px 0 var(--ui-orange)!important}
html body :is(.challenge-dialog .shell-objective,.challenge-dialog .home-weekly,.challenge-dialog .home-milestones>span,#lexyHistory .weekly-milestones li,#leaderboardList li,#leaderboardList li.podium){background:var(--menu-soft)!important;background-image:none!important;border-color:var(--menu-edge)!important}
html body #leaderboardList li.is-me{background:white!important;box-shadow:inset 3px 0 #287477,0 2px 10px #28595b12!important}
html body :is(.leaderboard-avatar,.run-log-reward,.run-log-chips>span,.run-outfit-grid>div){background:white!important}
html body :is(.closet-card-state[data-wearing=true],.closet-selected){background:var(--menu-soft)!important;color:#287477}
html body :is(.avatar-name input,#playerName,dialog input[type=text]){background:var(--menu-field)!important;color:var(--ui-ink)!important;border:1px solid var(--menu-edge);border-radius:12px;font-size:16px}
/* Home and in-run chrome stay translucent without a warm colour cast. */
html body :is(#intro,#homePlayerBar,.home-actions,.retention-home){background-color:var(--menu-surface)!important}
html body :is(#intro #homeIdentity,#homeUtilities button,#homeUtilities a,.header-controls button,#profileIdentity,.hud-top .stats,.hud-top .zoom-wrap,.lane-controls button,#adventureNote,#adventureChoice,#bonusBird span,.style-toggle){background:var(--ui-glass)!important;color:var(--ui-ink);border-color:#ffffffb3!important;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
html body #intro #homeIdentity{background:transparent!important}
html body #intro #leaderboardOpen{background:white!important;color:var(--ui-ink);border:0;box-shadow:0 2px 12px #173c4412}
html body .style-toggle button[aria-pressed=true]{background:#28595b!important;color:white!important}
html body #routeFade{background:rgba(255,255,255,.9);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
html body #routeReturn{color:var(--ui-ink)}
html body #routeReturn strong,html body #routeReturn p{color:var(--ui-ink)}
html body :is(.xp-arrival,#outfitSavedNotice){background:white!important;color:var(--ui-ink)!important;box-shadow:0 4px 18px #173c4426}
html body #intro #homeIdentity.xp-received{background:var(--ui-glass)!important}
html body :is(#avatarNameStatus[data-state=error],.closet-card-status:not([hidden])){background:white!important;color:#a32825!important}
html body :is(dialog,.modal) progress,html body :is(dialog,.modal) progress::-webkit-progress-bar{background:#e0e8e8!important}
html body #lexyHistory .profile-name-edit[data-generated=true]::after{background:#e0e8e8;color:var(--ui-muted)}
html body .challenge-dialog .weekly-count{color:var(--ui-ink)}
html body #runPowers .power-cards button:disabled{opacity:1;background:var(--menu-soft)!important;color:var(--ui-muted)!important}
html body #runPowers .power-cards small{font-weight:500}
html body #lexyHistory .power-inventory button[aria-expanded=true]{background:white!important;box-shadow:inset 0 0 0 2px #287477!important}
html body :is(.pause-look button,#avatarEdit){background:white!important;box-shadow:0 1px 5px #173c4410!important;border-radius:12px}
html body :is(.history-help,.level-caption,.closet-detail-description,.closet-detail-requirement,.challenge-reset,.challenge-status,.run-log-entry>small){color:var(--ui-muted)}

html body #intro #homePlayerBar{background:var(--ui-glass)!important}
html body :is(dialog,.modal) h2{font-family:Fredoka,sans-serif;font-weight:500}
html body :is(dialog,.modal) :is(h3,h4){font-family:Nunito,sans-serif;font-weight:800}
html body :is(#intro,#over,#v2Welcome,#runPowers,#avatarPicker,#tutorial,#closetDetail) button:disabled{background:#e6ebeb!important;color:#617777!important;box-shadow:none!important;opacity:1}

html body :is(#intro,#over,#lexyHistory,#closetDetail,#game,dialog,.modal) :is(.primary,.avatar-name button[type=submit],#start,#again,#resume,#tutorialStart,#welcomeContinue,#powerStartRun,#avatarSave,#submitScore,.closet-wear-button,.closet-detail-wear,#adventureJump):disabled{background:#e6ebeb!important;color:#617777!important;box-shadow:none!important;opacity:1}
/* Keep the selected game area visible through the shared dialog button theme. */
html body #gameHelp .reference-tabs button{background:transparent!important;color:#607674!important;border-radius:8px 8px 0 0!important}
html body #gameHelp .reference-tabs button[aria-pressed=true]{background:#28595b!important;color:#fff!important}
/* Result cards are opaque white, including the sticky action area. */
html body #over>.results-card,html body #over .result-actions{background:#fff!important;background-image:none!important}
/* Opaque neutral UI prevents warm scene colours tinting controls and panels. */
:root,html[data-visual-style="sketch"]{--ui-glass:#fff}
html body.playing #game>header{background:#fff!important;background-image:none!important}
html body #paused>.card{background:#fff!important;background-image:none!important}
html body #routeFade{background:#fff}
/* The legacy golden-run veil sits above the HUD and results, tinting even
   opaque white surfaces. Keep score celebrations without a full-screen tint. */
html body #game::after{display:none!important}
.reference-toilet small{display:block;font-size:11px;line-height:1.35;margin-top:4px;font-weight:500}
