/* All themes use the same layout. Paints and materials are shared across every screen. */
body.theme-dark,
body[data-theme="theme-dark"] {
    --t-page:#000000; --t-deep:#000000; --t-surface:#111113; --t-raised:#161619;
    --t-text:#ffffff; --t-muted:#a1a1aa; --t-dim:#71717a; --t-line:#27272a;
    --t-accent:#38bdf8; --t-secondary:#818cf8; --t-success:#10b981; --t-danger:#ef4444;
    --t-success-bg:#052e16; --t-danger-bg:#2a0a10; --t-shadow:#000000;
    --t-button:#2563eb; --t-button-ink:#ffffff; --t-metal-high:#ffffff; --t-metal-mid:#a1a1aa; --t-metal-low:#27272a;
    --theme-panel:#111113;
    --theme-frame:inset 0 1px 0 rgba(255,255,255,0.08),inset 0 0 1px rgba(255,255,255,0.1);
    --theme-glow:0 8px 32px rgba(0,0,0,0.8);
    --theme-page-image:none;
    --theme-page-size:100% 100%;
}
body[data-theme="theme-blueprint"] {
    --t-page:#05274c; --t-deep:#042344; --t-surface:#082e54; --t-raised:#103e65;
    --t-text:#edf7ff; --t-muted:#bbdcf3; --t-dim:#8bb4d2; --t-line:#67b9df;
    --t-accent:#38bdf8; --t-secondary:#a4b8ff; --t-success:#4ce4bd; --t-danger:#ff879a;
    --t-success-bg:#073e46; --t-danger-bg:#442b48; --t-shadow:#00172f;
    --t-button:#0879c7; --t-button-ink:#effaff; --t-metal-high:#b5eaff; --t-metal-mid:#449fcf; --t-metal-low:#073660;
    --theme-panel:linear-gradient(115deg,#0a385b35,#05264b77);
    --theme-frame:inset 0 0 0 1px #70c8ec;
    --theme-glow:0 0 0 transparent;
    --theme-page-image:linear-gradient(#2097d416 1px,transparent 1px),linear-gradient(90deg,#2097d416 1px,transparent 1px),linear-gradient(#2097d421 1px,transparent 1px),linear-gradient(90deg,#2097d421 1px,transparent 1px),radial-gradient(ellipse at 50% 20%,#073668,#041e3c);
    --theme-page-size:14px 14px,14px 14px,70px 70px,70px 70px,100% 100%;
}
body[data-theme="theme-copper"] {
    --t-page:#12100f; --t-deep:#15120f; --t-surface:#241d18; --t-raised:#392b22;
    --t-text:#fff1e4; --t-muted:#d7bda8; --t-dim:#ae917b; --t-line:#9d6d4c;
    --t-accent:#e99b5d; --t-secondary:#e9bc78; --t-success:#7cdbb1; --t-danger:#ff8c84;
    --t-success-bg:#183a2e; --t-danger-bg:#422523; --t-shadow:#080604;
    --t-button:#d48b50; --t-button-ink:#211207; --t-metal-high:#ffcf93; --t-metal-mid:#b9703f; --t-metal-low:#4e2c1d;
    --theme-panel:repeating-linear-gradient(0deg,#edc39005 0 1px,transparent 1px 3px),linear-gradient(135deg,#3a2c2180,#1b1815 55%,#2a2019);
    --theme-frame:inset 0 1px 0 #f5c9953d,inset 0 -1px 0 #0009;
    --theme-glow:0 5px 18px #0005;
    --theme-page-image:repeating-linear-gradient(0deg,#d29a5610 0 1px,transparent 1px 4px),radial-gradient(ellipse at 10% 0%,#49301b70,transparent 65%);
    --theme-page-size:auto,100% 100%;
}
body[data-theme="theme-neon"] {
    --t-page:#040b16; --t-deep:#030b15; --t-surface:#091a2c; --t-raised:#102d43;
    --t-text:#e9faff; --t-muted:#a5cfe2; --t-dim:#7698b0; --t-line:#187f9f;
    --t-accent:#29dcff; --t-secondary:#a993ff; --t-success:#48f3c1; --t-danger:#ff7cba;
    --t-success-bg:#073e3b; --t-danger-bg:#3f1b3c; --t-shadow:#01050d;
    --t-button:#18bfe9; --t-button-ink:#02131c; --t-metal-high:#b4fbff; --t-metal-mid:#159dc3; --t-metal-low:#062539;
    --theme-panel:linear-gradient(130deg,#0b2944dd,#071421ed 70%);
    --theme-frame:inset 0 1px 0 #70eaff44,inset 0 0 24px #00c8ff08;
    --theme-glow:0 0 16px #00c8ff1f,0 10px 26px #0008;
    --theme-page-image:linear-gradient(90deg,transparent 49.9%,#00bfe90b 50%,transparent 50.1%),radial-gradient(ellipse at 0% 0%,#0065a333,transparent 60%),radial-gradient(ellipse at 100% 70%,#5d27ac1a,transparent 60%);
    --theme-page-size:100px 100%,100% 100%,100% 100%;
}
body[data-theme="theme-slate"] {
    --t-page:#0d1116; --t-deep:#0a0e13; --t-surface:#1b222b; --t-raised:#2b3542;
    --t-text:#f2f6fa; --t-muted:#c2ced9; --t-dim:#8d9eaf; --t-line:#65788a;
    --t-accent:#d0deec; --t-secondary:#8cb9dd; --t-success:#80debb; --t-danger:#ff9b9f;
    --t-success-bg:#163a33; --t-danger-bg:#432b34; --t-shadow:#030507;
    --t-button:#b4c4d4; --t-button-ink:#111c26; --t-metal-high:#f5fbff; --t-metal-mid:#8294a7; --t-metal-low:#263746;
    --theme-panel:repeating-linear-gradient(115deg,#d4e4f006 0 1px,transparent 1px 3px),linear-gradient(140deg,#333e49b0,#171d25 45%,#232c35 100%);
    --theme-frame:inset 0 1px 0 #effaff50,inset 1px 0 0 #d6e1ec17,inset 0 -2px 0 #0009;
    --theme-glow:0 8px 22px #0008;
    --theme-page-image:repeating-linear-gradient(115deg,#d3e3f005 0 1px,transparent 1px 5px),radial-gradient(ellipse at 50% 0%,#57697933,transparent 65%);
    --theme-page-size:auto,100% 100%;
}
body[data-theme="theme-ace-gold"] {
    --t-page:#0d0b0b; --t-deep:#100d0c; --t-surface:#211a13; --t-raised:#342719;
    --t-text:#fff5df; --t-muted:#dccaab; --t-dim:#ad9976; --t-line:#a58041;
    --t-accent:#f0c66c; --t-secondary:#da6573; --t-success:#91deb1; --t-danger:#fa7f8c;
    --t-success-bg:#213d2c; --t-danger-bg:#4c1c28; --t-shadow:#050302;
    --t-button:#edbd58; --t-button-ink:#2b1b08; --t-metal-high:#fff0ab; --t-metal-mid:#d2a247; --t-metal-low:#67451b;
    --theme-panel:linear-gradient(135deg,#49341c75,#191511 48%,#2a1e13);
    --theme-frame:inset 0 1px 0 #ffe2a568,inset 0 -1px 0 #70461e80,inset 0 0 22px #cfa3470c;
    --theme-glow:0 0 22px #e2aa3417,0 12px 30px #0009;
    --theme-page-image:radial-gradient(ellipse at 50% 0%,#a4752326,transparent 62%),radial-gradient(ellipse at 5% 100%,#801f2723,transparent 55%),repeating-linear-gradient(120deg,#edcf7d06 0 1px,transparent 1px 44px);
    --theme-page-size:100% 100%,100% 100%,auto;
}

body[data-designed-theme] {
    color-scheme:dark;
    --bg-page:var(--t-page); --card-bg:var(--t-surface); --card-bg-glass:var(--t-surface);
    --text-primary:var(--t-text); --text-secondary:var(--t-muted); --text-muted:var(--t-dim);
    --primary:var(--t-accent); --primary-light:var(--t-secondary); --primary-accent:var(--t-accent);
    --accent-cyan:var(--t-accent); --accent-gold:var(--t-accent);
    --border-color:var(--t-line); --border-light:color-mix(in srgb,var(--t-line) 35%,transparent);
    --correct-color:var(--t-success); --correct-bg:var(--t-success-bg); --correct-border:var(--t-success);
    --wrong-color:var(--t-danger); --wrong-bg:var(--t-danger-bg); --wrong-border:var(--t-danger);
    --correct-glow:color-mix(in srgb,var(--t-success) 16%,transparent);
    --wrong-glow:color-mix(in srgb,var(--t-danger) 16%,transparent);
    --shadow-card:var(--theme-frame),var(--theme-glow);
    background-color:var(--t-page);
    background-image:var(--theme-page-image);
    background-size:var(--theme-page-size);
    color:var(--t-text);
    scrollbar-color:var(--t-line) var(--t-deep);
}
body[data-designed-theme] :is(.rpg-header,.card,.modal-card,.comment-modal-card,.account-flyout-card,.prv-modal-bubble,.prv-header-bubble,.overlay-glass-card,.paywall-teaser-glass-card) {
    background:var(--theme-panel);
    color:var(--t-text);
    border-color:var(--t-line);
    box-shadow:var(--theme-frame),var(--theme-glow);
}
body[data-designed-theme] .modal-backdrop { background:color-mix(in srgb,var(--t-deep) 85%,transparent) !important; }
body[data-designed-theme] button { background-color:var(--t-raised);color:var(--t-text);border-color:var(--t-line); }
body[data-designed-theme] :is(.text-link-btn,.appearance-menu-btn) { background:transparent; }
body[data-designed-theme] .secondary-btn { background:var(--t-raised);color:var(--t-text);border-color:var(--t-line); }
body[data-designed-theme] :is(.sub-tier-card,.ti-section,.pioneer-info-card,.skill-diag-card,.ti-mentor-ask-box,.soft-gate-card,.ti-faq-item,.ti-chat-bubble-prv) {
    background:color-mix(in srgb,var(--t-raised) 55%,var(--t-surface));
    border-color:color-mix(in srgb,var(--t-line) 60%,transparent);
}
body[data-designed-theme] :is(.option-btn,.social-btn,input:not([type="checkbox"]),textarea,select,.ti-chip) {
    background:var(--theme-panel);
    color:var(--t-text);
    border-color:var(--t-line);
}
body[data-designed-theme] :is(input,textarea)::placeholder { color:var(--t-dim); opacity:1; }
body[data-designed-theme] :is(input[type="checkbox"],input[type="radio"]) { accent-color:var(--t-accent); }
body[data-designed-theme] :is(.primary-btn,.sub-cta-btn,.guest-save-btn) {
    background:linear-gradient(115deg,color-mix(in srgb,var(--t-button) 70%,white),var(--t-button) 45%,color-mix(in srgb,var(--t-button) 80%,black)) !important;
    color:var(--t-button-ink) !important;
    border-color:var(--t-accent);
}
body[data-designed-theme] :is(.opt-letter,.ti-code,.sub-pay-pill,.ti-counter-pill) {
    background:var(--t-raised); color:var(--t-text); border-color:var(--t-line);
}
body[data-designed-theme] .option-btn:hover:not(:disabled) { background:var(--t-raised); border-color:var(--t-accent); }
body[data-designed-theme] .option-btn:hover:not(:disabled) :is(.opt-text,.opt-letter) { color:var(--t-text); }
body[data-designed-theme] .option-btn.correct { background:var(--t-success-bg) !important; border-color:var(--t-success) !important; }
body[data-designed-theme] .option-btn.wrong { background:var(--t-danger-bg) !important; border-color:var(--t-danger) !important; }
body[data-designed-theme] .option-btn.correct .opt-text { color:var(--t-success) !important; }
body[data-designed-theme] .option-btn.wrong .opt-text { color:var(--t-danger) !important; }
body[data-designed-theme] .sub-tier-card.is-selected { border-color:var(--t-accent); box-shadow:0 0 0 1px var(--t-accent),var(--theme-glow); }
body[data-designed-theme] .explanation { background:var(--t-success-bg); color:var(--t-text); }
body[data-designed-theme] .progress-track { background:var(--t-raised); box-shadow:inset 0 0 0 1px var(--t-line); }
body[data-designed-theme] .questions-fill { background:linear-gradient(90deg,var(--t-secondary),var(--t-accent)); }
body[data-designed-theme] .footer-legal-link,body[data-designed-theme] .footer-legal-copy { color:var(--t-dim); }
body[data-designed-theme] :is(.opt-text,.rpg-skill-name) { color:var(--t-text); }
body[data-designed-theme] .progress-labels { color:var(--t-muted); }
body[data-designed-theme] #btn-launch-redemption text { fill:var(--t-deep); }
body[data-designed-theme] button:focus-visible,body[data-designed-theme] :is(input,textarea,select):focus-visible { outline:2px solid var(--t-accent); outline-offset:3px; }
body[data-theme="theme-neon"] :is(.rpg-header,.card,.modal-card) { border-color:#29dcff99; }
body[data-theme="theme-neon"] .questions-fill { box-shadow:0 0 9px #29dcffb0; }
body[data-theme="theme-ace-gold"] .rpg-avatar { border-color:var(--t-secondary) !important; box-shadow:0 0 10px #a5234650 !important; }
body[data-theme="theme-slate"] :is(.rpg-header,.card,.modal-card) { outline:1px solid #d2e5f018;outline-offset:-4px; }
body[data-theme="theme-ace-gold"] :is(.rpg-header,.card,.modal-card,.account-flyout-card) { outline:1px solid #f6cd761f;outline-offset:-5px; }
body[data-theme="theme-ace-gold"] .modal-card::after {
    content:"";position:absolute;inset:7px;pointer-events:none;border-radius:inherit;
    background:linear-gradient(#ffe2a5,#ffe2a5) left top/22px 1px no-repeat,linear-gradient(#ffe2a5,#ffe2a5) left top/1px 22px no-repeat,linear-gradient(#bd4258,#bd4258) right bottom/22px 1px no-repeat,linear-gradient(#bd4258,#bd4258) right bottom/1px 22px no-repeat;
    opacity:.55;
}
body[data-theme="theme-blueprint"] .modal-card { background-image:linear-gradient(#2097d409 1px,transparent 1px),linear-gradient(90deg,#2097d409 1px,transparent 1px),var(--theme-panel);background-size:14px 14px,14px 14px,100% 100%; }

/* The same valve geometry and animation groups acquire theme-specific materials. */
body[data-designed-theme] .prv-original-art { display:none; }
body[data-designed-theme] .prv-blueprint-art { display:inline; }
body[data-designed-theme] .prv-blueprint-art [fill]:not([fill="none"]) { fill:url(#prv-theme-metal); }
body[data-designed-theme] .prv-blueprint-art [stroke] { stroke:var(--t-metal-high); }
body[data-designed-theme] .prv-blueprint-art [stroke="#53b7ea"],body[data-designed-theme] .prv-blueprint-art [stroke="#58b9e7"] { stroke:var(--t-metal-mid); }
body[data-designed-theme] #prv-cap-screw .prv-blueprint-art > g { fill:none; }
body[data-designed-theme] #prv-companion-layer:not(.prv-fullscreen-mode) #prv-svg-container {
    animation:blueprint-companion-idle 4s ease-in-out infinite;
    transform-origin:50% 55%;
    filter:drop-shadow(0 2px 3px #0006);
}
body[data-designed-theme] #prv-bg-top,body[data-designed-theme] #prv-bg-lower { fill:var(--t-deep); }
body[data-designed-theme] #prv-water-flow { fill:var(--t-accent); }
body[data-designed-theme] .prv-header-mode .prv-blueprint-art :is(path,circle,ellipse,rect) { vector-effect:non-scaling-stroke;stroke-width:.7px; }
body[data-theme="theme-blueprint"] .prv-blueprint-art [fill]:not([fill="none"]) { fill:#073660; }
body[data-theme="theme-blueprint"] #prv-svg-container { filter:drop-shadow(0 0 .4px #4ac6ff99); }
body[data-theme="theme-neon"] #prv-svg-container { filter:drop-shadow(0 0 2px #29dcff99); }
body[data-theme="theme-ace-gold"] #prv-svg-container { filter:drop-shadow(0 0 2px #efc46655); }
body[data-designed-theme] .rpg-prv-slot #prv-companion-layer #prv-svg-container { filter:drop-shadow(0 1px 2px #0005); }
body[data-theme="theme-blueprint"] .rpg-prv-slot #prv-companion-layer #prv-svg-container { filter:drop-shadow(0 0 .4px #4ac6ff99); }
body[data-theme="theme-neon"] .rpg-prv-slot #prv-companion-layer #prv-svg-container { filter:drop-shadow(0 0 2px #29dcffb0); }
body[data-theme="theme-ace-gold"] .rpg-prv-slot #prv-companion-layer #prv-svg-container { filter:drop-shadow(0 0 2px #efc46688); }

/* Appearance settings live inside the existing account menu; no main-screen rearrangement. */
.appearance-menu-btn { width:100%;padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:8px;background:transparent;border:0;border-top:1px solid var(--border-color);color:inherit;text-align:left;cursor:pointer;font:600 12px 'Outfit',sans-serif; }
.appearance-menu-btn:hover { background:color-mix(in srgb,var(--t-accent,#38bdf8) 10%,transparent); }
.appearance-card { max-width:540px;max-height:90dvh;overflow-y:auto; }
.appearance-card h2 { margin:0 30px 4px 0; }
.appearance-subtitle { color:var(--text-secondary);font-size:13px;margin:0 0 20px; }
.appearance-list { display:flex;flex-direction:column;gap:10px; }
.appearance-choice { display:grid;grid-template-columns:36px 1fr auto;align-items:center;gap:12px;width:100%;padding:14px;border:1px solid var(--border-color);border-radius:10px;background:var(--card-bg);color:var(--text-primary);text-align:left;font:inherit;cursor:pointer; }
.appearance-choice:disabled { opacity:.6;cursor:not-allowed; }
.appearance-choice[aria-pressed="true"] { border-color:var(--primary-accent);box-shadow:inset 0 0 0 1px var(--primary-accent); }
.appearance-swatch { width:36px;height:36px;border-radius:8px;background:var(--swatch-bg);border:1px solid var(--swatch-accent);box-shadow:inset 0 0 12px var(--swatch-accent); }
.appearance-choice strong { display:block;font-size:14px; }
.appearance-choice small { display:block;margin-top:3px;font-size:11px;color:var(--text-secondary); }
.appearance-state { font-size:11px;white-space:nowrap;color:var(--text-secondary); }
.appearance-notice { color:var(--text-muted);font-size:11px;margin:16px 0 0; }
@media(max-width:480px) { .appearance-choice { padding:10px;gap:8px;grid-template-columns:28px 1fr auto; }.appearance-swatch {width:28px;height:28px}.appearance-choice strong {font-size:12px}.appearance-state{font-size:10px} }

/* ==========================================================================
   PURE-BLACK (#000000) DARK MODE THEME (theme-dark — FLOOR 5 / 50' UNLOCK)
   High-contrast Apple/Tesla OLED Obsidian Dark UI across Quiz & Player Hub
   Neutral Charcoal/Grey surfaces, zero white voids, floating PRV mascot
   ========================================================================== */

/* 1. Global Canvas, Backdrop & Footers */
body.theme-dark,
body[data-theme="theme-dark"] {
    background-color: #000000 !important;
    background-image: none !important;
    color: #ffffff !important;
}

body.theme-dark .app-site-footer,
body[data-theme="theme-dark"] .app-site-footer {
    border-top: 1px solid #27272a;
    color: #71717a;
}

body.theme-dark .footer-legal-link,
body[data-theme="theme-dark"] .footer-legal-link,
body.theme-dark .footer-legal-copy,
body[data-theme="theme-dark"] .footer-legal-copy {
    color: #71717a !important;
}

body.theme-dark .footer-legal-link:hover,
body[data-theme="theme-dark"] .footer-legal-link:hover {
    color: #38bdf8 !important;
}

body.theme-dark #guest-save-drawer,
body[data-theme="theme-dark"] #guest-save-drawer,
body.theme-dark .guest-save-banner,
body[data-theme="theme-dark"] .guest-save-banner {
    background: #111113 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
}

body.theme-dark .guest-save-btn,
body[data-theme="theme-dark"] .guest-save-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1px solid #34d399 !important;
}

/* 2. 5-Slot RPG Header */
body.theme-dark .rpg-header,
body[data-theme="theme-dark"] .rpg-header {
    background: #111113 !important;
    border: 1px solid #27272a !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

/* Slot 1: PRV Mascot — Seamless Floating Mascot without Sticker Box */
body.theme-dark .rpg-prv-slot,
body[data-theme="theme-dark"] .rpg-prv-slot,
body.theme-dark #prv-companion-layer.prv-header-mode,
body[data-theme="theme-dark"] #prv-companion-layer.prv-header-mode,
body.theme-dark .rpg-prv-slot #prv-companion-layer,
body[data-theme="theme-dark"] .rpg-prv-slot #prv-companion-layer,
body.theme-dark .rpg-prv-slot #prv-companion-layer.prv-header-mode,
body[data-theme="theme-dark"] .rpg-prv-slot #prv-companion-layer.prv-header-mode,
body.theme-dark .rpg-prv-slot #prv-svg-container,
body[data-theme="theme-dark"] .rpg-prv-slot #prv-svg-container,
body.theme-dark #prv-companion-layer.prv-header-mode #prv-svg-container,
body[data-theme="theme-dark"] #prv-companion-layer.prv-header-mode #prv-svg-container,
body.theme-dark .rpg-prv-slot svg,
body[data-theme="theme-dark"] .rpg-prv-slot svg {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

body.theme-dark .rpg-prv-slot::before,
body.theme-dark .rpg-prv-slot::after,
body[data-theme="theme-dark"] .rpg-prv-slot::before,
body[data-theme="theme-dark"] .rpg-prv-slot::after {
    display: none !important;
    background: transparent !important;
    border: none !important;
}

body.theme-dark .header-taper-psi-badge,
body[data-theme="theme-dark"] .header-taper-psi-badge {
    background: #161619 !important;
    border-color: #0284c7 !important;
}
body.theme-dark .header-taper-psi-badge .taper-psi-val,
body[data-theme="theme-dark"] .header-taper-psi-badge .taper-psi-val {
    color: #38bdf8 !important;
}
body.theme-dark .header-taper-psi-badge .taper-psi-unit,
body[data-theme="theme-dark"] .header-taper-psi-badge .taper-psi-unit {
    color: #93c5fd !important;
}

body.theme-dark .header-slot3-bounty-btn.slot-bounty-idle,
body[data-theme="theme-dark"] .header-slot3-bounty-btn.slot-bounty-idle {
    background: #161619 !important;
    border-color: #27272a !important;
    color: #fbbf24 !important;
}

body.theme-dark .header-slot3-bounty-btn.slot-bounty-active,
body[data-theme="theme-dark"] .header-slot3-bounty-btn.slot-bounty-active {
    background: linear-gradient(135deg, #2a1b04 0%, #1a1002 100%) !important;
    border-color: #f59e0b !important;
    color: #fef08a !important;
}

body.theme-dark .skill-mini-pill,
body[data-theme="theme-dark"] .skill-mini-pill {
    background: #161619 !important;
    border-color: #27272a !important;
}

body.theme-dark .header-taper-badges-badge,
body[data-theme="theme-dark"] .header-taper-badges-badge {
    background: #161619 !important;
    border-color: #27272a !important;
}
body.theme-dark .header-taper-badges-badge .taper-badges-val,
body[data-theme="theme-dark"] .header-taper-badges-badge .taper-badges-val {
    color: #fbbf24 !important;
}

body.theme-dark .header-taper-account-badge,
body[data-theme="theme-dark"] .header-taper-account-badge {
    background: #161619 !important;
    border-color: #27272a !important;
    color: #ffffff !important;
}

body.theme-dark #guest-header-cta-btn,
body[data-theme="theme-dark"] #guest-header-cta-btn,
body.theme-dark .guest-header-cta-btn,
body[data-theme="theme-dark"] .guest-header-cta-btn {
    background: linear-gradient(135deg, #064e3b 0%, #022c22 100%) !important;
    border-color: #10b981 !important;
    color: #6ee7b7 !important;
}

body.theme-dark .prv-header-bubble,
body[data-theme="theme-dark"] .prv-header-bubble {
    background: #111113 !important;
    border: 2px solid #38bdf8 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
    color: #ffffff !important;
}
body.theme-dark .prv-header-bubble::after,
body[data-theme="theme-dark"] .prv-header-bubble::after {
    border-bottom-color: #111113 !important;
}
body.theme-dark .prv-header-bubble-text,
body[data-theme="theme-dark"] .prv-header-bubble-text {
    color: #e4e4e7 !important;
}
body.theme-dark .prv-header-bubble-text strong,
body[data-theme="theme-dark"] .prv-header-bubble-text strong {
    color: #ffffff !important;
}

/* 3. Main Quiz Card, Options & Controls */
body.theme-dark .card,
body.theme-dark #quiz-card,
body[data-theme="theme-dark"] .card,
body[data-theme="theme-dark"] #quiz-card {
    background: #111113 !important;
    border: 1px solid #27272a !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

body.theme-dark #question-text,
body[data-theme="theme-dark"] #question-text {
    color: #ffffff !important;
}

body.theme-dark .discipline-badge,
body[data-theme="theme-dark"] .discipline-badge {
    background: #161619 !important;
    border: 1px solid #27272a !important;
    color: #38bdf8 !important;
}

body.theme-dark .progress-track,
body.theme-dark .progress-bar-container,
body[data-theme="theme-dark"] .progress-track,
body[data-theme="theme-dark"] .progress-bar-container {
    background: #161619 !important;
    border: 1px solid #27272a !important;
}

body.theme-dark .questions-fill,
body[data-theme="theme-dark"] .questions-fill {
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%) !important;
}

body.theme-dark .xp-fill,
body[data-theme="theme-dark"] .xp-fill {
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%) !important;
}

body.theme-dark .progress-labels,
body[data-theme="theme-dark"] .progress-labels {
    color: #a1a1aa !important;
}

/* Option Buttons */
body.theme-dark .option-btn,
body[data-theme="theme-dark"] .option-btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

body.theme-dark .option-btn:not(.correct):not(.wrong),
body[data-theme="theme-dark"] .option-btn:not(.correct):not(.wrong) {
    background: #161619 !important;
    border: 1.5px solid #27272a !important;
    color: #ffffff !important;
}

body.theme-dark .option-btn:not(.correct):not(.wrong) .opt-letter,
body[data-theme="theme-dark"] .option-btn:not(.correct):not(.wrong) .opt-letter {
    background: #222226 !important;
    border: 1px solid #3f3f46 !important;
    color: #d4d4d8 !important;
}

body.theme-dark .option-btn:not(.correct):not(.wrong) .opt-letter::after,
body[data-theme="theme-dark"] .option-btn:not(.correct):not(.wrong) .opt-letter::after {
    background: #3f3f46 !important;
}

body.theme-dark .option-btn:not(.correct):not(.wrong) .opt-text,
body[data-theme="theme-dark"] .option-btn:not(.correct):not(.wrong) .opt-text {
    color: #ffffff !important;
}

body.theme-dark .option-btn:hover:not(:disabled):not(.correct):not(.wrong),
body[data-theme="theme-dark"] .option-btn:hover:not(:disabled):not(.correct):not(.wrong) {
    background: #222226 !important;
    border-color: #52525b !important;
    transform: translateY(-1px);
}

body.theme-dark .option-btn:hover:not(:disabled):not(.correct):not(.wrong) .opt-text,
body[data-theme="theme-dark"] .option-btn:hover:not(:disabled):not(.correct):not(.wrong) .opt-text {
    color: #ffffff !important;
}

body.theme-dark #quiz-card .option-btn.correct,
body.theme-dark .option-btn.correct,
body[data-theme="theme-dark"] #quiz-card .option-btn.correct,
body[data-theme="theme-dark"] .option-btn.correct {
    background: linear-gradient(135deg, #052e16 0%, #064e3b 100%) !important;
    border: 1.5px solid #10b981 !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.3) !important;
}

body.theme-dark .option-btn.correct .opt-letter,
body[data-theme="theme-dark"] .option-btn.correct .opt-letter {
    background: #064e3b !important;
    border: 1px solid #10b981 !important;
    color: #6ee7b7 !important;
}

body.theme-dark .option-btn.correct .opt-letter::after,
body[data-theme="theme-dark"] .option-btn.correct .opt-letter::after {
    background: #10b981 !important;
}

body.theme-dark .option-btn.correct .opt-text,
body.theme-dark .option-btn.correct :is(.opt-text, span.opt-text),
body[data-theme="theme-dark"] .option-btn.correct .opt-text,
body[data-theme="theme-dark"] .option-btn.correct :is(.opt-text, span.opt-text) {
    color: #ecfdf5 !important;
}

body.theme-dark .option-btn.correct::after,
body[data-theme="theme-dark"] .option-btn.correct::after {
    color: #10b981 !important;
}

body.theme-dark #quiz-card .option-btn.wrong,
body.theme-dark .option-btn.wrong,
body[data-theme="theme-dark"] #quiz-card .option-btn.wrong,
body[data-theme="theme-dark"] .option-btn.wrong {
    background: linear-gradient(135deg, #2a0a10 0%, #450a0a 100%) !important;
    border: 1.5px solid #ef4444 !important;
    border-color: #ef4444 !important;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.3) !important;
}

body.theme-dark .option-btn.wrong .opt-letter,
body[data-theme="theme-dark"] .option-btn.wrong .opt-letter {
    background: #450a0a !important;
    border: 1px solid #ef4444 !important;
    color: #fca5a5 !important;
}

body.theme-dark .option-btn.wrong .opt-letter::after,
body[data-theme="theme-dark"] .option-btn.wrong .opt-letter::after {
    background: #ef4444 !important;
}

body.theme-dark .option-btn.wrong .opt-text,
body.theme-dark .option-btn.wrong :is(.opt-text, span.opt-text),
body[data-theme="theme-dark"] .option-btn.wrong .opt-text,
body[data-theme="theme-dark"] .option-btn.wrong :is(.opt-text, span.opt-text) {
    color: #fecaca !important;
}

body.theme-dark .option-btn.wrong::after,
body[data-theme="theme-dark"] .option-btn.wrong::after {
    color: #ef4444 !important;
}

/* Explanation Box & 5-Star Rating Bar */
body.theme-dark .explanation,
body.theme-dark #explanation-box,
body[data-theme="theme-dark"] .explanation,
body[data-theme="theme-dark"] #explanation-box {
    background: #111113 !important;
    border: 1px solid #27272a !important;
    border-left: 4px solid #3b82f6 !important;
    color: #e4e4e7 !important;
}

body.theme-dark .explanation-title,
body[data-theme="theme-dark"] .explanation-title {
    color: #a1a1aa !important;
}

body.theme-dark #explanation-text,
body[data-theme="theme-dark"] #explanation-text {
    color: #e4e4e7 !important;
}

body.theme-dark .trade-insight-locked-pill,
body[data-theme="theme-dark"] .trade-insight-locked-pill {
    background: #222226 !important;
    border: 1px solid #27272a !important;
    color: #a1a1aa !important;
}

body.theme-dark .first-try-stat-badge,
body[data-theme="theme-dark"] .first-try-stat-badge {
    background: #161619 !important;
    border: 1px solid #27272a !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

body.theme-dark .first-try-stat-pill-btn,
body[data-theme="theme-dark"] .first-try-stat-pill-btn {
    background: #222226 !important;
    border: 1px solid #27272a !important;
}

body.theme-dark .first-try-stat-pill-btn:hover,
body[data-theme="theme-dark"] .first-try-stat-pill-btn:hover {
    background: #2a2a30 !important;
    border-color: #3f3f46 !important;
}

body.theme-dark .question-rating-label,
body[data-theme="theme-dark"] .question-rating-label {
    color: #a1a1aa !important;
}

body.theme-dark .q-star-btn,
body[data-theme="theme-dark"] .q-star-btn {
    color: #52525b !important;
}

body.theme-dark .q-star-btn:hover,
body[data-theme="theme-dark"] .q-star-btn:hover {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.08) !important;
}

body.theme-dark .q-star-btn.is-active,
body[data-theme="theme-dark"] .q-star-btn.is-active {
    color: #f59e0b !important;
    text-shadow: 0 2px 10px rgba(245, 158, 11, 0.6) !important;
}

/* Primary Action Button (Next Question) */
body.theme-dark .primary-btn,
body[data-theme="theme-dark"] .primary-btn {
    background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%) !important;
    color: #ffffff !important;
    border: 1px solid #38bdf8 !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    font-weight: 700 !important;
}

body.theme-dark .primary-btn:hover:not(:disabled),
body[data-theme="theme-dark"] .primary-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #0369a1 100%) !important;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.6) !important;
}

/* In-Card Contextual Gates */
body.theme-dark .quiz-context-gate,
body[data-theme="theme-dark"] .quiz-context-gate,
body.theme-dark .gate-choice-card,
body[data-theme="theme-dark"] .gate-choice-card {
    background: #161619 !important;
    border-color: #27272a !important;
    color: #ffffff !important;
}

/* 4. Unified Player Hub (#player-hub-modal) — Pure Black Apple/Tesla OLED UI */
body.theme-dark .player-hub-modal,
body[data-theme="theme-dark"] .player-hub-modal,
body.theme-dark .player-hub-body,
body[data-theme="theme-dark"] .player-hub-body,
body.theme-dark .hub-tab-content,
body[data-theme="theme-dark"] .hub-tab-content,
body.theme-dark #hub-pane-psi,
body[data-theme="theme-dark"] #hub-pane-psi,
body.theme-dark #hub-pane-skills,
body[data-theme="theme-dark"] #hub-pane-skills,
body.theme-dark #hub-pane-badges,
body[data-theme="theme-dark"] #hub-pane-badges,
body.theme-dark #hub-pane-account,
body[data-theme="theme-dark"] #hub-pane-account,
body.theme-dark .hub-spire-container,
body[data-theme="theme-dark"] .hub-spire-container,
body.theme-dark .hub-spire-scrollable,
body[data-theme="theme-dark"] .hub-spire-scrollable,
body.theme-dark .hub-spire-tower,
body[data-theme="theme-dark"] .hub-spire-tower,
body.theme-dark .hub-skills-container,
body[data-theme="theme-dark"] .hub-skills-container,
body.theme-dark .hub-skills-scrollable,
body[data-theme="theme-dark"] .hub-skills-scrollable,
body.theme-dark .hub-badges-container,
body[data-theme="theme-dark"] .hub-badges-container,
body.theme-dark .hub-badges-scrollable-grid,
body[data-theme="theme-dark"] .hub-badges-scrollable-grid,
body.theme-dark .hub-badges-grid,
body[data-theme="theme-dark"] .hub-badges-grid,
body.theme-dark .hub-account-container,
body[data-theme="theme-dark"] .hub-account-container,
body.theme-dark .hub-account-scrollable-body,
body[data-theme="theme-dark"] .hub-account-scrollable-body,
body.theme-dark .hub-acc-tiers-grid,
body[data-theme="theme-dark"] .hub-acc-tiers-grid {
    background: #000000 !important;
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.theme-dark .player-hub-modal.tab-psi-active .player-hub-body,
body.theme-dark .player-hub-modal.tab-skills-active .player-hub-body,
body.theme-dark .player-hub-modal.tab-account-active .player-hub-body,
body.theme-dark .player-hub-modal.tab-badges-active .player-hub-body,
body[data-theme="theme-dark"] .player-hub-modal.tab-psi-active .player-hub-body,
body[data-theme="theme-dark"] .player-hub-modal.tab-skills-active .player-hub-body,
body[data-theme="theme-dark"] .player-hub-modal.tab-account-active .player-hub-body,
body[data-theme="theme-dark"] .player-hub-modal.tab-badges-active .player-hub-body {
    background: #000000 !important;
    background-color: #000000 !important;
}

/* Hub Nav Bar */
body.theme-dark .player-hub-nav,
body[data-theme="theme-dark"] .player-hub-nav {
    background: #111113 !important;
    border-bottom: 1px solid #27272a !important;
}

body.theme-dark .hub-nav-back-slot,
body[data-theme="theme-dark"] .hub-nav-back-slot {
    background: transparent !important;
}

body.theme-dark .hub-back-btn,
body[data-theme="theme-dark"] .hub-back-btn {
    background: #161619 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
}

body.theme-dark .hub-back-btn:hover,
body[data-theme="theme-dark"] .hub-back-btn:hover {
    background: #222226 !important;
}

/* Inactive Tabs */
body.theme-dark .hub-nav-tab,
body[data-theme="theme-dark"] .hub-nav-tab {
    background: #161619 !important;
    border: 1px solid #27272a !important;
    color: #a1a1aa !important;
}

body.theme-dark .hub-nav-tab:hover:not(.is-active),
body[data-theme="theme-dark"] .hub-nav-tab:hover:not(.is-active) {
    background: #222226 !important;
    color: #ffffff !important;
}

/* Locked Tabs */
body.theme-dark .hub-nav-tab.is-locked,
body[data-theme="theme-dark"] .hub-nav-tab.is-locked {
    background: #0a0a0c !important;
    border-color: #1f1f23 !important;
    color: #52525b !important;
    opacity: 0.6;
}

/* Active Tab: Seamless Zero-Seam Merge into #000000 Hub Body */
body.theme-dark .hub-nav-tab.is-active,
body[data-theme="theme-dark"] .hub-nav-tab.is-active {
    background: #000000 !important;
    border-top: 1.5px solid #38bdf8 !important;
    border-left: 1.5px solid #27272a !important;
    border-right: 1.5px solid #27272a !important;
    border-bottom: 3px solid #000000 !important;
    color: #ffffff !important;
}

body.theme-dark .hub-nav-tab.is-active::after,
body[data-theme="theme-dark"] .hub-nav-tab.is-active::after {
    background: #000000 !important;
}

/* Tab 1: Pressure Spire */
body.theme-dark .hub-spire-container,
body[data-theme="theme-dark"] .hub-spire-container,
body.theme-dark .hub-spire-scrollable,
body[data-theme="theme-dark"] .hub-spire-scrollable,
body.theme-dark .hub-spire-tower,
body[data-theme="theme-dark"] .hub-spire-tower {
    background: #000000 !important;
}

body.theme-dark .hub-spire-floor-row,
body[data-theme="theme-dark"] .hub-spire-floor-row {
    background: transparent !important;
}

body.theme-dark .hub-spire-pipe-track,
body[data-theme="theme-dark"] .hub-spire-pipe-track {
    background: #222226 !important;
    border-color: #27272a !important;
}

body.theme-dark .hub-spire-water-fill,
body[data-theme="theme-dark"] .hub-spire-water-fill {
    background: linear-gradient(180deg, #38bdf8 0%, #0284c7 60%, #1e40af 100%) !important;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.4) !important;
}

body.theme-dark .hub-floor-node-dot,
body[data-theme="theme-dark"] .hub-floor-node-dot {
    background: #161619 !important;
    border: 2.5px solid #52525b !important;
}

body.theme-dark .hub-floor-node-dot.is-active,
body[data-theme="theme-dark"] .hub-floor-node-dot.is-active {
    border-color: #10b981 !important;
    background: #064e3b !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

body.theme-dark .hub-floor-node-dot.is-unlocked,
body[data-theme="theme-dark"] .hub-floor-node-dot.is-unlocked {
    border-color: #0284c7 !important;
    background: #082f49 !important;
}

body.theme-dark .hub-floor-node-dot.foundation-node,
body[data-theme="theme-dark"] .hub-floor-node-dot.foundation-node {
    border-color: #0284c7 !important;
    background: #0284c7 !important;
}

body.theme-dark .hub-floor-connector-line,
body[data-theme="theme-dark"] .hub-floor-connector-line {
    background: #27272a !important;
}

body.theme-dark .hub-spire-card,
body[data-theme="theme-dark"] .hub-spire-card {
    background: #111113 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

body.theme-dark .hub-spire-card.is-active,
body[data-theme="theme-dark"] .hub-spire-card.is-active {
    border-color: #10b981 !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.3) !important;
}

body.theme-dark .hub-spire-card.is-unlocked,
body[data-theme="theme-dark"] .hub-spire-card.is-unlocked {
    border-color: #0284c7 !important;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.25) !important;
}

body.theme-dark .hub-spire-card.is-locked,
body[data-theme="theme-dark"] .hub-spire-card.is-locked {
    background: #0c0c0e !important;
    border-color: #1f1f23 !important;
    opacity: 0.65;
}

body.theme-dark .hub-spire-card.card-penthouse,
body[data-theme="theme-dark"] .hub-spire-card.card-penthouse {
    background: linear-gradient(135deg, #1f1a05 0%, #111113 100%) !important;
    border-color: #ca8a04 !important;
}

body.theme-dark .hub-spire-card.foundation-card,
body[data-theme="theme-dark"] .hub-spire-card.foundation-card {
    background: #111113 !important;
    border-color: #27272a !important;
    cursor: pointer !important;
}

body.theme-dark .hub-spire-card.foundation-card.is-active,
body[data-theme="theme-dark"] .hub-spire-card.foundation-card.is-active {
    border-color: #10b981 !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.3) !important;
}

body.theme-dark .hub-spire-card.foundation-card.is-unlocked,
body[data-theme="theme-dark"] .hub-spire-card.foundation-card.is-unlocked {
    border-color: #0284c7 !important;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.25) !important;
}

body.theme-dark .hub-spire-card.foundation-card.is-unlocked:hover,
body[data-theme="theme-dark"] .hub-spire-card.foundation-card.is-unlocked:hover {
    border-color: #38bdf8 !important;
    transform: translateY(-1px);
}

body.theme-dark .hub-floor-node-dot.foundation-node.is-active,
body[data-theme="theme-dark"] .hub-floor-node-dot.foundation-node.is-active {
    border-color: #10b981 !important;
    background: #10b981 !important;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5) !important;
}

body.theme-dark .badge-foundation,
body[data-theme="theme-dark"] .badge-foundation {
    background: #182234 !important;
    color: #38bdf8 !important;
    border: 1px solid #0284c7 !important;
}

body.theme-dark .hub-spire-theme-title,
body[data-theme="theme-dark"] .hub-spire-theme-title {
    color: #ffffff !important;
}

body.theme-dark .hub-spire-card-desc,
body[data-theme="theme-dark"] .hub-spire-card-desc {
    color: #a1a1aa !important;
}

body.theme-dark .hub-spire-elevation-text,
body[data-theme="theme-dark"] .hub-spire-elevation-text {
    color: #d4d4d8 !important;
}

body.theme-dark .hub-spire-elevation-text.elevation-gold,
body[data-theme="theme-dark"] .hub-spire-elevation-text.elevation-gold {
    color: #fbbf24 !important;
}

body.theme-dark .hub-spire-elevation-text.foundation-lbl,
body[data-theme="theme-dark"] .hub-spire-elevation-text.foundation-lbl {
    color: #38bdf8 !important;
}

body.theme-dark .hub-spire-card-bottom,
body[data-theme="theme-dark"] .hub-spire-card-bottom {
    border-top: 1px solid #27272a !important;
}

body.theme-dark .hub-spire-psi-value,
body[data-theme="theme-dark"] .hub-spire-psi-value {
    color: #38bdf8 !important;
}

body.theme-dark .hub-spire-psi-value.psi-gold,
body[data-theme="theme-dark"] .hub-spire-psi-value.psi-gold {
    color: #fbbf24 !important;
}

body.theme-dark .hub-spire-req-text,
body[data-theme="theme-dark"] .hub-spire-req-text {
    color: #a1a1aa !important;
}

body.theme-dark .hub-theme-action-btn.btn-select,
body[data-theme="theme-dark"] .hub-theme-action-btn.btn-select {
    background: #0284c7 !important;
    color: #ffffff !important;
    border: 1px solid #38bdf8 !important;
}

body.theme-dark .hub-theme-action-btn.btn-active,
body[data-theme="theme-dark"] .hub-theme-action-btn.btn-active {
    background: #064e3b !important;
    color: #6ee7b7 !important;
    border: 1px solid #10b981 !important;
}

body.theme-dark .hub-theme-action-btn.btn-locked,
body[data-theme="theme-dark"] .hub-theme-action-btn.btn-locked {
    background: #161619 !important;
    color: #71717a !important;
    border: 1px solid #27272a !important;
}

/* Tab 2: Skills & Calibration */
body.theme-dark .hub-skills-container,
body[data-theme="theme-dark"] .hub-skills-container,
body.theme-dark .hub-skills-scrollable,
body[data-theme="theme-dark"] .hub-skills-scrollable {
    background: #000000 !important;
}

body.theme-dark .hub-skills-diagnostic-card,
body[data-theme="theme-dark"] .hub-skills-diagnostic-card,
body.theme-dark .hub-discipline-cell,
body[data-theme="theme-dark"] .hub-discipline-cell {
    background: #111113 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
}

body.theme-dark .hub-discipline-cell .cell-title,
body[data-theme="theme-dark"] .hub-discipline-cell .cell-title,
body.theme-dark .hub-discipline-name,
body[data-theme="theme-dark"] .hub-discipline-name,
body.theme-dark .hub-disc-pct,
body[data-theme="theme-dark"] .hub-disc-pct {
    color: #ffffff !important;
}

body.theme-dark .hub-disc-track,
body.theme-dark .hub-discipline-progress-track,
body[data-theme="theme-dark"] .hub-disc-track,
body[data-theme="theme-dark"] .hub-discipline-progress-track {
    background: #161619 !important;
    border: 1px solid #27272a !important;
}

body.theme-dark .hub-discipline-cell .cell-rank-title,
body[data-theme="theme-dark"] .hub-discipline-cell .cell-rank-title,
body.theme-dark .hub-disc-rank-target,
body.theme-dark .hub-target-rank,
body[data-theme="theme-dark"] .hub-disc-rank-target,
body[data-theme="theme-dark"] .hub-target-rank {
    color: #a1a1aa !important;
}

body.theme-dark .hub-disc-arrow,
body[data-theme="theme-dark"] .hub-disc-arrow {
    color: #52525b !important;
}

body.theme-dark .hub-skills-subtitle,
body[data-theme="theme-dark"] .hub-skills-subtitle {
    color: #a1a1aa !important;
}

body.theme-dark .hub-run-launcher-card,
body[data-theme="theme-dark"] .hub-run-launcher-card {
    background: #111113 !important;
    border: 1.5px solid #27272a !important;
    color: #ffffff !important;
}

body.theme-dark .hub-launcher-title,
body[data-theme="theme-dark"] .hub-launcher-title {
    color: #ffffff !important;
}

body.theme-dark .hub-launcher-desc,
body[data-theme="theme-dark"] .hub-launcher-desc {
    color: #a1a1aa !important;
}

body.theme-dark .btn-redemption-locked,
body[data-theme="theme-dark"] .btn-redemption-locked {
    background: #161619 !important;
    color: #71717a !important;
    border-color: #27272a !important;
}

body.theme-dark .card-bounty,
body.theme-dark .hub-run-launcher-card.card-bounty,
body[data-theme="theme-dark"] .card-bounty,
body[data-theme="theme-dark"] .hub-run-launcher-card.card-bounty {
    background: linear-gradient(135deg, #1f1604 0%, #111113 100%) !important;
    border: 1px solid #d97706 !important;
}

body.theme-dark .card-redemption,
body.theme-dark .hub-run-launcher-card.card-redemption,
body[data-theme="theme-dark"] .card-redemption,
body[data-theme="theme-dark"] .hub-run-launcher-card.card-redemption {
    background: linear-gradient(135deg, #041a2e 0%, #111113 100%) !important;
    border: 1px solid #0284c7 !important;
}

/* 4-Axis SVG Radar High Contrast */
body.theme-dark #hub-skills-radar-svg text[fill="#15803d"],
body[data-theme="theme-dark"] #hub-skills-radar-svg text[fill="#15803d"] { fill: #4ade80 !important; }
body.theme-dark #hub-skills-radar-svg text[fill="#0284c7"],
body[data-theme="theme-dark"] #hub-skills-radar-svg text[fill="#0284c7"] { fill: #38bdf8 !important; }
body.theme-dark #hub-skills-radar-svg text[fill="#a16207"],
body[data-theme="theme-dark"] #hub-skills-radar-svg text[fill="#a16207"] { fill: #facc15 !important; }
body.theme-dark #hub-skills-radar-svg text[fill="#7e22ce"],
body[data-theme="theme-dark"] #hub-skills-radar-svg text[fill="#7e22ce"] { fill: #c084fc !important; }
body.theme-dark #hub-skills-radar-svg line,
body[data-theme="theme-dark"] #hub-skills-radar-svg line { stroke: #3f3f46 !important; }
body.theme-dark #hub-skills-radar-svg polygon:not(#hub-radar-polygon),
body[data-theme="theme-dark"] #hub-skills-radar-svg polygon:not(#hub-radar-polygon) { stroke: #27272a !important; }

/* Tab 3: Achievements */
body.theme-dark .hub-badges-container,
body[data-theme="theme-dark"] .hub-badges-container,
body.theme-dark .hub-badges-scrollable-grid,
body[data-theme="theme-dark"] .hub-badges-scrollable-grid {
    background: #000000 !important;
}

body.theme-dark .hub-badges-pinned-top,
body[data-theme="theme-dark"] .hub-badges-pinned-top {
    background: #000000 !important;
    border-bottom: 1px solid #27272a !important;
}

body.theme-dark .hub-badges-summary-card,
body[data-theme="theme-dark"] .hub-badges-summary-card,
body.theme-dark .hub-badge-spotlight-card,
body[data-theme="theme-dark"] .hub-badge-spotlight-card {
    background: #111113 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
}

body.theme-dark .hub-badges-percentile-pill,
body[data-theme="theme-dark"] .hub-badges-percentile-pill {
    background: #2a1b04 !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
}

body.theme-dark .hub-spotlight-svg-wrap.spotlight-unlocked,
body[data-theme="theme-dark"] .hub-spotlight-svg-wrap.spotlight-unlocked {
    background: #161619 !important;
    border: 1px solid #27272a !important;
}

body.theme-dark .hub-spotlight-svg-wrap.spotlight-locked,
body[data-theme="theme-dark"] .hub-spotlight-svg-wrap.spotlight-locked {
    background: #111113 !important;
    border: 1px solid #1f1f23 !important;
}

body.theme-dark .hub-spotlight-badge-title,
body[data-theme="theme-dark"] .hub-spotlight-badge-title {
    color: #ffffff !important;
}

body.theme-dark .hub-spotlight-description,
body[data-theme="theme-dark"] .hub-spotlight-description {
    color: #d4d4d8 !important;
}

body.theme-dark .hub-spotlight-progress-text-row,
body[data-theme="theme-dark"] .hub-spotlight-progress-text-row {
    color: #a1a1aa !important;
}

body.theme-dark .hub-spotlight-progress-track,
body.theme-dark .hub-badges-progress-track,
body[data-theme="theme-dark"] .hub-spotlight-progress-track,
body[data-theme="theme-dark"] .hub-badges-progress-track {
    background: #161619 !important;
    border: 1px solid #27272a !important;
}

body.theme-dark .hub-badges-unlocked-stat,
body[data-theme="theme-dark"] .hub-badges-unlocked-stat {
    color: #ffffff !important;
}

body.theme-dark .hub-badge-grid-card,
body[data-theme="theme-dark"] .hub-badge-grid-card {
    background: #111113 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
}

body.theme-dark .hub-badge-grid-card.cell-locked,
body[data-theme="theme-dark"] .hub-badge-grid-card.cell-locked {
    background: #0c0c0e !important;
    border-color: #1f1f23 !important;
    opacity: 0.7;
}

body.theme-dark .hub-badge-grid-card.is-selected,
body[data-theme="theme-dark"] .hub-badge-grid-card.is-selected {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.4) !important;
}

body.theme-dark .hub-cell-badge-title,
body[data-theme="theme-dark"] .hub-cell-badge-title {
    color: #e4e4e7 !important;
}

body.theme-dark .hub-cell-lock-icon,
body[data-theme="theme-dark"] .hub-cell-lock-icon {
    background: #161619 !important;
    border: 1px solid #27272a !important;
    color: #a1a1aa !important;
}

body.theme-dark .hub-cell-prog-pill,
body.theme-dark .hub-cell-rarity-pill,
body[data-theme="theme-dark"] .hub-cell-prog-pill,
body[data-theme="theme-dark"] .hub-cell-rarity-pill {
    background: #161619 !important;
    color: #a1a1aa !important;
    border: 1px solid #27272a !important;
}

body.theme-dark .hub-cell-prog-pill.prog-done,
body[data-theme="theme-dark"] .hub-cell-prog-pill.prog-done {
    background: #064e3b !important;
    color: #6ee7b7 !important;
    border-color: #10b981 !important;
}

/* Tab 4: Account & Pass (High Contrast & Zero-White) */
body.theme-dark .hub-account-container,
body[data-theme="theme-dark"] .hub-account-container,
body.theme-dark .hub-account-scrollable-body,
body[data-theme="theme-dark"] .hub-account-scrollable-body {
    background: #000000 !important;
}

body.theme-dark .hub-account-pinned-header,
body[data-theme="theme-dark"] .hub-account-pinned-header {
    background: #000000 !important;
    border-bottom: 1px solid #27272a !important;
}

body.theme-dark .hub-account-status-bar,
body[data-theme="theme-dark"] .hub-account-status-bar {
    background: #111113 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
}

body.theme-dark .hub-acc-tier-badge.badge-free,
body.theme-dark .hub-acc-tier-badge.badge-guest,
body[data-theme="theme-dark"] .hub-acc-tier-badge.badge-free,
body[data-theme="theme-dark"] .hub-acc-tier-badge.badge-guest {
    background: #161619 !important;
    color: #a1a1aa !important;
    border: 1px solid #27272a !important;
}

body.theme-dark .hub-acc-tier-badge.badge-premium,
body[data-theme="theme-dark"] .hub-acc-tier-badge.badge-premium {
    background: #2a1b04 !important;
    color: #fbbf24 !important;
    border: 1px solid #f59e0b !important;
}

body.theme-dark .hub-acc-user-email,
body[data-theme="theme-dark"] .hub-acc-user-email {
    color: #a1a1aa !important;
}

body.theme-dark .hub-acc-validity-pill,
body[data-theme="theme-dark"] .hub-acc-validity-pill {
    background: #161619 !important;
    color: #d4d4d8 !important;
    border: 1px solid #27272a !important;
}

body.theme-dark .hub-acc-logout-btn,
body[data-theme="theme-dark"] .hub-acc-logout-btn {
    background: #161619 !important;
    color: #ef4444 !important;
    border: 1px solid #27272a !important;
}

body.theme-dark .hub-dynamic-value-badge,
body.theme-dark #hub-acc-pitch-badge,
body[data-theme="theme-dark"] .hub-dynamic-value-badge,
body[data-theme="theme-dark"] #hub-acc-pitch-badge {
    background: #161619 !important;
    border: 1.5px solid #f59e0b !important;
    color: #fbbf24 !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2) !important;
}

/* Pricing Cards & High Contrast Text */
body.theme-dark .hub-tier-card,
body[data-theme="theme-dark"] .hub-tier-card {
    background: #111113 !important;
    border: 1.5px solid #27272a !important;
    color: #ffffff !important;
}

body.theme-dark .hub-tier-card.is-selected,
body[data-theme="theme-dark"] .hub-tier-card.is-selected {
    background: linear-gradient(135deg, #1f1604 0%, #111113 100%) !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.3) !important;
}

body.theme-dark .hub-tier-name,
body.theme-dark .hub-tier-title,
body[data-theme="theme-dark"] .hub-tier-name,
body[data-theme="theme-dark"] .hub-tier-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.theme-dark .hub-tier-price,
body[data-theme="theme-dark"] .hub-tier-price {
    color: #ffffff !important;
    font-weight: 800 !important;
}

body.theme-dark .hub-tier-currency,
body[data-theme="theme-dark"] .hub-tier-currency {
    color: #a1a1aa !important;
}

body.theme-dark .hub-tier-per-day,
body[data-theme="theme-dark"] .hub-tier-per-day {
    color: #a1a1aa !important;
}

body.theme-dark .hub-tier-duration,
body[data-theme="theme-dark"] .hub-tier-duration {
    color: #ffffff !important;
    font-weight: 800 !important;
}

body.theme-dark .hub-tier-select-btn,
body[data-theme="theme-dark"] .hub-tier-select-btn {
    background: #161619 !important;
    border: 1.5px solid #27272a !important;
    color: #d4d4d8 !important;
}

body.theme-dark .hub-tier-card.is-selected .hub-tier-select-btn,
body[data-theme="theme-dark"] .hub-tier-card.is-selected .hub-tier-select-btn {
    background: #f59e0b !important;
    border-color: #d97706 !important;
    color: #000000 !important;
    font-weight: 800 !important;
}

body.theme-dark .hub-tier-badge.badge-emergency,
body[data-theme="theme-dark"] .hub-tier-badge.badge-emergency {
    background: #2a0a10 !important;
    color: #fca5a5 !important;
    border: 1px solid #ef4444 !important;
}

body.theme-dark .hub-tier-badge.badge-popular,
body[data-theme="theme-dark"] .hub-tier-badge.badge-popular {
    background: #2a1b04 !important;
    color: #fde68a !important;
    border: 1px solid #f59e0b !important;
}

body.theme-dark .hub-tier-badge.badge-value,
body[data-theme="theme-dark"] .hub-tier-badge.badge-value {
    background: #1e1136 !important;
    color: #ddd6fe !important;
    border: 1px solid #8b5cf6 !important;
}

/* Benefits Checklist Card */
body.theme-dark .hub-acc-benefits-card,
body[data-theme="theme-dark"] .hub-acc-benefits-card {
    background: #111113 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
}

body.theme-dark .hub-benefits-title,
body.theme-dark .hub-acc-benefits-title,
body[data-theme="theme-dark"] .hub-benefits-title,
body[data-theme="theme-dark"] .hub-acc-benefits-title {
    color: #a1a1aa !important;
    font-weight: 800 !important;
}

body.theme-dark .hub-benefit-item,
body.theme-dark .hub-acc-benefit-item,
body[data-theme="theme-dark"] .hub-benefit-item,
body[data-theme="theme-dark"] .hub-acc-benefit-item {
    color: #d4d4d8 !important;
}

body.theme-dark .hub-benefit-item strong,
body.theme-dark .hub-acc-benefit-item strong,
body[data-theme="theme-dark"] .hub-benefit-item strong,
body[data-theme="theme-dark"] .hub-acc-benefit-item strong {
    color: #ffffff !important;
}

body.theme-dark .hub-benefit-check,
body[data-theme="theme-dark"] .hub-benefit-check {
    background: #064e3b !important;
    color: #6ee7b7 !important;
}

/* Secondary Trust Badges & Legal Footer */
body.theme-dark .hub-acc-trust-footer,
body[data-theme="theme-dark"] .hub-acc-trust-footer {
    background: transparent !important;
}

body.theme-dark .hub-acc-trust-badges,
body[data-theme="theme-dark"] .hub-acc-trust-badges {
    color: #a1a1aa !important;
}

body.theme-dark .hub-acc-trust-badges .dot,
body[data-theme="theme-dark"] .hub-acc-trust-badges .dot {
    color: #3f3f46 !important;
}

body.theme-dark .hub-pay-pill,
body[data-theme="theme-dark"] .hub-pay-pill {
    background: #161619 !important;
    border: 1px solid #27272a !important;
    color: #d4d4d8 !important;
}

body.theme-dark .hub-acc-legal-terms-row,
body[data-theme="theme-dark"] .hub-acc-legal-terms-row {
    color: #71717a !important;
}

body.theme-dark .hub-acc-legal-terms-row a,
body[data-theme="theme-dark"] .hub-acc-legal-terms-row a {
    color: #a1a1aa !important;
}

/* Pinned Footer */
body.theme-dark .hub-account-pinned-footer,
body[data-theme="theme-dark"] .hub-account-pinned-footer {
    background: #000000 !important;
    border-top: 1px solid #27272a !important;
}

body.theme-dark .hub-acc-cta-btn,
body[data-theme="theme-dark"] .hub-acc-cta-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #000000 !important;
    border: 1px solid #fbbf24 !important;
    font-weight: 800 !important;
}

body.theme-dark .hub-footer-trust-micro,
body[data-theme="theme-dark"] .hub-footer-trust-micro {
    color: #a1a1aa !important;
}

/* Generic Fallback Placeholder Card */
body.theme-dark .hub-placeholder-card,
body[data-theme="theme-dark"] .hub-placeholder-card {
    background: #111113 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
}

body.theme-dark .hub-card-title,
body[data-theme="theme-dark"] .hub-card-title {
    color: #ffffff !important;
}

body.theme-dark .hub-card-sub,
body[data-theme="theme-dark"] .hub-card-sub {
    color: #a1a1aa !important;
}

body.theme-dark .hub-status-tag,
body[data-theme="theme-dark"] .hub-status-tag {
    background: #161619 !important;
    border: 1px solid #27272a !important;
    color: #d4d4d8 !important;
}


