/* Stroke order (strokes.js). Print style by default: an even pen line over the grey print glyph; Kai: brush-shaped strokes. */
/* Open-licence Kai webfont (LXGW WenKai GB Screen), split by unicode-range: only the chunks a page needs are downloaded. */
@import url('assets/fonts/kai/kai.css');

.sk-box{--sk-size:160px;display:inline-grid;gap:6px;width:max(var(--sk-size),186px);justify-items:center;vertical-align:top}
.sk-box.bare{width:var(--sk-size)}
.sk-stage{position:relative;width:var(--sk-size);aspect-ratio:1;border-radius:14px;background:var(--raised);border:1px solid var(--line-soft);overflow:hidden;cursor:pointer;contain:layout paint;user-select:none;-webkit-user-select:none}
.sk-stage.big{width:100%;max-width:420px;min-width:280px;border-radius:20px;box-shadow:var(--shadow);cursor:default}
.sk-stage.practise{touch-action:none;cursor:crosshair;-webkit-touch-callout:none}
.sk-svg{display:block;width:100%;height:100%;overflow:visible}
.sk-cv,.sk-over{position:absolute;inset:0;width:100%;height:100%}.sk-cv{pointer-events:none}

/* the 米 grid: thin gold dashes */
.sk-grid rect{fill:none;stroke:#a98b4f55;stroke-width:1.2px;vector-effect:non-scaling-stroke}
.sk-grid .d{fill:none;stroke:#a98b4f66;stroke-width:1px;stroke-dasharray:5 5;vector-effect:non-scaling-stroke}

/* the guide: the character itself, in the device's print font, light grey */
.sk-guide,.sk-plain{font-family:var(--zh-print);fill:#1d1b1814;font-synthesis:none}
.sk-plain{fill:#1d1b1826}.sk-plain.wait{fill:#1d1b181c;animation:sk-breathe 1.6s ease-in-out infinite}
@keyframes sk-breathe{50%{fill:#1d1b180d}}
.sk-guide-k path{fill:#1d1b1812}

/* strokes: print = uniform pen line with round ends; kai = a wide pen clipped by the brush outline */
.sk-s{fill:none;stroke:var(--ink);stroke-linecap:round;stroke-linejoin:round;transition:stroke .25s}
.sk-s.dash{stroke-dasharray:1000 1001}
.sk-s.cur{stroke:var(--oxblood)}
.sk-strokes.thin .sk-s{stroke-width:26px;stroke:#1d1b18cc}
.kai .sk-strokes.thin .sk-s{stroke-width:190px;stroke:#1d1b1855}
.sk-dot circle{fill:var(--oxblood);stroke:var(--raised);stroke-width:8}
.sk-dot text{fill:#fff;font-family:var(--sans);font-weight:700}
.sk-nums circle{fill:var(--raised);stroke:var(--oxblood);stroke-width:5}
.sk-nums circle.st{fill:var(--oxblood);stroke:none}
.sk-nums text{fill:var(--oxblood);font-family:var(--sans);font-weight:700}

/* practise */
.sk-user{fill:none;stroke:#2f5c8acc;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.sk-user.bad{stroke:var(--warn)}.sk-user.fade{opacity:0;transition:opacity .6s ease-in .1s}
.sk-h{fill:none;stroke:var(--oxblood);opacity:.42;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1000 1001}
.sk-note{position:absolute;left:8px;right:8px;bottom:8px;margin:0;padding:6px 8px;border-radius:10px;background:#fbf9f4e6;font:500 11.5px/1.35 var(--sans);color:var(--muted);text-align:center}
.sk-stage.big .sk-note{font-size:13.5px;bottom:14px;left:14px;right:14px}

/* inline controls */
.sk-ctl{display:flex;justify-content:center;gap:2px;flex-wrap:wrap}
.sk-b{position:relative;display:inline-grid;place-items:center;width:36px;height:36px;border:0;border-radius:50%;background:none;color:var(--muted)}
.sk-b::after{content:'';position:absolute;inset:-4px}
.sk-b:hover{background:var(--line-soft);color:var(--ink)}.sk-b[disabled]{opacity:.35;pointer-events:none}
.sk-b .ic{width:19px;height:19px}
.sk-sty{width:auto;min-width:36px;padding:0 9px;border-radius:999px;border:1px solid var(--line);font:600 11.5px var(--sans);color:var(--gold-deep)}
.sk-sty:hover{border-color:var(--gold)}

/* the large sheet */
.icon-btn.sk-gridbtn .ic{fill:none}.icon-btn.sk-gridbtn:not(.on){color:var(--faint)}
.sk-sheet{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}.sk-sheet>*{min-width:0}
.sk-tabs{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 6px;scrollbar-width:none}.sk-tabs::-webkit-scrollbar{display:none}
.sk-tab{flex:none;min-width:52px;height:52px;border:1px solid var(--line);border-radius:14px;background:var(--raised);font:400 28px/1 var(--zh);color:var(--muted)}
.sk-tab.on{border-color:var(--oxblood);color:var(--ink);background:#7a2e2e0a;box-shadow:inset 0 -2px 0 var(--oxblood)}
.sk-top{display:flex;justify-content:center}
.sk-main{display:grid;grid-template-columns:minmax(280px,420px) minmax(0,1fr);gap:24px;align-items:start}
.sk-stagewrap{display:grid;gap:8px;justify-items:center}
.sk-count{font:500 13px var(--sans);color:var(--muted);min-height:1.3em;text-align:center}
.sk-side{display:grid;gap:16px;align-content:start}
.sk-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.sk-play-row{flex-direction:column;align-items:flex-start}
.sk-transport{display:flex;align-items:center;gap:4px}
.sk-playbtn{min-width:120px}
.sk-seg button{min-height:40px}
.sk-msg{font:600 15px/1.4 var(--sans);min-height:1.4em;color:var(--ink)}
.sk-msg.good{color:var(--good)}.sk-msg.bad{color:var(--warn)}.sk-msg.perfect,.sk-msg.done{font:400 26px/1.2 var(--display);color:var(--oxblood)}
.sk-done{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}
.sk-strip{list-style:none;margin:10px 0 0;padding:2px 2px 10px;display:flex;gap:10px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity}
.sk-strip li{flex:none;display:grid;gap:4px;justify-items:center;scroll-snap-align:start}
.sk-strip svg{width:64px;height:64px;display:block;background:var(--raised);border-radius:10px}
.sk-fr{position:relative;width:64px;height:64px}.sk-fr canvas{position:absolute;inset:0;width:64px;height:64px}
.sk-strip span{font:600 11px var(--sans);color:var(--faint)}
.sk-f path{fill:none;stroke:var(--ink);stroke-linecap:round;stroke-linejoin:round}
.sk-f path.cur{stroke:var(--oxblood)}
.sk-f.kai path{fill:var(--ink);stroke:none}.sk-f.kai path.cur{fill:var(--oxblood)}
.sk-strip .sk-grid rect,.sk-strip .sk-grid .d{stroke:#a98b4f55}

@media (max-width:760px){
 .sk-main{grid-template-columns:minmax(0,1fr);gap:16px;justify-items:center}
 .sk-stage.big{min-width:0;width:min(100%,420px)}
 .sk-side{width:100%;justify-items:center}
 .sk-row,.sk-play-row{justify-content:center;align-items:center}
 .sk-extra{text-align:center}.sk-done{justify-content:center}
 .sk-top .seg{width:100%;justify-content:center}
}
@media (max-width:360px){.sk-box{width:max(var(--sk-size),150px)}.sk-b{width:32px;height:32px}}
@media (prefers-reduced-motion:reduce){.sk-plain.wait{animation:none}}
