:root{--bg:#f6f5fb;--surface:#fff;--surface-2:#efedf8;--text:#1d1b29;--muted:#6c6884;--border:#e3e0f0;--accent:#5b4bdb;--accent-2:#8b5cf6;--accent-soft:#ebe8fd;--on-accent:#fff;--again:#e5484d;--hard:#f08c00;--good:#2f9e44;--easy:#1c7ed6;--again-soft:#fdecec;--hard-soft:#fff3e0;--good-soft:#e9f7ec;--easy-soft:#e7f1fc;--shadow:0 1px 2px #1e14500f, 0 8px 24px #1e145014;--radius:18px;--radius-sm:12px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--bg:#16141f;--surface:#211e2e;--surface-2:#2b2740;--text:#f1effa;--muted:#a19cba;--border:#353049;--accent:#8f82ff;--accent-2:#b794f6;--accent-soft:#2e2852;--on-accent:#16141f;--again:#ff6b6f;--hard:#ffa94d;--good:#51cf66;--easy:#4dabf7;--again-soft:#3a2026;--hard-soft:#3a2c1c;--good-soft:#1d3324;--easy-soft:#1a2c3f;--shadow:0 1px 2px #0000004d, 0 8px 24px #0000004d;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}*,:before,:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}body{background:var(--bg);min-height:100dvh;color:var(--text);margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,sans-serif;font-size:16px;line-height:1.5}h1,h2,h3{margin:0;line-height:1.2}h1{font-size:1.5rem}h2{font-size:1.15rem}h3{font-size:1.05rem}a{color:var(--accent)}button,input,select,textarea{font:inherit;color:inherit}:focus-visible{outline:3px solid color-mix(in srgb, var(--accent) 50%, transparent);outline-offset:2px}.muted{color:var(--muted)}.hint{color:var(--muted);margin:.5rem 0;font-size:.85rem}.center{text-align:center}.error{color:var(--again)}.page{max-width:720px;padding:max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));margin:0 auto}.topbar{align-items:center;gap:12px;margin-bottom:20px;display:flex}.topbar .brand{flex:1;align-items:center;gap:12px;display:flex}.topbar .brand p{margin:0;font-size:.85rem}.section-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin:8px 0 12px;display:flex}.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:16px;padding:16px}.panel h2{margin-bottom:12px}.button{border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--surface);min-height:44px;color:var(--text);cursor:pointer;justify-content:center;align-items:center;gap:8px;padding:0 16px;font-weight:600;text-decoration:none;transition:transform 80ms,background .15s,border-color .15s;display:inline-flex}.button:hover:not(:disabled){border-color:var(--accent)}.button:active:not(:disabled){transform:scale(.97)}.button:disabled{opacity:.45;cursor:default}.button.primary{background:linear-gradient(135deg, var(--accent), var(--accent-2));color:var(--on-accent);border-color:#0000}.button.ghost{background:0 0;border-color:#0000}.button.danger{color:var(--again)}.button.danger:hover{border-color:var(--again)}.button.large{min-height:52px;padding:0 24px;font-size:1.05rem}.icon-button{width:44px;height:44px;color:var(--muted);cursor:pointer;background:0 0;border:none;border-radius:50%;flex:none;place-items:center;display:inline-grid}.icon-button:hover{background:var(--surface-2);color:var(--text)}.link{color:var(--accent);cursor:pointer;text-underline-offset:3px;background:0 0;border:none;padding:0 4px;font-weight:600;text-decoration:underline}.field{flex-direction:column;gap:6px;margin-bottom:14px;display:flex}.field:last-child{margin-bottom:0}.field-label{color:var(--muted);font-size:.85rem;font-weight:600}.field-row{grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px;display:grid}.field-row .field{margin:0}input:not([type=file]),select,textarea{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg);width:100%;min-height:44px;padding:10px 12px}input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);outline:none}input[type=number]{max-width:120px}.segmented{border-radius:var(--radius-sm);background:var(--surface-2);flex-wrap:wrap;gap:4px;padding:4px;display:flex}.segmented button{min-height:38px;color:var(--muted);cursor:pointer;background:0 0;border:none;border-radius:9px;flex:auto;padding:0 12px;font-weight:600}.segmented button.active{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}.empty{text-align:center;padding:48px 8px}.empty h2{margin-top:24px;font-size:1.4rem}.empty p{max-width:420px;margin:8px auto 24px}.empty .samples{margin-top:24px}.empty-art{width:140px;height:110px;margin:0 auto;position:relative}.empty-art span{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:14px;position:absolute;inset:10px 20px}.empty-art span:first-child{transform:rotate(-10deg)translate(-14px)}.empty-art span:nth-child(2){transform:rotate(6deg)translate(12px)}.empty-art span:nth-child(3){background:linear-gradient(135deg, var(--accent), var(--accent-2));border:none}.home.dragging:after{content:"";border:3px dashed var(--accent);border-radius:var(--radius);background:color-mix(in srgb, var(--accent-soft) 60%, transparent);pointer-events:none;position:fixed;inset:12px}.collection-list{gap:12px;margin:0;padding:0;list-style:none;display:grid}.collection-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);align-items:center;gap:12px;padding:16px;display:flex}.collection-main{min-width:0;color:inherit;flex:1;text-decoration:none}.collection-main h3{overflow-wrap:anywhere}.langs{color:var(--muted);text-transform:capitalize;margin:2px 0 0;font-size:.85rem}.counts{flex-wrap:wrap;gap:6px;margin:8px 0 0;display:flex}.count{background:var(--surface-2);color:var(--muted);border-radius:999px;padding:2px 10px;font-size:.8rem;font-weight:600}.count.due{background:var(--easy-soft);color:var(--easy)}.count.new{background:var(--good-soft);color:var(--good)}.study-button{flex:none}.title-input{flex:1;font-weight:700;background:0 0!important;border-color:#0000!important;font-size:1.4rem!important}.title-input:focus{border-color:var(--accent)!important}.study-panel{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.study-panel .counts{margin:0}.actions{flex-wrap:wrap;gap:8px;display:flex}.search{max-width:240px}.card-list{margin:0;padding:0;list-style:none}.card-list li{border-top:1px solid var(--border);justify-content:space-between;align-items:center;gap:12px;padding:10px 0;display:flex}.pair{overflow-wrap:anywhere;min-width:0}.pair .sep{color:var(--muted);margin:0 8px}.statuses{flex-direction:column;flex:none;align-items:flex-end;gap:2px;display:flex}.status{white-space:nowrap;color:var(--muted);font-size:.75rem;font-weight:600}.status-new{color:var(--good)}.status-due{color:var(--easy)}.modal{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);width:min(560px,100vw - 24px);max-height:calc(100dvh - 24px);color:var(--text);box-shadow:var(--shadow);padding:0}.modal::backdrop{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:#0a081473}.modal-body{padding:16px 20px 20px}.modal-header{justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px;display:flex}.modal-header h2{overflow-wrap:anywhere}.modal-actions{justify-content:flex-end;gap:8px;margin-top:20px;display:flex}.tabs{gap:4px;margin-bottom:12px;display:flex}.tabs button{color:var(--muted);cursor:pointer;background:0 0;border:none;border-radius:9px;padding:8px 12px;font-weight:600}.tabs button.active{background:var(--accent-soft);color:var(--accent)}.dropzone{border:2px dashed var(--border);border-radius:var(--radius);color:var(--accent);text-align:center;cursor:pointer;flex-direction:column;align-items:center;gap:6px;padding:28px 16px;transition:border-color .15s,background .15s;display:flex}.dropzone strong{color:var(--text);overflow-wrap:anywhere}.dropzone:hover,.dropzone.dragging{border-color:var(--accent);background:var(--accent-soft)}.dropzone input{opacity:0;width:1px;height:1px;position:absolute}.paste{resize:vertical;font-family:ui-monospace,Cascadia Code,Menlo,monospace!important;font-size:.9rem!important}.import-summary{border-radius:var(--radius-sm);background:var(--surface-2);margin-bottom:14px;padding:12px}.import-summary p{color:var(--good);flex-wrap:wrap;align-items:center;gap:4px;margin:0;font-weight:600;display:flex}.import-summary p.error{color:var(--again)}.import-summary p.hint{color:var(--muted);font-weight:400}.import-summary .muted{font-weight:400}.ignored{color:var(--hard);margin-top:8px;font-size:.85rem}.ignored summary{cursor:pointer}.ignored ul{color:var(--text);margin:6px 0 0;padding-left:20px}.merge{flex-wrap:wrap;gap:6px;margin-top:10px;display:flex}.pill{background:var(--surface);color:var(--muted);border-radius:999px;padding:2px 10px;font-size:.8rem;font-weight:600}.pill-new{color:var(--good)}.pill-changed{color:var(--hard)}.pill-removed{color:var(--again)}.study{flex-direction:column;min-height:100dvh;display:flex}.study-bar{align-items:center;gap:12px;margin-bottom:16px;display:flex}.progress{background:var(--surface-2);border-radius:999px;flex:1;height:8px;overflow:hidden}.progress div{border-radius:inherit;background:linear-gradient(90deg, var(--accent), var(--accent-2));height:100%;transition:width .3s}.remaining{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:.85rem}.flashcard{text-align:center;background:var(--surface);border:1px solid var(--border);min-height:260px;box-shadow:var(--shadow);border-radius:24px;flex-direction:column;flex:1;justify-content:center;align-items:center;padding:32px 20px;animation:.25s ease-out card-in;display:flex}@keyframes card-in{0%{opacity:0;transform:translateY(12px)scale(.98)}}.side-label{letter-spacing:.08em;text-transform:uppercase;min-height:1.2em;color:var(--muted);margin:0 0 8px;font-size:.75rem;font-weight:700}.question,.answer{overflow-wrap:anywhere;-webkit-hyphens:auto;hyphens:auto;margin:0;font-size:clamp(1.6rem,6vw,2.4rem);font-weight:700;line-height:1.25}.answer-block{width:100%;animation:.3s ease-out reveal}@keyframes reveal{0%{opacity:0;transform:rotateX(-35deg)}}.answer-block hr{border:none;border-top:1px dashed var(--border);width:60%;margin:24px auto}.answer{color:var(--accent)}.verdict{flex-direction:column;align-items:center;gap:4px;margin:0 0 12px;font-weight:700;display:flex}.verdict-correct{color:var(--good)}.verdict-almost{color:var(--hard)}.verdict-wrong{color:var(--again)}.verdict .typed{color:var(--muted);font-size:.9rem;font-weight:400}.study-actions{background:linear-gradient(to bottom, transparent, var(--bg) 16px);padding-top:16px;position:sticky;bottom:0}.reveal{width:100%}.grades{grid-template-columns:repeat(4,1fr);gap:8px;display:grid}.grade{border-radius:var(--radius-sm);cursor:pointer;border:2px solid #0000;flex-direction:column;justify-content:center;align-items:center;gap:2px;min-height:64px;padding:8px 4px;font-weight:700;transition:transform 80ms;display:flex}.grade:active{transform:scale(.95)}.grade-label{font-size:.95rem}.grade-interval{opacity:.8;font-size:.75rem;font-weight:600}.grade-again{background:var(--again-soft);color:var(--again)}.grade-hard{background:var(--hard-soft);color:var(--hard)}.grade-good{background:var(--good-soft);color:var(--good)}.grade-easy{background:var(--easy-soft);color:var(--easy)}.grade.suggested{box-shadow:0 0 0 4px color-mix(in srgb, currentColor 18%, transparent);border-color:currentColor}.typed-answer{flex-direction:column;gap:8px;display:flex}.input-wrap{position:relative}.input-wrap input{background:var(--surface);min-height:56px;padding-right:72px;font-size:1.15rem}.kbd-badge{background:var(--accent-soft);color:var(--accent);border-radius:999px;align-items:center;gap:4px;padding:2px 8px;font-size:.75rem;font-weight:700;display:inline-flex;position:absolute;top:50%;right:10px;transform:translateY(-50%)}.typed-buttons{grid-template-columns:1fr 1fr;gap:8px;display:grid}.done{text-align:center;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:8px;display:flex}.done p{max-width:360px;margin:0 0 16px}.done-badge{background:linear-gradient(135deg, var(--accent), var(--accent-2));width:88px;height:88px;color:var(--on-accent);border-radius:50%;place-items:center;margin-bottom:8px;animation:.4s cubic-bezier(.3,1.6,.5,1) pop;display:grid}@keyframes pop{0%{opacity:0;transform:scale(.4)}}.toast{left:50%;bottom:max(16px, env(safe-area-inset-bottom));border-radius:var(--radius);background:var(--surface);border:1px solid var(--border);width:max-content;max-width:calc(100vw - 32px);box-shadow:var(--shadow);z-index:10;align-items:center;gap:8px;padding:8px 8px 8px 16px;display:flex;position:fixed;transform:translate(-50%)}@media (width<=520px){.collection-card{flex-direction:column;align-items:stretch}.field-row{grid-template-columns:1fr}.search{max-width:none}.grade{min-height:68px}.toast{flex-wrap:wrap}}@media (hover:none){.desktop-only{display:none}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition:none!important;animation:none!important}}.clipboard{width:100%;margin-bottom:8px}.study-more{flex-direction:column;gap:8px;width:100%;display:flex}.study-panel .study-more{border-top:1px solid var(--border);padding-top:12px}.done .study-more{max-width:360px;margin-top:24px}.error-screen pre{border-radius:var(--radius-sm);background:var(--surface-2);max-height:45vh;color:var(--again);white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;font-size:.8rem;overflow:auto}.loading{text-align:center;padding-top:30vh}.share-help summary{cursor:pointer;font-weight:600}.share-help p{margin-bottom:0}.share-choices{flex-direction:column;gap:8px;display:flex}.share-choices .button{justify-content:flex-start}.share-match{opacity:.85;margin-left:auto;font-size:.75rem;font-weight:600}.share .topbar p{margin:2px 0 0}.install-button{border-color:var(--accent);min-height:38px;color:var(--accent);flex:none;padding:0 12px}
