.json-pretty-page {
  max-width: 1220px;
  margin: 0 auto;
  padding: 8px 0 42px;
}

/* 상단 */
.json-pretty-page .utility-top {
  padding: 34px 20px 30px;
  text-align: center;
}

.json-pretty-page .utility-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.json-pretty-page .utility-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.json-pretty-page .utility-desc {
  max-width: 860px;
  margin: 18px auto 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.8;
}

/* 요약 카드 */
.json-pretty-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.json-pretty-summary-item {
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.json-pretty-summary-item::before {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.json-pretty-summary-item strong {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.json-pretty-summary-item span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}

/* 공통 카드 */
.json-pretty-work-card,
.json-pretty-analysis-card,
.json-pretty-info-card {
  margin-bottom: 24px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

/* 카드 헤더 */
.json-pretty-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 26px;
}

.json-pretty-card-head h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.json-pretty-card-head p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.json-pretty-head-actions {
  display: flex;
  gap: 10px;
}

.json-pretty-head-actions .utility-btn {
  white-space: nowrap;
}

/* 옵션 패널 */
.json-pretty-option-panel {
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
}

.json-pretty-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.json-pretty-option-item {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.json-pretty-option-item strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.json-pretty-option-item span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}

/* 체크 / 라디오 */
.json-pretty-check-row,
.json-pretty-indent-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.json-pretty-check-item,
.json-pretty-radio-item,
.json-pretty-indent-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.json-pretty-check-item,
.json-pretty-radio-item {
  cursor: pointer;
  user-select: none;
}

.json-pretty-indent-label {
  background: #0f172a;
  color: #ffffff;
}

.json-pretty-check-item input,
.json-pretty-radio-item input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

/* 메타 */
.json-pretty-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.json-pretty-meta-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

/* 입력/결과 */
.json-pretty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.json-pretty-panel {
  min-width: 0;
}

.json-pretty-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.json-pretty-page .utility-field-label {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.json-pretty-textarea {
  width: 100%;
  min-height: 460px;
  padding: 22px;
  box-sizing: border-box;
  border: 1px solid #1e293b;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
  color: #e5e7eb;
  font-family: Consolas, Monaco, "SFMono-Regular", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.85;
  resize: vertical;
  outline: none;
  white-space: pre;
  overflow: auto;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 18px 36px rgba(15, 23, 42, 0.16);
}

.json-pretty-textarea::placeholder {
  color: rgba(203, 213, 225, 0.5);
}

.json-pretty-textarea:focus {
  border-color: #2563eb;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.16),
    0 18px 36px rgba(15, 23, 42, 0.18);
}

.json-pretty-output {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 28%),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

/* 상태 */
.json-pretty-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.json-pretty-status-badge.is-ready {
  background: #f1f5f9;
  color: #475569;
}

.json-pretty-status-badge.is-success {
  background: #dbeafe;
  color: #1d4ed8;
}

.json-pretty-status-badge.is-warning {
  background: #fef3c7;
  color: #92400e;
}

.json-pretty-status-badge.is-error {
  background: #fee2e2;
  color: #b91c1c;
}

/* 버튼 */
.json-pretty-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.json-pretty-page .utility-btn {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
}

.json-pretty-page .utility-btn-primary {
  border-color: #0f172a;
  background: linear-gradient(135deg, #0f172a, #2563eb);
  color: #ffffff;
}

.json-pretty-page .utility-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.json-pretty-mini-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.json-pretty-mini-btn:hover {
  transform: translateY(-1px);
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

/* 메시지 */
.json-pretty-message {
  min-height: 22px;
  margin: 16px 0 0;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.json-pretty-message.is-success {
  color: #1d4ed8;
}

.json-pretty-message.is-warning {
  color: #92400e;
}

.json-pretty-message.is-error {
  color: #b91c1c;
}

/* 분석 */
.json-pretty-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.json-pretty-analysis-item {
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.json-pretty-analysis-item span {
  display: block;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.json-pretty-analysis-item strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.7;
  word-break: break-word;
}

/* 오류 박스 */
.json-pretty-error-box {
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: #f8fafc;
}

.json-pretty-error-box.is-success {
  border-color: rgba(37, 99, 235, 0.22);
  background: #eff6ff;
}

.json-pretty-error-box.is-error {
  border-color: rgba(239, 68, 68, 0.25);
  background: #fef2f2;
}

.json-pretty-error-box strong {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.json-pretty-error-box p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.8;
}

.json-pretty-error-box.is-error p {
  color: #991b1b;
}

/* 비교 카드 */
.json-pretty-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.json-pretty-compare-item {
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.json-pretty-compare-item strong {
  display: block;
  margin-bottom: 12px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

.json-pretty-compare-item p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.8;
}

/* 도움말 */
.json-pretty-page .help-panel {
  margin-top: 30px;
}

.json-pretty-page .help-panel > h2 {
  margin: 0 0 18px;
  color: #0f172a;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.json-pretty-page .help-box {
  border-radius: 24px;
}

.json-pretty-page .help-toggle-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.json-pretty-page .help-toggle-box summary::-webkit-details-marker {
  display: none;
}

.json-pretty-page .help-toggle-box summary::after {
  content: "+";
  color: #64748b;
  font-size: 1.2rem;
  font-weight: 700;
}

.json-pretty-page .help-toggle-box[open] summary::after {
  content: "−";
}

.json-pretty-page .help-toggle-content {
  margin-top: 14px;
}

.json-pretty-page .help-toggle-content p {
  margin: 0;
  color: #334155;
  line-height: 1.8;
}

.json-pretty-page code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

/* 반응형 */
@media (max-width: 1080px) {
  .json-pretty-summary-card,
  .json-pretty-analysis-grid,
  .json-pretty-compare-grid {
    grid-template-columns: 1fr;
  }

  .json-pretty-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .json-pretty-option-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .json-pretty-page {
    padding: 0 0 28px;
  }

  .json-pretty-page .utility-top {
    padding: 26px 14px 24px;
  }

  .json-pretty-page .utility-title {
    font-size: 34px;
  }

  .json-pretty-work-card,
  .json-pretty-analysis-card,
  .json-pretty-info-card {
    padding: 22px;
    border-radius: 22px;
  }

  .json-pretty-card-head {
    grid-template-columns: 1fr;
  }

  .json-pretty-head-actions,
  .json-pretty-action-row {
    flex-direction: column;
  }

  .json-pretty-head-actions .utility-btn,
  .json-pretty-action-row .utility-btn {
    width: 100%;
  }

  .json-pretty-check-row,
  .json-pretty-indent-row {
    flex-direction: column;
  }

  .json-pretty-check-item,
  .json-pretty-radio-item,
  .json-pretty-indent-label {
    width: 100%;
    justify-content: flex-start;
  }

  .json-pretty-textarea {
    min-height: 340px;
  }
}

@media (max-width: 640px) {
  .json-pretty-work-card,
  .json-pretty-analysis-card,
  .json-pretty-info-card {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .json-pretty-meta-row {
    flex-direction: column;
  }

  .json-pretty-meta-row span,
  .json-pretty-status-badge {
    width: 100%;
  }

  .json-pretty-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .json-pretty-mini-btn {
    width: 100%;
  }
}