@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');
:root{--ink:#263b32;--green:#315b45;--muted:#90988c;--paper:#f7f8f2;--orange:#dc8657;--border:#e5e8de}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans','Noto Sans SC',sans-serif;-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid #d99c64;outline-offset:5px}button{transition:transform .18s,background .18s}button:active{transform:scale(.96)}.app{max-width:480px;margin:auto;padding:27px 24px 20px}.header{display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);font-size:22px;font-weight:700;letter-spacing:2px}.brand-icon{font-size:34px;line-height:1;color:var(--green);transform:rotate(-30deg)}.brand-en{font-size:9px;letter-spacing:1.5px;font-weight:500;margin-left:4px;color:#818b7a}.icon-button{border:0;background:transparent;color:var(--green);display:grid;place-items:center;width:38px;height:38px;font-size:23px}.sound-toggle{border:1px solid var(--border);border-radius:50%;font-size:20px}.sound-toggle[aria-pressed=false]{opacity:.4}.intro{display:flex;justify-content:space-between;align-items:center;padding:35px 3px 25px}.eyebrow{font-size:9px;letter-spacing:2.4px;color:#8a957e;margin:0 0 12px}h1{font-size:30px;color:#8a957e;line-height:1.5;letter-spacing:1px;font-weight:600;margin:0}.orange-dot{color:var(--orange)}.intro-copy{color:#8b9386;font-size:12px;margin:12px 0 0;letter-spacing:1px}.plant{width:100px;height:126px;position:relative;margin-top:20px;margin-right:8px}.stem{position:absolute;bottom:29px;left:50px;width:2px;height:66px;background:#7b926a;transform:rotate(8deg)}.leaf{position:absolute;background:#a9bc8b;width:35px;height:51px;border-radius:3px 40px 3px 40px}.leaf-one{left:20px;top:12px;transform:rotate(-15deg)}.leaf-two{left:52px;top:0;transform:rotate(65deg);background:#657f59;width:30px;height:46px}.pot{position:absolute;bottom:0;left:32px;width:45px;height:42px;background:#e6c3a3;clip-path:polygon(0 0,100% 0,83% 100%,17% 100%);border-top:6px solid #d5ad8a}.spark{position:absolute;right:-5px;top:38px;color:#c49d62;font-size:24px}.progress-panel{margin:3px 0 21px;padding:0 3px}.progress-heading{display:flex;justify-content:space-between;font-size:11px;align-items:center}.progress-heading strong{font-family:'DM Sans',sans-serif;font-size:15px;margin-left:9px;font-weight:600}.tiny-dot{display:inline-block;width:5px;height:5px;background:#7b986a;border-radius:50%;margin:0 -2px 2px 0}.muted{color:#a0a595;font-size:11px}.progress-caption{font-size:10px;color:#929b86}.progress-caption span{margin-left:5px}.progress-track{height:4px;background:#e6eadf;border-radius:8px;margin-top:12px;overflow:hidden}#progressBar{height:100%;width:8.333%;background:#849d6c;border-radius:8px;transition:width .35s}.word-card{background:#fff;border:1px solid #e6e9df;border-radius:24px;padding:17px 21px 4px;box-shadow:0 8px 25px #3d503506}.card-top{display:flex;justify-content:space-between;align-items:center}.level-tag{background:#f1f5eb;border:1px solid #e5ebdd;border-radius:6px;font-size:10px;color:#748666;padding:5px 4px}.favorite{font-size:27px;color:#a6ac9c}.favorite[aria-pressed=true]{color:#d8a44b}.word-hint{text-align:center;color:#a4aa9c;font-size:10px;letter-spacing:1px;margin:24px 0 12px}.word-parts{display:flex;justify-content:center;align-items:center;gap:2px;min-height:59px;white-space:nowrap}.word-part{font-family:'DM Sans',sans-serif;font-size:clamp(29px,10vw,48px);font-weight:600;letter-spacing:-1.6px;padding:3px 1px;border:0;background:transparent;border-radius:8px;transition:background .2s,transform .2s}.tone-0{--tone:#cb8057;--wash:#fbf0e8;color:var(--tone)}.tone-1{--tone:#77966b;--wash:#eef4e9;color:var(--tone)}.tone-2{--tone:#7c8eb1;--wash:#eff1f8;color:var(--tone)}.tone-3{--tone:#b28aab;--wash:#f5edf4;color:var(--tone)}.word-part.active{background:var(--wash);transform:translateY(-3px)}.phonetic-row{display:flex;justify-content:center;gap:10px;align-items:center;color:#92988d;font-size:13px;margin-top:7px}.phonetic-row button{border:0;background:transparent;color:#92a087;font-size:16px;padding:4px}.meaning{display:flex;justify-content:center;gap:9px;margin:18px 0 25px;align-items:center}.meaning span{color:#a0a597;font-size:11px;font-style:italic}.meaning strong{font-weight:500;font-size:15px;letter-spacing:1px}.divider{height:1px;background:#eef0e8;position:relative;text-align:center;margin-bottom:24px}.divider span{position:relative;top:-9px;background:#fff;padding:0 12px;color:#a1a895;font-size:10px;letter-spacing:1px}.syllables{display:flex;justify-content:center;gap:9px}.syllable{border:1px solid color-mix(in srgb,var(--tone) 20%,white);background:var(--wash);border-radius:10px;min-width:64px;padding:9px 8px 8px;display:flex;flex-direction:column;align-items:center;gap:3px}.syllable b{font-size:18px;font-weight:500}.syllable small{font-size:10px;opacity:.8}.syllable.active{box-shadow:0 0 0 2px var(--tone);transform:translateY(-3px)}.tip{display:flex;justify-content:center;align-items:center;gap:7px;color:#979e8d;font-size:10px;margin:13px 0 21px}.tip span{color:#b2b999}.tip p{margin:0;line-height:1.7}.audio-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.audio-button{display:flex;justify-content:center;align-items:center;gap:10px;padding:13px 6px;border:1px solid #e1e7da;border-radius:12px;color:var(--green);background:#f6f8f1;font-size:12px;text-align:left}.audio-icon{font-size:22px}.audio-button small{display:block;font-size:9px;color:#9aa58c;margin-top:4px}.split-button{background:#335941;color:#fff;border-color:#335941}.split-button small{color:#bdcbb6}.audio-status{font-size:9px;text-align:center;color:#a1a797;min-height:15px;margin:13px 0 9px;line-height:1.6}.example{margin:21px 3px 23px;padding:0 0 0 13px;border-left:2px solid #dfe5d5}.example-heading{display:flex;align-items:center;gap:12px;font-size:11px;color:#7e8c70}.example-label{font-size:8px;letter-spacing:1.4px;color:#b1b7a7}#exampleEn{font-size:13px;line-height:1.8;color:#697563;margin:9px 0 4px}#exampleEn em{font-style:normal;color:#45623e;border-bottom:1px solid #a6b696;padding-bottom:2px}#exampleZh{font-size:10px;color:#a1a797;margin:0;line-height:1.8}.next-row{display:flex;gap:12px}.next{border:0;background:#dfe8cf;color:#3e5832;flex:1;border-radius:13px;font-size:13px;font-weight:500;height:51px;position:relative;letter-spacing:1px}.next span{position:absolute;right:20px;font-size:20px;top:12px}.previous{width:51px;border:1px solid #dfe5d6;background:transparent;color:#7f9071;border-radius:13px;font-size:20px}.previous:disabled{opacity:.35;cursor:default}.bottom-note{text-align:center;font-size:9px;color:#a0a891;letter-spacing:.6px;margin:19px 0 26px}.bottom-note span{color:#8d9c76;margin-right:6px}footer{border-top:1px solid #e6e9df;padding:15px 2px 0;display:flex;justify-content:space-between;align-items:center;font-size:8px;color:#b0b7a5;letter-spacing:1px}.footer-logo{font-size:11px;color:#929e85}@media(min-width:700px){body{background:radial-gradient(ellipse at 20% 20%,#eef1e4,transparent 45%),var(--paper)}.app{margin:28px auto 40px;padding:28px 28px 24px;border:1px solid #e2e6d8;border-radius:30px;background:#f7f8f2;box-shadow:0 20px 70px #35462b0a}}@media(max-width:360px){.app{padding:20px 16px}.word-card{padding-left:15px;padding-right:15px}.brand-en{display:none}.syllable{min-width:53px}.intro{padding-top:27px}h1{font-size:27px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.study-library-label{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#829073;font-size:11px;margin:0 3px 22px}.study-library-label select{max-width:78%;padding:10px 13px;border:1px solid #dfe6d5;background:#fff;border-radius:9px;color:#45623e;font:inherit}.empty-library{padding:24px;background:#edf2e5;border-radius:13px;font-size:13px;line-height:2;color:#738761}[hidden]{display:none!important}

#exampleEn[role=button]{cursor:pointer;border-radius:6px;padding:5px 7px;margin-left:-7px}#exampleEn[role=button]:hover,#exampleEn.sentence-playing{background:#e8efdf;color:#345b47}#exampleEn:focus-visible{outline:2px solid #849d6c;outline-offset:3px}

#meaning[role=button],#exampleZh[role=button]{cursor:pointer;border-radius:5px}#meaning[role=button]:hover,#exampleZh[role=button]:hover,#meaning.sentence-playing,#exampleZh.sentence-playing{background:#e8efdf;color:#345b47}#meaning:focus-visible,#exampleZh:focus-visible{outline:2px solid #849d6c;outline-offset:4px}

.sentence-number{font-size:9px;color:#98a587;letter-spacing:1px;margin-top:15px}.extra-example{border-top:1px solid #e4e9db;margin-top:15px;padding-top:1px}.sentence-en,.sentence-zh{display:block;text-align:left;width:100%;border:0;background:transparent;border-radius:5px;padding:6px 3px;line-height:1.8;cursor:pointer;overflow-wrap:anywhere}.sentence-en{font-size:13px;color:#697563}.sentence-zh{font-size:10px;color:#929e85}.sentence-en:hover,.sentence-zh:hover,.extra-example .sentence-playing{background:#e8efdf;color:#345b47}

.study-library-label{align-items:end;justify-content:flex-start;flex-wrap:wrap}.study-library-label label{display:grid;gap:6px;flex:1;min-width:120px}.study-library-label select{width:100%;max-width:100%;font-size:13px}

.member-short{display:none}.game-link{font-size:12px;color:#45623e;text-decoration:none}
.audio-status{visibility:hidden}.progress-summary{border:0;background:transparent;padding:0;color:inherit;text-align:left}.progress-summary:hover strong{color:var(--orange)}.progress-track{display:block;width:100%;padding:0;border:0;cursor:pointer;text-align:left}.progress-track:focus-visible{outline:3px solid #d99c64;outline-offset:5px}.progress-modal[hidden]{display:none}.progress-modal{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:24px}.progress-modal-backdrop{position:absolute;inset:0;background:rgba(38,59,50,.28);backdrop-filter:blur(3px)}.progress-dialog{position:relative;width:min(100%,360px);padding:30px 26px 24px;background:var(--paper);border:1px solid #e2e7d9;border-radius:24px;box-shadow:0 22px 65px rgba(38,59,50,.2);text-align:center}.progress-dialog-close{position:absolute;right:12px;top:10px;width:34px;height:34px;border:0;background:transparent;color:#84927e;font-size:26px;line-height:1}.progress-dialog-kicker{margin:0 0 9px;color:#8a957e;font-size:10px;letter-spacing:2px}.progress-dialog h2{margin:0;color:var(--ink);font-size:21px;font-weight:600}.progress-dialog h2 strong{color:var(--orange);font-size:30px}.progress-dialog-subtitle{margin:10px 0 25px;color:#929b86;font-size:11px}#progressSlider{width:100%;accent-color:#849d6c;cursor:pointer}.progress-slider-labels{display:flex;justify-content:space-between;margin-top:8px;color:#a0a595;font-size:10px}.progress-confirm{width:100%;margin-top:24px;height:46px;border:0;border-radius:12px;background:#335941;color:#fff;font-size:13px;letter-spacing:1px}.progress-confirm span{float:right;margin-right:14px;font-size:19px;line-height:15px}.progress-modal-open{overflow:hidden}
/* Compact learning card */
.quiz-toggle{border:0;background:transparent;color:var(--green);font-size:11px;padding:6px 0 6px 12px}.quiz-toggle[aria-pressed=true]{color:var(--orange)}.quiz-mode .meaning,.quiz-mode #exampleZh,.quiz-mode .syllables,.quiz-mode .tip{display:none}.quiz-options{display:grid;gap:10px;margin:0 0 18px}.quiz-option{display:flex;align-items:center;gap:12px;width:100%;padding:13px 14px;border:1px solid #e2e7da;border-radius:12px;background:#f9faf5;color:var(--ink);font-size:13px;text-align:left;line-height:1.6}.quiz-option>span:first-child{display:grid;place-items:center;flex-shrink:0;width:26px;height:26px;border-radius:8px;background:#edf1e6;color:#8a997b;font-size:11px}.quiz-option.quiz-correct{background:#e8f4e5;border-color:#7fa776;color:#3b7639}.quiz-option.quiz-wrong{background:#fcebea;border-color:#d89089;color:#ab4e49;animation:quiz-shake .35s}.quiz-option:disabled{cursor:default;opacity:1}.quiz-mode .phonetic-row{margin-bottom:1px}@keyframes quiz-shake{0%,100%{transform:translateX(0)}25%,75%{transform:translateX(-5px)}50%{transform:translateX(5px)}}
#progressBar{display:block}.library-dialog{padding-top:30px;max-height:80vh;display:flex;flex-direction:column}.library-tabs{display:flex;gap:8px;overflow-x:auto;padding:20px 0 12px;flex-shrink:0}.library-tab{flex-shrink:0;border:1px solid #e2e7d9;border-radius:20px;padding:8px 13px;background:transparent;color:#829073;font-size:12px}.library-tab.active{background:var(--green);border-color:var(--green);color:#fff}.library-options{overflow-y:auto;display:grid;gap:9px;text-align:left;padding:3px}.library-option{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;border:1px solid #e5e9df;border-radius:12px;background:#fff;padding:15px 13px;color:var(--ink);text-align:left;font-size:13px}.library-option small{flex-shrink:0;color:#929b86;font-size:10px}.library-option.active{background:#eef3e7;border-color:#a5b792}.level-tag::after{content:'';margin-left:0px}.progress-track{position:relative;overflow:visible}.progress-track::after{content:'';position:absolute;inset:-10px 0}.library-option:hover{border-color:#a5b792}
.intro{padding:18px 3px 16px}.intro h1{font-size:25px;line-height:1.35}.intro .plant{height:95px;margin-top:0;transform:scale(.75);transform-origin:center}.intro .eyebrow{margin-bottom:7px}.intro-copy{margin-top:8px}.progress-panel{margin-bottom:14px}.word-card .word-parts{margin-top:8px}.word-card .meaning{margin:12px 0 20px}.word-card .tip{margin:10px 0 12px}.word-card .example{margin:12px 0 16px;padding-left:10px}.word-card .example-heading{justify-content:space-between;gap:6px}.word-card .example-label{letter-spacing:0}.word-card .next-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.word-card .previous{width:auto;height:46px;font-size:13px}.word-card .next{height:46px;font-size:12px}.word-card .next span{right:12px;top:10px}.word-card .audio-status{margin:9px 0}.word-card .syllables{flex-wrap:wrap}.word-card #exampleEn,.word-card #exampleZh{overflow-wrap:anywhere}

#favoriteTotal{color:var(--orange)}.empty-library a{color:var(--green)}

.quiz-mode.quiz-translation-visible #exampleZh{display:block}

.library-dialog{height:438px;max-height:calc(100dvh - 48px)}.library-options{grid-auto-rows:56px;gap:9px;height:320px;flex:0 1 320px;min-height:0;align-content:start}.library-option{min-height:56px;padding:10px 13px}.library-option>span{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}

.library-options{height:322px;flex-basis:322px}

.study-page #exampleEn{position:relative;padding-right:25px}.study-page #exampleEn::after{content:"";position:absolute;right:0;top:.35em;width:16px;height:16px;opacity:.65;pointer-events:none;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' d='M11 5 6 9H3v6h3l5 4V5Zm4 3a6 6 0 0 1 0 8m3-11a10 10 0 0 1 0 14'/%3E%3C/svg%3E") center/contain no-repeat}

/* Paired study modes in the page sage-green palette. */
.study-mode-switch{display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid var(--border);border-radius:12px;background:#edf1e6;flex-shrink:0}.study-mode-switch .study-mode-option{min-height:28px;min-width:54px;padding:4px 9px;border:0;border-radius:7px;background:#f7f8f2;color:#71816a;font-size:10px;font-weight:600;line-height:1.2;white-space:nowrap;transition:background .18s,color .18s,box-shadow .18s}.study-mode-switch .study-mode-option[aria-pressed=true]{background:var(--green);color:#fff;box-shadow:0 2px 5px #263b3218}.study-mode-switch .study-mode-option:focus-visible{outline:2px solid var(--orange);outline-offset:1px}.progress-heading{gap:8px}@media(max-width:360px){.study-mode-switch{padding:3px;gap:3px}.study-mode-switch .study-mode-option{min-width:48px;padding-inline:7px}}

/* Quiz answer drawer */
.quiz-options{position:relative}.quiz-option{position:relative;z-index:1}.quiz-next-button{align-self:center;border:1px solid #dce5d5;border-radius:9px;background:#f2f6ed;color:var(--green);padding:9px 11px;font-size:11px;white-space:nowrap}.quiz-success-drawer{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:1px 6px;align-items:center;width:min(100%,250px);padding:8px 9px;border:1px solid #dfe8d8;border-radius:10px;background:#f4f7ef;color:#687866;font-size:10px;line-height:1.5;box-shadow:0 4px 12px #263b3210}.quiz-example-en{grid-column:1;border:0;background:transparent;color:var(--green);padding:0;text-align:left;font-size:11px;line-height:1.5;cursor:pointer}.quiz-example-zh{grid-column:1;color:#929b86;line-height:1.5}.quiz-example-speaker{grid-column:2;grid-row:1 / span 2;border:0;background:transparent;color:#829873;font-size:18px;padding:4px;cursor:pointer}.quiz-option.quiz-correct ~ .quiz-next-button,.quiz-option.quiz-correct ~ .quiz-success-drawer{margin-left:0}.drawer-below{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.drawer-below .quiz-success-drawer{order:3;flex-basis:100%;margin-top:0}.drawer-above{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.drawer-above .quiz-success-drawer{order:-1;flex-basis:100%;margin-bottom:0}.drawer-above .quiz-option{order:2}.drawer-above .quiz-next-button{order:3}.drawer-below .quiz-option{order:1}.drawer-below .quiz-next-button{order:2}
@media(max-width:360px){.quiz-success-drawer{width:100%}.quiz-next-button{padding-inline:8px}}


/* Keep the four-choice area fixed while the correct-answer drawer uses the empty slots. */
.quiz-options{position:relative;min-height:198px}.quiz-option.quiz-hidden-answer{visibility:hidden;pointer-events:none}.quiz-next-button{position:absolute;z-index:3}.quiz-success-drawer{position:absolute;z-index:2;width:min(250px,calc(100% - 8px));margin:0}.quiz-success-drawer.drawer-above,.quiz-success-drawer.drawer-below{display:grid;flex-wrap:nowrap;margin:0}


/* Refined quiz drawer sizing and current-word emphasis. */
.quiz-next-button{display:none!important}.quiz-success-drawer{width:min(300px,calc(100% - 8px));font-size:10px}.quiz-example-en{font-size:14.3px}.quiz-example-zh{font-size:12px}.quiz-example-speaker{font-size:14.4px}.quiz-example-en em{font-style:normal;border-bottom:1px dashed currentColor}


/* Tighter line spacing inside the quiz example drawer. */
.quiz-success-drawer .quiz-example-en,.quiz-success-drawer .quiz-example-zh{line-height:1.2}



.quiz-answer-label{color:#a0a99c;font-weight:400}.quiz-success-drawer .quiz-example-en{margin-left:10px}.study-game-links{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:16px}.study-game-links a{display:flex;align-items:center;justify-content:center;min-width:0;min-height:38px;padding:6px 3px;border:1px solid #e2e8dc;border-radius:8px;background:#f5f8f0;color:var(--green);text-align:center;text-decoration:none;font-size:12px;line-height:1.25;overflow-wrap:anywhere}.study-game-links a:hover{background:#e8f0e2;border-color:#a9bd9a}@media(max-width:360px){.study-game-links{gap:4px}.study-game-links a{font-size:9px;padding-inline:2px}}


/* Stack quiz drawer sentence and translation, with speaker fixed on the right. */
.quiz-success-drawer{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;cursor:pointer}.quiz-success-drawer .quiz-example-en{grid-column:1;grid-row:1;margin-left:0;text-align:left}.quiz-success-drawer .quiz-example-zh{grid-column:1;grid-row:2;margin:0;padding:0;text-align:left}.quiz-success-drawer .quiz-example-speaker{grid-column:2;grid-row:1 / span 2;z-index:1}


.study-order-toggle{flex-shrink:0;margin-right:0px;padding:5px 8px;border:1px solid #dfe6d5;border-radius:6px;background:#f1f5eb;color:#748666;font-size:10px;line-height:1.2}.study-order-toggle[aria-pressed=true]{background:#315b45;border-color:#315b45;color:#fff}.card-top #libraryPicker{margin-right:auto;min-width:0}

.quiz-success-drawer{left:8px}
.library-options{grid-auto-rows:84px}.library-option{min-height:84px;padding:5px;gap:10px}.library-option>.study-library-cover{position:relative;display:grid;place-items:center;flex:0 0 72px;width:72px;height:72px;overflow:hidden;border:1px solid #e2e8da;border-radius:8px;background:#f1f5eb;color:#94a384;font-size:28px;line-height:1}.study-library-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#f1f5eb}.library-option>.study-library-details{display:flex;flex:1;min-width:0;flex-direction:column;gap:7px;padding-right:5px}.study-library-name{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.4}.study-library-meta{display:flex;align-items:center;gap:6px;min-width:0;font-size:9px;line-height:1.4;color:#929b86}.study-library-description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.library-option small{font-size:9px;white-space:nowrap}

.library-tab{border-radius:10px}.library-option>.study-library-cover{flex-basis:calc(72px * 10 / 14);width:calc(72px * 10 / 14);height:72px;padding:0}.library-option>.study-library-details{align-self:stretch;justify-content:center;align-items:stretch;gap:5px;border:0;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}.study-library-name{-webkit-line-clamp:1}.study-library-description{display:block;font-size:9px;line-height:1.4;color:#929b86}.study-library-details small{display:block;line-height:1.4}.study-cover-dialog{position:fixed;inset:0;width:max-content;max-width:calc(100vw - 32px);max-height:calc(100dvh - 40px);margin:auto;padding:32px 14px 12px;border:1px solid #e2e7d9;border-radius:18px;background:var(--paper);color:var(--ink);box-shadow:0 20px 60px #263b3240;text-align:center}.study-cover-dialog::backdrop{background:#263b3270;backdrop-filter:blur(3px)}.study-cover-dialog>img{display:block;max-width:100%;max-height:calc(100dvh - 145px);width:auto;height:auto;object-fit:contain;border-radius:9px;margin:auto}.study-cover-dialog>p{margin:10px 0 0;font-size:12px}.study-cover-close{position:absolute;right:7px;top:2px;width:30px;height:30px;border:0;background:transparent;color:#829073;font-size:25px}

/* Only the part of speech is muted; meanings retain the answer color. */
.quiz-option .quiz-answer-label{color:inherit;font-weight:inherit;min-width:0}.quiz-answer-meaning{color:inherit}.quiz-answer-pos{margin-left:8px;color:#a0a99c;font-size:10px;font-weight:400;white-space:nowrap}

.quiz-success-drawer .quiz-context-memory{grid-column:1 / -1;grid-row:3;justify-self:end;display:inline-flex;align-items:center;gap:3px;margin-top:5px;color:#a0ac95;font-size:9px;font-weight:400;line-height:1.3;white-space:nowrap;pointer-events:none}.quiz-context-memory>span{font-size:12px;line-height:1}
.quiz-success-drawer .quiz-speaker-group{grid-column:2;grid-row:1 / span 2;display:flex;align-items:center;gap:3px}.quiz-success-drawer .quiz-context-memory{display:inline;margin:0;font-size:9px;color:#a0ac95;white-space:nowrap}.quiz-speaker-group .quiz-example-speaker{flex-shrink:0}
.quiz-success-drawer{padding-bottom:21px}.quiz-success-drawer .quiz-context-memory{position:absolute;right:5px;bottom:5px;display:block;margin:0;color:#a0ac95;font-size:9px;font-weight:400;line-height:1.3;white-space:nowrap;pointer-events:none}
.study-game-links{display:flex;gap:0;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;margin-top:18px;padding:3px 0 8px}.study-game-links::-webkit-scrollbar{display:none}.study-game-links a{flex:0 0 calc(100% / 4.5);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;min-height:88px;min-width:0;padding:0 3px;border:0;border-radius:0;background:transparent;color:#555c57;font-size:12px;line-height:1.4;white-space:nowrap;overflow-wrap:normal;scroll-snap-align:start}.study-game-links a:hover{background:transparent;border:0;color:var(--green)}.study-game-links a img{display:block;width:43.2px;height:43.2px;object-fit:contain;flex-shrink:0}.study-game-links a:focus-visible{outline-offset:-3px}@media(max-width:360px){.study-game-links{gap:0}.study-game-links a{font-size:10px;padding:0 2px}.study-game-links a img{width:36.8px;height:36.8px}}
.study-game-links a:first-child{justify-content:flex-start}.study-game-links a:first-child img,.study-game-links a:first-child span{align-self:center}body.quiz-mode .example{display:none!important}
body.quiz-mode #exampleEn,body.quiz-mode #exampleZh,body.quiz-mode #extraExamples{display:none!important}
.library-order-tools{display:flex;align-items:center;gap:4px;min-width:0}.inline-order{display:inline-flex;gap:2px;padding:0px;;border:1px solid var(--border);border-radius:4px;background:#edf1e6}.inline-order button{border:0;border-radius:3px;background:transparent;color:#778474;font-size:10px;padding:3px 7px}.inline-order button[aria-pressed=true]{background:var(--green);color:#fff}.example-heading{margin-bottom:7px}body.quiz-mode .example{display:block!important}
.study-game-links a:first-child{justify-content:flex-start}.study-game-links a:first-child img,.study-game-links a:first-child span{align-self:center}

/* Keep long library descriptions inside the portrait cover cards and viewport. */
#libraryModal .library-dialog{box-sizing:border-box;width:min(440px,calc(100vw - 32px));max-width:calc(100vw - 32px);min-width:0;overflow:hidden}
#libraryModal .library-tabs{min-width:0;max-width:100%}
#libraryModal .library-options{grid-template-columns:minmax(0,1fr);min-width:0;max-width:100%;overflow-x:hidden;overflow-y:auto}
#libraryModal .library-option{box-sizing:border-box;min-width:0;max-width:100%;overflow:hidden}
#libraryModal .study-library-details{width:0;min-width:0;overflow:hidden}
#libraryModal .study-library-name,#libraryModal .study-library-description{width:100%;max-width:100%;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}

#libraryModal .study-library-description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;white-space:normal;overflow-wrap:anywhere;line-height:1.4;max-height:2.8em;overflow:hidden;text-overflow:ellipsis;flex-shrink:0}

.quiz-answer-mask{display:none}.quiz-mode .quiz-meaning-wrap{position:relative;min-height:42px;margin:0 0 24px}.quiz-mode .quiz-meaning-wrap .meaning{display:flex;align-items:center;justify-content:center;min-height:42px;margin:0;padding:8px 12px;box-sizing:border-box;overflow-wrap:anywhere}.quiz-mode .quiz-meaning-wrap:not(.answer-revealed) .meaning{visibility:hidden}.quiz-mode .quiz-answer-mask{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:7px;width:100%;border:1px solid #e0e3e2;border-radius:7px;background:#eceeed;color:#929b96;font:inherit;font-size:12px;cursor:pointer}.quiz-mode .quiz-meaning-wrap.answer-revealed .quiz-answer-mask{display:none}.quiz-answer-mask svg{flex-shrink:0}.quiz-mode .quiz-answer-mask:hover{background:#e4e8e5}.quiz-answer-mask:focus-visible{outline:2px solid #849d6c;outline-offset:3px}

/* Custom image occupies the existing brand slot without stretching. */
.brand{min-width:0;overflow:hidden}.brand .site-logo{display:block;width:auto;height:36px;max-width:100%;object-fit:contain;object-position:left center}

/* Answer controls share the left half; feedback stays inside each option. */
.study-answer-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;min-width:0}
.word-card .study-answer-actions .previous{width:100%;background:#f1f5eb;border:1px solid #e1e7da;color:#7f9071;font-size:12px;padding:0 3px}
.study-reveal-answer[hidden]{display:none!important}
body:not(.quiz-mode) .study-answer-actions{grid-template-columns:1fr}
.quiz-option.quiz-correct,.quiz-option.quiz-wrong{padding-right:34px}
.quiz-option.quiz-correct::after,.quiz-option.quiz-wrong::after{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:21px;font-weight:700;line-height:1;pointer-events:none}
.quiz-option.quiz-correct::after{content:'✓';color:#389449}
.quiz-option.quiz-wrong::after{content:'×';color:#d54d4d}

.progress-library-group{display:flex;align-items:center;gap:8px;min-width:0;flex:1;flex-wrap:wrap}
.progress-library-group #libraryPicker{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1}
.progress-library-group .progress-summary{white-space:nowrap;flex-shrink:0}
@media(max-width:380px){.progress-library-group{gap:4px}.progress-library-group #libraryPicker{max-width:110px}}
