:root{--bg: #f7f3ec;--surface: #fffdf9;--text: #221e1a;--muted: #72695f;--line: #e4dcd0;--accent: #b23a2e;--accent-soft: #f4e2de;--good: #2f7a4b;--warn: #a86a12;--paper: #fffdf9;--grid: #e8c9c2;--ink: #221e1a;--outline: #e2dbd1;--brush: #333;--hint: #d9776a;color-scheme:light}@media (prefers-color-scheme: dark){:root{--bg: #171513;--surface: #211e1b;--text: #efe9e1;--muted: #a39a8f;--line: #37322c;--accent: #e0685a;--accent-soft: #3a2320;--good: #6cc08d;--warn: #e0a54a;--paper: #1d1a17;--grid: #4a2f2a;--ink: #efe9e1;--outline: #3a352f;--brush: #d8d2ca;--hint: #e0685a;color-scheme:dark}}*{box-sizing:border-box}html,body{margin:0}body{background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,PingFang SC,Hiragino Sans,Noto Sans CJK SC,sans-serif;line-height:1.5;-webkit-text-size-adjust:100%}a{color:var(--accent)}.page{max-width:560px;margin:0 auto;padding:20px 16px 48px}.muted{color:var(--muted)}.small{font-size:.875rem}.masthead h1{margin:8px 0 4px;font-size:1.75rem;letter-spacing:-.01em}.masthead p{margin:0 0 20px}.card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px}.button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 20px;border:none;border-radius:999px;background:var(--accent);color:#fff;font:inherit;font-weight:600;text-decoration:none;cursor:pointer}.button.secondary{background:transparent;color:var(--text);border:1px solid var(--line)}.switches{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}.segmented{display:inline-flex;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:3px}.segmented button{min-height:40px;padding:0 14px;border:none;border-radius:999px;background:transparent;color:var(--text);font:inherit;cursor:pointer}.segmented button.active{background:var(--accent);color:#fff}.segmented button.active .muted{color:#fffc}.error{border-color:var(--accent);margin-bottom:16px}.error p{margin-top:0}.streak{margin-bottom:24px}.streak-top{display:flex;justify-content:space-between;align-items:flex-end;gap:16px}.streak-number{font-size:2.75rem;font-weight:700;line-height:1;color:var(--accent);font-variant-numeric:tabular-nums}.streak-facts{text-align:right;font-size:.9rem}.history{display:grid;grid-template-columns:repeat(14,1fr);gap:4px;height:40px;margin:16px 0 8px;align-items:end}.history-day{height:100%;display:flex;align-items:flex-end}.history-bar{width:100%;border-radius:3px;background:var(--line)}.history-bar.on{background:var(--accent)}.streak-note{margin:0;font-size:.9rem;color:var(--muted)}.section-title{font-size:1.1rem;margin:0 0 12px}.decks{display:grid;gap:12px}.deck{display:flex;gap:14px;align-items:center;color:inherit;text-decoration:none}.deck:hover{border-color:var(--accent)}.deck-preview{flex:none;width:72px;height:72px;display:grid;grid-template-columns:1fr 1fr;place-items:center;font-size:1.35rem;background:var(--accent-soft);border-radius:12px;color:var(--accent)}.deck-body{flex:1;min-width:0}.deck-title{font-weight:600}.meter{height:6px;background:var(--line);border-radius:3px;margin:8px 0 4px;overflow:hidden}.meter div{height:100%;background:var(--good)}.due{color:var(--warn)}.footer{margin-top:32px;text-align:center}.practice{padding-top:12px}.topbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:44px}.back{display:inline-flex;align-items:center;min-height:44px;color:var(--text);text-decoration:none;font-weight:500}.topbar-title{font-weight:600;text-align:center}.topbar-count{text-align:right;color:var(--muted);font-variant-numeric:tabular-nums}.progress-track{height:4px;background:var(--line);border-radius:2px;overflow:hidden;margin:4px 0 16px}.progress-track div{height:100%;background:var(--accent);transition:width .3s}.prompt{text-align:center;margin-bottom:12px}.mode-tag{display:inline-block;font-size:.8rem;font-weight:600;padding:2px 10px;border-radius:999px;background:var(--accent-soft);color:var(--accent)}.mode-tag.recall{background:var(--line);color:var(--text)}.reading{font-size:1.9rem;font-weight:600;margin-top:6px;line-height:1.2}.meaning{color:var(--muted)}.pad-wrap{display:flex;justify-content:center}.pad{position:relative;background:var(--paper);border-radius:12px;box-shadow:0 0 0 1px var(--grid);touch-action:none;overflow:hidden;user-select:none;-webkit-user-select:none}.pad-grid{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none}.pad-grid line{stroke:var(--grid);stroke-width:.4;stroke-dasharray:2 2}.pad-writer{position:relative}.pad-loading{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;color:var(--muted)}.status-row{display:flex;justify-content:space-between;max-width:380px;margin:10px auto 0;font-size:.9rem;font-variant-numeric:tabular-nums}.slips{color:var(--warn)}.actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:16px}.outcome{text-align:center;margin-top:12px}.outcome p{margin:0 0 12px;font-weight:500}.outcome.perfect p{color:var(--good)}.outcome.missed p{color:var(--warn)}.outcome .button{min-width:160px}.summary{text-align:center}.summary h2{margin-top:4px}.summary-chars{font-size:2rem;margin:8px 0;display:flex;flex-wrap:wrap;justify-content:center;gap:4px 14px}.summary-chars a{color:inherit;text-decoration:none}.browse{text-align:center;margin-top:24px}.browse a{display:inline-flex;align-items:center;min-height:44px;font-weight:600}.streak-inline{font-weight:700;color:var(--accent);font-size:1.2rem}.site-header{display:flex;justify-content:space-between;align-items:center;max-width:560px;margin:0 auto;padding:12px 16px 0}.site-header a{display:inline-flex;align-items:center;min-height:44px;color:var(--text);text-decoration:none}.site-header .brand{font-weight:700;color:var(--accent)}.char-page h1{font-size:1.9rem;margin:8px 0 6px;line-height:1.2}.char-page h2{font-size:1.15rem;margin:28px 0 8px}.char-page .lead{font-size:1.05rem}.crumbs a{color:var(--muted)}.facts{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px;padding:0}.facts span{padding:2px 10px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:.9rem}.script-switch{display:inline-flex;border:1px solid var(--line);border-radius:999px;padding:3px;background:var(--surface);margin-bottom:16px}.script-switch a,.script-switch span.active{display:inline-flex;align-items:center;gap:4px;min-height:40px;padding:0 14px;border-radius:999px;color:var(--text);text-decoration:none}.script-switch span.active{background:var(--accent);color:#fff}.script-note{color:var(--muted);margin:0 0 16px}.defs{position:absolute}.overview-wrap{display:flex;justify-content:center}.overview{width:min(100%,320px);height:auto;background:var(--paper);border-radius:12px;box-shadow:0 0 0 1px var(--grid)}.overview .grid,.step .grid{stroke:var(--grid);stroke-width:4;stroke-dasharray:16 16;fill:none}.overview .done,.step .done{fill:var(--ink)}.step .now{fill:var(--accent)}.step .todo{fill:var(--outline)}.step .start{fill:var(--accent);stroke:var(--paper);stroke-width:10}.overview .num circle{fill:var(--accent)}.overview .num text{fill:#fff;font:700 36px system-ui,sans-serif;text-anchor:middle;dominant-baseline:central}.steps{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:8px}.step{margin:0;text-align:center}.step svg{width:100%;height:auto;background:var(--paper);border-radius:8px;box-shadow:0 0 0 1px var(--line)}.step figcaption{font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums}.try-it{margin-top:8px}.cta{margin-top:28px}.cta h2{margin-top:0}.char-links{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:6px;list-style:none;padding:0;margin:0}.char-links li{display:flex;gap:2px}.char-links a{flex:1;display:grid;place-items:center;min-height:48px;font-size:1.4rem;border-radius:10px;background:var(--surface);border:1px solid var(--line);color:var(--text);text-decoration:none}.char-links a:hover{border-color:var(--accent);color:var(--accent)}.char-links a.trad{flex:0 0 26px;font-size:.95rem;color:var(--muted)}.word-overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:8px;max-width:480px;margin:0 auto}.word-overview .overview{width:100%}.word-progress{display:flex;justify-content:center;gap:10px;font-size:1.6rem;margin-bottom:8px;color:var(--outline)}.word-progress .now{color:var(--accent)}.word-progress .done{color:var(--ink)}.word-links{list-style:none;padding:0;margin:0;display:grid;gap:6px;grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}.word-links li{display:flex;flex-direction:column;justify-content:center;padding:2px 12px 8px;border-radius:10px;background:var(--surface);border:1px solid var(--line)}.word-links li:hover{border-color:var(--accent)}.word-row{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}.word-row a{display:inline-flex;align-items:center;min-height:40px;font-size:1.25rem;white-space:nowrap;text-decoration:none;color:var(--text)}.word-row a.trad-word{font-size:.95rem;color:var(--muted)}.word-row a:hover{color:var(--accent)}.footer-links{display:flex;justify-content:center;flex-wrap:wrap;gap:4px 20px;margin-bottom:8px}.footer-links a{display:inline-flex;align-items:center;min-height:44px;color:var(--text);font-size:.95rem}.text-page h1{font-size:1.9rem;margin:8px 0 12px}.text-page h2{font-size:1.15rem;margin:28px 0 8px}.text-page h3{font-size:1rem;margin:18px 0 6px}.text-page ul{padding-left:1.2em}.text-page li{margin-bottom:6px}.text-page code{font-size:.9em;background:var(--surface);border:1px solid var(--line);border-radius:4px;padding:0 4px}.contact h2{margin-top:0}.contact .button{max-width:100%;white-space:normal;text-align:center}.account{margin-bottom:16px}.account.card{display:grid;gap:10px}.account .muted.small{margin:2px 0 0}.account-name{font-weight:600}.account-actions{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.account-fallback{display:inline-flex;align-items:center;min-height:40px}.account-error{color:var(--accent);margin:0}.account.signed-in{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--surface);border:1px solid var(--line);border-radius:16px}.account.signed-in img{border-radius:50%;flex:none}.account-who{flex:1;min-width:0}.account-who .account-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account.signed-in .button{min-height:40px;padding:0 14px;flex:none}
