/* ============================================================================
   /var/www/maple-app/mp/1/prediction.css
   메이플 레코드 - 쇼케이스 예측해보기
   (기존 메이플 레코드 다크 차콜 · 메이플 오렌지 · 앤틱 골드 컬러 팔레트 통일)
   ============================================================================ */

:root {
  --bg-page: #0d1017;
  --bg-surface: #141821;
  --bg-surface-2: #181d28;
  --bg-deep: #0f131c;
  --border-subtle: #242b3b;
  --border-bright: #343e54;
  --text-main: #f1f5f9;
  --text-sub: #94a3b8;
  --text-muted: #6e7788;

  --accent-orange: #f0883e;
  --accent-orange-soft: #fdba74;
  --accent-coral: #ff7b54;
  --accent-gold: #e2b857;
  --accent-amber: #fbbf24;
  --accent-emerald: #34d399;
  --accent-rose: #fb7185;
  --accent-slate: #cbd5e1;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-page);
  background-image:
    radial-gradient(680px 300px at 14% 0%, rgba(240, 136, 62, 0.065), transparent 72%),
    radial-gradient(560px 280px at 88% 4%, rgba(226, 184, 87, 0.045), transparent 70%);
  color: var(--text-main);
}

.pred-shell a,
.pred-modal-backdrop a {
  color: inherit;
  text-decoration: none;
}

/* ===== 메인 레이아웃 ===== */
.pred-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pred-shell,
.pred-modal-card {
  word-break: keep-all;
}

/* ===== 히어로 배너 (기존 main.css · epic.css 다크 차콜 & 오렌지 포인트 통일) ===== */
.pred-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #181c26 0%, #141821 62%, #1a171c 100%);
  border: 1px solid #2b3345;
  border-left: 3px solid var(--accent-orange);
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

.pred-hero-glow {
  position: absolute;
  top: -90px;
  right: -70px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 136, 62, 0.12) 0%, rgba(226, 184, 87, 0.05) 48%, transparent 72%);
  pointer-events: none;
}

.pred-hero-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.pred-hero-title-group {
  flex: 1;
  min-width: 280px;
}

.pred-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pred-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-orange-soft);
  background: rgba(240, 136, 62, 0.13);
  border: 1px solid rgba(240, 136, 62, 0.34);
  padding: 4px 10px;
  border-radius: 999px;
}

.pred-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #2e3648;
  background: #0f131c;
  color: #cbd5e1;
}

.pred-status-pill .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-orange);
  box-shadow: 0 0 8px rgba(240, 136, 62, 0.7);
  animation: pulseDot 1.9s infinite;
}

.pred-status-pill.is-announced {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.45);
}

.pred-status-pill.is-announced .status-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.pred-status-pill.is-teaser {
  color: #fde68a;
  background: rgba(226, 184, 87, 0.14);
  border-color: rgba(226, 184, 87, 0.42);
}

.pred-status-pill.is-teaser .status-dot {
  background: var(--accent-amber);
  box-shadow: 0 0 10px var(--accent-amber);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.pred-title {
  margin: 0 0 8px;
  font-size: 1.72rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.pred-title-sub {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--accent-orange);
}

.pred-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-sub);
  max-width: 740px;
  line-height: 1.58;
}

.pred-desc strong {
  color: #e2e8f0;
}

.pred-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ui-svg-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn-pred-primary,
.btn-pred-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

/* 기존 메이플 레코드 공통 주황 그라데이션 버튼 */
.btn-pred-primary {
  background: linear-gradient(180deg, #ff7b54 0%, #f0643b 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 160, 122, 0.38);
  box-shadow: 0 4px 14px rgba(240, 100, 59, 0.28);
}

.btn-pred-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.07);
}

.btn-pred-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-pred-secondary {
  background: #1c212d;
  color: #e2e8f0;
  border: 1px solid #323b4e;
}

.btn-pred-secondary:hover {
  border-color: var(--accent-orange);
  color: #ffffff;
}

/* ===== 쇼케이스 적중 배너 (발표 후 자동 표시) ===== */
.pred-hit-banner {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(226, 184, 87, 0.12) 100%);
  border: 1px solid rgba(52, 211, 153, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pred-hit-banner[hidden] {
  display: none;
}

.hit-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hit-badge-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #052e16;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hit-badge-icon svg {
  width: 19px;
  height: 19px;
}

.hit-banner-left strong {
  display: block;
  font-size: 0.93rem;
  color: #ecfdf5;
}

.hit-banner-left p {
  margin: 2px 0 0;
  font-size: 0.81rem;
  color: #a7f3d0;
}

.hit-banner-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hit-ring-mini {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(5, 46, 22, 0.72);
  border: 1px solid rgba(52, 211, 153, 0.55);
  color: #6ee7b7;
  font-size: 0.86rem;
  font-weight: 900;
}

/* ===== 요약 지표 그리드 ===== */
.pred-kpi-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pred-kpi-grid.is-pre-showcase {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-card {
  background: #0f131c;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kpi-card.is-emerald { border-color: rgba(52, 211, 153, 0.3); }
.kpi-card.is-gold    { border-color: rgba(226, 184, 87, 0.36); }
.kpi-card.is-sky     { border-color: rgba(240, 136, 62, 0.32); }

.kpi-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 1.36rem;
  font-weight: 900;
  color: #ffffff;
}

.kpi-card.is-emerald .kpi-value { color: var(--accent-emerald); }
.kpi-card.is-gold .kpi-value    { color: var(--accent-amber); }
.kpi-card.is-sky .kpi-value     { color: var(--accent-orange-soft); }

.kpi-sub {
  font-size: 0.74rem;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-card[hidden],
.filter-pill[hidden],
.leg-item[hidden] {
  display: none !important;
}

/* ===== 공통 패널 ===== */
.pred-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head-wrap {
  flex-wrap: wrap;
}

.panel-head h2 {
  margin: 0 0 4px;
  font-size: 1.06rem;
  font-weight: 800;
  color: #f8fafc;
}

.panel-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-sub);
}

/* ===== 메인 차트 그리드 ===== */
.pred-charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-sub);
}

.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.leg-item .dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
}

.dot-base  { background: #f0883e; }
.dot-cycle { background: #e2b857; }
.dot-api   { background: #fb7185; }
.dot-hit   { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.7); }

/* ===== 확률 랭킹 그래픽 바 차트 (웜 오렌지 + 앤틱 골드 + 로즈) ===== */
.bar-chart-stage {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bar-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-deep);
  border: 1px solid #1d2332;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.bar-row:hover {
  background: #191f2d;
  border-color: #3c4760;
  transform: translateX(2px);
}

.bar-row.is-matched {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.14) 0%, #0f131c 100%);
  border-color: rgba(52, 211, 153, 0.5);
}

.bar-label-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bar-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-match-tag {
  font-size: 0.65rem;
  font-weight: 900;
  color: #052e16;
  background: var(--accent-emerald);
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.bar-novel-tag {
  font-size: 0.64rem;
  font-weight: 800;
  color: #fde68a;
  background: rgba(226, 184, 87, 0.16);
  border: 1px solid rgba(226, 184, 87, 0.42);
  padding: 1px 5px;
  border-radius: 5px;
  flex-shrink: 0;
}

.bar-cat-tiny {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.bar-track-wrap {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: #0a0d14;
  border: 1px solid #202736;
  overflow: hidden;
}

.bar-track-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, transparent 24.5%, rgba(148, 163, 184, 0.08) 25%, transparent 25.5%);
  background-size: 25% 100%;
  pointer-events: none;
}

.bar-stack {
  position: relative;
  height: 100%;
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  width: 0;
  transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-seg-base {
  background: linear-gradient(90deg, #c95b22, #f0883e);
  height: 100%;
}

.bar-seg-cycle {
  background: linear-gradient(90deg, #b88a28, #e2b857);
  height: 100%;
}

.bar-seg-api {
  background: linear-gradient(90deg, #e11d48, #fb7185);
  height: 100%;
}

.bar-row.is-matched .bar-seg-base {
  background: linear-gradient(90deg, #059669, #34d399);
}

.bar-pct-col {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.bar-pct-num {
  font-size: 0.94rem;
  font-weight: 900;
}

.bar-pct-tier {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ===== SVG 레이더 차트 ===== */
.radar-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0;
}

#category-radar-svg {
  width: 100%;
  max-width: 340px;
  height: auto;
  overflow: visible;
}

.radar-mini-list {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.radar-mini-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  font-size: 0.76rem;
}

.radar-mini-chip-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-sub);
}

.radar-mini-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.radar-mini-score {
  font-weight: 800;
  color: #f8fafc;
}

/* ===== 신규 시스템 집중 예측 보드 (앤틱 골드 · 다크 차콜) ===== */
.panel-novel-lab {
  background: linear-gradient(155deg, #19181f 0%, #141821 48%, #161820 100%);
  border-color: rgba(226, 184, 87, 0.32);
}

.novel-head-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fde68a;
  background: rgba(226, 184, 87, 0.14);
  border: 1px solid rgba(226, 184, 87, 0.34);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 7px;
}

.novel-lab-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fde68a;
  background: rgba(226, 184, 87, 0.12);
  border: 1px solid rgba(226, 184, 87, 0.34);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.novel-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.novel-card {
  background: linear-gradient(180deg, #181c26 0%, #10131b 100%);
  border: 1px solid #2b3242;
  border-radius: 13px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.novel-card:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 136, 62, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}

.novel-card.is-matched {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.16) 0%, #10151e 55%, rgba(226, 184, 87, 0.08) 100%);
  border-color: rgba(52, 211, 153, 0.65);
}

.novel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.novel-impact-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fdba74;
  background: rgba(240, 136, 62, 0.13);
  border: 1px solid rgba(240, 136, 62, 0.34);
  padding: 3px 8px;
  border-radius: 6px;
}

.novel-feas-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 2px 7px;
  border-radius: 6px;
}

.novel-prob-badge {
  font-size: 0.94rem;
  font-weight: 900;
  color: var(--accent-gold);
}

.novel-card.is-matched .novel-prob-badge {
  color: var(--accent-emerald);
}

.novel-card-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.35;
}

.novel-meter-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #0b0e15;
  border: 1px solid #242b3b;
  overflow: hidden;
}

.novel-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #d96b27 0%, #f0883e 55%, #e2b857 100%);
}

.novel-card.is-matched .novel-meter-fill {
  background: linear-gradient(90deg, #059669, #34d399);
}

.novel-insight-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 11px;
  border-radius: 10px;
  background: #0c1017;
  border: 1px solid #202736;
  font-size: 0.76rem;
  line-height: 1.48;
}

.novel-insight-row {
  display: flex;
  gap: 6px;
  color: #cbd5e1;
}

.novel-insight-tag {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  height: fit-content;
  flex-shrink: 0;
}

.novel-insight-tag.is-why {
  background: rgba(240, 136, 62, 0.16);
  color: #fdba74;
}

.novel-insight-tag.is-risk {
  background: rgba(226, 184, 87, 0.15);
  color: #fde68a;
}

/* ===== 필터 & 정렬 컨트롤 (기존 오렌지 활성 톤 통일) ===== */
.pred-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pred-filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
  font-size: 0.77rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.14s ease;
}

.filter-pill:hover {
  border-color: #3f4a63;
  color: #ffffff;
}

.filter-pill.is-active {
  background: rgba(240, 136, 62, 0.16);
  border-color: rgba(240, 136, 62, 0.5);
  color: #fdba74;
}

.filter-pill-novel {
  border-color: rgba(226, 184, 87, 0.36);
  color: #fde68a;
}

.filter-pill-novel.is-active {
  background: rgba(226, 184, 87, 0.2);
  border-color: #e2b857;
  color: #fef3c7;
}

.filter-pill[data-cat="MATCHED"].has-hits {
  border-color: rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
}

.filter-pill[data-cat="MATCHED"].is-active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
  color: #ecfdf5;
}

.pred-select {
  background: var(--bg-deep);
  border: 1px solid var(--border-bright);
  border-radius: 9px;
  padding: 7px 11px;
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  outline: none;
}

/* ===== 상세 예측 카드 그리드 ===== */
.pred-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pred-card {
  position: relative;
  background: #161a24;
  border: 1px solid #262e3f;
  border-radius: 13px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.pred-card:hover {
  transform: translateY(-2px);
  border-color: #46536e;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.pred-card.is-matched {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.15) 0%, #121720 55%, rgba(226, 184, 87, 0.08) 100%);
  border-color: rgba(52, 211, 153, 0.58);
}

.pred-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.card-cat-badge {
  font-size: 0.69rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.card-hit-pill {
  font-size: 0.7rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #34d399);
  color: #052e16;
}

.card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.35;
}

/* 원형 SVG 확률 게이지 */
.donut-gauge {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  position: relative;
}

.donut-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-gauge-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 900;
  color: #ffffff;
}

.card-summary {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-sub);
  line-height: 1.48;
}

.card-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-chip {
  font-size: 0.71rem;
  font-weight: 600;
  color: #cbd5e1;
  background: var(--bg-deep);
  border: 1px solid #222938;
  padding: 3px 8px;
  border-radius: 7px;
}

.meta-chip.is-api {
  color: #fdba74;
  border-color: rgba(240, 136, 62, 0.36);
  background: rgba(240, 136, 62, 0.1);
}

.card-matched-box {
  margin-top: auto;
  padding: 10px 11px;
  border-radius: 10px;
  background: rgba(5, 46, 22, 0.55);
  border: 1px solid rgba(52, 211, 153, 0.45);
  font-size: 0.76rem;
}

.card-matched-box strong {
  display: block;
  color: #6ee7b7;
  margin-bottom: 3px;
}

.card-matched-box p {
  margin: 0;
  color: #d1fae5;
  line-height: 1.4;
}

/* ===== 역대 패턴 히트맵 표 (웜 오렌지 + 앤틱 골드 + 에메랄드) ===== */
.heatmap-scroll {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.heatmap-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.heatmap-table th,
.heatmap-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #1e2432;
  text-align: center;
}

.heatmap-table thead th {
  background: #10131c;
  color: #cbd5e1;
  font-weight: 800;
  white-space: nowrap;
}

.heatmap-table thead th:first-child,
.heatmap-table tbody td:first-child {
  text-align: left;
  font-weight: 700;
  color: #e2e8f0;
  background: #11151f;
  position: sticky;
  left: 0;
  z-index: 2;
}

.heatmap-table thead th.col-target {
  background: rgba(240, 136, 62, 0.14);
  color: #fdba74;
}

.hm-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 800;
}

.hm-cell.is-on {
  background: rgba(240, 136, 62, 0.16);
  border: 1px solid rgba(240, 136, 62, 0.42);
  color: #fdba74;
}

.hm-cell.is-off {
  background: rgba(30, 36, 48, 0.45);
  color: #5a6477;
}

.hm-cell.is-pred-high {
  background: rgba(52, 211, 153, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.44);
  color: #6ee7b7;
}

.hm-cell.is-pred-mid {
  background: rgba(240, 136, 62, 0.16);
  border: 1px solid rgba(240, 136, 62, 0.42);
  color: #fdba74;
}

.hm-cell.is-pred-low {
  background: rgba(226, 184, 87, 0.14);
  border: 1px solid rgba(226, 184, 87, 0.36);
  color: #fde68a;
}

.hm-cell.is-novel-first {
  background: rgba(226, 184, 87, 0.16);
  border: 1px solid rgba(226, 184, 87, 0.45);
  color: #fde68a;
}

.hm-cell.is-hit {
  background: linear-gradient(90deg, #10b981, #34d399);
  color: #052e16;
}

/* ===== 하단 아카이브 & 공지 로그 ===== */
.pred-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.history-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  padding: 13px 14px;
  border-radius: 11px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
}

.history-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.history-item-head strong {
  font-size: 0.9rem;
  color: #f8fafc;
}

.history-season-tag {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.history-season-tag.is-winter {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.history-season-tag.is-summer {
  background: rgba(240, 136, 62, 0.16);
  color: #fdba74;
  border: 1px solid rgba(240, 136, 62, 0.3);
}

.history-highlights {
  margin: 0;
  padding-left: 16px;
  font-size: 0.78rem;
  color: var(--text-sub);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.api-log-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.api-log-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.api-log-row a {
  color: #e2e8f0;
  font-weight: 600;
}

.api-log-row a:hover {
  color: var(--accent-orange-soft);
  text-decoration: underline;
}

.api-log-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.api-empty-note {
  padding: 24px 16px;
  text-align: center;
  border-radius: 12px;
  background: var(--bg-deep);
  border: 1px dashed var(--border-bright);
  color: var(--text-sub);
  font-size: 0.82rem;
}

/* ===== 안내 아코디언 ===== */
.pred-footnote {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.81rem;
  color: var(--text-sub);
}

.pred-footnote summary {
  font-weight: 800;
  color: #cbd5e1;
  cursor: pointer;
}

.pred-footnote ul {
  margin: 10px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ===== 상세 모달 ===== */
.pred-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 8, 13, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pred-modal-backdrop[hidden] {
  display: none;
}

.pred-modal-card {
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow-y: auto;
  background: #141821;
  border: 1px solid #343e54;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.58);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-cat-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.modal-head h3 {
  margin: 0;
  font-size: 1.08rem;
  color: #ffffff;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border-bright);
  background: var(--bg-deep);
  color: #cbd5e1;
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-body {
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.84rem;
  color: var(--text-sub);
}

.modal-score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.modal-score-cell {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.modal-score-cell span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.modal-score-cell strong {
  font-size: 1.02rem;
  color: #f8fafc;
}

.loading-skeleton {
  padding: 36px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
  .pred-charts-grid {
    grid-template-columns: 1fr;
  }
  .pred-cards-grid,
  .novel-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pred-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .pred-hero {
    padding: 18px;
  }
  .pred-title {
    font-size: 1.42rem;
  }
  .pred-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pred-kpi-grid.is-pre-showcase {
    grid-template-columns: 1fr;
  }
  .pred-cards-grid,
  .novel-cards-grid {
    grid-template-columns: 1fr;
  }
  .bar-row {
    grid-template-columns: 120px minmax(0, 1fr) 58px;
    gap: 8px;
  }
}


/* ===== 업데이트 버튼 로딩 회전 & 인라인 상태 안내 바 ===== */
@keyframes predSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ui-svg-icon.is-spinning {
  animation: predSpin 0.85s linear infinite;
}

.pred-update-toast {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid #343e54;
  background: #0f131c;
  color: #e2e8f0;
  transition: opacity 0.2s ease;
}

.pred-update-toast[hidden] {
  display: none;
}

.pred-update-toast.is-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.42);
  color: #a7f3d0;
}

.pred-update-toast.is-info {
  background: rgba(240, 136, 62, 0.12);
  border-color: rgba(240, 136, 62, 0.42);
  color: #fdba74;
}

.pred-update-toast.is-warn {
  background: rgba(226, 184, 87, 0.12);
  border-color: rgba(226, 184, 87, 0.42);
  color: #fde68a;
}
