/* Actual discovery lessons and quizzes. Keep values, feedback and visibility in JS. */
.free-home-modern :is(#flashcards,#quiz){
  --practice-paper:#fffdf8;
  --practice-sage:#edf2e9;
  --practice-line:#dce3d7;
  --practice-ink:#193f36;
  --practice-muted:#5c7062;
  --practice-accent:#71917a;
  --practice-focus:#967738;
  --practice-success:#e7efe2;
  --practice-success-line:#799a75;
  --practice-error:#f6eee5;
  --practice-error-line:#ae8b6d;
  --practice-error-ink:#75513d;
  color:var(--practice-ink);
  overflow-wrap:anywhere;
}
.free-home-modern :is(#flashcards,#quiz) :is(button,progress){box-sizing:border-box;max-width:100%}
.free-home-modern :is(#flashcards,#quiz) button{white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}
.free-home-modern :is(#flashcards,#quiz) button:focus-visible{outline:2px solid var(--practice-focus);outline-offset:4px}

/* The existing lesson title and actual word/question meter frame one task at a time. */
.free-home-modern #flashcards #freeActiveLesson{
  padding:3px 1px 12px;
  margin:0;
  background:transparent;
  border:0;
  box-shadow:none;
}
.free-home-modern #flashcards #freeActiveLesson h2{font:600 1.7rem/1.2 Georgia,serif;letter-spacing:-.025em;margin:5px 0 8px;color:var(--practice-ink)}
.free-home-modern #flashcards #freeActiveLesson p{font:400 .9rem/1.5 system-ui,sans-serif;margin:0 0 7px;color:var(--practice-muted)}
.free-home-modern #flashcards #freeActiveLesson small{font:.75rem/1.5 system-ui,sans-serif;color:var(--practice-muted)}
.free-home-modern :is(#flashcards,#quiz) .discovery-lesson-meter{gap:8px;margin:14px 0 12px;font:600 .75rem/1.4 system-ui,sans-serif;color:var(--practice-muted)}
.free-home-modern :is(#flashcards,#quiz) .discovery-lesson-meter>progress{height:5px;background:var(--practice-line);accent-color:var(--practice-accent);overflow:hidden}
.free-home-modern :is(#flashcards,#quiz) .discovery-lesson-meter>progress::-webkit-progress-bar{background:var(--practice-line)}
.free-home-modern :is(#flashcards,#quiz) .discovery-lesson-meter>progress::-webkit-progress-value{background:var(--practice-accent);border-radius:5px}
.free-home-modern :is(#flashcards,#quiz) .discovery-lesson-meter>progress::-moz-progress-bar{background:var(--practice-accent);border-radius:5px}

/* Compact learning card: a quiet island label, the word, then its meaning. */
.free-home-modern #flashcards #mainCard{
  min-height:224px!important;
  height:auto;
  padding:23px 19px!important;
  margin:0;
  gap:8px;
  border:1px solid var(--practice-line)!important;
  border-top:3px solid #b7cbb2!important;
  border-radius:20px!important;
  background:var(--practice-paper)!important;
  background-image:none!important;
  box-shadow:0 2px 9px #193f3603!important;
}
.free-home-modern #flashcards #mainCard>div{max-width:100%;min-width:0}
.free-home-modern #flashcards #mainCard #fcIsle{font:600 .7rem/1.5 system-ui,sans-serif!important;letter-spacing:.08em!important;color:var(--practice-muted)!important;margin:0 0 9px!important;text-align:center}
.free-home-modern #flashcards #mainCard #fcCr{font:600 clamp(2rem,7.5vw,2.65rem)/1.2 Georgia,serif!important;letter-spacing:-.025em;color:var(--practice-ink)!important;margin:0!important;overflow-wrap:anywhere}
.free-home-modern #flashcards #mainCard #fcPh{font:italic .85rem/1.5 system-ui,sans-serif!important;color:var(--practice-muted)!important;margin:0 0 5px!important;text-align:center}
.free-home-modern #flashcards #mainCard #fcFr{font:400 1.05rem/1.45 system-ui,sans-serif!important;color:var(--practice-ink)!important;background:var(--practice-sage)!important;border:1px solid var(--practice-line);border-radius:12px;padding:8px 14px!important;margin:0!important}
.free-home-modern #flashcards #mainCard #fcNote{font:.8rem/1.5 system-ui,sans-serif!important;color:var(--practice-muted)!important;background:transparent!important;margin:5px 0 0!important;padding:0!important;text-align:center}
.free-home-modern #flashcards #freeAudio{margin:9px 0 0}
.free-home-modern #flashcards #freeAudio .fc-btn{min-height:44px!important;padding:10px 18px!important;border:1px solid var(--practice-line)!important;border-radius:999px!important;background:var(--practice-sage)!important;color:var(--practice-ink)!important;font:600 .8rem/1.4 system-ui,sans-serif!important}
.free-home-modern #flashcards .fc-ctrl{grid-template-columns:48px minmax(0,1fr);gap:9px;margin:12px 0 0}
.free-home-modern #flashcards .fc-ctrl .prev{width:48px;min-height:48px;background:var(--practice-paper);border-color:var(--practice-line);color:var(--practice-ink);font-size:1.1rem;border-radius:13px}
.free-home-modern #flashcards .fc-ctrl .next{min-height:48px;padding:12px 15px;font:600 .95rem/1.4 system-ui,sans-serif;border:1px solid #193f36;background:#193f36;color:#fffdf8;border-radius:13px}
.free-home-modern #flashcards .free-lesson-end{margin:0!important;padding:12px 1px 4px}
.free-home-modern #flashcards .free-lesson-end p{font:.8rem/1.55 system-ui,sans-serif;color:var(--practice-muted);margin:0 0 9px}
.free-home-modern #flashcards .free-lesson-end button{min-height:48px;padding:12px 15px;font:600 .9rem/1.4 system-ui,sans-serif;background:var(--practice-sage);border-color:var(--practice-line);color:var(--practice-ink);border-radius:13px}

/* Quiz feedback keeps the existing correct/wrong and show classes authoritative. */
.free-home-modern #quiz #quizBox{
  min-height:0!important;
  padding:21px 19px 19px;
  border:1px solid var(--practice-line)!important;
  border-top:3px solid #b7cbb2!important;
  border-radius:20px!important;
  background:var(--practice-paper)!important;
  background-image:none!important;
  box-shadow:none;
  text-align:left;
}
.free-home-modern #quiz #quizBox .ql{font:600 .75rem/1.5 system-ui,sans-serif!important;letter-spacing:.04em;color:var(--practice-muted)!important;margin:0;text-transform:none}
.free-home-modern #quiz #quizBox #qw{font:600 clamp(1.8rem,6vw,2.3rem)/1.25 Georgia,serif!important;letter-spacing:-.025em;color:var(--practice-ink)!important;margin:13px 0 10px;overflow-wrap:anywhere}
.free-home-modern #quiz #quizBox #qt{font:.75rem/1.5 system-ui,sans-serif!important;color:var(--practice-muted)!important;background:transparent;padding:0;margin:0;border-radius:0}
.free-home-modern #quiz #qoGrid:has(>.qo){display:grid;grid-template-columns:minmax(0,1fr);gap:9px;margin:14px 0}
.free-home-modern #quiz #qoGrid>.qo{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  min-height:56px;
  padding:13px 15px;
  border:1px solid var(--practice-line);
  border-radius:14px;
  background:var(--practice-paper);
  color:var(--practice-ink);
  box-shadow:none;
  text-align:left;
  font:500 .95rem/1.45 system-ui,sans-serif;
}
.free-home-modern #quiz #qoGrid>.qo::before{content:'';box-sizing:border-box;flex:0 0 18px;width:18px;height:18px;margin:0;border:1px solid #a7b8a5;border-radius:50%;background:transparent}
.free-home-modern #quiz #qoGrid>.qo.correct{background:var(--practice-success)!important;border-color:var(--practice-success-line)!important;color:var(--practice-ink)!important}
.free-home-modern #quiz #qoGrid>.qo.correct::before{border:5px solid var(--practice-success-line);background:var(--practice-paper)}
.free-home-modern #quiz #qoGrid>.qo.wrong{background:var(--practice-error)!important;border-color:var(--practice-error-line)!important;color:var(--practice-error-ink)!important}
.free-home-modern #quiz #qoGrid>.qo.wrong::before{border:5px solid var(--practice-error-line);background:var(--practice-paper)}
.free-home-modern #quiz #qfb{font:500 .875rem/1.6 system-ui,sans-serif;text-align:left;margin:0 0 12px;padding:13px 15px;border:1px solid transparent;border-radius:14px;overflow-wrap:anywhere}
.free-home-modern #quiz #qfb.correct{background:var(--practice-success);border-color:var(--practice-line);color:var(--practice-ink)}
.free-home-modern #quiz #qfb.wrong{background:var(--practice-error);border-color:var(--practice-error-line);color:var(--practice-error-ink)}
.free-home-modern #quiz #qnb{min-height:50px;padding:13px 16px;margin:0;border:1px solid #193f36;border-radius:14px;background:#193f36;color:#fffdf8;font:600 .95rem/1.4 system-ui,sans-serif}
.free-home-modern :is(#flashcards,#quiz) :is(.fc-ctrl,#qnb,.free-lesson-end){scroll-margin-bottom:calc(105px + env(safe-area-inset-bottom,0px))}

@media(hover:hover){
  .free-home-modern #quiz #qoGrid>.qo:not(.correct):not(.wrong):hover{background:var(--practice-sage);border-color:#a3b89f}
  .free-home-modern #flashcards :is(.prev,#freeAudio .fc-btn):not(:disabled):hover{background:var(--practice-sage)}
}
@media(prefers-reduced-motion:no-preference){
  .free-home-modern #quiz #qoGrid>.qo{transition:background-color .15s,border-color .15s}
  .free-home-modern :is(#flashcards .fc-ctrl button,#quiz #qnb):not(:disabled):active{transform:translateY(1px)}
}
@media(prefers-reduced-motion:reduce){
  .free-home-modern :is(#flashcards,#quiz) :is(button,progress,#mainCard,.fc-prog-fill){animation:none!important;transition:none!important;transform:none!important}
}
@media(max-width:350px){
  .free-home-modern #flashcards #mainCard{min-height:205px!important;padding:20px 15px!important}
  .free-home-modern #quiz #quizBox{padding:18px 15px}
  .free-home-modern #quiz #qoGrid>.qo{gap:10px;padding:12px;min-height:54px}
}
:root[data-theme=dark] .free-home-modern :is(#flashcards,#quiz){
  --practice-paper:#243b30;
  --practice-sage:#30493a;
  --practice-line:#496052;
  --practice-ink:#edf3e9;
  --practice-muted:#becfbe;
  --practice-accent:#98b491;
  --practice-focus:#d6bd83;
  --practice-success:#2f4935;
  --practice-success-line:#9bb891;
  --practice-error:#45392e;
  --practice-error-line:#bb9a79;
  --practice-error-ink:#f0d6bd;
}
:root[data-theme=dark] .free-home-modern #quiz #qoGrid>.qo:not(.correct):not(.wrong){background:var(--practice-paper)!important;border-color:var(--practice-line)!important;color:var(--practice-ink)!important}
:root[data-theme=dark] .free-home-modern :is(#flashcards #mainCard,#quiz #quizBox){border-top-color:#789172!important}
:root[data-theme=dark] .free-home-modern #flashcards .fc-ctrl .prev{background:var(--practice-paper)!important;color:var(--practice-ink)!important;border-color:var(--practice-line)!important}
:root[data-theme=dark] .free-home-modern :is(#flashcards .fc-ctrl .next,#quiz #qnb){background:#dbe8d3;color:#193f36;border-color:#dbe8d3}
.free-home-modern #quiz #qoGrid>.free-finish-quiet{background:transparent!important;border:0!important;color:var(--practice-muted)!important;box-shadow:none!important;font:500 .8rem/1.4 system-ui,sans-serif;padding:8px 12px;min-height:44px;margin-top:2px}
.free-home-modern #quiz .free-save-warning{padding:13px 15px;border:1px solid var(--practice-error-line);border-radius:14px;background:var(--practice-error);color:var(--practice-error-ink);font:500 .875rem/1.6 system-ui,sans-serif}
