/* SGC luxury black and gold theme. Applied to all user-facing sections. */
html[data-sgc-theme="dark"]{
 color-scheme:dark!important;
 --ink:#f6e9cc!important;--cream:#090909!important;--paper:#171511!important;
 --blush:#211b13!important;--pink:#211b13!important;--lav:#201c15!important;
 --butter:#322916!important;--line:#c6a35450!important;--muted:#c7b894!important;
 --bg:#090909!important;--surface:#171511!important;--panel:#171511!important;
 --text:#f6e9cc!important;--gold:#d9b76b!important;
 --primary:#d9b76b!important;--accent:#d9b76b!important;
 background:#090909!important;color:#f6e9cc!important;
}
html[data-sgc-theme="dark"] body,
html[data-sgc-theme="dark"] :is(.wrap,.layout,.site-main,.page,.main-content,.dashboard,.academy,.community-page,.members-page,.sgc-profile-document-mode){
 background-color:#090909!important;color:#f6e9cc!important;
}
html[data-sgc-theme="dark"] :is(
 header,nav,footer,aside,section,article,.card,.panel,.box,.tile,.story,.post,
 .hero,.banner,.sidebar,.site-nav,.site-header,.topbar,.bottom-nav,.mobile-nav,
 .sgc-member-card,.sgc-modal,.sgc-private-chat-view,.sgc-chat-messages,
 .sgc-private-chat-messages,.sgc-profile-page,.sgc-profile-card,
 .sgc-profile-summary,.sgc-profile-hero,.sgc-profile-tab-content,
 .sgc-faq-post,.sgc-faq-comment,.sgc-study-group-card,
 .sgc-story,.sgc-story-card,.sgc-profile-cover,.sgc-inspiration-card
 ){
 background-color:#171511!important;
 background-image:none!important;
 color:#f6e9cc!important;
 border-color:#c6a35440!important;
}
html[data-sgc-theme="dark"] :is(h1,h2,h3,h4,h5,h6,strong,b,.brand,.logo,.section-title){color:#e8ca83!important}
html[data-sgc-theme="dark"] :is(p,span,label,li,td,th,small,.muted,.caption){color:#e3d6b9}
html[data-sgc-theme="dark"] :is(a,a:visited){color:#e8ca83}
html[data-sgc-theme="dark"] :is(input,textarea,select,option){
 background:#211d16!important;color:#fff4d9!important;border:1px solid #8d7544!important;
}
html[data-sgc-theme="dark"] :is(input,textarea)::placeholder{color:#b6a789!important}
html[data-sgc-theme="dark"] :is(button,.btn,[role="button"],.pill,.chip){
 border-color:#a98b4b!important;
}
html[data-sgc-theme="dark"] :is(.btn.soft,.sgc-chat-bubble,.sgc-private-chat-messages .sgc-chat-bubble,.tab,.badge,.pill,.chip){
 background:#2a2418!important;color:#f3dca2!important;
}
html[data-sgc-theme="dark"] :is(.btn:not(.soft),button.active,.active-tab,.selected){
 background-color:#382b14!important;color:#f7e3b1!important;border-color:#c6a354!important;
}
html[data-sgc-theme="dark"] :is(.sgc-chat-bubble.mine,.sgc-private-chat-messages .sgc-chat-bubble.mine){background:#4a381b!important;color:#fff0c6!important}
html[data-sgc-theme="dark"] :is(hr,.divider){border-color:#c6a35440!important}
html[data-sgc-theme="dark"] .sgc-theme-switch{
 background:#171511!important;color:#f4d58e!important;
 border:1px solid #d9b76b!important;box-shadow:0 4px 18px #0009!important;
}
html:not([data-sgc-theme="dark"]) .sgc-theme-switch{
 background:#f0e4f0!important;color:#4d354e!important;border-color:#d8c4da!important;
}
.sgc-theme-switch{
 position:fixed!important;top:calc(12px + env(safe-area-inset-top,0px))!important;
 right:12px!important;z-index:2147481000!important;border-radius:999px!important;
 padding:9px 13px!important;font:600 12px/1.2 Arial,sans-serif!important;
 box-shadow:0 4px 15px #2a152a20!important;cursor:pointer!important;
 width:auto!important;min-width:100px!important;max-width:145px!important;height:auto!important;
 letter-spacing:0!important;
}
@media(max-width:700px){.sgc-theme-switch{
 top:auto!important;bottom:calc(85px + env(safe-area-inset-bottom,0px))!important;
 right:12px!important;padding:9px 12px!important;font-size:11px!important;
}}

/* Black + gold only: override legacy purple/pastel styles and hardcoded gradients. */
html[data-sgc-theme="dark"]{
 --purple:#c9a85d!important;--lavender:#2b251a!important;--blush:#171511!important;
 --pink:#171511!important;--rose:#c9a85d!important;--accent:#d9b76b!important;
 --primary:#d9b76b!important;--primary-color:#d9b76b!important;
 --card:#191713!important;--card-bg:#191713!important;--border:#9d824b!important;
 --gold:#d9b76b!important;--ink:#f7ebd1!important;--text:#f7ebd1!important;
}
html[data-sgc-theme="dark"] body :is(
 .card,.panel,.tile,.box,.hero,.banner,.quote-card,.story-card,.story-avatar,
 .story,.post,.feed,.feed-card,.sidebar,.side-card,.site-nav,.topbar,
 .mobile-bottom-nav,.bottom-nav,.nav-bar,.tabs,.tab-bar,.modal,.modal-content,
 .sgc-faq-feed,.sgc-faq-post,.sgc-faq-comment,.sgc-member-card,.sgc-profile-page,
 .sgc-profile-cover,.sgc-profile-hero,.sgc-profile-card,.sgc-profile-summary,
 .sgc-private-chat-view,.sgc-chat-messages,.sgc-private-chat-messages,
 .sgc-story,.sgc-story-card,.sgc-inspiration-card,.sgc-modal,.sgc-modal-backdrop,
 [class*="gradient"],[class*="pastel"],[class*="lavender"],[class*="blush"]
){
 background:#191713!important;background-image:none!important;
 border-color:#a88a4b55!important;color:#f7ebd1!important;
}
html[data-sgc-theme="dark"] body :is(
 .btn,.button,.chip,.pill,.badge,.nav-link,.tab,.tab-btn,
 [class*="button"],[class*="chip"],[class*="pill"],[class*="badge"]
){background-image:none!important;background-color:#292315!important;color:#f2d593!important;border-color:#a88a4b66!important}
html[data-sgc-theme="dark"] body :is(
 .btn-primary,.primary,.selected,.active,[aria-selected="true"],[aria-current="page"]
){background:#3c301a!important;color:#ffdfa0!important;border-color:#d9b76b!important}
html[data-sgc-theme="dark"] body :is(
 svg,svg path,svg circle,svg rect
){color:#d9b76b}
html[data-sgc-theme="dark"] body :is(
 .sgc-mobile-tabs,.sgc-mobile-nav,.sgc-bottom-nav,.sgc-app-nav,
 .sgc-members-hub,.sgc-members-content,.sgc-profile-tabs,
 .sgc-story-strip,.sgc-stories,.sgc-faq-feed
){background-color:#11100e!important;background-image:none!important;color:#f7ebd1!important}
html[data-sgc-theme="dark"] body :is(
 input,textarea,select,option,[contenteditable="true"]
){background:#242017!important;background-image:none!important;color:#fff1d0!important;border-color:#9e844f!important}
html[data-sgc-theme="dark"] body :is(
 button:hover,a:hover
){border-color:#e8c776!important}

/* Story cards remain visually distinct in black-and-gold mode. */
html[data-sgc-theme="dark"] #sgc-story-strip .sgc-story{
 background:linear-gradient(155deg,#2d2618 0%,#191713 65%,#332716 100%)!important;
 border:1.5px solid #d0ac60!important;
 border-radius:17px!important;
 box-shadow:inset 0 0 0 1px #d0ac602b,0 4px 16px #0008!important;
 color:#f6e5bf!important;
}
html[data-sgc-theme="dark"] #sgc-story-strip .sgc-story .story-name{
 color:#f6e5bf!important;
}
html[data-sgc-theme="dark"] #sgc-story-strip .sgc-story:before{
 color:#d9b76b!important;
}
html[data-sgc-theme="dark"] #sgc-story-strip .sgc-story.create{
 background:linear-gradient(155deg,#292315,#15130f)!important;
 border:1.5px solid #d0ac60!important;
}
html[data-sgc-theme="dark"] #sgc-story-strip .sgc-story .story-avatar{
 border:3px solid #e0c17c!important;
 box-shadow:0 0 0 2px #745c2e!important;
 background:#201b14!important;
}
html[data-sgc-theme="dark"] #sgc-story-strip .sgc-story:not(.create):not(.draft):not(.sgc-story-seen) .story-avatar{
 border-color:#e6c77e!important;
 box-shadow:0 0 0 2px #d3a94f!important;
}
html[data-sgc-theme="dark"] #sgc-story-strip .sgc-story.sgc-story-seen .story-avatar{
 border-color:#89744d!important;
 box-shadow:0 0 0 2px #53472f!important;
}

/* Dark-mode readability: light gold/cream text always sits on dark surfaces. */
html[data-sgc-theme="dark"] body :is(
 .sgc-faq-compose,.sgc-faq-feed,.sgc-faq-thread,.sgc-faq-post,.sgc-faq-comment,
 .sgc-profile-tabs,.sgc-profile-page,.sgc-profile-hero,.sgc-profile-card,
 .sgc-member-card,.sgc-study-group-card,.sgc-chat-bubble,
 .sgc-private-chat-messages,.sgc-private-chat-compose,.sgc-modal,
 .sgc-inspiration-card,.sgc-story,.sgc-story.create,
 .quote-card,.story-card,.post-card,.feed-card,
 .form-card,.content-card,.info-card,.access-card,
 .section-card,.stat-card,.lesson-card,.module-card,
 .dropdown-menu,.popover,.tooltip,.modal-content
){
 background-color:#11100e!important;
 color:#f7ebd1!important;
 border-color:#ad8d4a66!important;
}
html[data-sgc-theme="dark"] body :is(
 .sgc-faq-compose,.sgc-faq-feed,.sgc-faq-thread,.sgc-faq-post,
 .sgc-faq-comment,.sgc-profile-page,.sgc-member-card,.sgc-study-group-card,
 .sgc-private-chat-messages,.sgc-modal,.sgc-inspiration-card,
 .quote-card,.post-card,.feed-card,.form-card,.content-card,.info-card,
 .access-card,.section-card,.stat-card,.lesson-card,.module-card
) :is(p,span,label,small,strong,h1,h2,h3,h4,h5,h6){
 color:#f7ebd1!important;
}
html[data-sgc-theme="dark"] body :is(
 input,textarea,select,[contenteditable="true"],.sgc-faq-compose textarea
){
 background-color:#080808!important;
 color:#f9e8bd!important;
 border-color:#b99b5c!important;
}
html[data-sgc-theme="dark"] body :is(
 input,textarea,[contenteditable="true"]
)::placeholder{color:#d5bc86!important;opacity:1!important}
html[data-sgc-theme="dark"] body :is(
 .sgc-faq-compose button,.sgc-member-card button,
 .sgc-study-group-card button,.sgc-profile-page button,
 .sgc-modal button,.sgc-private-chat-compose button
){background-color:#211c12!important;color:#f8dfaa!important}

/* Member profile full-page dark canvas */
html[data-sgc-theme='dark'].sgc-profile-document-mode,html[data-sgc-theme='dark'].sgc-profile-document-mode body,html[data-sgc-theme='dark'].sgc-profile-document-mode #sgc-social-modal-root,html[data-sgc-theme='dark'].sgc-profile-document-mode .sgc-modal-backdrop,html[data-sgc-theme='dark'].sgc-profile-document-mode .sgc-profile-page{background-color:#080808!important;background-image:none!important;min-height:100vh!important}
