/* ws-site-kit — LIGHT overlay for the shared shell (2026-10-29, family56 bundle D).
   Serves wiastandards.com · wihp.wiastandards.com · wihp-ai.wiastandards.com (and any other page that loads
   /assets/site-kit/ws-site-kit.js — ~880 sub-standard pages, riemann). ORIGINAL = the kit's own look: rainbow
   header/footer with WHITE text, dark mobile drawer rgba(15,23,42,.97), dark family modal rgba(45,35,80,.85),
   dark breadcrumb bar; language modal already white; AI assistant modal (/ai-assistant/wia-ai-modal.css) dark #1a1a2e.
   The kit injects its rules at runtime as <style id="ws-site-kit-styles"> appended to <head> (ws-site-kit.js:163-333,
   init() 442) — i.e. AFTER this file — so every selector here carries the extra html[data-theme="light"] (0,1,1+)
   to beat the kit's (0,1,0). The kit uses !important only on .ws-header{padding;margin;height;box-shadow;border},
   .ws-nav-login{background;border;color;padding} and body{padding-top} → only .ws-nav-login needs !important here.
   KIT FILE IS NOT TOUCHED. Nothing here applies unless <html data-theme="light"> (engine sets it before first paint).
   `color-scheme` is set by the engine, not here.

   Light palette:  page #f7f8fb · card #fff · card-2 #f1f5f9 · text #0f172a (16:1) · text-2 #334155 (10:1)
     muted #475569 (7.5:1) · faint #64748b (4.7:1) · line #e2e8f0 (decorative) · line-strong #7b879c (3.6:1, inputs/chips)
     blue #005a9e (6.9:1) · indigo #4338ca (7.4:1) · gold #854d0e (7.5:1) · magenta #a21caf (6.1:1)
   Rainbow stays a rainbow — pastel stops with dark text (lowest-luminance stop #d6e4ff ≈ L 0.78 → #0f172a ≥ 13:1):
     270deg: #ffd9d9 #fff0bf #d2f0fb #ffdcf7 #d6e4ff #e4dcff #cdefef #ffd9d9   (same order as the kit's 8 stops)
   Not themed (not kit CSS): wiabook promo-banner loader output, wia-a11y-toolkit panel, wia-scan-button (shadow DOM —
   it picks its own tone from the ancestor background colour, so it turns light with the header automatically). */

/* ===================================================================
   HEADER  (.ws-header > .ws-header-content, fixed 64px, generateHeader() ws-site-kit.js:343)
   =================================================================== */
html[data-theme="light"] .ws-header {
    background-image: linear-gradient(270deg, #ffd9d9, #fff0bf, #d2f0fb, #ffdcf7, #d6e4ff, #e4dcff, #cdefef, #ffd9d9);
    /* background-size / animation wsRainbow 15s stay as the kit set them */
    border-bottom-color: rgba(15, 23, 42, 0.12);
}
html[data-theme="light"] .ws-logo { color: #0f172a; }
html[data-theme="light"] .ws-logo-text { color: #0f172a; }
html[data-theme="light"] .ws-logo-text span { color: #334155; }
html[data-theme="light"] .ws-logo-badge { background: rgba(15, 23, 42, 0.08); color: #0f172a; }

html[data-theme="light"] .ws-nav-link { color: #1e293b; }
html[data-theme="light"] .ws-nav-link:hover { color: #0f172a; background: rgba(15, 23, 42, 0.08); }

/* language pill (desktop .ws-desktop-nav .ws-nav-lang and phone .ws-mobile-header-lang.ws-nav-lang share the class) */
html[data-theme="light"] .ws-nav-lang {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(15, 23, 42, 0.45);   /* ≈ #7b879c on the pastel stops → 3:1 */
    color: #0f172a;
}
html[data-theme="light"] .ws-nav-lang:hover { background: rgba(255, 255, 255, 0.85); }

/* the 1px separator is an inline style= div (generateHeader(): width:1px;height:22px;background:rgba(255,255,255,.15)) → !important */
html[data-theme="light"] .ws-desktop-nav > div[style] { background: rgba(15, 23, 42, 0.2) !important; }

/* kit declares background/border/color with !important (ws-site-kit.js:197) → !important here too; (0,1,1) beats its (0,1,0) */
html[data-theme="light"] .ws-nav-login {
    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid rgba(15, 23, 42, 0.45) !important;
    color: #0f172a !important;
}
html[data-theme="light"] .ws-nav-login:hover { background: rgba(255, 255, 255, 0.85) !important; }

html[data-theme="light"] .ws-hamburger-line { background: #0f172a; }

/* mobile drawer (≤1023px) */
html[data-theme="light"] .ws-mobile-nav {
    background: rgba(255, 255, 255, 0.97);
    border-bottom-color: #e2e8f0;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}
html[data-theme="light"] .ws-mobile-nav a { color: #1e293b; }
html[data-theme="light"] .ws-mobile-nav a:hover { background: rgba(67, 56, 202, 0.1); color: #0f172a; }

/* breadcrumb bar (only some sub pages render it) */
html[data-theme="light"] .ws-breadcrumb-bar { background: #f1f5f9; border-bottom-color: #e2e8f0; }
html[data-theme="light"] .ws-breadcrumb a { color: #475569; }
html[data-theme="light"] .ws-breadcrumb a:hover { color: #005a9e; }
html[data-theme="light"] .ws-bc-sep { color: #94a3b8; }
html[data-theme="light"] .ws-bc-current { color: #0f172a; }

/* ===================================================================
   FOOTER  (.ws-footer, generateFooter() ws-site-kit.js:376)
   =================================================================== */
html[data-theme="light"] .ws-footer {
    background-image: linear-gradient(90deg, #ffd9d9, #fff0bf, #d2f0fb, #ffdcf7, #d6e4ff, #e4dcff, #cdefef, #ffd9d9);
    border-top-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}
html[data-theme="light"] .ws-footer-logo-text { color: #0f172a; }
html[data-theme="light"] .ws-footer-logo-text span { color: #334155; }
html[data-theme="light"] .ws-footer-brand p { color: #334155; }
/* "Operated by SmileStory" link is inline style="color:#fff;text-decoration:underline" → !important */
html[data-theme="light"] .ws-footer-brand p a[style] { color: #0f172a !important; }
html[data-theme="light"] .ws-footer-philosophy { color: #854d0e; }
html[data-theme="light"] .ws-footer-stats { color: #0f172a; }

html[data-theme="light"] .ws-footer-section h3,
html[data-theme="light"] .ws-footer-family h3 { color: #0f172a; }
html[data-theme="light"] .ws-footer-section a { color: #334155; }
html[data-theme="light"] .ws-footer-section a:hover { color: #0f172a; text-shadow: none; text-decoration: underline; }
html[data-theme="light"] .ws-footer-family-sub,
html[data-theme="light"] .ws-footer-stats-small { color: #475569; }

html[data-theme="light"] .ws-family-btn {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(15, 23, 42, 0.45);
    color: #0f172a;
}
html[data-theme="light"] .ws-family-btn:hover { background: #fff; border-color: #0f172a; }

html[data-theme="light"] .ws-social-label { color: #a21caf; text-shadow: none; }
/* .ws-donate-btn (red gradient + white) is no longer rendered (kit comment 2026-10-21) — left alone */

html[data-theme="light"] .ws-footer-bottom { border-top-color: rgba(15, 23, 42, 0.15); }
html[data-theme="light"] .ws-footer-bottom p { color: #334155; }
html[data-theme="light"] .ws-footer-bottom a { color: #0f172a; text-decoration: underline; }
/* self-audit caption is inline style="font-size:10px;color:#94a3b8" (2.3:1 on pastel) → !important */
html[data-theme="light"] .ws-footer-bottom div[style*="color:#94a3b8"] { color: #475569 !important; }

/* ===================================================================
   FAMILY SITES MODAL  (#ws-familyModal.ws-family-modal, generateFamilyModal() ws-site-kit.js:427)
   =================================================================== */
html[data-theme="light"] .ws-family-modal-content {
    background: rgba(255, 255, 255, 0.96);
    border-color: #e2e8f0;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
}
html[data-theme="light"] .ws-family-modal-header { color: #0f172a; border-bottom-color: #e2e8f0; }
html[data-theme="light"] .ws-family-close { color: #475569; }
html[data-theme="light"] .ws-family-close:hover { color: #b91c1c; }
html[data-theme="light"] .ws-family-item { background: #f7f8fb; border-color: #e2e8f0; }
html[data-theme="light"] .ws-family-item:hover { background: #eef2ff; border-color: #4338ca; }
html[data-theme="light"] .ws-family-name { color: #0f172a; }
html[data-theme="light"] .ws-family-url { color: #475569; }

/* ===================================================================
   LANGUAGE MODAL — wiastandards/wihp-ai: #wiaNavLangModal (components/language-modal/language-modal.js:301,
   injected <style id="wia-nav-lang-modal-styles">), wihp: .slm-* (soom-language-modal.js:263, <style id="soom-lang-styles">).
   Both are already white cards; only the overlay and the low-contrast borders change.
   =================================================================== */
html[data-theme="light"] #wiaNavLangModal,
html[data-theme="light"] .slm-overlay { background: rgba(15, 23, 42, 0.55); }
html[data-theme="light"] .wia-nav-modal-content,
html[data-theme="light"] .slm-container { box-shadow: 0 24px 56px rgba(15, 23, 42, 0.25); }
/* header gradient #667eea→#764ba2 with white text: left end is 3.7:1 for 1.8rem bold — darken a step */
html[data-theme="light"] .wia-nav-modal-header,
html[data-theme="light"] .slm-header { background: linear-gradient(135deg, #4f5fd6, #5e3a8a); }
html[data-theme="light"] .wia-nav-modal-tab,
html[data-theme="light"] .slm-filter { border-color: #7b879c; color: #0f172a; }
html[data-theme="light"] .wia-nav-modal-tab.active,
html[data-theme="light"] .slm-filter.active { background: linear-gradient(135deg, #4f5fd6, #5e3a8a); border-color: #4338ca; }
/* search input: kit sets border with !important (language-modal.js) → !important here too */
html[data-theme="light"] .wia-nav-lang-search { border-color: #7b879c !important; color: #0f172a; background: #fff; }
html[data-theme="light"] .slm-search { border-color: #7b879c; color: #0f172a; }
html[data-theme="light"] .wia-nav-lang-search:focus,
html[data-theme="light"] .slm-search:focus { border-color: #4338ca !important; }
html[data-theme="light"] .wia-nav-lang-count,
html[data-theme="light"] .slm-count { color: #4338ca; }
html[data-theme="light"] .wia-nav-lang-item,
html[data-theme="light"] .slm-item { border-color: #7b879c; color: #0f172a; }
html[data-theme="light"] .wia-nav-lang-item:hover,
html[data-theme="light"] .wia-nav-lang-item.selected,
html[data-theme="light"] .slm-item:hover,
html[data-theme="light"] .slm-item.current { border-color: #4338ca; }
html[data-theme="light"] .wia-nav-modal-footer,
html[data-theme="light"] .slm-footer { color: #475569; }
html[data-theme="light"] .wia-nav-modal-footer a,
html[data-theme="light"] .slm-footer a { color: #4338ca; }
/* apology line is inline style="…color:#888" (3.5:1) → !important */
html[data-theme="light"] .slm-footer #lmApology[style] { color: #475569 !important; }
html[data-theme="light"] .slm-empty { color: #475569; }

/* ===================================================================
   AI ASSISTANT MODAL  (/ai-assistant/wia-ai-modal.css — loaded by wiastandards index.html:928; dark #1a1a2e / #16213e / #0a0a0f)
   The cyan→purple brand gradient (#00d4ff→#7b2cbf, white text; left end 1.6:1) is darkened to #0077b6→#5b21b6 (white ≥ 4.6:1).
   =================================================================== */
html[data-theme="light"] .wia-ai-fab {
    background: linear-gradient(135deg, #0077b6, #5b21b6);
    box-shadow: 0 4px 20px rgba(0, 90, 158, 0.35);
}
html[data-theme="light"] .wia-ai-overlay { background: rgba(15, 23, 42, 0.55); }
html[data-theme="light"] .wia-ai-modal {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}
html[data-theme="light"] .wia-ai-header { background: linear-gradient(135deg, #0077b6 0%, #5b21b6 100%); }
html[data-theme="light"] .wia-resize-handle:hover { background: rgba(0, 90, 158, 0.25); }
html[data-theme="light"] .wia-ai-tabs { background: #f1f5f9; border-bottom-color: #e2e8f0; }
html[data-theme="light"] .wia-ai-tab { color: #475569; }
html[data-theme="light"] .wia-ai-tab:hover { background: rgba(0, 90, 158, 0.08); color: #005a9e; }
html[data-theme="light"] .wia-ai-tab.active { background: rgba(0, 90, 158, 0.1); color: #005a9e; border-bottom-color: #005a9e; }
html[data-theme="light"] .wia-ai-tab .badge { background: #15803d; }
html[data-theme="light"] .wia-ai-api-section { background: #f1f5f9; border-bottom-color: #e2e8f0; }
html[data-theme="light"] .wia-ai-api-section input,
html[data-theme="light"] .wia-input-area input {
    background: #fff;
    border-color: #7b879c;
    color: #0f172a;
}
html[data-theme="light"] .wia-ai-api-section input:focus,
html[data-theme="light"] .wia-input-area input:focus { border-color: #005a9e; }
html[data-theme="light"] .wia-input-area input::placeholder { color: #64748b; }
html[data-theme="light"] .wia-save-btn,
html[data-theme="light"] .wia-send-btn,
html[data-theme="light"] .wia-message.user .wia-message-content { background: linear-gradient(135deg, #0077b6, #5b21b6); }
html[data-theme="light"] .wia-get-key { color: #005a9e; }
html[data-theme="light"] .wia-key-note { background: #f1f5f9; border-bottom-color: #e2e8f0; color: #475569; }
html[data-theme="light"] .wia-collapsible { border-bottom-color: #e2e8f0; }
html[data-theme="light"] .wia-section-header {
    background: linear-gradient(135deg, rgba(0, 90, 158, 0.08), rgba(91, 33, 182, 0.08));
    color: #005a9e;
}
html[data-theme="light"] .wia-section-header:hover { background: rgba(0, 90, 158, 0.12); }
html[data-theme="light"] .wia-toggle-icon { color: #64748b; }
html[data-theme="light"] .wia-section-content,
html[data-theme="light"] .wia-ai-body { background: #f7f8fb; }
html[data-theme="light"] .wia-tool-btn,
html[data-theme="light"] .wia-tools-row .wia-tool-btn {
    background: #fff;
    border-color: #7b879c;
    color: #334155;
}
html[data-theme="light"] .wia-tool-btn:hover,
html[data-theme="light"] .wia-tools-row .wia-tool-btn:hover {
    background: rgba(0, 90, 158, 0.08);
    border-color: #005a9e;
    color: #005a9e;
}
html[data-theme="light"] .wia-tools-row { border-top-color: #e2e8f0; }
html[data-theme="light"] .wia-message.assistant .wia-message-content { background: #fff; color: #0f172a; border-color: #e2e8f0; }
html[data-theme="light"] .wia-message-content a { color: #005a9e; }
html[data-theme="light"] .wia-input-area { background: #fff; border-top-color: #e2e8f0; }
html[data-theme="light"] .wia-welcome h4 { color: #005a9e; }
html[data-theme="light"] .wia-welcome p { color: #475569; }

/* wihp.wiastandards.com — site theme overlay, PAGE BODY ONLY (2026-10-30, 발음 카드 v3 이후).
   v3 페이지(~/wihp-work/src/template.html)는 색을 :root 토큰으로 두고 html[data-theme="light"] 에서 스스로 재정의한다
   (페이지 배경 그라데이션·글자·선 색). 그래서 이 덧씌움은 공용 ws-site-kit 라이트(../wskit/kit-light.css, build-engines-d.py 가
   앞에 붙임)만 있으면 되고, 본문용 규칙은 아래 두 줄만 남긴다. 옛 판(10-29, .result-box/.history-item 선택자)은
   ~/wihp-work/backup-20261030/D-wihp-site-theme.css.before. */
html[data-theme="light"] ::selection { background: rgba(13, 148, 136, 0.22); }
html[data-theme="light"] footer:not(.ws-footer) { color: #334155; opacity: 1; }
