/* v15.41.62 — shared contrast contract; loaded last on full and partial pages. */
body[data-page]{
 --ui162-surface:var(--theme-surface,#fff);--ui162-soft:var(--theme-surface-2,var(--soft,#eaf0ff));
 --ui162-text:var(--theme-text,var(--ink,#192533));--ui162-border:var(--theme-border,var(--line,#dce4e8));
 --ui162-muted:#526276;--ui162-link:#2455a4;--ui162-button:#354b83;--ui162-on-button:#fff;
}
body.theme-dark{--ui162-surface:#142238;--ui162-soft:#1b304a;--ui162-muted:#b5c4d9;--ui162-link:#a2c8ff;--ui162-button:#97baff;--ui162-on-button:#102340}
body.theme-love{--ui162-muted:#745367;--ui162-link:#92355f;--ui162-button:#a43f70}
body.theme-night{--ui162-muted:#b6c8df;--ui162-link:#9dccff;--ui162-button:#2863c4}
body.theme-powder{--ui162-muted:#795566;--ui162-link:#9d3e69;--ui162-button:#a63c6a}
body.theme-aurora{--ui162-muted:#b0ccdc;--ui162-link:#85e6dc;--ui162-button:#58d6cb;--ui162-on-button:#092b30}
body.theme-emerald{--ui162-muted:#b0d0c1;--ui162-link:#7ce4b2;--ui162-button:#57d99e;--ui162-on-button:#102d22}
body.theme-sakura{--ui162-muted:#735567;--ui162-link:#963e75;--ui162-button:#9d417b}
/* Surface containers: do not target photo covers, paid decorations or image overlays. */
body[data-page] main.wrap :is(.panel,.showcase-card,.showcase-post,.wall-post,.job-card,.person-card,.housing-card,.shop-card,.course-card,.guide-card,.event-card,.group-card,.notification-card,.platform-card,.pricing-card,.wallet116-card,.service118-card,.group-post-card,.group-side-card,.cabinet-setting-panel,.privacy-card){background:var(--ui162-surface)!important;color:var(--ui162-text)!important;border-color:var(--ui162-border)!important}
body[data-page] main.wrap :is(.panel,.job-card,.person-card,.housing-card,.shop-card,.course-card,.guide-card,.event-card,.group-card,.notification-card,.platform-card,.pricing-card,.wallet116-card,.service118-card,.group-post-card,.group-side-card) > :is(h1,h2,h3,p,label){color:var(--ui162-text)!important}
body[data-page] main.wrap :is(.panel,.job-card,.person-card,.housing-card,.shop-card,.course-card,.guide-card,.event-card,.group-card,.notification-card,.platform-card,.pricing-card,.wallet116-card,.service118-card,.group-post-card,.group-side-card) > a:not(.button):not([class*="service120-name-"]){color:var(--ui162-link)!important}
body[data-page] main.wrap :is(.panel,.job-card,.person-card,.housing-card,.shop-card,.course-card,.guide-card,.event-card,.group-card,.notification-card,.platform-card,.pricing-card,.wallet116-card,.service118-card,.group-side-card) :is(.muted,.byline,.excerpt,small){color:var(--ui162-muted)!important}
body[data-page] main.wrap :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]),textarea,select){background:var(--theme-input,var(--ui162-surface))!important;color:var(--ui162-text)!important;border-color:var(--ui162-border)!important}
body[data-page] main.wrap :is(input,textarea)::placeholder{color:var(--ui162-muted)!important;opacity:1}
body[data-page] main.wrap select option{background:var(--ui162-surface);color:var(--ui162-text)}
body[data-page] main.wrap :is(.button,form>button,.actions>button,.profile78-compose-tools>button,.wall-comment-form>button):not(.ghost):not(.danger):not(.link-danger):not(.public-avatar-button){background:var(--ui162-button)!important;color:var(--ui162-on-button)!important;border-color:var(--ui162-button)!important;text-shadow:none!important}
body[data-page] main.wrap :is(.ghost,button.ghost,a.ghost){background:var(--ui162-soft)!important;color:var(--ui162-text)!important;border-color:var(--ui162-border)!important;text-shadow:none!important}
body[data-page] main.wrap :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--ui162-link)!important;outline-offset:3px}
/* The profile files used hard-coded white surfaces and dark blue tab labels. */
body[data-page] #social.profile79{color:var(--ui162-text);--muted:var(--ui162-muted)}
body[data-page] #social.profile79 :is(.showcase-card,.showcase-post,.wall-post,.showcase-gallery,.profile78-tabs){background:var(--ui162-surface)!important;color:var(--ui162-text)!important;border-color:var(--ui162-border)!important}
body[data-page] #social.profile79 .showcase-card :is(h2,p,dd),body[data-page] #social.profile79 .showcase-post p{color:var(--ui162-text)!important}
body[data-page] #social.profile79 :is(.showcase-card,.showcase-post) :is(dt,small,.muted){color:var(--ui162-muted)!important}
body[data-page] #social.profile79 :is(.profile78-tabs a,.showcase-card a:not([class*="service120-name-"]),.showcase-group,.profile78-compose-tools label,.wall-button){color:var(--ui162-link)!important}
body[data-page] #social.profile79 .profile78-tabs a.is-active{border-bottom-color:var(--ui162-link)!important}
body[data-page] #social.profile79 .profile78-compose-tools label{background:transparent!important}
body[data-page] #social.profile79 .profile-admin-details{background:var(--ui162-surface)!important;color:var(--ui162-text)!important;border-color:var(--ui162-border)!important}
body[data-page] #social.profile79 .profile-admin-details summary{color:var(--ui162-link)!important}
body[data-page] #social.profile79 .social-profile-actions :is(.button,button):not(.ghost):not(.danger):not(.link-danger),body[data-page] #social.profile79 .wall-actions button:not(.wall-button){background:var(--ui162-button)!important;color:var(--ui162-on-button)!important;border-color:var(--ui162-button)!important;text-shadow:none!important}
body[data-page] #social.profile79 .public-avatar-button:not([class*="frame118-"]){background:transparent!important;padding:0!important;border-radius:50%!important;}
body[data-page] #social.profile79 .public-facebook-main .public-facebook-copy :is(h1:not([class*="service120-name-"]),p){color:#fff!important;text-shadow:0 1px 3px #0009}
body[data-page] #social.profile79 .public-facebook-main{background:linear-gradient(0deg,rgba(3,20,43,.96),rgba(3,20,43,.6) 55%,rgba(3,20,43,.08))!important}

/* Keep paid name hues readable on dark themes and on the cover image. */
body:is(.theme-dark,.theme-night,.theme-aurora,.theme-emerald) .service120-name-ocean,body #social.profile79 .public-facebook-copy .service120-name-ocean{--service120-name:#80cfff}
body:is(.theme-dark,.theme-night,.theme-aurora,.theme-emerald) .service120-name-violet,body #social.profile79 .public-facebook-copy .service120-name-violet{--service120-name:#d0b4ff}
body:is(.theme-dark,.theme-night,.theme-aurora,.theme-emerald) .service120-name-emerald,body #social.profile79 .public-facebook-copy .service120-name-emerald{--service120-name:#8ee9c4}
body:is(.theme-dark,.theme-night,.theme-aurora,.theme-emerald) .service120-name-rose,body #social.profile79 .public-facebook-copy .service120-name-rose{--service120-name:#ffb6d8}
/* The reference layout had a night-only background on every main wrapper. */
body[data-page]>main.wrap{background:transparent!important;color:var(--ui162-text)!important}
/* Older modules use a second set of tokens; resolve them from the active theme. */
body[data-page] :is(.wallet116,.service118-page,.service126-page){--panel:var(--ui162-surface);--text:var(--ui162-text);--muted:var(--ui162-muted);--line:var(--ui162-border);color:var(--ui162-text)}
body[data-page] .wallet116 :is(.wallet116-current,.wallet116-tabs,.wallet116-period,.wallet116-plan,.wallet116-package,.wallet116-recipient,.wallet116-gift,.wallet116-sendbar,.wallet116-history){background:var(--ui162-surface)!important;color:var(--ui162-text)!important;border-color:var(--ui162-border)!important}
body[data-page] .wallet116 :is(p,small){color:var(--ui162-muted)!important}
body[data-page] .wallet116-balance,body[data-page] .wallet116-balance :is(p,small){color:#fff!important}
body[data-page] .wallet116 :is(.wallet116-tabs,.wallet116-period) a.active{background:var(--ui162-soft)!important;color:var(--ui162-link)!important}
body[data-page] .n91-page :is(.n91-recent,.n91-attention,.n91-row,.n91-request,.n91-settings>div,.n91-more>div),body[data-page] .n91-categories>a{background:var(--ui162-surface)!important;color:var(--ui162-text)!important;border-color:var(--ui162-border)!important}
body[data-page] .n91-categories>a.active,body[data-page] .n91-row.is-unread{background:var(--ui162-soft)!important}
body[data-page] .n91-page :is(h1,h2,.n91-row-copy b,.n91-row-copy span,.n91-categories b){color:var(--ui162-text)!important}
body[data-page] .n91-page :is(time,small){color:var(--ui162-muted)!important}
body[data-page] .group-page-modern :is(.social-actions button,.social-actions a,.feed-v3-comment summary){background:transparent!important;color:var(--ui162-link)!important;border-color:transparent!important;box-shadow:none!important}
body[data-page] .group-page-modern .feed-v3-comment small{color:var(--ui162-muted)!important}
body[data-page] .dating2-page .dating2-tabs>a{background:var(--ui162-surface)!important;color:var(--ui162-text)!important;border-color:var(--ui162-border)!important}
body[data-page] .dating2-page .dating2-tabs>a.active{background:var(--ui162-soft)!important;color:var(--ui162-link)!important;border-color:var(--ui162-link)!important}
body[data-page] .mail-page-viber :is(.conversation-list,.conversation,.viber-thread-head,.thread,.viber-compose){background:var(--ui162-surface)!important;color:var(--ui162-text)!important;border-color:var(--ui162-border)!important}
body[data-page] .mail-page-viber :is(.conversation.active,.conversation:hover,.thread-body){background:var(--theme-bg,var(--cream,#f5f7fa))!important}
body[data-page] .mail-page-viber :is(.conversation,.thread-peer-info) b:not([class*="service120-name-"]){color:var(--ui162-text)!important}
body[data-page] .mail-page-viber :is(.conversation small,.conversation-preview,.conversation time,.thread-peer-info small){color:var(--ui162-muted)!important}
body[data-page] .mail-page-viber .bubble.theirs{background:var(--ui162-surface)!important;color:var(--ui162-text)!important;border-color:var(--ui162-border)!important}
body[data-page] .mail-page-viber .bubble.mine{background:var(--ui162-soft)!important;color:var(--ui162-text)!important;border-color:var(--ui162-border)!important}
body[data-page] .mail-page-viber .bubble p{color:var(--ui162-text)!important}
body[data-page] .mail-page-viber .bubble small{color:var(--ui162-muted)!important}

/* v15.41.67 — mobile/app mode must keep the selected site theme.
   style.css has a legacy mobile rule that forces app-mode to #f4f7fb,
   which wins over the theme body selector because of higher specificity. */
@media(max-width:760px){
 body[data-page].app-mode.theme-dark:not(.mail-viber-page){background:#0a1626!important;color:var(--theme-text,#f4f7ff)!important}
 body[data-page].app-mode.theme-love:not(.mail-viber-page){background:linear-gradient(180deg,#fff8fb 0%,#fff1f7 100%)!important;color:var(--theme-text,#4c3040)!important}
 body[data-page].app-mode.theme-night:not(.mail-viber-page){background:#05111f!important;color:var(--theme-text,#eef4ff)!important}
 body[data-page].app-mode.theme-powder:not(.mail-viber-page){background:linear-gradient(180deg,#fff8fb 0%,#fff3f8 100%)!important;color:var(--theme-text,#4f3947)!important}
 body[data-page].app-mode.theme-aurora:not(.mail-viber-page){background:radial-gradient(circle at 18% 0%,rgba(96,230,216,.18),transparent 26%),radial-gradient(circle at 82% 0%,rgba(136,170,255,.18),transparent 23%),#081421!important;color:var(--theme-text,#effcff)!important}
 body[data-page].app-mode.theme-emerald:not(.mail-viber-page){background:radial-gradient(circle at top,rgba(25,181,123,.13),transparent 28%),#07150f!important;color:var(--theme-text,#edfdf5)!important}
 body[data-page].app-mode.theme-sakura:not(.mail-viber-page){background:linear-gradient(180deg,#fffefe 0%,#fff7fb 100%)!important;color:var(--theme-text,#4d3d4a)!important}
 body[data-page].app-mode:not(.mail-viber-page)>main.wrap{background:transparent!important}
}

/* v15.41.68 — mobile chat keyboard/focus must inherit the selected theme.
   Legacy focus CSS in mail-view.php uses --card/--page-bg with white/light fallbacks. */
:is(body.theme-dark,body.theme-love,body.theme-night,body.theme-powder,body.theme-aurora,body.theme-emerald,body.theme-sakura).mail-viber-page{
 --card:var(--theme-top);
 --page-bg:var(--theme-bg);
 --panel:var(--theme-surface);
 --ink:var(--theme-text);
 --line:var(--theme-border);
}
@media(max-width:760px){
 :is(body.theme-dark,body.theme-love,body.theme-night,body.theme-powder,body.theme-aurora,body.theme-emerald,body.theme-sakura).mail-viber-page:is(.chat-focus-active,.chat-input-focus) .thread,
 :is(body.theme-dark,body.theme-love,body.theme-night,body.theme-powder,body.theme-aurora,body.theme-emerald,body.theme-sakura).mail-viber-page:has(#messageBody:focus) .thread{
  background:var(--theme-bg)!important;color:var(--theme-text)!important;
 }
 :is(body.theme-dark,body.theme-love,body.theme-night,body.theme-powder,body.theme-aurora,body.theme-emerald,body.theme-sakura).mail-viber-page:is(.chat-focus-active,.chat-input-focus) .thread-head.viber-thread-head,
 :is(body.theme-dark,body.theme-love,body.theme-night,body.theme-powder,body.theme-aurora,body.theme-emerald,body.theme-sakura).mail-viber-page:has(#messageBody:focus) .thread-head.viber-thread-head,
 :is(body.theme-dark,body.theme-love,body.theme-night,body.theme-powder,body.theme-aurora,body.theme-emerald,body.theme-sakura).mail-viber-page:is(.chat-focus-active,.chat-input-focus) .viber-compose,
 :is(body.theme-dark,body.theme-love,body.theme-night,body.theme-powder,body.theme-aurora,body.theme-emerald,body.theme-sakura).mail-viber-page:has(#messageBody:focus) .viber-compose{
  background:var(--theme-top)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;
 }
 :is(body.theme-dark,body.theme-love,body.theme-night,body.theme-powder,body.theme-aurora,body.theme-emerald,body.theme-sakura).mail-viber-page:is(.chat-focus-active,.chat-input-focus) .thread-body,
 :is(body.theme-dark,body.theme-love,body.theme-night,body.theme-powder,body.theme-aurora,body.theme-emerald,body.theme-sakura).mail-viber-page:has(#messageBody:focus) .thread-body{
  background:linear-gradient(180deg,var(--theme-bg),var(--theme-surface))!important;color:var(--theme-text)!important;
 }
 :is(body.theme-dark,body.theme-love,body.theme-night,body.theme-powder,body.theme-aurora,body.theme-emerald,body.theme-sakura).mail-viber-page:is(.chat-focus-active,.chat-input-focus) #messageBody,
 :is(body.theme-dark,body.theme-love,body.theme-night,body.theme-powder,body.theme-aurora,body.theme-emerald,body.theme-sakura).mail-viber-page:has(#messageBody:focus) #messageBody{
  background:var(--theme-input)!important;color:var(--theme-text)!important;border-color:var(--theme-accent)!important;
 }
}
