/* ===== 华容道场景 ===== */
.huarongdao-scene {
  background: linear-gradient(180deg, #2f1833 0%, #4b224f 45%, #6f2b5f 100%);
  padding: 24px;
  justify-content: flex-start;
}

.huarongdao-topbar {
  width: 100%;
  max-width: 1180px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.huarongdao-back-button,
.huarongdao-restart-button {
  font-size: 14px;
  padding: 10px 18px;
  background: #f7d774;
}

.huarongdao-top-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.huarongdao-badge {
  min-width: 160px;
  padding: 10px 14px;
  border: 4px solid #000;
  background: #f6e7b0;
  color: #2b1d0e;
  box-shadow: 4px 4px 0 #000;
  font-size: 14px;
  line-height: 1.5;
}

.huarongdao-title {
  font-size: 34px;
  color: #ffe08a;
  margin-bottom: 18px;
  text-shadow: 3px 3px 0 #000;
  letter-spacing: 4px;
}

.huarongdao-content {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}

.huarongdao-board-panel,
.huarongdao-side-panel {
  border: 4px solid #000;
  box-shadow: 6px 6px 0 #000;
}

.huarongdao-board-panel {
  background: #d9c28a;
  padding: 18px;
}

.huarongdao-subtitle {
  font-size: 22px;
  color: #5c3415;
  margin-bottom: 14px;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.18);
}

.huarongdao-board-wrap {
  display: flex;
  justify-content: center;
}

.huarongdao-board {
  position: relative;
  width: 328px;
  height: 410px;
  border: 4px solid #000;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0 1px, transparent 1px 25%, rgba(0, 0, 0, 0.1) 25% calc(25% + 1px), transparent calc(25% + 1px) 50%, rgba(0, 0, 0, 0.1) 50% calc(50% + 1px), transparent calc(50% + 1px) 75%, rgba(0, 0, 0, 0.1) 75% calc(75% + 1px), transparent calc(75% + 1px) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0 1px, transparent 1px 20%, rgba(0, 0, 0, 0.1) 20% calc(20% + 1px), transparent calc(20% + 1px) 40%, rgba(0, 0, 0, 0.1) 40% calc(40% + 1px), transparent calc(40% + 1px) 60%, rgba(0, 0, 0, 0.1) 60% calc(60% + 1px), transparent calc(60% + 1px) 80%, rgba(0, 0, 0, 0.1) 80% calc(80% + 1px), transparent calc(80% + 1px) 100%),
    linear-gradient(180deg, #f7e6be 0%, #d8b16a 100%);
  overflow: visible;
}

.huarongdao-exit {
  position: absolute;
  left: 82px;
  bottom: -18px;
  width: 164px;
  height: 18px;
  background: #4b2d00;
  border: 4px solid #000;
  border-top: none;
}

.piece {
  position: absolute;
  border: 4px solid #000;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff8dc;
  cursor: pointer;
  transition: transform 0.08s ease;
  text-align: center;
  padding: 4px;
  user-select: none;
}

.piece:hover {
  transform: translate(-1px, -1px);
}

.piece.selected {
  outline: 4px solid #ffe066;
  outline-offset: 2px;
}

.piece.emperor {
  background: linear-gradient(180deg, #b22222 0%, #e63946 100%);
}

.piece.guard {
  background: linear-gradient(180deg, #2d6a4f 0%, #40916c 100%);
}

.piece.attendant {
  background: linear-gradient(180deg, #5a189a 0%, #7b2cbf 100%);
}

.piece.page {
  background: linear-gradient(180deg, #495057 0%, #6c757d 100%);
}

.piece-title {
  font-size: 12px;
  line-height: 1.2;
  text-shadow: 1px 1px 0 #000;
}

.piece-role {
  font-size: 10px;
  opacity: 0.95;
}

.huarongdao-side-panel {
  background: #fff4d6;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.huarongdao-info-box,
.huarongdao-message-box,
.huarongdao-instruction-box {
  border: 4px solid #000;
  background: #fffdf6;
  padding: 14px;
  color: #53351b;
  line-height: 1.7;
}

.huarongdao-message-box {
  min-height: 96px;
  background: #ffe08a;
  color: #4b2d00;
}

.move-panel {
  border: 4px solid #000;
  background: #f7ebc8;
  padding: 14px;
}

.move-grid {
  width: 220px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 64px);
  grid-template-rows: repeat(2, 64px);
  gap: 8px;
  justify-content: center;
}

.move-button {
  font-size: 24px;
  padding: 0;
  width: 64px;
  height: 64px;
  background: #f7d774;
}

.move-button.empty {
  visibility: hidden;
}

.huarongdao-win {
  border: 4px solid #000;
  background: #d4f8c4;
  color: #204b22;
  padding: 16px;
  line-height: 1.8;
  font-size: 18px;
}

@media (max-width: 960px) {
  .huarongdao-content {
    grid-template-columns: 1fr;
  }

  .huarongdao-topbar {
    align-items: stretch;
  }
}
