.hw-backdrop{position:fixed;z-index:1450;inset:0;display:grid;place-items:center;padding:18px;background:rgba(25,31,48,.72);backdrop-filter:blur(8px)}
.hw-dialog{width:min(980px,100%);max-height:calc(100dvh - 36px);overflow:auto;border:1px solid rgba(103,80,164,.2);border-radius:26px;background:#fffdf9;box-shadow:0 32px 100px rgba(14,20,38,.4)}
.hw-embedded{width:100%;min-width:0;overflow:hidden;clip-path:inset(0 round 20px);border:1px solid rgba(103,80,164,.2);border-radius:20px;background:#fffdf9;box-shadow:0 16px 42px rgba(45,53,78,.12)}
.hw-embedded .hw-header{padding-top:20px;padding-bottom:16px}
.hw-embedded .hw-body{padding-top:20px}
.hw-header{position:relative;display:flex;align-items:center;padding:24px 64px 20px 28px;border-bottom:1px solid #ece8f4;background:linear-gradient(135deg,#f7f3ff,#fffdf9)}
.hw-header span{color:#6750a4;font:800 13px "Segoe Print",cursive}.hw-header h2{margin:2px 0;color:#29364e;font-size:30px}.hw-header p{margin:0;color:#758198;font-size:14px}
.hw-close{position:absolute;top:18px;right:20px;width:40px;height:40px;border-radius:50%;color:#66738b;background:#edf0f5;font-size:28px}
.hw-body{height:clamp(580px,calc(100dvh - 150px),780px);min-height:0;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;overflow-y:auto;padding:24px 28px 28px}.hw-loading,.hw-error{padding:70px 20px;color:#6750a4;text-align:center;font-size:18px;font-weight:800}.hw-error{color:#a43d35}

/* Keep every task confirmation action on one stable bottom line. */
.hw-body:has(> .hw-screen-head){
  height:clamp(580px,calc(100dvh - 150px),780px);
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow-y:auto;
  justify-content:flex-start;
}
.hw-body:has(> .hw-screen-head) > .hw-primary{
  position:static;
  flex:0 0 auto;
  width:min(570px,100%);
  margin: auto auto 48px;
}
.hw-english{font-family:"Segoe Print","Comic Sans MS",cursive;font-weight:800;letter-spacing:.01em}
.hw-all-done{margin-bottom:16px;padding:13px 16px;border-radius:12px;color:#28784a;background:#e8f7ee;text-align:center;font-weight:850}
.hw-count{display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:22px;color:#526078}.hw-count div{display:flex;gap:6px}.hw-count button{min-width:44px;padding:7px 11px;border:1px solid #d9d2e8;border-radius:99px;background:#fff;font-weight:800}.hw-count button.active{color:#fff;background:#6750a4;border-color:#6750a4}
.hw-mode-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.hw-mode-card{min-height:194px;display:flex;flex-direction:column;align-items:center;padding:18px 12px;border:1px solid rgba(103,80,164,.16);border-radius:17px;background:#fff;box-shadow:0 8px 24px rgba(50,60,90,.08);text-align:center}.hw-mode-card:hover{transform:translateY(-3px);border-color:#8d78bd;box-shadow:0 14px 30px rgba(67,51,112,.14)}.hw-mode-card.completed{border-color:#72bc8c;background:#f6fcf8}.hw-mode-card i{font-style:normal;font-size:34px}.hw-mode-card strong{margin-top:9px;color:#33415b;font-size:16px}.hw-mode-card span{margin-top:6px;color:#778297;font-size:12px;line-height:1.4}.hw-mode-card em{margin-top:auto;padding-top:12px;color:#8b76b3;font-size:11px;font-style:normal;font-weight:800}.hw-mode-card.completed em{color:#318052}
.hw-repeat-lesson{display:block;margin:0 auto 24px;padding:9px 16px;border-radius:10px;color:#6750a4;background:#f0ebfa;font-weight:800}
.hw-screen-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;margin-bottom:12px}.hw-screen-head strong{justify-self:center;color:#33415b;font-size:18px}.hw-screen-head span{justify-self:end;color:#758198;font-weight:800}
.hw-progress{height:8px;overflow:hidden;border-radius:99px;background:#e9e5f1}.hw-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#4aa7f0,#6750a4);transition:width .25s}
.hw-body:has(> .hw-screen-head) .hw-question{margin:38px auto}
.hw-question{min-height:150px;display:grid;place-items:center;align-content:center;gap:8px;margin:22px auto 18px;padding:18px;border-radius:18px;background:#f6f4fa;text-align:center}.hw-question small,.hw-hint{color:#7b869b}.hw-question h3{margin:0;color:#26334a;font-size:34px}.hw-question p{margin:0;color:#8a769e;font-style:italic}.hw-listen{width:78px;height:78px;border-radius:50%;background:#e5f3ff;font-size:38px;box-shadow:0 8px 20px rgba(45,125,190,.18)}
.hw-listen{transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}.hw-listen:active,.hw-options button:active,.hw-match-memorize>button:active,.hw-match-paired-word:active,.hw-match-paired-translation:active{transform:scale(.96);box-shadow:0 3px 9px rgba(67,51,112,.18)}.hw-listen.is-speaking{transform:scale(1.08);filter:saturate(1.25);box-shadow:0 0 0 8px rgba(74,167,240,.16),0 10px 24px rgba(45,125,190,.28)}
.hw-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}.hw-options button{min-height:58px;padding:10px 14px;border:2px solid #e1ddea;border-radius:13px;background:#fff;color:#3d4960;font-weight:750}.hw-options button:hover{border-color:#8d78bd;background:#f7f3ff}.hw-options button.correct{border-color:#55ad76;background:#e5f6eb;color:#237443}.hw-options button.wrong{border-color:#dd6b61;background:#fff0ed;color:#a43d35}.hw-options button.muted{opacity:.55}
.hw-primary{display:block;width:min(380px,100%);min-height:48px;margin:20px auto 0;border-radius:12px;color:#fff;background:linear-gradient(135deg,#6750a4,#8067bd);font-weight:850}.hw-primary:disabled{opacity:.35}
.hw-hint{margin:17px 0;text-align:center;font-size:13px}
.hw-flashcard{position:relative;width:min(390px,100%);height:auto;aspect-ratio:1/1;display:block;margin:20px auto;transform-style:preserve-3d;transition:transform .58s cubic-bezier(.2,.72,.25,1);will-change:transform}.hw-flashcard:hover{filter:drop-shadow(0 7px 10px rgba(67,51,112,.1))}.hw-flashcard.flipped{transform:rotateY(180deg)}.hw-flashcard>div{position:absolute;inset:0;display:grid;place-items:center;align-content:center;gap:12px;padding:28px;border:2px solid #d9d1ea;border-radius:24px;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:linear-gradient(145deg,#fff,#f5f0fc);box-shadow:0 18px 44px rgba(50,40,85,.15)}.hw-flashcard .back{transform:rotateY(180deg);border-color:#8fcba4;background:linear-gradient(145deg,#fff,#edf9f1)}.hw-flashcard span{color:#8c7aad;font-size:11px;font-weight:900;letter-spacing:.13em}.hw-flashcard strong{color:#29364e;font-size:38px}.hw-flashcard em{color:#8a769e;font-size:18px}.hw-flashcard .back strong{color:#2f754a;font-size:28px;text-align:center}.hw-flashcard small{position:absolute;right:18px;bottom:14px;color:#8c7aad;font-size:22px;font-weight:900}
.hw-card-controls{display:flex;justify-content:center;gap:12px}.hw-card-controls button{width:52px;height:44px;border-radius:11px;color:#6750a4;background:#eee9f8;font-size:20px;font-weight:900}
.hw-match-board{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;width:min(820px,100%);margin:0 auto}.hw-match-column{display:grid;grid-template-rows:28px;grid-auto-rows:minmax(58px,auto);gap:9px}.hw-match-column>b{align-self:center;color:#8590a3;font-size:11px;letter-spacing:.1em;text-align:center}.hw-match-column button{min-width:0;min-height:58px;padding:8px 12px;border:2px solid #e0dbe9;border-radius:12px;background:#fff;color:#34415a;font-size:14px;font-weight:780;line-height:1.25;overflow-wrap:anywhere}.hw-match-column button:hover,.hw-match-column button.selected{border-color:#6750a4;background:#f1ecfa}.hw-match-column button.matched{border-color:#55ad76;background:#e4f6ea;color:#277446;pointer-events:none}.hw-match-column button.failed{border-color:#d75b4e;background:#fff0ed;animation:hw-shake .32s}.hw-match-column:nth-child(2) button{color:#34744c}
.hw-match-memorize{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:28px;grid-auto-rows:minmax(58px,auto);gap:9px 18px;width:min(820px,100%);margin:0 auto}.hw-match-memorize>b{align-self:center;color:#8590a3;font-size:11px;letter-spacing:.1em;text-align:center}.hw-match-memorize>button,.hw-match-memory-translation{min-width:0;min-height:58px;border:2px solid #e0dbe9;border-radius:12px;background:#fff;font-size:14px;font-weight:780;line-height:1.25;overflow-wrap:anywhere}.hw-match-memorize>button{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:2px 7px;padding:8px 12px;color:#34415a;text-align:left}.hw-match-memorize>button>span{grid-row:1/span 2;font-size:20px}.hw-match-memorize>button>strong{min-width:0;font-size:14px}.hw-match-memorize>button>em{grid-column:2;color:#8a769e;font-size:11px;font-style:normal;font-weight:600}.hw-match-memorize>button:hover{transform:translateY(-1px);border-color:#6750a4;background:#f1ecfa;box-shadow:0 8px 18px rgba(67,51,112,.1)}.hw-match-memory-translation{display:grid;place-items:center;padding:8px 12px;color:#34744c;text-align:center}.hw-shuffle-button span{display:inline-block;font-size:21px;vertical-align:-2px}
.hw-match-rows{display:grid;gap:20px;width:min(900px,100%);margin:18px auto 0}.hw-match-row{display:grid;gap:9px}.hw-match-row h3{margin:0;color:#8590a3;font-size:11px;letter-spacing:.12em;text-align:center}.hw-match-row>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}.hw-match-row button{position:relative;min-width:0;min-height:68px;display:grid;place-items:center;padding:10px 30px 10px 12px;border:2px solid #ded9e9;border-radius:14px;background:#fff;color:#34415a;font-size:14px;font-weight:800;line-height:1.25;overflow-wrap:anywhere}.hw-match-row button:hover,.hw-match-row button.selected{border-color:#6750a4;background:#f3eefb}.hw-match-row button.selected{box-shadow:0 0 0 3px rgba(103,80,164,.13)}.hw-match-row button.paired{border-color:#9b87c8;background:#f5f1fb}.hw-match-row button>b{position:absolute;top:7px;right:7px;width:21px;height:21px;display:grid;place-items:center;border-radius:50%;color:#fff;background:#7860ad;font-size:10px}.hw-match-row.translations button{color:#34744c}.hw-match-row button.correct{border-color:#55ad76;background:#e7f7ec;color:#267344}.hw-match-row button.correct>b{background:#3e9a60}.hw-match-row button.wrong{border-color:#d75b4e;background:#fff0ed;color:#a54139}.hw-match-row button.wrong>b{background:#d75b4e}
.hw-match-play{display:grid;gap:18px;width:min(900px,100%);margin:18px auto 0}.hw-match-english-list{width:calc(50% - 9px);display:grid;gap:9px}.hw-match-english-list h3,.hw-match-translation-pool h3{margin:0;color:#8590a3;font-size:11px;letter-spacing:.12em;text-align:center}.hw-match-english-list>div{display:grid;gap:9px}.hw-match-english-list button,.hw-match-translation-pool button{position:relative;min-width:0;border:2px solid #ded9e9;border-radius:14px;background:#fff;color:#34415a;font-weight:800;line-height:1.25;overflow-wrap:anywhere}.hw-match-english-list button{min-height:58px;display:grid;place-items:center;padding:9px 31px 9px 12px;font-size:14px}.hw-match-translation-pool{display:grid;gap:9px;padding-top:16px;border-top:1px dashed #dcd5e8}.hw-match-translation-pool>div{display:flex;flex-wrap:wrap;align-items:stretch;justify-content:center;gap:8px}.hw-match-translation-pool button{min-height:40px;flex:0 1 auto;padding:7px 31px 7px 12px;color:#34744c;font-size:12px}.hw-match-english-list button:hover,.hw-match-english-list button.selected,.hw-match-translation-pool button:hover{border-color:#6750a4;background:#f3eefb}.hw-match-english-list button.selected{box-shadow:0 0 0 3px rgba(103,80,164,.13)}.hw-match-english-list button.paired,.hw-match-translation-pool button.paired{border-color:#9b87c8;background:#f5f1fb}.hw-match-english-list button>b,.hw-match-translation-pool button>b{position:absolute;top:50%;right:7px;width:21px;height:21px;display:grid;place-items:center;transform:translateY(-50%);border-radius:50%;color:#fff;background:#7860ad;font-size:10px}.hw-match-english-list button.correct,.hw-match-translation-pool button.correct{border-color:#55ad76;background:#e7f7ec;color:#267344}.hw-match-english-list button.correct>b,.hw-match-translation-pool button.correct>b{background:#3e9a60}.hw-match-english-list button.wrong,.hw-match-translation-pool button.wrong{border-color:#d75b4e;background:#fff0ed;color:#a54139}.hw-match-english-list button.wrong>b,.hw-match-translation-pool button.wrong>b{background:#d75b4e}
.hw-match-review{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:min(900px,100%);margin:18px auto 0}.hw-match-review article{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:start;gap:8px;padding:10px 12px;border-radius:12px}.hw-match-review article>span{width:25px;height:25px;display:grid;place-items:center;border-radius:50%;color:#fff;font-size:16px;font-weight:900}.hw-match-review article div{min-width:0;display:grid;gap:4px}.hw-match-review article b{color:#34415a;font-size:13px;line-height:1.35;overflow-wrap:anywhere}.hw-match-review article small{color:#a54139;font-size:11px;line-height:1.35}.hw-match-review article small strong{color:#277446}.hw-match-review article.correct{background:#e7f7ec}.hw-match-review article.correct>span{background:#49a86b}.hw-match-review article.wrong{background:#fff0ed}.hw-match-review article.wrong>span{background:#d75b4e}
@keyframes hw-shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
.hw-result{padding:42px 20px;text-align:center}.hw-result>i{width:64px;height:64px;display:grid;place-items:center;margin:0 auto 12px;border-radius:50%;color:#fff;background:#55ad76;font-size:34px;font-style:normal}.hw-result h3{margin:0;color:#29364e;font-size:28px}.hw-result>strong{display:block;margin-top:8px;color:#6750a4}.hw-result p{color:#69758b;font-size:18px}
@media(max-width:900px){.hw-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hw-mode-card:last-child{grid-column:1/-1;min-height:150px}.hw-mode-card{min-height:166px}}
@media(max-width:600px){.hw-backdrop{padding:0}.hw-dialog{max-height:100dvh;height:100dvh;border-radius:0}.hw-embedded{border-radius:14px}.hw-header{padding:18px 54px 15px 18px}.hw-header h2{font-size:24px}.hw-header p{font-size:12px}.hw-body{padding:17px 12px 24px}.hw-count{align-items:flex-start;flex-direction:column;gap:7px}.hw-mode-grid{gap:8px}.hw-mode-card{min-height:154px;padding:13px 8px}.hw-mode-card i{font-size:28px}.hw-mode-card strong{font-size:14px}.hw-options{grid-template-columns:1fr}.hw-question{min-height:125px;margin-top:15px}.hw-question h3{font-size:27px}.hw-match-board{gap:8px}.hw-match-column{gap:7px;grid-auto-rows:minmax(54px,auto)}.hw-match-column button{min-height:54px;padding:6px 7px;font-size:12px}.hw-flashcard{width:min(300px,100%);height:auto;aspect-ratio:1/1}.hw-flashcard strong{font-size:30px}}
@media(max-width:600px){.hw-match-memorize{gap:7px 8px;grid-auto-rows:minmax(54px,auto)}.hw-match-memorize>button,.hw-match-memory-translation{min-height:54px;padding:6px 7px;font-size:12px}.hw-match-memorize>button{grid-template-columns:23px minmax(0,1fr);gap:1px 4px}.hw-match-memorize>button>span{font-size:16px}.hw-match-memorize>button>strong{font-size:12px}.hw-match-memorize>button>em{font-size:9px}.hw-match-english-list{width:100%}.hw-match-english-list button{min-height:52px;font-size:12px}.hw-match-translation-pool button{min-height:38px;padding-top:6px;padding-bottom:6px;font-size:11px}.hw-match-review{grid-template-columns:1fr}}
.hw-match-memorize>button{grid-template-columns:1fr;place-items:center;text-align:center}
.hw-flashcard{perspective:1400px;transform:none;transform-style:flat;transition:none;will-change:auto}.hw-flashcard:hover{filter:none}.hw-flashcard.flipped{transform:none}.hw-flashcard>div{transform-style:preserve-3d;transition:transform .82s cubic-bezier(.22,.8,.28,1),box-shadow .35s ease;will-change:transform}.hw-flashcard .front{transform:rotateY(0deg) translateZ(1px);border:3px solid #7b64b5;background:linear-gradient(145deg,#f8f3ff 0%,#ebe7ff 48%,#e5f4ff 100%);box-shadow:inset 0 7px 0 #7357ae,0 22px 48px rgba(77,58,128,.22)}.hw-flashcard .back{transform:rotateY(180deg) translateZ(1px);border:3px solid #49a978;background:linear-gradient(145deg,#f2fff7 0%,#e2f7eb 50%,#dcf3ef 100%);box-shadow:inset 0 7px 0 #3f9e70,0 22px 48px rgba(39,112,76,.20)}.hw-flashcard.flipped .front{transform:rotateY(-180deg) translateZ(1px)}.hw-flashcard.flipped .back{transform:rotateY(0deg) translateZ(1px)}.hw-flashcard .front>span,.hw-flashcard .back>span{padding:5px 10px;border-radius:999px;letter-spacing:.14em}.hw-flashcard .front>span{color:#5c4394;background:rgba(103,80,164,.12)}.hw-flashcard .back>span{color:#287452;background:rgba(63,158,112,.13)}.hw-flashcard .front strong{color:#30264c;text-shadow:0 1px 0 #fff}.hw-flashcard .back strong{color:#1f6846;text-shadow:0 1px 0 #fff}.hw-flashcard .front small{color:#684da0}.hw-flashcard .back small{color:#2f865e}
@media(prefers-reduced-motion:reduce){.hw-flashcard>div{transition-duration:.18s}}
.hw-card-controls{align-items:center;gap:15px;margin-top:6px}.hw-card-controls button{border-radius:50%;transition:transform .2s ease,box-shadow .2s ease,filter .2s ease}.hw-card-controls .hw-card-prev{width:50px;height:50px;border:2px solid #8067bd;color:#6750a4;background:linear-gradient(145deg,#fff,#eee8fb);box-shadow:0 8px 18px rgba(103,80,164,.14);font-size:23px}.hw-card-controls .hw-card-sound{width:64px;height:64px;border:3px solid rgba(255,255,255,.92);color:#fff;background:linear-gradient(145deg,#4aa7f0,#6750a4);box-shadow:0 0 0 5px rgba(74,167,240,.12),0 13px 28px rgba(83,91,177,.28);font-size:25px}.hw-card-controls .hw-card-next{width:50px;height:50px;border:2px solid #45a471;color:#fff;background:linear-gradient(145deg,#67c18d,#31855c);box-shadow:0 8px 18px rgba(49,133,92,.22);font-size:23px}.hw-card-controls button:hover:not(:disabled){transform:translateY(-3px) scale(1.04);filter:saturate(1.08)}.hw-card-controls .hw-card-sound:hover{box-shadow:0 0 0 7px rgba(74,167,240,.14),0 16px 32px rgba(83,91,177,.32)}.hw-card-controls button:active:not(:disabled){transform:translateY(0) scale(.96)}.hw-card-controls button:focus-visible{outline:3px solid rgba(103,80,164,.24);outline-offset:3px}.hw-card-controls button:disabled{opacity:.32;box-shadow:none;cursor:not-allowed}
.hw-card-controls{gap:10px;margin-top:5px}.hw-card-controls button{width:52px;height:44px;border-radius:11px;background:#fff;box-shadow:0 5px 13px rgba(67,51,112,.09);font-size:20px;transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease}.hw-card-controls .hw-card-prev{width:52px;height:44px;border:2px solid rgba(103,80,164,.34);color:#6750a4;background:#f3effb;box-shadow:0 5px 13px rgba(103,80,164,.09);font-size:20px}.hw-card-controls .hw-card-sound{width:56px;height:44px;border:2px solid rgba(74,167,240,.5);color:#397faf;background:#eef8ff;box-shadow:0 5px 13px rgba(74,167,240,.11);font-size:20px}.hw-card-controls .hw-card-next{width:52px;height:44px;border:2px solid rgba(85,173,118,.48);color:#318052;background:#edf8f1;box-shadow:0 5px 13px rgba(85,173,118,.10);font-size:20px}.hw-card-controls button:hover:not(:disabled){transform:translateY(-1px);filter:none;box-shadow:0 8px 17px rgba(67,51,112,.12)}.hw-card-controls .hw-card-sound:hover{box-shadow:0 8px 17px rgba(74,167,240,.15)}.hw-card-controls button:active:not(:disabled){transform:scale(.97)}.hw-card-controls button:focus-visible{outline:3px solid rgba(103,80,164,.2);outline-offset:2px}.hw-card-controls button:disabled{opacity:.3;box-shadow:none}
.hw-match-pair-board{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:26px;grid-auto-rows:minmax(58px,auto);gap:9px 18px;width:100%}.hw-match-pair-board>h3{align-self:center;margin:0;color:#8590a3;font-size:11px;letter-spacing:.12em;text-align:center}.hw-match-paired-word,.hw-match-paired-translation,.hw-match-pair-slot{position:relative;min-width:0;min-height:58px;display:grid;place-items:center;padding:9px 31px 9px 12px;border:2px solid #ded9e9;border-radius:14px;background:#fff;font-size:14px;font-weight:800;line-height:1.25;overflow-wrap:anywhere}.hw-match-paired-word{color:#34415a}.hw-match-paired-translation{color:#34744c;border-color:#9b87c8;background:#f5f1fb}.hw-match-pair-slot{border-style:dashed;color:#b4acbf;background:rgba(255,255,255,.42);font-size:18px}.hw-match-paired-word:hover,.hw-match-paired-word.selected{border-color:#6750a4;background:#f3eefb}.hw-match-paired-word.selected{box-shadow:0 0 0 3px rgba(103,80,164,.13)}.hw-match-paired-word.paired{border-color:#9b87c8;background:#f5f1fb}.hw-match-paired-translation:hover{border-color:#6750a4;background:#eee7f9}.hw-match-paired-word>b,.hw-match-paired-translation>b{position:absolute;top:50%;right:7px;width:21px;height:21px;display:grid;place-items:center;transform:translateY(-50%);border-radius:50%;color:#fff;background:#7860ad;font-size:10px}.hw-match-paired-word.correct,.hw-match-paired-translation.correct{border-color:#55ad76;background:#e7f7ec;color:#267344}.hw-match-paired-word.correct>b,.hw-match-paired-translation.correct>b{background:#3e9a60}.hw-match-paired-word.wrong,.hw-match-paired-translation.wrong{border-color:#d75b4e;background:#fff0ed;color:#a54139}.hw-match-paired-word.wrong>b,.hw-match-paired-translation.wrong>b{background:#d75b4e}
@media(max-width:600px){.hw-match-pair-board{gap:7px 8px;grid-auto-rows:minmax(54px,auto)}.hw-match-paired-word,.hw-match-paired-translation,.hw-match-pair-slot{min-height:54px;padding:7px 27px 7px 7px;font-size:12px}}
.hw-flashcard .front{border:2px solid #cfc5e3;background:linear-gradient(145deg,#fdfbff 0%,#f4f0fb 55%,#f0f7fc 100%);box-shadow:0 16px 36px rgba(67,51,112,.11)}.hw-flashcard .back{border:2px solid #b9d9c5;background:linear-gradient(145deg,#fbfefc 0%,#f0f8f3 55%,#edf7f4 100%);box-shadow:0 16px 36px rgba(39,112,76,.10)}.hw-flashcard .front>span{color:#746391;background:rgba(103,80,164,.07)}.hw-flashcard .back>span{color:#5d816c;background:rgba(63,158,112,.07)}.hw-flashcard .front strong{color:#3d4354;text-shadow:none}.hw-flashcard .back strong{color:#3e6651;text-shadow:none}.hw-flashcard .front small{color:#81739b}.hw-flashcard .back small{color:#688b76}
.hw-dialog,.hw-embedded{border-color:rgba(103,80,164,.30);background:radial-gradient(circle at 8% 5%,rgba(103,80,164,.18),transparent 30%),radial-gradient(circle at 92% 92%,rgba(85,173,118,.13),transparent 27%),linear-gradient(145deg,#eee9f8 0%,#eaf3fb 55%,#eef6f1 100%)}.hw-embedded{box-shadow:0 18px 46px rgba(55,65,105,.17),inset 0 1px 0 rgba(255,255,255,.72)}.hw-header{border-bottom-color:rgba(103,80,164,.16);background:rgba(255,255,255,.72);backdrop-filter:blur(8px)}.hw-body{background:rgba(255,255,255,.16)}.hw-match-translation-pool button.selected{border-color:#6750a4;background:#f3eefb;box-shadow:0 0 0 3px rgba(103,80,164,.13)}
.hw-mode-card{--mode-accent:#7455b5;--mode-rgb:116,85,181;position:relative;isolation:isolate;overflow:hidden;border:1px solid rgba(var(--mode-rgb),.24);background:linear-gradient(155deg,rgba(255,255,255,.96),rgba(var(--mode-rgb),.075));box-shadow:0 10px 26px rgba(55,65,105,.10),inset 0 1px 0 rgba(255,255,255,.9);transition:transform .3s cubic-bezier(.2,.75,.25,1),border-color .3s,box-shadow .3s}.hw-mode-card:nth-child(2){--mode-accent:#4d7fd2;--mode-rgb:77,127,210}.hw-mode-card:nth-child(3){--mode-accent:#3f91c9;--mode-rgb:63,145,201}.hw-mode-card:nth-child(4){--mode-accent:#55a96f;--mode-rgb:85,169,111}.hw-mode-card:nth-child(5){--mode-accent:#9470b8;--mode-rgb:148,112,184}.hw-mode-card:before{content:"";position:absolute;z-index:-1;width:118px;height:118px;top:-66px;right:-52px;border-radius:50%;background:radial-gradient(circle,rgba(var(--mode-rgb),.16),rgba(var(--mode-rgb),0) 70%);transition:transform .45s}.hw-mode-card:after{content:"";width:44px;height:4px;margin-top:14px;order:4;border-radius:9px;background:var(--mode-accent);opacity:.55;box-shadow:0 2px 8px rgba(var(--mode-rgb),.24)}.hw-mode-card:hover{transform:translateY(-6px);border-color:rgba(var(--mode-rgb),.52);box-shadow:0 18px 38px rgba(var(--mode-rgb),.17),inset 0 1px 0 #fff}.hw-mode-card:hover:before{transform:scale(1.22)}.hw-mode-card i{width:62px;height:62px;display:grid;place-items:center;border:1px solid rgba(var(--mode-rgb),.22);border-radius:20px;background:linear-gradient(145deg,#fff,rgba(var(--mode-rgb),.13));box-shadow:0 9px 18px rgba(var(--mode-rgb),.16),inset 0 1px 0 #fff;transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s}.hw-mode-card:hover i{transform:translateY(-2px) rotate(-3deg) scale(1.05);box-shadow:0 13px 23px rgba(var(--mode-rgb),.22)}.hw-mode-card strong{color:#303d56}.hw-mode-card em{display:inline-flex;align-items:center;justify-content:center;margin-top:auto;padding:7px 11px;border:1px solid rgba(var(--mode-rgb),.14);border-radius:999px;background:rgba(255,255,255,.68);color:var(--mode-accent)}.hw-mode-card.completed{border-color:rgba(70,158,98,.5);background:linear-gradient(155deg,#fff,rgba(85,173,118,.13));box-shadow:0 12px 30px rgba(51,139,80,.14)}.hw-mode-card.completed em{border-color:rgba(70,158,98,.24);background:rgba(231,248,236,.9);color:#318052}
@media(max-width:600px){.hw-mode-card i{width:52px;height:52px;border-radius:16px}.hw-mode-card:after{margin-top:10px}}
@media(prefers-reduced-motion:reduce){.hw-mode-card,.hw-mode-card i,.hw-mode-card:before{transition:none}.hw-mode-card:hover,.hw-mode-card:hover i{transform:none}}
.hw-mode-grid{gap:12px}.hw-mode-card{align-items:flex-start;padding:17px 16px 14px 20px;border-radius:12px 22px 12px 12px;text-align:left}.hw-mode-card:before{width:5px;height:100%;top:0;left:0;right:auto;border-radius:0;background:linear-gradient(180deg,var(--mode-accent),rgba(var(--mode-rgb),.3));transform:none}.hw-mode-card:after{content:"";position:absolute;z-index:-1;right:-22px;bottom:-26px;width:90px;height:90px;margin:0;border:1px solid rgba(var(--mode-rgb),.16);border-radius:50%;background:transparent;box-shadow:0 0 0 10px rgba(var(--mode-rgb),.035),0 0 0 22px rgba(var(--mode-rgb),.025);opacity:1}.hw-mode-card small{position:absolute;top:12px;right:14px;color:rgba(var(--mode-rgb),.62);font-size:11px;font-weight:900;letter-spacing:.14em}.hw-mode-card i{width:48px;height:48px;flex:0 0 48px;border-radius:15px;color:var(--mode-accent)}.hw-mode-card i svg{width:31px;height:31px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.hw-mode-card strong{margin-top:10px;font-size:15px}.hw-mode-card span{margin-top:4px}.hw-mode-card em{margin-top:auto;padding:6px 9px;border:2px dashed rgba(var(--mode-rgb),.28);border-radius:7px;background:rgba(255,255,255,.48);font-size:10px;letter-spacing:.015em;transform:rotate(-1.5deg)}.hw-mode-card.completed em{border-style:solid;transform:rotate(-2deg)}.hw-mode-card:hover{transform:translateY(-4px) rotate(.25deg)}.hw-mode-card:hover:before{transform:none}
@media(min-width:901px){.hw-mode-grid{grid-template-columns:1.12fr 1fr 1fr;grid-template-rows:repeat(2,minmax(138px,1fr))}.hw-mode-card{min-height:138px}.hw-mode-card:first-child{grid-row:1/3;align-items:center;justify-content:center;padding:28px 24px;text-align:center}.hw-mode-card:first-child i{width:76px;height:76px;flex-basis:76px;border-radius:23px}.hw-mode-card:first-child i svg{width:43px;height:43px}.hw-mode-card:first-child strong{margin-top:16px;font-size:18px}.hw-mode-card:first-child span{max-width:190px}.hw-mode-card:first-child em{margin-top:22px}.hw-mode-card:not(:first-child){display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto auto 1fr;column-gap:12px}.hw-mode-card:not(:first-child) i{grid-row:1/3}.hw-mode-card:not(:first-child) strong{align-self:end;margin-top:3px;padding-right:22px}.hw-mode-card:not(:first-child) span{grid-column:2}.hw-mode-card:not(:first-child) em{grid-column:1/3;justify-self:start;margin-top:10px}}
@media(max-width:900px){.hw-mode-card{align-items:center;text-align:center}.hw-mode-card i{width:52px;height:52px;flex-basis:52px}.hw-mode-card em{align-self:center}}
.hw-mode-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:none;gap:11px}.hw-mode-card,.hw-mode-card:first-child,.hw-mode-card:not(:first-child){--side-accent:var(--mode-accent);grid-row:auto;display:flex;min-height:220px;align-items:flex-start;justify-content:flex-start;padding:18px 14px 15px;border:1px solid rgba(var(--mode-rgb),.22);border-radius:15px;background:linear-gradient(165deg,#fff 0%,rgba(255,255,255,.96) 58%,rgba(var(--mode-rgb),.08) 100%);box-shadow:0 9px 22px rgba(55,65,105,.09),inset 0 1px 0 #fff;text-align:left}.hw-mode-card:before{width:calc(100% - 26px);height:3px;top:0;left:13px;border-radius:0 0 8px 8px;background:linear-gradient(90deg,transparent,var(--mode-accent),transparent);opacity:.55}.hw-mode-card:after{display:none}.hw-mode-card .wax-stamp{position:absolute;top:9px;right:8px;width:50px;height:53px;margin:0;transform:scale(.76);transform-origin:top right}.hw-mode-card i,.hw-mode-card:first-child i,.hw-mode-card:not(:first-child) i{grid-row:auto;width:38px;height:38px;flex:0 0 38px;margin:6px 0 0;display:grid;place-items:center;border:0;border-radius:0;background:none;box-shadow:none;color:var(--mode-accent)}.hw-mode-card i svg,.hw-mode-card:first-child i svg{width:31px;height:31px}.hw-mode-card strong,.hw-mode-card:first-child strong,.hw-mode-card:not(:first-child) strong{align-self:auto;margin-top:20px;padding:0;color:#33405a;font-size:15px;line-height:1.35;text-align:left}.hw-mode-card span,.hw-mode-card:not(:first-child) span{grid-column:auto;margin-top:6px;color:#78849a;font-size:12px;line-height:1.45;text-align:left}.hw-mode-card em,.hw-mode-card:first-child em,.hw-mode-card:not(:first-child) em{grid-column:auto;align-self:flex-start;justify-self:auto;margin-top:auto;padding:10px 0 0;border:0;border-top:1px dashed rgba(var(--mode-rgb),.22);border-radius:0;background:none;color:#83719f;font-size:10px;letter-spacing:.02em;transform:none}.hw-mode-card.completed em{border-style:dashed;transform:none}.hw-mode-card:hover{transform:translateY(-4px);border-color:rgba(var(--mode-rgb),.42);box-shadow:0 15px 30px rgba(var(--mode-rgb),.14),inset 0 1px 0 #fff}.hw-mode-card:hover i{transform:translateY(-1px);box-shadow:none}.hw-mode-card:hover .wax-stamp{transform:scale(.8) rotate(-2deg)}
@media(max-width:900px){.hw-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hw-mode-card,.hw-mode-card:first-child,.hw-mode-card:not(:first-child){min-height:190px;align-items:flex-start;text-align:left}.hw-mode-card:last-child{grid-column:1/-1;min-height:170px}.hw-mode-card em{align-self:flex-start}}
@media(max-width:520px){.hw-mode-grid{grid-template-columns:1fr}.hw-mode-card:last-child{grid-column:auto}.hw-mode-card,.hw-mode-card:first-child,.hw-mode-card:not(:first-child){min-height:168px}}
.hw-dialog,.hw-embedded{container-type:inline-size}
@container (max-width:850px){.hw-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hw-mode-card,.hw-mode-card:first-child,.hw-mode-card:not(:first-child){min-height:190px}.hw-mode-card:last-child{grid-column:1/-1;min-height:170px}}
@container (max-width:480px){.hw-mode-grid{grid-template-columns:1fr}.hw-mode-card:last-child{grid-column:auto}.hw-mode-card,.hw-mode-card:first-child,.hw-mode-card:not(:first-child){min-height:168px}}
.hw-mode-card .wax-stamp .stamp-number-label{position:absolute;top:10px;left:0;width:50px;height:18px;min-width:0;margin:0;padding:0;display:block;flex:none;border:0;border-radius:0;background:none;box-shadow:none;color:#9f8f80;font-family:Roboto,Arial,sans-serif;font-size:15px;font-style:normal;font-weight:800;line-height:18px;text-align:center;transform:none}.hw-mode-card .wax-stamp.filled .stamp-number-label{color:#fff}.hw-mode-card:hover .wax-stamp .stamp-number-label{transform:none;box-shadow:none}
.hw-mode-card .wax-stamp .stamp-word-label{position:absolute;top:39px;left:0;width:50px;height:7px;margin:0;padding:0;display:block;color:#9f8f80;font-family:Roboto,Arial,sans-serif;font-size:6px;font-style:normal;font-weight:900;line-height:7px;letter-spacing:.6px;text-align:center;transform:none}.hw-mode-card .wax-stamp.filled .stamp-word-label{color:#fff}
.hw-mode-card,.hw-mode-card:first-child,.hw-mode-card:not(:first-child){border:1px solid rgba(var(--mode-rgb),.56);box-shadow:0 0 0 1px rgba(var(--mode-rgb),.10),0 0 18px rgba(var(--mode-rgb),.12),0 10px 24px rgba(55,65,105,.09),inset 0 1px 0 #fff;transition:transform .3s cubic-bezier(.2,.75,.25,1),border-color .3s,box-shadow .3s}.hw-mode-card:hover{border-color:rgba(var(--mode-rgb),.86);box-shadow:0 0 0 1px rgba(var(--mode-rgb),.22),0 0 27px rgba(var(--mode-rgb),.23),0 16px 32px rgba(55,65,105,.13),inset 0 1px 0 #fff}.hw-mode-card:focus-visible{outline:none;border-color:rgb(var(--mode-rgb));box-shadow:0 0 0 3px rgba(var(--mode-rgb),.19),0 0 28px rgba(var(--mode-rgb),.24),0 14px 30px rgba(55,65,105,.12)}
.hw-mode-grid{gap:9px}.hw-mode-card,.hw-mode-card:first-child,.hw-mode-card:not(:first-child){min-height:195px;padding:15px 13px 13px}.hw-mode-card i,.hw-mode-card:first-child i,.hw-mode-card:not(:first-child) i{width:34px;height:34px;flex-basis:34px;margin-top:3px}.hw-mode-card i svg,.hw-mode-card:first-child i svg{width:28px;height:28px}.hw-mode-card strong,.hw-mode-card:first-child strong,.hw-mode-card:not(:first-child) strong{margin-top:14px;font-size:14px}.hw-mode-card span,.hw-mode-card:not(:first-child) span{margin-top:4px;font-size:11px}.hw-mode-card em,.hw-mode-card:first-child em,.hw-mode-card:not(:first-child) em{padding-top:8px}.hw-mode-card .wax-stamp{transform:scale(.69)}.hw-mode-card:hover .wax-stamp{transform:scale(.72) rotate(-2deg)}
@container (max-width:850px){.hw-mode-card,.hw-mode-card:first-child,.hw-mode-card:not(:first-child){min-height:165px}.hw-mode-card:last-child{min-height:150px}}
@container (max-width:480px){.hw-mode-card,.hw-mode-card:first-child,.hw-mode-card:not(:first-child),.hw-mode-card:last-child{min-height:150px}}
.hw-mode-grid{gap:16px 18px;padding:2px 6px 5px}
@container (max-width:480px){.hw-mode-grid{gap:12px;padding-inline:2px}}
.hw-mode-card i.hw-mode-illustration,.hw-mode-card:first-child i.hw-mode-illustration,.hw-mode-card:not(:first-child) i.hw-mode-illustration{width:92px;height:74px;flex:0 0 74px;margin:0;display:block;border:0;border-radius:0;background-color:transparent;background-image:url("./assets/homework-modes-source.webp");background-repeat:no-repeat;background-size:280px 187px;box-shadow:none;mix-blend-mode:multiply;filter:saturate(1.04) contrast(1.02);transform:none}
.hw-mode-card i.hw-mode-illustration-listen{background-position:-11px -15px}
.hw-mode-card i.hw-mode-illustration-enru{background-position:-97px -16px}
.hw-mode-card i.hw-mode-illustration-ruen{background-position:-182px -19px}
.hw-mode-card i.hw-mode-illustration-match{background-position:-22px -97px}
.hw-mode-card i.hw-mode-illustration-cards{background-position:-145px -98px}
.hw-mode-card:hover i.hw-mode-illustration{transform:translateY(-2px) scale(1.025);box-shadow:none}
.hw-mode-card strong,.hw-mode-card:first-child strong,.hw-mode-card:not(:first-child) strong{margin-top:5px}
@container (max-width:480px){.hw-mode-card i.hw-mode-illustration,.hw-mode-card:first-child i.hw-mode-illustration,.hw-mode-card:not(:first-child) i.hw-mode-illustration{transform:scale(.88);transform-origin:left top;margin-bottom:-9px}.hw-mode-card:hover i.hw-mode-illustration{transform:translateY(-1px) scale(.9)}}
.hw-embedded .wax-stamp.filled .stamp-ribbon,.hw-dialog .wax-stamp.filled .stamp-ribbon{fill:var(--homework-level);stroke:var(--homework-level)}.hw-embedded .wax-stamp.filled .stamp-seal,.hw-dialog .wax-stamp.filled .stamp-seal{fill:var(--homework-level);stroke:color-mix(in srgb,var(--homework-level) 88%,#4a3427)}
.hw-all-done{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap}.hw-batch-next{padding:8px 13px;border:1px solid rgba(40,120,74,.24);border-radius:10px;color:#fff;background:#45a471;font-size:11px;font-weight:850}.hw-batch-next:hover{background:#378b5d}

/* Keep homework cards legible without enlarging the cards themselves. */
.hw-mode-card strong,.hw-mode-card:first-child strong,.hw-mode-card:not(:first-child) strong{font-size:15.5px;line-height:1.45}
.hw-mode-card span,.hw-mode-card:not(:first-child) span{font-size:12px;line-height:1.55}
.hw-mode-card em,.hw-mode-card:first-child em,.hw-mode-card:not(:first-child) em{font-size:11px;line-height:1.4}
.hw-options button,.hw-match-column button,.hw-match-memorize>button,.hw-match-memory-translation,.hw-match-row button,.hw-match-english-list button,.hw-match-paired-word,.hw-match-paired-translation{font-size:15.5px;line-height:1.35}
.hw-match-memorize>button>strong{font-size:15.5px}
.hw-match-memorize>button>em,.hw-match-review article small{font-size:12px}

@media (max-width:800px) and (pointer:coarse){
  .hw-header p{font-size:13px;line-height:1.45}
  .hw-screen-head{position:relative;grid-template-columns:1fr;min-height:24px}
  .hw-screen-head strong{justify-self:center;text-align:center}
  .hw-screen-head span{position:absolute;right:0;top:50%;transform:translateY(-50%)}
  .hw-mode-card strong,.hw-mode-card:first-child strong,.hw-mode-card:not(:first-child) strong{font-size:15.5px}
  .hw-mode-card span,.hw-mode-card:not(:first-child) span{font-size:12px}
  .hw-mode-card em,.hw-mode-card:first-child em,.hw-mode-card:not(:first-child) em{font-size:11px}
  .hw-options button,.hw-match-column button,.hw-match-memorize>button,.hw-match-memory-translation,.hw-match-row button,.hw-match-english-list button,.hw-match-paired-word,.hw-match-paired-translation{font-size:13.5px}
  .hw-match-memorize>button>strong{font-size:13.5px}
  .hw-match-memorize>button>em{font-size:10px}
}

/* English words are the main learning content, so keep them prominent. */
.hw-options button.hw-english{
  font-family:"Segoe Print","Comic Sans MS",cursive;
  font-size:20px;
  font-weight:850;
  line-height:1.4;
}
.hw-match-column .hw-english,
.hw-match-memorize .hw-english,
.hw-match-row .hw-english,
.hw-match-english-list .hw-english,
.hw-match-paired-word .hw-english,
.hw-match-review .hw-english{
  font-size:18px;
  font-weight:850;
  line-height:1.4;
}

@media(max-width:600px){
  .hw-options button.hw-english{font-size:20px}
  .hw-match-column .hw-english,
  .hw-match-memorize .hw-english,
  .hw-match-row .hw-english,
  .hw-match-english-list .hw-english,
  .hw-match-paired-word .hw-english,
  .hw-match-review .hw-english{font-size:17px}
}

/* Keep the embedded lesson homework header focused on one instruction. */
.hw-header {
  min-height: 64px;
  padding: 16px 64px 16px 28px;
}
.hw-embedded .hw-header {
  padding-top: 16px;
  padding-bottom: 16px;
}
.hw-header > p {
  width: 100%;
  margin: 0;
  text-align: center;
  color: #6750a4;
  font-family: "Segoe Print", "Comic Sans MS", cursive;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: .01em;
}
.hw-header .hw-close {
  top: 50%;
  transform: translateY(-50%);
}
@media(max-width:600px){.hw-header{min-height:58px;padding:14px 54px 14px 18px}.hw-header > p{font-size:17px}}

/* Three lesson-style completion stamps on every homework folder. */
.hw-mode-card .hw-mode-stamps{position:absolute;z-index:2;top:7px;right:7px;width:91px;height:36px;display:block;margin:0}
.hw-mode-card .hw-mode-stamps .wax-stamp{position:absolute;top:0;right:auto;width:50px;height:53px;margin:0;transform:scale(.6);transform-origin:top left}
.hw-mode-card .hw-mode-stamps .wax-stamp:nth-child(1){left:0}
.hw-mode-card .hw-mode-stamps .wax-stamp:nth-child(2){left:30px}
.hw-mode-card .hw-mode-stamps .wax-stamp:nth-child(3){left:60px}
.hw-mode-card:hover .hw-mode-stamps .wax-stamp{transform:scale(.6)}
