/* ═══════════ 살롱 INPACT 지수 진단 전용 스타일 ═══════════
   라이트 배경 기준. style.css의 .field(어두운 배경 전용)는 사용하지 않는다. */

.page-hero h1 em {
  font-style: normal;
  color: var(--brand);
}

/* ── 진행률 바 ── */
.dx-progress {
  position: sticky;
  top: 78px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
}
.dx-progress-label {
  font-size: var(--text-sm);
  font-weight: 800;
  white-space: nowrap;
}
.dx-progress-label b { color: var(--brand-600); font-size: 1.05rem; }
.dx-progress-label span { color: var(--ink-mute); font-weight: 600; }

.progress-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-300), var(--brand));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

/* ── 지표 카드 6장 ── */
.dx-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.dx-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}
.dx-card.is-done {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-card);
}

.dx-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.dx-letter {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-100);
  color: var(--brand-600);
  font-size: 1.15rem;
  font-weight: 900;
}
.dx-card-title h3 {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.dx-card-title p {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--ink-mute);
  font-weight: 500;
}
.dx-count {
  margin-left: auto;
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--ink-mute);
  background: var(--bg);
  border-radius: 999px;
  padding: 5px 11px;
  transition: color var(--duration-fast) ease, background var(--duration-fast) ease;
}
.dx-card.is-done .dx-count {
  color: var(--brand-600);
  background: var(--brand-50);
}

/* ── 문항(라이트 배경용 체크박스) ── */
.dx-list { display: grid; gap: 8px; }

.q-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  cursor: pointer;
  transition: background var(--duration-fast) ease;
}
.q-item:hover { background: var(--bg-tint); }
.q-item:has(input:checked) { background: var(--brand-50); }

.q-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.q-box {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: #fff;
  transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.q-box svg {
  width: 13px;
  height: 13px;
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
}
.q-input:checked ~ .q-box {
  background: var(--brand);
  border-color: var(--brand);
}
.q-input:checked ~ .q-box svg { opacity: 1; }
.q-input:focus-visible ~ .q-box {
  outline: 3px solid var(--brand-300);
  outline-offset: 2px;
}
.q-text {
  font-size: var(--text-sm);
  color: var(--ink-sub);
  line-height: 1.55;
}
.q-input:checked ~ .q-text { color: var(--ink); font-weight: 600; }

/* ── 결과 보기 버튼 ── */
.dx-submit {
  margin-top: 28px;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.dx-submit .btn svg { width: 18px; height: 18px; }
.dx-submit-hint {
  font-size: var(--text-xs);
  color: var(--ink-mute);
}

/* ── 결과: 차트 + 점수 카드 ── */
.dx-result {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.dx-chart {
  display: grid;
  place-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(16px, 3vw, 28px);
}
.dx-chart svg {
  width: 100%;
  max-width: 420px;
  height: auto;
}
.dx-chart-cap {
  font-size: var(--text-xs);
  color: var(--ink-mute);
  text-align: center;
}

.dx-rings polygon {
  fill: none;
  stroke: var(--brand-100);
  stroke-width: 1.2;
}
.dx-spokes line {
  stroke: var(--brand-100);
  stroke-width: 1.5;
}
.dx-max {
  fill: none;
  stroke: var(--brand-300);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
  stroke-linejoin: round;
}
.dx-poly {
  fill: rgba(78, 85, 236, 0.16);
  stroke: var(--brand);
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.dx-axes text {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 900;
  fill: var(--ink-sub);
  text-anchor: middle;
}
.dx-axes text.is-weak { fill: var(--up); }

.dx-scorecard {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px;
}

.dx-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.dx-total-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-sub);
}
.dx-total-num b {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--brand-600);
  line-height: 1.1;
}
.dx-total-num span {
  margin-left: 4px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-mute);
}
.dx-total-gap {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-mute);
}

.dx-grade {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  font-size: 1.6rem;
  font-weight: 900;
}
.grade-s {
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff;
  box-shadow: var(--shadow-pop);
}
.grade-a { background: var(--brand-100); color: var(--brand-600); }
.grade-b { background: #fdf3e7; color: #b25309; }
.grade-c { background: #fdeef0; color: var(--up); }

.dx-comment {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  font-size: var(--text-sm);
  color: var(--ink-sub);
}

/* 지표별 미니 바 */
.dx-bars {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  flex: 1;
}
.dx-bar-row {
  display: grid;
  grid-template-columns: 26px 56px 1fr 48px;
  align-items: center;
  gap: 10px;
  font-size: var(--text-xs);
}
.dx-bar-letter {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand-600);
  font-weight: 900;
}
.dx-bar-row.is-weak .dx-bar-letter { background: #fdeef0; color: var(--up); }
.dx-bar-name { font-weight: 700; color: var(--ink-sub); }
.dx-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
}
.dx-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--duration-slow) var(--ease-out-expo);
}
.dx-bar-row.is-weak .dx-fill { background: var(--up); }
.dx-score-num {
  font-weight: 800;
  text-align: right;
  color: var(--ink);
}

.dx-copy-hint {
  margin-top: 10px;
  font-size: var(--text-xs);
  color: var(--ink-mute);
  text-align: center;
}

/* ── 약한 지표 처방 ── */
.dx-rx { margin-top: 32px; }
.dx-rx h3 {
  font-size: var(--text-h3);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.dx-rx-sub {
  margin-top: 4px;
  font-size: var(--text-sm);
  color: var(--ink-sub);
}
.dx-rx-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dx-rx-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dx-rx-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dx-rx-head .dx-bar-letter { width: 32px; height: 32px; border-radius: 10px; font-size: 1rem; }
.dx-rx-head h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.dx-rx-score {
  margin-left: auto;
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--up);
  background: #fdeef0;
  border-radius: 999px;
  padding: 4px 10px;
}
.dx-rx-card > p {
  font-size: var(--text-sm);
  color: var(--ink-sub);
  flex: 1;
}
.dx-rx-link {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--brand-600);
}
.dx-rx-link svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }

/* ── 추천 플랜 카드 ── */
.dx-reco {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 300px at 90% -20%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(160deg, var(--brand) 0%, var(--brand-700) 100%);
  box-shadow: var(--shadow-pop);
  color: #fff;
}
.dx-reco-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 12px;
}
.dx-reco h3 {
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.dx-reco-price {
  margin-top: 6px;
  font-size: 1.125rem;
  font-weight: 900;
}
.dx-reco-price small {
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 6px;
}
.dx-reco-desc {
  margin-top: 10px;
  max-width: 52ch;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.78);
}
.dx-reco-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn-outline-white {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.btn-outline-white:hover { background: rgba(255, 255, 255, 0.24); }

/* ── 반응형 ── */
@media (max-width: 1023px) {
  .dx-result { grid-template-columns: 1fr; }
  .dx-reco { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 767px) {
  .dx-grid { grid-template-columns: 1fr; }
  .dx-rx-grid { grid-template-columns: 1fr; }
  .dx-progress { top: 70px; padding: 10px 16px; }
  .dx-reco-actions { width: 100%; }
  .dx-reco-actions .btn { flex: 1; min-width: 160px; }
}

@media (max-width: 480px) {
  .dx-card { padding: 18px 16px; }
  .dx-scorecard { padding: 20px 18px; }
  .dx-total-num b { font-size: 2.4rem; }
  .dx-grade { width: 52px; height: 52px; border-radius: 15px; font-size: 1.4rem; }
  .dx-bar-row { grid-template-columns: 24px 44px 1fr 42px; gap: 8px; }
  .dx-bar-letter { width: 24px; height: 24px; }
}
