:root{--radius:14px;--radius-small:12px;--tap:48px;-webkit-text-size-adjust:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:16px;line-height:1.4}*,:before,:after{box-sizing:border-box}body{background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent;margin:0;transition:background-color .3s}h1,h2,h3,p{margin:0}[hidden]{display:none!important}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;touch-action:manipulation;background:0 0;border:none;padding:0}button:disabled{cursor:default;opacity:.5}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.screen{max-width:560px;min-height:100dvh;padding:16px 16px calc(16px + env(safe-area-inset-bottom));flex-direction:column;gap:16px;margin:0 auto;display:flex}.screen--center{text-align:center;justify-content:center;align-items:center}.screen__header{align-items:center;gap:8px;display:flex}.screen__footer{flex-direction:column;align-items:stretch;gap:8px;margin-top:auto;padding-top:8px;display:flex}.title{font-size:1.5rem;font-weight:700}.subtitle{letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted);font-size:.85rem;font-weight:600}.muted{color:var(--text-muted);font-size:.9rem}.panel{border-radius:var(--radius);background:var(--surface);flex-direction:column;gap:8px;padding:14px 16px;display:flex}.notice{border-radius:var(--radius);background:var(--accent-soft);padding:12px 16px;font-size:.9rem}.speaker-off{opacity:.5}.exercise__no-audio,.exercise__also{text-align:center}.plain-list{flex-direction:column;gap:4px;margin:0;padding:0;list-style:none;display:flex}.button{min-height:var(--tap);border-radius:var(--radius);background:var(--surface);padding:0 20px;font-weight:600;transition:transform .15s,background-color .2s}.button:active:not(:disabled){transform:scale(.98)}.button--primary{background:var(--accent);color:var(--on-accent)}.button--danger{background:var(--error);color:var(--on-accent)}.button--compact{flex:none;padding:0 14px}.icon-button{border-radius:var(--radius-small);flex:none;width:44px;height:44px;font-size:1.25rem}.icon-button:active{background:var(--accent-soft)}.link-button{min-height:44px;color:var(--text-muted);text-underline-offset:3px;align-self:center;padding:0 12px;font-size:.9rem;text-decoration:underline}.chips{flex-wrap:wrap;gap:8px;display:flex}.chip{border-radius:var(--radius-small);background:var(--surface);min-width:56px;min-height:44px;padding:0 16px;font-weight:600;transition:background-color .2s}.chip--selected{background:var(--accent);color:var(--on-accent)}.badge{background:var(--accent-soft);border-radius:999px;flex:none;padding:2px 8px;font-size:.75rem}.home__header{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.home__actions{display:flex}.deck-list{flex-direction:column;gap:8px;display:flex}.deck{border-radius:var(--radius);background:var(--surface);border:2px solid #0000;align-items:center;gap:4px;padding-right:8px;transition:border-color .2s;display:flex}.deck__main{border-radius:inherit;text-align:left;flex:1;align-items:center;gap:12px;min-width:0;min-height:72px;padding:12px 8px 12px 16px;display:flex}.deck--selected{border-color:var(--accent)}.deck__icon{border-radius:var(--radius-small);background:var(--accent-soft);flex:none;place-items:center;width:48px;height:48px;font-size:1.6rem;display:grid}.deck__body{flex-direction:column;gap:2px;min-width:0;display:flex}.deck__title{font-weight:600}.deck__meta{color:var(--text-muted);font-size:.85rem}.session__header{align-items:center;gap:8px;display:flex}.session__count{min-width:44px;color:var(--text-muted);font-variant-numeric:tabular-nums;text-align:right;flex:none;font-size:.85rem}.progress-bar{background:var(--accent-soft);border-radius:999px;flex:1;height:8px;overflow:hidden}.progress-bar__fill{border-radius:inherit;background:var(--accent);height:100%;transition:width .4s}.stat-grid{grid-template-columns:repeat(3,1fr);gap:8px;display:grid}.stat{border-radius:var(--radius);background:var(--surface);text-align:center;flex-direction:column;align-items:center;gap:2px;padding:16px 8px;display:flex}.stat__value{font-size:1.25rem;font-weight:700}.stat__label{color:var(--text-muted);font-size:.8rem}.exercise{flex-direction:column;flex:1;align-items:center;gap:16px;display:flex}.exercise__label{color:var(--text-muted);letter-spacing:.04em;text-transform:uppercase;font-size:.85rem;font-weight:600}.exercise__prompt{border-radius:var(--radius-small);text-align:center;min-height:44px;padding:4px 12px;font-size:1.4rem;font-weight:600}.exercise__result{flex-direction:column;flex:1;align-items:stretch;gap:8px;width:100%;display:flex}.exercise__footer{flex-direction:column;width:100%;margin-top:auto;padding-top:8px;display:flex}.card-image{border-radius:var(--radius);background:var(--surface);place-items:center;margin:0;display:grid}.card-image--large{width:128px;height:128px;font-size:4.5rem}.card-image--small{width:56px;height:56px;font-size:2rem}.card-image img{object-fit:cover;border-radius:inherit;width:100%;height:100%}.card-image figcaption{color:var(--text-muted);font-size:.7rem}.intro__text{border-radius:var(--radius-small);text-align:center;min-height:44px;padding:4px 12px;font-size:1.15rem}.intro__text--target{font-size:1.6rem;font-weight:700}.notes{border-radius:var(--radius);background:var(--accent-soft);flex-direction:column;gap:6px;width:100%;padding:12px 16px;display:flex}.notes__grammar{color:var(--text-muted);font-size:.9rem}.cells{flex-wrap:wrap;justify-content:center;gap:8px 16px;display:flex}.cells__word{flex-wrap:nowrap;align-items:center;gap:3px;display:inline-flex}.cells__fixed{text-align:center;min-width:8px;font-size:1.25rem;font-weight:600}.cell{background:var(--surface);border:2px solid #0000;border-radius:8px;place-items:center;width:26px;height:36px;font-size:1.15rem;font-weight:600;transition:border-color .2s,background-color .2s;display:grid}.cell--filled{background:var(--accent-soft)}.cell--current{border-color:var(--accent)}.options{grid-template-columns:repeat(3,1fr);gap:10px;width:100%;max-width:360px;margin-top:auto;display:grid}.options--8{grid-template-columns:repeat(4,1fr);max-width:480px}.option{border-radius:var(--radius);background:var(--surface);border:2px solid #0000;min-width:44px;height:60px;font-size:1.5rem;font-weight:600;transition:background-color .2s,border-color .2s}.option:active{background:var(--accent-soft)}.option--wrong{border-color:var(--error)}.assembled{border-bottom:2px solid var(--accent-soft);text-align:center;min-height:44px;margin:0;padding:8px 16px;font-size:1.3rem;font-weight:600}.assembled--empty{color:var(--text-muted)}.clouds{flex-direction:column;flex:1;align-items:center;gap:12px;width:100%;display:flex}.clouds__zone{flex:1;width:100%;min-height:200px;position:relative}.cloud{background:var(--surface);border:2px solid var(--accent-soft);border-radius:999px;place-items:center;padding:0 8px;font-size:1.1rem;font-weight:600;line-height:1.25;transition:background-color .2s,border-color .2s;display:grid;position:absolute}.cloud:active{background:var(--accent-soft)}.cloud:disabled{pointer-events:none}.cloud--wrong{border-color:var(--error)}.result-label{color:var(--on-accent);border-radius:999px;align-self:center;padding:6px 16px;font-weight:600}.result-label--clean{background:var(--success)}.result-label--mistakes{background:var(--accent)}.result-label--failed{background:var(--error)}.palette-list{flex-direction:column;gap:8px;display:flex}.palette{border-radius:var(--radius);background:var(--surface);text-align:left;border:2px solid #0000;align-items:center;gap:12px;min-height:56px;padding:8px 16px;display:flex}.palette--selected{border-color:var(--accent)}.palette__swatch{border:4px solid;border-radius:50%;flex:none;place-items:center;width:32px;height:32px;display:grid}.palette__swatch--auto{border-color:var(--accent-soft);background:var(--accent);color:var(--on-accent)}.palette__hint{color:var(--text-muted);font-size:.85rem;display:block}.toolbar{gap:8px;display:flex}.toolbar__search{flex:1;min-width:0}input,select,textarea{min-height:var(--tap);border-radius:var(--radius-small);background:var(--surface);border:2px solid #0000;padding:8px 12px}input:focus,select:focus,textarea:focus{border-color:var(--accent);outline:none}textarea{resize:vertical}.form{flex-direction:column;flex:1;gap:12px;display:flex}.form__error{color:var(--error);font-weight:600}.field{min-width:0;color:var(--text-muted);flex-direction:column;flex:1;gap:4px;font-size:.85rem;display:flex}.field>input,.field>select,.field>textarea{width:100%;color:var(--text);font-size:1rem}.field-row{gap:8px;display:flex}.row-list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.row{border-radius:var(--radius-small);background:var(--surface);text-align:left;align-items:center;gap:12px;width:100%;min-height:56px;padding:8px 12px;display:flex}.row--static{flex-wrap:wrap}.row--selected{background:var(--accent-soft)}.row--split{gap:0;padding:0 4px 0 0}.row__main{border-radius:inherit;text-align:left;flex:1;align-items:center;gap:12px;min-width:0;min-height:56px;padding:8px 4px 8px 12px;display:flex}.field--icon{flex:none;width:72px}.field--icon>input,.screen__hint{text-align:center}.screen__footer--sticky{background:var(--bg);padding-bottom:8px;position:sticky;bottom:0}.row__icon{text-align:center;flex:none;width:32px;font-size:1.4rem}.row__body{overflow-wrap:anywhere;flex-direction:column;flex:1;min-width:0;display:flex}.code{font-family:ui-monospace,Consolas,monospace;font-size:.95rem}@media (prefers-reduced-motion:reduce){*{transition:none!important}}
