/* Vocabound v0.0221 shared theme layer */
:root{
  color-scheme: light;
}
html[data-theme="dark"]{
  color-scheme: dark;
  --bg:#171a18;
  --paper:#202522;
  --ink:#f1f5f1;
  --muted:#a8b2aa;
  --line:#39423b;
  --accent:#59b64d;
  --soft:#263b2a;
  --success:#58b86d;
  --successSoft:#203b29;
  --danger:#e06e6e;
  --dangerSoft:#402526;
  --gold:#d7b84f;
  --goldSoft:#3b351e;
  --orange:#e3a654;
  --orangeSoft:#422f1d;
  --yellow:#5a5124;
  --ok:#63c77a;
  --shadow:0 16px 48px rgba(0,0,0,.42);
}
html[data-theme="dark"],html[data-theme="dark"] body{background:#171a18!important;color:var(--ink)!important}
html[data-theme="dark"] header{background:rgba(23,26,24,.96)!important;border-color:var(--line)!important}
html[data-theme="dark"] .toolbar{background:rgba(23,26,24,.96)!important;border-color:var(--line)!important}
html[data-theme="dark"] .card,
html[data-theme="dark"] .item-card,
html[data-theme="dark"] .hubcard,
html[data-theme="dark"] .reader,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .sheet,
html[data-theme="dark"] .word-popup,
html[data-theme="dark"] .exam-start,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .exam-side,
html[data-theme="dark"] .exam-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .empty{background:var(--paper)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] .btn,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .pill,
html[data-theme="dark"] .freq-pill,
html[data-theme="dark"] .highlight-btn{background:#252b27!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] .btn.primary,
html[data-theme="dark"] .chip.active{background:var(--accent)!important;color:#0d160f!important;border-color:var(--accent)!important}
html[data-theme="dark"] .btn.danger{background:#352123!important;color:#ffb9b9!important;border-color:#70474b!important}
html[data-theme="dark"] input[type=text],
html[data-theme="dark"] input[type=password],
html[data-theme="dark"] input[type=search],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{background:#171b18!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#7f8a82!important}
html[data-theme="dark"] .status,
html[data-theme="dark"] .fact,
html[data-theme="dark"] .result-stat,
html[data-theme="dark"] .qnav,
html[data-theme="dark"] .option,
html[data-theme="dark"] .transcript-box,
html[data-theme="dark"] .feedback.revealed,
html[data-theme="dark"] .preview{background:#1b201d!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] .option:hover{background:#243128!important;border-color:#506055!important}
html[data-theme="dark"] .option-letter,
html[data-theme="dark"] .letter{background:#313832!important;color:#eaf0eb!important}
html[data-theme="dark"] .option.correct,
html[data-theme="dark"] .feedback.correct{background:var(--successSoft)!important;color:#c9f1d3!important;border-color:#467653!important}
html[data-theme="dark"] .option.wrong,
html[data-theme="dark"] .feedback.wrong{background:var(--dangerSoft)!important;color:#ffc4c4!important;border-color:#734548!important}
html[data-theme="dark"] .source-note{background:#332d20!important;color:#dfc98d!important;border-color:#5e5134!important}
html[data-theme="dark"] .badge.warn{background:#3d3022!important;color:#e4b97e!important}
html[data-theme="dark"] .badge.freq5{background:var(--goldSoft)!important;color:#ecd673!important}
html[data-theme="dark"] .badge.freq6{background:var(--orangeSoft)!important;color:#efb96f!important}
html[data-theme="dark"] .progress-track,
html[data-theme="dark"] .progress{background:#313832!important}
html[data-theme="dark"] .word.active{background:#31553a!important}
html[data-theme="dark"] .word.saved{background:#5b5125!important;color:#fff4b4!important}
html[data-theme="dark"] .speak-btn{background:var(--soft)!important;color:#8fe381!important;border-color:#3f6045!important}
html[data-theme="dark"] .highlight-btn.saved{background:#5a5124!important;color:#fff2a7!important;border-color:#867a39!important}
html[data-theme="dark"] .auth-gate{background:rgba(15,18,16,.985)!important}
html[data-theme="dark"] .qimage,
html[data-theme="dark"] img.image{background:#ecefe9!important;border-color:var(--line)!important}
html[data-theme="dark"] .level{background:var(--soft)!important;border-color:#47634d!important}
html[data-theme="dark"] .level strong,
html[data-theme="dark"] .en,
html[data-theme="dark"] .popup-en,
html[data-theme="dark"] .arrow,
html[data-theme="dark"] .exam-timer{color:#72cf65!important}
html[data-theme="dark"] .site-footer strong,
html[data-theme="dark"] .footer strong{color:var(--ink)!important}
html[data-theme="dark"] .mark{background:var(--accent)!important;color:#102113!important}

.vocabound-theme-toggle{
  position:fixed;right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));z-index:9998;
  border:1px solid var(--line,#dcd7cb);background:var(--paper,#fffdf8);color:var(--ink,#20231f);
  border-radius:999px;padding:9px 13px;font:750 12px/1 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  box-shadow:0 8px 26px rgba(0,0,0,.16);cursor:pointer;transition:transform .12s,background .15s,color .15s,border-color .15s;
}
.vocabound-theme-toggle:hover{transform:translateY(-1px)}
.vocabound-theme-toggle:focus-visible{outline:3px solid color-mix(in srgb,var(--accent,#59b64d) 45%,transparent);outline-offset:2px}

.vocabound-splash{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;background:#fff;opacity:1;transition:opacity .45s ease;overflow:hidden}
.vocabound-splash img{display:block;width:min(92vw,1320px);height:auto;max-height:88vh;object-fit:contain}
.vocabound-splash.is-hidden{opacity:0;pointer-events:none}
@media(prefers-reduced-motion:reduce){.vocabound-splash{transition:none}.vocabound-theme-toggle{transition:none}}
@media(max-width:620px){.vocabound-theme-toggle{padding:8px 11px;font-size:11px}}
