@layer theme,legacy,utilities;
@layer legacy{
/* Semantic surfaces shared by all saved palettes; decorative content keeps its own colors. */
:root[data-palette] body{background:var(--bg);color:var(--ink)}
:root[data-palette] :is(.panel,.game-view,.g-player,.g-map,.g-loot,.g-mission,.g-wallet,.g-bottom-nav,.parent-tabs,.studio-view,.prize-row,.notice,.chat-composer,.chat-message,.auth-wrap .panel){background:var(--surface);background-image:none;color:var(--ink);box-shadow:none}
:root[data-palette] :is(.panel h2,.panel h3,header h1,header #profile-info,.g-logo,.g-player-info h2,.g-player-info h2>span,.g-loot h3,.g-stop b,.g-badge b,.g-top,.g-wallet,.g-loot-top b){color:var(--ink)}
:root[data-palette] :is(footer,.panel p,.eyebrow,.g-xp-label,.g-player-info>small,.g-player-info>p,.g-fair-note,.g-mission-info>small,.g-loot p,.g-loot-values,.g-loot-top span,.g-wallet small,.g-stop small,.g-badge small,.g-map>p){color:var(--muted)}
:root[data-palette] :is(button.primary,.g-go,.g-loot-button){background:var(--action);color:var(--on-action);border-color:var(--action);background-image:none}
:root[data-palette] :is(button.secondary,.text-btn,.game-return,.g-settings){background:var(--surface);color:var(--action);border-color:var(--muted)}
:root[data-palette] :is(input,textarea,select){background:var(--surface);color:var(--ink);border-color:var(--muted)}
:root[data-palette] :is(.g-bottom-nav,.parent-tabs) button{background:transparent;color:var(--muted)}
:root[data-palette] :is(.g-bottom-nav,.parent-tabs) button[aria-current=page]{color:var(--action);text-decoration:underline}
:root[data-palette] .prizes-delivery{border-inline-start:0;padding-inline-start:0}
:root[data-palette] .palette-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(7rem,1fr));gap:.5rem}
.palette-choices button{display:flex;gap:.6rem;align-items:center;min-height:44px}.palette-swatch{background:var(--swatch);width:1rem;height:1rem;border-radius:50%;flex:none}
.palette-choices [aria-pressed=true]{outline:2px solid var(--action)}
.reward-confirmation{grid-column:1/-1}.reward-confirmation button{margin:.3rem;min-height:44px}
.removal-options{display:grid;gap:.5rem}.account-removal input{display:block;width:100%;margin-block:.5rem}
.chat-data-notice{font-size:0.875rem;color:var(--muted);line-height:1.6}
#network-state{position:sticky;inset-block-start:0;z-index:50;padding:.65rem;background:var(--raised);color:var(--ink);border-bottom:2px solid var(--warning);font-size:0.875rem}#network-state[hidden]{display:none}
:root[data-palette] .g-completed-mark{color:var(--success)}
:root[data-palette] :is(.g-xp-label,.g-avatar>span,.g-wallet small,.g-completed-mark small,.g-badge small,.g-stop small){font-size:max(0.875rem,1em)}
@media(forced-colors:active){.palette-choices [aria-pressed=true]{outline-color:Highlight}}
:root[data-palette] .demo{background:var(--ink);color:var(--bg)}
:root[data-palette] .g-tools .nav-icon{width:1.2rem;height:1.2rem}
:root[data-palette] .task-segments button{background:var(--surface);color:var(--muted)}
:root[data-palette] .task-segments button[aria-current=page]{background:var(--action);color:var(--on-action)}
@media(prefers-contrast:more){
 :root[data-palette],:root[data-palette] body,:root[data-palette] .game-view{}
 :root[data-palette] :is(button,input,textarea,select){border-width:2px}
}

}