:root{--ink:#1d1b1a;--paper:#fffdf8;--grid:#d9a9a4;--brand:#b3261e;--tap-target:44px;color:var(--ink);background:var(--paper);font-family:system-ui,sans-serif}main button{min-height:var(--tap-target)}body{overscroll-behavior:none;-webkit-tap-highlight-color:transparent;margin:0}.writing-canvas{aspect-ratio:1;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;background:#fff;width:min(100%,70vh);margin:0 auto;display:block}.writing-canvas__grid rect,.writing-canvas__grid line{fill:none;stroke:var(--grid);stroke-width:4px}.writing-canvas__live{fill:none;stroke:var(--ink);stroke-width:36px;stroke-linecap:round;stroke-linejoin:round}main{max-width:40rem;margin:0 auto;padding:16px}h1{color:var(--brand);margin:0 0 12px;font-size:1.25rem}.character__credits{text-align:center;margin:24px 0 0;font-size:.8rem}.character__credits a,.back{color:inherit}.character__credits a{min-height:var(--tap-target);box-sizing:border-box;padding:14px 8px;display:inline-block}.intro{margin:0 0 16px;font-size:.95rem;line-height:1.45}.intro ol{margin:0;padding-left:1.3em}.intro li+li{margin-top:6px}.search__input{box-sizing:border-box;border:2px solid var(--grid);background:#fff;border-radius:10px;width:100%;padding:12px 14px;font-size:1.1rem}.search__results{margin:12px 0 0;padding:0;list-style:none}.search__result{text-align:left;width:100%;font:inherit;color:inherit;background:0 0;border:0;border-bottom:1px solid #eee3d6;grid-template-rows:auto auto;grid-template-columns:3.2rem 1fr;align-items:center;column-gap:12px;padding:10px 6px;display:grid}.search__hanzi{text-align:center;grid-row:span 2;font-size:2.2rem}.search__pinyin{font-weight:600}.search__definition{color:#6b625a;white-space:nowrap;text-overflow:ellipsis;font-size:.85rem;overflow:hidden}.back{font:inherit;background:0 0;border:0;padding:8px 0;display:block}.character{text-align:center}.character__hanzi{margin:8px 0 0;font-size:6rem;font-weight:400}.character__pinyin{margin:0;font-size:1.4rem;font-weight:600}.character__definition{color:#6b625a}.primary,.practice__modes button{border:2px solid var(--brand);color:var(--brand);font:inherit;background:#fff;border-radius:10px;padding:10px 16px;font-weight:600}.primary{background:var(--brand);color:#fff}.character__modes{justify-content:center;gap:12px;margin-top:16px;display:flex}.practice__modes{justify-content:center;gap:0;margin:4px 0 8px;display:flex}.practice__modes button{border-radius:0;padding:6px 18px}.practice__modes button:first-child{border-radius:10px 0 0 10px}.practice__modes button:last-child{border-radius:0 10px 10px 0}.practice__modes button[aria-pressed=true]{background:var(--brand);color:#fff}.practice__prompt{text-align:center;margin:0 0 8px}.practice__pinyin{font-size:1.3rem;font-weight:600}.practice__definition{color:#6b625a;font-size:.85rem;display:block}.practice__outline{fill:#e6e1da}.practice__done{fill:var(--ink)}.practice__correct{fill:#2e7d32;opacity:.55}.practice__attempt,.practice__deviation{fill:none;stroke-linecap:round;stroke-linejoin:round}.practice__attempt{stroke:#9e958c;stroke-width:30px}.practice__deviation{stroke:#d32f2f;stroke-width:36px}.practice__board{position:relative}.practice__status{white-space:nowrap;color:#d32f2f;pointer-events:none;background:#ffffffeb;border-radius:999px;margin:0;padding:4px 12px;font-weight:600;position:absolute;top:8px;left:50%;transform:translate(-50%)}.practice__status:empty{background:0 0;padding:0}.visually-hidden{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.result{text-align:center;margin-top:12px}.result__title{color:#2e7d32;margin:0}.result__score{font-size:1.2rem;font-weight:600}.result__actions{flex-wrap:wrap;justify-content:center;gap:8px;display:flex}.result__actions button:not(.primary){font:inherit;color:inherit;background:#fff;border:1px solid #c9bfb4;border-radius:10px;padding:10px 14px}.practice__help{justify-content:center;gap:12px;margin-top:10px;display:flex}.practice__help button,.retry{font:inherit;color:inherit;background:#fff;border:1px solid #c9bfb4;border-radius:10px;padding:8px 16px}.practice__help button:disabled{opacity:.45}.stroke-animation__brush{fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;animation-name:draw-stroke;animation-timing-function:ease-in-out;animation-fill-mode:forwards}@keyframes draw-stroke{to{stroke-dashoffset:0}}.practice__hint{fill:#1565c0;opacity:.6}.practice__order{fill:#8d6e63;opacity:.75}.mnemonic{border-left:3px solid var(--brand);text-align:left;background:#fbf3ec;max-width:30rem;margin:0 auto 8px;padding:6px 10px;font-size:.9rem}.mnemonic p{margin:2px 0}.mnemonic__label{color:var(--brand);font-size:.75rem;font-weight:600}
