/* converter.html 전용 스타일 */

.converter-wrap { display: flex; flex-direction: column; gap: 20px; }

/* 업로드 존 */
.upload-zone {
  position: relative;
  border: 2px dashed var(--line);
  border-radius: 18px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255,255,255,0.6);
}
.upload-zone.drag-over { border-color: var(--point); background: rgba(244,143,177,0.05); }
.upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-icon { font-size: 38px; margin-bottom: 10px; line-height: 1; }
.upload-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.upload-desc { font-size: 13px; color: var(--subtext); line-height: 1.7; word-break: keep-all; }

/* 이미지 정보 */
.img-info { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--subtext); }
.img-info span {
  background: rgba(244,215,226,0.45); border-radius: 6px; padding: 3px 10px;
}

/* 설정 */
.settings-row { display: flex; gap: 14px; flex-wrap: wrap; }
.setting-group { flex: 1; min-width: 130px; display: flex; flex-direction: column; gap: 6px; }
.setting-label { font-size: 12px; font-weight: 700; color: var(--subtext); }
.setting-slider-row { display: flex; align-items: center; gap: 10px; }
.setting-slider { flex: 1; accent-color: var(--point-dark); cursor: pointer; }
.setting-value { font-size: 13px; font-weight: 700; color: var(--text); min-width: 38px; text-align: right; }
/* 버튼 */
.btn-process {
  width: 100%; height: 52px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, var(--point) 0%, var(--point-dark) 100%);
  color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 20px rgba(244,143,177,0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-process:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(244,143,177,0.38); }
.btn-process:disabled { opacity: 0.6; cursor: default; transform: none; }

.btn-download {
  display: none; width: 100%; height: 50px; border: 2px solid var(--point-dark);
  border-radius: 14px; background: white; color: var(--point-dark);
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background 0.18s ease; align-items: center; justify-content: center; gap: 8px;
}
.btn-download:hover { background: rgba(244,143,177,0.05); }
.btn-download.visible { display: flex; }

/* 상태 텍스트 */
.status-text { text-align: center; font-size: 13px; color: var(--subtext); min-height: 18px; }
.status-text.error { color: #d14e7d; font-weight: 600; }
.status-text.success { color: #3a7d44; font-weight: 600; }

/* 미리보기 */
.preview-area { display: none; flex-direction: column; gap: 12px; }
.preview-area.visible { display: flex; }
.preview-canvas-wrap {
  border-radius: 14px; overflow: hidden;
  background: repeating-conic-gradient(#e0e0e0 0% 25%, #fff 0% 50%) 0 0 / 20px 20px;
  display: flex; align-items: center; justify-content: center;
  min-height: 160px;
}
.preview-canvas { max-width: 100%; max-height: 420px; display: block; }

/* 안내 박스 */
.notice-box {
  background: rgba(244,143,177,0.06);
  border-left: 3px solid var(--point);
  border-radius: 0 10px 10px 0;
  padding: 13px 16px;
  font-size: 13px; color: var(--subtext); line-height: 1.75;
}
.notice-box strong { color: var(--text); }

/* 처리 오버레이 */
.processing-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(255,255,255,0.88); z-index: 200;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 14px;
}
.processing-overlay.visible { display: flex; }
.processing-spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--line); border-top-color: var(--point-dark);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing-text { font-size: 15px; font-weight: 600; color: var(--text); }

@media (max-width: 540px) {
  .settings-row { flex-direction: column; }
  .setting-group { min-width: unset; }
}

/* ── 크기·여백·화이트 설정 ───────────────────────── */
.settings-row {
  padding: 18px;
  background: var(--soft);
  border-radius: 16px;
  gap: 18px 20px;
}

.setting-group { min-width: 170px; }
.setting-sub { font-weight: 500; }

.setting-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.setting-select,
.setting-number {
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
}

.setting-number {
  width: 90px;
  min-width: 0;
}

.setting-select:focus,
.setting-number:focus {
  outline: none;
  border-color: var(--point);
  box-shadow: 0 0 0 3px rgba(240, 107, 155, 0.15);
}

.setting-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--subtext);
}

.setting-hint {
  margin: 0;
  font-size: 12px;
  color: var(--subtext);
}

.setting-check {
  flex-basis: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.setting-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--point);
}

.setting-check small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--subtext);
}

.img-info .tag-ai {
  background: #e3f7d9;
  color: #2f6b1f;
  font-weight: 700;
}

/* ── 결과 ───────────────────────────────────────── */
.result-size {
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}

.download-row {
  display: flex;
  gap: 10px;
}

.download-row .btn-download {
  flex: 1 1 auto;   /* 세로 배치(모바일)에서도 높이 유지 */
}

.btn-download-pdf.visible {
  background: var(--point);
  border-color: var(--point);
  color: #fff;
}

.btn-download-pdf:hover {
  background: var(--point-dark);
}

.btn-download:disabled {
  opacity: 0.6;
  cursor: default;
}

@media (max-width: 540px) {
  .download-row { flex-direction: column; }
}
