.gomoku-panel .game-page-play-inner { max-width: 540px; }
.gomoku-toolbar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.gomoku-toolbar label, .gomoku-turn { color: var(--game-secondary); font-size: 14px; }
.gomoku-turn { justify-content: space-between; margin: 8px 0; min-height: 26px; }
.gomoku-turn p { margin: 0; }
.gomoku-board-mat {
  width: 100%;
  box-sizing: border-box;
  padding: clamp(5px, 1.5vw, 12px);
  border: 1px solid #b89461;
  border-radius: 10px;
  background: #e6c48b;
}
.gomoku-board { position: relative; display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); touch-action: manipulation; }
.gomoku-cell {
  display: grid;
  place-items: center;
  position: relative;
  min-width: 0;
  padding: 0;
  aspect-ratio: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}
.gomoku-cell::before, .gomoku-cell::after {
  content: "";
  position: absolute;
  background: #715032;
  pointer-events: none;
}
.gomoku-cell::before { width: 1px; inset: 0 auto 0 calc(50% - .5px); }
.gomoku-cell::after { height: 1px; inset: calc(50% - .5px) 0 auto; }
.gomoku-cell:nth-child(-n+15)::before { top: 50%; }
.gomoku-cell:nth-last-of-type(-n+15)::before { bottom: 50%; }
.gomoku-cell:nth-child(15n+1)::after { left: 50%; }
.gomoku-cell:nth-child(15n)::after { right: 50%; }
.gomoku-stone { z-index: 1; box-sizing: border-box; width: 81%; height: 81%; border-radius: 50%; pointer-events: none; }
.gomoku-cell[data-stone="1"] .gomoku-stone { background: radial-gradient(circle at 30% 24%, #485863, #263039 54%, #172128); border: 1px solid #182028; box-shadow: 0 1px 2px #2f1b1466; }
.gomoku-cell[data-stone="2"] .gomoku-stone { background: radial-gradient(circle at 30% 24%, #fffef8, #fff9e8 54%, #ead8b6); border: 1px solid #9c815e; box-shadow: 0 1px 2px #2f1b1452; }
.gomoku-cell[data-last] .gomoku-stone::after {
  content: "";
  display: block;
  margin: 31% auto;
  width: 34%;
  height: 34%;
  border-radius: 50%;
  background: #d28856;
}
.gomoku-cell[data-winning] .gomoku-stone, .gomoku-cell[data-selected] .gomoku-stone { outline: 2px solid #9f4227; }
.gomoku-cell[data-star] .gomoku-stone { width: 22%; height: 22%; background: #715032; }
.gomoku-cell[data-selected] .gomoku-stone { width: 74%; height: 74%; background: #f8dea899; }
.gomoku-cell:not([data-stone]):hover .gomoku-stone { outline: 1px solid #715032; }
.gomoku-cell:focus-visible { outline: 2px solid #4a4236; outline-offset: -2px; z-index: 2; }
.gomoku-actions { margin-top: 12px; }
.gomoku-toolbar [hidden] { display: none !important; }
.gomoku-win-line {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  visibility: hidden;
  overflow: visible;
}
.gomoku-win-line[data-visible] { visibility: visible; }
.gomoku-win-line line {
  stroke: #ffc268;
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 1px #683b23);
}
