.race-info {
  width: 100%;
}

.race-detail-wrap .sub-title {
  font-size: 1.5rem !important;
  font-weight: bold;
  margin-bottom: 10px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
}

.race-detail-wrap .inner-title {
  font-size: 1.5rem !important;
  font-weight: bold;
}

.race-info-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.race-info-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  padding: 14px 0;
  border-bottom: 1px solid #e5e5e5;
}

.race-info-item .label {
  color: #777;
}

.race-info-item .value {
  font-weight: 500;
}

/* PC 2열 */
@media (min-width: 768px) {
  .race-info-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 60px;
  }
  .entry-table {
    width: max-content !important;
    border-collapse: collapse;
  }
}

/* 출전 정보 테이블 래퍼 — 모바일 가로 스크롤 */
.entry-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 8px;
}

.entry-table-wrap table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  width: 100% !important;
}

.entry-table-wrap table th {
  padding: 9px 4px !important;
  text-align: center !important;
  border: 1px solid rgba(107, 22, 238, 0.4) !important;
  background: rgba(107, 22, 238, 0.8) !important;
  color: #fff !important;
}

.entry-table-wrap table td {
  padding: 9px 4px !important;
  text-align: center !important;
  border: 1px solid #e0e0e0 !important;
}

/* 기존 .entry-table 선택자 — 개별 커스터마이징용 유지 */
.entry-table {
  border-collapse: collapse;
  font-size: 14px;
}

.entry-table th {
  background: #f7f7f7;
  font-weight: 600;
  text-align: center !important;
}

.entry-table th,
.entry-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e5e5;
}

/* 세로 구분선 */
.entry-table th + th,
.entry-table td + td {
  border-left: 1px solid #f0f0f0;
}

/* zebra */
.entry-table tbody tr:nth-child(even) {
  background: #fafafa;
}

/* hover */
.entry-table tbody tr:hover {
  background: #f3f6ff;
}

@media (max-width: 767px) {
  .entry-table th,
  .entry-table td {
    font-size: 12px;
    padding: 6px 8px !important;
    white-space: nowrap;
  }
}

.entry-table td:nth-child(2) {
  font-weight: 600;
}

/* Chrome */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* Firefox */
* {
  scrollbar-width: thin;
}

/* 경기 결과 섹션 타이틀 */
.result-section-title {
  font-size: 1.1rem !important;
  font-weight: 600;
  margin: 20px 0 6px;
  padding-left: 8px;
  border-left: 3px solid #7b2ff7;
  color: #333;
}

/* 일반 정보 테이블 래퍼 — th 색상 없음 */
.info-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 4px;
}

.info-table-wrap table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  width: 100% !important;
}

.info-table-wrap table th {
  padding: 9px 4px !important;
  text-align: center !important;
  border: 1px solid #e0e0e0 !important;
  color: #333 !important;
}

.info-table-wrap table td {
  padding: 9px 4px !important;
  text-align: center !important;
  border: 1px solid #e0e0e0 !important;
}

/* 결과 테이블 래퍼 — 모바일 가로 스크롤 */
.result-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 4px;
}

.result-table-wrap table th {
  padding: 9px 4px !important;
  text-align: center !important;
  border: 1px solid rgba(107, 22, 238, 0.4) !important;
  background: rgba(107, 22, 238, 0.6);

  /* background: rgba(107, 22, 238, 0.8) !important; */

  color: #fff !important;
}

.result-table-wrap table td {
  padding: 9px 4px !important;
  text-align: center !important;
  border: 1px solid #e0e0e0 !important;
}
.result-table-wrap table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  width: 100% !important;
}

.result-table {
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 14px;
  width: 100%;
}

/* 심사위원 리포트 */
.judge-report {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  background: #f8f9fa;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 12px 14px;
  white-space: pre-wrap;
  margin-bottom: 4px;
}

.predict-section {
  margin-top: 30px;
  /* border-top: 1px solid #eee; */
  padding-top: 20px;
}

/* 전체 pill 바 */
.predict-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 10px 10px 10px 18px;
  border-radius: 999px;

  background: #f5f5f7;
  border: 1px solid #b8a0de;
}

/* 좌측 텍스트 */
.predict-title {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.predict-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 8px 14px;
  border-radius: 999px;
  border: none;

  background: linear-gradient(90deg, #7b2ff7, #a044ff);
  color: #fff;

  cursor: pointer;
}

/* SVG 크기 정리 */
.predict-btn svg {
  width: 90px;
  height: 16px;
  display: block;
}

.predict-btn--mobile svg {
  width: 135px;
  height: 16px;
}

/* hover */
.predict-btn:hover {
  opacity: 0.9;
}

/* ═══════════════════════════════════════════════════════════
   AI 분석 v2 — 채팅 UI
   ═══════════════════════════════════════════════════════════ */

/* predict-output을 채팅 컨테이너로 */
.ac-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
  max-height: 600px;
  overflow-y: auto;
}

/* 말풍선 */
.ac-bubble {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 14px 16px;
  width: 100%;
  font-size: 13px;
  line-height: 1.9;
  color: #222;
}

/* 말풍선 안 블록 단위 fade-in */
.ac-block {
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.ac-block.ac-block-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 블록 타입별 스타일 */
.ac-block-h1 {
  margin: 10px 0 4px;
}
.ac-block-h2 {
  margin: 10px 0 2px;
}
.ac-block-h3 {
  margin: 6px 0 2px;
}

.ac-h1 {
  font-size: 14px;
  font-weight: 700;
  color: #1a0050;
  display: block;
}
.ac-h2 {
  font-size: 13px;
  font-weight: 700;
  color: #3b0e8c;
  display: block;
  padding-left: 8px;
  border-left: 3px solid #7b2ff7;
}
.ac-h3 {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  display: block;
}

/* 로딩 점 */
.ac-dots {
  display: flex;
  gap: 5px;
  padding: 2px 0;
}
.ac-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7b2ff7;
  animation: acDotBounce 1.1s infinite;
}
.ac-dots span:nth-child(2) {
  animation-delay: 0.18s;
}
.ac-dots span:nth-child(3) {
  animation-delay: 0.36s;
}
@keyframes acDotBounce {
  0%,
  80%,
  100% {
    transform: scale(0.5);
    opacity: 0.3;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 말풍선 내 마크다운 */
.ac-p {
  margin: 2px 0;
}
.ac-note {
  font-size: 12px;
  color: #888;
  margin: 3px 0;
}
.ac-li {
  display: flex;
  gap: 6px;
  margin: 2px 0;
}
.ac-bullet {
  color: #7b2ff7;
  flex-shrink: 0;
}
.ac-li-num {
  color: #7b2ff7;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 16px;
}
.ac-code {
  font-family: monospace;
  background: #ede9fb;
  color: #5b0ea6;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 12px;
}

/* 결과 영역 */
.predict-output {
  margin-top: 16px;
  padding: 16px;
  background: #f8f9fa;
  border: 1px solid #b8a0de;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  min-height: 60px;
  display: none;
  user-select: none;
  -webkit-user-select: none;
}
