.hex{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:100%}
.hex-board{position:relative;width:min(100%,420px);max-height:56dvh;aspect-ratio:388/256;margin-inline:auto}
.hex-board>svg{display:block;width:100%;height:100%;overflow:visible}

.hex-edge{fill:none;stroke-width:5.5;stroke-linecap:round;stroke-linejoin:round;opacity:.88}
.hex-edge.p0{stroke:var(--ink)}
.hex-edge.p1{stroke:var(--red)}

.hex-cell{fill:color-mix(in srgb,var(--paper) 82%,transparent);stroke:color-mix(in srgb,var(--pencil) 72%,var(--game));stroke-width:1.45;stroke-linejoin:round;touch-action:manipulation;transition:fill .12s ease}
.hex-cell.open{cursor:pointer}
.hex-cell.open:active{fill:color-mix(in srgb,var(--game) 22%,var(--paper))}
.hex-cell:focus{outline:none}
.hex-cell:focus-visible{outline:none;stroke:var(--game);stroke-width:2.4}
@media (hover:hover){
  .hex-cell.open:hover{fill:color-mix(in srgb,var(--game) 15%,var(--paper))}
}

.hex-last{fill:color-mix(in srgb,var(--game-2) 28%,transparent);stroke:var(--game);stroke-width:1.8;stroke-dasharray:3 2.5;pointer-events:none}
.hex-last.p1{fill:color-mix(in srgb,var(--red) 14%,transparent);stroke:var(--red)}

.hex-stone{color:var(--ink);pointer-events:none}
.hex-stone.p1{color:var(--red)}
.hex-stone-out{fill:var(--paper);stroke:currentColor;stroke-width:2}
.hex-stone-fill{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:.82}

.hex-win-glow{fill:none;stroke:var(--paper);stroke-width:8.5;stroke-linecap:round;stroke-linejoin:round;opacity:.82}
.hex-win-line{fill:none;stroke-width:4.4;stroke-linecap:round;stroke-linejoin:round}
.hex-win-line.p0{stroke:var(--ink)}
.hex-win-line.p1{stroke:var(--red)}

.hex-bar{display:flex;align-items:center;justify-content:space-between;width:min(100%,388px);gap:6px}
.hex-goal{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:700;white-space:nowrap}
.hex-goal.p0{color:var(--ink)}
.hex-goal.p1{color:var(--red)}
.hex-goal svg{width:14px;height:14px;flex:none}

.hex-mid{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px}
.hex-hint{margin:0;text-align:center;min-height:1.2em;font-size:14px}
.hex-swap{padding:4px 10px;font-size:13px;white-space:nowrap}
.hex-swap.hidden{display:none}
