/* Routines: quiet charcoal surfaces, warm text, restrained accents. */
html[data-theme="dark"] body #main:has(.routine-hero,.routine-planning,.guided-layout,.completion,.detail-layout) {
 --tone:#30343a;--tone-ink:#e6c39f;
}
html[data-theme="dark"] body #main:has(.routine-hero,.routine-planning,.guided-layout,.completion,.detail-layout) :is(.ritual-card,.ritual-body,.preparation,.step-overview,.guided-sidebar,.guided-content,.routine-product,.routine-product-section) {
 background:#23252b!important;border:1px solid #3b3e46!important;color:#f6f1e9!important;box-shadow:none;
}
html[data-theme="dark"] body #main .routine-hero {
 background:linear-gradient(120deg,#30352f,#23272b)!important;border:1px solid #454b43;border-radius:24px;
}
html[data-theme="dark"] body #main:has(.routine-hero,.routine-planning,.guided-layout,.completion,.detail-layout) :is(.hero-chips>span,.orbit-label,.ritual-summary,.saved-routine,.routine-planning,.gentle-note,.step-hint) {
 background:#2b2e34!important;border:1px solid #41444c!important;color:#e2ded6!important;box-shadow:none;
}
html[data-theme="dark"] body #main .routine-hero .hero-orbit {background:#353e35!important;box-shadow:none;}
html[data-theme="dark"] body #main .routine-hero .hero-orbit::before {border-color:#71806b;opacity:.45;}
html[data-theme="dark"] body #main .routine-hero .hero-orbit::after {background:#9da58e;opacity:.35;}
html[data-theme="dark"] body #main .routine-hero .orbit-star {color:#e6c39f;}
html[data-theme="dark"] body #main:has(.routine-hero) .ritual-card {overflow:hidden;border-radius:22px;transition:border-color .2s,transform .2s;}
html[data-theme="dark"] body #main:has(.routine-hero) .ritual-card:hover {border-color:#77766f!important;box-shadow:0 12px 26px #0002;}
html[data-theme="dark"] body #main:has(.routine-hero) .ritual-art {
 background:radial-gradient(ellipse at 50% 35%,#434a43,#2c3035)!important;border-bottom:1px solid #3b3e46;
}
html[data-theme="dark"] body #main:has(.routine-hero) .ritual-art .art-orbit {background:#818d7720!important;border-color:#8c9b7a55;}
html[data-theme="dark"] body #main:has(.routine-hero) .ritual-art .routine-portrait {filter:brightness(.9) saturate(.85);}
html[data-theme="dark"] body #main:has(.routine-hero) :is(.art-tag,.completed-badge) {
 background:#202329ed!important;color:#f3eadc!important;border:1px solid #ffffff30;box-shadow:0 2px 8px #0002;
}
html[data-theme="dark"] body #main:has(.routine-hero) .ritual-body {border:0!important;padding:24px;}
html[data-theme="dark"] body #main:has(.routine-hero) .ritual-body h3 {margin-top:12px;}
html[data-theme="dark"] body #main:has(.routine-hero) .routine-cadence {display:block;margin-top:12px;line-height:1.6;color:#bbbdb6!important;}
html[data-theme="dark"] body #main:has(.routine-hero) .ritual-body .primary-button {margin-top:20px;}
html[data-theme="dark"] body #main:has(.routine-hero,.routine-planning,.guided-layout,.completion,.detail-layout) :is(.filter.active,.guided-step.active) {
 background:#ded2ba!important;color:#242720!important;border-color:#ded2ba!important;
}
html[data-theme="dark"] body #main:has(.routine-hero,.routine-planning,.guided-layout,.completion,.detail-layout) :is(.ritual-summary a,.gentle-note a,.routine-shop-link,.routine-product-details,.detail-back) {color:#e6c39f!important;}
html[data-theme="dark"] body #main:has(.routine-planning) .detail-banner {background:linear-gradient(125deg,#30352f,#262a30)!important;border:1px solid #454b43;}
html[data-theme="dark"] body #main:has(.routine-planning) :is(.routine-product-role,.step-number,.step-overview li>span) {background:#343c33!important;color:#e0e5d8!important;}
html[data-theme="dark"] body #main:has(.routine-planning) .routine-product-footer {border-color:#41444c;}
html[data-theme="dark"] body #main:has(.routine-planning) .routine-add-button {background:#ded2ba;color:#242720;}
html[data-theme="dark"] body #main:has(.routine-planning) .routine-product-image {background:#30343a;}
@media(max-width:640px){html[data-theme="dark"] body #main:has(.routine-hero) .ritual-body{padding:22px;}html[data-theme="dark"] body #main .routine-hero{border-radius:20px;}}

/* The preparation section disappears during a session: style these states directly. */
html[data-theme="dark"] body #main .guided-sidebar {
 background:linear-gradient(155deg,#30372f,#252a30)!important;border-color:#454b43!important;
}
html[data-theme="dark"] body #main .guided-step-list li {color:#c6c5cc!important;border-color:#41444c!important;}
html[data-theme="dark"] body #main .guided-step-list li>span {background:#353941!important;color:#d6d4ce!important;border:1px solid #50555e;}
html[data-theme="dark"] body #main .guided-step-list li.current {color:#f6f1e9!important;font-weight:700;}
html[data-theme="dark"] body #main .guided-step-list li.current>span {background:#ded2ba!important;color:#242720!important;border-color:#ded2ba;}
html[data-theme="dark"] body #main .guided-step-list li.done>span {background:#394638!important;color:#dfebd5!important;border-color:#65795b;}
html[data-theme="dark"] body #main .guided-progress {color:#d3cbc0!important;}
html[data-theme="dark"] body #main .guided-content .progress-track {background:#3b3e46!important;}
html[data-theme="dark"] body #main .guided-content .progress-track i {background:#e8b88b!important;}
html[data-theme="dark"] body #main .guided-content .step-hint {color:#ded2ba!important;}
html[data-theme="dark"] body #main .guided-sidebar>.text-link {color:#e6c39f!important;}
html[data-theme="dark"] body #main .guided-actions .secondary-button:disabled {opacity:.45;cursor:default;}
html[data-theme="dark"] body #main .completion {background:linear-gradient(135deg,#30372f,#23252b)!important;border:1px solid #454b43;color:#f6f1e9!important;}
html[data-theme="dark"] body #main .completion .celebration {color:#e8b88b!important;}
html[data-theme="dark"] body #main:has(.guided-layout,.detail-layout) :is(.detail-tip,.equipment-note,.recipe-safety) {background:#2b2e34!important;border-color:#41444c!important;color:#ded2ba!important;}
html[data-theme="dark"] body #main:has(.guided-layout,.detail-layout) .ingredient {background:#2b2e34!important;border-color:#41444c!important;}
html[data-theme="dark"] body #main:has(.guided-layout,.detail-layout) .ingredient.checked {background:#344030!important;border-color:#718568!important;}
