:root{--bg: #0e111b;--surface: #171c2b;--surface-hover: #1e2437;--border: #262d42;--text: #eef1f7;--muted: #9aa3b8;--accent: #35d0ba;--accent-text: #062420;--gold: #ffc857;--wood: #3a2618;--wood-edge: #5a3b25;--sq-light: #ead7b3;--sq-dark: #9a6a45;--white: #f7f0e2;--white-edge: #c9b996;--white-symbol: #a3762a;--black: #2b2730;--black-edge: #0f0d12;--black-symbol: #ffc857;--target: #35d0ba;--last: rgba(255, 200, 87, .42);--radius: 14px;color-scheme:dark}*,*:before,*:after{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font:16px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}html.playing .pl-info,html.playing .pl-lang-hint{display:none}@media(display-mode:standalone){html .pl-info,html .pl-lang-hint{display:none}}button,select,input{font:inherit;color:inherit}button{cursor:pointer}a{color:inherit}h1,h2,p{margin:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:focus-visible{outline:3px solid var(--gold);outline-offset:2px}.app{max-width:480px;margin:0 auto;height:var(--app-height, 100dvh);display:flex;flex-direction:column}.screen{flex:1;min-height:0;display:flex;flex-direction:column;padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}.scroll{flex:1;min-height:0;overflow-y:auto;scrollbar-width:none;display:flex;flex-direction:column;gap:10px}.grow{flex:1}.muted{color:var(--muted)}.small{font-size:13px}.link{color:var(--accent);font-weight:600;text-align:center;padding:8px}.topbar{display:flex;align-items:center;gap:8px;min-height:48px}.topbar h1{flex:1;font-size:17px;font-weight:650;text-align:center}.topbar h1 small{display:block;font-size:12px;font-weight:500;color:var(--muted)}.topbar-actions{min-width:44px}.icon-btn{width:44px;height:44px;flex:none;border-radius:12px;border:1px solid var(--border);background:var(--surface);display:grid;place-items:center}.icon-btn svg{width:20px;height:20px}.btn{min-height:52px;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);font-weight:600;font-size:16px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.btn:active{background:var(--surface-hover)}.btn:disabled{opacity:.45;cursor:default}.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}.btn-row{display:flex;gap:10px}.btn-row>*{flex:1}.dock{margin-top:auto;padding-top:12px;display:flex;flex-direction:column;gap:10px}.links{display:flex;justify-content:center}.links a{color:var(--muted);min-height:44px;display:inline-flex;align-items:center;padding:0 12px;font-size:14px;text-decoration:none}.hero{text-align:center;padding:10px 0 6px}.hero h1{margin:12px 0 2px;font-size:30px;letter-spacing:-.02em}.hero p{color:var(--muted);font-size:15px}.logo{width:132px;height:auto;display:block;margin:0 auto}.logo-board{fill:var(--wood-edge)}.logo-light{fill:var(--sq-light)}.logo-dark{fill:var(--sq-dark)}.logo-white{fill:var(--white);stroke:var(--white-edge);stroke-width:2}.logo-black{fill:var(--black);stroke:var(--black-edge);stroke-width:2}.logo-ghost{fill:none;stroke:var(--target);stroke-width:2;stroke-dasharray:3 3}.logo-crown{fill:var(--white-symbol)}.modes{display:flex;flex-direction:column;gap:10px;margin-top:8px}.mode{display:flex;align-items:center;gap:14px;padding:14px;text-align:left;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);min-height:64px;width:100%}.mode b{display:block}.mode-text span{color:var(--muted);font-size:13px}.mode.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}.mode.soon{opacity:.5;cursor:default}.levels{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:4px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius)}.levels button{min-height:44px;border:0;border-radius:10px;background:transparent;font-size:14px;font-weight:600;color:var(--muted)}.levels button.on{background:var(--surface-hover);color:var(--text);box-shadow:inset 0 0 0 1px var(--border)}.levels button:disabled{opacity:.4;cursor:default}.variants{display:flex;align-items:center;gap:6px;padding:4px 4px 4px 12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius)}.variants-label{color:var(--muted);font-size:13px;margin-right:auto}.variants button{min-height:40px;border:0;border-radius:10px;background:transparent;font-size:13px;font-weight:600;color:var(--muted);padding:0 10px}.variants button.on{background:var(--surface-hover);color:var(--text);box-shadow:inset 0 0 0 1px var(--border)}.players{display:flex;align-items:center;gap:10px;margin:6px 0 8px}.pl{flex:1;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);transition:border-color .2s,box-shadow .2s}.pl{color:var(--accent)}.pl.p2{flex-direction:row-reverse;text-align:right}.pl.turn{border-color:currentColor;box-shadow:0 0 0 1px currentColor inset}.pl .nm{color:var(--text);font-weight:600;font-size:15px;line-height:1.2}.pl .sub{color:var(--muted);font-size:12px}.vs{color:var(--muted);font-size:12px;font-weight:700}.chip{width:24px;height:24px;flex:none;border-radius:50%;display:inline-block;vertical-align:middle}.chip.white{background:radial-gradient(circle at 40% 35%,#fff,var(--white) 60%,var(--white-edge));box-shadow:0 0 0 2px var(--white-edge) inset}.chip.black{background:radial-gradient(circle at 40% 35%,#4a4552,var(--black) 60%,var(--black-edge));box-shadow:0 0 0 2px #57505f inset}.board-wrap{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.movebar{display:flex;justify-content:space-between;width:100%;font-size:13px;color:var(--muted);padding:0 4px}.board-box{flex:1;min-height:0;width:100%;max-height:min(460px,calc(100vw - 32px));container-type:size;display:grid;place-items:center}.board{container-type:inline-size;width:min(100cqw,100cqh);aspect-ratio:1;background:linear-gradient(180deg,var(--wood-edge),var(--wood));border-radius:14px;padding:2.4cqw;box-shadow:0 10px 30px #00000059,inset 0 1px #ffffff14;user-select:none;-webkit-user-select:none}.grid{position:relative;display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);width:100%;height:100%;border-radius:6px;overflow:hidden}.sq{position:relative;border:0;padding:0;margin:0;min-width:0;min-height:0}.sq.light{background:var(--sq-light)}.sq.dark{background:var(--sq-dark);touch-action:manipulation}.sq.dark:disabled{cursor:default}.sq.last{background:linear-gradient(var(--last),var(--last)),var(--sq-dark)}.sq.via{box-shadow:inset 0 0 0 .6cqw var(--target)}.sq.selected .piece{box-shadow:0 0 0 .7cqw var(--target),0 .6cqw 1cqw #00000073}.board:not(.locked) .sq.movable:hover .piece{transform:translateY(-3%)}.sq.target:after{content:"";position:absolute;inset:34%;border-radius:50%;background:var(--target);opacity:.85;box-shadow:0 0 0 .5cqw #35d0ba59}.board:not(.locked) .sq.target:hover:after{inset:28%}.coord{position:absolute;font-size:2.3cqw;font-weight:700;line-height:1;color:#28160ab3;pointer-events:none}.coord.file{right:6%;bottom:5%}.coord.rank{left:6%;top:5%}.piece{position:absolute;inset:11%;border-radius:50%;display:grid;place-items:center;transition:transform .12s}.piece.white{background:radial-gradient(circle at 50% 50%,transparent 52%,rgba(0,0,0,.1) 53%,transparent 60%),radial-gradient(circle at 38% 32%,#fff,var(--white) 55%,var(--white-edge));color:var(--white-symbol);box-shadow:0 .6cqw 1cqw #00000073,inset 0 -.5cqw #0000001f}.piece.black{background:radial-gradient(circle at 50% 50%,transparent 52%,rgba(255,255,255,.12) 53%,transparent 60%),radial-gradient(circle at 38% 32%,#57505f,var(--black) 55%,var(--black-edge));color:var(--black-symbol);box-shadow:0 .6cqw 1cqw #00000080,inset 0 -.5cqw #0000004d}.piece svg{width:62%;height:62%}.piece.must{animation:must 1.1s ease-in-out infinite}@keyframes must{0%,to{box-shadow:0 0 0 .5cqw var(--gold),0 .6cqw 1cqw #00000073}50%{box-shadow:0 0 0 .9cqw #ffc8578c,0 .6cqw 1cqw #00000073}}.piece.taken{opacity:0;transform:scale(.6);transition:opacity .22s,transform .22s}.slider{position:absolute;width:12.5%;height:12.5%;left:calc(var(--col) * 12.5%);top:calc(var(--row) * 12.5%);transition:left .22s ease-in-out,top .22s ease-in-out;pointer-events:none;z-index:2}.slider .piece{transform:scale(1.06)}@media(prefers-reduced-motion:reduce){.piece.must{animation:none;box-shadow:0 0 0 .6cqw var(--gold)}.slider{transition:none}}.status{text-align:center;min-height:44px;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:15px}.status b{color:var(--text)}.must-text,.must-text b{color:var(--gold)}.think{display:inline-flex;gap:4px;margin-left:6px}.think i{width:6px;height:6px;border-radius:50%;background:var(--accent);animation:blink 1s infinite}.think i:nth-child(2){animation-delay:.15s}.think i:nth-child(3){animation-delay:.3s}@keyframes blink{50%{opacity:.2}}.sheet{margin-top:auto;background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:16px 16px 14px;display:flex;flex-direction:column;gap:12px;box-shadow:0 -10px 30px #00000059}.sheet h2{font-size:26px;text-align:center}.sheet .meta{text-align:center;color:var(--muted);font-size:14px;margin-top:-8px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.stats div{background:var(--bg);border-radius:12px;padding:10px 6px;text-align:center}.stats b{display:block;font-size:20px}.stats span{font-size:12px;color:var(--muted)}.play.ended .board-box{max-height:300px}.play.ended .movebar,.play.ended .status{display:none}.prose{gap:12px;line-height:1.55}.prose h2{font-size:17px;margin-top:8px}.prose ul{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px}.label{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:12px 2px 0;font-weight:600}.setting{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:8px 12px;border-radius:12px;background:var(--surface);border:1px solid var(--border)}.setting small{display:block;color:var(--muted);font-size:12px;margin-top:2px}.setting input[type=checkbox]{width:22px;height:22px;accent-color:var(--accent);flex:none}.setting select{padding:6px 8px;border-radius:8px;border:1px solid var(--border);background:var(--surface-hover);max-width:50%}.consent{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:10;max-width:456px;margin:0 auto;padding:14px;border-radius:14px;background:var(--surface);border:1px solid var(--border);box-shadow:0 12px 30px #0006;font-size:14px}.consent a{color:var(--accent)}.consent .row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}@media(max-height:700px){.hero{padding:0}.logo{width:96px}.hero h1{font-size:24px;margin-top:6px}.mode{min-height:56px;padding:10px 12px}.players{margin:2px 0 6px}.pl{padding:6px 10px}.movebar{display:none}}.legal-links{margin:4px 0}.share{position:relative}.share-note{position:absolute;top:calc(100% + 6px);right:0;z-index:21;white-space:nowrap;padding:6px 10px;border-radius:10px;border:1px solid var(--border);background:var(--surface);font-size:13px;box-shadow:0 10px 30px #0006}.share-note:empty{display:none}
