:root{--bg:#1d231c;--bg-2:#262d24;--bg-3:#313a2e;--bg-4:#3d4839;--line:#3a4436;--text:#f2f5ea;--muted:#a9b5a0;--green:#7fb552;--green-d:#568235;--green-l:#a5d47c;--light:#ecf0d8;--dark:#6c9a53;--red:#d33c34;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;font-variant-numeric:tabular-nums;font-family:Avenir Next,Nunito Sans,Segoe UI,system-ui,sans-serif}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);margin:0;font-size:15px;line-height:1.4}button,input{font:inherit;color:inherit}button{cursor:pointer;background:0 0;border:0}button:disabled{cursor:not-allowed;opacity:.45}:focus-visible{outline:3px solid var(--green-l);outline-offset:2px}h2,h3,p{margin:0}.hint{color:var(--muted);font-size:14px}.icon{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;flex:none;width:22px;height:22px}.icon-button{width:40px;height:40px;color:var(--muted);border-radius:8px;place-items:center;display:grid}.icon-button:hover{color:var(--text);background:var(--bg-3)}.app{background:radial-gradient(ellipse at 50% 0, #2b3628 0, transparent 60%), var(--bg);grid-template-rows:56px 1fr;min-height:100dvh;display:grid}.app:not(.app-game,.app-review){background:radial-gradient(ellipse at 50% 30%, #1d231c8c, var(--bg) 75%), repeating-conic-gradient(#2c3a27 0 25%, #222b1f 0 50%) 50% 0 / 112px 112px}.top{grid-template-columns:56px 1fr 56px;place-items:center;padding:0 8px;display:grid}.logo{align-items:center;gap:8px;display:inline-flex}.logo svg{width:38px;height:38px}.logo-text{letter-spacing:-.02em;font-size:23px;font-weight:600}.logo-text b{color:var(--green-l);font-weight:800}.logo-big{gap:16px}.logo-big svg{width:96px;height:96px}.logo-big .logo-text{font-size:clamp(44px,9vw,72px);line-height:1}.button{border-radius:10px;justify-content:center;align-items:center;gap:10px;padding:14px 22px;font-size:17px;font-weight:700;display:inline-flex}.button-primary{background:var(--green);color:#14200c;box-shadow:0 4px 0 var(--green-d)}.button-primary:hover:not(:disabled){background:var(--green-l)}.button-primary:active:not(:disabled){box-shadow:0 1px 0 var(--green-d);transform:translateY(3px)}.button-secondary{background:var(--bg-4);box-shadow:0 4px #262e23}.button-secondary:hover:not(:disabled){background:#4a5745}.button-ghost{color:var(--muted)}.button-ghost:hover:not(:disabled){color:var(--text);background:var(--bg-3)}.button-small{padding:8px 14px;font-size:15px}.home{text-align:center;place-self:center;justify-items:stretch;gap:16px;width:min(420px,100% - 40px);padding-bottom:12vh;display:grid}.home .logo{justify-self:center}.home-sub{color:var(--muted);margin:0 0 12px;font-size:17px}.home>.button-primary,.home>.button-secondary{padding:20px;font-size:21px}.join{text-align:left;background:var(--bg-2);border-radius:12px;gap:8px;padding:16px;display:grid}.join div{grid-template-columns:1fr auto;gap:8px;display:grid}.join input{text-transform:uppercase;letter-spacing:.12em;text-align:center;min-width:0;font-size:22px}.join small{color:var(--muted)}input:not([type]),input[name=code],.pick-form input,.custom input{background:var(--bg);border:2px solid var(--line);border-radius:8px;min-width:0;padding:10px 12px}.home-links{color:var(--muted);justify-content:center;gap:20px;margin-top:10px;display:flex}.home-links button{align-items:center;gap:6px;padding:8px;display:inline-flex}.home-links button:hover{color:var(--text)}.card{background:var(--bg-2);border-radius:16px;place-self:start center;width:min(600px,100% - 24px);margin:12px 0 32px;overflow:hidden;box-shadow:0 18px 50px #0006}.card.wide{width:min(760px,100% - 24px)}.card-head{background:#20271e;grid-template-columns:56px 1fr 56px;place-items:center;padding:12px 8px;display:grid}.card-head h2{font-size:21px}.steps{gap:5px;display:flex}.steps i{background:var(--bg-4);border-radius:2px;width:8px;height:8px}.steps i.on{background:var(--green)}.card-body{gap:22px;padding:20px;display:grid}.card-foot{gap:10px;padding:4px 20px 22px;display:grid}h3{color:var(--muted);align-items:center;gap:10px;margin-bottom:10px;font-size:16px;display:flex}.grid3{grid-template-columns:repeat(3,1fr);gap:10px;display:grid}.grid2{grid-template-columns:1fr 1fr;gap:10px;display:grid}.tile{background:var(--bg-3);border:3px solid #0000;border-radius:8px;padding:15px 8px;font-size:16px;font-weight:700}.tile:hover:not(:disabled){background:var(--bg-4)}.tile[aria-pressed=true]{border-color:var(--green)}.tile-tall{align-content:start;justify-items:center;gap:6px;display:grid}.tile-tall .icon{width:28px;height:28px;color:var(--green-l)}.tile-tall small{color:var(--muted);font-size:13px;font-weight:400}.time-bullet .icon{color:#d9b45c}.time-blitz .icon{color:#f2d13c}.time-rapid .icon{color:var(--green)}.more{color:var(--muted);padding:6px;font-weight:600}.more:hover{color:var(--text)}.custom{grid-template-columns:1fr 1fr auto;align-items:end;gap:10px;margin-top:12px;display:grid}.custom label{color:var(--muted);gap:4px;font-size:13px;display:grid}.custom .tile{padding:9px 14px}.dot{border:1px solid #0007;border-radius:3px;width:13px;height:13px;display:inline-block}.dot-w{background:#f7f8f1}.dot-b{background:#1a1d19;border-color:#7a8573}.pick-list{grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:10px;display:grid}.pick-player{background:var(--bg-3);overflow-wrap:anywhere;border:3px solid #0000;border-radius:10px;align-content:center;justify-items:center;gap:4px;min-height:112px;padding:10px 6px;font-weight:600;display:grid}.pick-player small{color:var(--muted);font-weight:400}.pick-player:hover:not(:disabled){background:var(--bg-4)}.pick-player[aria-pressed=true]{border-color:var(--green)}.pick-new{color:var(--muted)}.pick-form{grid-template-columns:auto 1fr auto auto;align-items:center;gap:10px;margin-top:10px;display:grid}.photo{background:var(--bg-4);cursor:pointer;width:48px;height:48px;color:var(--muted);border-radius:10px;place-items:center;display:grid;position:relative;overflow:hidden}.photo.big{border-radius:16px;width:96px;height:96px}.photo img{object-fit:cover;width:100%;height:100%}.photo input{opacity:0;cursor:pointer;position:absolute;inset:0}.photo:focus-within{outline:3px solid var(--green-l)}.form-error{color:#ffa49d;margin-top:8px}.avatar{object-fit:cover;background:linear-gradient(135deg, var(--green), var(--green-d));color:#14200c;border-radius:10px;flex:none;place-items:center;width:48px;height:48px;font-size:22px;font-weight:800;display:grid}.room{grid-template-columns:auto 1fr;align-items:center;gap:20px;display:grid}.room canvas{border-radius:12px}.room-code{letter-spacing:.06em;color:var(--green-l);font-size:42px;font-weight:800}.checklist{gap:10px;margin:0;padding:0;list-style:none;display:grid}.checklist li{background:var(--bg-3);border-radius:10px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;padding:12px 14px 12px 46px;display:flex;position:relative}.checklist li:before{content:"";border:2px solid var(--muted);border-radius:50%;width:18px;height:18px;position:absolute;top:13px;left:14px}.checklist li.done:before{background:var(--green);border-color:var(--green);content:"✓";color:#14200c;text-align:center;font-size:13px;font-weight:900;line-height:18px}.checklist b{font-weight:600}.self-camera{border:2px solid var(--green);z-index:8;background:#000;border-radius:12px;width:240px;height:250px;position:fixed;bottom:12px;right:12px}.game{--side:clamp(210px, 21vw, 330px);grid-template-columns:var(--side) minmax(0, 1fr) var(--side);gap:18px;height:calc(100dvh - 56px);min-height:560px;padding:0 18px 12px;display:grid}.center{grid-template-rows:auto minmax(0,1fr) auto auto auto;justify-items:center;gap:8px;min-height:0;display:grid;position:relative}.center>*{max-width:100%}.board-wrap{place-items:center;width:100%;height:100%;min-height:0;display:grid;container-type:size}.board{aspect-ratio:1;touch-action:none;-webkit-user-select:none;user-select:none;background:repeating-conic-gradient(var(--dark) 0 25%, var(--light) 0 50%) 0 0 / 25% 25%;border-radius:6px;width:min(100cqw,100cqh);position:relative;overflow:hidden;box-shadow:0 10px 34px #00000073;container-type:inline-size}.board>*{position:absolute}.board-piece,.square-last,.square-selected,.square-check,.square-marked,.target{pointer-events:none;width:12.5%;height:12.5%}.board-active .board-piece{cursor:grab}.board-piece{z-index:2;place-items:center;display:grid}.board-piece .piece{filter:drop-shadow(0 .35cqw .25cqw #00000059);width:94%;height:94%}@keyframes slide{0%{transform:translate(var(--dx), var(--dy))}}.square-last{background:#f8ec4a85}.square-selected{background:#60b0ff80}.square-check{background:radial-gradient(circle,#ff281ef2,#ff281e26 72%)}.square-marked{background:#eb281e99}.target:after{content:"";background:#14280a52;border-radius:50%;position:absolute;inset:35%}.target{z-index:4}.target-capture:after{background:0 0;border:.9cqw solid #14280a52;inset:4%}.coord{z-index:1;pointer-events:none;font-size:2.1cqw;font-weight:700;line-height:1.1}.coord-dark{color:var(--dark)}.coord-light{color:var(--light)}.board-badge{z-index:6;pointer-events:none;filter:drop-shadow(0 .2cqw .3cqw #0006);width:5.4cqw;height:5.4cqw;animation:.22s ease-out pop}.badge{width:100%;height:100%;display:block}@keyframes pop{0%{transform:scale(0)}}.piece-body path{stroke-width:3.4px;stroke-linejoin:round}.piece-w .piece-body path{fill:#fbfbf6;stroke:#3c4238}.piece-b .piece-body path{fill:#4c5048;stroke:#1c1f1a}.piece-w .piece-shade{fill:#0000001c}.piece-b .piece-shade{fill:#0003}.piece-mark{fill:none;stroke-width:3px;stroke-linecap:round}.piece-w .piece-mark{stroke:#3c4238aa}.piece-b .piece-mark{stroke:#1c1f1a}.piece-w .piece-dot{fill:#3c4238}.piece-b .piece-dot{fill:#e8ebdf}.strip{flex-wrap:wrap;justify-content:center;align-items:center;gap:14px;min-height:42px;font-weight:600;display:flex}.opening{text-align:center;justify-items:center;line-height:1.25;display:grid}.opening b{font-size:17px}.opening b small{margin-right:8px}.opening b span{color:var(--green-l);margin-left:8px}.opening small{color:var(--muted);font-size:13px;font-weight:400}.mate{color:#1d231c;background:#f2f5ea;border-radius:999px;padding:3px 12px;font-weight:800}.shown-label{align-items:center;gap:6px;display:inline-flex}.shown-label .badge{width:24px;height:24px}.evalbar{background:#3a4236;border-radius:5px;width:100%;height:24px;position:relative;overflow:hidden}.evalbar i{background:#f6f7ef;transition:width .4s;position:absolute;inset:0 auto 0 0}.evalbar b{font-size:14px;position:absolute;top:2px}.evalbar .left{color:#1d231c;left:8px}.evalbar .right{color:#fff;right:8px}.actions{flex-wrap:wrap;justify-content:center;gap:4px;display:flex}.actions button{color:var(--muted);border-radius:8px;align-items:center;gap:7px;padding:8px 11px;font-size:14px;font-weight:600;display:inline-flex}.actions button:hover:not(:disabled){background:var(--bg-3);color:var(--text)}.actions .icon{width:18px;height:18px}.status-line{color:var(--muted);min-height:20px;font-size:14px}.warning{background:#6b4d12;border-radius:8px;padding:6px 14px;font-weight:600}.warning button{font-weight:700;text-decoration:underline}.promote{background:var(--bg-3);border-radius:8px;padding:6px 12px}.promote button{background:var(--bg-4);border-radius:6px;margin-left:8px;padding:4px 10px;font-weight:700}.toast{background:var(--green);color:#14200c;z-index:9;white-space:nowrap;border-radius:999px;padding:10px 20px;font-weight:800;position:absolute;top:46px;left:50%;translate:-50%;box-shadow:0 6px 20px #0006}.panel{background:var(--bg-2);border:2px solid #0000;border-radius:14px;flex-direction:column;gap:10px;min-height:0;padding:14px;display:flex;overflow:hidden auto}.panel-running{border-color:var(--green)}.panel-head{align-items:center;gap:10px;display:flex}.panel-name{flex:1;min-width:0;display:grid}.panel-name b{text-overflow:ellipsis;white-space:nowrap;font-size:17px;overflow:hidden}.panel-name small{color:var(--muted);align-items:center;gap:6px;display:flex}.clock{text-align:center;background:var(--bg);border-radius:10px;padding:4px;font-size:clamp(34px,3.6vw,52px);font-weight:800;line-height:1.2}.panel-running .clock{color:#1d231c;background:#f2f5ea}.panel .clock-low{background:var(--red);color:#fff}.captured{flex-wrap:wrap;align-items:center;min-height:26px;display:flex}.captured .piece{width:24px;height:24px}.captured .stacked{margin-left:-13px}.captured .piece-b .piece-body path{stroke:#9aa591}.captured b{color:var(--muted);margin-left:8px}.stats{grid-auto-columns:1fr;grid-auto-flow:column;gap:8px;display:grid}.stats div{background:var(--bg-3);border-radius:10px;padding:7px 10px;display:grid}.stats small,.panel-graph small{color:var(--muted);font-size:12px}.stats b{white-space:nowrap;font-size:21px}.graph{background:var(--bg);border-radius:8px;width:100%;height:50px;display:block}.graph-grid{stroke:#ffffff14}.graph-line{fill:none;stroke:var(--green-l);stroke-width:2.4px;vector-effect:non-scaling-stroke;stroke-linejoin:round}.graph-point{fill:var(--green-l)}.moves{background:var(--bg);border-radius:10px;flex:96px;align-content:start;min-height:96px;padding:4px;display:grid;overflow:auto}.move{text-align:left;border-radius:6px;grid-template-columns:34px 1fr 22px;align-items:center;padding:4px 8px;font-size:16px;font-weight:700;display:grid}.move:nth-child(2n){background:#ffffff08}.move:hover{background:var(--bg-3)}.move-number{color:var(--muted);font-weight:400}.move .badge{width:20px;height:20px}.figurine{align-items:center;display:inline-flex}.figurine .piece{width:1.45em;height:1.45em;margin:-.2em .1em -.2em -.1em}.figurine .piece-b .piece-body path{stroke:#9aa591}.move[aria-current] .figurine{background:var(--bg-4);border-bottom:2px solid var(--muted);border-radius:5px;margin-left:-8px;padding:1px 8px}.counts{grid-template-columns:repeat(5,1fr);gap:6px;display:grid}.counts div{justify-content:center;align-items:center;gap:5px;font-size:14px;display:flex}.counts .zero{opacity:.38}.counts .badge{width:20px;height:20px}.counts-named{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px 18px}.counts-named div{justify-content:start}.counts-named span{flex:1}.counts-named .badge{width:24px;height:24px}.app:has(.game-alarm){background:#a3140e}.alarm{text-align:center}.alarm h1{text-wrap:balance;margin:0;font-size:clamp(28px,3.6vw,54px);line-height:1.08}.alarm p{margin:6px 0;font-size:17px}.alarm-actions{flex-wrap:wrap;justify-content:center;gap:8px;display:flex}.alarm-actions button{color:#6f0c07;background:#fff;border-radius:8px;align-items:center;gap:8px;padding:9px 14px;font-size:17px;font-weight:800;display:inline-flex}kbd{color:#fff;background:#6f0c07;border-radius:5px;padding:1px 8px;font:700 14px system-ui}.game-alarm .status-line,.game-alarm .actions button{color:#ffd9d6}.modal-back{z-index:20;background:#0000009e;place-items:center;padding:16px;display:grid;position:fixed;inset:0;overflow:auto}.modal{background:var(--bg-2);text-align:center;border-radius:16px;gap:14px;width:min(440px,100%);padding:24px;display:grid;box-shadow:0 20px 60px #00000080}.modal h2{text-wrap:balance;font-size:25px}.modal-actions{flex-wrap:wrap;justify-content:center;gap:10px;display:flex}.modal-links{color:var(--muted);justify-content:center;gap:18px;display:flex}.modal-links button:hover{color:var(--text);text-decoration:underline}.end table{border-collapse:collapse;width:100%}.end td,.end th{width:33%;padding:6px}.end td{font-size:20px;font-weight:800}.end tbody th{color:var(--muted);font-weight:500}.settings{text-align:left;gap:2px;max-height:calc(100dvh - 32px);overflow:auto}.settings header{justify-content:space-between;align-items:center;margin-bottom:8px;display:flex}.switch{cursor:pointer;border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;padding:9px 4px;display:flex;position:relative}.switch input{opacity:0;position:absolute}.switch i{background:var(--bg-4);border-radius:999px;flex:none;width:46px;height:26px;transition:background .15s;position:relative}.switch i:after{content:"";background:#fff;border-radius:50%;width:20px;height:20px;transition:translate .15s;position:absolute;top:3px;left:3px}.switch input:checked+i{background:var(--green)}.switch input:checked+i:after{translate:20px}.switch input:focus-visible+i{outline:3px solid var(--green-l);outline-offset:2px}.rank,.history{background:var(--bg-3);text-align:left;border-radius:10px;align-items:center;gap:12px;width:100%;margin-bottom:8px;padding:8px 12px;display:flex}.rank:hover{background:var(--bg-4)}.rank b{flex:1}.rank small{color:var(--muted)}.rank strong{font-size:20px}.history>button:first-child{text-align:left;flex:1;display:grid}.history small{color:var(--muted)}.delete button{padding:4px 8px;font-weight:800;text-decoration:underline}.profile{gap:14px;display:grid}.licenses{gap:12px}a{color:var(--green-l)}.stats-wrap{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));grid-auto-flow:row}.favorites{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px;display:grid}.favorites div{background:var(--bg-3);border-radius:10px;align-content:start;gap:2px;padding:10px 12px;display:grid}.favorites small,.opening-list small{color:var(--muted);font-size:12px}.favorites span{color:var(--green-l);font-size:14px}.opening-list{gap:8px;display:grid}.opening-list div{grid-template-columns:minmax(0,1fr) 110px 48px 76px;align-items:center;gap:10px;display:grid}.opening-list i{background:var(--bg);border-radius:4px;height:8px;overflow:hidden}.opening-list u{background:var(--green);height:100%;display:block}.opening-list b,.opening-list small{text-align:right}@media (width<=900px){.game{grid-template-rows:auto auto;grid-template-columns:1fr 1fr;gap:12px;height:auto;padding:0 10px 16px}.center{grid-area:1/1/auto/-1}.board-wrap{aspect-ratio:1;height:auto;container-type:inline-size}.board{width:100%}.room{text-align:center;grid-template-columns:1fr;justify-items:center}.pick-form{grid-template-columns:auto 1fr}.custom{grid-template-columns:1fr 1fr}.grid3:has(.tile-tall){grid-template-columns:1fr}}@media (width<=600px){.strip{align-content:center;gap:4px 14px;height:104px}.opening{width:100%}.opening b span{margin:0;display:block}.opening>small{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}.opening-list div{grid-template-columns:minmax(0,1fr) 46px 68px;gap:6px}.opening-list i{display:none}.panel{padding:10px}.panel-head{gap:6px}.panel-head .avatar{width:36px;height:36px}.panel-head .icon-button{width:28px;margin:0 -6px}.panel-name b{font-size:15px}.panel-name small{white-space:nowrap;font-size:12px}.panel-name .dot{display:none}.stats{grid-auto-flow:row}.stats div{grid-template-columns:1fr auto;align-items:center}.move{grid-template-columns:24px 1fr 20px;padding:4px;font-size:14px}.move[aria-current] .figurine{margin-left:-4px;padding:1px 4px}.panel .counts{grid-template-columns:repeat(3,1fr)}}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}.app-game .self-camera{width:200px;height:150px}.app-game:has(.self-camera) .game>aside:last-of-type{margin-bottom:160px}
