:root {
  --bg: #f6f7fb;
  --card: rgba(255, 255, 255, 0.78);
  --text: #2a2d43;
  --muted: #656a87;
  --line: #d8dced;
  --primary: #5e7be2;
  --primary-strong: #4f6bce;
  --mint: #9edfcf;
  --peach: #ffd8bb;
  --lavender: #c8c2f4;
  --radius-lg: 24px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Pretendard", "Apple SD Gothic Neo", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 5% 10%, #eff8ff 0%, transparent 60%),
    radial-gradient(1100px 700px at 95% 0%, #fff3ea 0%, transparent 62%),
    linear-gradient(180deg, #f7f8fc 0%, #eef1f9 100%);
  position: relative;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(1px);
  opacity: 0.55;
  z-index: 0;
}

.bg-shape-1 {
  width: 360px;
  height: 360px;
  right: -110px;
  top: -90px;
  background: #ffe5d4;
}

.bg-shape-2 {
  width: 310px;
  height: 310px;
  left: -80px;
  bottom: 10%;
  background: #d5f2e9;
}

.bg-shape-3 {
  width: 280px;
  height: 280px;
  right: 18%;
  bottom: -130px;
  background: #ddd8ff;
}

.container {
  position: relative;
  z-index: 1;
  width: min(980px, 94vw);
  margin: 36px auto;
}

.hero {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0;
  font-weight: 600;
  color: #6e73a2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 12px;
}

h1 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.2;
}

.subtitle,
.muted {
  color: var(--muted);
}

.card {
  display: none;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  background: var(--card);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 36px rgba(57, 70, 120, 0.08);
}

.step.is-active {
  display: block;
  animation: floatIn 0.35s ease;
}

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

.grid-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vertical-form {
  grid-template-columns: 1fr;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  color: #444a6e;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.9);
}

input:focus,
select:focus {
  outline: 2px solid rgba(94, 123, 226, 0.25);
  border-color: var(--primary);
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn.primary {
  background: linear-gradient(120deg, var(--primary), #7590ee);
  color: #fff;
}

.btn.primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(120deg, var(--primary-strong), #667fe0);
}

.btn.ghost {
  border: 1px solid var(--line);
  background: #ffffffa8;
  color: #4f567f;
}

.grid-form .btn {
  grid-column: 1 / -1;
  margin-top: 6px;
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.quiz-top > div {
  min-width: 0;
  flex: 1;
}

#question-title {
  margin: 0;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.pill {
  margin: 0 0 6px;
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: #e8edff;
  color: #4f63bb;
  font-weight: 600;
}

.counter {
  margin: 2px 0 0;
  color: #6c739f;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  word-break: keep-all;
  text-align: right;
  flex-shrink: 0;
}

.progress-wrap {
  margin: 16px 0 18px;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #ecf0ff;
}

.progress-bar {
  width: 0;
  height: 100%;
  transition: width 0.25s ease;
  background: linear-gradient(90deg, #8fd9c6, #8db0ff);
}

.choice-list {
  display: grid;
  gap: 9px;
}

.choice-list label {
  flex-direction: row;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  background: #fff;
  cursor: pointer;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.choice-list input {
  margin: 0;
  margin-top: 2px;
  flex-shrink: 0;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.report-cover {
  border: 1px solid #d6dcf2;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  margin-bottom: 16px;
  box-shadow: 0 14px 30px rgba(63, 74, 125, 0.08);
}

.cover-top-strip {
  height: 34px;
  background: linear-gradient(90deg, #5e7be2 0%, #78a5e8 52%, #9edfcf 100%);
}

.cover-main {
  padding: 34px 18px 24px;
  text-align: center;
  min-height: 520px;
}

.cover-title {
  margin: 0 0 22px;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #2f385f;
}

.cover-sheet {
  width: min(460px, 100%);
  margin: 0 auto;
  text-align: left;
  border-top: 1px solid #e4e8f6;
  border-bottom: 1px solid #e4e8f6;
  padding: 10px 0;
}

.cover-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border-bottom: 1px dotted #d9def1;
}

.cover-row:last-child {
  border-bottom: none;
}

.cover-row span {
  color: #7b82ab;
  font-size: 13px;
}

.cover-row strong {
  color: #333b63;
  font-size: 15px;
  font-weight: 700;
}

.cover-footer-brand {
  margin: 38px 0 0;
  color: #5d648f;
  font-size: 14px;
  font-weight: 700;
}

.kpi-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.kpi-card {
  background: #ffffffb0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.kpi-label {
  margin: 0;
  color: #6a719b;
  font-size: 12px;
  font-weight: 600;
}

.kpi-value {
  margin: 8px 0 4px;
  color: #31375f;
  font-size: 21px;
  font-weight: 700;
}

.kpi-sub {
  margin: 0;
  color: #67709d;
  font-size: 12px;
}

.chart-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chart-card {
  background: #ffffffbc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.chart-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.chart-card canvas {
  width: 100%;
  max-height: 300px;
}

.chart-card.wide {
  margin-top: 12px;
}

.layer-report-section {
  margin-top: 18px;
}

.layer-report-section > h3 {
  margin: 0 0 10px;
}

.layer-report-container {
  display: grid;
  gap: 12px;
}

.layer-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #ffffffbd;
}

.layer-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.layer-panel-head h4 {
  margin: 0;
  font-size: 18px;
}

.layer-panel-score {
  margin: 0;
  color: #4b5ca8;
  font-weight: 700;
  white-space: nowrap;
}

.layer-intro-text {
  margin: 8px 0 10px;
  color: #4f5784;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: break-word;
  background: #f6f8ff;
  border: 1px solid #dfe4f5;
  border-radius: 10px;
  padding: 10px;
}

.layer-progress {
  margin-top: 8px;
  width: 100%;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: #e9eeff;
}

.layer-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8ad9c4, #7191ea);
}

.subscale-grid {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.subscale-card {
  border: 1px solid #dde2f2;
  border-radius: 12px;
  padding: 11px;
  background: #fefeff;
}

.subscale-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.subscale-title {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  color: #37406e;
}

.subscale-score {
  margin: 0;
  font-size: 13px;
  color: #4b5ca8;
  font-weight: 700;
  white-space: nowrap;
}

.subscale-meta {
  margin: 6px 0 8px;
  font-size: 12px;
  color: #66709e;
}

.subscale-guide {
  margin: 0;
  color: #464d75;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.mcode-report-container {
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.mcode-report-container h3 {
  margin: 0 0 10px;
}

.mcode-report-container .youth-overview-grid {
  grid-template-columns: 1fr;
}

.mcode-count-grid {
  display: grid;
  gap: 10px;
}

.mcode-count-row {
  border: 1px solid #e1e6f6;
  border-radius: 12px;
  padding: 10px;
  background: #fdfdff;
}

.mcode-count-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: #3e4670;
}

.mcode-intro {
  margin: 12px 0;
  color: #5f678f;
  line-height: 1.5;
}

.mcode-tie-note {
  margin: 0 0 10px;
  color: #5162aa;
  font-weight: 600;
}

.mcode-type-card {
  margin-top: 10px;
  border: 1px solid #d7def4;
  border-radius: 12px;
  padding: 12px;
  background: #fefeff;
}

.mcode-type-card h4 {
  margin: 0 0 8px;
  color: #2f3762;
}

.mcode-type-text {
  margin: 0;
  color: #4c547f;
  line-height: 1.6;
  font-size: 13px;
}

.mcode-type-meta {
  margin: 0 0 10px;
  color: #5f678f;
  font-size: 12px;
  font-weight: 600;
}

.mcode-type-subtitle {
  margin: 10px 0 6px;
  color: #3e4670;
  font-size: 12px;
  font-weight: 700;
}

.youth-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.youth-summary-grid section {
  border: 1px solid #e5e9f8;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fbfcff;
}

.mcode-highlight-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #4c547f;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.youth-overview-wrap {
  margin-bottom: 18px;
  border: 1px solid #dce3f6;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
}

.youth-overview-wrap h4 {
  margin: 0 0 10px;
  color: #2f3762;
}

.youth-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.youth-overview-card {
  border: 1px solid #dfe6f8;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.youth-code-index {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #5968aa;
}

.youth-code-theme {
  margin: 0 0 9px;
  color: #2f3866;
  font-weight: 700;
  line-height: 1.4;
}

.youth-type-chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #ccd7f8;
  background: #edf2ff;
  color: #3d4f99;
  font-weight: 700;
  font-size: 12px;
}

.youth-type-sub {
  margin: 8px 0 0;
  color: #505a8a;
  font-weight: 600;
  line-height: 1.45;
}

.youth-tie-tag {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #5a67a8;
}

.youth-detail-wrap {
  display: grid;
  gap: 14px;
}

.youth-layer-panel {
  background: #ffffff;
  border: 1px solid #d2dbf3;
  box-shadow: 0 8px 22px rgba(83, 99, 165, 0.09);
}

.code-block-head {
  padding-bottom: 8px;
  border-bottom: 1px solid #e1e7f8;
}

.youth-intro-block {
  margin: 10px 0 12px;
  border: 1px solid #e2e7f7;
  border-radius: 10px;
  background: #f8faff;
  padding: 10px;
}

.youth-intro-block p {
  margin: 0;
  color: #485179;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.youth-intro-block p + p {
  margin-top: 6px;
}

.youth-type-card {
  background: #fcfdff;
}

.youth-type-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.youth-type-select-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: #4b578e;
  font-size: 12px;
  font-weight: 700;
}

.youth-type-select {
  border: 1px solid #cfdaff;
  border-radius: 8px;
  padding: 6px 8px;
  background: #f5f8ff;
  color: #37457c;
  font-weight: 600;
}

.youth-subsections {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.youth-sub-card {
  border: 1px solid #e2e7f7;
  border-radius: 10px;
  background: #f8faff;
  padding: 9px 10px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.youth-sub-card .mcode-type-text {
  margin-top: 6px;
}

.youth-color-card {
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
}

.youth-color-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d7e2ff;
  background: #ffffff;
}

.youth-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(40, 50, 90, 0.25);
}

.youth-result-type-card {
  background: linear-gradient(180deg, #fbfcff 0%, #f4f8ff 100%);
}

.youth-result-type-card .youth-sections-grid {
  grid-template-columns: 1fr;
}

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

.youth-mini-card {
  margin: 0;
  background: #ffffff;
}

@media (max-width: 720px) {
  .youth-summary-grid {
    grid-template-columns: 1fr;
  }

  .youth-overview-grid {
    grid-template-columns: 1fr;
  }

  .youth-sections-grid {
    grid-template-columns: 1fr;
  }
}

.score-debug {
  margin-top: 14px;
  border: 1px dashed #cad1ea;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f9faff;
}

.score-debug summary {
  cursor: pointer;
  color: #4c5685;
  font-weight: 600;
}

.score-debug pre {
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e1e5f5;
  overflow: auto;
  max-height: 280px;
  font-size: 12px;
}

.result-actions {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .container {
    width: min(700px, 95vw);
    margin: 24px auto 36px;
  }

  .card {
    padding: 20px;
    border-radius: 18px;
  }

  .grid-form {
    grid-template-columns: 1fr;
  }

  .quiz-top {
    flex-direction: column;
    gap: 8px;
  }

  .counter {
    align-self: flex-end;
    margin-top: 0;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .actions .btn {
    width: 100%;
  }

  .cover-main {
    min-height: 420px;
  }

  .cover-title {
    font-size: clamp(30px, 8vw, 44px);
  }
}

@media (max-width: 560px) {
  .bg-shape {
    opacity: 0.35;
  }

  .hero {
    margin-bottom: 18px;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .layer-panel-head h4 {
    font-size: 16px;
  }

  .mcode-count-head {
    font-size: 13px;
  }

  .choice-list label {
    padding: 10px;
  }
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-card {
  width: min(420px, 92vw);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 35px rgba(57, 70, 120, 0.11);
  backdrop-filter: blur(10px);
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.compact-btn {
  margin-top: 6px;
}

.compact {
  line-height: 1.5;
}

.auth-error {
  margin: 10px 0 0;
  color: #bb3b50;
  font-weight: 600;
}

.auth-info {
  margin: 10px 0 0;
  color: #40528f;
  font-weight: 600;
}

.auth-info.error {
  color: #bb3b50;
}

.auth-signup {
  margin-top: 14px;
  border: 1px solid #d9e0f4;
  border-radius: 12px;
  padding: 10px;
  background: #f8faff;
}

.auth-signup summary {
  cursor: pointer;
  font-weight: 700;
  color: #46558f;
}

.auth-signup[open] summary {
  margin-bottom: 8px;
}

.admin-container {
  width: min(1200px, 96vw);
}

.admin-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.admin-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-control-card,
.admin-table-card {
  display: block;
}

.admin-control-card {
  margin-bottom: 14px;
}

.admin-link-create-card {
  display: block;
  margin-top: 14px;
}

.admin-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1.2fr 1.2fr auto;
  align-items: end;
}

.admin-row + .admin-row {
  margin-top: 12px;
}

.admin-row-single {
  display: flex;
  justify-content: flex-end;
}

.admin-feedback {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.admin-feedback.success {
  color: #2d6f57;
}

.admin-feedback.error {
  color: #b63e53;
}

.admin-feedback a {
  color: #3958c5;
  word-break: break-all;
}

.admin-table-wrap {
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid #e2e7f6;
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.admin-table th {
  font-weight: 700;
  color: #465285;
  background: #f7f9ff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-table td.mono-col {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #4b5788;
  word-break: break-all;
}

.empty-row {
  text-align: center;
  color: #6b7294;
}

.tiny-btn {
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12px;
}

.btn.danger {
  color: #af3f53;
  border-color: #e7cad3;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-progress {
  background: #edf5ff;
  color: #3954b1;
}

.status-expired {
  background: #ffeef2;
  color: #b63f55;
}

.link-warning-box {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ecc8cf;
  background: #fff2f4;
  color: #9d2f45;
  font-size: 14px;
  line-height: 1.5;
}

.consent-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.consent-check input {
  margin-top: 2px;
  flex-shrink: 0;
}

.watermark-fixed {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}

.watermark-mark {
  position: absolute;
  transform: rotate(-24deg);
  font-size: clamp(16px, 2vw, 28px);
  letter-spacing: 0.06em;
  color: rgba(73, 85, 138, 0.2);
  font-weight: 700;
  white-space: nowrap;
  user-select: none;
}

@media (max-width: 920px) {
  .admin-row {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: linear-gradient(180deg, #f8faff 0%, #eef3ff 100%) !important;
  }

  .bg-shape,
  .hero,
  #profile-step,
  #start-step,
  #quiz-step,
  .result-actions,
  .watermark-fixed {
    display: none !important;
  }

  .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .card {
    border: 1px solid #d7dff3 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%) !important;
    box-shadow: 0 3mm 7mm rgba(71, 84, 139, 0.08) !important;
    backdrop-filter: none !important;
  }

  #result-step {
    display: block !important;
    border: 1px solid #d2dbf2 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f3f6ff 100%) !important;
    box-shadow: 0 3mm 7mm rgba(71, 84, 139, 0.1) !important;
    border-radius: 14px !important;
    padding: 4mm !important;
  }

  #result-step > h2,
  #result-step > #result-user {
    margin-left: 1mm !important;
    margin-right: 1mm !important;
  }

  #result-step > h2 {
    margin-top: 0 !important;
    margin-bottom: 2.5mm !important;
  }

  #result-step > #result-user {
    margin-top: 0 !important;
    margin-bottom: 3mm !important;
  }

  .report-cover {
    break-after: page;
    page-break-after: always;
    margin-bottom: 0 !important;
    min-height: 236mm !important;
    box-shadow: 0 2.4mm 6mm rgba(63, 74, 125, 0.1) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .cover-main {
    min-height: 0 !important;
    height: calc(236mm - 34px) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  #result-kpis,
  #question-chart-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  #result-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3mm !important;
    margin-top: 3mm !important;
    margin-bottom: 3mm !important;
  }

  .kpi-card {
    padding: 8px !important;
    border-radius: 9px !important;
  }

  .kpi-label {
    font-size: 11px !important;
  }

  .kpi-value {
    margin: 5px 0 2px !important;
    font-size: 17px !important;
  }

  .kpi-sub {
    font-size: 11px !important;
  }

  #question-chart-section {
    break-before: auto;
    page-break-before: auto;
    margin-top: 2mm !important;
    padding: 10px !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  #question-chart-section h3 {
    margin: 0 0 6px !important;
    font-size: 14px !important;
  }

  #question-line-chart {
    height: 56mm !important;
    max-height: 56mm !important;
  }

  #layer-report-section,
  #mcode-report-section,
  #youth-report-section {
    break-before: auto !important;
    page-break-before: auto !important;
  }

  h2,
  h3,
  h4 {
    break-after: avoid;
    page-break-after: avoid;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  #layer-report-section,
  #mcode-report-section,
  #youth-report-section {
    margin-top: 6mm !important;
  }

  .layer-panel,
  .subscale-card,
  .youth-layer-panel,
  .mcode-type-card,
  .youth-sub-card,
  .kpi-card,
  .chart-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  canvas {
    max-width: 100% !important;
  }
}

body.app-loading .step {
  display: none !important;
}
