/* Quizzer's bridge to the shared EDU theme tokens. */
:root { --quizzer-danger: #fb7185; }
html[data-theme] body {
  color:var(--text)!important;
  background:var(--bg-main)!important;
}
html[data-theme] body::before { background:var(--bg-before)!important; }
html[data-theme] body::after { background:var(--bg-after)!important; }
html[data-theme] h1,
html[data-theme] h2 { color:var(--title-color); }
html[data-theme] .subtitle,
html[data-theme] .hint,
html[data-theme] label,
html[data-theme] .sub { color:var(--muted); }
html[data-theme] .sparkles span { background:var(--sparkle); box-shadow:0 0 8px var(--sparkle-glow); }
html[data-theme] .card,
html[data-theme] #authScreen,
html[data-theme] #sharedScreen,
html[data-theme] .set,
html[data-theme] .set-item,
html[data-theme] #sharePanel,
html[data-theme] #resetProgressPanel,
html[data-theme] details,
html[data-theme] .quiz {
  color:var(--text)!important;
  background:var(--panel-bg)!important;
  border:1px solid var(--line)!important;
  box-shadow:var(--shadow)!important;
}
html[data-theme] button,
html[data-theme] .tab,
html[data-theme] input,
html[data-theme] textarea,
html[data-theme] select {
  color:var(--text)!important;
  background:var(--button-bg)!important;
  border-color:var(--line-strong)!important;
  box-shadow:var(--shadow-soft)!important;
}
html[data-theme] input:not([type="checkbox"]),
html[data-theme] textarea,
html[data-theme] select { background:var(--input-bg)!important; }
html[data-theme] input:focus,
html[data-theme] textarea:focus,
html[data-theme] select:focus { background:var(--input-focus-bg)!important; outline:2px solid var(--line-strong); outline-offset:2px; }
html[data-theme] button:hover,
html[data-theme] .tab:hover { background:var(--button-hover)!important; }
html[data-theme] button.primary,
html[data-theme] .primary,
html[data-theme] .tab.active,
html[data-theme] .set.active,
html[data-theme] [data-swap-qa-button].active {
  color:var(--text)!important;
  background:var(--button-hover)!important;
  border:1px solid var(--line-strong)!important;
}
html[data-theme] #deckActionsMenu,
html[data-theme] #writeSettingsMenu,
html[data-theme] #accountDrawerContent,
html[data-theme] #teaspiltDrawerLinks,
html[data-theme] #languageDrawerContent,
html[data-theme] .deck-drawer,
html[data-theme] .edu-theme-dropdown {
  background:var(--menu-bg)!important;
  border-color:var(--line-strong)!important;
  color:var(--text)!important;
}
html[data-theme] #deckActionsMenu button,
html[data-theme] #writeSettingsMenu button,
html[data-theme] #accountDrawerContent button,
html[data-theme] #teaspiltDrawerLinks a,
html[data-theme] #languageDrawerContent button {
  background:var(--button-bg)!important;
  color:var(--text)!important;
  border-color:var(--line-strong)!important;
}
html[data-theme] .site-footer { background:var(--footer-bg)!important; border-color:var(--footer-border)!important; }
html[data-theme] .site-footer-inner { color:var(--muted)!important; }
html[data-theme] .pill,
html[data-theme] .stat,
html[data-theme] .term,
html[data-theme] .mcq button { color:var(--text); border-color:var(--line)!important; background:var(--panel-bg)!important; }
html[data-theme] .edu-theme-wrap { z-index:60000; }
html[data-theme] .edu-theme-trigger,
html[data-theme] .edu-theme-option { background:var(--button-bg)!important; color:var(--text)!important; border-color:var(--line-strong)!important; }
html[data-theme] .edu-theme-option:hover,
html[data-theme] .edu-theme-option.is-active { background:var(--button-hover)!important; }
html[data-theme="nottinghill"] button,
html[data-theme="nottinghill"] .card,
html[data-theme="nottinghill"] .quiz,
html[data-theme="nottinghill"] .term,
html[data-theme="nottinghill"] .set,
html[data-theme="nottinghill"] .tab,
html[data-theme="nottinghill"] .edu-theme-trigger,
html[data-theme="nottinghill"] .edu-theme-option,
html[data-theme="nottinghill"] .flashcard-face { border-radius:0!important; box-shadow:none!important; backdrop-filter:none!important; }
html[data-theme="nottinghill"] .card { padding:0!important; }
html[data-theme="nottinghill"] button.primary,
html[data-theme="nottinghill"] .tab.active { background:#eee!important; color:#000!important; }
html[data-theme="nottinghill"] .edu-theme-option.is-active { background:#eee!important; color:#000!important; }
html[data-theme="tilly"] button.primary,
html[data-theme="tilly"] .tab.active { background:#000!important; color:#fff!important; }
html[data-theme="tilly"] .card,
html[data-theme="tilly"] .quiz { background:#fff!important; }
html[data-theme="corporo"] button.primary,
html[data-theme="corporo"] .tab.active { background:#9683ec!important; color:#fff!important; }
html[data-theme="corporo"] .card,
html[data-theme="corporo"] .quiz { background:#93c572!important; }
html[data-theme="moonlit"] .noise,
html[data-theme="nottinghill"] .noise,
html[data-theme="tilly"] .noise,
html[data-theme="corporo"] .noise { display:none!important; }
html[data-theme="moonlit"] .sparkles,
html[data-theme="nottinghill"] .sparkles,
html[data-theme="tilly"] .sparkles,
html[data-theme="corporo"] .sparkles { display:none!important; }
html[data-theme="moonlit"] body::before { background-image:url('https://teaspilt.me/edu/assets/ncwallpaperdesktop.png')!important; background-size:cover!important; opacity:.38; }
html[data-theme="tilly"] body::before { background-image:url('https://teaspilt.me/edu/assets/tillywallpaperdesktop.png')!important; background-size:cover!important; opacity:.28; }
html[data-theme="nottinghill"] body::before,
html[data-theme="nottinghill"] body::after { display:none!important; }
body.share-view #sharedScreen { display:block!important; }
body.share-view.logged-out #authScreen { display:block!important; }
.flashcard-toolbar,
.flashcard-actions { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:10px; margin:14px 0; }
.flashcard-toolbar label { display:flex; align-items:center; gap:7px; margin:0; }
.flashcard-toolbar input { width:auto; box-shadow:none!important; }
.flashcard-face {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px;
  width:100%; min-height:280px; padding:28px;
  background:var(--panel-bg)!important; border:1px solid var(--line-strong)!important;
  border-radius:24px; color:var(--text)!important; box-shadow:var(--shadow)!important;
  text-align:center; cursor:pointer;
}
.flashcard-side { color:var(--muted); font-size:12px; letter-spacing:.14em; text-transform:uppercase; }
.flashcard-text { font-size:clamp(25px,4vw,44px); font-weight:700; line-height:1.2; overflow-wrap:anywhere; }
.flashcard-hint { color:var(--muted); font-size:13px; }
#flashcardStatus { text-align:center; min-height:20px; }
#sharedCards .term { display:grid; grid-template-columns:1fr 1fr; gap:12px; overflow-wrap:anywhere; }
@media(max-width:640px) {
  .edu-theme-wrap { top:12px; right:12px; }
  .wrap { padding-top:72px!important; }
  .flashcard-face { min-height:220px; padding:18px; }
  .flashcard-actions button { flex:1 1 40%; }
  #sharedCards .term { grid-template-columns:1fr; }
  html[data-theme="moonlit"] body::before { background-image:url('https://teaspilt.me/edu/assets/ncwallpapermobile.png')!important; }
  html[data-theme="tilly"] body::before { background-image:url('https://teaspilt.me/edu/assets/tillywallpapermobile.png')!important; }
}

body.share-view .grid { display:none!important; }
