:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#101e40;background:#fff;font-synthesis:none;--blue:#0669ff;--muted:#536785;--line:#d5dfeb;--pale:#e5f1ff}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,.button{display:inline-flex;justify-content:center;align-items:center;gap:10px;min-height:48px;padding:12px 16px;border:1px solid var(--line);border-radius:9px;background:white;color:#101e40;font-size:15px;font-weight:600;line-height:1.3;cursor:pointer;text-decoration:none}button:hover,.button:hover{background:#f1f6fd}button:disabled{opacity:.5;cursor:wait}button.primary,.button.primary{background:var(--blue);color:white;border-color:var(--blue)}button.primary:hover{background:#0059dd}button.outline{color:var(--blue);border-color:var(--blue)}a{color:var(--blue)}:focus-visible{outline:3px solid #87b9ff;outline-offset:3px}[hidden]{display:none!important}.icon{width:24px;height:24px;flex-shrink:0}.icon-button{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border:0;padding:10px;background:transparent;color:var(--muted)}.brand{font-size:21px;font-weight:800;color:#101e40;text-decoration:none;white-space:nowrap}.brand span{font-size:18px;font-weight:400;color:#36547b;border-left:1px solid var(--line);margin-left:8px;padding-left:12px}#header{max-width:1200px;height:80px;margin:auto;display:flex;justify-content:space-between;align-items:center;padding:0 24px;border-bottom:1px solid var(--line)}#app{max-width:1120px;margin:auto;padding:28px 24px 110px;outline:none}h1{font-size:28px;line-height:1.22;letter-spacing:-1px;margin:0 0 10px;font-weight:750}h2{font-size:20px;letter-spacing:-.4px;margin:0}h3{font-size:17px;margin:0}p{line-height:1.55}small,.muted{color:var(--muted)}small{font-size:13px}.subtitle{color:var(--muted);font-size:17px;margin:0 0 24px}.wide{width:100%}.stack{display:grid;gap:12px}.row{display:flex;align-items:center;gap:12px}.between{justify-content:space-between}.wrap{flex-wrap:wrap}.text-button{border:0;background:transparent;color:var(--muted);font-weight:400;text-decoration:underline}.study-panel{padding:24px;background:#e3f0ff;border-radius:11px;margin-bottom:20px}.study-panel p{margin:0}.study-number{display:block;font-size:43px;letter-spacing:-1.8px;line-height:1.1;margin:6px 0 22px;font-weight:700}.study-panel .primary{min-height:52px}.scan-cta{min-height:54px;width:100%;font-size:16px}.section-heading{margin:26px 0 12px;display:flex;justify-content:space-between;align-items:center}.deck-list{display:grid;gap:12px}.deck-row{width:100%;text-align:left;justify-content:flex-start;padding:15px 12px;gap:14px;min-height:88px;font-weight:400}.book-icon{background:#e5f1ff;color:var(--blue);border-radius:8px;width:44px;height:48px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.book-icon .icon{width:28px;height:28px}.deck-row:nth-child(3n+2) .book-icon{background:#def3ed;color:#00a18b}.deck-row:nth-child(3n) .book-icon{background:#eeebff;color:#7152ed}.deck-body{min-width:0;flex:1}.deck-title{font-size:16px;font-weight:650;overflow-wrap:anywhere}.deck-meta{font-size:13px;color:var(--muted);margin:4px 0 8px}.due-label{color:var(--blue);font-size:12px;white-space:nowrap}.track{height:6px;background:#dce6f1;border-radius:5px;overflow:hidden}.track span{display:block;height:100%;background:var(--blue);border-radius:5px}.sync-status{font-size:12px;text-align:center;color:var(--muted);margin-top:22px;line-height:1.5}.empty{padding:28px 0;text-align:center}.empty p{color:var(--muted)}#nav{position:fixed;bottom:0;left:0;right:0;border-top:1px solid var(--line);background:rgba(255,255,255,.98);display:flex;justify-content:center;gap:20px;padding:8px 12px max(8px,env(safe-area-inset-bottom));z-index:5}#nav button{border:0;min-width:82px;display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:400;color:var(--muted);padding:4px 8px;background:transparent}#nav button[aria-current=page]{color:var(--blue)}#nav .icon{width:25px;height:25px}.search{margin-bottom:14px}label{display:block;color:var(--muted);font-size:14px;line-height:1.4}input:not([type=checkbox]),textarea,select{width:100%;min-height:48px;border:1px solid var(--line);border-radius:7px;padding:11px 13px;background:white;color:#101e40;font-size:16px;margin:5px 0 12px}input[type=checkbox]{width:23px;height:23px;accent-color:var(--blue);flex-shrink:0;cursor:pointer}textarea{resize:vertical;min-height:100px}.screen-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:20px}.screen-title h1{font-size:21px;margin:0}.steps{display:flex;justify-content:center;align-items:center;gap:14px;font-size:14px;color:var(--muted);margin:8px 0 20px}.steps strong{color:var(--blue)}.steps .icon{width:17px}.narrow{max-width:600px;margin:auto}.photo-preview{height:175px;background:#eff3f8;position:relative;border-radius:9px;overflow:hidden;margin-bottom:14px}.photo-preview img{width:100%;height:100%;object-fit:cover}.photo-preview span{position:absolute;right:10px;bottom:10px;background:white;padding:5px 9px;border-radius:4px;font-size:12px}.scan-stage{min-height:250px;background:#f0f4f8;border:1px dashed #b9cce1;border-radius:10px;padding:28px;text-align:center;display:grid;align-content:center;justify-items:center;gap:16px;margin:18px 0}.scan-stage .icon{width:52px;height:52px;color:#536785}.photos{display:flex;overflow:auto;gap:8px;margin:14px 0}.photos button{padding:4px;min-width:64px}.photos img{width:48px;height:60px;object-fit:cover}.photos button.selected{border-color:var(--blue)}.word-select{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:8px;padding:9px 10px;min-height:61px;margin-bottom:10px}.word-select label{display:flex;align-items:center;gap:12px;flex:1;min-width:0;cursor:pointer}.word-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:start;flex:1;min-width:0}.word-pair strong{color:#101e40;font-size:16px;font-weight:650;overflow-wrap:anywhere}.word-pair span{color:#36547b;font-size:14px;overflow-wrap:anywhere}.word-select .icon-button{width:36px;min-height:44px;padding:7px}.warning{color:#b36b00;font-size:12px;display:block;margin-top:5px}.sticky-action{position:sticky;bottom:0;background:white;padding:15px 0 max(12px,env(safe-area-inset-bottom));z-index:3}.sticky-action button{min-height:52px}.sticky-action p{margin:10px 0 0;text-align:center;font-size:12px;color:var(--muted)}.focus #header,.focus #nav{display:none}.focus #app{padding-bottom:20px}.learning{max-width:560px;margin:auto}.learning .screen-title{margin-bottom:18px}.learning .track{margin-bottom:26px;height:7px}.learning select{font-size:14px}.word-face{text-align:center;min-height:245px;padding:44px 0 28px}.word-face h1{font-size:clamp(30px,7vw,44px);line-height:1.15;letter-spacing:-1.2px;overflow-wrap:anywhere}.pronounce{display:flex;align-items:center;justify-content:center;color:#536785;font-size:18px;gap:8px}.pronounce button{border:0;background:transparent;min-width:48px;padding:8px}.answer{font-size:28px;line-height:1.3;color:var(--blue);font-weight:700;margin-top:25px;overflow-wrap:anywhere}.example{border-top:1px solid var(--line);padding-top:25px;margin-top:6px;min-height:150px}.example p{font-size:18px;margin:10px 0;line-height:1.5}.example .translation{color:var(--muted)}.example strong{color:var(--blue);font-weight:650}details{border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:20px 0;font-size:14px;color:var(--muted)}summary{cursor:pointer;min-height:48px;padding:14px 0}details p{padding:0 4px}.ratings{padding-top:16px}.ratings>p{text-align:center;font-size:16px;margin:12px 0 16px}.rating-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.rating-grid button{min-height:54px;border:0}.rating-grid small{font-size:11px;font-weight:400;display:block;color:inherit;margin-top:3px}.rating-grid .again{background:#ffe2e7;color:#ab0015}.rating-grid .hard{background:#eaf0f6}.rating-grid .good{background:#e0eeff;color:#0669ff}.rating-grid .easy{background:var(--blue);color:white}.rating-grid button span{display:block}.undo{display:flex;justify-content:center;margin-top:12px}.correct{color:#16815c}.incorrect{color:#ad2139}.tools{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.tools button{font-size:13px}.detail-word{padding:15px 0;border-bottom:1px solid var(--line)}.detail-word .row{align-items:start}.detail-word .row>div{flex:1;min-width:0}.detail-word h3{overflow-wrap:anywhere}.detail-word p{margin:5px 0}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:24px 0}.stat-grid strong{display:block;font-size:28px}.stat-grid small{display:block}.settings-section{margin:28px 0;border-top:1px solid var(--line);padding-top:22px}.settings-section h2{margin-bottom:14px}.settings-section p{color:var(--muted);font-size:14px}.code{overflow-wrap:anywhere;font-family:monospace;background:#f0f4f8;padding:16px;font-size:13px}dialog{border:1px solid var(--line);border-radius:12px;padding:24px;width:calc(100% - 28px);max-width:520px;max-height:90dvh;color:#101e40}dialog::backdrop{background:#101e4066}dialog h2{margin-bottom:20px}dialog .dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px;position:sticky;bottom:-24px;background:white;padding:12px 0}#notice{position:fixed;z-index:30;bottom:90px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 28px);background:#101e40;color:white;border-radius:8px;padding:14px 18px;font-size:14px;box-shadow:0 6px 24px #101e4022}.focus #notice{bottom:20px}.loading{padding:30px;color:var(--muted)}.desktop-aside{display:none}.source-text{white-space:pre-wrap;overflow-wrap:anywhere;background:#f3f6fa;border-radius:8px;padding:18px;max-height:320px;overflow:auto}.hidden-answer{min-height:65px}.crop-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px}.crop-controls input{margin-bottom:0}.error-banner{background:#fff0e4;color:#8b4a0d;padding:14px;border-radius:8px;margin:12px 0;font-size:14px;line-height:1.5}.session-result{text-align:center;padding:60px 0}.session-result>.icon{width:58px;height:58px;color:var(--blue);margin-bottom:20px}.mode-info{font-size:13px;color:var(--muted)}
@media(min-width:800px){#nav{top:105px;bottom:auto;left:max(20px,calc((100vw - 1160px)/2));right:auto;width:150px;flex-direction:column;border:0;gap:12px;padding:12px 0}#nav button{flex-direction:row;justify-content:flex-start;gap:12px;font-size:14px;padding:14px}#app{padding-left:190px;padding-top:40px}.library-layout{display:grid;grid-template-columns:330px minmax(280px,1fr);gap:38px}.library-layout .section-heading{margin-top:0}.library-intro{grid-column:1/-1}.library-intro .subtitle{margin-bottom:0}.library-left{align-self:start}.desktop-aside{display:block;border-top:1px solid var(--line);margin-top:28px;padding-top:20px}.desktop-aside p{font-size:14px;color:var(--muted)}.focus #app{padding:28px 24px}.focus .learning{max-width:540px}.focus .word-face{padding-top:36px;min-height:235px}.focus .screen-title h1{font-size:21px}.narrow{max-width:620px}}
@media(max-width:420px){#header{height:72px;padding:0 20px}#app{padding:24px 16px 100px}h1{font-size:25px;letter-spacing:-.8px}.subtitle{font-size:16px}.study-panel{padding:20px}.study-number{font-size:40px}#nav{gap:0;justify-content:space-around}#nav button{min-width:70px}.deck-row{gap:10px}.deck-title{font-size:15px}.focus #app{padding:18px 20px}.word-face{padding-top:35px;min-height:235px}.word-pair{grid-template-columns:.95fr 1fr}.word-pair strong{font-size:15px}.word-select{gap:4px;padding:8px}.word-select label{gap:9px}.brand{font-size:20px}}
@media(prefers-reduced-motion:no-preference){button{transition:background .12s ease}.word-face{animation:appear .16s ease}@keyframes appear{from{opacity:.5;transform:translateY(3px)}to{opacity:1;transform:none}}}
/* Fidelity pass: visible list progress and compact mobile study controls. */
.deck-meta,.track{display:block}.learning summary{list-style:none;display:flex;align-items:center;justify-content:space-between}.learning summary::-webkit-details-marker{display:none}.learning summary .icon{width:17px;height:17px}.learning .word-face h1{font-size:38px}.learning .example{min-height:128px}.learning details{margin:16px 0}.learning .ratings{padding-top:8px}.learning .ratings>p{margin-top:8px}.learning .undo{margin-top:8px}
@media(max-width:799px){.learning .word-face{min-height:215px;padding-top:32px}.learning .word-face h1{font-size:38px}.learning .answer{font-size:28px}}
.word-pair small{display:block;margin-top:3px;line-height:1.4}.review-screen .photo-preview{height:150px}.review-screen .source-options{margin:4px 0 20px}.review-screen .sticky-action{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:calc(100% - 40px);max-width:620px;box-shadow:0 -12px 16px white}.review-screen #app{padding-bottom:140px}.review-screen .sticky-action p{font-size:12px}
/* Tap-to-speak keeps the established typography and visible keyboard focus. */
button.speakable{display:inline;min-height:44px;padding:3px 0;border:0;border-radius:4px;background:transparent;color:inherit;font:inherit;text-align:inherit;line-height:inherit;overflow-wrap:anywhere;cursor:pointer}button.speakable:hover{color:var(--blue);background:#e5f1ff}.word-face h1 .speakable,.word-face .answer .speakable{display:inline-block}.word-select .word-pair{display:grid;grid-template-columns:1fr 1fr;flex:1;gap:12px}.detail-word h3 .speakable{font-weight:650}.example .speakable{width:100%;text-align:left}.word-select .speakable{font-size:inherit}
