/* Bước 118: luyện gõ 10 ngón (.ty-*) + thử thách tính nhẩm (.mm-*) */
.ty-card,.mm-card{background:#fff;border:1px solid var(--line,#e2e8f0);border-radius:16px;padding:18px 20px}
.ty-h{font-size:18px;margin:0 0 6px}
.ty-note{margin:0 0 12px;color:#475569;font-size:14px}
.ty-touch{margin:12px 0 0;font-size:13.5px;color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:8px 12px}
.ty-ls{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px}
.ty-lc{display:flex;flex-direction:column;gap:3px;text-align:left;border:1px solid var(--line,#e2e8f0);background:#f8fafc;border-radius:12px;padding:10px 12px;cursor:pointer;font:inherit;color:#0f172a}
.ty-lc:hover{border-color:var(--brand,#1D5BD6);background:#fff}
.ty-lc b{font-size:14px}.ty-lc small{font-size:12.5px;color:#64748b;line-height:1.4}
.ty-lc--t{background:#eff6ff;border-color:#c7dbff}
.ty-best{font-style:normal;font-size:12px;font-weight:700;color:#166534}
.ty-top{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px}
.ty-stats{display:flex;gap:14px;font-size:14px;color:#334155}
.ty-bar{height:6px;background:#eef2f7;border-radius:99px;overflow:hidden;margin:10px 0}
.ty-bar i{display:block;height:100%;width:0;background:var(--brand,#1D5BD6);transition:width .2s}
.ty-text{font:500 22px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#f8fafc;border:2px solid #e2e8f0;border-radius:14px;padding:14px 16px;max-height:190px;overflow:auto;cursor:text;color:#94a3b8;word-break:break-word;outline:none}
.ty-text:focus-within,.ty-text:focus{border-color:var(--brand,#1D5BD6)}
.ty-text .is-ok{color:#16a34a}.ty-text span.is-cur{background:#dbeafe;color:#0f172a;border-radius:4px;box-shadow:inset 0 -3px 0 var(--brand,#1D5BD6)}
.ty-text.is-bad{animation:tyShake .25s}
@keyframes tyShake{25%{transform:translateX(-4px);border-color:#ef4444}75%{transform:translateX(4px);border-color:#ef4444}}
.ty-w.is-cur{background:#dbeafe;border-radius:6px;padding:0 3px;color:#0f172a;position:relative}
.ty-w.is-cur .ty-typed{color:#16a34a}
.ty-w.is-cur .ty-typed:not(:empty)+.ty-rest{font-size:.62em;color:#64748b;margin-left:6px;vertical-align:middle}
.ty-hint{margin:10px 0 4px;font-size:14.5px;color:#334155}
.ty-hint code{background:#0f172a;color:#fde68a;border-radius:6px;padding:2px 8px;font-size:15px;letter-spacing:1px}
.ty-warn{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:10px;padding:8px 12px;font-size:13.5px;margin:6px 0}
.ty-in{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.ty-finger{min-height:24px;font-size:14px;color:#334155;margin:8px 0 6px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ty-fd{display:inline-block;width:12px;height:12px;border-radius:3px}
.ty-kb{display:flex;flex-direction:column;gap:5px;background:#e2e8f0;border-radius:14px;padding:8px;user-select:none;max-width:760px;margin:0 auto}
.ty-row{display:flex;gap:5px}
.ty-k{display:flex;align-items:center;justify-content:center;height:40px;border-radius:7px;font:700 13px/1 system-ui,sans-serif;color:#1e293b;box-shadow:0 2px 0 rgba(15,23,42,.18);min-width:0;transition:transform .08s}
.ty-k--bump{text-decoration:underline;text-underline-offset:4px}
.ty-k.is-next{outline:3px solid #0f172a;transform:translateY(-2px);box-shadow:0 0 0 6px rgba(15,23,42,.15)}
.f0,.f9{background:#fecdd3}.f1,.f8{background:#fde68a}.f2,.f7{background:#bbf7d0}.f3,.f6{background:#bfdbfe}.f4,.f5{background:#e9d5ff}.fx{background:#f1f5f9}
.ty-acts,.mm-acts{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px;align-items:center}
.ty-ime{font-size:13.5px;color:#475569;display:flex;gap:6px;align-items:center;margin-left:auto}
.ty-res{text-align:center}
.ty-stars{font-size:40px;color:#f59e0b;letter-spacing:4px}.ty-stars span{color:#e2e8f0}
.ty-big{display:flex;justify-content:center;gap:28px;margin:8px 0;flex-wrap:wrap}
.ty-big span{display:flex;flex-direction:column;font-size:13px;color:#64748b}.ty-big b{font-size:30px;color:#0f172a}
.ty-res .ty-acts{justify-content:center}
.ty-wk code{background:#fee2e2;color:#991b1b;border-radius:6px;padding:1px 7px;margin:0 2px}
.ty-save{font-size:12.5px;color:#94a3b8}
@media(max-width:640px){.ty-text{font-size:18px}.ty-k{height:30px;font-size:10px;border-radius:5px}.ty-row,.ty-kb{gap:3px}.ty-kb{padding:5px}.ty-stats{gap:10px;font-size:13px}}
/* ---- tính nhẩm ---- */
.mm-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 12px}
.mm-lb{font-weight:800;font-size:14px;min-width:92px}
.mm-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line,#e2e8f0);border-radius:999px;padding:6px 12px;font-size:14px;cursor:pointer;background:#f8fafc}
.mm-chip:has(input:checked){border-color:var(--brand,#1D5BD6);background:#eff6ff;font-weight:700}
.mm-row select{border:1px solid var(--line,#e2e8f0);border-radius:10px;padding:8px 10px;font:inherit;font-size:14px;max-width:100%}
.mm-best{font-size:13.5px;color:#475569;margin:10px 0 0}
.mm-time{text-align:center;font-size:15px;color:#475569;margin-bottom:8px}.mm-time b{font-size:34px;color:#0f172a}
.mm-time.is-late b{color:#dc2626}
.mm-pane{border:2px solid #e2e8f0;border-radius:16px;padding:14px;text-align:center;transition:border-color .15s}
.mm-pane.is-ok{animation:mmOk .35s}.mm-pane.is-bad{animation:tyShake .25s}
@keyframes mmOk{50%{border-color:#22c55e;background:#f0fdf4}}
.mm-pane.is-lock{opacity:.45}
.mm-sc{font-size:14px;color:#475569}
.mm-q{font-size:40px;font-weight:800;margin:10px 0 14px;color:#0f172a}
.mm-form{display:flex;gap:8px;justify-content:center}
.mm-form input{width:150px;font:700 26px/1 system-ui,sans-serif;text-align:center;border:2px solid #cbd5e1;border-radius:12px;padding:8px}
.mm-form input:focus{outline:none;border-color:var(--brand,#1D5BD6)}
.mm-pad{display:grid;grid-template-columns:repeat(3,64px);gap:8px;justify-content:center;margin-top:12px}
.mm-pad button{height:52px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;font:700 20px/1 system-ui,sans-serif;cursor:pointer}
.mm-pad button:active{background:#e0e7ff}
.mm-play--2{display:block}
.mm-play--2 .mm-pane{display:inline-block;width:calc(50% - 8px);vertical-align:top;margin:0 2px}
.mm-pane--0{border-color:#fecaca}.mm-pane--1{border-color:#bfdbfe}
.mm-ch{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mm-ch button{height:64px;border:2px solid #e2e8f0;border-radius:14px;background:#fff;font:800 24px/1 system-ui,sans-serif;cursor:pointer}
.mm-ch button:active{transform:scale(.97)}
.mm-res{text-align:center}.mm-res>b{display:block;font-size:56px;line-height:1.1}.mm-res span{color:#64748b}
.mm-res--2{display:flex;justify-content:center;gap:40px}.mm-res--2 div{display:flex;flex-direction:column;align-items:center}.mm-res--2 b{font-size:48px}
.mm-win{text-align:center;font-size:22px;font-weight:800;margin:8px 0}
.mm-done .mm-acts{justify-content:center}
@media(max-width:640px){.mm-play--2 .mm-pane{display:block;width:auto;margin:0 0 10px}.mm-play--2 .mm-pane--0{transform:rotate(180deg)}.mm-q{font-size:32px}}
