:root{font-family:Inter,Noto Sans SC,Microsoft YaHei,system-ui,sans-serif;font-weight:400}*{box-sizing:border-box}body{margin:0}.app{--bg:#eaf0f8;--ink:#172643;--muted:#475975;--line:#adbed4;--paper:#fff;--accent:#254fba;--on:#fff;--tint:#dce8ff;--due:#8a3800;--due-bg:#ffead5;--error:#a11d2b;min-height:100dvh;background:var(--bg);color:var(--ink);color-scheme:light;font-size:15px;line-height:1.55}.app[data-theme=night]{--bg:#131d31;--ink:#edf3ff;--muted:#b7c6df;--line:#4e6283;--paper:#202e49;--accent:#b1c7ff;--on:#14274f;--tint:#2c4167;--due:#ffd1a2;--due-bg:#663710;--error:#ffc0c7;color-scheme:dark}.wrap{width:min(1040px,calc(100% - 36px));margin:auto}header{border-bottom:1px solid var(--line)}.top{min-height:72px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding-block:12px}.brand{display:flex;align-items:center;gap:10px;font-size:19px;font-weight:600}.mark{display:grid;place-items:center;width:32px;height:32px;border-radius:8px 8px 8px 2px;background:var(--accent);color:var(--on)}nav,.actions{display:flex;gap:8px;flex-wrap:wrap}main{padding-block:32px}h1,h2,strong{font-weight:600;margin:0}h1{font-size:36px;letter-spacing:-.045em;margin-bottom:20px}h2{font-size:17px;margin-bottom:12px}p{margin:0}button,input{font:inherit;color:inherit}button{min-height:42px;padding:8px 14px;border:1px solid var(--line);background:var(--paper);border-radius:8px;cursor:pointer;font-weight:400}button:hover{background:var(--tint)}button.primary,button[aria-current=page]{background:var(--accent);border-color:var(--accent);color:var(--on)}button:focus-visible,input:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.panel{background:var(--paper);border:1px solid var(--line);border-radius:20px;padding:clamp(15px,4vw,30px)}.panel+.panel{margin-top:20px}.editor{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}form,label{display:grid;gap:12px}label{gap:5px}.pairs{display:grid;grid-template-columns:1fr 1fr;gap:10px}input{width:100%;min-width:0;padding:9px 10px;border:1px solid var(--line);border-radius:6px;background:var(--bg)}.hint,.example,.notice{color:var(--muted)}.hint{font-size:13px}.error{color:var(--error)}#card-message{min-height:22px}.flash{min-height:260px;display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:22px;text-align:center;padding:22px;border:1px solid var(--line);border-radius:20px;background:var(--paper);box-shadow:0 6px 0 -1px var(--tint),0 7px 0 var(--line)}.word{display:block;font-size:clamp(26px,4vw,48px);line-height:1.1;letter-spacing:-.045em;overflow-wrap:anywhere}.answer{font-size:20px;margin-top:12px}.example{margin-top:10px}.answer,.example{overflow-wrap:anywhere;white-space:pre-wrap}.library{list-style:none;padding:0;margin:0}.library li{padding:12px 0;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;overflow-wrap:anywhere}.library li>div{min-width:0;max-width:100%}.library li:last-child{border:0}.status{display:inline-block;color:var(--due);background:var(--due-bg);font-size:12px;border-radius:6px;padding:2px 7px;margin-top:5px}.notice{font-size:13px;margin-top:20px}@media(max-width:670px){.editor{grid-template-columns:1fr}h1{font-size:28px}}@media(max-width:360px){.pairs{grid-template-columns:1fr}}.heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px;flex-wrap:wrap}.heading h1{margin-bottom:0}.count{border:1px solid var(--line);border-radius:99px;background:var(--paper);padding:5px 12px}.study{display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,255px);gap:20px;align-items:start}.queue{background:var(--paper);padding:14px;border-top:2px solid var(--accent);border-radius:0 0 20px 20px}.queue ul{list-style:none;margin:0;padding:0}.queue li{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 6px;border-bottom:1px solid var(--line)}.queue li:last-child{border-bottom:0}.queue .current{background:var(--tint)}.queue-word{overflow-wrap:anywhere;min-width:0}.queue .status{flex-shrink:0;margin:0}.overdue{color:#a11d2b;background:#ffe2e6}[data-theme=night] .overdue{color:#ffc0c7;background:#702938}.ratings{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.ratings p{flex-basis:100%}button:disabled{opacity:.65;cursor:default}.review-message{min-height:24px;margin-top:12px}@media(max-width:670px){.study{grid-template-columns:1fr}}textarea{font:inherit;color:inherit;width:100%;min-height:150px;padding:10px;border:1px solid var(--line);border-radius:6px;background:var(--bg);resize:vertical}textarea:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.batch-entries{margin-top:24px}.batch-row{padding-top:10px;border-top:1px solid var(--line)}.app-controls{border:0;margin:0;padding:0;min-width:0}.app-controls>.notice{padding-bottom:24px}.batch-navigation{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;width:100%;align-items:center}.batch-navigation button{min-width:0;padding:8px 10px;white-space:nowrap}dialog{color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:20px;padding:24px;width:min(480px,calc(100% - 32px));max-height:85dvh;overflow:auto}dialog::backdrop{background:#0a142899}.spelling-notice{background:#fff1df;color:#64320c;border:2px solid #e6a35b;box-shadow:0 18px 60px #1e120640}.spelling-notice h2{font-size:22px;line-height:1.5}.spelling-notice h2 strong{color:#973e04}.spelling-notice button{background:#fff9f0;border-color:#ce9862;color:#64320c}.spelling-notice button:hover{background:#ffe0b8}.spelling-notice .suggested-word{background:#9b440b;border-color:#9b440b;color:#fff}.spelling-notice .suggested-word:hover{background:#793307}.spelling-notice button:focus-visible{outline-color:#973e04}.word-field{position:relative;min-width:0}.quick-controls>.word-field{flex:1;min-width:150px}.spelling-notice{position:absolute;bottom:calc(100% + 8px);left:0;z-index:10;width:310px;max-width:calc(100vw - 72px);padding:12px;border-radius:10px;box-shadow:0 6px 18px #1e12062e}.spelling-notice .spelling-title{font-size:15px;line-height:1.5;margin:0}.spelling-notice .actions{margin-top:8px;gap:5px}.spelling-notice button{min-height:30px;padding:4px 8px;font-size:12px}dialog p,dialog .actions{margin-top:16px}.quick-controls{border:0;padding:0;margin:12px 0;min-width:0;display:flex;align-items:end;gap:12px;flex-wrap:wrap}.quick-controls label{flex:1;min-width:150px}.quick-add .hint{margin-block:8px}.dashboard-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:20px}.dashboard-stats .panel{margin:0}.dashboard-stats strong{font-size:28px}.heatmap-scroll{overflow-x:auto;padding:12px 4px}.heatmap{display:grid;grid-template-rows:repeat(7,18px);grid-auto-flow:column;grid-auto-columns:18px;gap:5px;width:max-content}.heat-cell{display:block;min-height:0;width:18px;height:18px;padding:0;border:1px solid var(--line);border-radius:4px}.heat-cell.level-0{background:var(--bg)}.heat-cell.level-1{background:#c5d7fa}.heat-cell.level-2{background:#7ea4eb}.heat-cell.level-3{background:#4672cb}.heat-cell.level-4{background:#254fba}.heat-cell[aria-pressed=true]{outline:2px solid var(--ink);outline-offset:1px}.heat-cell:hover{filter:brightness(.85)}.heat-legend{display:flex;align-items:center;gap:6px;margin:8px 0 24px;color:var(--muted);font-size:12px}@media(max-width:670px){.dashboard-stats{grid-template-columns:1fr}.dashboard-stats .panel{padding:16px}}@media(max-width:440px){.batch-navigation{gap:4px}.batch-navigation button{font-size:12px;padding:8px 5px}}
