:root{font-family:system-ui,sans-serif;color:#192f38;background:#f5f3ed;color-scheme:light}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
main{width:min(100% - 28px,880px);margin:0 auto 32px}
.top{display:flex;justify-content:space-between;gap:12px;padding:18px 0;border-bottom:1px solid #192f3826;font-size:.9rem;font-weight:700}
a{color:#31563b}
header{margin:24px 0 16px}
h1{margin:0 0 6px;font-size:clamp(2.5rem,8vw,4.3rem);line-height:1.06;letter-spacing:-.065em}
h2{margin:8px 0;font-size:1.12rem}
p{margin:6px 0;line-height:1.55;color:#456069}
.layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:14px;align-items:start}
.panel{min-width:0;background:white;border:1px solid #192f3826;border-radius:16px;padding:14px;margin-bottom:12px}
.row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.spread{justify-content:space-between}
button,input{font:inherit;border-radius:9px;min-height:44px}
button{border:1px solid #192f3820;background:#e5edcf;color:#192f38;padding:8px 12px;font-weight:700;cursor:pointer;touch-action:manipulation}
button:disabled{opacity:.6;cursor:default}
button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #536b32;outline-offset:2px}
.primary{background:#192f38;color:white}
input{border:1px solid #73827d;background:#f9f8f4;padding:8px 11px;width:100%;min-width:0}
label{display:block;font-weight:650;margin:10px 0 4px}
#myName{margin-bottom:8px}
#friends{border-top:1px solid #192f3826;margin-top:12px;padding-top:12px}
#code{max-width:142px;text-transform:uppercase}
.notice,.error{padding:8px 10px;border-radius:8px;background:#f5f3ed}
.error{background:#f7e1d3;color:#77351b}
#invite{margin-top:8px}
#field{margin-top:10px}
#again{margin-top:12px}
.xo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;width:min(100%,340px);margin:auto}
.xo-cell{aspect-ratio:1;background:#f1f3e9;font-size:clamp(2rem,10vw,4.2rem);line-height:1}
.xo-cell:disabled,.point:disabled{opacity:1}
.side-0{color:#235e49}
.side-1{color:#a23d29}
.mice-board{position:relative;aspect-ratio:1;margin:auto;width:min(100%,420px);background:#f3e4ce;border-radius:12px}
.track{position:absolute;background:#80674d;transform-origin:0 50%;height:2px;pointer-events:none}
.point{position:absolute;width:12%;min-width:0;height:12%;min-height:0;padding:0;transform:translate(-50%,-50%);background:transparent;border:0;border-radius:50%;display:grid;place-items:center}
.point::after{content:"";display:block;width:34%;aspect-ratio:1;background:#80674d;border-radius:50%;pointer-events:none}
.point.side-0::after,.point.side-1::after{width:73%;background:#fff8e8;border:2px solid #41352f;box-shadow:0 2px 3px #41352f60}
.point.side-1::after{background:#4c3a34}
.point.option::after{box-shadow:0 0 0 3px #4e722a}
.point.chosen::after,.point.capture::after{box-shadow:0 0 0 3px #9a4d27}
.mice-counts{margin:0 0 8px;display:flex;flex-wrap:wrap;gap:6px 16px;color:#456069}
.chain,.hand{display:flex;gap:6px;padding:8px;border-radius:9px}
.chain{overflow:auto;min-height:58px;background:#e9eee3}
.hand{flex-wrap:wrap;padding:6px 0}
.tile{display:inline-flex;flex:none;align-items:center;background:#fcf9ed;border:1px solid #6d7970;border-radius:6px;padding:3px;min-height:44px;color:#192f38}
.tile.selected{outline:2px solid #536b32}
.tile .half{display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);width:28px;height:28px;padding:3px;gap:1px}
.tile .half+.half{border-left:1px solid #839388}
.pip{border-radius:50%;background:#192f38}
.tile-actions{margin:6px 0}
@media(max-width:650px){.layout{grid-template-columns:minmax(0,1fr)}}
