/* Patiyiz final color/seen layer — 2026-10-29.
   Loaded last, dark surfaces stay dark and texts legible.
   Deliberately do not recolor media, full-screen stories/Reels, videos or user photos. */

/* Viewed stories are still available during the full 24h lifecycle. */
#main-content .stories-strip .story-person.has-unseen-story>.story-avatar,
#main-content .stories-strip .story-person.story-own>.story-own-photo.has-story{
 border:3px solid transparent!important;
 background:linear-gradient(var(--pati-story-interior,#fff),var(--pati-story-interior,#fff)) padding-box,
 linear-gradient(35deg,#ffb831,#ff5a3d,#fa225f,#cc10b4) border-box!important;
 border-radius:50%!important;
 box-sizing:border-box!important;
}
#main-content .stories-strip .story-person.has-viewed-story>.story-avatar,
#main-content .stories-strip .story-person.story-own>.story-own-photo.has-viewed-story{
 border:2px solid #a6a9af!important;
 background:transparent!important;
 box-sizing:border-box!important;
}
#main-content .stories-strip .story-person.has-viewed-story{opacity:.83}
#main-content .stories-strip .story-person.has-viewed-story .story-avatar img,
#main-content .stories-strip .story-own-photo.has-viewed-story img{opacity:1!important;filter:none!important}
#main-content .pati-ig-profile .pati-ig-avatar.pati-profile-story-seen{
 background:transparent!important;
 border:2px solid #a6a9af!important;
 box-sizing:border-box!important;
 padding:3px!important;
}
#main-content .pati-dm-layout .pati-dm-story-trigger.is-seen{
 background:#93979f!important;
}
html[data-pati-theme="dark"] #main-content .pati-dm-layout .pati-dm-story-trigger.is-seen{background:#626771!important}
html[data-pati-theme="dark"]{--pati-story-interior:#1c1d23}
html[data-pati-theme="light"]{--pati-story-interior:#fff}

/* Dark mode: shared semantic palette, including the late Patiyiz UI sheets. */
html[data-pati-theme="dark"]{
 color-scheme:dark;
 --pui-paper:#1a1c21;
 --pui-bg:#101115;
 --pui-raised:#24262e;
 --pui-input:#292b33;
 --pui-border:#454853;
 --pui-text:#f7f8fb;
 --pui-secondary:#c9cbd6;
 --pui-link:#d2dcff;
 --pui-shadow:0 6px 18px #0005;
 --pui-active-text:#fff;
 --pati-story-interior:#1a1c21;
 --patix-page:#101115;
 --patix-panel:#1a1c21;
 --patix-panel-raised:#24262e;
 --patix-field:#292b33;
 --patix-line:#454853;
 --patix-strong:#f7f8fb;
 --patix-muted:#d2d3db;
 --pati-audit-page:#101115;
 --pati-audit-card:#1a1c21;
 --pati-audit-raised:#24262e;
 --pati-audit-text:#f7f8fb;
 --pati-audit-sub:#c9cbd6;
 --pati-audit-border:#454853;
 --pati-audit-control:#292b33;
 --bg:#101115;--paper:#1a1c21;--ink:#f7f8fb;--ink-soft:#d3d5dd;
 --border:#454853;--muted:#c9cbd6;--pati-bg:#101115;--pati-card:#1a1c21;
 --pati-ink:#f7f8fb;--pati-muted:#c9cbd6;
}
html[data-pati-theme="dark"] :is(body,#app-root,#app-root .app-shell,#app-root .main,#main-content){
 background:#101115!important;color:#f7f8fb!important;
}
html[data-pati-theme="dark"] #app-root :is(
 .sidebar,.right-rail,.mobile-header,.mobile-bottom,.mobile-nav
){
 background:#1a1c21!important;color:#f7f8fb!important;border-color:#454853!important;
}
html[data-pati-theme="dark"] #main-content :is(
 .pati-ig-profile,.pati-ig-summary,.pati-ig-highlights,.pati-ig-tabs,
 .stories-section,.pati-home-feed-tabs,.pati-feed-posts,.pati-feed-card,.pati-feed-card-header,
 .pati-feed-text-content,.pati-post-details,.pati-social-actions,
 .pati-settings-list,.pati-settings-list section,.pati-theme-card,
 .pati-pets-page,.pati-own-pets,.pati-own-pets-list article,.pati-pet-hub,
 .pati-ref-hub,.pati-ref-care,.pati-care-simple,.care-v2,.wellness-v2,
 .p4-hub,.p4-health,.p4-shop,.pati-health-home,.pati-shop-v2,
 .pati-knowledge-home,.kb-v2,.kb-v2-card,.pati-ref-kb-home,
 .pati-ref-academy-home,.pati-ref-academy-list,.pati-edu-v2,
 .pati-edu-path-home,.pati-edu-path-list,.edu-v2-detail,
 .pati-community-head,.pati-community-card,.pati-question-list,
 .pati-saved-posts,.pati-saved-heading,.pati-notifications-simple,
 .pati-explore-media-screen,.pati-search-screen,.pati-detail-toolbar,
 .pati-profile-text-feed,.pati-profile-text-item
){
 background-color:#1a1c21!important;
 color:#f7f8fb!important;
 border-color:#454853!important;
}
html[data-pati-theme="dark"] #main-content :is(
 .pati-ig-profile,.pati-settings-list,.pati-pets-page,.pati-own-pets,.pati-pet-hub,
 .pati-ref-hub,.pati-care-simple,.care-v2,.wellness-v2,
 .p4-hub,.p4-health,.p4-shop,.pati-shop-v2,.pati-knowledge-home,
 .pati-ref-kb-home,.kb-v2,.pati-ref-academy-home,.pati-ref-academy-list,
 .pati-edu-path-home,.pati-edu-path-list,.pati-explore-media-screen,.pati-search-screen
){
 background-color:#101115!important;
}
html[data-pati-theme="dark"] #main-content :is(
 .pati-card,.pati-ig-actions,.pati-ig-bio,.pati-hub-hero,.pati-care-card,
 .pati-ref-care-task,.pati-ref-pet-tile,.pati-health-pet,.pati-health-next,
 .pati-edu-step,.pati-edu-quiz,.pati-edu-lesson-body,.pati-edu-path-item,
 .pati-ref-academy-topic,.pati-edu-v2-card,.edu-v2-card,.kb-v2-article,
 .pati-shop-card,.pati-shop-item,.pati-reward-card,.pati-coin-card,
 .pati-community-question,.pati-community-reply,.pati-community-card,
 .pati-search-field,.pati-search-results,.pati-search-user,
 .pati-following-empty,.pati-notification-item,.pati-settings-item,
 .pati-detail-toolbar,.pati-following-state,.pati-dm-top
){
 background-color:#24262e!important;color:#f7f8fb!important;
 border-color:#454853!important;
}
html[data-pati-theme="dark"] #main-content :is(
 h1,h2,h3,h4,h5,h6,.page-title,.pati-ig-name,.pati-ig-handle,
 .pati-ig-stats b,.pati-post-caption,.pati-feed-pet,
 .pati-profile-text-feed .pati-post-caption,.pati-post-like-summary,
 .pati-story-person-name,.pati-menu-title
){
 color:#f7f8fb!important;
 text-shadow:none;
}
html[data-pati-theme="dark"] #main-content :is(
 p,small,label,.muted,.meta,.pati-post-time,.pati-ig-bio,
 .pati-ig-stats small,.pati-profile-text-feed .pati-post-time,
 .pati-settings-description,.pati-story-person-label
){
 color:#d0d2dd!important;
}
html[data-pati-theme="dark"] #main-content :is(
 .pati-feed-card,.pati-post-details,.pati-social-actions,
 .pati-community-card,.pati-ig-profile,.pati-pets-page
) :is(strong,span:not(.pati-heart-burst),time){
 color:inherit;
}
html[data-pati-theme="dark"] #main-content :is(
 input:not([type="checkbox"]):not([type="radio"]),textarea,select,
 .pati-search-field input,.pati-collab-search-results
){
 color-scheme:dark!important;
 background:#292b33!important;
 color:#f7f8fb!important;
 border-color:#555966!important;
}
html[data-pati-theme="dark"] #main-content :is(input,textarea)::placeholder{
 color:#bfc2ce!important;opacity:1!important;
}
html[data-pati-theme="dark"] #main-content :is(
 .pati-ig-actions button,.pati-page-back,.pati-theme-options button,
 .pati-list-filter button,.pati-explore-sort button,.pati-shop-filter button,
 .pati-dm-filters button,.pati-story-quick-buttons button
){
 background:#2b2e37!important;color:#f7f8fb!important;
 border-color:#50535f!important;
}
html[data-pati-theme="dark"] #main-content :is(
 .pati-ig-tabs button.active,.pati-dm-filters button.active,.pati-theme-options button.active,
 .pati-explore-sort button.active,.pati-shop-filter button.active,
 .pati-home-feed-tabs button.active
){
 background:#373a45!important;color:#fff!important;border-color:#6a6e7c!important;
}
html[data-pati-theme="dark"] #main-content :is(
 .pati-ig-tabs button.active,.pati-dm-filters button.active,.pati-theme-options button.active,
 .pati-explore-sort button.active,.pati-shop-filter button.active
) :is(span,small,strong,svg,.icon){
 color:#fff!important;stroke:currentColor!important;
}
html[data-pati-theme="dark"] :is(#modal-root,#tools-form,#auth-root) :is(
 .modal,.modal-content,.modal-header,.modal-footer,.auth-card,
 .pati-feature-group,.pati-features-list,.pati-menu-notifications-list,
 .pati-feature-notifications,.pati-menu-tone-blue,.pati-menu-tone-green,
 .pati-menu-tone-orange,.pati-menu-tone-purple,.pati-feature-editor,
 .pati-community-form-intro,.pati-pet-edit-modal,.pati-question-fullscreen,
 .pati-links-editor,.pati-profile-editor,.pati-field,.pati-dm-reaction-picker,
 .pati-dm-message-actions
){
 background:#1a1c21!important;color:#f7f8fb!important;
 border-color:#454853!important;
}
html[data-pati-theme="dark"] :is(#modal-root,#tools-form,#auth-root) :is(
 .pati-mobile-menu-item,.pati-menu-notifications-top,.pati-menu-notifications-list,
 .pati-feature-add-pet,.pati-edit-avatar,.pati-pet-photo-select,
 .pati-community-form-note,.pati-upload-options,.pati-media-gallery,
 .pati-collab-selected,.pati-collab-search-results,.pati-collab-option,
 .pati-user-option,.pati-dm-image-select
){
 background:#24262e!important;color:#f7f8fb!important;
 border-color:#454853!important;
}
html[data-pati-theme="dark"] :is(#modal-root,#tools-form,#auth-root) :is(
 h1,h2,h3,h4,strong,label,.pati-menu-title,.modal-title,
 .pati-mobile-menu-item>span,.pati-menu-notifications-top h3
){color:#f7f8fb!important}
html[data-pati-theme="dark"] :is(#modal-root,#tools-form,#auth-root) :is(
 p,small,.muted,.meta,.pati-feature-intro,.pati-community-form-note
){color:#d0d2dd!important}
html[data-pati-theme="dark"] :is(#modal-root,#tools-form,#auth-root) :is(
 input:not([type="checkbox"]):not([type="radio"]),select,textarea
){
 color-scheme:dark!important;background:#292b33!important;
 color:#f7f8fb!important;border-color:#545865!important;
}
html[data-pati-theme="dark"] :is(#modal-root,#tools-form,#auth-root) :is(input,textarea)::placeholder{color:#bec1cf!important}
html[data-pati-theme="dark"] #tools-form .pati-mobile-menu-item :is(span,strong,small,svg,.icon){
 color:#f7f8fb!important;stroke:currentColor!important;
}
html[data-pati-theme="dark"] #main-content .pati-dm-layout :is(
 .chat-people,.chat-window,.chat-history,.chat-form,.pati-dm-list-row,.pati-dm-filters
){background:#1a1c21!important;color:#f7f8fb!important;border-color:#454853!important}
html[data-pati-theme="dark"] #main-content .pati-dm-layout .chat-history{background:#14161a!important}
html[data-pati-theme="dark"] #main-content .pati-dm-layout .bubble-chat:not(.mine){
 background:#292b33!important;color:#f7f8fb!important;
}
html[data-pati-theme="dark"] #main-content .pati-dm-layout .bubble-chat.mine{
 background:#284435!important;color:#f7f8fb!important;
}
html[data-pati-theme="dark"] #main-content .pati-dm-layout .chat-window>header{
 background:#1a1c21!important;color:#f7f8fb!important;border-color:#454853!important;
}
/* Preserve native player artwork and embedded media across themes. */
html[data-pati-theme="dark"] #main-content :is(
 .pati-reel-item,.pati-reel-rail,.pati-reel-author,.pati-video-frame,
 .pati-carousel,.pati-carousel-slide,.pati-photo,.pati-profile-tile,
 .pati-pet-photo,.pati-profile-view-count
) :is(img,video,canvas){filter:none!important;opacity:1!important}
html[data-pati-theme="dark"] #story-overlay,
html[data-pati-theme="dark"] .story-player{background:#08090b!important;color:#fff!important}
@media(max-width:740px){
 html[data-pati-theme="dark"] #main-content .stories-section{
  border-color:#30333b!important;
 }
}


/* Higher-specificity repairs for old hardcoded white profile and feed layouts. */
html[data-pati-theme="dark"] #main-content .pati-ig-profile .pati-ig-grid,
html[data-pati-theme="dark"] #main-content .pati-ig-profile .pati-ig-summary,
html[data-pati-theme="dark"] #main-content .pati-ig-profile .pati-ig-highlights,
html[data-pati-theme="dark"] #main-content .pati-ig-profile .pati-ig-tabs,
html[data-pati-theme="dark"] #main-content .pati-ig-profile .pati-profile-text-feed,
html[data-pati-theme="dark"] #main-content .pati-ig-profile .pati-profile-text-item,
html[data-pati-theme="dark"] #main-content .pati-feed-posts>.pati-feed-card,
html[data-pati-theme="dark"] #main-content .stories-section .stories-strip,
html[data-pati-theme="dark"] #main-content .pati-pets-page .pati-pets-grid,
html[data-pati-theme="dark"] #main-content .pati-saved-posts .pati-ig-grid{
 background:#1a1c21!important;color:#f7f8fb!important;border-color:#454853!important;
}
html[data-pati-theme="dark"] #main-content .pati-ig-profile .pati-profile-tile:not(:has(img,video)){
 background:#292b33!important;color:#f7f8fb!important;
}
html[data-pati-theme="dark"] #main-content .pati-ig-profile .pati-ig-grid .pati-ig-empty{
 background:#1a1c21!important;color:#d0d2dd!important;
}
html[data-pati-theme="dark"] #main-content .pati-ig-profile .pati-ig-summary :is(strong,span,small,p){
 color:#f7f8fb!important;
}
html[data-pati-theme="dark"] #main-content .pati-ig-profile .pati-ig-stats small,
html[data-pati-theme="dark"] #main-content .pati-ig-profile .pati-ig-bio{
 color:#d0d2dd!important;
}
