body[data-theme="mystic"] {
  color-scheme: dark;
}

body[data-theme="porcelain"] {
  color-scheme: light;
  --ink: #f2eadb;
  --ink-deep: #e7dcc8;
  --ink-soft: #e9dfcf;
  --coal: #e3d7c2;
  --coal-light: #d9cbb4;
  --ivory: #241f1a;
  --ivory-muted: #685f53;
  --gold: #765419;
  --gold-light: #694a14;
  --gold-soft: #765419;
  --gold-dark: #5d4111;
  --forest: #d8e1d9;
  --plum: #e7dce3;
  --line: rgba(125, 92, 28, 0.32);
  --line-soft: rgba(36, 31, 26, 0.15);
  --shadow: 0 30px 75px rgba(72, 54, 31, 0.16);
  background: #f2eadb;
}

body[data-theme="porcelain"]::before {
  opacity: 0.7;
  background:
    radial-gradient(circle at 80% 8%, rgba(155, 117, 39, 0.12), transparent 28rem),
    radial-gradient(circle at 10% 62%, rgba(97, 121, 108, 0.13), transparent 34rem),
    linear-gradient(145deg, #f8f3e9, #eee4d3 52%, #e9deca);
}

body[data-theme="porcelain"]::after { opacity: 0.12; }
body[data-theme="porcelain"] .mobile-nav { background: rgba(242, 234, 219, 0.96); }
body[data-theme="porcelain"] .focus-card,
body[data-theme="porcelain"] .account-form,
body[data-theme="porcelain"] .knowledge-card,
body[data-theme="porcelain"] .search-results > a,
body[data-theme="porcelain"] .hub-search {
  background: rgba(249, 245, 237, 0.88);
}
body[data-theme="porcelain"] .contact-grid > article {
  background: linear-gradient(145deg, rgba(231, 220, 227, 0.82), rgba(249, 245, 237, 0.92));
}
body[data-theme="porcelain"] .contact-grid > article:nth-child(2) {
  background: linear-gradient(145deg, rgba(216, 225, 217, 0.9), rgba(249, 245, 237, 0.94));
}
body[data-theme="porcelain"] .contact-note { background: rgba(249, 245, 237, 0.72); }
body[data-theme="porcelain"] .marketplace-empty > div,
body[data-theme="porcelain"] .checkout-summary,
body[data-theme="porcelain"] .specialist-detail__body > aside {
  background: linear-gradient(145deg, rgba(216, 225, 217, 0.9), rgba(249, 245, 237, 0.94));
}
body[data-theme="porcelain"] .specialist-card,
body[data-theme="porcelain"] .specialist-application__panel,
body[data-theme="porcelain"] .specialist-detail__body > section,
body[data-theme="porcelain"] .checkout-shell {
  background: rgba(249, 245, 237, 0.9);
}
body[data-theme="porcelain"] .checkout-payment__locked { background: rgba(249, 245, 237, 0.96); }
body[data-theme="porcelain"] input,
body[data-theme="porcelain"] textarea,
body[data-theme="porcelain"] select { background: rgba(255, 252, 246, 0.78); color: var(--ivory); }
body[data-theme="porcelain"] .primary-action { color: #fffaf0; }
body[data-theme="porcelain"] .account-primary { color: #fffaf0; }
body[data-theme="porcelain"] .home-hero,
body[data-theme="porcelain"] .route-card,
body[data-theme="porcelain"] .practice-card,
body[data-theme="porcelain"] .future-shelves article { color-scheme: dark; --ivory: #f5ebd1; --ivory-muted: #cfc3a7; }

body[data-theme="nocturne"] {
  color-scheme: dark;
  --ink: #0b1020;
  --ink-deep: #070a14;
  --ink-soft: #10172a;
  --coal: #151d32;
  --coal-light: #1b2540;
  --ivory: #f2ead9;
  --ivory-muted: #c5bfd0;
  --gold: #c6a85b;
  --gold-light: #dfc879;
  --gold-soft: #aa8d49;
  --gold-dark: #826f43;
  --forest: #132d35;
  --plum: #19152b;
  --line: rgba(198, 168, 91, 0.3);
  --line-soft: rgba(216, 222, 242, 0.13);
  background: #0b1020;
}

body[data-theme="nocturne"]::before {
  background:
    radial-gradient(circle at 76% 10%, rgba(54, 89, 123, 0.35), transparent 30rem),
    radial-gradient(circle at 12% 72%, rgba(77, 48, 102, 0.38), transparent 35rem),
    linear-gradient(142deg, #060914, #0b1020 52%, #10182b);
}

body[data-theme="nocturne"] .mobile-nav { background: rgba(7, 10, 20, 0.96); }

body[data-theme="atelier"] {
  color-scheme: dark;
  --ink: #0d0b0c;
  --ink-deep: #070606;
  --ink-soft: #171111;
  --coal: #251917;
  --coal-light: #31201d;
  --ivory: #f7edd5;
  --ivory-muted: #d8c6aa;
  --gold: #e0b84c;
  --gold-light: #f1d375;
  --gold-soft: #c39b3e;
  --gold-dark: #95762f;
  --forest: #14352e;
  --plum: #351722;
  --line: rgba(224, 184, 76, 0.38);
  --line-soft: rgba(247, 237, 213, 0.14);
  --shadow: 0 36px 100px rgba(0, 0, 0, 0.58);
  background: #0d0b0c;
}

body[data-theme="atelier"]::before {
  background:
    radial-gradient(circle at 78% 8%, rgba(99, 54, 30, 0.38), transparent 29rem),
    radial-gradient(circle at 9% 68%, rgba(53, 23, 34, 0.68), transparent 36rem),
    linear-gradient(140deg, #080606, #100b0c 50%, #0d1713);
}

body[data-theme="atelier"] .mobile-nav { background: rgba(9, 7, 8, 0.97); }

@media (max-width: 420px) {
  .reader-header__actions .reader-thread-link { display: none; }
}
