/* Shared black, cinnabar red and gold shell. Map imagery and meaningful
   directional/solar data colors remain intact. */
html body {
  background: radial-gradient(ellipse at top, #4b1019 0%, #10090a 65%) !important;
  color: #fff4dd !important;
  color-scheme: dark;
}
body :is(.spiq-header, .fsiq-header, .spx-header) {
  background: linear-gradient(120deg, #190b0e, #611521, #190b0e);
  border-bottom: 1px solid #9b753a;
  border-radius: 12px;
  padding: 20px;
}
body :is(.spiq-header h1, .fsiq-header h1, .spx-header h1) {
  background: none !important;
  color: #f2d18a !important;
  -webkit-text-fill-color: #f2d18a;
}
body :is(.spiq-tag, .fsiq-tag, .fsiq-brand, .fsiq-header p, .spx-header p, .spx-hint) { color: #e2cdae !important; }
body :is(.spiq-panel, .fsiq-panel, .fsiq-credibility, .fsiq-plain, .fsiq-explain, .spx-searchbar, .spx-hint, .spx-err) {
  background: #211013 !important;
  border-color: #77542b !important;
}
body :is(.spiq-panel h2, .fsiq-panel h2, .fsiq-panel h3) { color: #efd188 !important; }
body :is(input:not([type=range]):not([type=checkbox]), select, textarea) {
  background: #130b0d !important;
  border-color: #916737 !important;
  color: #fff4dd !important;
}
body :is(.fsiq-primary, .fsiq-report-btn, .spx-searchbar button) {
  background: #a82435 !important;
  color: #fff4dd !important;
  border: 1px solid #e2bc67 !important;
}
body :focus-visible { outline: 2px solid #f6d78b; outline-offset: 3px; }
/* Complete tool chrome and dynamically injected preference cards use the same
   tokens. Semantic colors inside map layers and analysis drawings stay intact. */
body {
  --lunar-surface: #211013;
  --lunar-black: #10090a;
  --lunar-gold: #efd188;
  --lunar-red: #a82435;
  --lunar-border: #77542b;
  --lunar-text: #fff4dd;
  --lunar-muted: #dfcbb0;
  --spiq-surface: #211013;
  --spiq-text: #fff4dd;
  --spiq-accent: #efd188;
  --spiq-border: #77542b;
}
body :is(.fsiq-review-card, .fsiq-status li, .fsiq-faq details, .fsiq-explain, .spiq-times div, .spiq-plain) {
  background: var(--lunar-surface) !important;
  border-color: var(--lunar-border) !important;
}
body .fsiq-review-card.fsiq-feng { border-top-color: var(--lunar-red) !important; }
body .fsiq-review-card.fsiq-vastu { border-top-color: var(--lunar-gold) !important; }
body :is(.fsiq-plain h3, .fsiq-credibility strong, .fsiq-status b, .fsiq-method a,
  .fsiq-review-card h3, #fsiq-facing-note, #spiq-score-value, .spiq-components b) { color: var(--lunar-gold) !important; }
body :is(.fsiq-note, .fsiq-hint, .fsiq-footer, .fsiq-maplegend, .fsiq-legend,
  .fsiq-method p, .fsiq-faq details p, .spiq-note, .spiq-hint, .spiq-footer,
  .spiq-legend, .spiq-score-label, .spiq-times span, .spiq-components i, label) { color: var(--lunar-muted) !important; }
body :is(.fsiq-maptoggle, .spiq-maptoggle, .spiq-zoom, .fsiq-sector-label) {
  background: var(--lunar-black) !important;
  color: var(--lunar-gold) !important;
}
body :is(.fsiq-shell button, .fsiq-app button, .spiq-app button), body #fsiq-geocode-btn {
  background: var(--lunar-red) !important;
  color: var(--lunar-text) !important;
  border: 1px solid var(--lunar-gold) !important;
}
body :is(.fsiq-maptoggle button.on, .spiq-maptoggle button.spiq-active,
  .fsiq-viewtoggle button.fsiq-active, .spiq-viewtoggle button.spiq-active) {
  background: var(--lunar-gold) !important;
  color: var(--lunar-black) !important;
}
body :is(.fsiq-back, .fsiq-home-link, .spiq-home-link) {
  background: var(--lunar-gold) !important;
  color: var(--lunar-black) !important;
}
body input[type=range] { accent-color: var(--lunar-gold) !important; }
body :is(#fsiq-canvas, .fsiq-3d-container, #spiq-canvas, .spiq-3d-container) { background: var(--lunar-black) !important; }
body #nkpg-preferences .nkpg-pref {
  background: var(--lunar-surface) !important;
  border-color: var(--lunar-border) !important;
  color: var(--lunar-text) !important;
}
body #nkpg-preferences :is(h3, h4, .nkpg-check) {
  background: none !important;
  color: var(--lunar-gold) !important;
  -webkit-text-fill-color: var(--lunar-gold);
}
body #nkpg-preferences :is(.nkpg-sub, .nkpg-cta p, .nkpg-ok p, label) { color: var(--lunar-muted) !important; }
body #nkpg-preferences :is(.nkpg-chip, .nkpg-tool, .nkpg-ghost) {
  background: var(--lunar-black) !important;
  border: 1px solid var(--lunar-border) !important;
  color: var(--lunar-text) !important;
}
body #nkpg-preferences :is(.nkpg-chip.nkpg-on, .nkpg-btn:not(.nkpg-ghost)) {
  background: var(--lunar-red) !important;
  border: 1px solid var(--lunar-gold) !important;
  color: var(--lunar-text) !important;
}
body #nkpg-preferences .nkpg-chip:hover { border-color: var(--lunar-gold) !important; }
@media (forced-colors: active) { html body { background: Canvas !important; color: CanvasText !important; } }
