:root{--bg:#f7f7ef;--ink:#20231f;--muted:#858980;--green:#32664d;--lime:#dafa59;--line:#e2e3da;--card:#fff;--shadow:0 8px 28px rgba(32,35,31,.045)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans SC",sans-serif;padding-bottom:92px}.topbar{max-width:780px;margin:auto;padding:34px 26px 22px;display:flex;justify-content:space-between;align-items:center}.eyebrow{font-size:12px;letter-spacing:3px;color:#456b56;font-weight:750}.topbar h1{font-size:34px;letter-spacing:-1px;margin:12px 0 0;font-weight:650}.avatar{width:54px;height:54px;border:0;border-radius:50%;background:var(--green);color:white;font-size:23px;font-weight:600}main{max-width:780px;margin:auto;padding:0 24px}.view{display:none}.view.active{display:block}.hero{border-radius:28px;padding:25px 26px 24px;margin:22px 0 18px;cursor:pointer;box-shadow:var(--shadow)}.hero.lime{background:var(--lime)}.hero.green{background:#326b50;color:white}.hero-label{font-size:19px;font-weight:700}.hero-number{font-size:76px;line-height:1.15;margin:14px 0 2px;font-family:Georgia,serif}.hero-foot{font-size:14px;opacity:.8}.hero-foot span{font-size:20px;margin-left:4px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:26px 0}.stats>div{background:white;border:1px solid var(--line);border-radius:20px;padding:19px 8px;text-align:center}.stats b{display:block;font-size:29px;font-weight:650}.stats span{display:block;color:var(--muted);font-size:13px;margin-top:7px}.panel{background:white;border:1px solid var(--line);border-radius:25px;padding:23px 22px;box-shadow:var(--shadow)}.rhythm{margin-top:28px}.rhythm h2{font-size:24px;margin:0 0 20px;font-weight:600}.rhythm p{font-size:15px;line-height:1.9;color:#777d73;margin:0}.small-note{font-size:12px;color:#9a9e95;margin-top:14px}.home-actions{display:flex;gap:12px;margin:18px 0}.subtle-btn,.secondary-btn{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 17px;color:#3e5f4a;font-size:14px}.section-head{display:flex;align-items:end;justify-content:space-between;margin:28px 0 14px}.section-head h2,.bank-head h2{font-size:29px;margin:7px 0 0}.counter{color:var(--muted);font-size:13px}.progress-track{height:6px;background:#e6e8de;border-radius:10px;overflow:hidden;margin:15px 0 20px}.progress-track i{display:block;width:0;height:100%;background:var(--green);transition:width .25s}.study-card{background:#fff;border:1px solid var(--line);border-radius:28px;padding:30px 22px 26px;text-align:center;min-height:350px;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:var(--shadow)}.tag{font-size:12px;background:#f0f1e8;color:#777d70;padding:7px 13px;border-radius:30px}.word{font-family:Georgia,"Times New Roman",serif;font-size:clamp(39px,8vw,54px);margin:35px 0 8px;overflow-wrap:anywhere}.phonetic{color:#747a70;font-size:16px;margin:0 0 18px}.example{font-size:16px;color:#747a70;font-style:italic;line-height:1.7;max-width:520px}.reveal-hint{font-size:12px;color:#a0a49a;margin-top:32px}.judge-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0}.judge{border:0;border-radius:16px;padding:16px 8px;font-size:16px;font-weight:650}.judge.know{background:#e5f5b2;color:#405c24}.judge.vague{background:#f2f0e5;color:#82744a}.judge.miss{background:#f7e6df;color:#9b5a49}.answer-panel{margin:18px 0 30px}.answer-panel .meaning{font-size:23px;font-weight:700;margin-bottom:20px}.label{font-size:12px;color:#4b7258;font-weight:700;margin-top:17px}.answer-panel p{color:#737970;line-height:1.8;margin:6px 0}.primary-btn{width:100%;border:0;border-radius:15px;background:var(--green);color:white;padding:16px;font-size:16px;font-weight:650;margin-top:22px}.hidden{display:none!important}.empty-state{text-align:center;padding:70px 10px}.empty-icon{width:62px;height:62px;border-radius:50%;background:#e8f5bd;color:#43613a;display:grid;place-items:center;font-size:30px;margin:0 auto 20px}.empty-state h2{font-size:25px}.empty-state p{color:var(--muted);line-height:1.8}.bank-head{display:flex;align-items:center;justify-content:space-between;margin:28px 0 20px}.bank-head h2{margin:0}.text-btn{border:0;background:transparent;color:#8a6259;font-size:14px}.search{width:100%;border:1px solid #dfe1d8;background:#fff;border-radius:17px;padding:17px 18px;font-size:16px;outline:none}.search:focus,input:focus,textarea:focus{border-color:#82a28a}.filter-row{display:flex;gap:8px;overflow:auto;margin:16px 0}.filter{white-space:nowrap;border:1px solid var(--line);background:white;color:#7c8178;padding:9px 14px;border-radius:30px;font-size:13px}.filter.active{background:var(--green);border-color:var(--green);color:#fff}.word-list{display:grid;gap:12px;padding-bottom:75px}.word-item{position:relative;background:#fff;border:1px solid var(--line);border-radius:21px;padding:19px 18px;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}.word-item h3{font-size:22px;font-weight:500;margin:0 0 8px;overflow-wrap:anywhere}.word-item p{font-size:14px;margin:0;color:#62685f}.word-meta{display:flex;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}.pill{font-size:11px;background:#f0f1e9;color:#7c8177;padding:5px 9px;border-radius:20px}.status{font-size:11px;background:#e4f5a7;color:#526b2d;padding:5px 9px;border-radius:20px;align-self:start}.delete-word{border:0;background:transparent;color:#9a7066;font-size:12px;grid-column:2;justify-self:end}.floating-add{position:fixed;right:max(26px,calc((100vw - 730px)/2));bottom:105px;width:56px;height:56px;border:0;border-radius:50%;background:var(--green);color:white;font-size:30px;box-shadow:0 6px 20px #234a3633}.bottom-nav{position:fixed;z-index:5;bottom:0;left:0;right:0;height:83px;background:rgba(255,255,255,.96);border-top:1px solid var(--line);display:flex;justify-content:center;padding-bottom:env(safe-area-inset-bottom);backdrop-filter:blur(14px)}.nav-item{flex:1;max-width:180px;border:0;background:transparent;color:#92978f;font-size:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}.nav-item span{font-size:25px;line-height:1.2}.nav-item.active{color:var(--green);font-weight:700}.nav-item.active span{background:var(--lime);border-radius:24px;padding:1px 16px}dialog{border:0;border-radius:25px;padding:25px;width:min(92vw,520px);box-shadow:0 20px 80px #0003;max-height:88vh;overflow:auto}dialog::backdrop{background:#1e261f66;backdrop-filter:blur(3px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.dialog-head h2{margin:0;font-size:24px}.close-btn{border:0;background:#f0f1e9;border-radius:50%;width:34px;height:34px;font-size:23px;color:#687064}label{display:block;font-size:13px;color:#666e63;margin:14px 0}label input,label textarea,#bulkText{display:block;width:100%;border:1px solid var(--line);border-radius:12px;padding:12px;margin-top:7px;font:inherit;font-size:15px;outline:none;background:#fff;color:var(--ink)}textarea{resize:vertical}.dialog-actions{display:flex;gap:10px;margin-top:20px}.dialog-actions button{flex:1;margin:0}.muted{color:#777e73;line-height:1.8;font-size:14px}.setting-row{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:15px 0;font-size:14px}.setting-row b{font-size:13px;color:#456b56}.full{width:100%;margin-top:22px}.empty-list{text-align:center;color:#999f94;padding:35px 0;font-size:14px}
@media(min-width:700px){body{padding-bottom:105px}.topbar{padding-top:45px}.hero{padding:28px 32px}.study-card{min-height:390px}.bottom-nav{height:90px}.nav-item{font-size:13px}}


/* KAI'S VOCABULARY — Citrus Summer palette */
:root{
  --bg:#fffdf7;
  --ink:#18365f;
  --muted:#71839a;
  --green:#2e5aa7;
  --lime:#ffa62b;
  --line:#e4eaf1;
  --card:#ffffff;
  --shadow:0 10px 30px rgba(46,90,167,.08);
}
body{background:var(--bg);color:var(--ink)}
.eyebrow{color:#2e5aa7}
.avatar{background:#2e5aa7;color:#fff}
.hero.lime{background:#ffa62b;color:#18365f}
.hero.green{background:#2e5aa7;color:#fff}
.stats>div{border-color:#e4eaf1;box-shadow:0 5px 16px rgba(46,90,167,.035)}
.panel{border-color:#e4eaf1;box-shadow:var(--shadow)}
.rhythm h2{color:#2e5aa7}
.rhythm p{color:#647891}
.small-note{color:#8a9aab}
.subtle-btn,.secondary-btn{border-color:#d9e5f2;color:#2e5aa7;background:#fff}
.section-head h2,.bank-head h2{color:#18365f}
.progress-track{background:#eaf2fb}
.progress-track i{background:#ffa62b}
.study-card{
  background:linear-gradient(155deg,#fff 0%,#fff 58%,#fff8e6 100%);
  border:1px solid #e4eaf1;
  box-shadow:0 14px 34px rgba(46,90,167,.09);
}
.tag{background:#86c5ff;color:#173f78;font-weight:650}
.word{color:#2e5aa7}
.phonetic{color:#6684a7}
.example{color:#71839a}
.reveal-hint{color:#91a0af}
.judge.know{background:#dff0ff;color:#24538e}
.judge.vague{background:#fff0d7;color:#94601b}
.judge.miss{background:#e8effb;color:#2e5aa7}
.answer-panel .meaning{color:#2e5aa7}
.label{color:#2e5aa7}
.answer-panel p{color:#647891}
.primary-btn{background:#2e5aa7;color:#fff;box-shadow:0 7px 18px rgba(46,90,167,.16)}
.empty-icon{background:#fff0d7;color:#2e5aa7}
.search{border-color:#dce6f0}
.search:focus,input:focus,textarea:focus{border-color:#86c5ff;box-shadow:0 0 0 3px rgba(134,197,255,.2)}
.filter{border-color:#e1e8f0;color:#6f8197}
.filter.active{background:#2e5aa7;border-color:#2e5aa7;color:#fff}
.word-item{border-color:#e4eaf1;box-shadow:0 5px 18px rgba(46,90,167,.045)}
.word-item h3{color:#18365f}
.word-item p{color:#647891}
.pill{background:#eaf4ff;color:#3c6da7}
.status{background:#fff0d7;color:#9a641b}
.delete-word,.text-btn{color:#b46b25}
.floating-add{background:#ffa62b;color:#17365f;box-shadow:0 8px 22px rgba(255,166,43,.32)}
.bottom-nav{border-color:#e4eaf1;background:rgba(255,255,255,.96)}
.nav-item{color:#9aa9b9}
.nav-item.active{color:#2e5aa7}
.nav-item.active span{background:#fff0d7}
dialog{border:1px solid #e4eaf1;box-shadow:0 22px 70px rgba(24,54,95,.20)}
.close-btn{background:#eaf4ff;color:#2e5aa7}
label{color:#617792}
label input,label textarea,#bulkText{border-color:#e0e8f1}
.setting-row{border-color:#e4eaf1}
.setting-row b{color:#2e5aa7}
@media(hover:hover){
  .judge,.primary-btn,.subtle-btn,.secondary-btn,.filter,.nav-item,.floating-add{transition:transform .16s ease,background-color .16s ease,box-shadow .16s ease}
  .judge:hover{transform:translateY(-1px)}
  .primary-btn:hover{background:#244b91}
  .subtle-btn:hover,.secondary-btn:hover{background:#f2f8ff}
}


/* Home dashboard: softened summer palette */
.hero.lime{
  background:#F6DFA6 !important;
  color:#4E617B !important;
}
.hero.lime .hero-label,
.hero.lime .hero-number,
.hero.lime .hero-foot{
  color:#4E617B !important;
}
.hero.green{
  background:#8DB9E8 !important;
  color:#173F6B !important;
}
.hero.green .hero-label,
.hero.green .hero-number,
.hero.green .hero-foot{
  color:#173F6B !important;
}


/* Mobile-first PWA finishing */
:root{--bg:#fffdf7;--ink:#18365f;--muted:#71839a;--line:#e4eaf1}
html{min-height:100%;background:var(--bg);-webkit-text-size-adjust:100%}
body{min-height:100vh;min-height:100dvh;padding-bottom:calc(86px + env(safe-area-inset-bottom));overscroll-behavior-y:contain}
button,input,textarea{font:inherit}
button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.topbar{padding-top:calc(24px + env(safe-area-inset-top));padding-left:20px;padding-right:20px}
main{padding-left:18px;padding-right:18px}
.view{padding-bottom:18px}
.hero{margin-top:16px;padding:23px 22px;border-radius:25px}
.stats{gap:9px;margin:20px 0}
.stats>div{padding:16px 5px;border-radius:18px}
.stats b{font-size:26px}
.panel{border-radius:22px;padding:20px}
.study-card{min-height:330px;border-radius:26px;padding:26px 18px}
.word{font-size:clamp(34px,10vw,48px);overflow-wrap:anywhere}
.judge-row{gap:9px}
.judge{min-height:54px;border-radius:16px;font-size:16px}
.primary-btn{min-height:50px;border-radius:16px}
.bottom-nav{padding-bottom:env(safe-area-inset-bottom);height:calc(76px + env(safe-area-inset-bottom))}
.nav-item{min-height:66px}
dialog{width:min(94vw,520px);max-height:86dvh;overflow:auto;border-radius:24px;padding:22px}
dialog form{padding-bottom:env(safe-area-inset-bottom)}
dialog input,dialog textarea,#bulkText{font-size:16px;min-height:46px}
.install-panel{background:#fff;border:1px solid #e4eaf1;border-radius:22px;padding:18px;margin:18px 0 8px;box-shadow:0 8px 24px rgba(46,90,167,.045)}
.install-panel b{color:#2e5aa7;font-size:16px}
.install-panel p{color:#71839a;font-size:13px;line-height:1.65;margin:7px 0 12px}
.install-btn{width:100%;min-height:46px;border:0;border-radius:14px;background:#8db9e8;color:#173f6b;font-weight:650}
.local-note{font-size:11px;line-height:1.6;color:#8190a2;margin-top:12px}
@media(min-width:600px){
  .topbar,main{max-width:560px}
  .topbar{padding-top:34px}
  main{padding-left:24px;padding-right:24px}
}
@media(max-width:360px){
  .topbar h1{font-size:29px}
  .hero-number{font-size:64px}
  .home-actions{gap:8px}
  .subtle-btn{padding:11px 12px}
}


/* Vocabulary editor and pronunciation controls */
.word-editor-dialog{width:min(94vw,560px);max-height:90dvh;padding:0;overflow:hidden}
.word-editor-dialog form{max-height:90dvh;overflow-y:auto;padding:20px 18px calc(18px + env(safe-area-inset-bottom))}
.word-editor-dialog .dialog-head{position:sticky;top:-20px;z-index:3;background:#fffdf7;margin:-20px -18px 18px;padding:18px 18px 12px;border-bottom:1px solid #e7edf3}
.word-editor-dialog .dialog-head h2{margin:5px 0 0;font-size:23px}
.word-editor-dialog label{display:block;margin:13px 0;font-size:14px;color:#40536b;font-weight:600}
.word-editor-dialog input,.word-editor-dialog textarea{display:block;width:100%;margin-top:7px;padding:12px 13px;border:1px solid #dfe7ef;border-radius:13px;background:#fff;color:#243c5c;font-size:16px;line-height:1.55;outline:none}
.word-editor-dialog input:focus,.word-editor-dialog textarea:focus{border-color:#8db9e8;box-shadow:0 0 0 3px rgba(141,185,232,.18)}
.required-mark{font-size:11px;color:#b46b25;margin-left:5px}
.generate-btn{width:100%;border:0;border-radius:14px;background:#f6dfa6;color:#4e617b;font-weight:700;min-height:48px;margin:5px 0 8px}
.generate-hint{font-size:12px;color:#8291a3;line-height:1.6;margin:6px 0 12px}
.editor-section{border-top:1px solid #e8edf2;padding-top:12px;margin-top:18px}
.editor-section h3{margin:0 0 8px;color:#2e5aa7;font-size:16px}
.audio-row{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:9px 0}
.audio-btn{border:1px solid #d9e5f1;background:#edf5fc;color:#2e5a8c;border-radius:999px;padding:8px 12px;min-height:38px;font-size:13px;font-weight:600}
.audio-btn:active{background:#dcecf9}
.editor-audio{justify-content:flex-start}
.example-audio{display:block;margin:8px auto 0}
.editor-actions{position:sticky;bottom:-18px;background:#fffdf7;padding:12px 0 0;border-top:1px solid #e8edf2}
#learnExample,#reviewExample{white-space:pre-line}
@media(max-width:380px){.word-editor-dialog form{padding-left:14px;padding-right:14px}.word-editor-dialog .dialog-head{margin-left:-14px;margin-right:-14px;padding-left:14px;padding-right:14px}}

.example-audio-list{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;margin:10px 0 2px}

.editor-section textarea{min-height:64px}
.editor-section textarea[name="synonymDifferences"],.editor-section textarea[name="usageScenarios"]{min-height:104px}
