:root{
 --primary:#155e52;--background:#f7f9f8;--surface:#fff;--text:#172b27;--secondary-text:#5d706a;--success:#237a48;--error:#b93838;--border:#dce5e1;--tint:#e8f2ef;
 --green:var(--primary);--line:var(--border);--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-6:24px;--space-8:32px;--radius-sm:8px;--radius-button:12px;--radius-card:16px;--radius-feature:24px;
 font-family:Inter,"Noto Sans KR",system-ui,-apple-system,"Segoe UI",sans-serif;font-size:16px;color:var(--text);background:var(--background);font-synthesis:none;line-height:1.6
}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer;min-height:48px;border:0;border-radius:var(--radius-button);color:inherit;background:none;line-height:1.45}button:disabled{opacity:.55;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #378bca;outline-offset:4px}input,select,textarea{width:100%;padding:12px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);min-height:48px;font-size:1rem}input:focus,select:focus,textarea:focus{outline:2px solid var(--primary);outline-offset:1px}input[type=checkbox],input[type=radio]{width:20px;height:20px;min-height:20px;flex-shrink:0;accent-color:var(--primary)}label{display:block;font-size:.875rem;font-weight:600;margin:16px 0 8px}textarea{resize:vertical}h1,h2,h3,p{margin:0}h1{font-size:2rem;line-height:1.35;letter-spacing:-.045em;font-weight:750;overflow-wrap:anywhere}h2{font-size:1.25rem;line-height:1.45;letter-spacing:-.025em}h3{font-size:1.125rem;line-height:1.5}p{overflow-wrap:anywhere}small,.caption{font-size:.8125rem;color:var(--secondary-text)}.muted,.sub{font-size:1rem;color:var(--secondary-text);line-height:1.7}.eyebrow{display:block;font-size:.875rem;font-weight:600;color:var(--secondary-text);margin-bottom:8px}.app-header{max-width:980px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:24px 32px}.brand{display:flex;align-items:center;gap:10px;color:var(--primary);font-size:1.4rem;font-weight:800;text-decoration:none;letter-spacing:-.045em}.brand img{border-radius:10px}.brand-note{font-size:.875rem;color:var(--secondary-text)}main{max-width:820px;padding:24px 32px calc(120px + env(safe-area-inset-bottom));margin:auto;min-height:80dvh}.page{scroll-margin-top:20px}.page-title,.section-title,.deck-detail-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.page-title>*{min-width:0}.page-title>button{flex-shrink:0}.section-title{margin:32px 0 16px}.primary,.secondary,.quiet,.text-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 18px;font-size:.9375rem;font-weight:650}.primary{background:var(--primary,#155e52);color:#fff}.primary:hover{background:#104c42}.secondary{background:var(--surface);border:1px solid var(--border);color:var(--primary)}.secondary:hover,.quiet:hover{background:var(--tint)}.quiet,.text-button{color:var(--primary);padding:10px 12px;background:transparent}.text-button{padding-left:0}.full{width:100%}.app-card,.panel{background:var(--surface);border:1px solid var(--border);padding:24px;border-radius:var(--radius-card)}.button-row,.study-actions,.recent-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.home-hero{padding:24px 0 32px;max-width:640px}.home-hero h1{font-size:clamp(2rem,5vw,3rem);line-height:1.3;letter-spacing:-.055em;margin:12px 0 16px;white-space:pre-line}.home-hero .sub{margin-bottom:24px}.hero-action{min-height:58px;font-size:1rem;padding:16px 24px}.hero-action svg{width:24px;height:24px}.review-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--tint);border:0}.review-summary h2{font-size:1.75rem;font-weight:750}.review-summary .muted{font-size:.875rem;margin-top:4px}.review-summary .secondary{flex-shrink:0;border-color:transparent}.deck-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.deck-card{position:relative;min-width:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-card);padding:20px}.deck-open{display:flex;flex-direction:column;text-align:left;width:100%;gap:10px;padding:0 36px 0 0;border-radius:0}.deck-open strong{font-size:1.125rem;overflow-wrap:anywhere}.deck-open span{font-size:.875rem;color:var(--secondary-text)}.deck-open .deck-symbol{width:36px;height:36px;display:grid;place-items:center;background:var(--tint);border-radius:10px;color:var(--primary);margin-bottom:4px}.deck-progress{margin-top:16px}.deck-progress progress{width:100%;height:5px;display:block;accent-color:var(--primary);margin-bottom:8px}.deck-progress small{font-size:.8125rem}.deck-menu{position:absolute;right:10px;top:10px;border:0;margin:0;padding:0;z-index:3}.deck-menu summary{width:48px;height:48px;display:grid;place-items:center;list-style:none;font-size:1.5rem;border-radius:12px}.deck-menu summary::-webkit-details-marker{display:none}.deck-menu[open]{background:white;border:1px solid var(--border);box-shadow:0 8px 24px #172b2714;border-radius:12px}.deck-menu-actions{padding:6px;min-width:140px;display:grid}.deck-menu-actions button{text-align:left;justify-content:flex-start;white-space:nowrap}.deck-menu-actions .danger{color:var(--error)}.empty-state,.empty{grid-column:1/-1;padding:32px 24px;text-align:center;background:white;border:1px dashed var(--border);border-radius:16px}.empty-state p,.empty p{color:var(--secondary-text);margin:8px 0 20px}.empty-state h3{margin-top:8px}.empty-state svg{width:32px;height:32px;color:var(--primary)}.count-badge{display:inline-block;font-size:.875rem;vertical-align:middle;padding:3px 10px;border-radius:20px;color:var(--primary);background:var(--tint);letter-spacing:0}.capture-card{text-align:center;padding:40px 24px}.focus-frame{width:100px;height:100px;border:2px solid var(--primary);border-radius:24px;margin:0 auto 24px;display:grid;place-items:center;background:var(--tint)}.focus-frame svg{width:40px;height:40px}.capture-card h2{margin-bottom:12px}.capture-actions{max-width:350px;display:grid;gap:12px;margin:28px auto 16px}.capture-card .caption{margin-top:16px}.manual-entry{margin:24px 0}summary{cursor:pointer;font-weight:550;font-size:.9375rem;min-height:48px;padding:12px 0}details>summary:focus-visible{outline:2px solid var(--primary)}.photo-preview-frame{background:#e8edeb;border-radius:20px;margin:16px 0;padding:16px}#photo-preview{display:block;max-width:100%;max-height:260px;object-fit:contain;margin:auto;border-radius:8px}.loading-state{text-align:center;padding:32px 8px}.loading-state h2{margin:20px 0 8px}.scan-pulse{display:block;margin:auto;width:38px;height:38px;border:3px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:spin 1s linear infinite}.reading-status{text-align:center;color:var(--secondary-text);margin:16px 0}.error-state,.inline-error{padding:16px;background:#fff1ef;color:var(--error);border-radius:12px;font-size:.9375rem;line-height:1.7;margin:16px 0}.inline-error:empty{display:none}.error-state button{margin-top:12px}.review-rows{margin:24px 0}.review-row{background:white;border:1px solid var(--border);border-radius:16px;margin:12px 0;padding:16px;display:grid;grid-template-columns:24px 1fr;gap:12px;align-items:start}.review-row.excluded{opacity:.6}.review-fields{min-width:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}.review-row label{margin:0 0 6px;font-size:.875rem}.review-row .select-word{margin:14px 0;cursor:pointer}.review-row details,.review-row .uncertain-note{grid-column:1/-1;margin:0}.review-row details summary{font-size:.875rem;padding:4px 0;min-height:36px;color:var(--secondary-text)}.review-row details p{font-size:.9375rem;margin-top:6px}.uncertain-note{font-size:.875rem;color:#8a5100}.destination-box{margin:20px 0}.destination-box label:first-child{margin-top:0}.bottom-action{position:sticky;bottom:0;background:var(--background);padding:12px 0 calc(12px + env(safe-area-inset-bottom));z-index:4;border-top:1px solid var(--border)}.bottom-action .caption{display:block;text-align:center;margin-bottom:8px}.saved-card{text-align:center;padding:32px 24px}.success-mark{width:56px;height:56px;border-radius:50%;background:var(--tint);color:var(--success);font-size:1.75rem;display:grid;place-items:center;margin:0 auto 24px}.saved-card h1{margin-bottom:12px}.saved-card .study-actions{max-width:370px;margin:24px auto}.saved-card details{text-align:left;margin-top:24px;border-top:1px solid var(--border)}.lesson-word{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;padding:12px 0;align-items:center;border-bottom:1px solid var(--border);overflow-wrap:anywhere}.stats{display:grid;grid-template-columns:repeat(3,1fr);padding:20px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);gap:12px}.stats div{display:grid;gap:4px}.stats strong{font-size:1.5rem}.stats span{font-size:.875rem;color:var(--secondary-text)}.filters{display:flex;gap:12px;margin:24px 0 16px}.filters input{flex:1;min-width:0}.filters select{width:190px}.word-item{display:flex;align-items:start;justify-content:space-between;gap:16px;padding:20px;background:white;border:1px solid var(--border);border-radius:16px;margin-bottom:12px}.word-item>div:first-child{min-width:0;flex:1}.word-item h3{color:var(--primary);font-size:1.25rem;overflow-wrap:anywhere}.word-item p{margin-top:4px}.word-item small{display:block;margin-top:8px}.word-actions{display:flex;gap:4px}.word-actions button{padding:8px;color:var(--secondary-text);font-size:.875rem}.word-example{margin-top:12px}.word-example summary{font-size:.875rem;color:var(--primary);padding:4px 0;min-height:36px}.recent-card{margin-top:24px;background:var(--tint);border:0}.recent-card h3{font-size:1rem;margin:12px 0}.recent-sentence{font-size:1.125rem;line-height:1.65}.recent-card .muted{margin-top:8px}.quiz-panel{max-width:620px;margin:auto}.quiz-panel>label:first-child{margin-top:0}fieldset{border:0;padding:0;margin:24px 0}legend{font-size:1rem;font-weight:600;margin-bottom:12px}.study-modes{display:grid;grid-template-columns:1fr 1fr;gap:12px}.mode{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--border);padding:16px;border-radius:12px;margin:0;cursor:pointer}.mode:has(:checked){border-color:var(--primary);background:var(--tint)}.mode input{margin:3px 0 0}.mode strong{display:block;font-size:.9375rem}.mode small{display:block;font-size:.875rem;font-weight:400;margin-top:6px}.checkbox{display:flex;align-items:center;gap:10px;min-height:48px;font-weight:450}.quiz-top{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:.875rem;color:var(--secondary-text)}progress{accent-color:var(--primary)}.quiz-panel>progress{width:100%;height:6px;margin:12px 0 24px}.question{text-align:center;padding:32px 0}.mini-label{font-size:.875rem;color:var(--secondary-text)}.prompt{font-size:2rem;font-weight:700;line-height:1.45;overflow-wrap:anywhere;margin:20px 0}.answers{display:grid;gap:12px}.answer{background:white;border:1px solid var(--border);padding:18px;text-align:left}.answer.correct{background:#e8f4ed;border:2px solid var(--success);opacity:1}.answer.wrong{background:#fff1ef;border:2px solid var(--error);opacity:1}.feedback{background:#e8f4ed;color:#175434;padding:20px;border-radius:16px;margin:20px 0}.feedback.wrong{background:#fff1ef;color:#983126}.feedback p{margin-top:8px}.save-state{font-size:.875rem;color:var(--secondary-text);margin-top:12px}.quiz-next{position:sticky;bottom:calc(12px + env(safe-area-inset-bottom));z-index:3;box-shadow:0 0 0 8px white}.flash-answer{text-align:center;font-size:1.5rem;padding:24px;border-radius:16px;background:var(--tint);margin:16px 0}.result{text-align:center;padding:20px 0}.result .score{font-size:4rem;font-weight:750;color:var(--primary);margin:24px 0}.result .score small{font-size:1.5rem}.result .muted{margin-bottom:20px}.keys,.letter-answer{display:flex;flex-wrap:wrap;gap:8px}.letter-answer{min-height:72px;padding:12px;border:1px solid var(--border);border-radius:12px;align-items:center;margin:20px 0 8px}.letter-tile{min-width:44px;padding:10px 14px;background:var(--tint);font-size:1.25rem;font-weight:650;color:var(--primary);border:1px solid var(--border)}.letter-tile.used{opacity:.25}.chosen-letter{background:var(--primary);color:white}.letter-placeholder{font-size:.875rem;color:var(--secondary-text)}.letter-count{font-size:.875rem;color:var(--secondary-text);margin:8px 0 16px}.letter-controls{display:flex;gap:8px;margin:20px 0}.letter-controls button{flex:1;font-size:.875rem}.match-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}.match-column{display:grid;gap:12px}.match-tile{min-height:72px;padding:12px;background:white;border:1px solid var(--border);font-size:1rem;overflow-wrap:anywhere}.match-tile.selected{border:2px solid var(--primary);background:var(--tint)}.match-tile.matched{background:#e8f4ed;border-color:var(--success);opacity:.65}.match-message{min-height:48px;font-size:.9375rem}.score-summary{margin:20px 0}.quiz-panel>button{margin-top:12px}.settings-group{margin-bottom:16px}.settings-group h2{margin-bottom:16px}.setting-row{padding:12px 0}.settings-button{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;padding:16px 0;border-radius:0;border-bottom:1px solid var(--border)}.settings-button span{font-size:.875rem;color:var(--secondary-text);margin-left:12px;flex-shrink:0}.settings-group>.muted{font-size:.875rem;margin-top:16px}.advanced-settings summary{padding:0;display:flex;align-items:center}.settings-brand{text-align:center;color:var(--primary);font-weight:750;margin:32px 0}.settings-brand span{font-size:.875rem;font-weight:400;color:var(--secondary-text)}.bottom-nav{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:820px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:8px 12px calc(8px + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:#fffffffa;z-index:10}.tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:8px 4px;min-width:0;font-size:.8125rem;color:var(--secondary-text);border-radius:12px}.tab svg{width:22px;height:22px}.tab.active{background:var(--tint);color:var(--primary);font-weight:700}.capture-tab{color:var(--primary);font-weight:650}.capture-tab>[data-icon]{background:var(--primary);color:white;width:40px;height:32px;display:grid;place-items:center;border-radius:10px}.capture-tab.active{background:var(--tint)}[data-icon]{display:inline-flex;align-items:center;justify-content:center}[data-icon] svg{width:22px;height:22px}dialog{width:calc(100% - 32px);max-width:460px;max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--border);border-radius:24px;color:var(--text);overflow:auto;background:white}dialog::backdrop{background:#172b2770}dialog p{margin:16px 0}dialog h2{font-size:1.4rem}.dialog-actions{position:sticky;bottom:-24px;background:white;padding:16px 0 calc(16px + env(safe-area-inset-bottom));margin:20px 0 -24px;display:flex;gap:10px;border-top:1px solid var(--border);z-index:2}.dialog-actions button{flex:1}#toast{position:fixed;bottom:calc(100px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:var(--text);color:white;max-width:calc(100% - 32px);width:max-content;padding:14px 20px;border-radius:12px;z-index:40;font-size:.9375rem}.skip-link{position:fixed;top:-100px;left:16px;padding:12px;background:white;z-index:99}.skip-link:focus{top:10px}[hidden]{display:none!important}.focus-mode main{padding-bottom:32px}.focus-mode .app-header{padding-bottom:8px}
@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important}}
@media(min-width:900px){.home-hero{padding-top:32px}.home-hero h1 br{display:none}.hero-action{min-width:310px}.home-hero{max-width:none}.deck-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#home-decks{grid-template-columns:repeat(3,minmax(0,1fr))}.bottom-nav{border:1px solid var(--border);border-bottom:0;border-radius:20px 20px 0 0}}
@media(max-width:600px){.app-header{padding:20px}.brand-note{display:none}main{padding:12px 20px calc(110px + env(safe-area-inset-bottom))}.home-hero{padding:12px 0 24px}.hero-action{width:100%}.app-card,.panel{padding:20px}.page-title{gap:12px}.page-title h1{font-size:1.7rem}.page-title>button{font-size:.875rem;padding:10px 12px}.deck-grid{grid-template-columns:1fr}.deck-open{gap:6px}.deck-open .deck-symbol{float:left}.deck-card{padding:18px}.deck-open .deck-symbol{display:none}.review-summary{padding:20px}.section-title{margin-top:28px}.capture-card{padding:32px 20px}.study-modes{grid-template-columns:1fr}.mode{padding:14px}.mode small{margin-top:3px}.review-fields{grid-template-columns:1fr}.filters{flex-direction:column}.filters select{width:100%}.word-actions{flex-direction:column}.word-item{padding:16px}.word-item h3{font-size:1.125rem}.word-item small{font-size:.8125rem}.stats span{font-size:.8125rem}.prompt{font-size:1.75rem}.question{padding:20px 0}.match-grid{gap:10px}.match-tile{font-size:.9375rem}.bottom-nav{padding-left:10px;padding-right:10px}.tab{font-size:.75rem}.lesson-word{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.brand{font-size:1.3rem}.home-hero h1{font-size:2.25rem}.review-summary h2{font-size:1.5rem}}

.review-row>.draft-editor{grid-column:2;min-width:0}.draft-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none}.draft-summary::-webkit-details-marker{display:none}.draft-preview{display:grid;gap:4px;min-width:0}.draft-preview strong{font-size:1.125rem;color:var(--primary);overflow-wrap:anywhere}.draft-preview>span{font-size:1rem;overflow-wrap:anywhere}.draft-edit-label{font-size:.875rem;color:var(--secondary-text);flex-shrink:0}.draft-editor[open]>.review-fields{margin-top:16px;padding-top:16px;border-top:1px solid var(--border)}
.skip-link{top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0}.skip-link:focus{top:10px;width:auto;height:auto;clip-path:none;padding:12px}

/* Keep programmatic page-heading focus from drawing a browser frame. */
.page :is(h1,h2)[tabindex="-1"]:focus{outline:none}
#intro-title{background:transparent;border:0;box-shadow:none}
.deck-rename{margin-top:8px;padding-left:0}
/* One-finger scrolling remains available; touch zoom is disabled. */
html,body{touch-action:pan-x pan-y}

.launch-state{display:flex;align-items:center;gap:16px;padding:24px 0;color:var(--primary)}.launch-state img{flex-shrink:0;border-radius:14px}.launch-state strong{display:block;font-size:1.125rem}.launch-state span:not(.launch-spinner){display:block;font-size:.875rem;color:var(--secondary-text)}.launch-spinner{margin-left:auto;width:20px;height:20px;flex-shrink:0;border:2px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:spin 1s linear infinite}@media(prefers-reduced-motion:reduce){.launch-spinner{animation:none}}

/* A short brand entrance runs alongside loading, never delaying data requests. */
.brand-splash{position:fixed;inset:0;z-index:100;background:#155e52;color:white;display:grid;place-items:center;pointer-events:none;animation:splash-away .8s ease both}
.brand-splash-content{text-align:center;animation:splash-enter .5s cubic-bezier(.2,.8,.2,1) both}
.brand-splash img{display:block;margin:0 auto 20px;width:104px;height:104px}
.brand-splash-name{font-size:clamp(2.5rem,10vw,3.5rem);font-weight:800;letter-spacing:-.055em;line-height:1.2}
.brand-splash-tagline{font-size:1rem;letter-spacing:.08em;margin-top:14px;color:#d1e9e1}
@keyframes splash-enter{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
@keyframes splash-away{0%,65%{opacity:1;visibility:visible}100%{opacity:0;visibility:hidden}}
@media(prefers-reduced-motion:reduce){.brand-splash,.brand-splash-content{animation:none}.brand-splash{display:none}}

.language-settings{display:grid;grid-template-columns:1fr 1fr;gap:12px;text-align:left;margin:20px auto;max-width:480px}.language-settings label{margin:0 0 8px}.language-settings input{margin-top:8px}.language-settings>div{min-width:0}.language-settings select{font-size:1rem}@media(max-width:360px){.language-settings{grid-template-columns:1fr}}

.mode input[type=radio]{appearance:none;-webkit-appearance:none;border:1.5px solid var(--border);border-radius:50%;padding:0;width:20px;height:20px;background:white;outline:none;flex-shrink:0}.mode input[type=radio]:checked{border:6px solid var(--primary)}.mode input[type=radio]:focus{outline:none}.mode:has(input:focus-visible){outline:2px solid var(--primary);outline-offset:3px}#due-help{margin:-8px 0 20px}.card-navigation{display:flex;gap:12px;margin-top:16px}.card-navigation button{flex:1}.swipe-cards{touch-action:pan-y}.swipe-hint{text-align:center;margin-top:20px}.photo-privacy{margin-top:16px;text-align:left;font-size:.875rem;color:var(--secondary-text)}.photo-privacy summary{text-align:center;font-size:.8125rem;font-weight:400}.photo-privacy p{margin:12px 0}.photo-privacy a{color:var(--primary)}

/* Compact app shell: navigation stays visible; long content scrolls inside. */
html{height:100%;overflow:hidden}body{height:100dvh;overflow:hidden;display:flex;flex-direction:column}
.app-header{width:100%;flex:none;padding:14px 24px}.brand-note{font-size:.75rem}
main#main{width:100%;flex:1;min-height:0;overflow:hidden;padding:12px 24px 16px}
.page{height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:2px}
.bottom-nav{position:relative;bottom:auto;left:auto;transform:none;width:100%;margin:0 auto;flex:none}
body.focus-mode main#main{padding-bottom:16px}
.home-hero{padding:4px 0 18px}.home-hero h1{font-size:clamp(1.8rem,6vw,2.6rem);margin:8px 0}.home-hero .sub{margin:8px 0 16px}.hero-action{min-height:52px}
#home-capture,#camera,.bottom-nav .capture-tab [data-icon]{background:linear-gradient(135deg,#298975 0%,#176657 52%,#104b42 100%);color:#fff;box-shadow:inset 0 1px 0 #ffffff30,0 4px 12px #155e521a;border-color:#155e52}
#home-capture:hover,#camera:hover{filter:brightness(1.07)}
.review-summary{padding:16px;margin-bottom:16px}.review-summary h2{font-size:1.35rem;margin:4px 0}.review-summary p{margin:0}.section-title{margin:12px 0}.section-title h2{font-size:1.1rem}
#home-decks{gap:8px}#home-decks .deck-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:0;border-radius:16px}#home-decks .deck-open{display:grid;grid-template-columns:36px minmax(0,1fr);gap:2px 10px;padding:12px;text-align:left}#home-decks .deck-symbol{grid-row:span 2;width:36px;height:36px;margin:0}#home-decks .deck-open strong{font-size:.95rem;margin:0;overflow-wrap:anywhere}#home-decks .deck-open>span:last-child{font-size:.75rem}#home-decks .deck-progress{display:none}#home-decks .deck-rename{position:static;margin:0 8px 0 0;font-size:.75rem}
.page-title{margin-bottom:16px}.page-title h1{font-size:1.6rem}.page-title .eyebrow{margin:0 0 4px}.capture-card{padding:20px}.focus-frame{width:64px;height:64px;margin:0 auto 12px}.focus-frame svg{width:30px;height:30px}.capture-card h2{font-size:1.15rem;margin:8px 0}.capture-card>p{font-size:.875rem;margin:8px 0}.language-settings{margin:16px auto;gap:10px}.capture-actions{gap:10px}.photo-privacy{margin-top:12px}.manual-entry{margin-top:12px}
.study-modes{grid-template-columns:1fr 1fr;gap:12px;margin-bottom:0}.study-modes .mode{display:flex;min-height:112px;align-items:center;text-align:left;padding:18px;border:1px solid var(--border);border-radius:16px;background:var(--surface);color:var(--text);box-shadow:none}.mode strong{font-size:1.05rem;display:block;color:var(--primary)}.mode small{display:block;margin-top:8px;line-height:1.5;color:var(--secondary-text)}.study-modes .mode:hover{background:#edf6f2;border-color:#6ea998}.study-modes .mode:active{transform:scale(.98)}#quiz-warning:empty{display:none}
#words{display:flex;flex-direction:column}#words>.page-title{flex:none}#deck-overview{display:flex;flex-direction:column;min-height:0;flex:1}#deck-cards{min-height:110px;overflow:auto;overscroll-behavior:contain;flex:1;align-content:start;padding:2px;gap:10px}#deck-cards .deck-open{padding:16px}#deck-cards .deck-progress{padding:0 16px 12px}#deck-cards .deck-symbol{width:32px;height:32px;margin-bottom:8px}#deck-overview>#show-all-words{flex:none;align-self:center}
.recent-card{position:relative;flex:none;margin-top:10px;padding:18px 20px;border:1px solid #d8e8df;border-radius:20px;background:linear-gradient(125deg,#edf6f1,#fafcf8);box-shadow:none;overflow:hidden}.recent-card::before{content:'“';position:absolute;right:14px;top:-12px;font-family:Georgia,serif;font-size:100px;line-height:1;color:#155e5212;pointer-events:none}.recent-card h3{display:inline-block;margin:10px 0 0;padding:4px 10px;background:#fff;border:1px solid #d8e8df;border-radius:8px;color:var(--primary);font-size:.85rem}.recent-sentence{font-size:1.05rem;line-height:1.55;margin:10px 0 6px;overflow-wrap:anywhere}.recent-card p.muted{margin:0;font-size:.85rem}.recent-actions{margin-top:8px}.recent-actions button{font-size:.8rem}.recent-card #sample{margin:0}.recent-card .eyebrow{font-size:.7rem}
#quiz-play.swipe-cards{background:transparent;border:0;box-shadow:none;padding:4px 8px;overflow-x:hidden}.flashcard{position:relative;margin:18px 0;padding:24px 20px;border:1px solid #d4e4dc;border-radius:24px;background:linear-gradient(155deg,#fff 65%,#f0f7f3);box-shadow:0 6px 0 -2px #e0ece5,0 12px 0 -5px #ceded5,0 12px 28px #123d2d0b;min-height:250px;overflow-wrap:anywhere}.flashcard .question{padding:12px 0 24px;margin:0}.flashcard .prompt{font-size:clamp(1.8rem,7vw,2.8rem)}.flashcard .flash-answer{margin:12px 0}.flashcard>.button-row{margin-top:20px}.swipe-hint{margin:20px 0 8px}.card-navigation{margin-top:8px}
@media(max-width:640px){.app-header{padding:12px 20px}main#main{padding:6px 16px 12px}.home-hero{padding:2px 0 14px}.home-hero .eyebrow{font-size:.7rem}.review-summary{padding:12px}.review-summary .muted{font-size:.75rem}.capture-card{padding:16px}.language-settings{grid-template-columns:1fr 1fr}.quiz-panel{padding:18px}.study-modes .mode{padding:14px;min-height:110px}#home-decks{grid-template-columns:1fr}#deck-cards{grid-template-columns:1fr 1fr}#deck-cards .deck-open strong{font-size:.95rem;overflow-wrap:anywhere}#deck-cards .deck-open>span:last-child{font-size:.7rem}.recent-card{padding:14px 16px}.recent-sentence{font-size:.95rem}.brand-note{display:none}}
@media(max-height:720px){.app-header{padding-top:8px;padding-bottom:8px}.home-hero h1{font-size:1.8rem}.home-hero .sub{font-size:.85rem;margin:6px 0 12px}.home-hero{padding-bottom:10px}.review-summary{margin-bottom:8px}.review-summary .muted{display:none}.section-title{margin:6px 0}#home-decks .deck-open{padding:8px 10px}.capture-card .focus-frame{width:44px;height:44px;margin-bottom:6px}.capture-card .focus-frame svg{width:24px;height:24px}.capture-card>p{margin:4px 0}.language-settings{margin:10px auto}.page-title{margin-bottom:10px}.recent-card{max-height:220px;overflow:auto}.flashcard{min-height:220px;padding:18px}.study-modes .mode{min-height:96px}}
@media(prefers-reduced-motion:reduce){.study-modes .mode:active{transform:none}}
#home-decks .deck-symbol{display:grid;grid-column:1;grid-row:1 / 3}#home-decks .deck-open strong,#home-decks .deck-open>span:last-child{grid-column:2}
#home-decks .deck-card{min-height:0}#home-decks .deck-open{min-height:64px}
.capture-actions{margin:14px auto 10px}.capture-card h2{display:none}.manual-entry{margin-bottom:0}
#deck-cards .deck-card{padding:14px}#deck-cards .deck-open{padding:0 16px 0 0}#deck-cards .deck-progress{padding:10px 0 0}#deck-cards .deck-menu{right:6px;top:6px}
@media(max-height:720px){.capture-card>p br{display:none}.capture-card>p{font-size:.8rem}.capture-card{padding:12px}.capture-actions{margin:10px auto 8px}.language-settings label{font-size:.8rem;margin-bottom:4px}.manual-entry{margin-top:8px}}
@media(max-height:720px){#home-decks .deck-open{padding:6px 10px;min-height:60px}.review-summary{padding:10px}}
@media(max-height:620px){#home-decks .deck-card:nth-child(n+3){display:none}.home-hero>.eyebrow{display:none}.capture-card .focus-frame{display:none}.capture-actions{grid-template-columns:1fr 1fr}.capture-actions button{padding:8px;font-size:.8rem;gap:4px}.capture-actions svg{width:18px;height:18px}.recent-card{max-height:172px}.quiz-panel{padding:12px}.study-modes{gap:8px}.study-modes .mode{min-height:82px;padding:10px}.mode small{font-size:.7rem;margin-top:4px}.mode strong{font-size:.95rem}#quiz-setup .page-title .eyebrow{display:none}}
@media(max-height:720px){.hero-action{min-height:48px;padding:12px 18px}.home-hero{padding-bottom:6px}.home-hero .sub{margin-bottom:8px}#home .section-title{margin:0}.home-hero h1{margin-top:4px;margin-bottom:4px}}

/* Home keeps a relaxed reading rhythm, including on short phone screens. */
#home{padding:20px 6px 32px;scroll-padding-bottom:24px}
#home .home-hero{padding:12px 0 32px;max-width:640px}
#home .home-hero>.eyebrow{display:block;font-size:.8125rem;margin-bottom:12px}
#home .home-hero h1{font-size:clamp(2rem,6.6vw,3rem);line-height:1.3;margin:12px 0 16px}
#home .home-hero .sub{font-size:1rem;line-height:1.7;margin:0 0 24px}
#home .hero-action{min-height:58px;padding:16px 24px}
#home .review-summary{padding:22px;margin:0;border-radius:20px}
#home .review-summary h2{font-size:1.5rem;margin:6px 0}
#home .review-summary .muted{display:block;font-size:.8125rem;line-height:1.65}
#home .section-title{margin:32px 0 16px}
#home .section-title h2{font-size:1.2rem}
#home-decks{gap:14px}
#home-decks .deck-card:nth-child(n){display:grid;border-radius:18px}
#home-decks .deck-open{padding:18px 14px;min-height:88px;gap:5px 12px;grid-template-columns:40px minmax(0,1fr)}
#home-decks .deck-symbol{width:40px;height:40px}
#home-decks .deck-open strong{font-size:1rem}
#home-decks .deck-open>span:last-child{font-size:.8125rem}
#home-decks .deck-rename{margin-right:10px}
@media(min-width:641px){#home{padding-top:28px}#home .home-hero{padding-bottom:40px}#home .section-title{margin-top:36px}}
@media(max-width:360px){#home .review-summary{padding:18px;gap:10px}#home .review-summary h2{font-size:1.25rem}#home .review-summary .secondary{padding:12px}#home .hero-action{padding:16px 18px;font-size:.9375rem}}

/* Photo-to-card home, with two visible recent books and a bounded list. */
body:has(#home:not([hidden])){background:radial-gradient(ellipse at 85% 20%,#e8f6f1,transparent 55%),#f7fbf9}
body:has(#home:not([hidden])) .app-header{padding-top:20px;padding-bottom:16px}.app-header .brand{gap:10px}
body:has(#home:not([hidden])) .brand{font-size:1.65rem}body:has(#home:not([hidden])) .brand img{width:42px;height:42px}
#home{padding:8px 6px 12px;display:flex;flex-direction:column;gap:0}
#home .home-hero{max-width:none;padding:12px 0 24px;flex:none}
.hero-story{display:grid;grid-template-columns:minmax(0,1fr) 34%;align-items:center;gap:8px;margin-bottom:20px;min-height:180px}
.hero-copy{min-width:0}.hero-illustration{width:100%;height:auto;max-height:230px;object-fit:contain;filter:drop-shadow(0 8px 12px #17533f12)}
#home .home-hero>.eyebrow,#home .hero-copy>.eyebrow{display:inline-block;padding:6px 10px;border-radius:30px;background:#e4f3ed;color:#47726a;font-size:.7rem;margin:0 0 10px}
#home .home-hero h1{font-size:clamp(2rem,4.4vw,3.1rem);line-height:1.12;margin:4px 0 14px;color:#084f42;letter-spacing:-.055em}
#home .home-hero .sub{font-size:.95rem;margin:0;line-height:1.6;color:#68716f}
#home-capture,#camera{background:linear-gradient(180deg,#177965,#116c59);border:1px solid #13725f;border-bottom:4px solid #075240;border-radius:18px;box-shadow:inset 0 2px 1px #ffffff25,0 5px 9px #125e4c15;color:white;transition:transform .12s,box-shadow .12s}
#home .hero-action{width:100%;min-height:60px;padding:16px 18px;font-size:1.05rem;gap:12px}
.button-chevron{font-size:1.7rem;line-height:1;margin-left:2px;font-weight:400}
#home-capture:active,#camera:active{transform:translateY(2px);box-shadow:inset 0 1px 2px #06463333;border-bottom-width:2px}
.bottom-nav .capture-tab [data-icon]{background:linear-gradient(180deg,#178570,#106b58);border:1px solid #13745e;border-bottom:3px solid #075240;border-radius:50%;width:48px;height:48px;box-shadow:inset 0 2px 1px #ffffff35,0 4px 8px #155e5218;display:grid;place-items:center}.bottom-nav .capture-tab svg{width:27px;height:27px}
#home-content{display:flex;flex-direction:column;flex:1;min-height:min-content}
#home .review-summary{display:block;padding:20px;border:1px solid #e0ece6;background:#ffffffdd;box-shadow:0 5px 18px #164f3e04;border-radius:22px}
.learning-overview{display:flex;justify-content:space-between;align-items:center;gap:12px}
#home .review-summary .eyebrow{font-size:.875rem;color:#47746c;margin-bottom:10px}#home .review-summary h2{font-size:1.45rem;margin:0 0 6px}#home .review-summary .muted{font-size:.8rem;color:#707976}
.learning-progress{display:flex;gap:10px;align-items:center;background:#f0f8f4;border-radius:20px;padding:12px}.learning-progress strong{display:block;font-size:1.25rem;color:#143f35}.learning-progress .caption{font-size:.7rem;white-space:nowrap}
.learning-ring{--progress:0%;width:52px;height:52px;border-radius:50%;background:conic-gradient(#1b9d80 var(--progress),#dceee7 0);display:grid;place-items:center;flex:none}.learning-ring>span{display:grid;place-items:center;background:#f5fbf8;border-radius:50%;width:40px;height:40px;color:#15735d}.learning-ring svg{width:22px;height:22px}
#home-review{width:100%;margin-top:16px;background:#e8f5ee;border:0;border-radius:14px;min-height:48px}#home-review::before{content:'↗';font-size:1.2rem}#home-review::after{content:'›';margin-left:8px;font-size:1.4rem}
#home .section-title{margin:24px 0 14px}#home .section-title h2{font-size:1.3rem}
#home-decks{--row-height:88px;display:grid;grid-template-columns:1fr;grid-auto-rows:var(--row-height);gap:12px;max-height:calc(var(--row-height)*2 + 12px);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b5d3c5 transparent;scroll-snap-type:y proximity;flex:none;padding:0 2px 0 0;margin-bottom:4px}
#home-decks .deck-card:nth-child(n){display:grid;border-radius:20px;min-height:0;height:var(--row-height);border:1px solid #deebe4;background:#fffffff2;scroll-snap-align:start;grid-template-columns:minmax(0,1fr) 44px;box-shadow:0 3px 10px #155e5203}
#home-decks .deck-open{min-height:0;height:100%;padding:12px;grid-template-columns:56px minmax(0,1fr);gap:4px 12px;align-content:center;overflow:hidden}
#home-decks .deck-open strong{font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#home-decks .deck-open>span:last-child{font-size:.73rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#home-decks .deck-symbol{width:56px;height:58px;background:#eff7f2;border-radius:12px;position:relative;overflow:visible}
#home-decks .deck-symbol>span{display:none}#home-decks .deck-symbol::before{content:'';width:30px;height:39px;background:linear-gradient(90deg,#31715a 10%,#79ad8c 12%,#559171);border:1px solid #5c9b7f;border-bottom:5px solid #dedccb;border-radius:4px 5px 5px 4px;box-shadow:2px 4px 3px #224a3226;transform:rotate(-13deg)}#home-decks .deck-symbol::after{content:'';position:absolute;width:18px;height:12px;background:#e5eedb;border-radius:2px;top:18px;left:18px;transform:rotate(-13deg)}
#home-decks .deck-card:nth-child(even) .deck-symbol{background:#f8f5ee}#home-decks .deck-card:nth-child(even) .deck-symbol::before{background:linear-gradient(90deg,#a08c6b 10%,#d3c2a1 12%,#c0ad8b);border-color:#beaa85}
#home-decks .deck-rename{margin:0 8px 0 0;padding:0;min-height:36px;width:36px;height:36px;border-radius:50%;background:#f4f5f4;font-size:1.3rem;color:#6b716f}
#home-decks:has(.empty-state){display:block;max-height:none}.empty-state{padding:24px}
@media(min-height:850px){#home .home-hero{padding-top:24px;padding-bottom:28px}#home .section-title{margin-top:32px}}
@media(min-width:641px){.hero-story{min-height:230px;grid-template-columns:minmax(0,1fr) 240px}#home-decks{--row-height:94px}#home .home-hero h1{white-space:nowrap}}
@media(max-width:360px){.hero-story{grid-template-columns:minmax(0,1fr) 30%;gap:4px}#home .hero-copy>.eyebrow{font-size:.62rem;padding:6px 8px}#home .home-hero h1{font-size:1.9rem}#home .hero-action{font-size:.95rem;padding:14px 10px;gap:8px}.learning-progress{padding:8px;gap:6px}.learning-ring{width:36px;height:36px}.learning-ring>span{width:28px;height:28px}.learning-ring svg{width:18px;height:18px}#home .review-summary{padding:16px}.learning-overview{gap:8px}#home .review-summary h2{font-size:1.15rem}#home-decks .deck-open{grid-template-columns:46px minmax(0,1fr);gap:4px 8px}#home-decks .deck-symbol{width:46px}}
#home .home-hero h1{text-wrap:balance}
body:has(#home:not([hidden])) .app-header{padding-top:14px;padding-bottom:12px}
#home .home-hero{padding:0 0 18px}.hero-story{min-height:140px;margin-bottom:14px}
#home .review-summary{padding:14px 16px}.learning-progress{padding:10px}#home .review-summary .eyebrow{margin-bottom:6px}#home .review-summary h2{margin-bottom:2px}#home-review{margin-top:10px;min-height:44px;padding:8px 16px}
#home .section-title{margin:18px 0 10px}#home .section-title button{min-height:40px;padding-top:6px;padding-bottom:6px}
#home-decks{--row-height:80px;gap:10px;max-height:calc(var(--row-height)*2 + 10px)}#home-decks .deck-open{padding:10px 12px}
@media(min-width:641px){.hero-story{min-height:180px}#home-decks{--row-height:88px}}
#home{padding-bottom:0}#home .home-hero h1{margin-bottom:8px}#home .hero-action{min-height:56px;padding-top:13px;padding-bottom:13px}
#home .review-summary{padding-top:12px;padding-bottom:12px}.learning-progress{padding:8px}.hero-illustration{max-height:180px}
#home .section-title{margin-top:14px;margin-bottom:8px}

/* A calmer header and balanced working screens. */
.app-header,body:has(#home:not([hidden])) .app-header{padding:calc(24px + env(safe-area-inset-top)) 24px 18px}
.app-header .brand,body:has(#home:not([hidden])) .brand{font-size:1.4rem;gap:9px}
.app-header .brand img,body:has(#home:not([hidden])) .brand img{width:36px;height:36px}
.hero-story{grid-template-columns:minmax(0,1fr) 39%;gap:2px}.hero-illustration{width:112%;max-width:none;margin-left:-6%;max-height:210px;filter:drop-shadow(0 6px 10px #174c3710)}
#home .hero-copy>.eyebrow{white-space:nowrap;font-size:.66rem;padding:6px 8px}#home .home-hero h1{font-size:clamp(1.95rem,4.4vw,3rem)}
#home-capture,#camera{background:linear-gradient(180deg,#186559,#155e52);border-color:#14584c;border-bottom-color:#0a4238;box-shadow:inset 0 2px 1px #ffffff25,0 5px 10px #123f3220}
.bottom-nav{overflow:visible;padding-top:10px}.bottom-nav .capture-tab{position:relative;overflow:visible;background:transparent;gap:0}
.bottom-nav .capture-tab [data-icon]{position:relative;top:-18px;width:60px;height:60px;margin-bottom:-15px;border:4px solid #f7fbf9;background:linear-gradient(180deg,#186d5f,#155e52);box-shadow:inset 0 2px 2px #ffffff30,0 6px 12px #155e5230;border-radius:50%}
.bottom-nav .capture-tab svg{width:30px;height:30px}.bottom-nav .capture-tab:active [data-icon]{transform:translateY(2px)}
.bottom-nav .capture-tab>span:last-child{font-size:.8rem;font-weight:750;color:#155e52}
main#main{padding-bottom:24px}
#capture-start,#quiz-setup{max-width:620px;margin:clamp(24px,5dvh,56px) auto 32px}
#capture-start>.page-title,#quiz-setup>.page-title{margin-bottom:28px}
#capture-start .capture-card{padding:28px 24px;border-radius:24px}
#capture-start .focus-frame{display:grid;width:76px;height:76px;margin:0 auto 20px}
#capture-start .focus-frame svg{width:36px;height:36px}
#capture-start .capture-card>p{font-size:.95rem;margin:0 0 20px;line-height:1.75}
#capture-start .language-settings{margin:24px auto;gap:12px}
#capture-start .capture-actions{margin:24px auto 16px;gap:12px}#capture-start .capture-actions button{min-height:54px}
#capture-start .manual-entry{margin-top:22px}
#quiz-setup .quiz-panel{padding:28px 24px;border-radius:24px}
#quiz-setup .study-modes{margin-top:28px;gap:14px}#quiz-setup .study-modes legend{margin-bottom:14px}
#quiz-setup .mode{min-height:140px;padding:20px 16px;align-items:flex-start;flex-direction:column;justify-content:center}
#quiz-setup .mode strong{font-size:1.1rem}#quiz-setup .mode small{font-size:.85rem;line-height:1.7;margin-top:10px}
.pull-refresh{position:fixed;z-index:110;top:calc(10px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);padding:10px 18px;border:1px solid #d4e8dd;border-radius:24px;background:#ffffffed;box-shadow:0 4px 18px #155e521a;color:#155e52;font-size:.85rem;white-space:nowrap;pointer-events:none}
@media(min-width:641px){.hero-story{grid-template-columns:minmax(0,1fr) 260px}.hero-illustration{max-height:220px}}
@media(max-width:360px){.app-header,body:has(#home:not([hidden])) .app-header{padding-left:20px;padding-right:20px}.hero-story{grid-template-columns:minmax(0,1fr) 36%}#home .hero-copy>.eyebrow{font-size:.56rem;padding:6px}#capture-start .capture-card,#quiz-setup .quiz-panel{padding:22px 16px}#quiz-setup .mode{min-height:128px;padding:16px 12px}#quiz-setup .mode strong{font-size:1rem}}
.hero-illustration{width:100%;margin-left:0}.bottom-nav .capture-tab{transform:translateY(-12px)}
main#main{padding-bottom:12px}#home{padding-top:4px}#home .home-hero{padding-bottom:14px}
#capture-start,#quiz-setup{margin-top:24px;margin-bottom:20px}
#capture-start .capture-card{padding-top:22px;padding-bottom:22px}#capture-start .focus-frame{width:60px;height:60px;margin-bottom:14px}
#capture-start .capture-card>p{margin-bottom:14px}#capture-start .language-settings{margin:18px auto}#capture-start .capture-actions{margin:18px auto 12px}#capture-start .manual-entry{margin-top:16px}
#quiz-setup .mode{min-height:132px}

/* Let the browser scroll without nested viewport clipping or snap corrections. */
.page{overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;scroll-behavior:auto}
#words{display:block}#deck-overview{display:block;min-height:0}#deck-cards{display:grid;overflow:visible;max-height:none;min-height:0;flex:none;grid-auto-rows:auto;align-content:start}
#deck-overview>#show-all-words{display:flex;margin:12px auto}
#home-decks{scroll-snap-type:none}#home-decks .deck-card{scroll-snap-align:none}
.hero-illustration{filter:none}#home-capture:hover,#camera:hover{filter:none}
.word-item{content-visibility:auto;contain-intrinsic-size:auto 180px}
#home .hero-copy>.eyebrow{font-size:.82rem;line-height:1.6;white-space:normal;padding:7px 11px}
#home .home-hero h1{color:#111817}
.app-header .brand,body:has(#home:not([hidden])) .brand{color:#104f45;background:none;-webkit-text-fill-color:#104f45}
#home-capture,#camera{background:linear-gradient(180deg,#135a4e,#104e43);border:1px solid #104b40;border-bottom:6px solid #07392f;box-shadow:inset 0 2px 1px #ffffff25,0 6px 10px #123f3220;transition:transform .12s}
#home-capture:active,#camera:active{transform:translateY(3px);border-bottom-width:6px;box-shadow:inset 0 1px 2px #062f2930,0 2px 4px #123f3215}
.bottom-nav .capture-tab [data-icon]{background:linear-gradient(180deg,#145f52,#0e4b40);box-shadow:inset 0 2px 1px #ffffff28,inset 0 -5px 0 #07392f,0 6px 10px #123f3226}
#words .recent-card{margin-top:12px;padding:12px 16px;border-radius:16px;max-height:none;overflow:visible}
#words .recent-card::before{font-size:64px;top:-4px}#words .recent-card h3{margin-top:6px;padding:2px 8px;font-size:.8rem}
#words .recent-sentence{font-size:.9rem;margin:6px 0 4px;line-height:1.5}#words .recent-card p.muted{font-size:.8rem;line-height:1.5}
#words .recent-actions{margin-top:4px;gap:8px}#words .recent-actions button{padding:4px 8px;min-height:44px}#words .recent-card #sample{min-height:44px;padding-top:4px;padding-bottom:4px}
#words-heading{font-size:2rem;line-height:1.25;font-weight:800}#active-deck-name{font-size:clamp(1.65rem,5.5vw,2.15rem);line-height:1.3;font-weight:800;overflow-wrap:anywhere}
.deck-detail-title{align-items:center;margin:16px 0 20px}.deck-detail-title h2{min-width:0;flex:1}.deck-detail-title button{flex-shrink:0}
@media(max-width:360px){#home .hero-copy>.eyebrow{font-size:.75rem;padding:6px 8px}}

.study-chart-icon{width:22px;height:22px;fill:#115a4b;flex:none}#home .review-summary .eyebrow{display:flex;align-items:center;gap:9px}
/* UI direction is independent from the language of saved learning content. */
.brand,.brand-note,#intro-title,.settings-brand,#home-learned{direction:ltr;unicode-bidi:isolate}
.deck-open,.deck-menu-actions button,.mode,.language-settings,.photo-privacy{text-align:start}
.interface-settings label{margin-top:0}.interface-settings p{margin-top:12px;font-size:.875rem}
.prompt,.answer,.recent-sentence,.match-card{unicode-bidi:plaintext}
html[dir=rtl] #deck-cards .deck-menu{right:auto;left:6px}
html[dir=rtl] #deck-cards .deck-open{padding:16px}
.deck-menu:not([open]){width:48px;height:48px}
html[dir=rtl] h1,html[dir=rtl] h2,html[dir=rtl] .brand{letter-spacing:normal}
html[dir=rtl] .text-button{padding-left:12px;padding-right:0}
html:not([lang=ko]) .page-title{flex-wrap:wrap}
html:not([lang=ko]) .page-title>button{max-width:100%}
html:not([lang=ko]) .mode strong,html:not([lang=ko]) .bottom-nav button{overflow-wrap:anywhere}
html:not([lang=ko]) .review-summary h2{overflow-wrap:anywhere}
#home .review-summary h2{font-size:1.25rem;line-height:1.4;letter-spacing:-.04em}#home-due .review-count{color:#116653;white-space:nowrap}
#home .review-summary .muted{font-size:.76rem;max-width:210px}#home-learned{font-size:1.1rem;white-space:nowrap;font-variant-numeric:tabular-nums}
.learning-ring{background:conic-gradient(#13876d var(--progress),#dceee7 0)}
#home .hero-action{width:calc(100% - 28px);max-width:380px;display:flex;margin:0 auto;min-height:58px}
@media(max-width:360px){#home .review-summary h2{font-size:1.05rem}.learning-progress{gap:5px;padding:6px}#home-learned{font-size:.95rem}#home .hero-action{width:calc(100% - 16px)}}
/* Native tap flash is replaced by our own pressed state; keyboard focus stays visible. */
.bottom-nav button{-webkit-tap-highlight-color:transparent;user-select:none}
.bottom-nav button:focus-visible{outline-color:var(--primary)}
.bottom-nav .capture-tab [data-icon]{transition:transform .1s ease,box-shadow .1s ease}
.bottom-nav .capture-tab:active [data-icon]{transform:translateY(5px) scale(.96);box-shadow:inset 0 2px 3px #062f2950,inset 0 -1px 0 #07392f,0 1px 2px #123f3220}
#home-capture,#camera{-webkit-tap-highlight-color:transparent}
#home-capture:active,#camera:active{transform:translateY(4px) scale(.985);box-shadow:inset 0 2px 4px #062f2940,0 1px 2px #123f3215}
.language-settings{width:100%;max-width:560px;grid-template-columns:minmax(0,1fr)}
.language-settings>div{min-width:0}.language-settings select,#interface-language{width:100%;min-width:0;padding-inline:12px 30px}
.settings-button{text-align:start;gap:12px}.settings-button span{margin:0;min-width:0;flex-shrink:1;overflow-wrap:anywhere}
.settings-button>span:first-child{color:var(--text);font-size:inherit}.settings-button>span:last-child:not(:first-child){flex-shrink:0}
@media(prefers-reduced-motion:reduce){.bottom-nav .capture-tab [data-icon]{transition:none}}
#account-settings>button{margin:6px 8px 6px 0;min-height:44px;white-space:normal}#account-settings>p{overflow-wrap:anywhere}.offline-notice{margin:12px 16px;padding:12px 16px;border-radius:14px;background:#fff4d8;color:#604513;font-size:.85rem;line-height:1.5}
