:root{color-scheme:dark;font-family:system-ui,Segoe UI,sans-serif;line-height:1.45;background:#1e1f22;color:#e8e8e8}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:#1e1f22;color:#e8e8e8}:focus-visible{outline:2px solid #81b64c;outline-offset:2px}a{color:#b7d98a}h1,h2,h3{line-height:1.2}h1{font-size:1.8rem;margin:0 0 8px}h2{font-size:1.25rem;margin:0 0 8px}h3{font-size:1rem;margin:16px 0 8px}p{margin:0 0 12px}main{max-width:1100px;margin:0 auto;padding:108px 16px 48px}.nav{position:fixed;top:0;left:0;right:0;z-index:20;display:flex;align-items:center;gap:12px;min-height:60px;padding:0 16px;background:#2b2d31;border-bottom:1px solid #3a3d42}.brand{color:#e8e8e8;font-weight:700;text-decoration:none;min-height:44px;display:inline-flex;align-items:center}.menu-btn{display:none}.nav-links{display:flex;flex:1;flex-wrap:wrap;gap:4px;min-width:0}.nav-links a{min-height:44px;display:inline-flex;align-items:center;padding:0 10px;color:#e8e8e8;text-decoration:none;border-radius:8px}.nav-links a[aria-current=page]{background:#81b64c;color:#14210c;font-weight:700}button,.btn{background:#3a3d42;color:#e8e8e8;border:1px solid #55585e;border-radius:8px;min-height:44px;min-width:44px;padding:8px 14px;font:inherit;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none}button.primary,.btn.primary,.tab.active{background:#81b64c;color:#14210c;border-color:#81b64c;font-weight:700}button:hover,.btn:hover{filter:brightness(1.08)}button:disabled{opacity:.45;cursor:not-allowed;filter:none}.lead{max-width:68ch;color:#d5d5d5}.streak{display:inline-block;background:#2b2d31;border-radius:999px;padding:8px 14px;margin-bottom:16px;font-weight:700}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.card{background:#2b2d31;border-radius:12px;padding:16px;color:inherit;text-decoration:none}a.card{display:block}a.card:hover{outline:2px solid #81b64c}.stack{display:flex;flex-direction:column;gap:12px}.row,.actions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px}.muted{color:#b5b5b5}.ok{color:#81b64c;font-weight:700}.alert{color:#ff8d8d;font-weight:700}.status{font-weight:650}.result{color:#b6e38a;font-weight:700}.note{background:#23262b;border-left:4px solid #81b64c;padding:12px 14px;border-radius:8px}.line-name{font-weight:700}.line-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding-top:8px;border-top:1px solid #3a3d42}.plans,.recap{padding-left:1.2rem}.plans li,.recap li{margin:0 0 6px}.tabs{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 16px}.trainer{display:grid;grid-template-columns:minmax(0,520px) minmax(0,1fr);gap:16px;align-items:start}.panel{background:#2b2d31;border-radius:12px;padding:16px;min-width:0}.demo{margin-top:28px}.board-wrap{width:min(92vw,520px);max-width:100%}.board{width:100%;aspect-ratio:1;display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);position:relative;border-radius:4px;overflow:hidden;box-shadow:0 8px 24px #00000047;-webkit-user-select:none;user-select:none;touch-action:manipulation}.sq{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;margin:0;padding:0;min-width:0;min-height:0;position:relative;display:grid;place-items:center;font-family:inherit;cursor:pointer;aspect-ratio:1;border-radius:0;font-size:calc(min(92vw,520px)*.09375);line-height:1;background:transparent}.sq.light{background:#eeeed2}.sq.dark{background:#769656}.sq:focus-visible{outline-offset:-3px;z-index:1}.piece{pointer-events:none}.piece.w{color:#fff;text-shadow:-1px 0 0 #000,1px 0 0 #000,0 -1px 0 #000,0 1px 0 #000,-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000}.piece.b{color:#111}.sq.is-selected{box-shadow:inset 0 0 0 999px #ffd60059}.sq.hl-last{box-shadow:inset 0 0 0 999px #ffd60080}.sq.hl-hint{box-shadow:inset 0 0 0 999px #468cff8c}.sq.hl-wrong{box-shadow:inset 0 0 0 999px #d228289e}.sq.hl-right{box-shadow:inset 0 0 0 999px #32aa468c}.dot,.ring{position:absolute;pointer-events:none}.dot{width:16%;height:16%;border-radius:50%;background:#0000004d}.sq.dark .dot{background:#ffffff80}.ring{width:86%;height:86%;border-radius:50%;border:4px solid rgba(0,0,0,.3);box-sizing:border-box}.sq.dark .ring{border-color:#ffffff8c}.coord{position:absolute;font-size:11px;line-height:1;font-weight:700;pointer-events:none}.coord.rank{top:2px;left:3px}.coord.file{right:3px;bottom:2px}.sq.light .coord{color:#0000008c}.sq.dark .coord{color:#ffffffd9}.promo{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;background:#141518d6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}.promo-row{display:flex;gap:8px}.promo-piece{width:52px;height:52px;font-size:34px;background:#eeeed2;color:#111}.promo-piece.w{background:#4d6b3a;color:#fff;text-shadow:-1px 0 0 #000,1px 0 0 #000,0 -1px 0 #000,0 1px 0 #000}.movelist{font-size:1.05rem}.move-no{color:#b5b5b5}.move.current{background:#81b64c;color:#14210c;border-radius:4px;padding:0 4px;font-weight:700}.lesson-toggle{width:100%;justify-content:space-between;background:transparent;border:0;padding:0;color:inherit;font-size:1.15rem;font-weight:700}.pill{background:#81b64c;color:#14210c;border-radius:999px;padding:2px 8px;font-size:.8rem}.bars{display:flex;flex-direction:column;gap:6px}.bar-row{display:grid;grid-template-columns:72px 1fr 24px;gap:8px;align-items:center}.bar-track{height:12px;background:#1e1f22;border-radius:999px;overflow:hidden}.bar-fill{display:block;height:100%;background:#81b64c}.bar-label,.bar-count{font-size:.85rem}.puzzle-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}.puzzle-list button{width:100%;justify-content:flex-start;text-align:left}.puzzle-list button[aria-current=true]{border-color:#81b64c}label.btn{position:relative;cursor:pointer}label.btn input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}@media (max-width: 800px){.trainer{grid-template-columns:1fr}.line-row{flex-direction:column;align-items:stretch}}@media (max-width: 700px){.menu-btn{display:inline-flex;margin-left:auto}.nav-links{display:none;position:absolute;top:100%;left:0;right:0;flex-direction:column;background:#2b2d31;padding:8px;border-bottom:1px solid #3a3d42}.nav-links.open{display:flex}.nav-links a{width:100%}}
