:root{color-scheme:light;--ink:#182345;--muted:#69748b;--blue:#223cd9;--yellow:#ffda50;--paper:#f5f7fc;--line:#e0e5ef;font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-size:16px;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;transition:background .16s,transform .16s}button:hover:not(:disabled){transform:translateY(-1px)}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #7185ff;outline-offset:3px}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.skip-link{position:absolute;left:20px;top:-80px;z-index:10;padding:12px;background:white;border:2px solid var(--blue)}.skip-link:focus{top:10px}.site-header{display:flex;align-items:center;justify-content:space-between;gap:2rem;padding:1.1rem max(2rem,calc((100vw - 1220px)/2));background:white;border-bottom:1px solid var(--line);min-height:91px}.brand{display:flex;align-items:center;gap:.8rem;flex-shrink:0}.brand-symbol{display:grid;place-items:center;width:43px;height:43px;border-radius:13px;font-size:2.45rem;font-weight:800;color:var(--yellow);background:var(--blue);line-height:1;padding-bottom:3px}.brand strong{display:block;font-size:1.7rem;letter-spacing:-1px;line-height:1.05}.brand-dot{color:var(--blue)}.brand small{display:block;font-size:.72rem;letter-spacing:.08em;margin-top:6px}.main-nav{display:flex;gap:.3rem}.nav-button{border:0;background:transparent;color:var(--muted);font-weight:600;padding:.85rem 1.15rem;border-radius:9px;font-size:.95rem}.nav-button.active{color:var(--blue);background:#edf0ff}.nav-button span{font-size:.7rem;border-radius:5px;background:#e8ecf5;padding:2px 5px;margin-left:3px}.header-note{font-size:.8rem;color:var(--muted);white-space:nowrap}.workspace{max-width:1220px;margin:auto;padding:2.7rem 2rem 1.4rem}.intro{display:flex;justify-content:space-between;align-items:center;gap:2rem;margin-bottom:1.9rem}.eyebrow{font-size:.7rem;letter-spacing:.14em;font-weight:750;color:var(--muted);margin:0 0 .65rem}.intro h1{font-size:clamp(1.75rem,3vw,2.5rem);font-weight:750;letter-spacing:-.04em;margin:0;line-height:1.35}.yellow-dot{color:#d89800}.intro-description{color:var(--muted);margin:.65rem 0 0;line-height:1.8;font-size:.9rem}.intro-chip{display:flex;flex-direction:column;align-items:center;gap:.35rem;transform:rotate(-6deg);background:var(--yellow);border-radius:20px 20px 20px 4px;padding:1rem 1.3rem;box-shadow:4px 4px 0 #eac542;flex-shrink:0}.intro-chip span{font-weight:800;font-size:1.4rem;letter-spacing:-.04em}.intro-chip small{font-size:.75rem}.progress-summary{display:grid;grid-template-columns:repeat(4,1fr);margin-bottom:2rem;border:1px solid var(--line);border-radius:13px;background:white;overflow:hidden}.stat{padding:1.05rem 1.4rem;border-right:1px solid var(--line);display:flex;gap:1rem;align-items:center}.stat:last-child{border:0}.stat strong{font-size:1.75rem;letter-spacing:-.05em;font-variant-numeric:tabular-nums}.stat span{font-size:.8rem;color:var(--muted);line-height:1.65}.stat.highlight strong{color:var(--blue)}.stat .text-button{padding:0;font-size:.8rem}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.section-heading h2{font-size:1.3rem;margin:0}.section-heading p{font-size:.85rem;margin:.35rem 0 0;color:var(--muted);line-height:1.6}.primary-button,.secondary-button,.text-button,.icon-button{border-radius:8px;font-size:.875rem;font-weight:600;line-height:1.4}.primary-button{background:var(--blue);color:white;border:1px solid var(--blue);padding:.8rem 1.2rem}.secondary-button{border:1px solid var(--line);background:white;color:var(--ink);padding:.75rem 1rem}.text-button{border:0;background:transparent;color:var(--blue);padding:.4rem}.icon-button{border:1px solid var(--line);background:white;color:var(--muted);width:35px;height:35px;display:grid;place-items:center;flex-shrink:0}.icon-button.saved{color:#826000;background:#fff5cb;border-color:#efd676}.icon-button svg{width:16px;height:16px}.button-row{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.topic-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem;margin-bottom:2rem}.topic-card{border:1px solid var(--line);background:white;padding:1.2rem;border-radius:12px;text-align:left;color:var(--ink);position:relative}.topic-card.selected{border-color:var(--blue);box-shadow:0 0 0 1px var(--blue)}.topic-card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:.8rem}.topic-icon{font-size:1.1rem;width:36px;height:36px;border-radius:10px;background:#edf0ff;display:grid;place-items:center}.topic-card:nth-child(3n+2) .topic-icon{background:#fff5d0}.topic-card:nth-child(3n) .topic-icon{background:#e8f4ee}.topic-card .word-count{font-size:.7rem;color:var(--muted)}.topic-card strong{display:block;font-size:.95rem;margin-bottom:.3rem}.topic-card small{display:block;font-size:.72rem;color:var(--muted);line-height:1.5}.topic-progress{height:3px;background:#edf0f6;margin-top:1rem;border-radius:4px;overflow:hidden}.topic-progress span{display:block;background:var(--blue);height:100%}.word-panel{border:1px solid var(--line);border-radius:15px;background:white;overflow:hidden}.panel-header{padding:1.5rem;display:flex;justify-content:space-between;gap:1rem;align-items:center;background:#fcfdff;border-bottom:1px solid var(--line)}.panel-header h2{font-size:1.3rem;margin:0}.panel-header p{color:var(--muted);font-size:.85rem;line-height:1.6;margin:.4rem 0 0}.panel-tools{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;padding:1rem 1.5rem;border-bottom:1px solid var(--line)}input,select{background:white;border:1px solid var(--line);color:var(--ink);border-radius:8px;padding:.7rem .85rem;font-size:.85rem;min-width:0}input[type=search]{flex:1;min-width:180px}.checkbox-label{display:flex;align-items:center;gap:.45rem;color:var(--muted);font-size:.8rem;white-space:nowrap}.checkbox-label input{accent-color:var(--blue)}.result-count{color:var(--muted);font-size:.75rem;margin-left:auto}.word-row{display:grid;grid-template-columns: minmax(140px,.85fr) minmax(150px,.9fr) minmax(200px,1.7fr) auto;gap:1.2rem;align-items:center;padding:1.15rem 1.5rem;border-bottom:1px solid #edf0f6}.word-row:last-child{border-bottom:0}.word-title{font-size:1.07rem;font-weight:650;margin:0 0 .25rem;overflow-wrap:anywhere}.word-meta{font-size:.7rem;color:var(--muted);line-height:1.5}.word-meaning{font-size:.88rem;line-height:1.7}.word-en{font-size:.75rem;color:var(--muted);line-height:1.6}.word-example{font-size:.84rem;line-height:1.7;margin:0}.word-example-cn{font-size:.75rem;color:var(--muted);line-height:1.7;margin:0}.word-actions{display:flex;gap:.4rem}.word-status{display:inline-block;color:var(--blue);font-size:.68rem;background:#edf0ff;border-radius:4px;padding:2px 5px;margin-top:4px}.word-status.due{color:#946314;background:#fff4da}.word-list{max-height:680px;overflow:auto}.empty-state{text-align:center;padding:3rem 1.5rem}.empty-state h3{font-size:1.3rem;margin:0 0 .65rem}.empty-state p{color:var(--muted);font-size:.875rem;line-height:1.8;margin:0 0 1.25rem}.notice{color:var(--muted);font-size:.8rem;line-height:1.8;margin:1rem 0}.study-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:2rem;align-items:start}.study-options{border:1px solid var(--line);border-radius:12px;background:white;padding:1.3rem}.study-options h2{font-size:1rem;margin:0 0 1.2rem}.study-options label{display:block;font-size:.8rem;color:var(--muted);margin:1rem 0 .4rem}.study-options select{width:100%}.study-options .primary-button{width:100%;margin-top:1.2rem}.tip{padding-top:1.1rem;border-top:1px solid var(--line);margin-top:1.3rem;font-size:.8rem;line-height:1.9;color:var(--muted)}.tip strong{color:var(--ink)}.session-top{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.9rem}.session-top h2{margin:0;font-size:1.25rem}.session-top p{margin:.3rem 0 0;font-size:.8rem;color:var(--muted)}.card-counter{color:var(--muted);font-size:.8rem;white-space:nowrap}.progress-track{height:4px;border-radius:5px;background:#e1e6f1;margin-bottom:1.2rem;overflow:hidden}.progress-track span{display:block;height:100%;background:var(--blue)}.flashcard{background:var(--blue);color:white;border-radius:17px;min-height:325px;padding:2.3rem;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:.9rem;position:relative;overflow:hidden}.flashcard:after{content:'h.';font-size:16rem;font-weight:800;position:absolute;right:-.5rem;bottom:-4rem;color:#ffffff04;pointer-events:none}.flashcard .eyebrow{color:#dce1ff;margin:0}.flashcard h3{font-size:clamp(1.9rem,4vw,2.7rem);font-weight:750;margin:0;line-height:1.3;overflow-wrap:anywhere;z-index:1}.flashcard .card-meta{font-size:.8rem;color:#dce1ff}.flashcard .card-answer{font-size:1.25rem;margin:0;line-height:1.6;z-index:1}.flashcard .card-en{font-size:.85rem;color:#dce1ff;margin:0}.flashcard .icon-button{color:white;background:#ffffff15;border-color:#ffffff55}.flashcard .icon-button.saved{color:var(--yellow);border-color:var(--yellow)}.flashcard .card-save{position:absolute;top:1.1rem;right:1.1rem}.flashcard .reveal-button{background:var(--yellow);color:var(--ink);border:0;border-radius:8px;padding:.8rem 1.4rem;font-weight:650;margin-top:.3rem}.example-box{padding:1.3rem 1.5rem;border:1px solid var(--line);border-radius:12px;background:white;margin-top:1rem}.example-box .example-line{display:flex;align-items:center;justify-content:space-between;gap:1rem}.example-box p{margin:0;line-height:1.8}.example-box .translation{font-size:.85rem;color:var(--muted);margin-top:.3rem}.example-box .card-note{font-size:.8rem;color:#735913;background:#fff8df;margin-top:.85rem;padding:.5rem .8rem;border-radius:6px}.rating-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:.7rem;margin-top:1.1rem}.rating-buttons button{border:1px solid var(--line);border-radius:9px;padding:.85rem .6rem;text-align:center;background:white;font-size:.875rem;font-weight:650;color:var(--ink)}.rating-buttons small{display:block;font-size:.7rem;color:var(--muted);font-weight:400;margin-top:.3rem}.rating-buttons button:nth-child(1){background:#fff1ec;border-color:#f2dcd2}.rating-buttons button:nth-child(2){background:#fff8df;border-color:#eee2b2}.rating-buttons button:nth-child(3){background:#eaf6ef;border-color:#c9e5d4}.keyboard-hint{text-align:center;color:var(--muted);font-size:.75rem;margin:1rem 0;line-height:1.8}.session-footer{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:1rem}.session-footer span{font-size:.75rem;color:var(--muted)}.results{padding:2rem;border:1px solid var(--line);border-radius:16px;background:white;text-align:center}.results .result-symbol{font-size:2rem;background:var(--yellow);display:grid;place-items:center;width:65px;height:65px;border-radius:20px;margin:0 auto 1rem}.results h3{font-size:1.6rem;margin:.5rem 0}.results p{color:var(--muted);line-height:1.8;font-size:.9rem}.results .button-row{justify-content:center;margin-top:1.5rem}.result-stats{display:flex;justify-content:center;gap:2rem;margin:1.5rem 0}.result-stats strong{display:block;font-size:2rem;color:var(--blue)}.result-stats span{color:var(--muted);font-size:.8rem}footer{margin-top:2.5rem;padding-top:1.2rem;border-top:1px solid var(--line);display:flex;gap:1rem;justify-content:space-between;font-size:.7rem;color:var(--muted);line-height:1.8}footer strong{color:var(--ink);margin-right:.6rem;font-size:1rem}.toast{position:fixed;bottom:1.5rem;left:50%;transform:translateX(-50%);background:var(--ink);color:white;font-size:.85rem;border-radius:9px;padding:.85rem 1.2rem;max-width:calc(100vw - 2rem);z-index:30;box-shadow:0 6px 24px #18234525;display:none;line-height:1.6}.toast.visible{display:block}dialog{width:min(540px,calc(100% - 2rem));border:1px solid var(--line);border-radius:16px;padding:1.7rem;color:var(--ink);box-shadow:0 20px 80px #18234535}dialog::backdrop{background:#18234565;backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:start;gap:1rem;margin-bottom:1.3rem}.dialog-heading h2{font-size:1.35rem;margin:0}.dialog-heading .icon-button{font-size:1.3rem}form label{display:flex;flex-direction:column;font-size:.8rem;font-weight:550;gap:.5rem;margin-bottom:1rem}.form-columns{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.dialog-actions{display:flex;justify-content:flex-end;gap:.6rem;margin-top:1.5rem}.muted{color:var(--muted)}.small{font-size:.8rem;line-height:1.8}
@media(max-width:1000px){.header-note{display:none}.workspace{padding:2rem 1.5rem}.site-header{padding:1rem 1.5rem}.topic-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.stat{padding:1rem;gap:.75rem}.word-row{grid-template-columns:minmax(130px,.85fr) minmax(130px,1fr) minmax(140px,1.5fr) auto;gap:.85rem}.study-layout{grid-template-columns:205px minmax(0,1fr);gap:1.3rem}}
@media(max-width:700px){.site-header{flex-wrap:wrap;gap:.8rem;padding:.9rem 1rem}.brand-symbol{width:35px;height:35px;font-size:2rem;border-radius:11px}.brand strong{font-size:1.5rem}.brand small{font-size:.7rem;margin-top:3px}.main-nav{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:.3rem}.nav-button{padding:.7rem .25rem;font-size:.85rem;white-space:nowrap}.workspace{padding:1.6rem 1rem 1rem}.intro{gap:1rem;margin-bottom:1.4rem;align-items:start}.intro .eyebrow{font-size:.6rem;letter-spacing:.08em}.intro h1{font-size:1.7rem;max-width:240px}.intro-description{font-size:.8rem;max-width:290px}.intro-chip{padding:.65rem .7rem;border-radius:12px 12px 12px 3px;margin-top:1.8rem}.intro-chip span{font-size:1rem}.intro-chip small{font-size:.65rem}.progress-summary{grid-template-columns:1fr 1fr;margin-bottom:1.6rem}.stat{padding:.8rem 1rem;gap:.85rem}.stat:nth-child(2){border-right:0}.stat:nth-child(-n+2){border-bottom:1px solid var(--line)}.stat strong{font-size:1.5rem}.stat span,.stat .text-button{font-size:.75rem}.section-heading{align-items:start}.section-heading h2{font-size:1.2rem}.section-heading p{font-size:.75rem}.section-heading .secondary-button{padding:.6rem .7rem;white-space:nowrap;font-size:.75rem}.topic-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}.topic-card{padding:.9rem}.topic-card strong{font-size:.9rem}.topic-card small{font-size:.7rem}.topic-card-top{margin-bottom:.6rem}.topic-icon{width:30px;height:30px}.topic-progress{margin-top:.8rem}.panel-header{padding:1.1rem;align-items:start}.panel-header h2{font-size:1.1rem}.panel-header .primary-button{padding:.65rem .7rem;white-space:nowrap;font-size:.8rem}.panel-header p{font-size:.75rem}.panel-tools{padding:.85rem 1rem;gap:.6rem}.panel-tools input[type=search]{flex-basis:100%}.panel-tools select{max-width:170px}.word-row{grid-template-columns:1fr auto;gap:.4rem .8rem;padding:1rem}.word-row>div:nth-child(2),.word-row>div:nth-child(3){grid-column:1;grid-row:auto}.word-actions{grid-column:2;grid-row:1;align-self:start}.word-example{font-size:.8rem;margin-top:.35rem}.word-list{max-height:650px}.word-title{font-size:1.1rem}.word-en{display:inline;margin-left:.5rem}.word-meaning{display:inline}.study-layout{display:flex;flex-direction:column;gap:1.2rem}.study-options{width:100%;padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:.7rem}.study-options h2{grid-column:1/-1;margin:0;font-size:.95rem}.study-options .option{min-width:0}.study-options label{margin:.15rem 0 .35rem;font-size:.7rem}.study-options select{font-size:.75rem;padding:.65rem}.study-options .primary-button{grid-column:1/-1;margin:0;padding:.7rem}.study-options .tip{display:none}.study-main{width:100%;min-width:0}.flashcard{min-height:290px;padding:2rem 1.2rem}.flashcard h3{font-size:2rem}.rating-buttons{gap:.4rem}.rating-buttons button{font-size:.8rem;padding:.8rem .25rem}.rating-buttons small{font-size:.65rem}.example-box{padding:1rem}.example-box p{font-size:.9rem}.session-top h2{font-size:1.1rem}.result-stats{gap:1.2rem}.results{padding:1.5rem 1rem}footer{flex-direction:column;gap:.25rem;font-size:.7rem}.form-columns{grid-template-columns:1fr;gap:0}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}button:hover:not(:disabled){transform:none}}

body[data-view="study"] .intro{display:none}body[data-view="study"] .workspace{padding-top:1.5rem}#word-panel-title{scroll-margin-top:1.25rem}
@media(max-width:700px){.intro h1{max-width:330px}.intro h1>span{display:block}}

.language-tag{display:inline-block;font-size:.6rem;font-weight:750;letter-spacing:.06em;border:1px solid currentColor;border-radius:3px;padding:0 .25rem;margin-right:.2rem;line-height:1.5;vertical-align:middle}.word-en{color:#4b5875;font-size:.8rem;margin-top:.15rem}.flashcard .card-en{color:white;font-size:1rem}
.meanings-only-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.4rem 1.5rem;padding:.85rem 1.5rem;align-items:start}.meanings-only-row .meaning-cn{font-size:.95rem;line-height:1.7;overflow-wrap:anywhere}.meanings-only-row .meaning-en{font-size:.85rem;line-height:1.9;color:#4b5875;overflow-wrap:anywhere}
@media(max-width:700px){.meanings-only-row{padding:.8rem 1rem;gap:.35rem 1rem}.meanings-only-row .meaning-cn{font-size:.9rem}.meanings-only-row .meaning-en{font-size:.8rem}}

/* Direct vocabulary cards: fixed reading order, actions before optional examples. */
.study-options{display:block;padding:1rem 1.2rem}.study-options summary{cursor:pointer;font-size:.9rem;font-weight:650;line-height:1.6}.study-options summary span{display:block;color:var(--muted);font-size:.7rem;font-weight:400;margin-top:.2rem}.study-options-content{margin-top:.9rem}.study-options .option{margin-bottom:.75rem}.study-options .tip{font-size:.75rem}.direct-card{min-height:220px;padding:2rem 1.3rem;gap:1rem}.card-word{display:flex;justify-content:center;align-items:center;gap:.7rem;max-width:100%;z-index:1}.card-word h3{min-width:0}.card-definitions{display:grid;gap:.4rem;z-index:1}.direct-card .card-answer{font-size:.9rem;line-height:1.6}.direct-card .card-en{font-size:.8rem;line-height:1.6;color:#eef0ff}.direct-card .card-meta{font-size:.7rem;margin:0;color:#dce1ff}.rating-buttons{margin-top:.8rem}.session-footer{margin-top:.4rem}.example-details{margin-top:.7rem;border:1px solid var(--line);border-radius:9px;background:white;overflow:hidden}.example-details summary{padding:.7rem 1rem;cursor:pointer;font-size:.8rem;color:var(--muted)}.example-details .example-box{border:0;border-top:1px solid var(--line);border-radius:0;margin:0}.keyboard-hint{margin:.65rem 0;font-size:.7rem}body[data-view="study"][data-session-active="true"] .progress-summary{display:none}body[data-view="study"] .workspace{padding-top:1.1rem}.study-main{scroll-margin-top:1rem}
@media(max-width:700px){.study-layout{gap:.8rem}.study-options{display:block;padding:.65rem 1rem}.study-options summary span{display:inline;margin-left:.75rem}.study-options-content{display:grid;grid-template-columns:1fr 1fr;gap:.65rem;margin-top:.7rem}.study-options .option{margin:0}.study-options .primary-button{grid-column:1/-1}.direct-card{min-height:200px;padding:1.6rem 1.1rem;gap:.85rem}.direct-card h3{font-size:1.9rem}.direct-card .card-answer{font-size:.85rem}.direct-card .card-en{font-size:.75rem}.session-top{margin-bottom:.65rem}.session-top h2{font-size:1.05rem}.session-top p{font-size:.7rem}.progress-track{margin-bottom:.7rem}.rating-buttons button{min-height:56px;font-size:.8rem;padding:.6rem .25rem}.rating-buttons small{font-size:.62rem}.session-footer .text-button{font-size:.75rem}.example-details summary{padding:.6rem .8rem}body[data-view="study"][data-session-active="true"] footer{margin-top:1rem}}

/* Roomier vocabulary card with the recall controls inside its lower edge. */
.direct-card{min-height:360px;padding:2.1rem 1.5rem 1.2rem;justify-content:flex-start;gap:1.15rem}.direct-card>.eyebrow{margin-top:.5rem}.direct-card .card-word{margin-top:auto}.direct-card .card-definitions{margin-bottom:auto}.direct-card .rating-buttons{width:100%;flex-shrink:0;gap:.6rem;margin-top:1.3rem;padding-top:1rem;border-top:1px solid #ffffff35;position:relative;z-index:1}.direct-card .rating-buttons button{color:var(--ink);font-size:.85rem;min-height:60px;border:0}.direct-card .rating-buttons small{color:#626d84}.direct-card .rating-buttons button:nth-child(1){background:#fff1ec}.direct-card .rating-buttons button:nth-child(2){background:#fff8df}.direct-card .rating-buttons button:nth-child(3){background:#eaf6ef}
@media(max-width:700px){.direct-card{height:clamp(310px,55svh,410px);min-height:310px;padding:1.4rem 1rem 1rem;gap:.85rem}.direct-card>.eyebrow{margin-top:.2rem}.direct-card h3{font-size:clamp(1.55rem,7vw,2rem)}.direct-card .rating-buttons{gap:.4rem;margin-top:1rem;padding-top:.85rem}.direct-card .rating-buttons button{min-height:57px;font-size:.78rem;padding:.65rem .2rem}.direct-card .rating-buttons small{font-size:.6rem}body[data-view="study"][data-session-active="true"] footer{display:none}body[data-view="study"][data-session-active="true"] .keyboard-hint{display:none}}
@media(max-width:700px) and (max-height:600px){.direct-card{height:clamp(270px,54svh,325px);min-height:270px;padding:1rem .8rem .8rem;gap:.6rem}.direct-card .rating-buttons{margin-top:.7rem;padding-top:.6rem}.direct-card .rating-buttons button{min-height:49px}.direct-card>.eyebrow{display:none}}

.account-panel{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1rem;border:1px solid var(--line);border-radius:14px;background:white;padding:1.2rem 1.5rem;margin-bottom:1.6rem}.account-copy{min-width:0;flex:1}.account-kicker{font-size:.65rem;letter-spacing:.14em;font-weight:750;color:var(--blue)}.account-copy h2{font-size:1.1rem;line-height:1.5;margin:.3rem 0;overflow-wrap:anywhere}.account-copy p{color:var(--muted);font-size:.8rem;line-height:1.75;margin:.3rem 0 0}.account-signin{white-space:nowrap}.account-actions{display:flex;align-items:center;gap:.6rem}.sync-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#b18b21;margin-right:.4rem}.sync-dot.ready{background:#31936a}.sync-dot.error,.sync-dot.auth{background:#c65442}.sync-detail{display:block;font-size:.72rem}.local-import{display:flex;align-items:center;gap:1rem;justify-content:space-between;flex-basis:100%;background:#fff8df;padding:.85rem 1rem;border-radius:9px}.local-import strong{font-size:.8rem}.local-import p{font-size:.73rem;color:var(--muted);line-height:1.7;margin:.3rem 0 0}.local-import button{white-space:nowrap;font-size:.75rem}body[data-view="study"][data-session-active="true"] .account-panel{display:none}
@media(max-width:700px){.account-panel{padding:1rem;gap:.8rem;margin-bottom:1.2rem}.account-copy{flex-basis:100%}.account-copy h2{font-size:1rem}.account-signin{width:100%;text-align:center}.local-import{align-items:flex-start;flex-direction:column}.local-import button{width:100%}.account-actions{width:100%}}
/* User-selected card dimensions; compact vertical spacing only on short screens. */
.direct-card{height:600px;min-height:0;padding:120px 24px 16px;gap:0;scroll-margin-top:16px}
.direct-card>.eyebrow{position:absolute;top:28px;margin:0;display:block}
.direct-card .card-word{margin:0;flex-shrink:0}
.direct-card h3{font-size:32px}
.direct-card .card-definitions{margin:220px 0 0;flex-shrink:0}
.direct-card .card-answer{font-size:17px}
.direct-card .card-en{font-size:15px}
.direct-card .rating-buttons{margin-top:auto}
@media(max-width:700px){.direct-card{height:min(600px,calc(100svh - 32px));padding:120px 16px 16px}.direct-card .card-definitions{margin-top:clamp(100px,calc(100svh - 400px),220px)}}

/* Reveal individual entries directly in the reverse-recall list. */
button.meanings-only-row{width:100%;border:0;border-bottom:1px solid #edf0f6;border-radius:0;background:white;color:var(--ink);text-align:left;min-height:48px}
button.meanings-only-row:hover:not(:disabled){background:#f5f7ff;transform:none}
button.meanings-only-row:focus-visible{position:relative;outline-offset:-3px;z-index:1}

.revealed-word-row{cursor:pointer}
.word-reveal-button{display:inline;border:0;border-radius:3px;background:transparent;padding:0;font:inherit;line-height:inherit;color:inherit;text-align:left;overflow-wrap:anywhere}
.word-reveal-button:hover:not(:disabled){transform:none;color:var(--blue)}

/* A shared, explicit mastery label; time passing never changes its appearance. */
.mastery-control{margin-top:.4rem;cursor:default;max-width:100%}
.mastery-badge{display:inline-flex;align-items:center;gap:.4rem;padding:.3rem .55rem;min-height:30px;border:1px solid transparent;border-radius:6px;font-size:.72rem;line-height:1.4;font-weight:600;white-space:nowrap}
.mastery-new{background:#f0f2f7;color:#626d84}
.mastery-again{background:#fff1ec;color:#a43e27}
.mastery-fuzzy{background:#fff7da;color:#826011}
.mastery-known{background:#e8f5ed;color:#226844}
.inline-rating-buttons{display:flex;gap:.35rem;flex-wrap:wrap;margin-top:.45rem;max-width:270px}
.inline-rating-buttons button{border:1px solid transparent;border-radius:6px;padding:.45rem .5rem;min-height:36px;font-size:.72rem;white-space:nowrap}
.inline-rating-buttons button[aria-pressed="true"]{border-color:currentColor;font-weight:750}
.quick-mastery-filters{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;padding:.8rem 1.5rem;border-bottom:1px solid var(--line);background:#fafbff}
.quick-mastery-filters button{border:1px solid var(--line);background:white;border-radius:18px;padding:.45rem .8rem;font-size:.75rem;color:var(--muted);min-height:34px}
.quick-mastery-filters button span{font-size:.65rem;margin-left:.35rem;opacity:.85}
.quick-mastery-filters button[aria-pressed="true"]{background:#edf0ff;border-color:#b8c3ff;color:var(--blue);font-weight:650}
.masked-word-row{grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:.65rem 1.5rem;gap:1rem}
.masked-word-content{width:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.5rem;border:0;background:transparent;text-align:left;padding:.4rem 0;color:var(--ink);min-height:44px;border-radius:5px}
.masked-word-content:hover:not(:disabled){transform:none;background:#f6f8ff}
.masked-word-content .meaning-es{grid-column:1/-1;font-size:1rem;font-weight:650;line-height:1.7;overflow-wrap:anywhere}
.topic-guide{border-bottom:1px solid var(--line);background:#fafbff;padding:0 1.5rem}
.topic-guide summary{padding:.9rem 0;font-size:.85rem;font-weight:650;color:var(--blue);cursor:pointer}
.topic-guide-content{font-size:.82rem;line-height:1.85;padding:0 0 1rem;max-width:900px}
.topic-guide-content p{margin:.6rem 0}
.pattern-examples{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem}
.pattern-examples p{padding:.75rem;border:1px solid var(--line);border-radius:8px;background:white}
.pattern-examples span{display:block}
.pattern-examples span[lang="es"]{font-weight:650;color:var(--ink)}
.pattern-examples span+span{font-size:.75rem;color:var(--muted);margin-top:.3rem}
.guide-sources{font-size:.72rem;color:var(--muted)}
.guide-sources a{color:var(--blue);text-decoration:underline}
.word-usage{font-size:.78rem;line-height:1.75;margin:.5rem 0 0;padding:.5rem .65rem;border-left:2px solid #bbc6ff;background:#f6f8ff;color:#4b5875}
@media(max-width:700px){.topic-guide{padding:0 1rem}.pattern-examples{grid-template-columns:1fr;gap:0}.topic-guide-content{font-size:.8rem}}
.masked-word-mastery{min-width:0;max-width:250px;justify-self:end}
.masked-word-mastery .mastery-control{margin:0}
.masked-word-mastery .inline-rating-buttons{justify-content:flex-end}
.direct-card .rating-buttons button[aria-pressed="true"]{outline:2px solid white;outline-offset:3px}
.direct-card>.eyebrow{font-size:.72rem;letter-spacing:.06em}
.direct-card .recall-gap{flex:0 1 220px;min-height:12px;width:1px}
.direct-card .card-definitions{margin-top:0}
.direct-card .long-prompt{position:relative;display:block;width:100%}
.direct-card .long-prompt>.icon-button{position:absolute;top:-50px;right:0}
.session-footer{flex-wrap:wrap;gap:.4rem}
.session-footer .text-button{min-height:40px}
.main-nav .nav-button{white-space:nowrap}
@media(max-width:700px){
 .quick-mastery-filters{padding:.7rem 1rem;gap:.4rem}
 .quick-mastery-filters button{padding:.4rem .65rem}
 .masked-word-row{padding:.65rem 1rem;gap:.6rem;grid-template-columns:minmax(0,1fr) auto}
 .masked-word-content{grid-template-columns:1fr;gap:.1rem}
 .masked-word-mastery{max-width:150px;align-self:center}
 .masked-word-mastery .inline-rating-buttons{max-width:140px}
 .mastery-badge{min-height:36px}
 .inline-rating-buttons button{min-height:40px}
 .direct-card .rating-buttons button{font-size:.85rem}
 .direct-card .card-word{max-width:100%}
 .direct-card h3{font-size:32px}
 .direct-card .card-definitions{max-width:100%}
 .direct-card .recall-gap{flex-basis:clamp(100px,calc(100svh - 400px),220px)}
 .direct-card .card-answer,.direct-card .card-en{overflow-wrap:anywhere}
}
@media(max-width:700px) and (max-height:600px){
 .direct-card{padding-top:clamp(40px,calc(100svh - 400px),80px)}
 .direct-card .recall-gap{flex-basis:clamp(20px,calc(100svh - 430px),130px)}
 .direct-card>.eyebrow{top:18px}
 .direct-card .rating-buttons{padding-top:.6rem}
}

/* Resume shortcut: one tap from the top of the library to the word list. */
.resume-bar{display:flex;gap:.6rem;align-items:stretch;margin-bottom:1.2rem}
.resume-main{flex:1;min-width:0;display:flex;align-items:center;gap:.85rem;text-align:left;border:1px solid var(--blue);background:var(--blue);color:white;border-radius:14px;padding:.8rem 1rem;min-height:64px}
.resume-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:#ffffff22;font-size:1.2rem;flex-shrink:0}
.resume-copy{display:grid;gap:.1rem;min-width:0;flex:1}
.resume-copy small{font-size:.68rem;letter-spacing:.08em;color:#dce1ff}
.resume-copy strong{font-size:1.05rem;line-height:1.35;overflow-wrap:anywhere}
.resume-meta{font-size:.72rem;color:#dce1ff}
.resume-arrow{font-size:1.2rem;flex-shrink:0}
.resume-weak{display:grid;place-items:center;align-content:center;gap:.1rem;border:1px solid #eee2b2;background:#fff8df;color:var(--ink);border-radius:14px;padding:.6rem .9rem;min-width:76px}
.resume-weak strong{font-size:1.25rem;line-height:1.2;font-variant-numeric:tabular-nums}
.resume-weak span{font-size:.7rem;color:#735913;white-space:nowrap}
/* Example sentence with its own read-aloud button in the word list. */
.word-example-line{display:flex;align-items:flex-start;justify-content:space-between;gap:.6rem}
.word-example-line .word-example{min-width:0}
.word-example-line .icon-button{width:30px;height:30px}
.word-example-line .icon-button svg{width:14px;height:14px}
@media(max-width:700px){
 .resume-bar{margin-bottom:1rem}
 .word-example-line{margin-top:.35rem}
 .word-example-line .word-example{margin-top:0}
}
@media(min-width:701px){.resume-bar{max-width:460px}}

.progress-file-tools{display:flex;align-items:center;gap:1rem;flex-basis:100%;padding-top:.7rem;border-top:1px solid var(--line)}.progress-file-tools .text-button{font-size:.75rem}.progress-file-label{position:relative;overflow:hidden;cursor:pointer}.progress-file-label input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.progress-file-label:focus-within{outline:3px solid #7185ff;outline-offset:3px}.auth-dialog{max-height:calc(100dvh - 2rem);overflow:auto}.auth-dialog .dialog-heading .icon-button{width:44px;height:44px}.auth-modes{display:flex;gap:.4rem;margin-bottom:1rem}.auth-modes button{flex:1}.auth-modes .active{color:var(--blue);background:#edf0ff;border-color:var(--blue)}.auth-dialog form{display:grid;gap:.9rem}.auth-dialog label{display:grid;gap:.4rem;font-size:.85rem}.auth-dialog input{width:100%;min-height:44px;font-size:16px}.auth-dialog .primary-button{min-height:46px}.auth-message{font-size:.85rem;line-height:1.7;margin:.7rem 0;min-height:1.4em}.auth-message.error{color:#a3332c}.auth-google{width:100%;margin-top:.9rem;min-height:46px}.auth-caption{font-size:.75rem;color:var(--muted);line-height:1.7;margin:.8rem 0 0}.auth-footer{display:flex;justify-content:center;margin-top:.8rem}
.auth-sent{display:grid;gap:.8rem;justify-items:center;text-align:center;padding:.4rem 0 .2rem}.auth-sent-icon{display:grid;place-items:center;width:60px;height:60px;border-radius:18px;background:var(--yellow);font-size:1.7rem}.auth-sent p{margin:0;line-height:1.7}.auth-sent strong{overflow-wrap:anywhere}.auth-sent .auth-caption{margin:0}.auth-sent .primary-button{width:100%;margin-top:.4rem}
