/* ===== 플레이 모드 — 삼국지 AI 하이브리드 프로토타입 ===== */

/* ===== A. 캐릭터 선택 화면 ===== */
.play-char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.play-char-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.play-char-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212,168,67,0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.play-char-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.play-char-card:hover::before {
  opacity: 1;
}

.play-char-card-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}

.play-char-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.play-char-card-stats {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.play-char-card:hover .play-char-card-stats {
  display: flex;
}

.play-char-stat-pill {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(212,168,67,0.12);
  color: var(--gold-light);
  border: 1px solid rgba(212,168,67,0.2);
}

.play-char-card-faction {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}

.play-char-card-missions {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== B. 게임 메인 화면 — 레이아웃 ===== */
.play-game-layout {
  display: flex;
  gap: 20px;
  min-height: calc(100vh - 120px);
}

.play-sidebar-panel {
  width: 30%;
  min-width: 260px;
  max-width: 340px;
  flex-shrink: 0;
}

.play-main-panel {
  flex: 1;
  min-width: 0;
}

/* ===== 좌측 사이드바 ===== */
.play-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.play-profile-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 4px;
}

.play-profile-turn {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.play-profile-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.play-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.play-stat-name {
  color: var(--text-secondary);
}

.play-stat-value {
  color: var(--gold-light);
  font-weight: 700;
  font-family: var(--font-serif);
  position: relative;
}

/* 스탯 변화 팝업 */
.play-stat-change {
  position: absolute;
  right: -8px;
  top: -14px;
  font-size: 0.7rem;
  font-weight: 700;
  animation: playStatPop 1.5s ease forwards;
  pointer-events: none;
  white-space: nowrap;
}

.play-stat-change.positive {
  color: #2ecc71;
}

.play-stat-change.negative {
  color: #e74c3c;
}

@keyframes playStatPop {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 1; transform: translateY(-18px); }
  100% { opacity: 0; transform: translateY(-28px); }
}

/* 완료 미션 목록 */
.play-completed-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

.play-completed-header {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background 0.2s;
}

.play-completed-header:hover {
  background: var(--bg-hover);
}

.play-completed-list {
  padding: 0 16px 12px;
  display: none;
}

.play-completed-list.open {
  display: block;
}

.play-completed-item {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 4px 0;
  border-bottom: 1px solid rgba(42,37,32,0.5);
}

.play-completed-item:last-child {
  border-bottom: none;
}

.play-completed-item .type-badge {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 6px;
}

.play-completed-item .type-badge.historical { background: rgba(52,152,219,0.2); color: #3498db; }
.play-completed-item .type-badge.alternative { background: rgba(230,126,34,0.2); color: #e67e22; }
.play-completed-item .type-badge.radical { background: rgba(231,76,60,0.2); color: #e74c3c; }

/* 플래그 상태 */
.play-flags-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}

.play-flags-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.play-flag-item {
  font-size: 0.72rem;
  color: var(--text-secondary);
  padding: 2px 0;
  word-break: break-all;
}

.play-flag-item::before {
  content: '🚩 ';
}

/* ===== 우측 메인 영역 ===== */

/* 내레이션 영역 */
.play-narration {
  background: rgba(30,25,20,0.6);
  border: 1px solid rgba(60,50,40,0.4);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  max-height: 300px;
  overflow-y: auto;
  font-family: var(--font-serif);
  line-height: 1.9;
}

.play-narration-entry {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 12px;
  opacity: 0;
  animation: playFadeIn 0.6s ease forwards;
}

.play-narration-entry.system {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
  font-family: var(--font-sans);
}

.play-narration-entry.crosslink {
  color: #9b59b6;
  font-size: 0.82rem;
  font-family: var(--font-sans);
}

.play-narration-entry.transition {
  color: var(--gold-dim);
  font-size: 0.88rem;
  text-align: center;
  padding: 8px 0;
  font-style: italic;
}

@keyframes playFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 미션 카드 */
.play-mission-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
}

.play-mission-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.play-mission-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
}

.play-mission-category {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid;
}

.play-mission-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.play-dialogue-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(212,168,67,0.15);
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.play-dialogue-btn:hover {
  background: rgba(212,168,67,0.3);
  transform: scale(1.1);
}

/* 선택지 버튼 */
.play-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.play-choice-btn {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.play-choice-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.play-choice-btn.historical {
  border-color: rgba(52,152,219,0.3);
}
.play-choice-btn.historical::after {
  background: linear-gradient(135deg, rgba(52,152,219,0.08), transparent);
}
.play-choice-btn.historical:hover {
  border-color: #3498db;
  box-shadow: 0 0 20px rgba(52,152,219,0.15);
}

.play-choice-btn.alternative {
  border-color: rgba(230,126,34,0.3);
}
.play-choice-btn.alternative::after {
  background: linear-gradient(135deg, rgba(230,126,34,0.08), transparent);
}
.play-choice-btn.alternative:hover {
  border-color: #e67e22;
  box-shadow: 0 0 20px rgba(230,126,34,0.15);
}

.play-choice-btn.radical {
  border-color: rgba(231,76,60,0.3);
}
.play-choice-btn.radical::after {
  background: linear-gradient(135deg, rgba(231,76,60,0.08), transparent);
}
.play-choice-btn.radical:hover {
  border-color: #e74c3c;
  box-shadow: 0 0 20px rgba(231,76,60,0.15);
}

.play-choice-btn:hover::after {
  opacity: 1;
}

.play-choice-btn:hover {
  transform: translateX(4px);
}

.play-choice-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.play-choice-btn.historical .play-choice-type { color: #3498db; }
.play-choice-btn.alternative .play-choice-type { color: #e67e22; }
.play-choice-btn.radical .play-choice-type { color: #e74c3c; }

.play-choice-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.play-choice-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

/* 호버 시 보상/위험도 미리보기 */
.play-choice-preview {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.72rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 6px;
}

.play-choice-btn:hover .play-choice-preview {
  display: flex;
}

.play-preview-tag {
  padding: 1px 6px;
  border-radius: 3px;
}

.play-preview-tag.positive {
  background: rgba(46,204,113,0.15);
  color: #2ecc71;
}

.play-preview-tag.negative {
  background: rgba(231,76,60,0.15);
  color: #e74c3c;
}

.play-preview-tag.neutral {
  background: rgba(155,89,182,0.15);
  color: #9b59b6;
}

/* 결과 표시 영역 */
.play-result {
  background: rgba(20,20,30,0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  animation: playFadeIn 0.5s ease;
}

.play-result-text {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.play-result-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.play-result-effect {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  animation: playResultPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  opacity: 0;
}

.play-result-effect.stat-up {
  background: rgba(46,204,113,0.15);
  color: #2ecc71;
  border: 1px solid rgba(46,204,113,0.3);
}

.play-result-effect.stat-down {
  background: rgba(231,76,60,0.15);
  color: #e74c3c;
  border: 1px solid rgba(231,76,60,0.3);
}

.play-result-effect.territory-gain {
  background: rgba(52,152,219,0.15);
  color: #3498db;
  border: 1px solid rgba(52,152,219,0.3);
}

.play-result-effect.territory-lose {
  background: rgba(155,89,182,0.15);
  color: #9b59b6;
  border: 1px solid rgba(155,89,182,0.3);
}

.play-result-effect.relation-up {
  background: rgba(26,188,156,0.15);
  color: #1abc9c;
  border: 1px solid rgba(26,188,156,0.3);
}

.play-result-effect.relation-down {
  background: rgba(192,57,43,0.15);
  color: #c0392b;
  border: 1px solid rgba(192,57,43,0.3);
}

.play-result-effect.flag-set {
  background: rgba(241,196,15,0.1);
  color: #f1c40f;
  border: 1px solid rgba(241,196,15,0.2);
}

@keyframes playResultPop {
  0% { opacity: 0; transform: scale(0.5); }
  100% { opacity: 1; transform: scale(1); }
}

/* 다음 미션 버튼 */
.play-next-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(212,168,67,0.2), rgba(212,168,67,0.05));
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  padding: 12px 24px;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s;
}

.play-next-btn:hover {
  background: linear-gradient(135deg, rgba(212,168,67,0.35), rgba(212,168,67,0.1));
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212,168,67,0.2);
}

/* ===== C. AI 대화 모달 ===== */
.play-dialogue-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: playFadeIn 0.3s ease;
}

.play-dialogue-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.play-dialogue-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.play-dialogue-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--gold);
}

.play-dialogue-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  transition: color 0.2s;
}

.play-dialogue-close:hover {
  color: var(--gold);
}

.play-dialogue-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  font-family: var(--font-serif);
  line-height: 1.8;
  color: var(--text-primary);
  font-size: 0.92rem;
}

.play-dialogue-typing {
  border-right: 2px solid var(--gold);
  animation: playBlink 0.7s step-end infinite;
}

@keyframes playBlink {
  50% { border-color: transparent; }
}

.play-dialogue-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}

.play-dialogue-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.play-dialogue-input:disabled {
  opacity: 0.5;
}

.play-dialogue-send {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: not-allowed;
  opacity: 0.5;
}

/* ===== E. 엔딩 화면 ===== */
.play-ending {
  text-align: center;
  padding: 60px 20px;
}

.play-ending-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.play-ending-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 12px;
}

.play-ending-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 40px;
}

.play-ending-summary {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.play-ending-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 28px;
  text-align: center;
  min-width: 120px;
}

.play-ending-stat-value {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.play-ending-stat-value.historical { color: #3498db; }
.play-ending-stat-value.alternative { color: #e67e22; }
.play-ending-stat-value.radical { color: #e74c3c; }

.play-ending-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.play-ending-restart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(212,168,67,0.25), rgba(212,168,67,0.05));
  border: 1px solid var(--gold-dim);
  border-radius: 10px;
  padding: 14px 32px;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.25s;
}

.play-ending-restart:hover {
  background: linear-gradient(135deg, rgba(212,168,67,0.4), rgba(212,168,67,0.1));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212,168,67,0.2);
}

/* 모바일 토글 버튼 */
.play-sidebar-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  color: var(--gold);
  font-size: 0.82rem;
  cursor: pointer;
  margin-bottom: 12px;
  width: 100%;
  text-align: center;
}

/* ===== 반응형 ===== */
@media (max-width: 768px) {
  .play-game-layout {
    flex-direction: column;
  }

  .play-sidebar-panel {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .play-sidebar-panel.collapsed > *:not(.play-sidebar-toggle) {
    display: none;
  }

  .play-sidebar-toggle {
    display: block;
  }

  .play-char-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .play-narration {
    max-height: 200px;
  }

  .play-ending-summary {
    gap: 12px;
  }

  .play-ending-stat {
    min-width: 90px;
    padding: 14px 18px;
  }
}


/* ===== NEW: 리팩토링 추가 스타일 ===== */

/* ── 캐릭터 선택: 플레이어블 카드 강조 ── */
.play-char-card.playable {
  border: 2px solid var(--gold);
}
.play-char-card.playable:hover {
  border-color: var(--gold-light);
  box-shadow: 0 0 20px rgba(212, 168, 67, 0.3);
}

.play-char-portrait {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-family: var(--font-serif);
  color: var(--gold);
  margin-bottom: 10px;
}

.play-char-card-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.play-resource-pill {
  font-size: 0.68rem;
  padding: 2px 8px;
  background: rgba(212, 168, 67, 0.1);
  border-radius: 10px;
  color: var(--gold-light);
}

.play-char-card-location {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── 로드 화면 ── */
.play-load-panel {
  max-width: 500px;
  margin: 40px auto;
  text-align: center;
}

.play-load-title {
  font-family: var(--font-serif);
  color: var(--gold);
  margin-bottom: 24px;
}

.play-save-slot {
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.play-save-slot.filled {
  background: var(--bg-card);
  border: 1px solid var(--gold);
}
.play-save-slot.filled:hover {
  border-color: var(--gold-light);
  box-shadow: 0 0 10px rgba(212, 168, 67, 0.2);
}

.play-save-slot.empty {
  background: var(--bg-primary);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  cursor: default;
}

.play-save-info {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.play-save-date {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.play-new-game-btn {
  margin-top: 24px;
  padding: 12px 32px;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.play-new-game-btn:hover {
  background: var(--gold-light);
}

/* ── 프로필: 스탯 바 ── */
.play-stat-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  margin: 0 8px;
  overflow: hidden;
}
.play-stat-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 3px;
  transition: width 0.5s ease;
}
.play-stat-row {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.play-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.play-profile-location {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.play-profile-territories {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.play-profile-territories span:last-child {
  color: var(--text-secondary);
}

/* ── 자원 패널 ── */
.play-resources-panel {
  margin-top: 16px;
}

.play-section-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 8px;
  font-family: var(--font-serif);
}

.play-resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.play-resource-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg-primary);
  border-radius: 6px;
  font-size: 0.78rem;
}

.play-resource-label {
  color: var(--text-muted);
}

.play-resource-value {
  color: var(--text-primary);
  font-weight: 600;
}

.play-resource-value.danger {
  color: var(--red-light);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── 참모 패널 ── */
.play-advisors-panel {
  margin-top: 16px;
}

.play-advisor-empty {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.play-advisor-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.play-advisor-portrait {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-family: var(--font-serif);
  color: var(--gold);
  flex-shrink: 0;
}
.play-advisor-portrait.wei { border-color: var(--faction-wei); color: var(--faction-wei); }
.play-advisor-portrait.shu { border-color: var(--faction-shu); color: var(--faction-shu); }
.play-advisor-portrait.wu { border-color: var(--faction-wu); color: var(--faction-wu); }

.play-advisor-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.play-advisor-traits {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── 관계 패널 ── */
.play-relations-panel {
  margin-top: 16px;
}

.play-relation-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.play-relation-value {
  font-weight: 600;
}

/* ── 참모 조언 패널 (메인) ── */
.play-advice-panel {
  margin: 16px 0;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: 10px;
  border-left: 3px solid var(--gold);
}

.play-advice-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 12px;
  font-family: var(--font-serif);
}

.play-advice-bubble {
  margin-bottom: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: 8px;
  border-left: 3px solid var(--border);
}
.play-advice-bubble.cautious { border-left-color: #3498db; }
.play-advice-bubble.aggressive { border-left-color: #e74c3c; }
.play-advice-bubble.schemer { border-left-color: #9b59b6; }
.play-advice-bubble.honorable { border-left-color: #2ecc71; }
.play-advice-bubble.mastermind { border-left-color: #f39c12; }

.play-advice-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.play-advice-portrait {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-family: var(--font-serif);
  color: var(--gold);
}
.play-advice-portrait.wei { border-color: var(--faction-wei); color: var(--faction-wei); }
.play-advice-portrait.shu { border-color: var(--faction-shu); color: var(--faction-shu); }
.play-advice-portrait.wu { border-color: var(--faction-wu); color: var(--faction-wu); }

.play-advice-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.play-advice-personality {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

.play-advice-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-family: var(--font-serif);
  font-style: italic;
}

/* ── 자유 입력 ── */
.play-free-input {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: 8px;
}

.play-free-input-field {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-sans);
}
.play-free-input-field:focus {
  outline: none;
  border-color: var(--gold);
}

.play-free-input-btn {
  padding: 10px 20px;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.play-free-input-btn:hover {
  background: var(--gold-light);
}

/* ── 전투 UI ── */
.play-combat-panel {
  margin: 16px 0;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: 10px;
  border: 1px solid rgba(192, 57, 43, 0.3);
}

.play-combat-title {
  font-family: var(--font-serif);
  color: var(--red-light);
  margin-bottom: 16px;
}

.play-combat-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.play-combat-side {
  text-align: center;
  padding: 12px 20px;
  background: var(--bg-card);
  border-radius: 8px;
  flex: 1;
}
.play-combat-side.player {
  border: 1px solid var(--gold);
}
.play-combat-side.enemy {
  border: 1px solid var(--red-light);
}

.play-combat-vs {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0 12px;
}

.play-combat-log {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 10px;
  background: var(--bg-card);
  border-radius: 6px;
}

.play-combat-log-entry {
  margin-bottom: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.play-combat-log-entry.narration {
  font-family: var(--font-serif);
  color: var(--text-primary);
}
.play-combat-log-entry.result {
  color: var(--gold);
  font-weight: 600;
}
.play-combat-log-entry.warning {
  color: var(--red-light);
}

.play-combat-strategies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.play-strategy-btn {
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  color: var(--text-primary);
}
.play-strategy-btn:hover:not(.locked) {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212, 168, 67, 0.2);
}
.play-strategy-btn.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.play-strategy-label {
  font-weight: 600;
  margin-bottom: 4px;
}

.play-strategy-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.play-strategy-locked {
  font-size: 0.7rem;
  color: var(--red-light);
  margin-top: 4px;
}

/* ── 세이브/로드 ── */
.play-saveload-panel {
  display: flex;
  gap: 6px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.play-saveload-btn {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
}
.play-saveload-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.play-saveload-btn.quit:hover {
  border-color: var(--red-light);
  color: var(--red-light);
}

/* ── 모달 ── */
.play-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.play-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
}

.play-modal-box h3 {
  font-family: var(--font-serif);
  color: var(--gold);
  margin-bottom: 16px;
  text-align: center;
}

.play-save-slot-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.play-save-slot-btn:hover {
  border-color: var(--gold);
}

.play-modal-close-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
}

/* ── 내레이션 타입별 스타일 ── */
.play-narration-entry.narration {
  font-family: var(--font-serif);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 0.9rem;
}

.play-narration-entry.world-event {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.9rem;
}

.play-narration-entry.random-event {
  color: var(--faction-wu);
}

.play-narration-entry.combat-result {
  color: var(--red-light);
  font-weight: 600;
}

.play-narration-entry.domestic {
  color: var(--faction-shu);
}

.play-narration-entry.diplomacy {
  color: #2ecc71;
}

.play-narration-entry.personnel {
  color: #9b59b6;
}

.play-narration-entry.player {
  color: var(--text-primary);
  font-style: italic;
}

.play-narration-entry.choice {
  color: var(--gold-light);
  font-weight: 600;
}
