:root{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#142039;background:#f6f8fc;font-size:16px}*{box-sizing:border-box}button,input,select,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.46;cursor:not-allowed}body{margin:0;padding-bottom:env(safe-area-inset-bottom)}.topbar{height:76px;background:#101a34;color:white;padding:12px max(22px,calc((100vw - 1160px)/2));display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:12px}.brand small{display:block;font-size:12px;color:#bccae2;margin-top:3px}.logo{background:#2c64f0;color:white;display:flex;align-items:center;justify-content:center;width:49px;height:49px;border-radius:15px;font-weight:900;font-size:16px}.logo span{color:#a9e5fa;font-size:15px}.tag{background:#ecf1fa;border-radius:30px;color:#426080;padding:7px 11px;font-size:12px;font-weight:650}.topbar .tag{background:#273653;color:#deebff}.layout{display:grid;grid-template-columns:210px minmax(0,1fr);max-width:1200px;margin:auto;min-height:calc(100vh - 76px)}.nav{padding:30px 14px;border-right:1px solid #e4e9f4;display:flex;flex-direction:column;gap:9px}.navitem{text-align:left;border:none;background:transparent;color:#59657b;padding:14px;border-radius:12px;font-weight:650;display:flex;gap:12px}.navitem.active{background:#e7eeff;color:#2154dd}.content{padding:38px min(4vw,50px) 80px;min-width:0}.page{max-width:900px;margin:auto}.eyebrow{color:#5973a2;font-weight:800;font-size:12px;letter-spacing:2px}h1{font-size:clamp(30px,4vw,42px);margin:9px 0 10px;letter-spacing:-1.2px}h2{margin:0;font-size:21px}.muted{color:#6a7790;line-height:1.5}.small{font-size:13px}.tiny{font-size:12px;margin:4px 0 0}.row{display:flex;align-items:center}.between{justify-content:space-between}.end{justify-content:flex-end}.gap{gap:10px}.wrap{flex-wrap:wrap}.stack>*+*{margin-top:12px}.folder-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(195px,1fr));gap:12px;margin:25px 0 12px}.folder{border:1.5px solid #e0e6f2;background:white;border-radius:17px;padding:17px 18px;text-align:left;min-height:96px;display:flex;flex-direction:column;justify-content:space-between;gap:12px;transition:all .15s}.folder strong{font-size:20px}.folder.selected{border-color:#4e76ed;box-shadow:0 0 0 2px #4e76ed22;background:#f6f9ff}.folder .tick{width:23px;height:23px;border:2px solid #c6d0e2;border-radius:7px;display:inline-flex;justify-content:center;align-items:center;color:white;flex-shrink:0}.folder.selected .tick{background:#3467e7;border-color:#3467e7}.folder .count{font-size:12px;color:#8391a7}.toolbar{display:flex;gap:7px;margin:8px 0 20px}.panel{border:1px solid #e0e6f2;border-radius:19px;padding:22px;background:white;margin-top:20px;box-shadow:0 5px 24px #14203907}.start-panel{max-width:680px}.wide{width:100%;margin-top:14px;min-height:51px}button.primary,button.secondary,button.ghost{border:1px solid transparent;border-radius:11px;padding:12px 17px;font-weight:700}button.primary{background:#285ce6;color:white}button.secondary{background:#e9efff;color:#2851c2}button.ghost{background:transparent;color:#435877}button.small{padding:8px 11px}input,select,textarea{border:1px solid #d5dceb;border-radius:11px;padding:11px 13px;background:white;color:#18253f;max-width:100%}input:focus,select:focus,textarea:focus{outline:2px solid #98b3ff;outline-offset:1px}.actions{margin:17px 0}.word-list{display:flex;flex-direction:column;gap:9px;margin-top:18px}.word-item{border:1px solid #e5e9f3;border-radius:14px;background:white;padding:14px 17px;display:grid;grid-template-columns:1fr 1fr auto;align-items:center;gap:15px}.word-item b{font-size:18px}.word-item small{color:#7d8ba2;display:block;margin-top:4px}.word-item .badge{font-size:11px;background:#edf2fb;border-radius:20px;padding:6px 8px;color:#4a6689}.word-item button{border:none;background:#eef2fe;color:#3557b2;padding:9px 12px;border-radius:9px}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-top:24px}.stat{background:white;border:1px solid #e0e6f2;border-radius:18px;padding:23px}.stat big{font-size:34px;font-weight:800;display:block;color:#214bd6}.stat span{font-size:13px;color:#74839a}.study-panel{background:white;border:1px solid #e0e6f2;border-radius:22px;padding:clamp(18px,4vw,36px);margin-top:24px;text-align:center;box-shadow:0 12px 45px #101a3410}.study-front{font-size:clamp(35px,6vw,58px);font-weight:780;line-height:1.2;padding:28px 10px;word-break:break-word}.study-panel #studyAnswerArea{text-align:left;border-top:1px solid #ecf0f7;padding-top:20px}.segmented{background:#edf1f9;border-radius:10px;padding:4px;display:flex;gap:3px}.segmented button{border:none;background:transparent;border-radius:8px;padding:9px 11px;color:#51627f;font-size:12px}.segmented button.on{background:white;color:#245add;box-shadow:0 2px 8px #1112}#drawArea{margin:12px 0}canvas{display:block;width:100%;height:210px;background:repeating-linear-gradient(0deg,#fff,#fff 41px,#f0f3fb 42px);border:1.5px dashed #aab9d4;border-radius:14px;touch-action:none;cursor:crosshair}#typeArea{margin:15px 0}#typedAnswer{width:100%;font-size:20px;padding:17px}.answer-label{color:#5973a2;font-size:13px;font-weight:700;margin-top:20px}.correct-answer{font-size:clamp(27px,5vw,42px);color:#148259;font-weight:780;margin:12px 0}.grade-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:20px}.grade-grid button{border:none;border-radius:10px;padding:14px 5px;background:#e9efff;color:#254eb2;font-weight:760;font-size:12px}.grade-grid button:first-child{background:#ffe9e9;color:#b33b45}.grade-grid button:last-child{background:#e6f7ea;color:#23844d}.modal-backdrop{position:fixed;inset:0;z-index:100;background:#111c35a8;display:flex;align-items:center;justify-content:center;padding:14px}.modal-backdrop[hidden]{display:none}.modal-card{width:min(100%,520px);max-height:90vh;overflow:auto;border-radius:20px;background:white;padding:22px;box-shadow:0 20px 65px #0c193a33}.modal-card label{display:block;font-size:13px;font-weight:740;margin:14px 0 6px}.modal-card input,.modal-card select,.modal-card textarea{display:block;width:100%}.modal-card textarea{resize:vertical;min-height:76px}.modal-card .row.end{margin-top:25px}#toast{position:fixed;bottom:calc(22px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:90vw;z-index:150;background:#233558;color:white;padding:12px 18px;border-radius:12px;box-shadow:0 5px 20px #0002;display:none;text-align:center}@media(max-width:750px){.topbar{padding:10px 16px;height:68px}.brand small{font-size:10px}.logo{width:43px;height:43px}.topbar .tag{font-size:10px}.layout{display:block}.nav{position:fixed;bottom:0;left:0;right:0;z-index:50;display:grid;grid-template-columns:repeat(4,1fr);background:white;padding:9px 8px calc(9px + env(safe-area-inset-bottom));border-top:1px solid #e5e9f3;border-right:none;box-shadow:0 -4px 20px #1420390b;gap:2px}.navitem{text-align:center;flex-direction:column;align-items:center;gap:1px;font-size:24px;padding:6px 2px}.navitem span{font-size:10px}.content{padding:24px 16px 105px}.folder-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.folder{padding:14px;min-height:92px}.word-item{grid-template-columns:1fr auto;gap:9px}.word-item .translation{grid-column:1}.word-item button{grid-column:2;grid-row:1/3}.grade-grid{grid-template-columns:repeat(2,1fr)}#toast{bottom:calc(87px + env(safe-area-inset-bottom))}}@media(min-width:751px) and (max-width:1000px){.layout{grid-template-columns:160px 1fr}.content{padding:32px 24px}.nav{padding:18px 8px}} 
