/* KHEROON / MIDNIGHT ATELIER
   The existing light design is untouched. Dark mode is explicit and optional.
   Dark surfaces use warm ivory type and restrained champagne/gemstone accents;
   all product photographs and campaign imagery remain unfiltered. */

/* Shared, high-contrast switch (visible in the masthead on every page) */
#header .kh-theme-toggle{position:relative;display:grid;place-items:center;flex:none;isolation:isolate;border:1px solid rgba(185,143,86,.32);border-radius:50%;background:rgba(198,166,116,.075);color:#193557;width:38px;height:38px;padding:7px;overflow:hidden;transition:color .25s,border-color .25s,background .25s,transform .25s;}
#header .kh-theme-toggle:hover{background:rgba(194,153,92,.16);border-color:#c29a65;transform:rotate(-8deg)}
#header .kh-theme-toggle:focus-visible{outline:2px solid #a98149;outline-offset:3px}
.kh-theme-toggle .kh-theme-icon,.kh-admin-theme-toggle .kh-theme-icon{width:19px;height:19px;flex:none;transition:transform .35s ease,opacity .25s ease;}
.kh-icon-sun{display:none}
html[data-kh-theme="dark"] .kh-icon-moon{display:none}
html[data-kh-theme="dark"] .kh-icon-sun{display:block}
html[data-kh-theme="dark"] #header .kh-theme-toggle{color:#ebc78c;background:rgba(223,180,116,.1);border-color:#7a633f;box-shadow:inset 0 0 12px rgba(240,196,124,.06)}
html[data-kh-theme="dark"] #header .kh-theme-toggle:hover{background:rgba(223,180,116,.2);border-color:#e0bb81}

/* Main palette and safe global readability */
html[data-kh-theme="dark"]{
 --ivory:#0b1423;--paper:#0b1423;--paper-2:#142238;
 --wine:#e1bd86;--wine-2:#e2c894;--gold:#dabb86;--gold-2:#efcca0;
 --ink:#f2ebdf;--ink-soft:#b9c6d5;--line:#364458;
 --shop-ink:#f2ebdf;--shop-navy:#daba83;--shop-sapphire:#e3be83;
 --shop-champagne:#dbba83;--shop-ivory:#0b1423;--shop-shell:#142237;
 --shop-pearl:#19283a;--shop-line:#344359;--shop-muted:#b6c3d1;
 --intl-ivory:#0b1423;--intl-ink:#f2ebdf;
 color-scheme:dark;
}
html[data-kh-theme="dark"] body{background:radial-gradient(ellipse at 8% 8%,rgba(34,58,99,.33),transparent 34%),radial-gradient(ellipse at 91% 26%,rgba(99,65,85,.13),transparent 31%),#0b1423!important;color:#f2ebdf!important}
html[data-kh-theme="dark"] :is(.muted,.section-head p:last-child,.page-intro p:not(.eyebrow),.card p,.empty p,.legal p,.product-info>p:not(.eyebrow,.price,.notice),.benefits>div p,.crumb,.count,.small,.form label,.kh-contact-social small,.shop-service-bar,.faq-wrap .faq p){color:#bdc9d6!important}
html[data-kh-theme="dark"] :is(.section-head h2,.page-intro h1,.product-info h1,.product-info .price,.card h3,.card h3 a,.benefits>div h3,.faq-wrap details summary,.form h2,.form h3,.legal h2,.story-band h2,.product-info .specs,.collection-links,.price){color:#f2ebdf!important}
html[data-kh-theme="dark"] :is(.eyebrow,.tagline,.section-head .eyebrow,.page-intro>.eyebrow,.card .eyebrow,.product-info .eyebrow,.search-overline){color:#dabb86!important}
html[data-kh-theme="dark"] a:focus-visible,html[data-kh-theme="dark"] button:focus-visible,html[data-kh-theme="dark"] input:focus-visible,html[data-kh-theme="dark"] select:focus-visible{outline-color:#e8c78d}
html[data-kh-theme="dark"] ::selection{background:#9b744a;color:white}
html[data-kh-theme="dark"] ::placeholder{color:#9aabc1;opacity:1}

/* Brand navigation: warmth against deep sapphire, with legible dropdowns */
html[data-kh-theme="dark"] #header{box-shadow:0 6px 34px rgba(2,7,17,.4)}
html[data-kh-theme="dark"] #header .masthead{background:rgba(12,23,39,.97)!important;border-bottom:1px solid #3c4653!important}
html[data-kh-theme="dark"] #header .nav{background:rgba(14,27,45,.98)!important;border-bottom:1px solid #39465c!important;color:#e9e3d9}
html[data-kh-theme="dark"] #header .nav>a,html[data-kh-theme="dark"] #header .dropdown>summary,html[data-kh-theme="dark"] .search-trigger,html[data-kh-theme="dark"] .header-actions .iconbutton{color:#f0e6d6!important}
html[data-kh-theme="dark"] #header .nav>a:hover,html[data-kh-theme="dark"] #header .dropdown>summary:hover{color:#e7c38d!important}
html[data-kh-theme="dark"] #header .nav .active:after{background:#dab77e!important}
html[data-kh-theme="dark"] #header .header-actions .iconbutton:hover{background:rgba(231,199,141,.13)}
html[data-kh-theme="dark"] #header .dropdown-menu{background:#15263d!important;color:#f0e7d8!important;border:1px solid #3f4e65!important;box-shadow:0 23px 40px rgba(0,0,0,.34)!important}
html[data-kh-theme="dark"] #header .dropdown-menu a{color:#e9dfd1!important}
html[data-kh-theme="dark"] #header .dropdown-menu a:hover{background:#22354c!important;color:#f2cb94!important}
html[data-kh-theme="dark"] #header .brand img{mix-blend-mode:normal!important;filter:drop-shadow(0 2px 12px rgba(218,181,123,.18));}

/* Home campaign: product film unaffected; only its caption shell changes */
html[data-kh-theme="dark"] .atelier-hero .hero-panel{background:linear-gradient(115deg,#121f32,#162942)!important;border-color:#3a4a5e!important}
html[data-kh-theme="dark"] .atelier-hero .hero-panel-inner{background:transparent!important}
html[data-kh-theme="dark"] .hero-panel-copy,html[data-kh-theme="dark"] .hero-panel-copy p,html[data-kh-theme="dark"] .hero-panel-copy .eyebrow{color:#e7e1d9!important}
html[data-kh-theme="dark"] .hero-panel .hero-action-story{color:#eadac0!important}
html[data-kh-theme="dark"] .shop-service-bar{background:#122238!important;border-color:#34465d!important;color:#d9e2eb!important}
html[data-kh-theme="dark"] .shop-service-bar i{color:#d8b47d}
html[data-kh-theme="dark"] .atelier-manifesto{background:linear-gradient(135deg,#132139,#0b1628)!important;color:#eae5db!important}
html[data-kh-theme="dark"] .atelier-manifesto :is(h2,p,strong){color:#ede4d8!important}
html[data-kh-theme="dark"] .collection-feature,html[data-kh-theme="dark"] .shop-campaign{background:#0e1a2b!important}
html[data-kh-theme="dark"] .story-band{background:linear-gradient(135deg,#162843,#101d31 68%,#1b283a)!important;border-color:#41516a!important}
html[data-kh-theme="dark"] .story-band :is(p,h2,a){color:#eae2d8!important}
html[data-kh-theme="dark"] .kh-editorial-bridge{background:linear-gradient(115deg,#182942,#27314e,#182942)!important;border-top:1px solid #504b4a;border-bottom:1px solid #504b4a}
html[data-kh-theme="dark"] .motion-overture{background:radial-gradient(ellipse at 85% 10%,rgba(78,84,137,.25),transparent 39%),radial-gradient(ellipse at 20% 87%,rgba(105,68,87,.2),transparent 38%),#0c1930!important}
html[data-kh-theme="dark"] .overture-photo-label{background:#192a43!important;color:#f3dfc5!important;border-color:#6c5a40!important}
html[data-kh-theme="dark"] .overture-photo-label span{color:#efc98e!important}
/* These sections deliberately already have rich dark backgrounds in light mode. */
html[data-kh-theme="dark"] :is(.gem-runway,.gem-runway-pin,.motion-final,.atelier-feature,.kh-social){color:#f2e9dc}
/* Runway cards and product photographs stay true-colour; text cards receive dark shells. */
html[data-kh-theme="dark"] .runway-card-copy{background:linear-gradient(140deg,#1b2b42,#142035)!important;border-color:#516075!important}
html[data-kh-theme="dark"] .runway-card-copy :is(h3,p,a){color:#f4eee5!important}

/* Jewellery grid, editorial cards and product details */
html[data-kh-theme="dark"] .grid .card{background:transparent!important;color:#f1eadc!important}
html[data-kh-theme="dark"] .card-visual{background:#1b2a3d!important;border-color:#3c4c5c!important}
html[data-kh-theme="dark"] .card .save{background:rgba(17,31,49,.92)!important;color:#f1d6a7!important;border:1px solid #6a5a42!important}
html[data-kh-theme="dark"] .card .save:hover{background:#28374d!important}
html[data-kh-theme="dark"] .card-visual .card-model-toggle{background:rgba(19,34,51,.95)!important;color:#f4e6d0!important;border-color:#8b7657!important}
html[data-kh-theme="dark"] :is(.card-shop-actions button,.product-add-btn){color:#f1e9dc!important;border-color:#685a48!important;background:#172942!important}
html[data-kh-theme="dark"] :is(.card-shop-actions button,.product-add-btn):hover{background:#dabc87!important;color:#0c1b31!important}
html[data-kh-theme="dark"] .kh-preorder-tag{color:#22202b!important;background:#ebcea0!important}
html[data-kh-theme="dark"] .page-intro{background:radial-gradient(ellipse at 90% 4%,rgba(106,88,128,.29),transparent 35%),linear-gradient(125deg,#101f35,#172940 62%,#0e1b30)!important;border-color:#3c4b5e!important}
html[data-kh-theme="dark"] .page-intro:after{color:#dabb86!important;opacity:.10!important}
html[data-kh-theme="dark"] :is(.toolbar,.form,.benefits>div,.contact-channels-shell,.contact-channel,.bag-page-checkout .bag-checkout,.product-info){background:#132238!important;color:#f2ebdf!important;border-color:#35455b!important;box-shadow:0 8px 33px rgba(0,0,0,.15)!important}
html[data-kh-theme="dark"] .product-photo{background:#1b2b42!important}
html[data-kh-theme="dark"] :is(.product-thumb,.quick-thumb){background:#1b2a3d!important;border-color:#607188!important}
html[data-kh-theme="dark"] :is(.product-info .notice,.notice,.kh-preorder-notice){background:#242c38!important;color:#f1d8ac!important;border-color:#96764b!important}
html[data-kh-theme="dark"] .specs div{border-color:#3a4a60!important}
html[data-kh-theme="dark"] .specs :is(span,small){color:#d9e1ed}
html[data-kh-theme="dark"] :is(.qty-picker button,.qty-picker input){background:#15273e!important;color:#f0eadd!important;border-color:#526174!important}
html[data-kh-theme="dark"] :is(.toolbar input,.toolbar select,.form input,.form textarea,.form select,.bag-customer-fields input,.bag-customer-fields select){background:#0f1d30!important;color:#f3eee4!important;border:1px solid #5a6678!important;accent-color:#ddbc84}
html[data-kh-theme="dark"] :is(.toolbar input,.toolbar select,.form input,.form textarea,.form select):focus-visible{border-color:#e5c18a!important}
html[data-kh-theme="dark"] :is(.button.secondary,.product-enquire){background:#182940!important;border:1px solid #b59a72!important;color:#f2e8d7!important}
html[data-kh-theme="dark"] :is(.button.secondary,.product-enquire):hover{background:#263b53!important;color:#fff2db!important}
html[data-kh-theme="dark"] :is(.button,.hero-action-main,.form .button,.header-actions .nav-enquiry){background:#dabc87!important;color:#102034!important;border-color:#dabc87!important}
html[data-kh-theme="dark"] :is(.button,.hero-action-main,.form .button,.header-actions .nav-enquiry):hover{background:#f0d7a8!important;color:#091628!important}
html[data-kh-theme="dark"] .contact-channel{background:#172841!important}
html[data-kh-theme="dark"] .contact-channel :is(h2,h3,p,strong,a){color:#f0e8db!important}
html[data-kh-theme="dark"] .kh-contact-social>a{background:#172841!important;color:#f3eade!important;border-color:#536077!important}
html[data-kh-theme="dark"] .kh-contact-social>a:hover{background:#23374c!important;border-color:#c4a073!important}
html[data-kh-theme="dark"] .kh-contact-social small{color:#bfc9d4!important}
html[data-kh-theme="dark"] .faq-wrap details{background:transparent!important;border-color:#3a4c61!important}
html[data-kh-theme="dark"] .legal :is(p,li){color:#ccd5de!important}
html[data-kh-theme="dark"] .empty{color:#d3dfe9!important}

/* Search studio and quick-view: one consistent high-contrast dark interface. */
html[data-kh-theme="dark"] :is(.dialog,.quickview,.search-studio,.search-studio-main,.shop-bag-dialog){background:#101e31!important;color:#f3eee4!important;border-color:#48576d!important}
html[data-kh-theme="dark"] .search-studio-top h2,html[data-kh-theme="dark"] .search-result-description strong,html[data-kh-theme="dark"] .search-empty h3{color:#f2eadc!important}
html[data-kh-theme="dark"] :is(.search-field>label,.search-result-price,.search-studio-footer>span,.search-empty p,.search-results-heading>span:last-child){color:#b9c7d7!important}
html[data-kh-theme="dark"] .search-input-wrap{background:#182a42!important;border-color:#586b81!important}
html[data-kh-theme="dark"] #global-search{background:transparent!important;color:#f7eedf!important}
html[data-kh-theme="dark"] #global-search::placeholder{color:#abbbce!important}
html[data-kh-theme="dark"] .search-input-wrap svg{color:#dfbc84!important}
html[data-kh-theme="dark"] .search-popular button{background:#1d3048!important;color:#f1e7d9!important;border-color:#4c5d73!important}
html[data-kh-theme="dark"] .search-popular button:hover{background:#dabc87!important;color:#0c1d32!important}
html[data-kh-theme="dark"] .search-studio .search-results a.search-result-item{background:#17273c!important;border-color:#3c4e66!important;color:#f2eadc!important}
html[data-kh-theme="dark"] .search-studio .search-results a.search-result-item:hover{background:#243951!important;border-color:#b99b6d!important}
html[data-kh-theme="dark"] :is(.search-studio-results,.search-studio-footer){border-color:#3a4b60!important}
html[data-kh-theme="dark"] .search-studio-close{color:#f2e7d6!important;border-color:#637189!important}
html[data-kh-theme="dark"] .search-studio-close:hover{background:#263b52!important}
html[data-kh-theme="dark"] .search-studio-footer>a,html[data-kh-theme="dark"] .search-empty a{color:#e8c48e!important}
html[data-kh-theme="dark"] .search-result-gem,html[data-kh-theme="dark"] .search-popular>span{color:#dfbc86!important}

/* Cart side-panel, line items, price and customer form in dark mode. */
html[data-kh-theme="dark"] :is(.shop-bag-dialog .bag-dialog-header,.bag-dialog-header,.bag-totals,.bag-page-checkout .bag-checkout){background:#16283f!important;border-color:#3d5068!important;color:#f2eadb!important}
html[data-kh-theme="dark"] :is(.shop-bag-dialog h2,.bag-dialog-header h2,.bag-line,.bag-line strong,.bag-totals strong,.bag-totals p,.bag-customer-fields label){color:#f2eadb!important}
html[data-kh-theme="dark"] :is(.bag-line p,.bag-line small,.bag-totals small){color:#bdc8d5!important}
html[data-kh-theme="dark"] :is(.bag-close,.line-stepper button,.bag-remove){color:#f2eadb!important;background:#1d324a!important;border-color:#536783!important}
html[data-kh-theme="dark"] :is(.bag-customer-fields input,.bag-customer-fields select,.bag-customer-fields textarea){background:#0e2034!important;color:#f2ebdc!important;border-color:#52677f!important}
html[data-kh-theme="dark"] .bag-line{border-color:#3b5068!important}
html[data-kh-theme="dark"] .shop-enquiry-btn{color:#ecc990!important;border-color:#b29465!important}
/* Float and footer are already dark/luxury; preserve their text and contact affordances. */
html[data-kh-theme="dark"] footer{border-top:1px solid #5a4f48!important}
html[data-kh-theme="dark"] footer :is(.footer-grid p,.copyright){color:#dce5ee!important}
html[data-kh-theme="dark"] :is(.tag,.cart-badge){color:#101b2b!important}

/* Mobile navigation has hardcoded light declarations from an earlier fix. */
@media(max-width:1000px){
 #header .masthead .header-actions{gap:1px!important}
 #header .masthead .kh-theme-toggle{width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:7px!important}
 #header .masthead .header-actions .iconbutton{width:36px!important;min-width:36px!important;height:39px!important;padding:7px!important}
 #header .masthead{grid-template-columns:46px minmax(0,1fr) 114px!important;padding-inline:10px!important;gap:2px!important}
 #header .masthead .brand{width:min(100%,clamp(107px,35vw,166px))!important}
 html[data-kh-theme="dark"] #header .masthead .mobile-toggle{color:#f0e4d2!important}
 html[data-kh-theme="dark"] #header .masthead .mobile-toggle:hover{background:#243952!important;border-color:#847052!important}
 html[data-kh-theme="dark"] #header .kh-hamburger i{background:#f3e9db!important}
 html[data-kh-theme="dark"] #header nav.nav{background:#101e30!important;border-color:#47556c!important;box-shadow:0 28px 70px rgba(0,0,0,.5)!important}
 html[data-kh-theme="dark"] #header nav.nav .kh-menu-intro{border-color:#3d4d61!important}
 html[data-kh-theme="dark"] #header nav.nav .kh-menu-intro>strong{color:#f4ebdb!important}
 html[data-kh-theme="dark"] #header nav.nav .kh-menu-intro>span{color:#d7b681!important}
 html[data-kh-theme="dark"] #header nav.nav a.kh-mobile-search{background:#1b2d43!important;color:#f0e7da!important;border-color:#556278!important}
 html[data-kh-theme="dark"] #header nav.nav>a:not(.kh-mobile-search),html[data-kh-theme="dark"] #header nav.nav>.dropdown{border-color:#34465b!important}
 html[data-kh-theme="dark"] #header nav.nav>a:not(.kh-mobile-search),html[data-kh-theme="dark"] #header nav.nav>.dropdown>summary{color:#f0e7da!important}
 html[data-kh-theme="dark"] #header nav.nav>a.active{color:#efc990!important}
 html[data-kh-theme="dark"] #header nav.nav .dropdown-menu{background:#17283c!important}
 html[data-kh-theme="dark"] #header nav.nav .dropdown-menu a{color:#e2dfd9!important}
 html[data-kh-theme="dark"] #header nav.nav .dropdown-menu a:hover{background:#273c53!important;color:#f5dbb7!important}
 html[data-kh-theme="dark"] #header nav.nav .kh-menu-footer{background:#203552!important;color:#f4ead9!important}
}
@media(max-width:370px){
 #header .masthead{grid-template-columns:41px minmax(0,1fr) 111px!important;padding-inline:8px!important;gap:1px!important}
 #header .masthead .brand{width:min(100%,clamp(102px,34vw,136px))!important}
 #header .masthead .header-actions .iconbutton{width:35px!important;min-width:35px!important}
 #header .masthead .kh-theme-toggle{width:35px!important;min-width:35px!important}
}
@media(prefers-reduced-motion:reduce){.kh-theme-toggle,.kh-theme-icon{animation:none!important;transition:none!important}}
/* The official logo has dark lettering. Keep its exact shape, making it champagne-gold on navy. */
html[data-kh-theme="dark"] #header .brand img{filter:brightness(0) saturate(100%) invert(87%) sepia(18%) saturate(624%) hue-rotate(340deg) brightness(101%) contrast(89%)!important;mix-blend-mode:normal!important}
/* The page-transition veil follows the same theme without a light flash. */
html[data-kh-theme="dark"] .kheroon-page-veil{--kv-ivory:#0c192b;--kv-ink:#f0e2c9;--kv-gold:#dfbc82;--kv-gold-soft:#b99a66;background:#0c192b!important;background-image:radial-gradient(ellipse at 50% 40%,#20334f 0%,#111f35 49%,#091523 100%)!important;color:#f0e2c9!important}
html[data-kh-theme="dark"] .kheroon-page-veil .kv-copy,html[data-kh-theme="dark"] .kheroon-page-veil .kv-lower{color:#f0dfc2!important}
