.shell.accounts-screen{max-width:1240px;padding-top:22px}
.accounts-screen .admin-tabs{margin:0 0 24px;gap:9px}
.accounts-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 22px}
.accounts-heading h1{font:2rem/1.15 Georgia,serif;margin:0}
.accounts-heading .btn{font-size:.87rem;padding:11px 16px;min-height:44px}
.account-workspace{display:grid;grid-template-columns:310px minmax(0,1fr);gap:20px;align-items:start}
.account-directory.panel{padding:16px 10px 10px;margin:0;border-radius:18px;min-width:0}
.account-directory>.stack-label{margin:0 4px 12px;font-size:.75rem}
.account-directory>.stack-label>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.account-directory .field{font-size:.86rem;padding:11px;min-height:44px;min-width:0}
.account-filters{display:flex;gap:3px;flex-wrap:wrap;margin:0 4px 14px}
.account-filter{padding:7px 8px;border:0;border-radius:8px;background:transparent;color:#657b6a;font-size:.75rem;min-height:36px}
.account-filter.active{background:#dfedd6;color:#17392f;font-weight:700}
.account-result-count{font-size:.75rem;margin:0 8px 8px}
.account-list{display:grid;gap:3px}
.account-person{display:flex;align-items:center;gap:10px;width:100%;padding:12px 9px;border:1px solid transparent;background:transparent;color:#17392f;text-align:left;border-radius:11px;min-width:0;min-height:68px}
.account-person.active{background:#e0eed9;border-color:#c8dcbc}.account-person:hover{background:#edf3e7}
.account-avatar{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border:1px solid #d8e4d0;background:#eef3e7;border-radius:50%;font-weight:650}
.account-person-text{flex:1;min-width:0;overflow-wrap:anywhere}.account-person-text strong,.account-person-text small{display:block}
.account-person-text strong{font-size:.86rem}.account-person-text small{font-size:.74rem;color:#637a68;margin-top:3px}
.account-role{font-size:.63rem;border:1px solid #d4e0cc;border-radius:5px;padding:3px 5px;color:#536d5b;flex-shrink:0}
.account-pagination{border-top:1px solid #e0e8db;padding:12px 4px 0;margin-top:12px;font-size:.75rem}
.account-page{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.78rem}
.account-page .btn{min-height:38px;padding:6px 12px}
.account-pagination>.stack-label{display:flex;align-items:center;justify-content:space-between;font-size:.7rem;margin:10px 0 0}
.account-pagination>.stack-label .field{padding:6px;min-height:36px;width:auto;font-size:.75rem}
.account-main,.account-editor-host{min-width:0}.account-editor.panel{padding:24px;margin:0;border-radius:18px;min-width:0}
.account-profile-heading{display:flex;align-items:center;gap:14px;margin-bottom:23px}
.account-profile-heading .account-avatar{width:48px;height:48px;flex-basis:48px;background:#dfedd6;font-size:1.2rem}
.account-profile-heading h2,.account-create h2{font:1.8rem/1.2 Georgia,serif;margin:0 0 5px;overflow-wrap:anywhere}
.account-profile-heading p{font-size:.79rem;margin:0;overflow-wrap:anywhere}
.account-success{padding:16px;background:#f2f6ed;border:1px solid #dce6d5;border-radius:12px;margin:0 0 24px;min-width:0}
.account-success-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.account-success-heading h3{font-size:1rem;margin:0}
.account-success-refresh{border:1px solid #c8d8c1;background:#e7efdf;color:#315d49;border-radius:9px;min-width:38px;min-height:38px;font-size:1.25rem;cursor:pointer;flex:none}
.account-success-refresh:disabled{opacity:.5;cursor:default}
.account-last-visit{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px;font-size:.8rem;padding-bottom:12px;color:#557060}
.account-last-visit time{font-weight:650;color:#17392f;overflow-wrap:anywhere}
.account-success-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0}
.account-success-metric{background:white;border:1px solid #e0e8da;border-radius:9px;padding:12px;min-width:0;overflow-wrap:anywhere}
.account-success-metric dt{font-size:.73rem;color:#557060;min-height:2.6em;line-height:1.3}
.account-success-metric dd{font-size:1.55rem;font-weight:700;margin:7px 0 0;font-variant-numeric:tabular-nums;color:#17392f}
.account-success-metric small{display:block;font-size:.72rem;color:#657b6a;margin-top:5px}
.account-success .account-success-scope{font-size:.72rem;line-height:1.5;margin:12px 0 0}
.account-language-breakdown{margin-top:18px;min-width:0}
.account-language-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:.78rem}
.account-language-table caption{text-align:left;font-size:.9rem;font-weight:650;margin-bottom:8px}
.account-language-table th,.account-language-table td{text-align:left;padding:10px 6px;border-bottom:1px solid #dce6d5;vertical-align:top;overflow-wrap:anywhere}
.account-language-table thead th{font-size:.7rem;color:#557060;font-weight:500}
.account-language-table tbody th{font-weight:650}.account-language-table strong{font-size:.88rem;font-variant-numeric:tabular-nums}
.account-language-table small{display:block;font-size:.7rem;color:#657b6a;margin-top:4px}.account-language-label{display:none}
@media(max-width:520px){
 .account-language-table,.account-language-table tbody{display:block}.account-language-table caption{display:block}
 .account-language-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .account-language-table tbody{display:grid;gap:10px}
 .account-language-table tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid #dce6d5;background:white;border-radius:9px;padding:10px;gap:8px;min-width:0}
 .account-language-table tbody th{grid-column:1/-1;padding:0 0 6px;border-bottom:1px solid #e3eadf;font-size:.85rem}
 .account-language-table td{display:block;padding:0;border:0;min-width:0}
 .account-language-label{display:block;font-size:.72rem;color:#557060;min-height:2.7em;line-height:1.35;margin-bottom:5px}
}
@media(max-width:520px){.account-success{padding:12px}.account-success-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.account-accuracy{grid-column:1/-1}.account-success-metric dt{min-height:0}.account-success-refresh{min-width:44px;min-height:44px}}
.account-profile-tabs{display:flex;gap:24px;flex-wrap:wrap;border-bottom:1px solid #dce5d6;margin-bottom:22px}
.account-profile-tabs .set-tab{padding:0 0 12px}
.account-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.account-fields .stack-label{margin:0;font-size:.82rem;min-width:0}.account-fields .field{font-size:.9rem;min-width:0;padding:12px}
.account-editor .account-help{font-size:.79rem;line-height:1.55;margin:12px 0 20px}
.account-footer{border-top:1px solid #e0e8db;display:flex;gap:10px;flex-wrap:wrap;margin-top:26px;padding-top:18px}
.account-editor .btn{min-height:44px;font-size:.85rem;padding:11px 16px}
.account-password-tools{margin:20px 0;display:grid;gap:12px}.account-password-tools .stack-label{margin:0}.account-password-tools .btn{justify-self:start}
.account-create h2{margin-bottom:24px}
.account-learning h3{font-size:.95rem;margin:0 0 12px}.account-language-checks{gap:8px;margin-bottom:26px}
.account-language-checks label{border:1px solid #d4e0cc;border-radius:9px;background:#eff4e9;padding:9px;font-size:.8rem}
.account-deck-choice{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #e0e8db;font-size:.86rem;overflow-wrap:anywhere}
.account-deck-choice input{width:20px;height:20px;flex:none;accent-color:#287354}.account-deck-choice small{display:block;color:#637a68;font-size:.74rem;margin-top:4px}
.account-tools{margin-top:24px;border-top:1px solid #dce5d6;padding-top:17px}
.account-tools>summary{font-size:.9rem;font-weight:650;cursor:pointer;min-height:32px}
.account-tools>div{padding-top:18px}.account-tools .word-row{font-size:.85rem}
.account-tools .admin-exam{min-width:0}.account-tools .field{max-width:100%;min-width:0}
.account-back{display:none;border:0;background:transparent;color:#315d49;font-size:.9rem;font-weight:650;padding:0;min-height:44px;margin-bottom:12px;cursor:pointer}
.account-empty{padding:14px;font-size:.85rem}.account-language-catalog{font-size:.9rem}.account-language-catalog p{padding:10px 0;border-bottom:1px solid #e0e8db}
@media(max-width:950px){.account-workspace{grid-template-columns:280px minmax(0,1fr);gap:14px}.account-fields{grid-template-columns:1fr}.account-editor.panel{padding:20px}}
@media(max-width:780px){
 .shell.accounts-screen{padding:16px 12px 32px}.accounts-screen .admin-tabs{gap:6px;margin-bottom:20px}.accounts-screen .admin-tabs .tab{padding:9px 12px;min-height:42px;font-size:.8rem}
 .accounts-heading{align-items:flex-start;flex-wrap:wrap;gap:14px}.accounts-heading h1{font-size:1.7rem}.accounts-heading .btn{font-size:.8rem}
 .account-workspace{grid-template-columns:1fr}.account-workspace[data-screen=list] .account-main{display:none}
 .account-workspace[data-screen=profile] .account-directory{display:none}.account-heading-hidden{display:none}
 .account-workspace[data-screen=profile] .account-back{display:inline-flex;align-items:center}
 .account-editor.panel{padding:18px 16px}.account-fields{grid-template-columns:1fr}.account-profile-heading h2{font-size:1.7rem}
 .account-filters{justify-content:space-between}.account-filter{min-height:44px}.account-directory .field,.account-editor .field{font-size:16px}
 .account-editor .btn{min-height:46px}.account-person{min-height:66px}.account-profile-tabs{gap:22px}
 .account-tools .word-row{overflow-wrap:anywhere}.account-tools .list{min-width:0}
}
.shell.sets-screen{max-width:1320px}
.sets-screen .hero{padding:18px 24px;margin-bottom:14px;border-radius:20px}
.sets-screen .hero h1{font-size:1.9rem;margin:5px 0}
.sets-screen .admin-tabs{margin:12px 0 18px}
.set-workspace{display:grid;grid-template-columns:245px minmax(0,1fr);gap:18px;align-items:start}
.set-sidebar{position:sticky;top:16px;background:#edf1e6;border:1px solid #dbe4d5;border-radius:16px;padding:16px;min-width:0}
.set-sidebar h2{font-size:1rem;margin:0 0 14px}
.set-sidebar .stack-label{font-size:.78rem}
.set-sidebar .field{padding:8px 10px;font-size:.85rem}
.set-navigation{display:grid;gap:5px;max-height:calc(100dvh - 380px);min-height:100px;overflow-y:auto;margin:14px 0}
.set-navigation-item{display:grid;gap:6px;width:100%;text-align:left;background:none;border:1px solid transparent;border-radius:10px;padding:11px 10px;color:#17352e;overflow-wrap:anywhere}
.set-navigation-item strong{font-size:.87rem}.set-navigation-item span{font-size:.74rem;color:#657c69}
.set-navigation-item.active{background:#dcebd5;border-color:#b9ceae}
.set-navigation-item:hover{background:#e3eddb}
.set-sidebar .set-create-button{width:100%;font-size:.85rem;padding:11px;min-height:42px}
.set-sidebar .stack-label:has([name=selected-set]){display:none}
.set-workspace-main,.set-editor-host{min-width:0}
.set-editor.panel{margin:0;padding:22px;border-radius:18px;min-width:0}
.set-editor-title{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:17px}
.set-editor-title h2{font:1.8rem Georgia,serif;margin:0 0 7px;overflow-wrap:anywhere}
.set-editor-title p{font-size:.8rem;margin:0;line-height:1.5}
.set-editor-actions{display:flex;gap:8px;flex-shrink:0}
.set-editor-actions .btn{padding:10px 12px;min-height:42px;font-size:.82rem}
.set-editor-tabs{display:flex;gap:20px;border-bottom:1px solid #dce5d6;margin-bottom:14px}
.set-tab{border:0;border-bottom:2px solid transparent;background:none;color:#617768;padding:10px 0;font-size:.85rem}
.set-tab.active{border-bottom-color:#17352e;color:#17352e;font-weight:700}
.set-word-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:15px}
.set-word-controls .stack-label{flex:1;min-width:200px;margin:0}.set-word-controls .stack-label>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.set-word-controls .field{padding:10px 12px;font-size:.85rem}
.set-filters{display:flex;gap:6px;flex-wrap:wrap}
.set-filter{border:1px solid #d1ddcc;border-radius:18px;background:#f5f7f0;color:#425c48;font-size:.73rem;padding:8px 10px}
.set-filter.active{border-color:#96b68d;background:#e5efde}
.set-word-columns,.set-word{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.15fr) minmax(0,.8fr) 86px;gap:12px;align-items:center;padding:12px}
.set-word-columns{background:#f0f4eb;font-size:.72rem;color:#6c816f;border-radius:10px 10px 0 0}
.set-word{border-bottom:1px solid #e5ebe1;min-height:60px;font-size:.88rem;overflow-wrap:anywhere}
.set-word-term{font-weight:650}.set-word small{display:block;color:#708372;font-size:.7rem;font-weight:400;margin-top:5px}
.set-word-ipa{font:.82rem "Doulos SIL","Charis SIL","Noto Sans","DejaVu Sans",sans-serif;color:#637e69}
.set-word-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px}
.set-word-actions .listen-control{margin:0;display:flex}
.set-word-actions .listen-label{display:none}
.set-word-actions .listen-button{width:38px;height:38px;border:0;border-radius:50%;background:#eaf1e4;color:#17352e;padding:8px;display:grid;place-items:center}
.set-word-actions .listen-button svg{width:20px;height:20px}
.set-word-menu{position:relative}
.set-word-menu>summary{list-style:none;cursor:pointer;width:38px;height:38px;display:grid;place-items:center;font-size:1.2rem;border-radius:9px}
.set-word-menu>summary::-webkit-details-marker{display:none}
.set-word-menu>summary:hover{background:#edf3e7}
.set-menu-options{position:absolute;right:0;top:40px;min-width:155px;z-index:5;background:white;box-shadow:0 6px 24px #16342a26;border:1px solid #d9e4d4;border-radius:10px;padding:5px;display:grid;gap:3px}
.set-menu-options .btn{border:0;text-align:left;min-height:42px;font-size:.83rem;background:white;padding:8px 12px}
.set-menu-options .btn:hover{background:#edf3e7}
.set-word .word-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;grid-column:1/-1}
.set-word .audio-editor{grid-column:1/-1}
.set-pagination{display:flex;gap:14px;align-items:center;justify-content:space-between;margin-top:16px;font-size:.76rem;flex-wrap:wrap}
.set-pagination .stack-label{display:flex;align-items:center;gap:8px;margin:0;font-size:.73rem}.set-pagination .field{padding:6px;font-size:.76rem}
.set-page-nav{display:flex;gap:10px;align-items:center}.set-page-nav .btn{min-height:38px;padding:6px 12px}
.set-empty{padding:16px}
.set-import{padding:18px;margin-top:20px;background:#f2f6ed;border-radius:12px}
.set-import>h3{display:inline-block;margin-right:16px}.set-import>textarea,.set-import .field{max-width:100%}
.set-create{margin:0 0 18px;padding:18px;border-radius:14px}
.set-settings{font-size:.9rem;line-height:1.6}.set-settings .muted{font-size:.83rem}
.set-rename{display:flex;gap:12px;align-items:flex-end;margin:22px 0;flex-wrap:wrap}
.set-rename .stack-label{flex:1;min-width:180px;margin:0}.set-rename .btn{min-height:50px}
.set-delete{border:1px solid #e5b9aa;background:#fff7f2;border-radius:12px;padding:14px;margin-top:22px;overflow-wrap:anywhere}
.set-delete>summary{cursor:pointer;color:#9a3f2c;font-weight:700;min-height:28px}
.set-delete .btn{margin:8px 8px 0 0}.set-delete .danger{background:#a6402c;color:white}
.set-delete .stack-label{margin:14px 0}.set-delete .field{width:100%;min-width:0}
@media(max-width:900px){.set-editor-title{align-items:flex-start;flex-direction:column}.set-word-columns,.set-word{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.8fr) 86px;gap:8px;padding:10px 6px}}
@media(max-width:780px){
 .shell.sets-screen{padding:16px 12px 35px}.sets-screen .hero{padding:14px 17px}.sets-screen .hero h1{font-size:1.4rem}
 .set-workspace{grid-template-columns:1fr;gap:12px}.set-sidebar{position:static;padding:12px}
 .set-sidebar h2,.set-sidebar .stack-label:has([name=set-search]),.set-sidebar .stack-label:has([name=set-language]),.set-navigation{display:none}
 .set-sidebar .stack-label:has([name=selected-set]){display:grid;margin:0}.set-sidebar .set-create-button{margin-top:10px;background:transparent;border:1px solid #bfd0b7;color:#17352e}
 .set-editor.panel{padding:15px}.set-editor-title h2{font-size:1.5rem}.set-editor-actions{width:100%}.set-editor-actions .btn{flex:1;font-size:.8rem}
 .set-word-controls{gap:10px}.set-filters{width:100%}.set-word-columns{display:none}
 .set-word{grid-template-columns:minmax(0,1fr) 86px;gap:4px 8px;padding:12px 2px;align-items:start}
 .set-word-term{grid-column:1;grid-row:1}.set-word-meaning{grid-column:1;grid-row:2;font-size:.8rem;color:#657c69}
 .set-word-ipa{grid-column:1;grid-row:3;font-size:.74rem}.set-word-actions{grid-column:2;grid-row:1/4;align-self:center}
 .set-word .word-editor{grid-template-columns:1fr}.set-pagination{gap:10px}.set-pagination .stack-label{order:3;width:100%;justify-content:flex-end}
 .set-page-nav{gap:6px}.set-page-nav .btn{min-height:42px}.set-word-menu>summary{height:44px;width:38px}
}
.stack-label{display:grid;gap:6px;font-size:.9rem;font-weight:700;margin:8px 0}
.stack-label .field{font-weight:400}
.locale-select{background:transparent;border:1px solid #789286;color:inherit;border-radius:10px;padding:7px;max-width:135px}
.locale-select option{color:#17352e}
.language-checks{display:flex;flex-wrap:wrap;gap:14px;margin:10px 0 18px}
.language-checks label{display:flex;align-items:center;gap:7px}
.language-checks input{width:20px;height:20px;accent-color:#287354}
.admin-card{margin-top:16px}
.admin-card h2,.admin-card h3{margin-top:8px}
.admin-card .word-row{grid-template-columns:minmax(0,1fr) auto}
.admin-card .word-actions{display:flex;gap:8px;flex-wrap:wrap}
.admin-card .word-actions .btn{padding:9px 12px;min-height:40px}
.admin-card .word-editor{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;grid-column:1/-1;width:100%}
.word-editor .btn{align-self:end}
@media(max-width:700px){.admin-card .word-editor{grid-template-columns:1fr}.admin-card .word-actions .btn{padding:8px 10px}}
.hero .stack-label{max-width:460px;color:#e8efe7}
.hero .field{color:#17352e}
.mock-row label{font-weight:700;display:block;margin-bottom:8px}
.audio-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;grid-column:1/-1;width:100%;padding:12px;background:#f4f6ee;border:1px solid #dce5da;border-radius:14px}
.audio-editor h4,.audio-editor .muted,.audio-editor .error{grid-column:1/-1;margin:4px 0}
.audio-editor .stack-label{margin:0}
.word-audio{display:block;width:min(100%,420px);height:42px;margin:14px 0}
.import-audio{padding:12px;margin:10px 0;background:#f4f6ee;border-radius:14px}
.import-audio-rows{display:grid;gap:8px}
.import-audio-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,1fr);align-items:center;gap:10px;padding:10px;background:white;border-radius:10px}
.import-audio-row .field{padding:7px}
@media(max-width:700px){.audio-editor{grid-template-columns:1fr}.import-audio-row{grid-template-columns:1fr}}

.grammar-overview{margin:16px 0 20px}.grammar-overview .bar{margin:12px 0}.grammar-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:16px 0 28px}.grammar-lesson{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.grammar-lesson h2,.grammar-lesson p{margin:0}.grammar-meta{color:#65786e;font-size:.88rem;margin-top:auto!important;padding-top:10px}.grammar-lesson .btn{margin-top:8px}.grammar-study{max-width:720px}.grammar-prompt{font-size:clamp(1.5rem,6vw,2.5rem);white-space:pre-line}.grammar-choices{grid-template-columns:1fr}.grammar-result{max-width:760px;margin:20px auto}.grammar-review{display:grid;gap:10px;margin:14px 0}.grammar-review-row{border:1px solid #e1e8df;border-radius:14px;padding:12px 16px}.grammar-review-row p{margin:5px 0}.grammar-review-prompt{font-weight:700}.grammar-review-answer.wrong,.grammar-answer-key{color:#9b4b32}.grammar-answer-key{font-weight:700}@media(max-width:700px){.grammar-grid{grid-template-columns:1fr}.grammar-lesson{padding:18px}.grammar-study .card{padding:22px}}

.study{max-width:900px;margin:16px auto}.study-top{align-items:center;font-size:1rem;margin:0 4px 14px}.study-encouragement{color:#496f56;font-weight:700}.study .bar{height:12px;border-radius:99px;margin:0 0 22px}.study-card{min-height:600px;padding:clamp(24px,5vw,54px);border-radius:38px;text-align:center}.study-card .card-label{margin:8px 0 0}.study-card .study-term{font-size:clamp(2.8rem,9vw,5.4rem);line-height:1.03;letter-spacing:-.035em;margin:32px auto 4px;overflow-wrap:anywhere}.study-card .transcription{font-size:clamp(1.35rem,4.6vw,2rem);font-family:"Doulos SIL","Charis SIL","Noto Sans","DejaVu Sans","Segoe UI Symbol",sans-serif;color:#55745e;margin:8px auto 20px;overflow-wrap:anywhere}.listen-control{display:flex;flex-direction:column;align-items:center;gap:7px;margin:18px auto 24px}.listen-button{width:78px;height:78px;border:0;border-radius:50%;background:#e8eee3;color:#17392f;display:grid;place-items:center}.listen-button svg{width:36px;height:36px}.listen-button:focus-visible,.study-choice:focus-visible,.study-check:focus-visible{outline:3px solid #67a88b;outline-offset:3px}.listen-label{color:#496f56;font-weight:600}.study-card .study-question{font:clamp(1.4rem,4.3vw,2.45rem) Georgia,serif;margin:30px auto 22px}.study-card .answer-grid{grid-template-columns:1fr;max-width:760px;margin:0 auto;gap:10px}.study-choice{display:flex;align-items:center;gap:16px;text-align:left;border:2px solid #e2e8e1;background:#f8f8f5;border-radius:18px;padding:16px 20px;min-height:76px;font:clamp(1.15rem,3.5vw,1.85rem) Georgia,serif;font-weight:500}.choice-indicator{flex:0 0 28px;width:28px;height:28px;border:2px solid #a8b0a8;border-radius:50%;display:grid;place-items:center}.study-choice.selected{background:#eaf2e8;border-color:#bed5be}.study-choice.selected .choice-indicator{border-color:#17392f;background:#17392f;box-shadow:inset 0 0 0 6px #eaf2e8}.study-choice.correct{background:#e5f0e2;border-color:#b8d2b6}.study-choice.correct .choice-indicator{border-color:#17392f;background:#17392f}.study-choice.correct .choice-indicator:after{content:'✓';color:white;font:700 17px system-ui}.study-choice.wrong{background:#fff0e8;border-color:#e6b6a3}.study-choice.wrong .choice-indicator{border-color:#a14531;background:#a14531}.study-choice.wrong .choice-indicator:after{content:'×';color:white;font:700 18px system-ui}.study-check,.study-next{width:100%;border-radius:999px;min-height:78px;margin-top:24px;background:#17392f;color:white;font:clamp(1.25rem,3.6vw,1.8rem) Georgia,serif}.study-card .study-answer{max-width:760px;margin:22px auto 0}.study-card .study-answer .field{font-size:1.2rem;min-height:66px}.study-card .feedback{max-width:760px;margin:18px auto 0;text-align:left}.study-card .word-audio{margin:18px auto;max-width:760px}.study-card .study-next{margin-top:18px}
@media(max-width:700px){.study{margin:10px auto}.study-card{padding:24px 18px;min-height:0;border-radius:28px}.study-card .study-term{margin-top:26px}.study-card .study-question{margin-top:25px}.study-choice{min-height:68px;padding:14px 15px}.study-check,.study-next{min-height:68px}.study-card .study-answer{flex-direction:column}}

.shell.study-screen{width:100%;height:calc(100vh - 72px);height:calc(100dvh - 72px);min-height:0;margin:0 auto;padding:8px clamp(12px,2vw,20px) calc(8px + env(safe-area-inset-bottom));display:flex;flex-direction:column;overflow:hidden}
.study-screen>.back{flex:0 0 38px;align-self:flex-start;margin:0;padding:8px 0}
.study-screen .study{flex:1;min-height:0;width:100%;margin:0 auto;display:flex;flex-direction:column;overflow:hidden}
.study-screen .study-top{flex:none;margin:0 4px 8px}
.study-screen .study .bar{flex:none;height:8px;margin:0 0 10px}
.study-screen .study-card{flex:1;min-height:0;height:auto;max-height:100%;padding:clamp(14px,3vh,32px) clamp(16px,4vw,42px);overflow-y:auto;overscroll-behavior:contain}
@media(max-width:700px){.shell.study-screen{height:calc(100vh - 64px);height:calc(100dvh - 64px);padding:6px 12px calc(6px + env(safe-area-inset-bottom))}.study-screen>.back{flex-basis:34px;padding:6px 0}.study-screen .study-top{font-size:.85rem;margin:0 2px 6px}.study-screen .study .bar{height:7px;margin-bottom:8px}.study-screen .study-card{padding:14px 12px;border-radius:22px}.study-screen .study-card .card-label{margin:2px 0 0}.study-screen .study-card .study-term{font-size:clamp(1.8rem,8vw,4rem);margin:12px auto 2px}.study-screen .study-card .transcription{font-size:clamp(1rem,4vw,1.5rem);margin:4px auto 8px}.study-screen .listen-control{gap:4px;margin:8px auto 10px}.study-screen .listen-button{width:48px;height:48px}.study-screen .listen-button svg{width:24px;height:24px}.study-screen .listen-label{font-size:.8rem}.study-screen .study-question{font-size:clamp(1.1rem,4.5vw,1.7rem);margin:10px auto}.study-screen .answer-grid{gap:6px}.study-screen .study-choice{min-height:48px;padding:8px 10px;font-size:clamp(1rem,3.8vw,1.35rem);gap:10px}.study-screen .choice-indicator{flex-basis:22px;width:22px;height:22px}.study-screen .study-check,.study-screen .study-next{min-height:50px;margin-top:10px;font-size:1.2rem}.study-screen .study-card .feedback{margin:10px auto 0;padding:10px 12px}.study-screen .study-card .word-audio{margin:8px auto;height:38px}}
@media(max-height:520px){.study-screen .study-card{padding:10px 16px}.study-screen .study-card .study-term{margin-top:8px}.study-screen .listen-control{margin:5px auto}.study-screen .listen-button{width:40px;height:40px}.study-screen .study-question{margin:6px auto}.study-screen .study-choice{min-height:42px;padding:6px 10px}.study-screen .study-check,.study-screen .study-next{min-height:42px;margin-top:6px}.study-screen .study-card .feedback{margin-top:6px;padding:8px 10px}}

/* Compact study card: the answer, feedback and action keep stable positions. */
.study-screen .study{max-width:720px}
.study-screen .study-card{display:flex;flex-direction:column;justify-content:safe center;padding:clamp(12px,2.2vh,22px) clamp(16px,2.8vw,28px);border-radius:24px}
.study-screen .study-card .card-label{margin:0;font-size:.7rem;line-height:1.2}
.study-screen .study-card .study-term{font-size:clamp(2rem,5vw,3.5rem);line-height:1.05;margin:10px auto 2px}
.study-screen .pronunciation-line{display:flex;align-items:center;justify-content:center;gap:10px;min-height:42px;margin:0 auto}
.study-screen .study-card .transcription{font-size:clamp(1rem,2vw,1.3rem);line-height:1.35;margin:0}
.study-screen .listen-control{display:flex;flex-direction:row;gap:0;margin:0}
.study-screen .listen-button{width:42px;height:42px;flex:0 0 42px}
.study-screen .listen-button svg{width:21px;height:21px}
.study-screen .listen-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.study-screen .study-question{font-size:clamp(1.25rem,2.5vw,1.55rem);line-height:1.2;margin:10px auto 12px}
.study-screen .study-card .answer-grid{width:100%;max-width:none;gap:7px;margin:0}
.study-screen .study-choice{min-height:48px;padding:8px 12px;gap:12px;border-width:1px;border-radius:12px;font:600 clamp(1rem,1.8vw,1.15rem) ui-sans-serif,system-ui,sans-serif;line-height:1.25}
.study-screen .study-choice:disabled{opacity:1;cursor:default;color:#17352e}
.study-screen .choice-indicator{flex:0 0 22px;width:22px;height:22px}
.study-screen .study-answer{width:100%;max-width:none;margin:0}
.study-screen .study-answer .field{min-height:48px}
.study-screen .study-card .study-feedback{width:100%;max-width:none;height:46px;min-height:46px;overflow-y:auto;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0 0;padding:7px 12px;font-size:.92rem;text-align:left}
.study-screen .study-feedback:not(.answered){visibility:hidden;background:transparent}
.study-screen .study-feedback .listen-button{width:32px;height:32px;flex-basis:32px}
.study-screen .study-check,.study-screen .study-next{width:100%;min-height:48px;margin:8px 0 0;border-radius:12px;font:700 1.1rem ui-sans-serif,system-ui,sans-serif}
@media(max-width:700px){
  .study-screen .study-card{padding:12px 14px}
  .study-screen .study-card .study-term{font-size:clamp(1.8rem,8vw,2.8rem);margin:8px auto 2px}
  .study-screen .pronunciation-line{min-height:38px}
  .study-screen .listen-button{width:38px;height:38px;flex-basis:38px}
  .study-screen .study-question{font-size:clamp(1.1rem,4.5vw,1.35rem);margin:6px auto 9px}
  .study-screen .study-card .answer-grid{gap:5px}
  .study-screen .study-choice{min-height:44px;padding:7px 10px;font-size:1rem;gap:9px}
  .study-screen .study-card .study-feedback{height:42px;min-height:42px;margin-top:5px;padding:5px 9px;font-size:.85rem}
  .study-screen .study-check,.study-screen .study-next{min-height:44px;margin-top:6px;font-size:1rem}
}
@media(max-height:520px){
  .study-screen .study-card{padding:8px 12px}
  .study-screen .study-card .study-term{font-size:clamp(1.7rem,5vh,2.25rem);margin:4px auto 0}
  .study-screen .pronunciation-line{min-height:32px}
  .study-screen .listen-button{width:32px;height:32px;flex-basis:32px}
  .study-screen .study-question{font-size:1.1rem;margin:3px auto 6px}
  .study-screen .study-choice{min-height:40px;padding:5px 9px}
  .study-screen .study-card .study-feedback{height:38px;min-height:38px;margin-top:4px;padding:3px 8px}
  .study-screen .study-check,.study-screen .study-next{min-height:40px;margin-top:4px}
}
@media(max-height:520px) and (min-width:480px){
  .study-screen .study-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);grid-template-rows:auto auto auto 1fr auto;align-items:center;column-gap:16px;justify-content:normal}
  .study-screen .study-card .card-label{grid-column:1;grid-row:1}
  .study-screen .study-card .study-term{grid-column:1;grid-row:2;margin:0 auto}
  .study-screen .pronunciation-line{grid-column:1;grid-row:3}
  .study-screen .study-question{grid-column:1;grid-row:4;margin:0 auto;font-size:1rem}
  .study-screen .study-card .answer-grid{grid-column:2;grid-row:1/5;grid-template-columns:repeat(2,minmax(0,1fr));align-self:center}
  .study-screen .study-card .study-answer{grid-column:2;grid-row:1/5;align-self:center}
  .study-screen .study-card .study-feedback{grid-column:1;grid-row:5;height:40px;min-height:40px;margin:4px 0 0}
  .study-screen .study-check,.study-screen .study-next{grid-column:2;grid-row:5;margin:4px 0 0}
}
@media(max-width:420px){
  .topbar{padding:0 10px}
  .topbar .brand{gap:6px;font-size:1rem;flex:none}
  .topbar .brand-mark{width:32px;height:32px}
  .topbar .top-actions{gap:4px;font-size:.75rem;min-width:0}
  .topbar #who{display:none}
  .topbar .locale-select{max-width:110px;padding:5px}
  .topbar .text-btn{padding:5px 2px}
}
@media(max-width:360px) and (max-height:620px){
  .study-screen .study-card{padding:7px 10px}
  .study-screen .study-card .study-term{margin-top:4px}
  .study-screen .pronunciation-line{min-height:32px}
  .study-screen .listen-button{width:32px;height:32px;flex-basis:32px}
  .study-screen .study-question{margin:3px auto 6px}
  .study-screen .study-choice{min-height:40px;padding:5px 8px}
  .study-screen .study-card .study-feedback{height:38px;min-height:38px;margin-top:4px;padding:3px 8px}
}
@media(max-width:479px) and (max-height:520px){
  .study-screen .study-card .answer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .study-screen .study-choice{font-size:.86rem;gap:5px;padding:4px 5px}
  .study-screen .choice-indicator{flex-basis:18px;width:18px;height:18px}
}

/* Let the card use the available viewport height; never scroll its answer area. */
.study-screen .study-card{display:flex;flex-direction:column;justify-content:normal;overflow:hidden;max-height:none;margin:0}
.study-screen .study-card:has(.study-answer){max-height:none}
.study-screen .study-card-head{flex:0 0 auto}
.study-screen .study-card-body{flex:1 1 auto;min-height:min-content;display:flex;flex-direction:column;justify-content:center;overflow:visible;padding:0 2px 6px}
.study-screen .study-card-foot{flex:0 0 auto;border-top:1px solid #e4ebe2;padding-top:6px;background:#fff}
.study-screen .study-card-foot .study-feedback{margin-top:0}
.study-screen .study-card-foot .study-check,.study-screen .study-card-foot .study-next{margin-top:6px}
.study-screen .study-choice-wrap{min-width:0;display:flex;flex-direction:column;align-self:start;gap:4px}
.study-screen .study-choice-wrap .study-choice{width:100%}
.study-screen .study-choice-detail{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;width:100%;min-height:38px;padding:4px 10px;border-radius:10px;background:#edf5eb;color:#17392f}
.study-screen .study-choice-detail .study-answer-term{font-size:clamp(.9rem,1.6vw,1.12rem);overflow-wrap:anywhere}
.study-screen .study-choice-detail .study-answer-ipa{font:.9rem "Doulos SIL","Charis SIL","Noto Sans","DejaVu Sans",sans-serif;color:#55745e;overflow-wrap:anywhere}
.study-screen .study-choice-detail .listen-control{flex:none;margin:0}
.study-screen .study-choice-detail .listen-button{width:34px;height:34px;flex-basis:34px}
.study-screen .study-card-foot .study-feedback.with-answer-reveal{height:78px;min-height:78px;display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:3px}
.study-screen .study-result-label{font-size:.82rem;line-height:1.1;font-weight:700}
.study-screen .study-answer-reveal{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;line-height:1.15}
.study-screen .study-answer-term{font-size:clamp(.9rem,1.6vw,1.12rem);overflow-wrap:anywhere}
.study-screen .study-answer-ipa{font:.85rem "Doulos SIL","Charis SIL","Noto Sans","DejaVu Sans",sans-serif;color:#55745e;overflow-wrap:anywhere}
.study-screen .study-answer-reveal .listen-control{margin:0;flex:none}
.study-screen .study-answer-reveal .listen-button{width:32px;height:32px;flex-basis:32px}
.study-screen .study-choice.selected:not(.correct):not(.wrong){background:#eaf0f8;border-color:#6e8aaa}
.study-screen .study-choice.selected:not(.correct):not(.wrong) .choice-indicator{background:white;border-color:#54759b;box-shadow:none}
.study-screen .study-choice.selected:not(.correct):not(.wrong) .choice-indicator:after{content:'';width:9px;height:9px;border-radius:50%;background:#54759b}
.study-screen .study-choice.correct .choice-indicator,.study-screen .study-choice.wrong .choice-indicator{box-shadow:none}
.study-screen .study-choice.correct .choice-indicator:after,.study-screen .study-choice.wrong .choice-indicator:after{line-height:1}
@media(max-width:700px){
  .study-screen .study-card-foot .study-feedback.with-answer-reveal{height:74px;min-height:74px}
  .study-screen .study-answer-reveal{gap:6px}
  .study-screen .study-answer-term{font-size:.9rem}
  .study-screen .study-answer-ipa{font-size:.75rem}
}
@media(max-height:520px){
  .study-screen .study-card-foot{padding-top:3px}
  .study-screen .study-card-foot .study-check,.study-screen .study-card-foot .study-next{margin-top:3px}
  .study-screen .study-card-foot .study-feedback.with-answer-reveal{height:64px;min-height:64px;padding:3px 6px;gap:1px}
}
@media(max-height:360px){
  body:has(.study-screen) .topbar{height:48px}
  .shell.study-screen{height:calc(100vh - 48px);height:calc(100dvh - 48px)}
  .study-screen>.back{flex-basis:25px;padding:3px 0}
  .study-screen .study-top{margin-bottom:3px}
  .study-screen .study .bar{height:4px;margin-bottom:4px}
  .study-screen .study-card{padding:5px 8px}
  .study-screen .study-card .study-term{margin-top:1px}
  .study-screen .pronunciation-line{min-height:28px}
  .study-screen .listen-button{width:28px;height:28px;flex-basis:28px}
  .study-screen .study-card-body .study-question{margin:3px auto 5px}
  .study-screen .study-card-head .card-label{display:none}
  .study-screen .study-card-foot{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:5px;align-items:center;padding-top:3px}
  .study-screen .study-card-foot .study-feedback{height:46px;min-height:46px;margin:0;padding:3px 5px;font-size:.72rem}
  .study-screen .study-card-foot .study-check,.study-screen .study-card-foot .study-next{min-height:46px;margin:0;padding:5px 8px;font-size:.9rem}
  .study-screen .study-card-foot:has(.with-answer-reveal){display:flex;flex-direction:column;gap:3px}
  .study-screen .study-card-foot .study-feedback.with-answer-reveal{height:64px;min-height:64px}
  .study-screen .study-card-foot:has(.with-answer-reveal) .study-check,.study-screen .study-card-foot:has(.with-answer-reveal) .study-next{min-height:40px}
}
@media(max-height:700px) and (min-width:480px){
  .study-screen .study-card .answer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-height:620px) and (max-width:479px){
  .study-screen .study-card .answer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-height:420px){
  .shell.study-screen{height:auto;min-height:calc(100dvh - 48px);overflow:visible}
  .study-screen .study{overflow:visible}
  .study-screen .study-card{min-height:min-content}
}
