/* A complete white surface layer. Native canvas/SVG artwork keeps its palette. */
html[data-ui-theme=light]{--surface:#fff;--panel:#fff;--bg:#fff;--center-surface:#fff;--text:#182637;--ink:#182637;--muted:#526477;--line:#cbd5df;--border:#cbd5df;color-scheme:light}
html[data-ui-theme=light] body{background:#fff!important;color:#182637!important}
html[data-ui-theme=light] body :is(.feature-art,.cover-link,.portal-disclosure,.token-mint,.tower-expansion,.golf-expansion,.drift-tour-panel,.home-play-panel,.home-pro-hub,.v3-home-entry,.home-hub,.home-multiplayer-links,.player-profile-card,.match-setup,.expedition-card,.wg-training-coach,.wg-training-active,.wg-training-plans article,.wg-controls-preview,.wg-control-scope,.wg-audio-panel,.wg-training,.wg-center,#wgCenter,#app:not(.is-playing),.app-shell,.skip-link,.v3-thirty-gallery,.v3-thirty-info,.reference-stat,.v3-tour-region,.v3-tour-slide,.cycle06-home-scene,.cycle07-home-tour,.cycle08-home-record,.cycle09-home-tour,.cycle10-recent-biomes,.cycle11-home-periods,.cycle11-period-item,.ff-extra-daily,.mission-browser127,.mission-pager127,.quick-games127){background:#fff!important;background-image:none!important;color:#182637!important;border-color:#bccbd8!important;box-shadow:none!important;color-scheme:light}
html[data-ui-theme=light] body :is(#lobby,#menu,#home,#hub,.intro,.home-hub,.home-pro-hub,.home-multiplayer-links,.player-profile-card,.v3-thirty-info,.reference-stat,.v3-tour-region,.v3-tour-slide,.ff-extra-daily,dialog,.wg-home-controls,.wtg-game-nav,.expedition-card) :is(section,article,aside,header,footer,nav,div,details,summary,label,a,fieldset,output):not(:where(.reference-hero,.reference-hero *,.reference-scenery,.reference-scenery *,.v3-thirty-stage,.v3-thirty-stage *,.scene-shell,.scene-shell *,.hero-scene,.hero-scene *,.sim-stage,.sim-stage *,.stick,.stick *,.wg-test-stick,.wg-test-stick *,.swatch,.swatch *,.mini-pitch,.mini-shirt,.ball-art,.handle-art,.preview-bird,.preview-bird *,.skin-bird,.skin-bird *,[data-authored-skin],[data-authored-skin] *,.skin-world-scenery,.skin-world-scenery *,.game-icon2d,.game-icon2d *)){background-color:#fff!important;background-image:none!important;color:#182637!important;border-color:#cbd5df!important;box-shadow:none!important}
html[data-ui-theme=light] body :is(#lobby,#menu,#home,#hub,.intro,.home-hub,.home-pro-hub,.v3-home-entry,.player-profile-card,.v3-thirty-info,.reference-stat,.v3-tour-region,.v3-tour-slide,.ff-extra-daily,dialog,.wg-home-controls,.wtg-game-nav,.expedition-card) :is(h1,h2,h3,h4,h5,p,small,label,legend,output,strong,b,span,li,td,th,summary,a){color:#182637!important;text-shadow:none!important}
html[data-ui-theme=light] body :is(button,input,select,textarea,summary,.v3-action,.bottom-nav button){background:#fff!important;background-image:none!important;color:#182637!important;border-color:#9aafc3!important;text-shadow:none!important;color-scheme:light}
html[data-ui-theme=light] body :is(dialog,.panel,.home-play-panel,.home-pro-hub,.v3-home-entry,.expedition-card){border:1px solid #bccbd8!important}
html[data-ui-theme=light] body :is(#wgCenter,dialog) :is(header,.modal-header)::before{background:#fff!important}
html[data-ui-theme=light] body :is(button,a,summary,input,select,textarea):focus-visible{outline:3px solid #075db6!important;outline-offset:3px}
html[data-ui-theme=light] body :is(.primary,.start-button,.play-btn,.btn-primary){border:2px solid #075db6!important;color:#075db6!important;font-weight:750}
html[data-ui-theme=light] body :is([aria-pressed=true],.mission.current,.level.current){border-color:#075db6!important;box-shadow:inset 0 0 0 2px #075db6!important}
html[data-ui-theme=light] body button:disabled{color:#64748b!important;opacity:.7}
html[data-ui-theme=light] body :is(progress,meter){accent-color:#176bbb;background:#e4edf5!important}
html[data-ui-theme=light] body :is(.hp,.health,.xp-track,.v3-progress,.pro-progress,.card-progress){background:#dfe9f1!important}
html[data-ui-theme=light] body ::placeholder{color:#64748b!important;opacity:1}
html[data-ui-theme=light] body :is(.expedition-card,.home-pro-hub,.v3-home-entry,.player-profile-card,.wg-center){border-radius:18px}
html[data-ui-theme=light] body .feature-art{border-bottom:1px solid #d5dfe8}
html[data-ui-theme=light][data-web3-home] body :is(#token-mint,label.button){background:#fff!important;background-image:none!important;color:#182637!important;border-color:#bccbd8!important}
html[data-ui-theme=light][data-world-game=flying][data-ui-v5] body #app :is(.v3-action,.bottom-nav button){background:#fff!important;background-image:none!important;color:#182637!important;border-color:#9aafc3!important}
html[data-ui-theme=light][data-world-game=flying] body #app #screen-heading-home{color:#182637!important;text-shadow:none!important}
html[data-ui-theme=light][data-world-game=flying][data-ui-v5] body #app .command-dock.pixel-dock button.is-active{background:#fff!important;background-image:none!important;color:#182637!important;border:2px solid #075db6!important}
html[data-ui-theme=light][data-world-game=flying] body [id^=screen-] :is(section,article,aside,header,footer,nav,div,details,label):not(:where(.reference-hero,.reference-hero *,.reference-scenery,.reference-scenery *,.v3-thirty-stage,.v3-thirty-stage *,.game-stage,.game-stage *,.preview-bird,.preview-bird *,.skin-bird,.skin-bird *,[data-authored-skin],[data-authored-skin] *,.skin-world-scenery,.skin-world-scenery *)){background-color:#fff!important;background-image:none!important;color:#182637!important;border-color:#bccbd8!important}
html[data-ui-theme=light][data-world-game=flying] body [id^=screen-] :is(h1,h2,h3,h4,p,small,strong,b,span,label,summary,a){color:#182637!important;text-shadow:none!important}
html[data-ui-theme=light][data-world-game=pool] body #app :is(.music-controls,.home-info,.footer) :is(span,output,p,a,small){color:#243b53!important;text-shadow:none!important}
html[data-ui-theme=light][data-web3-home] body :is(main,footer) :is(label,code,em){color:#243b53!important;text-shadow:none!important}
html[data-ui-theme=light] body :is(.hud,.hud-panel,.game-hud,.game-toolbar,.controls,#hud,#wgFPS){background:#fff!important;background-image:none!important;color:#182637!important;border-color:#bccbd8!important}
html[data-ui-theme=light] body :is(.hud,.hud-panel,.game-hud,.game-toolbar,.controls,#hud) :is(span,strong,b,small,p,output){color:#182637!important;text-shadow:none!important}
.mission-browser127 progress{appearance:none;border:0;border-radius:8px;overflow:hidden}.mission-browser127 progress::-webkit-progress-bar{background:#e4edf5}.mission-browser127 progress::-webkit-progress-value{background:#176bbb}.mission-browser127 progress::-moz-progress-bar{background:#176bbb}
/* Hidden stages and dialogs must not be revived by layout rules. */
.mission-grid>[hidden],.grid>[hidden],.wg-stage-grid>[hidden],.mission-browser127 [hidden],.quick-games127 [hidden],.wg-training [hidden],.wg-option[hidden]{display:none!important}
.mission-browser127{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px;border:1px solid #8aa0b7;border-radius:16px;margin:18px 0 12px}
.mission-browser127>p,.mission-browser127>progress,.mission-browser127>div{grid-column:1/-1;margin:0}.mission-browser127 progress{width:100%;height:10px}
.mission-browser127 label{display:flex;flex-direction:column;gap:6px;font:600 13px/1.5 system-ui;min-width:0}
.mission-browser127 input,.mission-browser127 select{width:100%;box-sizing:border-box;min-width:0;padding:10px;font:inherit;border-radius:10px;border:1px solid #8aa0b7;min-height:44px}
.mission-browser127 button,.mission-pager127 button{min-height:44px;padding:10px 14px;white-space:normal}.mission-browser127>div{display:flex;gap:8px;flex-wrap:wrap}
.mission-pager127{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0 20px}.mission-pager127 output{font:500 12px/1.4 system-ui;text-align:center}
.expedition-card>details>summary{padding:12px 0;cursor:pointer;font-weight:700;min-height:44px;box-sizing:border-box}.expedition-card>details>div{padding:8px 0}.expedition-tools127{display:flex;gap:8px;flex-wrap:wrap}.expedition-tools127 button{min-height:44px;padding:10px 12px}.expedition-card .expedition-recap127{line-height:1.6;font-size:13px}.expedition-card [role=status]:empty{display:none}
.quick-games127{width:min(680px,calc(100% - 24px));max-height:85dvh;overflow:auto;border:1px solid #b8c9d8;border-radius:20px;padding:20px;font:15px/1.5 system-ui}.quick-games127 header{display:flex;justify-content:space-between;gap:12px;align-items:center}.quick-games127 h2{margin:0}.quick-games127 input[type=search]{box-sizing:border-box;width:100%;min-height:44px;padding:10px;border:1px solid #8aa0b7;border-radius:10px;margin:8px 0}.quick-games127 header button,.quick-games127 li button{min-width:44px;min-height:44px}.quick-games127 ul{list-style:none;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}.quick-games127 li{display:flex;align-items:center;border:1px solid #b8c9d8;border-radius:12px;padding:6px;gap:6px;min-width:0}.quick-games127 li a{display:flex;align-items:center;gap:10px;flex:1;min-width:0;text-decoration:none;font-weight:650;min-height:48px}.quick-games127 .game-icon2d{width:44px}.quick-games127::backdrop{background:#20334d55}.settings-search127{display:block;margin:16px 0}.settings-search127 input{display:block;width:100%;box-sizing:border-box;min-height:44px;padding:10px;margin-top:8px}.training-tools127{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.training-confirm127{border:2px solid #176bbb;border-radius:12px;padding:14px;margin:12px 0}.training-confirm127:empty{display:none}
@media(max-width:520px){.mission-browser127{grid-template-columns:1fr;padding:12px}.mission-pager127{flex-wrap:wrap}.mission-pager127 output{flex:1}.quick-games127 ul{grid-template-columns:1fr}.quick-games127{padding:16px}.expedition-card{padding:16px!important}}
html[data-ui-theme=light][data-world-game=flying] body #app .v3-thirty-world-name{background:#fff!important;background-image:none!important;color:#182637!important;border-color:#bccbd8!important}
html[data-ui-theme=light] body :is(.game-header,#hint,#stage,.game-header small){color:#243b53!important;text-shadow:none!important}
html[data-world-game=fossball] .home-grid>*{min-width:0;max-width:100%}
html[data-world-game=fossball] .rival-choices{max-width:100%;overflow-x:auto;padding-bottom:10px;scrollbar-width:thin}
html[data-world-game=fossball] .rival-choices .rival-choice{flex:0 0 auto;min-width:58px}

/* Native gameplay overlays stay dark in both themes. Keep their text light
   rather than inheriting the white menu surface's dark foreground. */
html[data-ui-theme=light][data-world-game=flying] body #app #screen-play :is(.flight-hud,.flight-hud-details) :is(small,b,strong,span,em){color:#f3f5e9!important;text-shadow:0 1px 2px #00101d!important}
html[data-ui-theme=light][data-world-game=flying] body #app #screen-play .flight-hud-top{background:#071b26!important}
html[data-ui-theme=light][data-world-game=pinball] body :is(.mission-panel,.ready-label){color:#f3f5e9!important}
html[data-ui-theme=light][data-world-game=pinball] body #mission-help{color:#c4d3df!important}
html[data-ui-theme=light][data-world-game=pinball] body #game .game-hud .icon-btn svg{color:#182637!important}

/* Mission and voyage captions share the light toolbar's contrast. */
html[data-ui-theme=light][data-world-game] body #game :is(#missionName,#brief){color:#36556a!important;text-shadow:none!important}
html[data-ui-theme=light][data-world-game] body :is(#hint,#brief){background:#f3f7fa!important;color:#36556a!important;text-shadow:none!important}

/* Original collection cards must shrink with the dialog, not crop the last column. */
html[data-world-game] #dialogBody .grid:has(>.skin){grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr));min-width:0}
html[data-world-game] #dialogBody .grid>.skin{min-width:0;overflow-wrap:anywhere}
html[data-world-game] #dialogBody .skin .swatch{box-sizing:border-box;max-width:100%}

/* Pool's native arena uses anchor tabs, not button tabs. */
html[data-ui-theme=light][data-world-game=pool] body .arena-hub-nav a{background:#eef4fa!important;color:#173b5c!important;border-color:#8aa0b7!important}
html[data-ui-theme=light][data-world-game=pool] body main>.hero .eyebrow{color:#36556a!important}
html[data-ui-theme=light][data-world-game=pool] body .music-controls :is(span,small,output,p,a){color:#243b53!important;text-shadow:none!important}
html[data-world-game=pool] body main>.hero{min-width:0;flex-wrap:wrap}
html[data-world-game=pool] body main>.hero>div{min-width:0;flex:1 1 100%}
html[data-world-game=pool] body main>.hero .wg-game-identity{max-width:100%;margin-bottom:16px}
html[data-world-game=pool] body .arena-hub-nav{max-width:100%;justify-content:flex-start;scroll-padding-inline:8px}
html[data-world-game=pool] body .arena-hub-nav a{flex:0 0 auto;min-height:44px}
@media(max-width:600px){html[data-world-game=pool] body main>.hero h1{font-size:clamp(28px,8vw,35px);overflow-wrap:anywhere}html[data-world-game=pool] body main>.hero .wg-game-identity{padding-right:52px}html[data-world-game=pool] body .arena-hub-nav{flex-wrap:wrap;overflow:visible}}

/* Release caption badges target every span. Authored sprite wrappers are art,
   not badges: outrank that rule without erasing CSS-built bird body palettes. */
html[data-ui-theme=light][data-world-game=flying][data-ui-version][data-ui-v5] body #app :is(#screen-skins,#screen-profile,#screen-play) :is(.skin-bird,.preview-bird):is([data-authored-skin],[data-approved-skin],.pixel-skin){background:transparent!important;background-image:none!important}
/* object-fit:contain can expose canvas letterboxing outside the painted bitmap. */
html[data-ui-theme=light][data-world-game] body canvas.wg-native-swatch[data-artwork-preview]{background:#102639!important;background-image:none!important}
