/* 성지폰 윷놀이 */
.yut-screen { padding-bottom: 24px; }

.yut-panel {
  background: #fff;
  border-radius: 20px;
  padding: 18px 16px 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.yut-hud { text-align: center; margin-bottom: 14px; }
.yut-hud h1 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.yut-lead { margin: 0 0 10px; font-size: 13px; color: #64748b; line-height: 1.55; }
.yut-status {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
  font-weight: 700;
}
.yut-status.is-ai { background: #fef3c7; color: #92400e; }
.yut-status.is-win { background: #dcfce7; color: #166534; }
.yut-status.is-lose { background: #fee2e2; color: #991b1b; }

/* 점수판 */
.yut-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}
.yut-side {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 12px;
  background: #f9fafb;
  text-align: left;
}
.yut-side.is-me { border-color: #bfdbfe; background: #eff6ff; }
.yut-side.is-ai { border-color: #fecaca; background: #fef2f2; }
.yut-side-name { font-size: 12px; font-weight: 800; color: #334155; margin-bottom: 4px; }
.yut-side.is-me .yut-side-name { color: #1d4ed8; }
.yut-side.is-ai .yut-side-name { color: #b91c1c; }
.yut-side-nums { font-size: 12px; color: #64748b; line-height: 1.5; }
.yut-side-nums b { color: #0f172a; }

/* 윷판 */
.yut-board-wrap {
  max-width: 420px;
  margin: 0 auto 14px;
}
.yut-board {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #fdf6e6;
  border: 2px solid #d9c49c;
  border-radius: 18px;
  box-sizing: border-box;
}
/* 바깥 사각 테두리 선 + 대각선 */
.yut-board::before,
.yut-board::after {
  content: "";
  position: absolute;
  left: 8%;
  top: 8%;
  width: 84%;
  height: 84%;
  pointer-events: none;
}
.yut-board::before {
  border: 2px solid #ddc9a3;
  border-radius: 4px;
}
.yut-board::after {
  background:
    linear-gradient(to bottom right, transparent calc(50% - 1px), #ddc9a3 calc(50% - 1px), #ddc9a3 calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(to top right, transparent calc(50% - 1px), #ddc9a3 calc(50% - 1px), #ddc9a3 calc(50% + 1px), transparent calc(50% + 1px));
}

/* 좌표는 JS에서 0~1 → 안쪽 영역(8%~92%) 으로 환산해 left/top 지정 */
.yut-node {
  position: absolute;
  width: 13%;
  height: 13%;
  transform: translate(-50%, -50%);
  border: 2px solid #c8ad82;
  border-radius: 50%;
  background: #fffdf7;
  padding: 0;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
}
.yut-node.is-corner { border-color: #a1802f; border-width: 3px; background: #fff7e0; }
.yut-node.is-center { width: 17%; height: 17%; border-color: #b45309; border-width: 3px; background: #fff3d6; }
.yut-node.is-start { width: 17%; height: 17%; border-color: #0e7c66; border-width: 3px; background: #e8f8f3; }
.yut-node.is-short { width: 11%; height: 11%; background: #fffaf0; }

.yut-node-label {
  font-size: 9px;
  font-weight: 800;
  color: #6b7280;
  line-height: 1.15;
  text-align: center;
  pointer-events: none;
}
.yut-node.is-start .yut-node-label { color: #0e7c66; }
.yut-node.is-center .yut-node-label { color: #b45309; }

.yut-node.is-movable {
  cursor: pointer;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.18);
}
.yut-node.is-movable:active { transform: translate(-50%, -50%) scale(0.94); }
.yut-node.is-target {
  border-color: #0e7c66;
  box-shadow: 0 0 0 3px rgba(14, 124, 102, 0.18);
}

.yut-node-pieces {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
}
.yut-piece {
  width: 62%;
  height: 62%;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.25);
}
.yut-piece.is-me { background: linear-gradient(#3b82f6, #1d4ed8); }
.yut-piece.is-ai { background: linear-gradient(#f87171, #dc2626); }

/* 윷가락 */
.yut-throw-area {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin: 0 0 14px;
}
.yut-sticks { display: flex; gap: 6px; min-height: 42px; align-items: center; }
.yut-stick {
  width: 13px;
  height: 40px;
  border-radius: 7px;
  background: linear-gradient(#a97142, #8a5a33);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.yut-stick.is-flat {
  background: linear-gradient(#fdf1dc, #f0ddba);
  box-shadow: inset 0 0 0 1px #d9c49c;
}
.yut-throw-name { font-size: 15px; font-weight: 800; color: #0f172a; min-height: 20px; }

.yut-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.yut-actions .primary-button,
.yut-actions .secondary-button { min-width: 130px; }
.yut-panel button:disabled { opacity: 0.45; cursor: not-allowed; }

.yut-log {
  list-style: none;
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 12px;
  color: #475569;
  line-height: 1.7;
  min-height: 44px;
}
.yut-log li + li { color: #94a3b8; }

.yut-rules {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f1f5f9;
  font-size: 11.5px;
  line-height: 1.75;
  color: #475569;
}
.yut-rules b { color: #0f172a; }

.yut-result {
  margin: 14px 0 0;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(#e8f8f3, #fff);
  border: 1px solid #9ad7c6;
  text-align: center;
}
.yut-result-title { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: #0e7c66; }
.yut-result-text { margin: 0 0 12px; font-size: 13px; color: #475569; line-height: 1.55; }
.yut-result-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

@media (min-width: 901px) {
  .yut-panel { padding: 24px; }
  .yut-hud h1 { font-size: 26px; }
  .yut-board-wrap { max-width: 460px; }
  .yut-node-label { font-size: 10px; }
}
