.mrs{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
.mrs-board{position:relative;width:min(100%,340px,54dvh);aspect-ratio:1;margin-inline:auto}
.mrs-board>svg{display:block;width:100%;height:100%;overflow:visible}
.mrs-lines{fill:none;stroke:var(--game);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
.mrs-node{fill:var(--paper);stroke:var(--game);stroke-width:2;opacity:.9}
.mrs-mill-line{fill:none;stroke:var(--ink);stroke-width:7;stroke-linecap:round;opacity:.22}
.mrs-mill-line.p1{stroke:var(--red)}

.mrs-hits{position:absolute;inset:0}
.mrs-hits button{position:absolute;width:13.2%;height:13.2%;transform:translate(-50%,-50%);
  appearance:none;border:0;border-radius:50%;background:transparent;padding:0;touch-action:manipulation}
.mrs-hits button[aria-disabled="false"]{cursor:pointer}
.mrs-hits button:focus-visible{outline:2px dashed var(--game);outline-offset:1px}
.mrs-hits button.tgt:active,.mrs-hits button.rem:active{background:color-mix(in srgb,var(--game) 16%,transparent)}
@media (hover:hover){
  .mrs-hits button[aria-disabled="false"]:hover{background:color-mix(in srgb,var(--game) 11%,transparent)}
}

.mrs-piece{color:var(--ink);transform-box:fill-box;transform-origin:center}
.mrs-piece.p1{color:var(--red)}
.mrs-disc-out{fill:var(--paper);stroke:currentColor;stroke-width:2.2}
.mrs-disc-fill{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:.78}
.mrs-disc-in{fill:none;stroke:var(--paper);stroke-width:1.4;opacity:.85}
.mrs-sel-ring{fill:none;stroke:var(--game);stroke-width:2.4;stroke-dasharray:5 3.5;stroke-linecap:round}
.mrs-rem-ring{fill:none;stroke:var(--red);stroke-width:2.2;stroke-dasharray:4 3;stroke-linecap:round}
.mrs-piece.p0 .mrs-rem-ring{stroke:var(--game)}
.mrs-piece.locked{opacity:.48}

.mrs-piece.placed{animation:mrs-pop 200ms var(--ease-pop,ease-out) both}
@keyframes mrs-pop{
  0%{transform:scale(.4);opacity:.2}
  70%{transform:scale(1.1);opacity:1}
  100%{transform:scale(1)}
}

.mrs-piece.sliding{animation:mrs-slide 210ms var(--ease-pen,ease-out) both}
@keyframes mrs-slide{
  0%{transform:translate(var(--dx),var(--dy))}
  55%{transform:translate(calc(var(--dx) * .35),calc(var(--dy) * .35 - 5px))}
  100%{transform:translate(0,0)}
}

.mrs-piece.removable{animation:mrs-wobble 520ms ease-in-out infinite}
@keyframes mrs-wobble{
  0%,100%{transform:rotate(0deg) scale(1)}
  25%{transform:rotate(-8deg) scale(1.06)}
  75%{transform:rotate(8deg) scale(1.06)}
}

.mrs-dot{fill:var(--game);opacity:.88}
.mrs-dot-ring{fill:none;stroke:var(--game);stroke-width:1.7;stroke-dasharray:3 3;opacity:.7}
.mrs-target.emph .mrs-dot-ring{stroke-width:2.1;opacity:.9}

.mrs-hud{display:flex;align-items:center;justify-content:space-between;width:min(100%,340px);gap:6px}
.mrs-side{display:flex;flex-direction:column;gap:3px;min-width:68px}
.mrs-side.p0{color:var(--ink);align-items:flex-start}
.mrs-side.p1{color:var(--red);align-items:flex-end}
.mrs-tally{display:inline-flex;align-items:center;gap:5px;font-size:17px;font-weight:700;line-height:1}
.mrs-sub{font-size:13px;font-weight:400;opacity:.72}
.mrs-pip{display:inline-block;width:11px;height:11px;border-radius:50%;border:2px solid currentColor;background:color-mix(in srgb,currentColor 28%,var(--paper))}
.mrs-pips{display:flex;flex-wrap:wrap;gap:2.5px;min-height:8px;max-width:74px}
.mrs-side.p1 .mrs-pips{justify-content:flex-end}
.mrs-hand-pip{display:inline-block;width:6px;height:6px;border-radius:50%;border:1.3px solid currentColor;background:color-mix(in srgb,currentColor 22%,var(--paper))}
.mrs-hint{flex:1;text-align:center;margin:0;min-height:1.2em;font-size:15px}

@media (prefers-reduced-motion: reduce){
  .mrs-piece.removable,.mrs-piece.placed,.mrs-piece.sliding{animation:none}
}
