*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, #f8f9fc 0%, #f0f1f5 100%);
  color: #1d1d1f;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2.5rem 1rem 3rem;
}

.container {
  width: 100%;
  max-width: 580px;
}

/* ── Header ── */
header {
  text-align: center;
  margin-bottom: 2rem;
}

.header-icon {
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: center;
}

header h1 {
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.subtitle {
  color: #48484a;
  font-size: 0.9rem;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: -0.2px;
}

.subtitle-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.subtitle-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #4f46e5;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.2px;
  border: 1px solid #e0e7ff;
}

.subtitle-tag-sep {
  font-size: 0.65rem;
  color: #c7c7cc;
  font-weight: 300;
}

/* ── Hero features ── */
.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.8rem;
}

.hero-feature {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.2rem 1rem;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hero-feature:hover {
  border-color: #c7d2fe;
  box-shadow: 0 2px 12px rgba(79, 70, 229, 0.06);
}

.hero-feature-icon {
  color: #4f46e5;
  margin-bottom: 0.6rem;
}

.hero-feature h3 {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #1d1d1f;
  letter-spacing: -0.3px;
}

.hero-feature p {
  font-size: 0.72rem;
  color: #6b7280;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .hero-features {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .hero-feature {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-align: left;
    padding: 0.8rem 1rem;
  }

  .hero-feature-icon {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .hero-feature h3 {
    margin-bottom: 0.15rem;
  }
}

/* ── Provider selector ── */
.provider-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.provider-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.55rem 0.5rem;
  border: 1.5px solid #d2d2d7;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6e6e73;
  transition: all 0.2s;
  position: relative;
}
.provider-btn:hover {
  border-color: #aaa;
  color: #1d1d1f;
}
.provider-btn.active {
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.2);
}
.provider-btn-name {
  font-weight: 600;
}
.provider-btn-model {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.7;
  letter-spacing: -0.01em;
}
.provider-btn-badge {
  position: absolute;
  top: -7px;
  right: -5px;
  font-size: 0.55rem;
  font-weight: 700;
  background: #ff9500;
  color: #fff;
  padding: 1px 5px;
  border-radius: 6px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.provider-btn.active .provider-btn-badge {
  background: #fff;
  color: #0071e3;
}
/* ── Model toggle (Gemini sub-model) ── */
.model-toggle {
  display: none;
  gap: 0;
  margin: -0.5rem 0 1rem;
  border: 1.5px solid #e0e7ff;
  border-radius: 10px;
  overflow: hidden;
  background: #f8f9fc;
}

.model-toggle-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  padding: 0.45rem 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  color: #6e6e73;
  transition: all 0.2s;
}

.model-toggle-btn:first-child {
  border-right: 1.5px solid #e0e7ff;
}

.model-toggle-btn:hover {
  background: #eef2ff;
  color: #4f46e5;
}

.model-toggle-btn.active {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  color: #4f46e5;
  font-weight: 600;
}

.model-toggle-name {
  font-weight: inherit;
}

.model-toggle-desc {
  font-size: 0.62rem;
  opacity: 0.65;
  font-weight: 400;
}

.flash-warning {
  font-size: 0.78rem;
  color: #a06000;
  background: #fff8e8;
  border: 1px solid #ffe0a0;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  line-height: 1.5;
}

/* ── Guide card (API key help) ── */
.guide-card {
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.guide-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1d1d1f;
  text-align: left;
}

.guide-toggle:hover {
  background: #f5f5f7;
}

#guide-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: #6e6e73;
}

#guide-chevron.open {
  transform: rotate(180deg);
}

.guide-body {
  display: none;
  padding: 0 1rem 1rem;
  border-top: 1px solid #f0f0f5;
}

.guide-body.open {
  display: block;
}

.guide-steps {
  padding-left: 1.25rem;
  margin: 0.75rem 0;
  font-size: 0.875rem;
  line-height: 2;
  color: #3a3a3c;
}

.guide-steps a {
  color: #0071e3;
  text-decoration: none;
  font-weight: 600;
}

.guide-steps a:hover {
  text-decoration: underline;
}

.guide-note {
  font-size: 0.8rem;
  color: #6e6e73;
  background: #f5f5f7;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

/* ── Form ── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #1d1d1f;
}

.label-hint {
  font-weight: 400;
  color: #6e6e73;
  font-size: 0.8rem;
}

.api-key-row {
  display: flex;
  gap: 0.5rem;
}

.api-key-row input {
  flex: 1;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}

.api-key-row input:focus {
  border-color: #0071e3;
}

.btn-icon {
  background: #fff;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  color: #6e6e73;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover { background: #f0f0f5; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: #6e6e73;
  margin-top: 0.45rem;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] { accent-color: #0071e3; }

/* ── Translation options section ── */
.options-section {
  margin-bottom: 1.25rem;
  padding: 0.65rem 1rem;
  background: #f9f9fb;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
}
.options-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}
.options-section .checkbox-row {
  margin-top: 0;
}
.option-hint {
  font-size: 0.72rem;
  color: #a1a1a6;
  margin: 0.15rem 0 0.35rem 1.4rem;
  line-height: 1.3;
}

.api-key-hint {
  font-size: 0.75rem;
  margin-top: 0.3rem;
  min-height: 1em;
  color: transparent;
  transition: color 0.2s;
}
.api-key-hint.warn {
  color: #e68a00;
}

/* ── Drop zone ── */
#drop-zone {
  border: 2px dashed #d2d2d7;
  border-radius: 16px;
  padding: 2.2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s;
  background: #fff;
}

#drop-zone:hover,
#drop-zone.dragover {
  border-color: #2563eb;
  background: linear-gradient(135deg, #eff6ff, #f0f5ff);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,0.08);
}

#drop-zone.drop-rejected {
  border-color: #ff3b30;
  background: #fff5f5;
  animation: headShake 0.5s ease;
}
#drop-zone.drop-rejected::after {
  content: 'PDF 파일만 업로드할 수 있습니다';
  display: block;
  color: #ff3b30;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 0.5rem;
}
@keyframes headShake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-4px); }
  30%, 60%, 90% { transform: translateX(4px); }
}

.drop-content svg {
  color: #b0b0b5;
  margin-bottom: 0.6rem;
}

.drop-content p {
  color: #6e6e73;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.drop-content strong { color: #0071e3; }

.drop-sub {
  font-size: 0.78rem !important;
  color: #aeaeb2 !important;
}

/* ── File info ── */
.file-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: #e8f0fe;
  border-radius: 8px;
  font-size: 0.85rem;
}

.file-icon { flex-shrink: 0; }

#file-name {
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-text {
  background: none;
  border: none;
  color: #e30000;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  flex-shrink: 0;
}

/* ── Cost estimate ── */
.cost-estimate {
  margin-top: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: #f0faf0;
  border: 1px solid #d4ecd4;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #2d6a2d;
  line-height: 1.5;
}

.cost-estimate .cost-main {
  font-weight: 600;
}

.cost-estimate .cost-ref-discount {
  color: #248a3d;
  font-size: 0.8rem;
  font-weight: 500;
}
.cost-estimate .cost-detail {
  color: #5a8a5a;
  font-size: 0.75rem;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 2px 12px rgba(37,99,235,0.25);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}

.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-primary:disabled {
  background: #c7c7cc;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-hint {
  text-align: center;
  font-size: 0.78rem;
  color: #aeaeb2;
  margin-top: 0.4rem;
  min-height: 1.2em;
  transition: opacity 0.2s;
}

.btn-secondary {
  display: inline-block;
  width: 100%;
  padding: 0.72rem;
  background: #fff;
  color: #0071e3;
  border: 1.5px solid #0071e3;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  margin-top: 0.75rem;
  transition: background 0.2s;
}

.btn-secondary:hover { background: #f0f5ff; }

/* ── Features grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem 0.6rem 0.85rem;
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 14px;
  transition: all 0.25s;
  text-align: center;
}

.feature-card:hover {
  border-color: transparent;
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.feature-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.2rem;
}

/* 카드별 아이콘 색상 */
.feature-card:nth-child(1) .feature-card-icon { background: #eef4ff; }
.feature-card:nth-child(1) .feature-card-icon svg { color: #3b82f6; }
.feature-card:nth-child(2) .feature-card-icon { background: #fef3e2; }
.feature-card:nth-child(2) .feature-card-icon svg { color: #f59e0b; }
.feature-card:nth-child(3) .feature-card-icon { background: #ecfdf5; }
.feature-card:nth-child(3) .feature-card-icon svg { color: #10b981; }
.feature-card:nth-child(4) .feature-card-icon { background: #fce7f3; }
.feature-card:nth-child(4) .feature-card-icon svg { color: #ec4899; }

.feature-card-icon svg {
  color: #0071e3;
}

.feature-card-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1d1d1f;
}

.feature-card-desc {
  font-size: 0.68rem;
  color: #aeaeb2;
  line-height: 1.3;
}

/* ── Promo card (접기/펼치기 홍보 미니 페이지) ── */
.promo-card {
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  margin-top: 1rem;
  overflow: hidden;
}

.promo-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  color: #6e6e73;
  text-align: left;
}

.promo-toggle:hover { background: #f5f5f7; }

#promo-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: #aeaeb2;
}

#promo-chevron.open { transform: rotate(180deg); }

.promo-body {
  display: none;
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid #f0f0f5;
}

.promo-body.open { display: block; }

/* Hero */
.promo-hero {
  text-align: center;
  padding: 1.25rem 0 0.75rem;
}

.promo-hero-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 0.3rem;
}

.promo-hero-sub {
  font-size: 0.8rem;
  color: #6e6e73;
  margin: 0;
}

/* Pipeline steps */
.promo-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1rem 0;
}

.promo-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.promo-step:last-child { padding-bottom: 0; }

/* 연결선 */
.promo-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: #e5e5ea;
}

.promo-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0071e3;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.promo-step-content {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  flex: 1;
  padding-top: 2px;
}

.promo-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f0f5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.promo-step-icon svg { color: #0071e3; }

.promo-step-title {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1d1d1f;
}

.promo-step-desc {
  display: block;
  font-size: 0.75rem;
  color: #6e6e73;
  margin-top: 0.1rem;
  line-height: 1.4;
}

/* Before / After 비교 */
.promo-compare {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.promo-compare-box {
  flex: 1;
  text-align: center;
}

.promo-compare-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #aeaeb2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.promo-compare-placeholder {
  border: 2px dashed #d1d1d6;
  border-radius: 10px;
  padding: 2.5rem 0.75rem;
  font-size: 0.75rem;
  color: #aeaeb2;
  background: #fafafa;
}

.promo-compare-arrow {
  flex-shrink: 0;
  color: #aeaeb2;
  padding-top: 1rem;
}

/* 에디터 소개 */
.promo-editor-intro {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #f5f5f7;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.promo-editor-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid #e5e5ea;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.promo-editor-icon svg { color: #0071e3; }

.promo-editor-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1d1d1f;
}

.promo-editor-desc {
  display: block;
  font-size: 0.73rem;
  color: #6e6e73;
  margin-top: 0.15rem;
  line-height: 1.45;
}

/* 접기 버튼 */
.promo-close {
  display: block;
  width: 100%;
  padding: 0.5rem;
  background: none;
  border: 1px solid #e5e5ea;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  color: #6e6e73;
  transition: background 0.15s;
}

.promo-close:hover { background: #f5f5f7; }

/* ── Progress ── */
.progress-filename {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #3a3a3c;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Step Cards ── */
.step-cards {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e5ea;
  margin: 1.25rem 0 0.75rem;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #f0f0f5;
  transition: background 0.3s, opacity 0.3s;
  opacity: 0.4;
  position: relative;
}

.step-card:last-child { border-bottom: none; }

.step-card.active,
.step-card.done,
.step-card.error { opacity: 1; }

.step-card.active { background: linear-gradient(135deg, #eff6ff, #f5f3ff); }
.step-card.done   { background: #f8fdf8; }
.step-card.error  { background: #fff5f5; }

/* Vertical connector line — bottom segment (circle → card bottom) */
.step-card:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1rem + 14px);
  top: calc(0.8rem + 32px);
  width: 2px;
  bottom: 0;
  background: #e5e5ea;
  z-index: 0;
  transition: background 0.5s;
}

/* Vertical connector line — top segment (card top → circle) */
.step-card:not(:first-child)::before {
  content: "";
  position: absolute;
  left: calc(1rem + 14px);
  top: 0;
  width: 2px;
  height: calc(0.8rem + 1px);
  background: #e5e5ea;
  z-index: 0;
  transition: background 0.5s;
}

/* Connector fills green when step completes */
.step-card.done:not(:last-child)::after { background: #30d158; }
.step-card.done + .step-card::before { background: #30d158; }
.step-card.active:not(:last-child)::after {
  background: linear-gradient(to bottom, #0071e3 30%, #e5e5ea);
}

/* Number circle */
.step-card-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #e8e8ed;
  border: 2px solid #d2d2d7;
  transition: all 0.3s;
  margin-top: 1px;
  position: relative;
  z-index: 1;
}

.step-card-num span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8e8e93;
  line-height: 1;
}

.step-card.active .step-card-num {
  background: #0071e3;
  border-color: #0071e3;
  animation: pulse 1.2s infinite;
}

.step-card.active .step-card-num span { color: #fff; }

.step-card.done .step-card-num {
  background: #30d158;
  border-color: #30d158;
}

.step-card.done .step-card-num span { color: #fff; }

.step-card.error .step-card-num {
  background: #e8910c;
  border-color: #e8910c;
}

.step-card.error .step-card-num span { color: #fff; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,113,227,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(0,113,227,0); }
}

/* Card body */
.step-card-body {
  flex: 1;
  min-width: 0;
}

.step-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.3;
}

.step-card.active .step-card-title { color: #0071e3; }
.step-card.done   .step-card-title { color: #1a7a2e; }
.step-card.error  .step-card-title { color: #b37400; }

.step-card-desc {
  font-size: 0.75rem;
  color: #aeaeb2;
  margin-top: 0.15rem;
}

.step-card.active .step-card-desc { display: none; }

.step-card-status {
  display: none;
  font-size: 0.78rem;
  color: #5599e3;
  margin-top: 0.2rem;
  line-height: 1.4;
}

.step-card.active .step-card-status {
  display: block;
  background: linear-gradient(90deg, #5599e3 0%, #8bc4ff 50%, #5599e3 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 2.5s linear infinite;
}

/* Per-step time */
.step-card-time {
  font-size: 0.78rem;
  color: #aeaeb2;
  font-weight: 600;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  min-width: 2.5em;
  text-align: right;
}

.step-card.active .step-card-time { color: #0071e3; }
.step-card.done   .step-card-time { color: #30d158; }

.elapsed-time {
  text-align: center;
  font-size: 0.8rem;
  color: #aeaeb2;
  margin-top: 0.25rem;
  min-height: 1.2em;
}

/* ── Tip card ── */
.tip-card {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, #fafbff 0%, #f0f5ff 100%);
  border: 1px solid #d6e4f7;
  border-radius: 14px;
  padding: 1rem 1.1rem 0.85rem;
  animation: fadeIn 0.4s ease;
  position: relative;
}

.tip-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.tip-icon {
  color: #0071e3;
  flex-shrink: 0;
}

.tip-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0071e3;
}

.tip-card p {
  font-size: 0.85rem;
  color: #3a3a3c;
  line-height: 1.6;
  min-height: 2.6em;
}

.tip-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 0.65rem;
}

.tip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c7c7cc;
  transition: all 0.3s;
}

.tip-dot.active {
  background: #0071e3;
  width: 16px;
  border-radius: 3px;
}

.tip-dot-sm {
  width: 3px;
  height: 3px;
  opacity: 0.5;
}

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

/* ── Result ── */
.result-icon {
  text-align: center;
  margin: 1.5rem 0 0.75rem;
}

.result-icon.success svg { color: #30d158; }
.result-icon.error svg   { color: #ff3b30; }

.result-title-success {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 1rem;
}

.result-summary {
  background: #f8fdf8;
  border: 1px solid #d4ecd4;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.result-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
}

.result-summary-row:first-child {
  border-bottom: 1px solid #e8f5e8;
}

.result-summary-label {
  font-size: 0.8rem;
  color: #6e6e73;
  font-weight: 500;
}

.result-summary-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1d1d1f;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Result cost (실제 비용 + 유머) ── */
.result-cost {
  text-align: center;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f0f5ff 0%, #fafbff 100%);
  border: 1px solid #d6e4f7;
  border-radius: 12px;
}

.result-cost-amount {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0071e3;
}

.result-cost-detail {
  display: block;
  font-size: 0.72rem;
  color: #aeaeb2;
  margin-top: 0.15rem;
}

.result-cost-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6e6e73;
  margin-top: 0.4rem;
}

.result-cost-humor {
  display: block;
  font-size: 0.78rem;
  color: #8e8e93;
  margin-top: 0.2rem;
  font-style: italic;
  line-height: 1.5;
}

.btn-download {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-download svg {
  flex-shrink: 0;
}

.btn-edit-open {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #f9f9fb !important;
  border-color: #d2d2d7 !important;
  color: #3a3a3c !important;
  font-size: 0.88rem !important;
}
.btn-edit-open:hover {
  background: #f0f0f5 !important;
  border-color: #aeaeb2 !important;
}
.btn-edit-open svg { color: #6e6e73; }

.result-tips {
  margin-top: 1.25rem;
  background: #f8f9fb;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-align: left;
}
.result-tips-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6e6e73;
  margin-bottom: 0.6rem;
}
.result-tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.result-tips-list li {
  font-size: 0.8rem;
  color: #48484a;
  line-height: 1.45;
  padding-left: 1.1rem;
  position: relative;
}
.result-tips-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0071e3;
}
.result-tips-list li strong {
  color: #1d1d1f;
  font-weight: 600;
}

/* ── Result help card (접기/펼치기) ── */
.result-help-card {
  margin-top: 0.8rem;
  background: #fffbf5;
  border: 1px solid #f0e0c8;
  border-left: 3px solid #ff9500;
  border-radius: 10px;
  overflow: hidden;
}
.result-help-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #8a6d00;
  text-align: left;
}
.result-help-toggle:hover {
  background: #fff7ed;
}
#result-help-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: #c0a060;
}
#result-help-chevron.open {
  transform: rotate(180deg);
}
.result-help-body {
  padding: 0 1.25rem 1rem;
  border-top: 1px solid #f0e0c8;
}
.result-help-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.result-help-list li {
  font-size: 0.8rem;
  color: #48484a;
  line-height: 1.45;
  padding-left: 1.1rem;
  position: relative;
}
.result-help-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff9500;
}
.result-help-list li strong {
  color: #1d1d1f;
  font-weight: 600;
}

.result-text {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* ── Soft error title & subtitle ── */
.error-icon-soft {
  color: #e8910c;
}

.error-title-soft {
  color: #1d1d1f;
}

.error-subtitle {
  text-align: center;
  font-size: 0.88rem;
  color: #8e8e93;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

/* ── Error details (collapsible) ── */
.error-details-wrap {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 10px;
  overflow: hidden;
}

.error-details-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  background: #f8f8fa;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8e8e93;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
}

.error-details-toggle::-webkit-details-marker { display: none; }
.error-details-toggle::marker { content: ''; }

.error-details-toggle:hover {
  background: #f0f0f5;
  color: #6e6e73;
}

.error-details-toggle svg {
  flex-shrink: 0;
  color: #aeaeb2;
}

.error-details-chevron {
  margin-left: auto;
  transition: transform 0.2s;
  font-size: 1rem;
}

.error-details-wrap[open] .error-details-chevron {
  transform: rotate(90deg);
}

.error-details-wrap[open] .error-details-toggle {
  border-radius: 10px 10px 0 0;
  border-bottom: none;
}

.error-details-body {
  padding: 0.75rem 1rem;
  background: #fafafa;
  border: 1px solid #e5e5ea;
  border-top: none;
  border-radius: 0 0 10px 10px;
}

.error-text {
  color: #6e6e73;
  font-size: 0.78rem;
  font-weight: 400;
  white-space: pre-wrap;
  line-height: 1.5;
  word-break: break-all;
  font-family: 'SF Mono', ui-monospace, monospace;
}

/* ── Manual compile (collapsible) ── */
.manual-compile-wrap {
  margin-top: 0.5rem;
  border-radius: 10px;
  overflow: hidden;
}

.manual-compile-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  background: #f8f8fa;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8e8e93;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
}

.manual-compile-toggle::-webkit-details-marker { display: none; }
.manual-compile-toggle::marker { content: ''; }

.manual-compile-toggle:hover {
  background: #f0f0f5;
  color: #6e6e73;
}

.manual-compile-toggle svg {
  flex-shrink: 0;
  color: #aeaeb2;
}

.manual-compile-chevron {
  margin-left: auto;
  transition: transform 0.2s;
  font-size: 1rem;
}

.manual-compile-wrap[open] .manual-compile-chevron {
  transform: rotate(90deg);
}

.manual-compile-wrap[open] .manual-compile-toggle {
  border-radius: 10px 10px 0 0;
  border-bottom: none;
}

.manual-compile-body {
  padding: 1rem 1.15rem;
  background: #fafafa;
  border: 1px solid #e5e5ea;
  border-top: none;
  border-radius: 0 0 10px 10px;
  text-align: left;
}

.manual-compile-steps {
  font-size: 0.84rem;
  color: #3a3a3c;
  padding-left: 1.2rem;
  margin-bottom: 1rem;
  line-height: 1.9;
}

.manual-compile-steps a {
  color: #0071e3;
  text-decoration: none;
  font-weight: 600;
}

.manual-compile-steps a:hover { text-decoration: underline; }

.manual-compile-dl {
  margin-bottom: 1rem;
  display: block;
  text-align: center;
}

.manual-compile-label {
  font-size: 0.8rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.4rem;
  color: #3a3a3c;
}

.manual-compile-input {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  padding: 0.5rem;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  background: #fff;
}

.btn-recompile-soft {
  background: #0071e3 !important;
  box-shadow: 0 2px 8px rgba(0,113,227,0.2) !important;
}

.btn-recompile-soft:hover:not(:disabled) {
  background: #005bb5 !important;
  box-shadow: 0 4px 16px rgba(0,113,227,0.3) !important;
}

/* ── Retry button ── */
.btn-retry {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-retry svg {
  flex-shrink: 0;
}

/* ── QC Warnings ── */
.qc-warnings-box {
  background: #fffbee;
  border: 1px solid #e8c840;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-top: 1.25rem;
  text-align: left;
}

.qc-warnings-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #7a5800;
  margin-bottom: 0.55rem;
}

.qc-warnings-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.qc-warnings-list li {
  font-size: 0.78rem;
  color: #5a4200;
  line-height: 1.55;
  padding: 0.2rem 0;
  border-bottom: 1px solid #f0e4a0;
  word-break: break-word;
}

.qc-warnings-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.qc-typ-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: #0071e3;
  text-decoration: none;
  font-weight: 600;
}

.qc-typ-link:hover { text-decoration: underline; }

/* ── QC Warning Groups ── */
.qc-group {
  margin-bottom: 0.5rem;
}

.qc-group:last-of-type {
  margin-bottom: 0;
}

.qc-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0;
  margin-bottom: 0.15rem;
}

.qc-group-label.qc-group-error { color: #c0392b; }
.qc-group-label.qc-group-warn  { color: #7a5800; }
.qc-group-label.qc-group-info  { color: #2a6496; }

.qc-item-error {
  border-left: 3px solid #ff3b30 !important;
  padding-left: 0.5rem !important;
  color: #8b1a1a !important;
  font-weight: 500;
}

.qc-item-warn {
  border-left: 3px solid #e8c840 !important;
  padding-left: 0.5rem !important;
}

.qc-item-info {
  border-left: 3px solid #5599e3 !important;
  padding-left: 0.5rem !important;
  color: #3a5a7c !important;
}

.qc-item-auto {
  color: #7a7a7a !important;
  font-style: italic;
}

/* Badges */
.qc-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.3rem;
  vertical-align: middle;
}

.qc-badge-manual {
  background: #fff0f0;
  color: #c0392b;
  border: 1px solid #ffd0cd;
}

.qc-badge-auto {
  background: #f0faf0;
  color: #2d6a2d;
  border: 1px solid #d4ecd4;
}

/* Collapse toggle */
.qc-collapse-toggle {
  display: block;
  width: 100%;
  background: #f8fdf8;
  border: 1px solid #e8f0e8;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  color: #3a6a3a;
  text-align: left;
  transition: background 0.2s;
}

.qc-collapse-toggle:hover {
  background: #eaf5ea;
}

.qc-collapse-chevron {
  float: right;
  transition: transform 0.2s;
}

.qc-group-collapsed .qc-collapsible {
  display: none;
}

.qc-group-collapsed .qc-collapse-chevron {
  transform: rotate(0deg);
}

.qc-group:not(.qc-group-collapsed) .qc-collapse-chevron {
  transform: rotate(90deg);
}

/* ── QC details collapse (성공 시 접기) ── */
.qc-details-wrap {
  margin-top: 1.25rem;
  border-radius: 12px;
  overflow: hidden;
}

.qc-details-summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  background: #f8f8fa;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6e6e73;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
}

.qc-details-summary::-webkit-details-marker { display: none; }

.qc-details-summary::before {
  content: "▸";
  font-size: 0.7rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.qc-details-wrap[open] > .qc-details-summary::before {
  transform: rotate(90deg);
}

.qc-details-summary:hover {
  background: #f0f0f5;
}

.qc-details-wrap[open] > .qc-details-summary {
  border-radius: 12px 12px 0 0;
  border-bottom: none;
}

.qc-details-wrap .qc-warnings-box {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: 0;
}

/* ── Recovery options ── */
.recovery-options {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.recovery-buttons {
  display: flex;
  gap: 0.6rem;
}

.btn-recovery {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 0.75rem;
  border-radius: 12px;
  border: 1.5px solid;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  text-align: center;
}

.btn-recovery:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-recovery svg {
  flex-shrink: 0;
}

.btn-recovery-title {
  font-size: 0.88rem;
  font-weight: 700;
  display: block;
}

.btn-recovery-desc {
  font-size: 0.72rem;
  font-weight: 400;
  display: block;
  line-height: 1.4;
}

/* AI 자동 수정 — primary, 가장 눈에 띄게 */
.btn-recovery-ai-primary {
  border-color: #0071e3;
  background: #0071e3;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,113,227,0.2);
}

.btn-recovery-ai-primary:hover:not(:disabled) {
  background: #005bb5;
  border-color: #005bb5;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,113,227,0.25);
}

.btn-recovery-ai-primary svg { color: #fff; }
.btn-recovery-ai-primary .btn-recovery-title { color: #fff; }
.btn-recovery-ai-primary .btn-recovery-desc { color: rgba(255,255,255,0.8); }

.btn-recovery-graceful {
  border-color: #e0d0a0;
  color: #8a6d00;
}

.btn-recovery-graceful:hover:not(:disabled) {
  background: #fffbee;
  border-color: #c0a030;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200,160,48,0.12);
}

.btn-recovery-graceful svg { color: #8a6d00; }
.btn-recovery-graceful .btn-recovery-desc { color: #a08a40; }

.btn-recovery-editor {
  border-color: #d2d2d7;
  color: #48484a;
}

.btn-recovery-editor:hover:not(:disabled) {
  background: #f8f8fa;
  border-color: #aeaeb2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.btn-recovery-editor svg { color: #6e6e73; }
.btn-recovery-editor .btn-recovery-desc { color: #8e8e93; }

/* ── Rating card (베타 피드백) ── */
.rating-card {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #fafbff 0%, #f5f3ff 100%);
  border: 1px solid #e0e7ff;
  border-radius: 14px;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.rating-card.hidden { display: none; }

.rating-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 0.2rem;
}

.rating-subtitle {
  font-size: 0.75rem;
  color: #8e8e93;
  margin-bottom: 0.8rem;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.rating-star {
  background: none;
  border: none;
  font-size: 2rem;
  color: #d2d2d7;
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  padding: 0.1rem 0.15rem;
  line-height: 1;
}

.rating-star:hover,
.rating-star.hover {
  color: #fbbf24;
  transform: scale(1.15);
}

.rating-star.selected {
  color: #f59e0b;
}

.rating-form {
  margin-top: 0.5rem;
  animation: fadeIn 0.3s ease;
}

.rating-comment {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  font-size: 0.85rem;
  font-family: inherit;
  resize: none;
  outline: none;
  margin-bottom: 0.6rem;
  background: #fff;
}

.rating-comment:focus { border-color: #2563eb; }

.rating-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.rating-submit {
  padding: 0.5rem 1.5rem;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.rating-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
.rating-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.rating-skip {
  padding: 0.5rem 1rem;
  background: none;
  color: #8e8e93;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s;
}

.rating-skip:hover { background: #f5f5f7; }

.rating-thanks {
  padding: 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2563eb;
  animation: fadeIn 0.3s ease;
}

/* ── Footer ── */
footer {
  margin-top: 2.5rem;
  text-align: center;
}

.footer-badges {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: #aeaeb2;
  padding: 0.3rem 0.6rem;
  background: #fff;
  border: 1px solid #ebebf0;
  border-radius: 999px;
}

.footer-badge svg {
  color: #c7c7cc;
  flex-shrink: 0;
}

.footer-legal {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5ea;
}
.footer-legal p {
  color: #8e8e93;
  font-size: 0.7rem;
  line-height: 1.6;
  margin: 0.15rem 0;
}

/* ── Animations ── */
.section-enter {
  animation: sectionEnter 0.4s ease-out;
}

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

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Number → ✓ / ✗ pop */
.step-card.done .step-card-num span,
.step-card.error .step-card-num span {
  animation: numPop 0.35s ease-out;
}

@keyframes numPop {
  0%   { transform: scale(0.3); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Success icon bounce + expanding ring */
.result-icon.success svg {
  animation: successPop 0.5s ease-out;
}

@keyframes successPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

.result-icon.success {
  position: relative;
}

.result-icon.success::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #30d158;
  transform: translate(-50%, -50%) scale(0);
  animation: successRing 0.8s ease-out 0.3s forwards;
  pointer-events: none;
}

@keyframes successRing {
  0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  body { padding: 1.25rem 0.75rem 2rem; }
  header h1 { font-size: 1.4rem; }
  #drop-zone { padding: 1.5rem 0.75rem; }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .step-card-desc { display: none; }
  .subtitle-tags { gap: 0.35rem; }
  .footer-badges {
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
  }
  .result-summary-value { max-width: 55%; }
  .recovery-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ── Keyboard focus rings ── */
:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}
button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0,113,227,0.15);
}
#drop-zone:focus-visible {
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
  outline: none;
}
.api-key-row input:focus-visible {
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}

/* ── 테스트 배너 (정식 배포 시 제거) ── */
.test-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #ff9500, #ff6b00);
  color: white;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
body:has(.test-banner) {
  padding-top: calc(2.5rem + 36px);
}

/* ── Feedback FAB + Modal ── */
.feedback-fab {
  position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px;
  border-radius: 50%; background: linear-gradient(135deg, #0071e3, #005bb5);
  color: white; border: none; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,113,227,0.3); transition: all 0.2s; z-index: 1000;
}
.feedback-fab:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(0,113,227,0.4); }
.feedback-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center; z-index: 10000;
}
.feedback-modal {
  background: white; border-radius: 16px; width: 90%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2); overflow: hidden;
}
.feedback-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #e5e5ea;
}
.feedback-header h3 { font-size: 1rem; font-weight: 700; }
.feedback-close {
  background: none; border: none; font-size: 1.5rem; color: #8e8e93; cursor: pointer; line-height: 1;
}
.feedback-body { padding: 16px 20px 20px; }
.feedback-desc { font-size: 0.82rem; color: #6e6e73; margin-bottom: 12px; }
.feedback-textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d2d2d7; border-radius: 10px;
  font-size: 0.88rem; font-family: inherit; resize: vertical; min-height: 80px;
  outline: none; margin-bottom: 8px;
}
.feedback-textarea:focus { border-color: #0071e3; }
.feedback-contact {
  width: 100%; padding: 8px 12px; border: 1px solid #d2d2d7; border-radius: 8px;
  font-size: 0.82rem; outline: none; margin-bottom: 12px;
}
.feedback-contact:focus { border-color: #0071e3; }
.feedback-actions { display: flex; align-items: center; justify-content: space-between; }
.feedback-status { font-size: 0.78rem; color: #30d158; }
.feedback-submit-btn { width: auto !important; padding: 8px 24px !important; }

/* ── Auth UI ── */
.auth-card {
  background: white;
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 1rem;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-bottom: 1.5px solid #e5e5ea;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem 0;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: #8e8e93;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.auth-tab.active {
  color: #0071e3;
  border-bottom-color: #0071e3;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.auth-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #d1d1d6;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}

.auth-input:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}

.auth-btn {
  margin-top: 0.2rem;
}

.auth-message {
  font-size: 0.82rem;
  color: #ff3b30;
  margin-top: 0.5rem;
  min-height: 1.2em;
}

.auth-user-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.auth-user-email {
  font-size: 0.88rem;
  color: #1d1d1f;
  font-weight: 500;
}

.auth-credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  background: linear-gradient(135deg, #0071e3, #5856d6);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3em 0.8em;
  border-radius: 20px;
}

.auth-credit-badge::before {
  content: "크레딧";
  font-weight: 500;
  opacity: 0.85;
}

.auth-mypage {
  font-size: 0.82rem;
  color: #2563eb;
  text-decoration: none;
}

.auth-mypage:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.auth-logout {
  margin-left: auto;
  font-size: 0.82rem;
  color: #8e8e93;
}

.auth-logout:hover {
  color: #ff3b30;
}

/* ── 프로모 코드 ── */
.auth-redeem {
  font-size: 0.78rem;
  color: #5856d6;
  font-weight: 500;
}
.auth-redeem:hover {
  color: #0071e3;
}

.redeem-form {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.5em;
  flex-wrap: wrap;
}

.redeem-input {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
  padding: 0.4em 0.7em;
  border: 1.5px solid #d2d2d7;
  border-radius: 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  outline: none;
  transition: border-color 0.2s;
}
.redeem-input:focus {
  border-color: #5856d6;
}

.redeem-submit {
  padding: 0.4em 1em;
  font-size: 0.8rem;
  border-radius: 8px;
}

.redeem-message {
  font-size: 0.78rem;
  font-weight: 500;
  width: 100%;
}
.redeem-success {
  color: #34c759;
}
.redeem-error {
  color: #ff3b30;
}

/* Credit warning in cost estimate */
.cost-warning {
  color: #ff3b30 !important;
}

.cost-warning-text {
  color: #ff3b30;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
