:root{color-scheme:light;--blue:#245ae8;--ink:#172740;--muted:#67758b;--line:#e3e9f2;--bg:#f3f6fb;--green:#15805a;--red:#b8463b;font-family:Inter,system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;font-size:100%;color:var(--ink);background:var(--bg)}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;transition:background .16s,box-shadow .16s,transform .16s}button:disabled{cursor:default;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #f2b641;outline-offset:4px}button{border:0}button:active:not(:disabled){transform:translateY(1px)}.app-header{min-height:104px;height:auto;flex-wrap:wrap;max-width:1050px;margin:auto;padding:25px 30px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{text-decoration:none;color:var(--ink);display:flex;align-items:center;gap:12px;font-weight:800;font-size:1.5625rem}.brand-symbol{display:grid;place-items:center;width:2.8125rem;height:2.8125rem;border-radius:14px;color:white;background:var(--blue);font-size:1.6875rem}.brand small{display:block;font-weight:500;font-size:0.75rem;letter-spacing:.1em;color:var(--muted);margin-top:2px}nav{display:flex;gap:6px;flex-wrap:wrap}.nav-item{background:transparent;color:var(--muted);padding:12px 18px;border-radius:11px;font-size:0.9375rem;font-weight:650}.nav-item.active{background:#e5edff;color:var(--blue)}main{max-width:960px;padding:12px 30px 35px;margin:auto}.page-heading{display:flex;align-items:center;justify-content:space-between;margin:6px 0 26px;gap:15px}.eyebrow{display:block;font-size:0.875rem;color:var(--muted);margin-bottom:8px}h1{font-size:1.8125rem;letter-spacing:-.03em;margin:0;font-weight:750}h2{font-size:1.3125rem;margin:0 0 12px;line-height:1.5}p{line-height:1.75}.muted{color:var(--muted)}.small{font-size:0.875rem}.text-button{color:var(--muted);background:transparent;padding:8px 0;font-size:0.875rem}.text-button:hover{color:var(--blue)}.stats-strip{display:grid;grid-template-columns:1fr 1fr 1fr;gap:1px;border:1px solid var(--line);border-radius:17px;overflow:hidden;background:var(--line);margin-bottom:26px}.stat-button{background:white;display:flex;flex-wrap:wrap;align-items:center;gap:13px;padding:18px 25px;text-align:left;color:var(--muted);font-size:0.875rem}.stat-button strong{font-size:1.625rem;color:var(--ink);font-weight:750;line-height:1}.stat-hint{font-size:0.75rem;margin-left:auto;color:var(--blue)}.stat-button:hover{background:#f9fbff}.learning-workspace{max-width:740px;margin:auto}.mode-tabs{display:grid;grid-template-columns:1fr 1.45fr 1fr;padding:5px;background:#e6ecf6;border-radius:13px;margin-bottom:16px;gap:5px}.mode-tabs button{border-radius:9px;background:transparent;color:var(--muted);padding:13px 10px;font-size:1rem;font-weight:650}.mode-tabs button.active{background:white;color:var(--blue);box-shadow:0 2px 6px #1a36620c}.learning-panel{background:white;border:1px solid var(--line);border-radius:23px;box-shadow:0 18px 60px #1f41640a;padding:22px 34px 18px;overflow:hidden}.session-top{display:flex;justify-content:space-between;align-items:center;gap:12px}.session-label{font-size:0.875rem;font-weight:650;color:var(--muted)}.progress-track{height:4px;border-radius:10px;background:#edf1f7;margin:14px 0 0;overflow:hidden}.progress-track>div{height:100%;background:var(--blue);transition:width .25s}.learning-card{min-height:270px;padding:25px 0 20px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center}.card-prompt{font-size:0.875rem;color:var(--muted);margin:0 0 15px}.word{width:100%;max-width:100%;min-width:0;font-size:clamp(32px,5.5vw,49px);font-weight:750;line-height:1.25;letter-spacing:-.02em;overflow-wrap:anywhere;margin:10px 0 20px}.meaning{font-size:1.375rem;line-height:1.7;overflow-wrap:anywhere;margin:10px 0 18px;max-width:100%}.answer-meaning{font-size:1.3125rem;line-height:1.65;margin:8px 0 12px}.sound-button{width:52px;height:52px;padding:0;border-radius:50%;display:grid;place-items:center;background:#edf3ff;color:var(--blue);margin:2px auto 16px;flex-shrink:0}.sound-button svg{width:24px;height:24px}.sound-button:hover{background:#e0eaff}.sound-button.speaking{box-shadow:0 0 0 5px #245ae814}.example{max-width:580px;margin:14px 0 0;text-align:left;padding:16px 19px;background:#f7f9fd;border-radius:12px;color:#455572;line-height:1.65;width:100%}.example small{display:block;font-size:0.875rem;color:var(--muted);margin-top:5px}.word-note{font-size:0.875rem;color:#946716;background:#fff7e1;border-radius:9px;padding:8px 12px;margin:8px 0}.action-row{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;margin-top:18px}.action-row:empty{display:none}.action-row button{min-width:140px}.primary,.secondary,.soft-danger{border-radius:12px;padding:13px 22px;font-size:1rem;font-weight:650;line-height:1.4}.primary{background:var(--blue);color:white}.primary:hover{background:#1749cc}.secondary{background:#edf2fb;color:#425573}.secondary:hover{background:#e2eafb}.soft-danger{color:var(--red);background:#fff0ed}.wide{width:100%}.session-bottom{border-top:1px solid var(--line);padding-top:17px;margin-top:22px;font-size:0.875rem;color:var(--muted);display:flex;justify-content:space-between;gap:12px}.study-bottom{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;color:var(--muted);font-size:0.875rem;padding:12px 3px}.study-bottom label{display:flex;align-items:center;gap:7px}.study-bottom select{padding:5px 8px;font-size:0.875rem;border-radius:8px;background:transparent}.choice-list{width:100%;max-width:600px;display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}.choice-button{border:1px solid var(--line);border-radius:12px;background:white;text-align:left;display:flex;align-items:flex-start;gap:11px;padding:16px;color:var(--ink);font-size:1rem;line-height:1.65;min-height:75px}.choice-button .letter{display:grid;place-items:center;min-width:26px;height:26px;border-radius:7px;font-size:0.8125rem;background:#f0f3f9;color:var(--muted);margin-top:2px}.choice-button:hover:not(:disabled){border-color:#98b5ff;background:#f6f9ff}.choice-button.correct{border-color:#40a77e;background:#f0faf5;opacity:1}.choice-button.incorrect{border-color:#d98a80;background:#fff5f3;opacity:1}.choice-button:disabled{opacity:.75}.spell-input{width:min(100%,470px);font-size:1.5rem;text-align:center;border:2px solid #dce5f4;border-radius:13px;padding:17px;letter-spacing:.02em;margin:5px 0 8px}.spell-input:focus{border-color:var(--blue)}.feedback{border-radius:13px;background:#edf8f3;color:#236146;padding:17px 20px;font-size:1rem;line-height:1.65;text-align:left}.feedback.wrong{background:#fff3ef;color:#914737}.feedback-title{font-weight:750}.typed-line{font-size:1.0625rem;margin:6px 0;color:var(--ink);overflow-wrap:anywhere}.typed-line>span:first-child{display:inline-block;color:var(--muted);width:85px;font-size:0.875rem}.typed-line .answer-letter{display:inline;width:auto;font-size:1.0625rem}.answer-letter{font-weight:750;letter-spacing:.04em}.answer-letter.mismatch{color:var(--red);background:#ffe4dc;border-radius:3px;padding:1px 2px}.feedback .small{margin-top:6px}.summary-number{font-size:3.75rem;color:var(--blue);font-weight:800;line-height:1.1;margin:10px 0}.summary-title{font-size:1.5625rem;margin:14px 0 8px}.summary-grid{display:flex;gap:35px;margin:22px 0 5px;color:var(--muted);font-size:0.875rem}.summary-grid strong{display:block;font-size:1.5625rem;color:var(--ink);margin-bottom:5px}.surface{background:white;border:1px solid var(--line);border-radius:18px;padding:27px}.library-tools{display:flex;justify-content:space-between;gap:18px;flex-wrap:wrap}.filter-tabs{display:flex;background:#e6ecf6;padding:4px;border-radius:11px;gap:4px}.filter-tabs button{padding:10px 18px;background:transparent;color:var(--muted);font-size:0.9375rem;border-radius:8px}.filter-tabs button.active{background:white;color:var(--blue);font-weight:650}.search-field{flex:1;max-width:330px;min-width:200px}.search-field input{width:100%;border:1px solid #d9e1ed;background:white;border-radius:11px;padding:12px 15px;font-size:1rem}.library-summary{font-size:0.875rem;color:var(--muted);margin:19px 0 13px}.word-list{display:grid;gap:10px}.word-row{display:flex;justify-content:space-between;align-items:center;gap:20px;background:white;border:1px solid var(--line);padding:20px 23px;border-radius:14px}.word-row strong{font-size:1.25rem}.word-row p{margin:5px 0;font-size:1rem;color:#455572}.word-row small{font-size:0.8125rem;color:var(--muted)}.word-row .sound-button{width:42px;height:42px;margin:0}.word-actions{display:flex;gap:14px;align-items:center}.status-tag{display:inline-flex;font-size:0.75rem;padding:4px 8px;border-radius:6px;background:#eef2f8;color:#52657f;margin-left:10px;vertical-align:middle}.status-tag.mastered{background:#e9f7f0;color:var(--green)}.status-tag.due{background:#fff5df;color:#916621}.empty-state{text-align:center;padding:55px 25px;background:white;border:1px dashed #d4dfef;border-radius:16px;color:var(--muted)}.empty-state h2{color:var(--ink)}.manage-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:22px}label{display:block;font-size:0.875rem;font-weight:650;margin:12px 0 7px}input,textarea,select{border:1px solid #ccd7e6;background:white;color:var(--ink);border-radius:9px;padding:11px;max-width:100%}textarea{width:100%;line-height:1.7;resize:vertical;font-size:1rem}hr{border:0;border-top:1px solid var(--line);margin:25px 0}.preview-box{background:#f6f9fe;padding:17px;border-radius:12px;margin-top:20px}.preview-box p{margin:4px 0;font-size:0.875rem}.preview-items{max-height:210px;overflow:auto;margin:12px 0;font-size:0.875rem}.preview-items div{padding:8px 0;border-bottom:1px solid var(--line);line-height:1.6}.alert{border-radius:11px;padding:15px 19px;margin-bottom:18px;line-height:1.7;font-size:0.9375rem}.danger-alert{background:#fff0ed;color:#9b3c30;border:1px solid #efc4bc}.error{color:var(--red);font-size:0.875rem}.backup-panel input[type=file]{font-size:0.875rem;width:100%}footer{display:flex;justify-content:center;align-items:center;gap:10px;padding:10px 20px 28px;font-size:0.8125rem;color:var(--muted)}.toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);padding:13px 22px;border-radius:12px;background:#203450;color:white;z-index:20;max-width:calc(100% - 32px);font-size:0.875rem;box-shadow:0 7px 30px #2034502a}dialog{border:0;border-radius:20px;padding:28px;max-width:540px;width:calc(100% - 32px);max-height:90vh;overflow:auto;color:var(--ink);box-shadow:0 25px 90px #17274035}dialog::backdrop{background:#14264180}.dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.icon-button{font-size:1.625rem;background:#f0f3f8;border-radius:50%;width:36px;height:36px;padding:0;display:grid;place-items:center;color:var(--muted);flex-shrink:0}.help-steps p{display:flex;gap:20px;margin:18px 0;font-size:0.9375rem}.help-steps strong{color:var(--blue);min-width:34px}.help-steps span{color:#52627a}.explain-box{padding:16px;background:#edf3ff;border-radius:12px;line-height:1.7;font-size:0.9375rem}dialog input{width:100%}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.footer-divider{opacity:.5}[hidden]{display:none!important}@media(max-width:650px){.app-header{height:auto;padding:20px 18px 15px;align-items:center}.brand{gap:8px;font-size:1.375rem}.brand-symbol{width:2.375rem;height:2.375rem;border-radius:11px;font-size:1.5rem}.brand small{font-size:0.75rem;letter-spacing:0}nav{gap:2px}.nav-item{font-size:0.875rem;padding:10px 11px}main{padding:8px 16px 25px}.page-heading{margin:12px 0 21px}.page-heading h1{font-size:1.5625rem}.eyebrow{font-size:0.8125rem}.page-heading>.text-button{font-size:0.8125rem;max-width:90px}.stats-strip{margin-bottom:20px;border-radius:14px}.stat-button{padding:16px 12px;display:grid;grid-template-columns:1fr;gap:9px;font-size:0.8125rem}.stat-button strong{font-size:1.625rem}.stat-hint{font-size:0.75rem;margin-left:0}.mode-tabs button{font-size:0.9375rem;padding:12px 7px}.learning-panel{padding:18px 20px 16px;border-radius:18px}.learning-card{min-height:250px;padding-top:20px}.word{width:100%;max-width:100%;min-width:0;font-size:2.4375rem}.meaning{font-size:1.25rem}.choice-list{grid-template-columns:1fr;gap:9px}.choice-button{min-height:0;padding:13px;font-size:0.9375rem}.action-row button{min-width:120px;padding:13px 17px}.session-bottom{font-size:0.8125rem}.study-bottom{font-size:0.8125rem}.study-bottom .text-button{font-size:0.8125rem}.word-row{padding:17px;gap:12px}.word-actions{gap:8px}.word-row small{display:block;line-height:1.8}.status-tag{margin-left:7px}.manage-grid{grid-template-columns:1fr}.surface{padding:22px}.search-field{max-width:none;min-width:100%}.filter-tabs{width:100%}.filter-tabs button{flex:1}.feedback{padding:15px}.spell-input{font-size:1.375rem}.summary-grid{gap:25px}footer{font-size:0.75rem}.summary-number{font-size:3.125rem}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Refined reading hierarchy and compact mobile workspace. */
:root{--ink:#142742;--muted:#61718a;--line:#e0e7f1;--bg:#f4f7fc}
.app-header{min-height:92px;max-width:1000px;padding:20px 30px;border-bottom:1px solid #e3e9f3}
.brand{font-size:1.5rem;letter-spacing:-.03em}.brand-symbol{border-radius:12px;box-shadow:0 4px 12px #245ae81c;line-height:1}.brand small{letter-spacing:.04em}
nav{gap:4px}.nav-item{border-radius:9px;padding:11px 17px}.nav-item.active{background:#e9efff;color:#1d50d2}
main{max-width:960px;padding-top:28px}.page-heading{margin:0 0 24px}.page-heading h1{font-size:1.75rem;letter-spacing:-.035em;line-height:1.4}.page-heading>.text-button{background:white;border:1px solid var(--line);border-radius:9px;padding:9px 13px;font-size:.875rem;white-space:nowrap;max-width:none}
.stats-strip{border-radius:14px;margin-bottom:24px;box-shadow:0 3px 12px #23395903}.stat-button{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:9px 12px;padding:18px 24px;min-width:0;position:relative}.stat-button>span:first-child{grid-column:1/-1}.stat-button strong{grid-row:2;font-size:2rem;font-variant-numeric:tabular-nums;letter-spacing:-.04em;line-height:1.15}.stat-hint{grid-row:2;align-self:end;margin:0;font-size:.8125rem;line-height:1.7}.review-stat.has-due{background:#f0f5ff}.review-stat.has-due strong{color:var(--blue)}
.learning-workspace{max-width:740px}.mode-tabs{border:1px solid #dce4f1;background:#e9eef7;padding:4px;border-radius:12px;margin-bottom:16px}.mode-tabs button{border-radius:8px;padding:12px 10px;font-weight:600}.mode-tabs button.active{box-shadow:0 2px 7px #1d3c650d;color:#1c50d4}
.learning-panel{border-radius:19px;padding:22px 32px 18px;box-shadow:0 12px 40px #1a3b6607}.session-label{color:#526782;font-weight:600}.session-top .text-button{padding:6px 10px;border-radius:7px;color:#61718a;background:#f6f8fc}.session-top .text-button:hover{color:var(--blue);background:#edf3ff}.progress-track{margin-top:16px;background:#eef2f8;height:3px}.learning-card{min-height:245px;padding:22px 0 17px}.card-prompt{line-height:1.6}.word{font-size:clamp(2rem,5vw,3.125rem);font-weight:750;letter-spacing:-.035em;margin:12px 0 20px;color:#172c48}.sound-button{width:48px;height:48px;background:#f1f5fe;border:1px solid #e6edfc;margin:0 auto 12px}.sound-button:hover{background:#e9f0ff}.sound-button svg{width:23px;height:23px}
.primary,.secondary,.soft-danger{border-radius:10px;min-height:46px}.primary{box-shadow:0 3px 9px #245ae816}.action-row{margin-top:16px}.action-row button{min-width:150px}.session-bottom{margin-top:22px;padding-top:15px;color:#738199;line-height:1.6}.study-bottom{padding:14px 1px;gap:14px}.study-bottom label{margin:0;font-weight:500}.study-bottom select{border-color:#dce4f0;background:#fff;font-weight:600;color:#506581}.example{background:#f7f9fd;border-left:2px solid #dce6fc;border-radius:0 10px 10px 0}.feedback{border-radius:11px;padding:16px 19px}.choice-button{border-radius:10px;min-height:72px}.choice-button .letter{border-radius:6px}.spell-input{border-width:1.5px;border-radius:11px;padding:16px}.spell-input:focus{box-shadow:0 0 0 3px #245ae80b}.word-note{font-size:.8125rem}
.word-row{border-radius:12px;padding:20px 22px;box-shadow:0 2px 8px #1e3f6502}.word-actions .sound-button{width:44px;height:44px}.word-actions .text-button{padding:10px}.surface{border-radius:16px;box-shadow:0 3px 15px #21425c04}.filter-tabs{background:#e9eef7;border:1px solid #dce4f1;border-radius:10px}.filter-tabs button{border-radius:7px}.search-field input{border-color:#dce4f0}.library-summary{font-variant-numeric:tabular-nums}.surface>p{font-size:.9375rem}.backup-panel hr{margin:28px 0}footer{padding-bottom:24px;font-size:.8125rem}
@media(max-width:650px){.app-header{min-height:86px;padding:18px 16px;gap:14px}.brand{font-size:1.3125rem;gap:8px}.brand small{font-size:.75rem;letter-spacing:0}.brand-symbol{width:2.25rem;height:2.25rem;font-size:1.4375rem;border-radius:10px}.nav-item{padding:10px 10px;font-size:.875rem}main{padding:22px 16px 20px}.page-heading{margin-bottom:20px}.page-heading h1{font-size:1.5rem}.page-heading>.text-button{font-size:.8125rem;padding:8px 11px}.stats-strip{margin-bottom:20px;border-radius:12px}.stat-button{padding:15px 14px;grid-template-columns:1fr;grid-template-rows:auto auto;gap:10px;align-content:start}.stat-button strong{font-size:1.75rem}.stat-hint{grid-row:3;font-size:.75rem;line-height:1.4}.stat-button>span:first-child{font-size:.8125rem;line-height:1.5}.mode-tabs button{font-size:.9375rem;padding:12px 6px}.learning-panel{padding:19px 20px 16px;border-radius:16px}.learning-card{min-height:230px;padding:22px 0 14px}.word{font-size:2.5rem}.card-prompt{font-size:.875rem}.sound-button{width:48px;height:48px}.session-top .text-button{font-size:.8125rem}.action-row button{min-width:130px}.session-bottom{font-size:.8125rem;margin-top:20px;gap:10px}.study-bottom{padding:15px 0}.study-bottom .text-button{font-size:.8125rem}.word-row{padding:17px 16px}.word-actions{gap:5px}.word-actions .text-button{padding:10px 5px}.word-row>div:first-child{min-width:0;overflow-wrap:anywhere}.word-actions{flex-shrink:0}.surface{padding:23px 21px}.stat-button:hover{background:white}.review-stat.has-due:hover{background:#f0f5ff}}
@media(prefers-reduced-motion:no-preference){.primary:hover{box-shadow:0 5px 15px #245ae821}.choice-button:hover:not(:disabled){box-shadow:0 2px 9px #245ae807}}

.unit-toolbar,.library-unit{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 20px}.unit-toolbar label,.library-unit label{margin:0;color:var(--muted);font-weight:500}.unit-toolbar select,.library-unit select{background:white;border:1px solid var(--line);min-width:130px;font-weight:650;padding:10px 12px}.unit-toolbar .small{margin-left:auto;font-size:.8125rem}.library-unit{padding:15px 0 8px}.library-unit .small{margin-left:auto}@media(max-width:650px){.unit-toolbar{gap:10px;margin-bottom:16px}.unit-toolbar .small{margin-left:0;flex-basis:100%;font-size:.75rem;line-height:1.6}.library-unit{gap:10px}.library-unit .small{flex-basis:100%;margin-left:0}.session-label{font-size:.8125rem}}

.mode-tabs{grid-template-columns:1fr 1fr 1fr}.step-number{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#dce4f1;color:#60738e;font-size:.75rem;vertical-align:middle;margin-right:5px}.mode-tabs button.active .step-number{background:var(--blue);color:white}.mode-tabs button.done .step-number{background:#e3f3eb;color:#197850}.mode-tabs button:disabled{opacity:.5;cursor:default}.help-steps strong{min-width:40px}@media(max-width:650px){.step-number{width:20px;height:20px;margin-right:3px}.mode-tabs button{font-size:.9375rem}}

/* The word and grading buttons stay in the phone's available viewport. */
.practice-content{display:contents}.session-tools{display:flex;align-items:center;gap:6px;flex-shrink:0}.offline-entry{margin-top:20px}.install-steps{padding-left:24px;line-height:1.8}.install-steps li{padding-left:4px;margin:12px 0}.offline-state{padding:12px 15px;border-radius:10px;background:#edf3ff;color:#2454c5;font-weight:650}.offline-state[data-state="ready"]{background:#edf8f3;color:#236146}.offline-state[data-state="error"]{background:#fff3ef;color:#914737}#settingsDialog select{width:100%;font-size:1rem}#offlineSettings{margin-top:12px}.mode-tabs button{min-height:44px}.step-number{width:1.375rem;height:1.375rem}
@media(max-width:650px){
 body[data-view="study"]{height:var(--study-height,100svh);min-height:0;display:flex;flex-direction:column}
 .app-header{min-height:0;padding:6px max(14px,env(safe-area-inset-right)) 6px max(14px,env(safe-area-inset-left));padding-top:calc(6px + env(safe-area-inset-top));gap:8px;flex-shrink:0}
 .brand{font-size:1.125rem;gap:7px}.brand-symbol{width:1.875rem;height:1.875rem;font-size:1.25rem;border-radius:8px}.brand small{display:none}
 nav{gap:2px}.nav-item{min-height:44px;padding:10px 8px;font-size:.875rem}
 body[data-view="study"] main{flex:1;min-height:0;width:100%;display:flex;flex-direction:column;padding:8px max(12px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
 body[data-view="study"] #study{display:flex;flex-direction:column;flex:1;min-height:0}
 #study .study-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;margin-bottom:8px;flex-shrink:0}
 #study .page-heading{grid-column:2;grid-row:1;margin:0}#study .page-heading>div{display:none}#study .page-heading>.text-button{min-height:44px;font-size:.875rem;padding:8px 10px}
 #study .unit-toolbar{grid-column:1;grid-row:1;flex-wrap:nowrap;gap:8px;margin:0;min-width:0}#study .unit-toolbar label{font-size:.875rem;white-space:nowrap}#study .unit-toolbar select{min-width:0;max-width:150px;min-height:44px;font-size:1rem;padding:8px 10px}#unitCaption{display:none}
 #study .stats-strip{margin-bottom:10px;border-radius:10px;flex-shrink:0}#study .stat-button{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:10px 9px;min-height:46px}#study .stat-button>span:first-child{font-size:.875rem;line-height:1.4;white-space:nowrap}#study .stat-button strong{font-size:1.25rem;line-height:1.2}#study .stat-hint{display:none}
 #study .learning-workspace{width:100%;display:flex;flex-direction:column;flex:1;min-height:0}
 #study .mode-tabs{margin-bottom:8px;flex-shrink:0;padding:3px;gap:3px}#study .mode-tabs button{padding:8px 5px;min-height:44px}.step-number{width:1.25rem;height:1.25rem}
 #study .learning-panel{display:flex;flex-direction:column;flex:1;min-height:15rem;padding:10px 16px 12px;overflow:hidden;border-radius:15px}
 #study .session-top{flex-shrink:0;gap:6px;min-height:44px}#study .session-label{font-size:.875rem;line-height:1.4;min-width:0}#study .session-tools .text-button{font-size:.875rem;min-height:44px;padding:8px}.session-tools #settingsOpen{background:transparent}
 #study .progress-track{margin-top:4px;flex-shrink:0}
 #study .practice-content{display:flex;flex-direction:column;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
 #study .learning-card{min-height:0;flex:1 0 auto;padding:12px 0 8px}
 #study .card-prompt{font-size:.875rem;line-height:1.45;margin:0 0 8px}
 #study .word{font-size:clamp(2rem,8vw,2.5rem);line-height:1.2;margin:6px 0 12px}
 #study .sound-button{width:44px;height:44px;margin:0 auto 8px}
 #study .answer-meaning{font-size:1.1875rem;line-height:1.5;margin:6px 0 4px;overflow-wrap:anywhere}
 #study .meaning{font-size:1.1875rem;line-height:1.5;margin:6px 0 12px}
 #study .action-row{flex-shrink:0;gap:10px;margin-top:10px;flex-wrap:nowrap}#study .action-row button{flex:1;min-width:0;min-height:48px;padding:12px 10px;font-size:1rem}
 #study .session-bottom{flex-shrink:0;margin-top:10px;padding-top:8px;font-size:.875rem;line-height:1.4;gap:8px}#study .session-bottom:has(span:empty){display:none}
 #study .feedback{flex-shrink:0;padding:12px 14px}#study .feedback .typed-line{margin:4px 0}
 #study .choice-list{gap:7px;margin:8px 0 2px}#study .choice-button{min-height:48px;padding:10px 12px;line-height:1.5;font-size:1rem}
 #study .summary-number{font-size:2.75rem;margin:8px 0}#study .summary-title{font-size:1.25rem;margin:8px 0}#study .learning-card>p.muted{margin:8px 0;line-height:1.5}
 body[data-view="study"]>footer{display:none}
 body[data-view="study"] .toast{top:calc(64px + env(safe-area-inset-top));bottom:auto;pointer-events:none}
}
@media(max-width:650px) and (max-height:620px){
 .app-header{padding-top:calc(2px + env(safe-area-inset-top));padding-bottom:2px}
 body[data-view="study"] main{padding-top:6px;padding-bottom:calc(6px + env(safe-area-inset-bottom))}
 #study .study-toolbar,#study .stats-strip{margin-bottom:6px}#study .stat-button{padding-top:8px;padding-bottom:8px;min-height:42px}#study .mode-tabs{margin-bottom:6px}
 #study .learning-panel{padding:6px 14px 8px}#study .learning-card{padding:8px 0 6px}#study .card-prompt{display:none}#study .word{font-size:2rem;margin:4px 0 8px}#study .sound-button{margin-bottom:6px}#study .answer-meaning{font-size:1.125rem;line-height:1.4;margin:4px 0}#study .session-bottom{margin-top:6px;padding-top:6px}#study .action-row{margin-top:6px}
}
