/* relay.wiasoom.com — site theme overlay (2026-10-28, family56 bundle C).
   ORIGINAL look = DARK (index.html inline <style> 22~249행, body #0a0e1a, 한 페이지). This file is the LIGHT overlay only:
   every rule is scoped to html[data-theme="light"], so with nothing saved (data-theme="dark") the page renders exactly as
   before. Load at the END of <head> (after the inline <style>; the engine wia-site-theme.js sets <html data-theme> before
   first paint and also toggles body.light-mode = CFG.lightClass).
   The page already has an a11y-toolkit light mode (`body.light-mode …`, 164~167행·226~246행, nearly all !important).
   Those rules keep working in light and set: body #f5f5fa/#1a1a2e, header rgba(245,245,250,.95), nav links #1a1a2e,
   notice h1/p/relay-off/links, mobile nav, lang button fill — this overlay only adds what they miss (logo wordmark, ☰ bars,
   mobile-nav language <button>, focus/hover colours, footer, family modal, language modal) and corrects the few that fail
   contrast. Because theirs are !important, specificity cannot beat them: the 8 !important blocks below are exactly those
   collisions + one inline style="" button, each commented.

   Light palette                                     contrast (on page #f5f5fa / white)
   ─ page   #f5f5fa (= what body.light-mode forces; #f7f8fb would lose to its !important)   footer band #eef1f6
   ─ card   #ffffff                                  text #0f172a (16.4 / 17.9)   muted #475569 (7.0 / 7.6)   links #334155 (9.5)
   ─ line   #e2e8f0 (decorative)                     control border #7b879c (3.3 / 3.6)
   ─ indigo #818cf8·#6366f1·#a5b4fc → #4338ca (7.3 / 7.9) = logo gradient start, hover, focus ring
   ─ sky    #06b6d4 → #0e7490 (4.9 / 5.4) = logo gradient end; logo.png (transparent cyan mark) darkened by filter
   ─ gold   relay-off stays the a11y rule's #78350f on #fffbeb (9.1)
   Kept as-is on purpose: promo banner (wiabook loader, self-contained image + #1f1b24 caption), a11y FAB / ✨ AI FAB
   (purple gradient), kaitrust AI chat panel (self-contained dark card), site-kit .family-site-* modal (inert here:
   no #familySiteBtn — the page opens its own .rfamily-* modal). */

/* ===== page ===== */
html[data-theme="light"] body { background: #f5f5fa; color: #0f172a; }   /* same values as body.light-mode; also covers the case lightClass is off */
html[data-theme="light"] ::selection { background: rgba(67, 56, 202, .16); }

/* ===== header (fixed 64px, translucent) — a11y rule already sets the fill; add the line + wordmark ===== */
html[data-theme="light"] .relay-header { border-bottom-color: #e2e8f0; }
/* logo.png is a transparent PNG whose mark is cyan ≈#01bcd5 (2.2:1 on a light header) → darken to ≈#008091 (4.3:1).
   Same <img> in the footer brand. */
html[data-theme="light"] .relay-logo img,
html[data-theme="light"] .relay-footer-brand img { filter: brightness(.68) saturate(1.1); }
/* "SOOM" is gradient text (#818cf8→#06b6d4, 2.7:1 / 2.2:1 on light) → indigo→teal, both ≥4.9:1 */
html[data-theme="light"] .relay-logo-text span { background-image: linear-gradient(135deg, #4338ca, #0e7490); }
/* body.light-mode .relay-nav a:hover is #6366f1 !important = 4.1:1 on #f5f5fa → needs !important to lift to 7.3:1 */
html[data-theme="light"] .relay-nav a:hover { color: #4338ca !important; background: rgba(67, 56, 202, .08); }
html[data-theme="light"] .relay-nav a:focus-visible { outline: 2px solid #4338ca; outline-offset: 2px; }

/* language button (desktop): body.light-mode gives bg rgba(0,0,0,.06) / text #1a1a2e / border rgba(0,0,0,.12) — all !important.
   The border blends to 1.3:1 → raise to #7b879c (3.3:1); its hover fill is also blocked by that !important, so hover = border only. */
html[data-theme="light"] .relay-lang-btn { border-color: #7b879c !important; }
html[data-theme="light"] .relay-lang-btn:hover,
html[data-theme="light"] .relay-lang-btn:focus-visible { border-color: #4338ca !important; }
html[data-theme="light"] .relay-lang-btn:focus-visible { outline: 2px solid #4338ca; outline-offset: 2px; }

/* ===== mobile (≤768px): ☰ bars are #fff → invisible on light; the mobile-nav language <button> is not covered by the
   a11y rules (they only colour the <a>s) ===== */
html[data-theme="light"] .relay-mobile-btn span { background: #0f172a; }
html[data-theme="light"] .relay-mobile-btn:focus-visible { outline: 2px solid #4338ca; outline-offset: 2px; border-radius: 6px; }
html[data-theme="light"] .relay-mobile-nav button { color: #1a1a2e; }
html[data-theme="light"] .relay-mobile-nav a:focus-visible,
html[data-theme="light"] .relay-mobile-nav button:focus-visible { outline: 2px solid #4338ca; outline-offset: -2px; }

/* ===== notice (main) — h1/p/relay-off/links already set by body.light-mode (#111827 / #334155 / #78350f on #fffbeb /
   #312e81 on #eef2ff, border #6366f1). Missing: focus ring (#a5b4fc = 1.8:1) and hover feedback (its bg is !important). ===== */
html[data-theme="light"] .notice-links a:focus-visible { outline-color: #4338ca; }
html[data-theme="light"] .notice-links a:hover,
html[data-theme="light"] .notice-links a:focus-visible { background: #e0e7ff !important; border-color: #4338ca !important; }   /* collides with body.light-mode .notice-links a { background/border !important } */

/* ===== footer — body.light-mode makes it a DARK slab (#1a1a2e !important) with 50% white links. A light theme gets a light
   band instead (family pattern: assess/robot overlays). The four !important lines below exist only because of those a11y
   !important rules; delete this block to keep the dark footer (its 50% white links are 5.1:1, so it also passes). ===== */
html[data-theme="light"] .relay-footer { background: #eef1f6 !important; border-top-color: #e2e8f0; }
html[data-theme="light"] .relay-footer-links a { color: #334155 !important; }
html[data-theme="light"] .relay-footer-links a:hover,
html[data-theme="light"] .relay-footer-links a:focus-visible { color: #4338ca !important; }
html[data-theme="light"] .relay-footer-brand span { color: #475569 !important; }
html[data-theme="light"] .relay-footer-brand a { color: #1e293b; text-decoration: underline; text-underline-offset: 2px; }
html[data-theme="light"] .relay-footer-brand a:hover { color: #4338ca; }
html[data-theme="light"] .relay-footer a:focus-visible { outline: 2px solid #4338ca; outline-offset: 2px; }
/* "🌐 Family Sites (32)" button (299행) is fully inline-styled: background rgba(255,255,255,.06), border rgba(255,255,255,.12),
   color #fff → invisible on a light band. Inline style can only be beaten with !important. */
html[data-theme="light"] .relay-footer button[onclick^="openRelayFamily"] {
  background: #fff !important; border-color: #7b879c !important; color: #0f172a !important;
}
html[data-theme="light"] .relay-footer button[onclick^="openRelayFamily"]:hover,
html[data-theme="light"] .relay-footer button[onclick^="openRelayFamily"]:focus-visible { border-color: #4338ca !important; background: #eef2ff !important; }

/* ===== family sites modal (.rfamily-*, drawn by openRelayFamily(), CSS at 376~389행: #1a1d23 card, white text) ===== */
html[data-theme="light"] .rfamily-overlay { background: rgba(15, 23, 42, .55); }
html[data-theme="light"] .rfamily-box { background: #fff; box-shadow: 0 24px 60px rgba(15, 23, 42, .22); }
html[data-theme="light"] .rfamily-hdr h3 { color: #0f172a; }
html[data-theme="light"] .rfamily-close { color: #475569; }
html[data-theme="light"] .rfamily-close:hover,
html[data-theme="light"] .rfamily-close:focus-visible { color: #0f172a; }
html[data-theme="light"] .rfamily-item { background: #f8fafc; border-color: #d9e0ea; }
html[data-theme="light"] .rfamily-item:hover,
html[data-theme="light"] .rfamily-item:focus-visible { background: #fff; border-color: #4338ca; box-shadow: 0 6px 18px rgba(15, 23, 42, .10); }
html[data-theme="light"] .rfamily-item.hl { background: #f0fdf4; border-color: rgba(21, 128, 61, .45); }
html[data-theme="light"] .rfamily-item .fn { color: #0f172a; }
html[data-theme="light"] .rfamily-item .fd { color: #475569; }

/* ===== language modal (/scripts/language-modal.js injects #wia-nav-lang-modal-styles: white card, purple header) =====
   Already a light design; only the .95 black overlay is a dark-theme artefact. Tabs/items/footer untouched. */
html[data-theme="light"] #wiaNavLangModal { background: rgba(15, 23, 42, .55); }
html[data-theme="light"] .wia-nav-modal-content { box-shadow: 0 30px 60px rgba(15, 23, 42, .25); }

/* ===== promo banner region (wiabook loader → <aside class="wia-promo-banner-region">): image band + phone caption
   (#1f1b24 / white) is self-contained; only separate it from the light page with a hairline like the footer. ===== */
html[data-theme="light"] .wia-promo-banner-region { border-top: 1px solid #e2e8f0; }
