.game-shell[data-theme="chess"] {
  --game-accent: #9d8cff;
  --game-accent-2: #d4cbff;
  --game-accent-soft: rgba(157, 140, 255, 0.22);
  --game-accent-deep: rgba(212, 203, 255, 0.1);
}

.chess-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.chess-board-wrap {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(14, 10, 24, 0.54);
}

.chess-tip-banner {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(157, 140, 255, 0.22);
  background: rgba(157, 140, 255, 0.08);
  color: #ebe7ff;
  line-height: 1.6;
}

.chess-capture-strip {
  display: grid;
  gap: 10px;
}

.chess-capture-label {
  color: rgba(255, 255, 255, 0.54);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 800;
}

.chess-capture-pieces {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chess-capture-piece {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.chess-capture-piece.p1 {
  color: #fff8e8;
  --piece-stroke: #543625;
}

.chess-capture-piece.p2 {
  color: #18263d;
  --piece-stroke: #f6e6cc;
}

.chess-capture-empty {
  color: rgba(255, 255, 255, 0.52);
  font-style: normal;
}

.chess-board {
  grid-template-columns: repeat(8, minmax(42px, 66px));
  gap: 0;
  padding: 14px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    rgba(27, 19, 39, 0.92);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chess-square {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
}

.chess-square.is-dark {
  background: #8b6545;
}

.chess-square.is-light {
  background: #f5e8cf;
}

.chess-square::before {
  content: attr(data-coord);
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.chess-square.is-dark::before {
  color: rgba(255, 255, 255, 0.24);
}

.chess-square.is-light::before {
  color: rgba(91, 59, 40, 0.28);
}

.chess-square.is-selected {
  box-shadow: inset 0 0 0 4px rgba(212, 203, 255, 0.84);
}

.chess-square.is-target::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(157, 140, 255, 0.78);
  box-shadow: 0 0 0 4px rgba(157, 140, 255, 0.18);
}

.chess-square.is-last {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.chess-piece {
  position: relative;
  z-index: 1;
  width: 82%;
  height: 82%;
  display: grid;
  place-items: center;
  line-height: 1;
}

.chess-piece.p1 {
  color: #fff8e8;
  --piece-stroke: #543625;
}

.chess-piece.p2 {
  color: #18263d;
  --piece-stroke: #f6e6cc;
}

.chess-piece-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chess-piece-svg .piece-fill {
  fill: currentColor;
  stroke: var(--piece-stroke);
  stroke-width: 2.3;
  stroke-linejoin: round;
  paint-order: stroke fill;
}

.chess-piece-svg .piece-line {
  fill: none;
  stroke: var(--piece-stroke);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chess-guide {
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    rgba(10, 13, 28, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chess-guide-head h4 {
  margin: 0 0 6px;
  font-family: var(--font-title);
  font-size: 1.1rem;
}

.chess-guide-head p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.55;
}

.chess-guide-grid {
  display: grid;
  gap: 10px;
}

.chess-guide-card {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.chess-guide-card.is-active {
  border-color: rgba(157, 140, 255, 0.28);
  background: rgba(157, 140, 255, 0.1);
  transform: translateY(-1px);
}

.chess-guide-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.chess-guide-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
  font-size: 0.88rem;
}

@media (max-width: 980px) {
  .chess-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .chess-board {
    padding: 10px;
  }
}
