/* Shared palettes. Keep module styles on these tokens; navigation geometry is unchanged. */
body[data-page].theme-light{--theme-bg:#f5f7fa;--theme-top:#ffffff;--theme-surface:#ffffff;--theme-surface-2:#edf2fa;--theme-border:#d8e1ed;--theme-text:#192533;--theme-muted:#526276;--theme-accent:#2455a4;--theme-input:#ffffff;--theme-footer:#edf2fa;--site-link:#2455a4;--site-button:#354b83;--site-on-button:#ffffff;color-scheme:light}
body[data-page].theme-dark{--theme-bg:#0a1626;--theme-top:#0b1728;--theme-surface:#13243a;--theme-surface-2:#182b45;--theme-border:#344d6d;--theme-text:#f4f7ff;--theme-muted:#b5c4d9;--theme-accent:#1769e8;--theme-accent-2:#4b9bff;--theme-badge:#6d5df5;--theme-chip:#1a3150;--theme-hero:#11243f;--theme-input:#0d192a;--theme-footer:#08111f;--theme-toast:#13243a;--theme-toast-visual:#1c3150;--theme-toast-border:#3e638b;--theme-nav:#111f33;--theme-nav-hover:#182b45;--site-link:#a2c8ff;--site-button:#97baff;--site-on-button:#102340;color-scheme:dark}
body[data-page].theme-love{--theme-bg:#fff7fb;--theme-top:#fffafd;--theme-surface:#fffafd;--theme-surface-2:#fff0f6;--theme-border:#f0cfdd;--theme-text:#4c3040;--theme-muted:#745367;--theme-accent:#c95b8d;--theme-accent-2:#e68fb3;--theme-badge:#c95b8d;--theme-chip:#fff0f6;--theme-hero:#fff0f6;--theme-input:#fffafd;--theme-footer:#fff0f6;--theme-toast:#fffafd;--theme-toast-visual:#ffe7f1;--theme-toast-border:#edc4d6;--theme-nav:#fffafd;--theme-nav-hover:#fff0f6;--site-link:#92355f;--site-button:#a43f70;--site-on-button:#ffffff;color-scheme:light}
body[data-page].theme-night{--theme-bg:#0a1626;--theme-top:#0d1b2d;--theme-surface:#13233a;--theme-surface-2:#182b45;--theme-border:#35506f;--theme-text:#eef4ff;--theme-muted:#b6c8df;--theme-accent:#2f7df6;--theme-accent-2:#66abff;--theme-badge:#5d6bff;--theme-chip:#1a3150;--theme-hero:#11243f;--theme-input:#0d192a;--theme-footer:#08111f;--theme-toast:#13243a;--theme-toast-visual:#1b3150;--theme-toast-border:#3f648e;--theme-nav:#102038;--theme-nav-hover:#182d4a;--site-link:#9dccff;--site-button:#2863c4;--site-on-button:#ffffff;color-scheme:dark}
body[data-page].theme-powder{--theme-bg:#fff8fb;--theme-top:#fff9fc;--theme-surface:#fffdfd;--theme-surface-2:#fff3f7;--theme-border:#efcfdb;--theme-text:#4f3947;--theme-muted:#795566;--theme-accent:#d86c98;--theme-accent-2:#ef9dbc;--theme-badge:#c95b8d;--theme-chip:#ffeaf2;--theme-hero:#fff0f5;--theme-input:#fffdfd;--theme-footer:#fff1f6;--theme-toast:#fffdfd;--theme-toast-visual:#ffeaf2;--theme-toast-border:#e7bfd1;--theme-nav:#fffafd;--theme-nav-hover:#fff0f6;--site-link:#9d3e69;--site-button:#a63c6a;--site-on-button:#ffffff;color-scheme:light}
body[data-page].theme-aurora{--theme-bg:#081421;--theme-top:#0c1b2d;--theme-surface:#10263b;--theme-surface-2:#15314b;--theme-border:#305a73;--theme-text:#effcff;--theme-muted:#b0ccdc;--theme-accent:#58d6cb;--theme-accent-2:#81b8ff;--theme-badge:#8a7dff;--theme-chip:#12344b;--theme-hero:#10253c;--theme-input:#0c1928;--theme-footer:#07111c;--theme-toast:#11273d;--theme-toast-visual:#173853;--theme-toast-border:#3c6d88;--theme-nav:#0f2136;--theme-nav-hover:#17304a;--site-link:#85e6dc;--site-button:#58d6cb;--site-on-button:#092b30;color-scheme:dark}
body[data-page].theme-emerald{--theme-bg:#07150f;--theme-top:#0d1f18;--theme-surface:#11261e;--theme-surface-2:#173429;--theme-border:#2f6a57;--theme-text:#edfdf5;--theme-muted:#b0d0c1;--theme-accent:#13a977;--theme-accent-2:#62e0ba;--theme-badge:#32c28f;--theme-chip:#153228;--theme-hero:#122921;--theme-input:#0b1813;--theme-footer:#06110d;--theme-toast:#122a22;--theme-toast-visual:#17392e;--theme-toast-border:#34735f;--theme-nav:#10231c;--theme-nav-hover:#173328;--site-link:#7ce4b2;--site-button:#57d99e;--site-on-button:#102d22;color-scheme:dark}
body[data-page].theme-sakura{--theme-bg:#fffafe;--theme-top:rgba(255,252,255,.84);--theme-surface:rgba(255,255,255,.72);--theme-surface-2:rgba(255,245,251,.88);--theme-border:#e8d4e2;--theme-text:#4d3d4a;--theme-muted:#735567;--theme-accent:#c86ca0;--theme-accent-2:#d8a6ff;--theme-badge:#b96df0;--theme-chip:#fff0f7;--theme-hero:rgba(255,246,251,.82);--theme-input:rgba(255,255,255,.78);--theme-footer:#fdf2f8;--theme-toast:rgba(255,255,255,.86);--theme-toast-visual:#f8e8f2;--theme-toast-border:#e6cfe0;--theme-nav:rgba(255,255,255,.78);--theme-nav-hover:#fff4fb;--site-link:#963e75;--site-button:#9d417b;--site-on-button:#ffffff;color-scheme:light}
body[data-page]{
 --ui162-surface:var(--theme-surface);--ui162-soft:var(--theme-surface-2);--ui162-text:var(--theme-text);--ui162-muted:var(--theme-muted);--ui162-border:var(--theme-border);--ui162-link:var(--site-link);--ui162-button:var(--site-button);--ui162-on-button:var(--site-on-button);
 --surface:var(--theme-surface);--panel:var(--theme-surface);--card:var(--theme-top);--page-bg:var(--theme-bg);
}
body[data-page] main.wrap{--text:var(--theme-text);--ink:var(--theme-text);--muted:var(--theme-muted);--line:var(--theme-border);--soft:var(--theme-surface-2);color:var(--theme-text)}
body[data-page] main.wrap .admin111{--a111-surface:var(--theme-surface);--a111-border:var(--theme-border);--a111-text:var(--theme-text);--a111-muted:var(--theme-muted)}
body[data-page] main.wrap :is(.groups-v3-create,.cabinet-v2-list>a,.cabinet-v2-services>a,.account-settings-grid>a,.dating-wizard-card,.dating-wizard-steps>a,.dating-visible-switch,.admin111 .chip){background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
body[data-page] main.wrap :is(.dating-wizard-card,.dating-wizard-steps) :is(h2,h3,label,strong){color:var(--theme-text)!important}
body[data-page] main.wrap :is(.dating-wizard-card,.dating-wizard-steps) :is(p,small){color:var(--theme-muted)!important}
body[data-page] main.wrap .dating-wizard-steps>a.active{background:var(--site-button)!important;color:var(--site-on-button)!important}
body[data-page] main.wrap .dating-wizard-steps>a.active :is(b,span){color:inherit!important}
body[data-page] main.wrap .admin111 :is(table,thead,tbody,tr,td,th){border-color:var(--theme-border)}
body[data-page] main.wrap .admin111 :is(th,.admin111-toolbar,.admin111-tabs){background:var(--theme-surface-2);color:var(--theme-text)}
body[data-page] main.wrap :is(.empty,.notice,.error){overflow-wrap:anywhere}
body[data-page] main.wrap :is(.service118-page,.service126-page,.wallet116,.admin111) :is(input,textarea,select){color-scheme:inherit}
body[data-page] :is(.emoji-picker,.mail-bbcode-menu,.avatar-lightbox-dialog,.avatar-comment-pane){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}

/* Service previews inherit the selected theme; purchased background classes keep their own artwork. */
body[data-page] main.wrap .service120-preview-cover:not([class*="service120-bg-"]){background:var(--theme-surface-2)!important}
body[data-page] main.wrap :is(.service120-preview-cover b,.service120-swatch){background:var(--theme-surface)!important;border:1px solid var(--theme-border)}

/* 2026-10-07: shared sections must inherit every palette, including night2. */
body[data-page] main.wrap :is(.chip,.plan-badge){
 background:var(--theme-surface-2)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important
}
body[data-page] main.wrap :is(.search-panel,.empty,.analytics-kpis>article,.messenger-viber,.mail-list-head){
 background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important
}
body[data-page] main.wrap .analytics-range a:not(.active){
 background:var(--theme-surface-2)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important
}
body[data-page] main.wrap a:not([class]):not([style]):not([aria-current]){
 color:var(--site-link)
}
body[data-page] main.wrap :is(.market77-results,.market77-breadcrumb,.market77-card footer) a:not(.button){
 color:var(--site-link)!important
}
body[data-page] main.wrap :is(.search-panel,.mail-list-head) :is(h1,h2,h3,strong,b,label){color:var(--theme-text)!important}
body[data-page] main.wrap .mail-list-head small{color:var(--theme-muted)!important}
body[data-page].guest-user>.top{background:var(--theme-top)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
body[data-page].guest-user>.top :is(.brand,.brand-copy b,.brand-copy small){color:var(--theme-text)!important}
body[data-page].guest-user>.top .lang-switch a{background:var(--theme-surface-2)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
body[data-page].guest-user>.top .lang-switch a.active{background:var(--site-button)!important;color:var(--site-on-button)!important}
body[data-page].theme-night2 main.wrap .feed-v3-categories .active{color:#102039!important}

/* Messenger search and icon controls inherit the palette too. */
body[data-page] main.wrap .mail-search{background:var(--theme-surface-2)!important;color:var(--theme-muted)!important;border-color:var(--theme-border)!important}
body[data-page] main.wrap .mail-search input{background:transparent!important;color:var(--theme-text)!important;border:0!important}
body[data-page] main.wrap :is(.mail-app-back,.mail-find){color:var(--site-link)!important}

/* Public informational notices use the same readable palette. */
body[data-page] main.wrap .notice{background:var(--theme-surface-2)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}

body[data-page] main.wrap .market77-price{color:var(--site-link)!important}
