/* 결과지 (A4 794px / 모바일 390px) — 프로파일링 결과지.pdf 기준 */
.report {
  --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --gold: #b8922f; --gold-soft: #fbf6e9;
  font-family: "Noto Sans KR", system-ui, sans-serif; color: var(--ink); background: #fff;
  box-sizing: border-box; line-height: 1.45;
  /* 한글이 글자 단위로 끊기지 않도록 단어(띄어쓰기) 단위로 줄을 바꾼다. 너무 긴 단어만 넘칠 때 끊는다 */
  word-break: keep-all; overflow-wrap: break-word;
}
.report *, .report *::before, .report *::after { box-sizing: border-box; }
.report--a4 { width: 794px; min-height: 1123px; padding: 34px 36px 26px; font-size: 12px; }
.report--mobile { width: 390px; padding: 22px 18px 24px; font-size: 13px; }

.report-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2.5px solid var(--ink); padding-bottom: 8px; }
.report-kicker { margin: 0; color: var(--gold); font-weight: 700; font-size: 10px; letter-spacing: 3px; }
.report-title { margin: 4px 0 0; font-size: 30px; font-weight: 900; letter-spacing: -0.5px; line-height: 1.05; }
.report--mobile .report-title { font-size: 24px; max-width: 160px; }
.report-brand { text-align: right; }
.brand-logo { font-family: "Times New Roman", serif; font-size: 30px; letter-spacing: 9px; line-height: 1; }
.brand-sub { font-size: 8px; letter-spacing: 4px; margin-top: 4px; }
.brand-slogan { font-size: 7px; color: var(--muted); margin-top: 6px; }
.report--mobile .brand-logo { font-size: 24px; letter-spacing: 6px; }
/* 모바일 폭(390px)에서 짧은 라벨이 두 줄로 나뉘지 않도록 간격과 크기를 줄인다 */
.report--mobile .report-kicker { letter-spacing: 1px; white-space: nowrap; }
.report--mobile .summary-card { padding: 10px 11px; }
.report--mobile .card-head { gap: 3px; letter-spacing: -0.2px; }
.report--mobile .priority-tag { padding: 0 4px; letter-spacing: -0.3px; }
.report--mobile .card-sub { font-size: 10.5px; letter-spacing: -0.2px; }

.student-card { display: grid; grid-template-columns: auto auto auto auto 1fr; gap: 0 34px; align-items: end;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 22px; margin-top: 12px; background: #fff; }
.report--mobile .student-card { grid-template-columns: 1fr 1fr; gap: 12px 10px; padding: 14px; }
.student-field { display: flex; flex-direction: column; font-size: 15px; }
.student-field strong { font-weight: 700; }
.field-label { font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.field-suffix { font-size: 11px; color: var(--muted); font-weight: 400; }
.student-field:has(.field-suffix) { display: block; }
.student-field:has(.field-suffix) .field-label { display: block; }
.student-scope strong { font-size: 13px; line-height: 1.35; }
.student-scope small { font-size: 8px; color: var(--muted); margin-left: 2px; }
.student-date { text-align: right; align-items: flex-end; }
.report--mobile .student-date { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; border-top: 1px dashed var(--line); padding-top: 10px; text-align: left; }

.summary-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 10px; }
.report--mobile .summary-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
.summary-card { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px; min-height: 104px; }
.card-average { border-color: var(--ink); }
.card-progress { border-color: #eadbb0; background: var(--gold-soft); }
.card-best { border-color: #bbf7d0; background: #f0fdf4; }
.card-weakest { border-color: #fed7aa; background: #fff7ed; }
.card-head { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.card-progress .card-head { color: #8a6d1f; }
.card-best .card-head, .card-best .card-value { color: #166534; }
.card-weakest .card-head, .card-weakest .card-value { color: #c2410c; }
.priority-tag { margin-left: auto; font-size: 9px; border: 1px solid currentColor; border-radius: 99px; padding: 0 6px; background: #fff; white-space: nowrap; }
.card-value-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 4px; }
.card-value { font-size: 26px; font-weight: 800; line-height: 1.1; }
.card-value small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.card-progress .card-value { color: var(--gold); }
.card-sub { font-size: 11px; color: var(--muted); white-space: nowrap; }
.card-progress .card-sub { color: #a08443; }
.progress-track { flex: 1; height: 6px; border-radius: 99px; background: #ece6d6; overflow: hidden; display: block; }
.progress-fill { display: block; height: 100%; background: var(--gold); border-radius: 99px; }

.level-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px;
  border-radius: 99px; font-size: 10px; font-weight: 700; }
.level-top { background: #0f172a; color: #fff; }
.level-high { background: #dcfce7; color: #166534; }
.level-mid { background: #fef9c3; color: #854d0e; }
.level-low { background: #ffedd5; color: #9a3412; }
.level-base { background: #fee2e2; color: #991b1b; }

.report-section { margin-top: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.report--mobile .section-head { flex-direction: column; align-items: flex-start; border-bottom: 0; }
.section-head h2 { margin: 0; font-size: 15px; font-weight: 800; }
.section-head h2 small { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.section-head h2 small.gold { color: var(--gold); font-weight: 700; }
.section-number { color: var(--gold); margin-right: 6px; }
.section-note { font-size: 10px; color: var(--muted); }
.level-legend { display: flex; gap: 8px; font-size: 10px; color: var(--muted); flex-wrap: wrap; }
.level-legend span { display: inline-flex; align-items: center; gap: 3px; }
.level-legend .level-badge { height: 16px; font-size: 9px; }

.current-body { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: center; margin-top: 6px; }
.report--mobile .current-body { grid-template-columns: 1fr; gap: 8px; }
.current-radar .radar { width: 100%; max-width: 250px; display: block; margin: 0 auto; }
.radar-label { font-size: 12px; fill: #334155; font-weight: 500; }
.radar-center { font-size: 19px; font-weight: 800; fill: var(--ink); }
.radar-center-sub { font-size: 9px; fill: var(--muted); }
.score-table { width: 100%; border-collapse: collapse; }
.score-table th { text-align: left; font-size: 10px; color: var(--muted); font-weight: 500; padding: 4px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.report .nowrap { white-space: nowrap; }
.score-table td { padding: 10px 6px; border-bottom: 1px solid #f1f5f9; }
.domain-name { font-size: 14px; font-weight: 700; white-space: nowrap; }
.domain-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.bar-cell { width: 55%; }
.report--mobile .bar-cell { width: 34%; }
.score-bar { display: block; height: 6px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.score-bar-fill { display: block; height: 100%; border-radius: 99px; }
.score-cell { white-space: nowrap; font-size: 14px; text-align: right; }
.score-cell small { color: var(--muted); font-size: 10px; }
.level-cell { text-align: center; }
.change-cell { font-weight: 700; font-size: 14px; text-align: center; }

.change-body { display: grid; grid-template-columns: 450px 1fr; gap: 18px; margin-top: 8px; }
.report--mobile .change-body { grid-template-columns: 1fr; }
.block-title { margin: 4px 0 8px; font-size: 12px; font-weight: 700; }
.monthly-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.month-card { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 18px 4px 8px; text-align: center; }
.month-card.is-latest { background: var(--gold-soft); border-color: #eadbb0; }
.month-card.is-empty { border-style: dashed; display: flex; flex-direction: column; justify-content: center; min-height: 160px; color: #94a3b8; }
.report--mobile .month-card.is-empty { min-height: 100px; }
.month-card .radar { width: 100%; max-width: 120px; }
.month-class { position: absolute; top: 5px; left: 7px; font-size: 9px; color: var(--muted); }
.month-class.is-changed { background: var(--ink); color: #fff; border-radius: 4px; padding: 1px 5px; font-weight: 700; }
.month-caption { font-size: 10px; color: var(--muted); }
.month-caption strong { color: var(--ink); font-size: 12px; margin-right: 4px; }
.month-empty { font-size: 13px; font-weight: 700; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.trend-legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend-marker { width: 22px; height: 12px; }
.trend-chart { width: 100%; display: block; }
.chart-axis { font-size: 11px; fill: var(--muted); }
.chart-axis.is-latest { fill: var(--ink); font-weight: 800; }
.chart-axis.is-unmeasured { fill: #cbd5e1; }
.chart-level-label { font-size: 10px; fill: #94a3b8; }
.chart-band { font-size: 11px; fill: #475569; font-weight: 600; }
.chart-band-current { font-size: 11px; fill: #fff; font-weight: 700; }
.chart-empty { font-size: 13px; fill: #94a3b8; font-weight: 700; }

.roadmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; }
.roadmap-slot { border: 1.5px dashed #cbd5e1; border-radius: 10px; min-height: 250px; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #94a3b8; gap: 6px; }
.report--mobile .roadmap-slot { min-height: 110px; }
.roadmap-slot.is-done { border: 1.5px solid #eadbb0; background: var(--gold-soft); color: var(--ink); }
.slot-round { font-size: 16px; font-weight: 700; }
.is-done .slot-round { color: var(--gold); }
.slot-month { font-size: 26px; font-weight: 800; }
.slot-sub { font-size: 16px; font-weight: 600; }
.roadmap-progress { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 11px; }
.roadmap-note { color: var(--muted); font-size: 12px; margin: 8px 0 0; }

.comment-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; margin-top: 8px; }
.comment-item { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0; }
.comment-item p { margin: 0; font-size: 13px; line-height: 1.6; }
.comment-item strong { font-weight: 800; }
.comment-tag { flex: none; font-size: 10px; font-weight: 700; border-radius: 99px; padding: 2px 9px; margin-top: 2px; }
.tag-rise { background: #dcfce7; color: #166534; }
.tag-keep { background: #fef9c3; color: #854d0e; }
.tag-fall { background: #fee2e2; color: #b91c1c; }
.tag-final { background: var(--ink); color: #fff; }
.comment-note { margin: 6px 0 0 50px; font-size: 11px; color: var(--muted); }
.report--mobile .comment-note { margin-left: 0; border-top: 1px dashed var(--line); padding-top: 8px; }

.report-footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-top: 1.5px solid var(--ink); margin-top: 14px; padding-top: 8px; font-size: 10px; }
.report-footer p { margin: 0 0 2px; }
.report--mobile .report-footer { flex-direction: column; }
.footer-copy { white-space: nowrap; }

/* A4 한 장(1123px) 안에 들어가도록 줄인 간격·크기. 모바일은 위 기본값을 그대로 쓴다 */
.report--a4 { padding: 22px 34px 16px; }
.report--a4 .section-head { padding-bottom: 4px; }
.report--a4 .report-header { padding-bottom: 6px; }
.report--a4 .student-card { padding: 9px 22px; margin-top: 10px; }
.report--a4 .summary-cards { margin-top: 8px; }
.report--a4 .summary-card { min-height: 80px; padding: 7px 12px; }
.report--a4 .card-value { font-size: 24px; }
.report--a4 .report-section { margin-top: 10px; }
.report--a4 .current-body { grid-template-columns: 180px 1fr; margin-top: 2px; }
.report--a4 .current-radar .radar { max-width: 180px; }
.report--a4 .score-table td { padding: 5px 6px; }
.report--a4 .change-body { grid-template-columns: 420px 1fr; margin-top: 4px; }
.report--a4 .monthly-grid { gap: 8px; }
.report--a4 .month-card { padding: 15px 4px 5px; }
.report--a4 .month-card .radar { max-width: 76px; }
.report--a4 .month-card.is-empty { min-height: 108px; }
.report--a4 .roadmap-grid { gap: 10px; margin-top: 8px; }
.report--a4 .roadmap-slot { min-height: 120px; }
.report--a4 .comment-box { padding: 9px 16px; margin-top: 6px; }
.report--a4 .comment-item p { font-size: 12.5px; line-height: 1.45; }
.report--a4 .comment-item { margin: 3px 0; }
.report--a4 .report-title { font-size: 27px; }
.report--a4 .report-footer { margin-top: 10px; padding-top: 6px; font-size: 9.5px; }

@media print {
  @page { size: A4; margin: 0; }
  body { margin: 0; }
  .no-print { display: none !important; }
  /* 1123px는 A4 높이(297mm ≈ 1122.5px)보다 커서 빈 둘째 장이 생기므로 인쇄할 때는 내용 높이만 쓴다 */
  .report--a4 { box-shadow: none !important; min-height: 0; }
}
