/* 동물 장기 판·말 모양 (학생 화면·복기·게임 방법·교사 관전이 함께 쓴다). 그리기는 /animal/animal-board.js */
:root {
  --animal-bg: #e9d8b4;
  --animal-line: #8a6a3c;
  --hand-bg: #f5ecd9;
  --piece-black: #fff3d6;
  --piece-white: #e3eefb;
  --piece-edge: #3b2f20;
}

.animal-board .bg {
  fill: var(--animal-bg);
}

.animal-board .line {
  stroke: var(--animal-line);
  stroke-width: 0.03;
}

.animal-board .hand-bg {
  fill: var(--hand-bg);
}

.animal-board .hand-empty {
  font-size: 0.2px;
  fill: var(--muted);
  text-anchor: middle;
  dominant-baseline: central;
}

.animal-board .hand-count {
  font-size: 0.24px;
  font-weight: 700;
  fill: var(--text);
  text-anchor: middle;
  dominant-baseline: central;
}

/* 말: 먼저는 한 줄 테두리, 나중은 안쪽에 한 줄 더 (색만으로 나누지 않는다) */
.animal-board .piece-body {
  stroke: var(--piece-edge);
  stroke-width: 0.04;
}

.animal-board .piece.black .piece-body {
  fill: var(--piece-black);
}

.animal-board .piece.white .piece-body {
  fill: var(--piece-white);
}

.animal-board .piece-inner {
  fill: none;
  stroke: var(--piece-edge);
  stroke-width: 0.02;
}

.animal-board .piece-dot {
  fill: #c2410c;
}

.animal-board .piece-letter {
  font-size: 0.32px;
  font-weight: 800;
  fill: var(--piece-edge);
  text-anchor: middle;
  dominant-baseline: central;
}

.animal-board .piece-mark {
  font-size: 0.1px;
  fill: var(--piece-edge);
  text-anchor: middle;
  dominant-baseline: central;
}

.animal-board .piece.faded,
.animal-board .piece.ghost {
  opacity: 0.45;
}

/* 고른 말, 갈 수 있는 칸, 바로 전 수 */
.animal-board .picked {
  fill: rgb(99 102 241 / 0.25);
  stroke: var(--indigo-600);
  stroke-width: 0.05;
}

.animal-board .target {
  fill: var(--indigo-600);
  opacity: 0.75;
}

.animal-board .target.capture {
  fill: none;
  stroke: var(--indigo-600);
  stroke-width: 0.06;
  stroke-dasharray: 0.12 0.08;
}

.animal-board .last-from {
  fill: none;
  stroke: var(--amber-700);
  stroke-width: 0.04;
  stroke-dasharray: 0.1 0.07;
}

.animal-board .last-to {
  fill: rgb(253 230 138 / 0.55);
  stroke: var(--amber-700);
  stroke-width: 0.05;
}

.animal-board .tap {
  fill: transparent;
  cursor: pointer;
}

/* 게임 방법(가이드)의 그림과 연습 판 */
.animal-board.guide {
  display: block;
  width: min(100%, 260px);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.animal-board.legend {
  display: block;
  width: min(100%, 340px);
}

.animal-board .legend-name {
  font-size: 0.22px;
  font-weight: 700;
  fill: var(--text);
  text-anchor: middle;
  dominant-baseline: central;
}
