*{box-sizing:border-box}body{margin:0;background:#f6f5f2;color:#171717;font-family:-apple-system,BlinkMacSystemFont,"Noto Sans SC","Noto Sans KR",sans-serif}.app{max-width:720px;margin:auto;padding:18px 14px 110px}header{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:14px}h1{font-size:24px;margin:0}.sub,.muted,#cloud{font-size:12px;color:#777}.syncrow{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}.screen{display:none}.screen.active{display:block}.panel,.card{background:#fff;border:1px solid #e5e3df;border-radius:18px;padding:14px;margin-bottom:12px}.card{min-height:285px;display:flex;flex-direction:column;justify-content:center}.toolbar,.settings,.mode,.grades{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.settings label{font-size:13px}.settings input,#batchStart{width:80px}.mode{display:grid;grid-template-columns:1fr 1fr;margin-bottom:10px}.mode button.active{border:2px solid #222;font-weight:800}.word{font-size:38px;font-weight:800;margin:8px 0 16px;word-break:break-word}.rank{font-size:13px;color:#888}.meaning{font-size:20px;font-weight:700;margin:8px 0}.pos{font-size:13px;color:#777;margin-bottom:18px}.example{font-size:17px;line-height:1.55}.translation{font-size:14px;color:#666;margin-top:6px;line-height:1.5}button,input,select{font:inherit;border:1px solid #d8d6d1;background:#fff;border-radius:11px;padding:9px 11px}button{cursor:pointer}.primary{background:#171717;color:#fff;border-color:#171717}.danger{background:#fff6f3;border-color:#ead3ca}.full{width:100%;margin:8px 0;padding:13px}.grades{display:grid;grid-template-columns:repeat(3,1fr);margin:8px 0}.hidden{display:none!important}.sticky{position:sticky;top:6px;z-index:20;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);padding:8px;border:1px solid #e5e3df;border-radius:13px;margin-top:10px}.sticky #selectedCount{flex:1;text-align:center;font-size:13px;font-weight:700}.range{margin-top:10px}.range input{width:90px}.row{display:grid;grid-template-columns:26px 58px 1fr;gap:8px;align-items:start;padding:11px 2px;border-bottom:1px solid #eee}.row:last-child{border-bottom:0}.ko{font-size:18px;font-weight:750}.zh{font-size:13px;color:#666;margin-top:3px}.row input[type=checkbox]{width:20px;height:20px}.floating{position:fixed;right:16px;bottom:calc(74px + env(safe-area-inset-bottom));z-index:999;background:#171717;color:#fff;border:0;border-radius:999px;padding:14px 17px;font-weight:800;box-shadow:0 8px 28px rgba(0,0,0,.25)}.search{width:100%;font-size:16px}.resultActions{display:flex;gap:6px;margin-top:7px}.resultActions button{font-size:12px;padding:6px 8px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}.stats>div{background:#fff;border:1px solid #e5e3df;border-radius:16px;padding:16px;text-align:center}.stats b{display:block;font-size:25px}.stats span{font-size:12px;color:#777}nav{position:fixed;left:0;right:0;bottom:0;z-index:100;background:rgba(250,250,248,.96);backdrop-filter:blur(18px);display:grid;grid-template-columns:repeat(6,1fr);padding:7px 6px calc(7px + env(safe-area-inset-bottom));border-top:1px solid #ddd}nav button{border:0;background:transparent;padding:9px 2px;font-size:11px;color:#777}nav button.active{color:#111;font-weight:800}@media(max-width:420px){.app{padding-left:11px;padding-right:11px}.word{font-size:34px}header{display:block}.syncrow{justify-content:flex-start;margin-top:7px}.sticky button{padding:8px 7px;font-size:12px}}
.badge{display:inline-block;font-size:11px;padding:3px 7px;border-radius:999px;background:#f0efec;margin-left:6px}.dueLine{font-size:12px;color:#777;margin-top:6px}.fsrsNote{font-size:12px;color:#777;margin-top:8px}.libraryStats{margin-bottom:12px}

.batchRow{cursor:pointer;border-radius:12px;padding:11px 8px;transition:background .12s ease}.batchRow:active{background:#f1f0ed}.batchRow.selected{background:#eeeae3}.batchRow.selected .ko{font-weight:850}

.goalPanel{border:1px solid #e2dfd7}.goalHeader{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.goalHeader strong{font-size:21px;font-variant-numeric:tabular-nums}.goalTrack{height:12px;border-radius:999px;background:#eae8e2;overflow:hidden}.goalTrack>div{height:100%;width:0%;background:#379977;border-radius:999px;transition:width .25s}.goalChoices{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:12px}.goalChoices label{font-size:13px}.goalChoices input{width:72px}.goalChoices button.active{background:#171717;color:white;border-color:#171717}.goalPanel #goalNote{margin-top:8px;line-height:1.5}

.miniEdit{margin-top:13px;align-self:flex-start;font-size:12px;color:#666;border:0;background:#f5f5f2}.cardImage{display:block;max-width:100%;width:290px;aspect-ratio:1;object-fit:cover;border-radius:14px;margin:14px auto 2px;border:1px solid #eee}dialog{border:1px solid #e5e3df;border-radius:20px;width:min(94vw,600px);max-height:88dvh;overflow-y:auto;padding:20px}dialog::backdrop{background:#0008}dialog label{display:block;font-weight:700;font-size:13px;margin:12px 0}dialog textarea{width:100%;display:block;font:inherit;font-weight:400;margin-top:5px;resize:vertical;border:1px solid #d8d6d1;border-radius:10px;padding:10px}dialog h2{margin-top:0}#cardPin{max-width:210px}#editStatus{min-height:22px;margin-top:10px}
.imageResults{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.imageChoice{border:1px solid #e6e3df;padding:7px;border-radius:12px;min-width:0;overflow:hidden;font-size:12px;overflow-wrap:anywhere}.imageChoice img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px}.imageChoice small{display:block;color:#666;font-size:10px;margin:5px 0}.imageChoice button{font-size:12px;width:100%}.attribution{font-size:10px;color:#777;line-height:1.4;margin:5px 0;overflow-wrap:anywhere}.attribution a{color:#526b8b}.imageResults:empty{display:none}dialog input.search{margin-top:5px}

.cardActions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:13px}.cardActions .miniEdit{margin-top:0}.pickerHead{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.pickerHead h2{margin:0 0 5px}.pickerHead>button{font-size:20px;padding:4px 10px}.pickerSearch{display:flex;gap:8px;margin:14px 0 8px}.pickerSearch input{min-width:0;flex:1;font-size:16px}.pickerBottom{display:flex;justify-content:space-between;gap:10px;margin-top:12px}.imageChoice{display:block;text-align:left;background:#fff;cursor:pointer;width:100%;font:inherit}.imageChoice:active{transform:scale(.98);background:#f0f8f5}.imageChoice span{display:block;font-size:12px;overflow-wrap:anywhere}.imageChoice:focus-visible{outline:3px solid #365a48;outline-offset:2px}#imagePicker{max-height:90dvh}#imageStatus{margin:8px 0;min-height:20px}
.promptLabel{font-size:12px;color:#888;margin-bottom:8px;font-weight:700;letter-spacing:.02em}.reviewMeaning{font-size:26px;font-weight:800;line-height:1.35;margin:6px 0 10px}.reviewContext{font-size:15px;color:#666;line-height:1.55;margin:0 0 16px;white-space:pre-wrap}.reviewInput{width:100%;font-size:22px;font-weight:700;text-align:center;padding:14px 12px;border-radius:14px;border:1.5px solid #d6d3ce;background:#fbfaf8}.reviewInput:focus{outline:2px solid #222;outline-offset:1px}.reviewCard #ranswer{margin-top:18px;padding-top:14px;border-top:1px dashed #ddd}.reviewCard #rword{margin-bottom:8px}

.reviewModeTag{display:inline-block;margin-top:8px;padding:5px 9px;border-radius:999px;background:#f0efe9;font-size:12px;color:#555}.reviewMeaning{font-size:26px;font-weight:800;line-height:1.35;margin:10px 0}.reviewContext{font-size:16px;line-height:1.5;color:#555;margin-bottom:14px}
.authGate{position:fixed;inset:0;z-index:99999;background:#f6f5f2;display:grid;place-items:center;padding:20px}.authGate.hidden{display:none}.authCard{width:min(420px,100%);background:#fff;border:1px solid #e5e3df;border-radius:22px;padding:22px;box-shadow:0 16px 50px rgba(0,0,0,.08)}.authCard h1{margin-bottom:6px}.authCard label{display:block;font-size:13px;margin:14px 0 6px}.authCard input{width:100%;margin-top:6px;padding:13px;font-size:16px}.authBtns{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:16px 0 10px}.authBtns button{padding:13px}.accountPill{font-size:12px;padding:7px 9px;background:#fff;border:1px solid #e5e3df;border-radius:999px}.legacyBanner{border:1px solid #d7c59a;background:#fffdf5}.legacyBanner p{margin:6px 0 10px}.authLocked main,.authLocked nav{visibility:hidden}

/* V5.9 auto-judged dictation */
.reviewFeedback{margin:10px 0 4px;padding:13px 14px;border-radius:14px;font-weight:800;line-height:1.45;text-align:center}
.reviewFeedback.good{background:#edf8ef;border:1px solid #b9dfc0;color:#205b2c}
.reviewFeedback.hard{background:#fff7df;border:1px solid #ead493;color:#75570c}
.reviewFeedback.again{background:#fff0ed;border:1px solid #e7bbb2;color:#842f23}
.reviewFeedback .subResult{display:block;margin-top:4px;font-size:13px;font-weight:600;opacity:.78}
.overrideBox{margin-top:8px;padding:10px 10px 2px;background:#faf9f6;border:1px solid #e6e2da;border-radius:14px}
.overrideBox .grades button{font-size:12px;padding:9px 6px}
.reviewInput[disabled]{opacity:1;color:#222;background:#f4f3ef}

/* V5.10: review action stays within thumb reach above bottom navigation */
#review{padding-bottom:82px}
#review .reviewStickyAction{position:fixed;left:max(14px,calc((100vw - 720px)/2 + 14px));right:max(14px,calc((100vw - 720px)/2 + 14px));bottom:calc(68px + env(safe-area-inset-bottom));z-index:95;max-width:692px;margin-left:auto;margin-right:auto;padding:15px 16px;border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.20);font-size:16px;font-weight:800}
@media(max-width:760px){#review .reviewStickyAction{left:12px;right:12px;max-width:none}}

/* V5.12: keep dictation field visible while the iOS keyboard stays open */
#review .reviewInput{scroll-margin-bottom:180px}

/* V5.13: feedback replaces the prompt in-place so it stays visible above the iPhone keyboard */
#review .reviewResultPane{margin:4px 0 10px;padding:12px 13px;border-radius:14px;background:#f7f6f2;border:1px solid #dfddd7;text-align:left}
#review .rrpStatus{font-size:16px;font-weight:850;margin-bottom:8px}
#review .rrpAnswers{display:flex;gap:8px;flex-wrap:wrap;font-size:13px;margin-bottom:8px}
#review .rrpAnswers span{color:#777}#review .rrpAnswers strong{color:#111}
#review .rrpExample{font-size:16px;font-weight:700;line-height:1.35;margin-top:6px}
#review .rrpTranslation{font-size:13px;color:#666;line-height:1.35;margin-top:3px}
#review #rfeedback{display:none!important}
#review.showingResult,#reviewPrompt.showingResult{scroll-margin-top:8px}
#reviewPrompt.showingResult .reviewInput{font-size:16px;padding:10px 12px;color:#777}
#reviewPrompt.showingResult .promptLabel{display:none}

.reviewPromptPos{display:inline-block;margin:-2px 0 10px;padding:5px 9px;border-radius:999px;background:#f3f2ed;color:#555;font-size:13px;font-weight:700}
