/* wiabook.com — site theme: DARK overlay (2026-10-29, family56 bundle F).
   ORIGINAL look = LIGHT (cream #fffaf5 page, white #fff top bar, GeneratePress 3.6.1 parent theme + mu-plugin wia-ux header).
   Nothing in /var/www/wiabook is changed by this file. Load it from a root mu-plugin at `wp_head` priority 99
   (after GP's dynamic CSS at wp_print_styles/8 and after the plugin <style> blocks printed at wp_head/10 —
   wiabook-admin-polish.php, wiabook-checkout-ui.php), with the wia-site-theme engine <script> at priority 1 so
   <html data-theme="light|dark"> exists before first paint. Every rule is scoped to html[data-theme="dark"]; with
   no data-theme (or "light") the site renders exactly as today (0 px difference). color-scheme is set by the engine.

   Pages matched against live HTML (curl, 2026-10-29): / · /books/ · /books/<slug>/ · /my/ · /checkout-3/ ·
   /checkout-3/receipt/ · /about/ · blog post (464100). Shared shell = header#wux-banner > nav#wux-nav (PHP), footer.wux-ft,
   #wux-drawer (REST-late), #wux-search, #wux-a11y-panel, #wia-sg365-topbar (inline style), #wia-wiaverse-promo, #wia-bcn-*.

   Three token sets drive most of the page; the rest is hex (header-nav.css 54 hex, detail.css, checkout.css, plugin CSS):
     GP  :root --contrast..--contrast-5 / --base / --base-2      → flipped below (body, .inside-article, inputs, GB blocks)
     wia-ux design-tokens.css :root --wux-*                       → flipped below (buttons, footer, 404, legacy tabs, status)
     wia-3d-book-studio detail-page.css :root --wia-*             → flipped below (book detail page)
   html[data-theme="dark"] is (0,1,1) > :root (0,1,0), so the token overrides win regardless of load order.

   Dark palette — warm neutral so the cream/amber brand stays warm (ratios measured against page #131210 / card #1c1a18):
   ┌──────────────────┬──────────┬────────────────────────────────────────────────────────────────────┐
   │ page bg          │ #131210  │ html/body (was #fffaf5)                                             │
   │ sunk             │ #171512  │ table heads, inputs, GP --base, .wux-pub (was #f7fafc / #f2f2f2)     │
   │ card             │ #1c1a18  │ top bar, panels, cards, .inside-article, GP --base-2 (was #fff)      │
   │ raised           │ #262321  │ hover rows, chips (was #eef2f6)                                      │
   │ hover tint       │ #2a2724  │ .wux-ib / menu hover (was #eef4fa)                                   │
   │ text             │ #ece7e0  │ 15.2:1 page · 14.1:1 card                                           │
   │ text-soft        │ #c9c2b8  │  9.9:1 ·  9.8:1                                                     │
   │ text-muted       │ #a39b90  │  6.8:1 ·  6.3:1                                                     │
   │ line             │ #312e2a  │ decorative hairline only                                             │
   │ input line       │ #7b879c  │ 4.8:1 on card — every form-field / chip boundary (≥ 3:1 rule)        │
   │ primary fill     │ #1f6fa8  │ kept — white text on it 5.4:1 (hover #2a80c0)                        │
   │ primary text     │ #8cc0ea  │ links/outline buttons 9.7:1 (was #185a89, 2.9:1 on dark)             │
   │ primary line     │ #3b8ed0  │ outline-button / focus-ish borders 5.3:1                              │
   │ amber text       │ #e0954a  │ 7.6:1 — was #b56a23 / #a8621f / #c47d3a (≤ 4.5 on dark)              │
   │ gold text        │ #d4b24c  │ 9.1:1 — was #9a7b1f / #6b5410 / #b8860b                              │
   │ teal / purple    │ #4fd1b8 / #c084fc (9.9:1 / 7.1:1) — was #0e7c6b / #7d3c98                       │
   │ ok / warn / err  │ #86efac / #fbbf24 / #f87171 on tints #16261d / #2a2416 / #2d1a1a                │
   │ focus ring       │ #f59e0b  │ 8.7:1 (was #b45309 — 3.7:1 on dark; footer already used #f59e0b)      │
   └──────────────────┴──────────┴────────────────────────────────────────────────────────────────────┘
   !important appears only where the original is inline style="…" or itself !important (each rule says which).
   Book covers, logos, emoji, SVG icons: never filtered. */

/* ===== 0. mutual exclusion with the a11y panel's inversion dark mode (header-ux.css:70-72) =====
   html.wux-dark{filter:invert(1) hue-rotate(180deg)} would re-invert this already-dark page back to light.
   Engine dark wins: the root filter AND the image re-inversion (line 71) are both cancelled — otherwise covers would
   come out inverted. NOTES ④. */
html[data-theme="dark"].wux-dark { filter: none !important; background: #131210 !important; }
html[data-theme="dark"].wux-dark img,
html[data-theme="dark"].wux-dark video,
html[data-theme="dark"].wux-dark picture,
html[data-theme="dark"].wux-dark canvas,
html[data-theme="dark"].wux-dark iframe,
html[data-theme="dark"].wux-dark [style*="background-image"] { filter: none !important; }

/* ===== 1. tokens ===== */
html[data-theme="dark"] {
  /* GeneratePress (generate-style-inline-css) */
  --contrast: #f3efe9;
  --contrast-2: #e2ddd5;        /* a{color} — 13:1 */
  --contrast-3: #cfc8bf;        /* .inside-article text, h2-h5 — 10.5:1 on card */
  --contrast-4: #a39b90;        /* .entry-meta — 6.3:1 */
  --contrast-5: #8a847b;        /* input borders (GP) 4.7:1, nav text */
  --base: #171512;
  --base-2: #1c1a18;
  --gp-search-modal-overlay-bg-color: rgba(0, 0, 0, .6);
  /* wia-ux design-tokens.css */
  --wux-p: #1f6fa8; --wux-p-d: #8cc0ea; --wux-p-50: #1a2430;
  --wux-s: #7cb342; --wux-s-50: #1b2316;
  --wux-g-0: #1c1a18; --wux-g-50: #171512; --wux-g-100: #262321; --wux-g-200: #312e2a; --wux-g-300: #4a463f;
  --wux-g-400: #6e6960; --wux-g-500: #8a847b; --wux-g-600: #a39b90; --wux-g-700: #c9c2b8; --wux-g-800: #ddd7ce; --wux-g-900: #ece7e0;
  --wux-border-strong: #7b879c;
  --wux-bg: #1c1a18; --wux-bg-page: #131210;
  --wux-ok: #86efac; --wux-ok-50: #16261d; --wux-warn: #fbbf24; --wux-warn-50: #2a2416; --wux-err: #f87171; --wux-err-50: #2d1a1a;
  --wux-info: #8cc0ea; --wux-info-50: #1a2430;
  --wux-focus: #f59e0b;
  --wux-sh-1: 0 1px 3px rgba(0, 0, 0, .5), 0 1px 2px rgba(0, 0, 0, .4); --wux-sh-2: 0 12px 32px rgba(0, 0, 0, .6);
  /* wia-3d-book-studio detail-page.css (book detail) */
  --wia-neon-cyan: #e0954a; --wia-cyan: #e0954a; --wia-neon-cyan-glow: rgba(224, 149, 74, .18);
  --wia-neon-mint: #4fd1b8; --wia-neon-pink: #f472b6; --wia-neon-yellow: #d4b24c; --wia-neon-purple: #c084fc; --wia-neon-green: #86efac;
  --wia-bg-dark: #131210; --wia-bg-card: rgba(28, 26, 24, .92); --wia-border: rgba(224, 149, 74, .28);
  --wia-text: #ece7e0; --wia-text-muted: #a39b90;
  /* EDD blocks */
  --edd-blocks-light-grey: #312e2a;
  /* overlay-only tokens */
  --t-page: #131210; --t-sunk: #171512; --t-card: #1c1a18; --t-raised: #262321; --t-hover: #2a2724;
  --t-text: #ece7e0; --t-soft: #c9c2b8; --t-muted: #a39b90; --t-line: #312e2a; --t-input: #7b879c;
  --t-link: #8cc0ea; --t-link-hover: #b4d6f2; --t-p-line: #3b8ed0; --t-p-hover: #2a80c0;
  --t-amber: #e0954a; --t-amber-strong: #f0a85e; --t-gold: #d4b24c; --t-teal: #4fd1b8; --t-purple: #c084fc;
  --t-amber-tint: #2a2016; --t-amber-line: #4a3a22;
  --t-shadow: 0 12px 32px rgba(0, 0, 0, .6);
}

/* ===== 2. page shell (GP + the per-page `#fffaf5 !important` blocks) =====
   wiabook-admin-polish.php prints `html, body, body.page-id-N{background:#fffaf5!important}` on home/download/EDD/about
   pages and store.css/visual.css do the same with !important — only an !important of higher specificity passes them.
   html:has(body.wux-std) is (0,1,2) so the html side needs :has() too. */
html[data-theme="dark"],
html[data-theme="dark"]:has(body.wux-std),
html[data-theme="dark"]:has(body.wux-store-page) { background: var(--t-page) !important; }
html[data-theme="dark"] body { background: var(--t-page) !important; background-image: none !important; color: var(--t-text); }
html[data-theme="dark"] body.wux-store-page .site,
html[data-theme="dark"] body.wux-store-page .site-content,
html[data-theme="dark"] body.wux-store-page #page { background: var(--t-page) !important; }
html[data-theme="dark"] .wux-store { background: var(--t-page); color: var(--t-text); }
/* GP main.min.css hex */
html[data-theme="dark"] pre { background: rgba(255, 255, 255, .06); color: var(--t-text); }
html[data-theme="dark"] table, html[data-theme="dark"] td, html[data-theme="dark"] th { border-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] hr { background-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] abbr, html[data-theme="dark"] acronym { border-bottom-color: var(--t-muted); }
html[data-theme="dark"] .screen-reader-text:focus { background-color: var(--t-card); color: var(--t-link); }
/* GP dynamic: input/button colours come from tokens; only the hover fill needs a readable pair */
html[data-theme="dark"] button:hover, html[data-theme="dark"] input[type="submit"]:hover,
html[data-theme="dark"] a.button:hover { color: var(--t-page); background-color: var(--contrast-2); }
html[data-theme="dark"] a.generate-back-to-top { background-color: var(--t-amber); color: #1c1a18; } /* was #c47d3a + white (3.3:1) */
html[data-theme="dark"] a.generate-back-to-top:hover, html[data-theme="dark"] a.generate-back-to-top:focus { background-color: var(--t-amber-strong); color: #1c1a18; }
/* home/download/about/EDD pages: admin-polish forces title/body text to #2b2622/#3a322b !important and links to #b56a23 !important */
html[data-theme="dark"] body .entry-title, html[data-theme="dark"] body h1.entry-title, html[data-theme="dark"] body .page-title { color: var(--t-text) !important; }
html[data-theme="dark"] body .inside-article, html[data-theme="dark"] body .sidebar, html[data-theme="dark"] body .entry-content,
html[data-theme="dark"] body .entry-content h3 { color: var(--t-soft) !important; }
html[data-theme="dark"] body .entry-content a:not([style*='background']):not([class*='btn']):not([class*='button']):not(.wp-block-button__link):not(.pvl-btn),
html[data-theme="dark"] body.home .entry-content a:not(.pvl-btn) { color: var(--t-amber) !important; } /* was #b56a23 !important (4.5:1 → 7.6:1) */
html[data-theme="dark"] body .inside-article { box-shadow: none; }
/* VIS-04 token buttons: hover used --wux-p-d (now light blue) → keep a dark fill under the white label */
html[data-theme="dark"] body .wux-b-primary:hover { background: var(--t-p-hover); }
html[data-theme="dark"] body .wux-b-secondary { background: var(--t-card); border-color: var(--t-p-line); }
/* tooltip (COPY-02) inverts: light tip on dark page */
html[data-theme="dark"] .wux-term-tip { background: #ece7e0; color: #131210; }
html[data-theme="dark"] .wux-term-tip a { color: #185a89; }
html[data-theme="dark"] .wux-toast-co { background: #ece7e0; color: #131210; }
html[data-theme="dark"] .wux-toast-co button { background: var(--wux-p); color: #fff; }

/* ===== 3. header (header-nav.css / header-ux.css — all hex) ===== */
html[data-theme="dark"] .wux-nav { background: var(--t-card); border-bottom-color: var(--t-line); color: var(--t-text); }
html[data-theme="dark"] body .wux-ib { color: var(--t-text); }
html[data-theme="dark"] body .wux-ib:hover, html[data-theme="dark"] body .wux-ib:focus { background: var(--t-hover); color: var(--t-text); }
html[data-theme="dark"] body .wux-menu .wux-top, html[data-theme="dark"] .wux-dd > summary { color: var(--t-text); }
html[data-theme="dark"] body .wux-menu .wux-top:hover, html[data-theme="dark"] .wux-dd > summary:hover,
html[data-theme="dark"] .wux-dd[open] > summary { background: var(--t-hover); color: var(--t-link); }
html[data-theme="dark"] .wux-panel { background: var(--t-card); border-color: var(--t-line); box-shadow: var(--t-shadow); }
html[data-theme="dark"] body .wux-panel a, html[data-theme="dark"] body .wux-drawer a { color: var(--t-text); }
html[data-theme="dark"] .wux-panel .wux-l:hover, html[data-theme="dark"] .wux-panel .wux-l:focus,
html[data-theme="dark"] .wux-cats > li > a:hover, html[data-theme="dark"] .wux-sub:hover { background: var(--t-hover); }
html[data-theme="dark"] .wux-ph, html[data-theme="dark"] .wux-cnt, html[data-theme="dark"] .wux-sub { color: var(--t-muted); }
html[data-theme="dark"] .wux-cats-sub { border-inline-start-color: var(--t-line); }
html[data-theme="dark"] .wux-cats-sub .wux-all, html[data-theme="dark"] .wux-mega-all { color: var(--t-link) !important; } /* matches header-nav.css's own !important */
html[data-theme="dark"] body .wux-hd-login { background: var(--wux-p); color: #fff !important; }   /* kept: white on #1f6fa8 5.4:1 */
html[data-theme="dark"] body .wux-hd-login:hover { background: var(--t-p-hover); }
html[data-theme="dark"] .wux-badge-n { background: #b42318; color: #fff; }                           /* 6.6:1, unchanged */
/* account menu */
html[data-theme="dark"] .wux-acct-btn { background: var(--t-card); border-color: var(--t-line); color: var(--t-text); }
html[data-theme="dark"] body .wux-acct-btn:hover, html[data-theme="dark"] body .wux-acct-btn:focus, html[data-theme="dark"] body .wux-acct-btn[aria-expanded=true],
html[data-theme="dark"] body .wux-a11y-btn:hover, html[data-theme="dark"] body .wux-a11y-btn:focus, html[data-theme="dark"] body .wux-a11y-btn[aria-expanded=true] { background: var(--t-hover); color: var(--t-text); border-color: var(--t-p-line); }
html[data-theme="dark"] .wux-acct-menu { background: var(--t-card); border-color: var(--t-line); box-shadow: var(--t-shadow); }
html[data-theme="dark"] body .wux-acct .wux-acct-menu [role=menuitem] { color: var(--t-text) !important; } /* matches header-ux.css's own !important */
html[data-theme="dark"] body .wux-acct .wux-acct-menu [role=menuitem]:hover, html[data-theme="dark"] body .wux-acct .wux-acct-menu [role=menuitem]:focus { background: var(--t-hover); }
html[data-theme="dark"] body .wux-acct .wux-acct-menu .wux-acct-head, html[data-theme="dark"] body .wux-acct .wux-acct-menu .wux-acct-out { border-color: var(--t-line); }
html[data-theme="dark"] .wux-acct-head span { color: var(--t-muted); }
html[data-theme="dark"] .wux-acct-head b { color: var(--t-link); }
/* a11y button + panel */
html[data-theme="dark"] .wux-a11y-btn { background: var(--t-card); border-color: var(--t-input); color: var(--t-link); }
html[data-theme="dark"] .wux-a11y-panel { background: var(--t-card); color: var(--t-text); border-color: var(--t-line); box-shadow: var(--t-shadow); }
html[data-theme="dark"] .wux-a11y-close { color: var(--t-text); }
html[data-theme="dark"] .wux-seg span { border-color: var(--t-input); color: var(--t-text); }
html[data-theme="dark"] .wux-seg input:checked + span { background: var(--wux-p); border-color: var(--wux-p); color: #fff; }
html[data-theme="dark"] .wux-btn { background: var(--t-card); border-color: var(--t-p-line); color: var(--t-link); }
html[data-theme="dark"] .wux-btn-primary { background: var(--wux-p); color: #fff; }
html[data-theme="dark"] .wux-btn:hover { filter: brightness(1.12); }
html[data-theme="dark"] .wux-muted { color: var(--t-muted); }
html[data-theme="dark"] .wux-field-inline select { background: var(--t-sunk); color: var(--t-text); border-color: var(--t-input); }
/* drawer (markup arrives by REST on first ☰ tap — same classes) */
html[data-theme="dark"] .wux-drawer { background: rgba(0, 0, 0, .6); }
html[data-theme="dark"] .wux-drawer-p { background: var(--t-card); color: var(--t-text); box-shadow: 8px 0 32px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .wux-dcard { border-color: var(--t-line); }
html[data-theme="dark"] .wux-dcard div span { color: var(--t-muted); }
html[data-theme="dark"] .wux-dsearch input { background: var(--t-sunk); color: var(--t-text); border-color: var(--t-input); }
html[data-theme="dark"] .wux-dmenu, html[data-theme="dark"] .wux-dmenu > li { border-color: var(--t-line); }
html[data-theme="dark"] body .wux-drawer a.wux-btn:not(.wux-btn-primary) { color: var(--t-link); }
html[data-theme="dark"] body .wux-drawer a.wux-btn-primary, html[data-theme="dark"] body .wux-drawer .wux-btn-primary { background: var(--wux-p); color: #fff !important; }
html[data-theme="dark"] .wux-drawer-err { color: var(--wux-err); }
/* search overlay */
html[data-theme="dark"] .wux-search { background: rgba(0, 0, 0, .6); }
html[data-theme="dark"] .wux-search-p { background: var(--t-card); box-shadow: 0 16px 40px rgba(0, 0, 0, .7); }
html[data-theme="dark"] .wux-search-f { border-bottom-color: var(--t-line); }
html[data-theme="dark"] .wux-search-f input { color: var(--t-text); }
html[data-theme="dark"] .wux-sugg-h, html[data-theme="dark"] .wux-o-m { color: var(--t-muted); }
html[data-theme="dark"] .wux-o img { background: var(--t-raised); }
html[data-theme="dark"] .wux-o[aria-selected=true], html[data-theme="dark"] .wux-o:hover { background: var(--t-hover); }
html[data-theme="dark"] .wux-o[aria-selected=true] { outline-color: var(--t-link); }
html[data-theme="dark"] .wux-sugg-clear { background: var(--t-card); border-color: var(--t-input); color: var(--t-text); }

/* ===== 4. 삼국지 365 top bar (inline style="…" in PHP → !important is the only way), promos, notice panel ===== */
html[data-theme="dark"] #wia-sg365-topbar[style] {
  background: linear-gradient(90deg, rgba(139, 92, 246, .16) 0%, rgba(236, 72, 153, .14) 35%, rgba(251, 191, 36, .12) 50%, rgba(236, 72, 153, .14) 65%, rgba(59, 130, 246, .16) 100%), #1a1714 !important;
  color: var(--t-text) !important; border-bottom-color: rgba(251, 191, 36, .35) !important;
}
html[data-theme="dark"] #wia-sg365-topbar > span:first-child { color: var(--t-gold) !important; }  /* home.css sets #6b5410 !important */
html[data-theme="dark"] #wia-sg365-topbar > span:nth-child(2) { color: var(--t-text) !important; } /* inline #2b2622 */
html[data-theme="dark"] #wia-sg365-topbar strong[style] { color: #f0894a !important; }             /* inline #c0571a (4.1:1) */
html[data-theme="dark"] #wia-sg365-topbar > a[style*="linear-gradient"] { color: #1c1a18 !important; } /* amber pill: white label was 3.3:1 → dark label 5.8:1 */
html[data-theme="dark"] #wia-sg365-topbar > a[style*="dashed"], html[data-theme="dark"] #wia-sg365-topbar > button[style] { color: var(--t-gold) !important; border-bottom-color: rgba(212, 178, 76, .5) !important; }
/* WIAverse pill is already a navy gradient — just an edge so it separates from the dark page */
html[data-theme="dark"] #wia-wiaverse-promo > a[style] { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 2px 8px rgba(0, 0, 0, .5) !important; }
/* desktop notice panel + floating chip (bcn CSS). The code stage (.wia-bcn-stage) stays WHITE on purpose — its 12px
   white quiet zone is a scan requirement (bcn CSS comment); only the panel chrome goes dark. */
html[data-theme="dark"] #wia-bcn-panel {
  background: linear-gradient(#1c1a18, #1c1a18) padding-box, linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff, #5f27cd, #01a3a4, #ff6b6b) border-box;
  color: var(--t-soft); box-shadow: 0 10px 34px rgba(0, 0, 0, .6);
}
html[data-theme="dark"] #wia-bcn-panel h3 { color: var(--t-text); }
html[data-theme="dark"] #wia-bcn-panel .wia-bcn-body { color: var(--t-soft); }
html[data-theme="dark"] #wia-bcn-close { background: rgba(255, 255, 255, .08); color: var(--t-soft); }
html[data-theme="dark"] #wia-bcn-close:hover, html[data-theme="dark"] #wia-bcn-close:focus-visible { background: rgba(255, 255, 255, .16); color: var(--t-text); }
html[data-theme="dark"] #wia-bcn-chip { background: var(--t-card); color: var(--t-text); box-shadow: 0 4px 16px rgba(0, 0, 0, .5); }
html[data-theme="dark"] #wia-bcn-chip .wia-bcn-chip-x { background: rgba(255, 255, 255, .08); color: var(--t-muted); }
html[data-theme="dark"] #wia-bcn-chip .wia-bcn-chip-x:hover { background: rgba(255, 255, 255, .16); }

/* ===== 5. home (home.css .wux-home) ===== */
html[data-theme="dark"] .wux-home, html[data-theme="dark"] .wux-home h2, html[data-theme="dark"] .wux-hero h1 { color: var(--t-text); }
html[data-theme="dark"] .wux-hero-sub, html[data-theme="dark"] .wux-pub-sub, html[data-theme="dark"] .wux-sg-card p,
html[data-theme="dark"] .wux-vals p, html[data-theme="dark"] .wux-scr p { color: var(--t-soft); }
html[data-theme="dark"] .wux-hero-search { background: var(--t-card); border-color: var(--t-p-line); }
html[data-theme="dark"] .wux-hero-search input { color: var(--t-text); }
html[data-theme="dark"] .wux-hero-search input::placeholder { color: var(--t-muted); }
html[data-theme="dark"] .wux-hero-search button { background: var(--wux-p); color: #fff; }
html[data-theme="dark"] .wux-home .wux-btn { background: var(--t-card); border-color: var(--t-p-line); color: var(--t-link); }
html[data-theme="dark"] .wux-home .wux-btn-primary { background: var(--wux-p); color: #fff; }
html[data-theme="dark"] .wux-hero-rot { background: var(--t-card); border-color: var(--t-input); color: var(--t-soft); }
html[data-theme="dark"] .wux-hero-rot:hover { border-color: var(--t-text); }
html[data-theme="dark"] .wux-note { background: #1a2430; border-color: #2d4a63; }
html[data-theme="dark"] .wux-note a, html[data-theme="dark"] .wux-more, html[data-theme="dark"] .wux-bl, html[data-theme="dark"] .wux-crumb a { color: var(--t-link); }
/* home.css beats the theme's body.home link colour with (0,4,x) !important — same shape, one level higher */
html[data-theme="dark"] body.home .entry-content .wux-home a.wux-btn { color: var(--t-link) !important; }
html[data-theme="dark"] body.home .entry-content .wux-home a.wux-btn-primary { color: #fff !important; }
html[data-theme="dark"] body.home .entry-content .wux-home a.wux-more, html[data-theme="dark"] body.home .entry-content .wux-home .wux-note a { color: var(--t-link) !important; }
html[data-theme="dark"] body.home .entry-content .wux-home .wux-bc a, html[data-theme="dark"] body.home .entry-content .wux-home .wux-cont a { color: var(--t-text) !important; }
html[data-theme="dark"] body .wux-home .wux-vals strong { color: #fdba74 !important; }   /* was #9a3412 !important */
html[data-theme="dark"] body .wux-home .wux-pub-sub strong { color: var(--t-link) !important; }
/* book cards (home carousel + store grid share .wux-bc) */
html[data-theme="dark"] .wux-bc a, html[data-theme="dark"] .wux-cont a, html[data-theme="dark"] .wux-bp { color: var(--t-text); }
html[data-theme="dark"] .wux-cvw, html[data-theme="dark"] .wux-cv-fit { background: var(--t-raised); box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .wux-ba, html[data-theme="dark"] .wux-usd, html[data-theme="dark"] .wux-pr-card .wux-pr-list,
html[data-theme="dark"] .wux-pr-card .wux-pr-usd { color: var(--t-muted); }
html[data-theme="dark"] .wux-pr-card .wux-pr-pct { color: #fca5a5; }                        /* was #9b1c1c */
html[data-theme="dark"] .wux-cb { background: var(--t-card); border-color: var(--t-input); color: var(--t-text); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .wux-cont a { border-color: var(--t-line); }
/* 삼국지 365 card */
html[data-theme="dark"] .wux-sg-card { background: linear-gradient(135deg, #2a2016, #231a12); border-color: var(--t-amber-line); }
html[data-theme="dark"] .wux-sg-card strong, html[data-theme="dark"] .wux-sg-more > summary, html[data-theme="dark"] .wux-sg-note { color: #fdba74; }
html[data-theme="dark"] .wux-home .wux-bar { background: #3a2f22; }
html[data-theme="dark"] .wux-home .wux-bar span, html[data-theme="dark"] .wux-bar span { background: var(--wux-s); } /* #4d7c0f was 2.3:1 on the dark track */
html[data-theme="dark"] .wux-sg-more { background: var(--t-card); border-color: var(--t-amber-line); }
html[data-theme="dark"] .wux-sg-more[open] > summary { border-bottom-color: var(--t-amber-line); }
html[data-theme="dark"] .wux-sg-note { background: var(--t-amber-tint); border-color: var(--t-amber-line); }
/* tabs, value props, 인생기록관 */
html[data-theme="dark"] .wux-tabs { border-bottom-color: var(--t-line); }
html[data-theme="dark"] .wux-tabs [role=tab] { color: var(--t-muted); }
html[data-theme="dark"] .wux-tabs [role=tab][aria-selected=true] { color: var(--t-text); border-bottom-color: var(--t-p-line); }
html[data-theme="dark"] .wux-pub { background: var(--t-sunk); border-color: var(--t-line); }
html[data-theme="dark"] .wux-vals li { background: var(--t-card); border-color: var(--t-line); }
html[data-theme="dark"] .wux-scr { background: #1b2316; border-color: #34452a; }

/* ===== 6. store /books/ (store.css) ===== */
html[data-theme="dark"] .wux-store-h h1, html[data-theme="dark"] .wux-count-n { color: var(--t-text); }
html[data-theme="dark"] .wux-filters { background: var(--t-card); border-color: var(--t-line); }
html[data-theme="dark"] .wux-f-q input, html[data-theme="dark"] .wux-filters select { background: var(--t-sunk); border-color: var(--t-input); color: var(--t-text); }
html[data-theme="dark"] .wux-f-more > summary { border-color: var(--t-input); color: var(--t-text); }
html[data-theme="dark"] .wux-filters label, html[data-theme="dark"] .wux-count, html[data-theme="dark"] .wux-grid .wux-empty-li { color: var(--t-soft); }
html[data-theme="dark"] .wux-f-reset { color: var(--t-link); }
html[data-theme="dark"] .wux-empty-box { background: var(--t-card); border-color: var(--t-input); }
html[data-theme="dark"] .wux-chip, html[data-theme="dark"] .wux-vars a { border-color: var(--t-input); color: var(--t-link); }
/* GP featured-image archive bits that may show on /books/ */
html[data-theme="dark"] body.category-wia-news .gb-query-loop-wrapper .gb-query-loop-item { background: var(--t-card); border-color: var(--t-line); }

/* ===== 7. book detail /books/<slug>/ (detail.css + wia-3d-book-studio detail-page.css + inline) ===== */
html[data-theme="dark"] .wia-book-detail-page { background: linear-gradient(135deg, var(--t-page) 0%, #171512 100%); color: var(--t-text); }
html[data-theme="dark"] .wia-content-section, html[data-theme="dark"] .wia-usage-guide { background: var(--t-card); }
html[data-theme="dark"] .wia-tab-btn:hover { color: var(--t-amber); background: var(--t-hover); }
html[data-theme="dark"] .wia-tabs { border-bottom-color: rgba(224, 149, 74, .3); }
html[data-theme="dark"] .wia-book-description, html[data-theme="dark"] .wia-author-titles li, html[data-theme="dark"] .wia-author-motto,
html[data-theme="dark"] .wia-usage-section li, html[data-theme="dark"] .wia-credit-section h3, html[data-theme="dark"] .review-text,
html[data-theme="dark"] .review-reply p, html[data-theme="dark"] .wia-meta-item, html[data-theme="dark"] .wia-book-meta-inline,
html[data-theme="dark"] .wia-detail-sidebar > h3 { color: var(--t-text); }
html[data-theme="dark"] .wia-credit-section p, html[data-theme="dark"] .wia-credit-section ul li, html[data-theme="dark"] .wia-credit-example-box p,
html[data-theme="dark"] .wia-credit-timeline li, html[data-theme="dark"] .wia-summary-inner, html[data-theme="dark"] .wia-summary-meta,
html[data-theme="dark"] .wia-gallery-pager, html[data-theme="dark"] .wia-preview-modal-indicator, html[data-theme="dark"] .wia-preview-modal-btn,
html[data-theme="dark"] .wia-3d-title, html[data-theme="dark"] .wia-heart-selector label, html[data-theme="dark"] .wia-review-login-notice p,
html[data-theme="dark"] .wia-meta-item .meta-value, html[data-theme="dark"] .wia-book-meta-inline .meta-value, html[data-theme="dark"] .wia-id-item .id-value,
html[data-theme="dark"] .wia-win-item .win-value { color: var(--t-soft); }
html[data-theme="dark"] .wia-breadcrumb-sep, html[data-theme="dark"] .wia-credit-example-row-label, html[data-theme="dark"] .wia-credit-timeline li::before,
html[data-theme="dark"] .wia-gallery-arrow, html[data-theme="dark"] .wia-currency-toggle-btn, html[data-theme="dark"] .wia-cur-btn,
html[data-theme="dark"] .review-header .review-date, html[data-theme="dark"] .review-reply small, html[data-theme="dark"] .wia-summary-price s { color: var(--t-muted); }
html[data-theme="dark"] .wia-gallery-arrow:hover { color: var(--t-amber); background: rgba(224, 149, 74, .12); }
html[data-theme="dark"] .wia-preview-btn { background: var(--t-card); border-color: rgba(224, 149, 74, .4); color: var(--t-soft); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .wia-preview-btn:hover { background: var(--t-hover); border-color: var(--t-amber); color: var(--t-amber); }
html[data-theme="dark"] .wia-detail-card { background: var(--t-card); border-color: rgba(224, 149, 74, .22); box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .wia-detail-cap { border-bottom-color: rgba(224, 149, 74, .2); }
html[data-theme="dark"] .wux-dt .wia-detail-cap { color: var(--t-amber) !important; }                 /* detail.css: #8a4f17 !important */
html[data-theme="dark"] .wia-credit-guide { background: var(--t-card); border-color: rgba(212, 178, 76, .25); }
html[data-theme="dark"] .wia-credit-guide-title { color: var(--t-gold); border-bottom-color: rgba(212, 178, 76, .25); }
html[data-theme="dark"] .wia-credit-example-label, html[data-theme="dark"] .wia-credit-example-box strong, html[data-theme="dark"] .wia-credit-section ul li::before,
html[data-theme="dark"] .wia-summary-credit, html[data-theme="dark"] .wia-currency-toggle-btn:hover, html[data-theme="dark"] .wia-cur-btn:hover,
html[data-theme="dark"] .wia-cur-btn.active { color: var(--t-gold); }
html[data-theme="dark"] .wia-cur-btn.active { border-color: var(--t-gold); }
html[data-theme="dark"] .wia-credit-example-box { background: rgba(212, 178, 76, .06); border-color: rgba(212, 178, 76, .2); }
html[data-theme="dark"] .wia-credit-example-row-label { border-bottom-color: rgba(212, 178, 76, .15); }
html[data-theme="dark"] .wia-book-summary-bar { background: var(--t-sunk); }
html[data-theme="dark"] .wia-summary-title { color: var(--t-amber); }
html[data-theme="dark"] .wia-notice-tts, html[data-theme="dark"] .wia-tts-play-btn, html[data-theme="dark"] .wia-tts-lang-badge { color: var(--t-purple); }
html[data-theme="dark"] .wia-tts-time, html[data-theme="dark"] span#wiaTtsStatus[style] { color: var(--t-purple) !important; } /* inline #7d3c98 (2.3:1) */
html[data-theme="dark"] .wia-download-files a.wia-file-badge:not([style*="background"]) { color: #e0a86a; background: var(--t-amber-tint); border-color: #6b4e2a; }
html[data-theme="dark"] .wia-book-detail-page .wia-book-subtitle { color: var(--t-muted) !important; -webkit-text-fill-color: var(--t-muted) !important; } /* plugin: #5a4f44 !important */
html[data-theme="dark"] .wia-book-detail-page .wia-book-author, html[data-theme="dark"] .wia-book-detail-page .wia-book-author span { color: var(--t-text) !important; -webkit-text-fill-color: var(--t-text) !important; }
/* format chips (single-download.php:1117-1139, inline): active = indigo gradient + white (kept); inactive = transparent + #475569 (2.5:1) */
html[data-theme="dark"] .wux-dt .wia-format-chip[style*="color:#475569"] { color: var(--t-soft) !important; }
html[data-theme="dark"] .wux-dt .wux-seg-fmt div[style*="background:#e2e8f0"] { background: var(--t-raised) !important; } /* the grey slab behind the chips (inline) */
html[data-theme="dark"] .wux-dt .wux-seg-fmt .wia-format-chip[aria-current=true] { outline-color: var(--t-link); }
/* buy row (detail.css rules are !important — same shape one level higher) */
html[data-theme="dark"] .wux-dt .wux-buy .wia-btn-reader { background: var(--t-card) !important; color: var(--t-link) !important; border-color: var(--t-p-line) !important; }
html[data-theme="dark"] .wux-dt .wux-buy > .wia-btn-action.wia-btn-disabled { background: var(--t-raised) !important; color: var(--t-soft) !important; border-color: var(--t-input) !important; }
html[data-theme="dark"] .wux-dt .wux-buy .wia-btn-purchase { box-shadow: 0 4px 14px rgba(0, 0, 0, .5) !important; } /* #1f6fa8 + white kept */
html[data-theme="dark"] .wux-share > summary { background: var(--t-card); border-color: var(--t-input); color: var(--t-text); }
html[data-theme="dark"] .wux-specs { background: var(--t-card); border-color: var(--t-line); }
html[data-theme="dark"] .wux-specs dt { color: var(--t-muted); }
html[data-theme="dark"] .wux-specs dd { color: var(--t-text); }
html[data-theme="dark"] .wux-dt .wux-acc { background: var(--t-card); border-color: var(--t-line); }
html[data-theme="dark"] .wux-dt .wux-acc > summary { color: var(--t-text); }
html[data-theme="dark"] .wux-dt .wux-acc[open] > summary { border-bottom-color: var(--t-line); }
html[data-theme="dark"] .wux-pr-detail .wux-pr-main { color: var(--t-text); }
html[data-theme="dark"] .wux-pr-detail .wux-pr-list, html[data-theme="dark"] .wux-pr-detail .wux-pr-note { color: var(--t-muted); }
html[data-theme="dark"] .wux-pr-detail .wux-pr-usd { color: var(--t-soft); }
html[data-theme="dark"] .wux-pr-detail .wux-pr-pct { background: #3b1d1d; color: #fca5a5; }
html[data-theme="dark"] .wux-dt [data-i18n^="rba_"][data-i18n$="_desc"] { color: var(--t-muted) !important; } /* detail.css: #5f6b7a !important */
/* "listen / read" compat box: inline cream gradient + purple border */
html[data-theme="dark"] .wia-reader-compat[style] { background: #221d2a !important; border-color: rgba(192, 132, 252, .35) !important; color: var(--t-text) !important; }
html[data-theme="dark"] .wia-reader-compat strong[style] { color: var(--t-purple) !important; }
/* mini-cart confirm */
html[data-theme="dark"] .wux-mc-p { background: var(--t-card); color: var(--t-text); border-color: var(--t-line); box-shadow: 0 16px 40px rgba(0, 0, 0, .7); }
html[data-theme="dark"] .wux-mc-h { color: var(--wux-ok); }
html[data-theme="dark"] .wux-mc-n { color: var(--t-muted); }
html[data-theme="dark"] .wux-mc-x { color: var(--t-text); }
/* author's other books + related sidebar: white info box under a rainbow frame (one copy in <style>, one inline) */
html[data-theme="dark"] .wia-ab-grid .wbg-card-info, html[data-theme="dark"] .wux-dt .wia-detail-sidebar div[style*="background:#ffffff"] { background: var(--t-card) !important; border-color: var(--t-line) !important; }
html[data-theme="dark"] .wia-ab-grid .wbg-card-inner img { background: var(--t-raised); }
html[data-theme="dark"] .wia-ab-grid .wbg-card-title { color: var(--t-text); }
html[data-theme="dark"] .wia-ab-grid .wbg-card-price { color: var(--t-amber); }
/* report modal (white box, #e5e7eb inputs — inline) */
html[data-theme="dark"] #wia-report-modal > div[style*="background:#fff"] { background: var(--t-card) !important; color: var(--t-text); }
html[data-theme="dark"] #wia-report-modal textarea[style], html[data-theme="dark"] #wia-report-modal input[style] { background: var(--t-sunk) !important; color: var(--t-text) !important; border-color: var(--t-input) !important; }
/* reviews (plugin assumed a dark card: white text on rgba(255,255,255,.04)) — now readable as designed */
html[data-theme="dark"] .wia-review-form h3, html[data-theme="dark"] .review-header .reviewer, html[data-theme="dark"] #wia-review-text,
html[data-theme="dark"] .review-reply-form textarea, html[data-theme="dark"] .wia-paging-btn { color: var(--t-text); }
html[data-theme="dark"] #wia-review-text, html[data-theme="dark"] .review-reply-form textarea { background: var(--t-sunk); border-color: var(--t-input); }
html[data-theme="dark"] .wia-review-item, html[data-theme="dark"] .wia-review-form { border-color: var(--t-line); }
/* 3D / preview modals already dark (#0a0f23 gradients, rgba(0,0,0,.9) backdrops) — untouched */

/* ===== 8. account hub /my/ (my.css) ===== */
html[data-theme="dark"] .wux-my { color: var(--t-text); }
html[data-theme="dark"] body .wux-my .wux-my-nav a { color: var(--t-text); }
html[data-theme="dark"] body .wux-my .wux-my-nav a:hover { background: var(--t-hover); }
html[data-theme="dark"] body .wux-my .wux-my-nav a.is-on { background: var(--wux-p); color: #fff; }
html[data-theme="dark"] .wux-card, html[data-theme="dark"] .wux-book { background: var(--t-card); border-color: var(--t-line); }
html[data-theme="dark"] .wux-vf { background: #2a2416; border-color: #8a6a1a; color: var(--t-text); }
html[data-theme="dark"] .wux-vf-amt { color: #fca5a5; }
html[data-theme="dark"] .wux-vf-ok { background: #16261d; border-color: #2f7a5a; }
html[data-theme="dark"] .wux-stats a { border-color: var(--t-line); color: var(--t-muted); }
html[data-theme="dark"] .wux-stats strong { color: var(--t-text); }
html[data-theme="dark"] .wux-stats a:hover { border-color: var(--t-p-line); }
html[data-theme="dark"] .wux-list li, html[data-theme="dark"] .wux-feed li, html[data-theme="dark"] .wux-table th, html[data-theme="dark"] .wux-table td { border-bottom-color: var(--t-line); }
html[data-theme="dark"] .wux-empty { border-color: var(--t-input); color: var(--t-muted); }
html[data-theme="dark"] .wux-book img, html[data-theme="dark"] .wux-cover-ph { background: var(--t-raised); }
html[data-theme="dark"] .wux-book-t a, html[data-theme="dark"] .wux-feed a { color: var(--t-text); }
html[data-theme="dark"] .wux-badge { background: var(--wux-p-50); color: var(--t-link); }
html[data-theme="dark"] .wux-bar { background: var(--t-line); }
html[data-theme="dark"] .wux-field input:not([type=checkbox]):not([type=file]), html[data-theme="dark"] .wux-field select, html[data-theme="dark"] .wux-field textarea { background: var(--t-sunk); border-color: var(--t-input); color: var(--t-text); }
html[data-theme="dark"] .wux-field input:focus, html[data-theme="dark"] .wux-field select:focus, html[data-theme="dark"] .wux-field textarea:focus { border-color: var(--t-link); }
html[data-theme="dark"] .wux-help { color: var(--t-muted); }
html[data-theme="dark"] .wux-ok { background: #16261d; color: #86efac; border-color: #2f7a5a; }
html[data-theme="dark"] .wux-err { background: #2d1a1a; color: #fca5a5; border-color: #7a3b3b; }
html[data-theme="dark"] body .wux-my a.wux-btn, html[data-theme="dark"] body .wux-my .wux-btn { color: var(--t-link); }
html[data-theme="dark"] body .wux-my a.wux-btn-primary, html[data-theme="dark"] body .wux-my .wux-btn-primary { color: #fff; background: var(--wux-p); }
@media (max-width: 860px) { html[data-theme="dark"] .wux-my-nav a { border-color: var(--t-line); } }
/* borrowed legacy tabs (.wux-legacy …!important in my.css — same selectors one level higher; token-based ones follow the flipped vars) */
html[data-theme="dark"] .wux-legacy, html[data-theme="dark"] .wux-legacy .wia-myaccount { color: var(--t-text) !important; }
html[data-theme="dark"] .wux-legacy .wia-ma-table { background: var(--t-card); }
html[data-theme="dark"] .wux-legacy .wia-ma-table td, html[data-theme="dark"] .wux-legacy table td { background: var(--t-card); }
html[data-theme="dark"] .wux-legacy .wia-ma-card, html[data-theme="dark"] .wux-legacy .wia-ma-wishlist-item, html[data-theme="dark"] .wux-legacy .wia-ma-section,
html[data-theme="dark"] .wux-legacy .wia-payout-section, html[data-theme="dark"] .wux-legacy .wia-ma-credit-summary { background: var(--t-card) !important; }
html[data-theme="dark"] .wux-legacy .wia-ma-card-num, html[data-theme="dark"] .wux-legacy .wia-ma-credit-big, html[data-theme="dark"] .wux-legacy .wia-ma-plus,
html[data-theme="dark"] .wux-legacy .wia-ma-wish-price, html[data-theme="dark"] .wux-legacy .wia-ma-credit-amount, html[data-theme="dark"] .wux-legacy .wia-ma-table td.wia-ma-plus,
html[data-theme="dark"] .wux-legacy [style*="color:#00d4aa"] { color: var(--t-teal) !important; }          /* #0f766e was 3.4:1 */
html[data-theme="dark"] .wux-legacy .wia-payout-rules { border-color: #34452a !important; }
html[data-theme="dark"] .wux-legacy .wia-payout-info-box { border-color: #2d4a63 !important; }
html[data-theme="dark"] .wux-legacy .wia-ma-input, html[data-theme="dark"] .wux-legacy .wia-ma-textarea, html[data-theme="dark"] .wux-legacy .wia-payout-input,
html[data-theme="dark"] .wux-legacy input[type=text], html[data-theme="dark"] .wux-legacy input[type=email], html[data-theme="dark"] .wux-legacy input[type=tel],
html[data-theme="dark"] .wux-legacy input[type=number], html[data-theme="dark"] .wux-legacy input[type=search], html[data-theme="dark"] .wux-legacy select,
html[data-theme="dark"] .wux-legacy textarea, html[data-theme="dark"] .wux-legacy .wia-country-dropdown { background: var(--t-sunk) !important; border-color: var(--t-input) !important; color: var(--t-text) !important; }
html[data-theme="dark"] .wux-legacy [style*="color:#ffd700"], html[data-theme="dark"] .wux-legacy [style*="color:#f59e0b"] { color: var(--t-gold) !important; }
html[data-theme="dark"] .wux-legacy [style*="color:#fed7aa"], html[data-theme="dark"] .wux-legacy [style*="color:#fdba74"] { color: #fdba74 !important; }
html[data-theme="dark"] .wux-legacy .wia-ma-notice.success { border-color: #2f7a5a !important; }
/* the hub's emoji chip behind the selected nav icon stays white on purpose (WP emoji images are dark silhouettes) */

/* ===== 9. checkout / receipt (checkout.css + wiabook-checkout-ui.php + admin-polish page block + EDD) =====
   CSS only — never touch the DOM here. Everything from the plugins is !important at (1,0,0)-(1,1,1); the body.wux-checkout
   prefix puts these at (1,2,2) so they win even if load order is ever changed. Field borders #7b879c (4.8:1). */
html[data-theme="dark"] .wux-steps li { background: var(--t-raised); color: var(--t-soft); }
html[data-theme="dark"] .wux-steps li.is-on { background: var(--wux-p); color: #fff; }
html[data-theme="dark"] .wux-steps li.is-done { background: #16261d; color: #86efac; }
html[data-theme="dark"] .wux-buyer { background: var(--t-sunk); border-color: var(--t-line); }
html[data-theme="dark"] .wux-buyer-h { color: var(--t-muted); }
html[data-theme="dark"] .wux-buyer-v, html[data-theme="dark"] .wux-co-krw .wux-pr-main, html[data-theme="dark"] .wux-recent h2, html[data-theme="dark"] .wux-ec-h { color: var(--t-text); }
html[data-theme="dark"] .wux-buyer-edit { color: var(--t-link) !important; }                  /* checkout.css: #185a89 !important */
html[data-theme="dark"] .wux-secure, html[data-theme="dark"] .wux-co-krw { color: var(--t-soft); }
html[data-theme="dark"] .wux-co-krw s { color: var(--t-muted); }
html[data-theme="dark"] .wux-done { background: #16261d; border-color: #2f7a5a; }
html[data-theme="dark"] .wux-done-h { color: #86efac; }
@media (max-width: 767px) {
  html[data-theme="dark"] .wux-sum-toggle { background: var(--t-card); border-color: var(--t-line); color: var(--t-text); }
  html[data-theme="dark"] .wux-paybar { background: var(--t-card); border-top-color: var(--t-line); box-shadow: 0 -6px 18px rgba(0, 0, 0, .5); }
  html[data-theme="dark"] .wux-paybar button { background: var(--wux-p); color: #fff; }
}
html[data-theme="dark"] body.wux-checkout .inside-article a:not(.wux-btn):not(.edd-submit):not(.edd_cart_remove_item_btn),
html[data-theme="dark"] body.wux-checkout .inside-article a:not(.wux-btn) span { color: var(--t-link) !important; }   /* checkout.css !important */
html[data-theme="dark"] body.wux-checkout .inside-article a.wux-btn-primary, html[data-theme="dark"] body.wux-checkout .entry-content a.wux-btn-primary,
html[data-theme="dark"] body.page-id-390069 .entry-content a.wux-btn-primary { color: #fff !important; background: var(--wux-p); }
html[data-theme="dark"] body.wux-checkout .inside-article a.wux-btn:not(.wux-btn-primary), html[data-theme="dark"] body.page-id-390069 .entry-content a.wux-btn:not(.wux-btn-primary) { color: var(--t-link) !important; }
html[data-theme="dark"] body.wux-checkout .wia-credit-label, html[data-theme="dark"] body.wux-checkout .wia-credit-amount { color: #86efac !important; } /* was #2f5d0f !important */
html[data-theme="dark"] body.wux-checkout .edd_checkout_cart_item_title [style*="9a7b1f"], html[data-theme="dark"] body.wux-checkout .wia-co-author { color: var(--t-gold) !important; }
/* EDD cart table (checkout-ui + admin-polish) */
html[data-theme="dark"] body.wux-checkout #edd_checkout_cart { background: var(--t-card) !important; border-color: var(--t-line) !important; color: var(--t-soft) !important; }
html[data-theme="dark"] body.wux-checkout #edd_checkout_cart th, html[data-theme="dark"] body.wux-checkout #edd_checkout_cart tfoot td,
html[data-theme="dark"] body.wux-checkout #edd_checkout_cart .edd_cart_header_row th { background: var(--t-sunk) !important; color: var(--t-soft) !important; border-color: var(--t-line) !important; }
html[data-theme="dark"] body.wux-checkout #edd_checkout_cart td { background: var(--t-card) !important; border-color: var(--t-line) !important; color: var(--t-soft) !important; }
html[data-theme="dark"] body.wux-checkout .edd_cart_item_image img { border-color: var(--t-line) !important; box-shadow: 0 2px 12px rgba(0, 0, 0, .5) !important; }
html[data-theme="dark"] body.wux-checkout .edd_checkout_cart_item_title, html[data-theme="dark"] body.wux-checkout .edd-cart-item-title,
html[data-theme="dark"] body.wux-checkout .edd-cart-meta, html[data-theme="dark"] body.wux-checkout label, html[data-theme="dark"] body.wux-checkout legend,
html[data-theme="dark"] body.wux-checkout #edd_purchase_form_wrap h3 { color: var(--t-text) !important; }
html[data-theme="dark"] body.wux-checkout .edd_cart_item_price, html[data-theme="dark"] body.wux-checkout .edd-cart-item-price,
html[data-theme="dark"] body.wux-checkout .edd_cart_total, html[data-theme="dark"] body.wux-checkout .edd_cart_total .edd_cart_amount,
html[data-theme="dark"] body.wux-checkout .edd_price { color: var(--t-amber) !important; }
html[data-theme="dark"] body.wux-checkout .edd_cart_remove_item_btn, html[data-theme="dark"] body.wux-checkout .edd-remove-from-cart { color: #f87171 !important; }
/* EDD purchase form + payment mode */
html[data-theme="dark"] body.wux-checkout #edd_purchase_form_wrap, html[data-theme="dark"] body.wux-checkout #edd_payment_mode_select,
html[data-theme="dark"] body.wux-checkout .wp-block-edd-checkout #edd_purchase_form .edd-blocks-form { background: var(--t-card) !important; border-color: var(--t-line) !important; color: var(--t-soft) !important; }
html[data-theme="dark"] body.wux-checkout #edd_checkout_form_wrap, html[data-theme="dark"] body.wux-checkout #edd_purchase_form,
html[data-theme="dark"] body.wux-checkout .edd-description, html[data-theme="dark"] body.wux-checkout #edd_checkout_form_wrap .edd-description,
html[data-theme="dark"] body.wux-checkout #edd-payment-mode-wrap, html[data-theme="dark"] body.wux-checkout #edd_cc_fields,
html[data-theme="dark"] body.wux-checkout .edd-gateway-option, html[data-theme="dark"] body.wux-checkout .edd-required-fields-notice { color: var(--t-soft) !important; }
html[data-theme="dark"] body.wux-checkout input[type=text], html[data-theme="dark"] body.wux-checkout input[type=email], html[data-theme="dark"] body.wux-checkout input[type=tel],
html[data-theme="dark"] body.wux-checkout input[type=password], html[data-theme="dark"] body.wux-checkout select, html[data-theme="dark"] body.wux-checkout textarea,
html[data-theme="dark"] body.wux-checkout #edd_cc_fields input, html[data-theme="dark"] body.wux-checkout #edd_cc_fields select,
html[data-theme="dark"] body.wux-checkout #edd_purchase_form_wrap input[type=text], html[data-theme="dark"] body.wux-checkout #edd_purchase_form_wrap input[type=email],
html[data-theme="dark"] body.wux-checkout #edd_purchase_form_wrap select { background: var(--t-sunk) !important; color: var(--t-text) !important; border-color: var(--t-input) !important; }
html[data-theme="dark"] body.wux-checkout #edd_purchase_form_wrap input:focus { border-color: var(--t-link) !important; box-shadow: 0 0 0 2px rgba(140, 192, 234, .3) !important; }
html[data-theme="dark"] body.wux-checkout #edd_checkout_form_wrap fieldset, html[data-theme="dark"] body.wux-checkout #edd_checkout_form_wrap #edd-discount-code-wrap,
html[data-theme="dark"] body.wux-checkout #edd_checkout_form_wrap #edd_final_total_wrap { border-color: var(--t-line); }
html[data-theme="dark"] body.wux-checkout #edd_checkout_form_wrap #edd-login-account-wrap, html[data-theme="dark"] body.wux-checkout #edd_checkout_form_wrap #edd-new-account-wrap { background: var(--t-sunk); color: var(--t-soft); }
html[data-theme="dark"] body.wux-checkout #edd_payment_mode_select label, html[data-theme="dark"] body.wux-checkout .edd-gateway-option label,
html[data-theme="dark"] body.wux-checkout .wp-block-edd-checkout #edd-payment-mode-wrap label.edd-gateway-option { background: var(--t-sunk) !important; color: var(--t-text) !important; border-color: var(--t-input) !important; }
html[data-theme="dark"] body.wux-checkout .edd-gateway-option input:checked + label,
html[data-theme="dark"] body.wux-checkout .wp-block-edd-checkout #edd-payment-mode-wrap label.edd-gateway-option.edd-gateway-option-selected { background: var(--t-amber-tint) !important; border-color: var(--t-amber) !important; color: var(--t-text) !important; }
/* pay button: amber gradient kept, label dark (admin-polish's white label is 3.3:1 on #c47d3a) */
html[data-theme="dark"] body.wux-checkout .edd-submit, html[data-theme="dark"] body.wux-checkout #edd-purchase-button,
html[data-theme="dark"] body.wux-checkout #edd_purchase_submit #edd-purchase-button, html[data-theme="dark"] body.wux-checkout #edd_purchase_submit .edd-submit { background: linear-gradient(135deg, #e0954a, #c47d3a) !important; color: #1c1a18 !important; box-shadow: 0 4px 20px rgba(0, 0, 0, .45) !important; }
html[data-theme="dark"] body.wux-checkout .edd-button-secondary, html[data-theme="dark"] body.wux-checkout .edd-submit.button.gray, html[data-theme="dark"] body.wux-checkout .edd-submit.button.white { background: var(--t-raised) !important; border-color: var(--t-input) !important; color: var(--t-text) !important; }
html[data-theme="dark"] body.wux-checkout .edd-required-indicator, html[data-theme="dark"] body.wux-checkout span.edd-required-indicator { color: #f87171 !important; }
html[data-theme="dark"] body.wux-checkout .edd-empty-cart { color: var(--t-soft) !important; }
/* EDD alerts / messages */
html[data-theme="dark"] .edd_errors:not(.edd-alert), html[data-theme="dark"] .edd-alert-warn { background: #2a2416; border-color: #8a6a1a; color: #fbbf24; }
html[data-theme="dark"] .edd_success:not(.edd-alert), html[data-theme="dark"] .edd-alert-success, html[data-theme="dark"] .edd-cart-added-alert { background: #16261d; border-color: #2f7a5a; color: #86efac; box-shadow: none; }
html[data-theme="dark"] .edd-alert-error { background: #2d1a1a; border-color: #7a3b3b; color: #fca5a5; }
html[data-theme="dark"] .edd-alert-info, html[data-theme="dark"] .edd-login-link { background: #1a2430; border-color: #2d4a63; color: var(--t-link); }
html[data-theme="dark"] .edd_added_to_cart_alert { background: #1a2430; border-color: #3b8ed0; color: var(--t-text); }
html[data-theme="dark"] .edd-cart-meta.edd_subtotal, html[data-theme="dark"] .edd-cart-meta.edd_total, html[data-theme="dark"] #edd_user_history th { background-color: var(--t-sunk); }
/* receipt block + legacy receipt table */
html[data-theme="dark"] .edd-blocks-receipt__items, html[data-theme="dark"] .edd-blocks-receipt__totals, html[data-theme="dark"] .edd-blocks-form { border-color: var(--t-line); }
html[data-theme="dark"] body.edd_receipt_page { background-color: var(--t-page); color: var(--t-text); }
html[data-theme="dark"] body.edd_receipt_page table, html[data-theme="dark"] body.edd_receipt_page td, html[data-theme="dark"] body.edd_receipt_page th { border-color: var(--t-line); }

/* ===== 10. about /about/ (page 389960 — body is i18n JSON rendered with inline styles; only colours that fall under 4.5:1 are remapped) ===== */
html[data-theme="dark"] body.page-id-389960 .entry-content > div[style*="linear-gradient(180deg,#fffaf5"] { background: var(--t-page) !important; color: var(--t-text) !important; }
html[data-theme="dark"] body.page-id-389960 [style*="background:linear-gradient(135deg,#ffffff,#fdf6ec)"] { background: var(--t-card) !important; border-color: var(--t-amber-line) !important; }
html[data-theme="dark"] body.page-id-389960 h2[style*="border-left:4px solid #ffd700"] { border-left-color: var(--t-gold) !important; }
/* share chips on About keep their white 44×44 squares (coloured brand glyphs sit on them) */

/* ===== 11. blog post (GenerateBlocks per-post CSS: header hero, prev/next, 화제작 sidebar) ===== */
html[data-theme="dark"] .gb-container-3c9826f4 { background-color: rgba(28, 26, 24, .9); }   /* white 90 % box over the hero photo */
html[data-theme="dark"] h1.gb-headline-eaaa5bad { color: var(--t-text); }                      /* was #343a40 */
html[data-theme="dark"] .gb-container-18430adf, html[data-theme="dark"] .gb-container-ce9878f4,
html[data-theme="dark"] h2.gb-headline-2acc62a4, html[data-theme="dark"] h2.gb-headline-9d97a37f { background-color: var(--t-card); }
html[data-theme="dark"] a.gb-button-a3aaad4c, html[data-theme="dark"] a.gb-button-139d60e4 { border-color: var(--t-card); }
html[data-theme="dark"] body.single-post .gb-container-525acc2f h4.gb-headline a, html[data-theme="dark"] .gb-container-525acc2f .gb-headline-text { color: var(--t-text); }
/* GP comments / post navigation follow the flipped --contrast/--base tokens */

/* ===== 12. footer (visual.css .wux-ft — already dark #1f2933; deepen so it separates from the dark page) ===== */
html[data-theme="dark"] .wux-ft { background: #0e0d0c; border-top: 1px solid var(--t-line); }
html[data-theme="dark"] .wux-ft-bottom, html[data-theme="dark"] .wux-ft-col { border-color: #2a2724; }
html[data-theme="dark"] .wux-ft-social a { border-color: #4a463f; }
/* .wux-ft-logo img keeps its white chip (dark wordmark inside the webp) — no filter */

/* ===== 13. generic inline-colour remaps (style="color:#…" written by templates / i18n JSON / plugins) =====
   Scoped to the content roots so header/footer markup is never touched. Each original value is ≤ 4.5:1 on the dark card. */
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#2b2622"],
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color: #2b2622"] { color: var(--t-text) !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#3a322b"],
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#4a4038"] { color: var(--t-soft) !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#5a4f44"],
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#6b5d4f"],
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#6b7280"],
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#64748b"] { color: var(--t-muted) !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#a8621f"],
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#b56a23"],
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#c47d3a"] { color: var(--t-amber) !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#9a7b1f"],
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#6b5410"] { color: var(--t-gold) !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#0e7c6b"] { color: var(--t-teal) !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#0e8aa0"] { color: #5ccde0 !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#7d3c98"] { color: var(--t-purple) !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#7a4a1e"] { color: #e0a86a !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#9d174d"] { color: #f472b6 !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#047857"] { color: #34d399 !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#4338ca"],
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#6366f1"] { color: #a5b4fc !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#92400e"] { color: #fbbf24 !important; }
html[data-theme="dark"] :is(.entry-content, .wux-dt, .wux-store, .wux-my) [style*="color:#c0571a"] { color: #f0894a !important; }
/* cream gradient boxes that carry the above text (book "reader compat" is handled in §7; About + any template reuse) */
html[data-theme="dark"] .entry-content [style*="background:linear-gradient(135deg,#fdf6ec,#f8ead9)"] { background: var(--t-raised) !important; }
html[data-theme="dark"] .entry-content [style*="border:1px solid #ece3d6"] { border-color: var(--t-line) !important; }
/* visual.css recolours one dark neon card on About to a white card — on dark it goes back to a card */
html[data-theme="dark"] .entry-content [style*="linear-gradient(135deg,rgba(26,31,58,0.9)"] { background: var(--t-card) !important; border-color: var(--t-line) !important; color: var(--t-soft) !important; }

/* ===== 14. language modal (/components/language-modal/language-modal.js, shared family component) =====
   It injects its own white card (.wia-nav-modal-content) with a purple header; left as designed (B/C bundles did the same).
   Its overlay #wiaNavLangModal is already rgba(0,0,0,.95) — softened a little so the dark page shows through. */
html[data-theme="dark"] #wiaNavLangModal { background: rgba(0, 0, 0, .8); }
