@font-face{font-family:'Word Garden IPA';src:url('./fonts/CharisSIL-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
:root{--bg:#f7f8f2;--paper:#fffefa;--ink:#263d33;--muted:#718078;--green:#264f3f;--line:#e0e6db;font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}
body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{border:0;cursor:pointer}a{color:inherit;text-decoration:none}button:disabled{opacity:.5;cursor:default}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #9cb785;outline-offset:4px}
h1,h2,p{margin-top:0}h1{font-size:30px;line-height:1.45;font-weight:600;letter-spacing:-.6px}p{line-height:1.8}
.site-header{max-width:1080px;margin:auto;padding:25px 32px;display:flex;justify-content:space-between;align-items:center;gap:24px}
.brand{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:600;letter-spacing:2px}
.site-header nav{display:flex;gap:8px}.site-header nav a{font-size:13px;padding:10px 15px;border-radius:8px;color:var(--muted)}
.site-header nav a.active{color:var(--green);background:#eaf0e3}.site-header nav a:hover{color:var(--green)}
main{max-width:1040px;margin:auto;padding:32px 32px 60px;min-width:0}
.focus-mode .site-header{display:none}.focus-mode main{max-width:784px;padding-top:28px}
.button{display:inline-flex;justify-content:center;align-items:center;gap:12px;background:var(--green);color:white;border-radius:10px;padding:14px 22px;font-size:14px;min-height:48px;line-height:1.5}
.button:hover{filter:brightness(.95)}.button.secondary{background:#edf1e6;color:#496044}.text-link,.mini-button{font-size:12px;background:none;color:#607b55;padding:8px 0}
.mini-button{display:inline-flex;align-items:center;gap:6px;min-height:36px}.muted{color:var(--muted)}
.home-view{max-width:540px;margin:8vh auto 0}.eyebrow{font-size:12px;color:#6c7f62;letter-spacing:2px;margin-bottom:20px}
.home-view h1{font-size:38px;margin-bottom:17px}.home-intro{color:var(--muted);font-size:15px;margin-bottom:42px}
.daily-progress{font-size:13px;color:#596d54}.daily-progress .progress-track{margin-top:13px}
.progress-track{height:5px;border-radius:4px;background:#e5ebdf;overflow:hidden}.progress-fill{height:100%;border-radius:4px;background:#87a66a;transition:width .2s}
.home-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:26px}.home-view .home-actions>.button:first-child{flex:1}
.home-scope{display:flex;justify-content:space-between;align-items:center;gap:16px;font-size:13px;color:var(--muted);margin-top:30px;padding-top:24px;border-top:1px solid var(--line)}
.home-meta{color:var(--muted);font-size:12px;margin-top:22px}
.select{background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:11px 13px;color:#4f6449;font-size:13px;max-width:100%}
.study-top{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:22px;color:var(--muted);font-size:12px}
.study-top .progress-track{flex:1;max-width:380px}.back{color:#5d7156;font-size:13px;background:none;padding:10px 0}
.study-layout,.reflection-view{width:100%;max-width:720px;margin:auto}
.flashcard{position:relative;border:1px solid var(--line);border-radius:18px;background:var(--paper);overflow:hidden}
.card-head{display:flex;justify-content:flex-end;padding:14px 18px 0;min-height:45px}
.star{font-size:24px;line-height:1;background:none;color:#9aa68b;width:36px;height:34px}.star.on{color:#b58939}
.word-face{text-align:center;padding:16px 28px 28px}.study-word{font-family:Georgia,serif;font-size:52px;font-weight:500;letter-spacing:-1px;line-height:1.3;margin:0 0 20px;overflow-wrap:anywhere}
.pronunciation{display:flex;flex-direction:column;align-items:center;gap:14px}.pronunciation-controls{display:flex;align-items:center;gap:12px}
.accent-toggle{display:inline-flex;gap:3px;background:#eff3e9;padding:3px;border-radius:7px}.accent-toggle button{padding:6px 10px;background:transparent;color:#718168;border-radius:5px;font-size:11px}
.accent-toggle button.selected{background:var(--paper);color:var(--green);box-shadow:0 1px 3px #233b2712}
.sound{width:32px;height:32px;display:inline-grid;place-items:center;border-radius:50%;background:#edf2e5;color:#57714a;font-size:16px}
.ipa-list{display:flex;flex-direction:column;gap:6px;max-width:100%;align-items:center}.ipa-entry{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:9px;max-width:100%}
.phonetic{font-family:'Word Garden IPA','DejaVu Sans',sans-serif;font-size:22px;line-height:1.6;font-style:normal;font-weight:400;color:#344d38;overflow-wrap:anywhere}
.ipa-note{font-size:12px;color:var(--muted)}
.answer{padding:0 30px 22px}.sense-list{display:flex;flex-direction:column;gap:24px;margin:0;text-align:left}
.sense-group{min-width:0}.sense-group+.sense-group{border-top:1px solid var(--line);padding-top:23px}
.sense-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 12px}
.pos-tag{font-size:12px;line-height:1.7;color:#63795b;white-space:nowrap}.pos-tag b{font-weight:600;color:#345738;margin-right:3px}
.sense-meaning{font-size:16px;color:#36513c;line-height:1.8;overflow-wrap:anywhere}
.sense-example{margin-top:20px}.sense-en{font-size:21px;line-height:1.75;color:#304b36;margin:0 0 8px;overflow-wrap:anywhere}
mark{background:#e3edcc;color:inherit;border-radius:3px;padding:0 3px}.sense-zh{font-size:13px;line-height:1.8;color:#718064;margin:0}
.sense-example .mini-button{margin-top:7px}
.note-box{margin-top:24px;padding-top:17px;border-top:1px solid var(--line)}.note-box summary{font-size:12px;color:#728469;cursor:pointer;line-height:1.8}
.note-box textarea{width:100%;min-height:86px;resize:vertical;border:1px solid var(--line);background:var(--paper);border-radius:8px;padding:12px;margin-top:12px;font-size:13px;color:var(--ink);line-height:1.8}
.recall-prompt{padding:12px 24px 32px;text-align:center}.recall-prompt>p{font-size:13px;color:var(--muted);margin-bottom:22px}.hint-button{display:block;margin:13px auto 0}.hint-text{font-size:16px!important;line-height:1.8;overflow-wrap:anywhere;margin-top:16px}
.word-face:has(+ .recall-prompt){min-height:210px;display:flex;justify-content:center;align-items:center}
.reflection-entry{margin-top:22px;text-align:center}.reflection-entry .button{width:100%}.key{font-size:10px;font-weight:400;color:#c6d7bd}
.reflection-heading{margin:32px 0 24px;text-align:center}.reflection-heading h1{font-size:26px;margin:0 0 10px}.reflection-heading p{font-size:13px;color:var(--muted);margin:0}
.reflection-sheet{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:18px;background:var(--paper)}
.reflection-content{padding:28px 30px}.reflection-section+.reflection-section{border-top:1px solid var(--line);margin-top:22px;padding-top:22px}
.reflection-section h2{font-size:12px;font-weight:400;color:var(--muted);margin-bottom:15px}
.reflection-word{font-family:Georgia,serif;font-size:42px;line-height:1.4;overflow-wrap:anywhere}
.reflection-meaning{font-size:15px;line-height:1.9;margin:0 0 12px;overflow-wrap:anywhere}.reflection-meaning .pos-tag{margin-right:8px}
.reflection-example+.reflection-example{margin-top:20px}.reflection-pos{font-size:11px;color:var(--muted)}.reflection-en{font-size:20px;line-height:1.8;margin:8px 0;overflow-wrap:anywhere}.reflection-zh{font-size:13px;color:var(--muted);line-height:1.8;margin:0}
.reflection-sheet.covered{height:360px}.covered .reflection-content{filter:blur(18px);opacity:.35;user-select:none;pointer-events:none}
.frost-glass{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:17px;background:#f3f6ecd9;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);color:#617b55;padding:24px;text-align:center}
.frost-glass strong{font-size:18px;font-weight:500}.frost-glass>span{font-size:12px;color:#7c8d72;letter-spacing:2px}
.reflection-status{text-align:center;color:var(--muted);font-size:12px;line-height:1.8;margin:20px 0 12px}
.reflection-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;position:sticky;bottom:12px;background:#f7f8f2f0;padding:10px 0;border-radius:10px}
.reflection-actions .button{padding:13px 8px}.reflection-wrong{background:#eee4d7;color:#846646}
.page-heading{margin:18px 0 24px}.page-heading h1{margin:0;font-size:27px}
.searchbar{display:flex;gap:12px;margin-bottom:20px}.search-input{min-width:0;flex:1;padding:13px 16px;border:1px solid var(--line);border-radius:10px;background:var(--paper);font-size:14px;color:var(--ink)}
.filters{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:20px}.filter{background:#edf1e6;color:#637959;border-radius:7px;padding:10px 14px;font-size:12px}.filter.active{background:var(--green);color:white}
.library-count{font-size:12px;color:var(--muted);margin-bottom:18px;line-height:1.8}
.word-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.word-tile{text-align:left;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:20px;min-width:0}.word-tile:hover{border-color:#a1b58b}
.tile-top{display:flex;align-items:start;justify-content:space-between;gap:8px;margin-bottom:13px}.tile-word{font-family:Georgia,serif;font-size:25px;overflow-wrap:anywhere;min-width:0}.tag-level{font-size:10px;color:#879478;padding-top:5px}
.tile-ipa .ipa-list{align-items:flex-start}.tile-ipa .ipa-entry{justify-content:flex-start;gap:5px}.tile-ipa .phonetic{font-size:17px}.tile-ipa .ipa-note{font-size:10px}
.compact.sense-list{gap:9px;margin-top:14px}.compact .sense-group+.sense-group{border:0;padding:0}.compact .sense-heading{gap:4px 7px}.compact .pos-tag{font-size:10px}.compact .sense-meaning{font-size:12px;color:#65785b}
.tile-bottom{font-size:10px;color:#7f8e71;margin-top:10px}.tile-bottom:empty{display:none}
.pager{display:flex;gap:20px;align-items:center;justify-content:center;margin-top:26px;font-size:12px;color:var(--muted)}
.panel{border:1px solid var(--line);border-radius:14px;padding:28px;background:var(--paper)}
.settings-panel{max-width:680px}.setting-row{display:flex;justify-content:space-between;align-items:center;gap:22px;padding:20px 0;border-bottom:1px solid var(--line);font-size:14px}.setting-row:first-child{padding-top:0}.setting-row label{flex:1}
.settings-actions{display:flex;align-items:center;gap:24px;flex-wrap:wrap;margin-top:25px}
dialog{border:1px solid var(--line);border-radius:18px;padding:40px 14px 20px;width:min(740px,94vw);max-height:90dvh;background:var(--bg);color:var(--ink)}
dialog::backdrop{background:#253c334d;backdrop-filter:blur(3px)}.dialog-close{position:absolute;right:12px;top:6px;font-size:27px;line-height:1;background:none;color:#75856b;width:34px;height:32px}
.complete{max-width:600px;margin:9vh auto 0;text-align:center}.complete h1{font-size:28px}.complete p{font-size:14px;color:var(--muted)}.complete .home-actions{justify-content:center}
.empty{text-align:center;padding:50px 20px;color:var(--muted)}.empty h2{color:var(--ink);font-size:22px}.empty p{font-size:14px;overflow-wrap:anywhere}
.loading{min-height:60vh;display:flex;gap:12px;align-items:center;justify-content:center;font-size:14px;color:var(--muted)}
.spinner{width:18px;height:18px;border:2px solid #d5e0c5;border-top-color:#67835a;border-radius:50%;animation:spin 1s infinite linear}@keyframes spin{to{transform:rotate(360deg)}}
#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(12px);border-radius:10px;background:#264f3ff5;color:white;padding:12px 20px;max-width:90vw;width:max-content;font-size:13px;line-height:1.8;opacity:0;pointer-events:none;z-index:100;transition:.15s}
#toast.show{opacity:1;transform:translateX(-50%)}
@media(max-width:800px){.word-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.home-view{margin-top:5vh}.site-header{padding:20px 24px}main{padding:26px 24px 44px}}
@media(max-width:520px){
 .site-header{padding:16px;gap:12px}.brand{gap:6px;font-size:18px;letter-spacing:1px}.brand img{width:25px;height:25px}
 .site-header nav{gap:1px}.site-header nav a{font-size:11px;padding:9px 10px}
 main,.focus-mode main{padding:18px 16px 30px}.home-view{margin:7vh 0 0}.home-view h1{font-size:30px}.home-intro{font-size:14px;margin-bottom:34px}.eyebrow{font-size:11px}
 .home-actions{gap:9px}.home-actions .button{padding:13px 15px;font-size:13px}.home-scope{margin-top:26px}.select{font-size:12px;padding:11px 10px}
 .study-top{gap:14px;margin-bottom:16px}.study-top .back{font-size:12px}.flashcard{border-radius:14px}.card-head{padding:12px 13px 0;min-height:40px}
 .word-face{padding:12px 18px 25px}.study-word{font-size:41px;letter-spacing:-.7px;margin-bottom:18px}.word-face:has(+ .recall-prompt){min-height:190px}
 .phonetic{font-size:22px}.ipa-entry{gap:5px}.ipa-note{font-size:11px}.answer{padding:0 20px 20px}.sense-heading{gap:7px 10px}.sense-meaning{font-size:15px}.sense-en{font-size:20px}.sense-example{margin-top:19px}.sense-zh{font-size:13px}
 .reflection-entry{margin-top:17px}.reflection-heading{margin:24px 0 20px}.reflection-heading h1{font-size:24px}.reflection-sheet.covered{height:330px}.reflection-content{padding:24px 20px}
 .reflection-word{font-size:36px}.reflection-en{font-size:19px}.reflection-actions{bottom:8px;gap:8px}.reflection-actions .button{font-size:13px;min-height:47px}.reflection-status{font-size:11px}
 .searchbar{gap:8px}.search-input{padding:12px;font-size:12px}.searchbar .select{max-width:110px}.page-heading{margin:14px 0 22px}.page-heading h1{font-size:25px}
 .filters{gap:6px}.filter{font-size:11px;padding:9px 11px}.library-count{font-size:11px}.word-grid{gap:10px}.word-tile{padding:15px 12px;border-radius:10px}.tile-word{font-size:22px}.tag-level{font-size:9px}.tile-ipa .phonetic{font-size:16px}.compact .sense-meaning{font-size:11px}
 .pager{gap:12px}.pager .button{padding:11px 14px;font-size:12px}.panel{padding:22px 20px}.setting-row{font-size:13px;gap:12px}.setting-row .select{max-width:140px}
 .complete{margin-top:5vh}.complete h1{font-size:25px}dialog{width:96vw;padding:40px 8px 15px;max-height:90dvh}.desktop-only{display:none}#toast{font-size:12px;bottom:18px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
