:root {
  --color-bg: #f4f6fb;
  --color-surface: #ffffff;
  --color-primary: #1b64f2;
  --color-primary-dark: #124ed1;
  --color-text: #16213a;
  --color-text-muted: #5b6478;
  --color-border: #e1e6f0;
  --color-success-bg: #e7f8ee;
  --color-success-text: #1b8a4c;
  --color-error-bg: #fdecec;
  --color-error-text: #c62828;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-card: 0 12px 32px rgba(22, 33, 58, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #eef2fb 0%, #f7f9fd 40%);
  color: var(--color-text);
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 16px 0 32px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  color: var(--color-text);
  text-decoration: none;
}

.brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand-name {
  line-height: 1;
  white-space: nowrap;
}

.brand-tagline {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 480px) {
  .navbar {
    justify-content: center;
  }

  .brand {
    font-size: 18px;
    gap: 8px;
  }

  .brand-logo {
    height: 28px;
  }
}

.content {
  flex: 1;
}

.hero {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 36px 24px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(22px, 4vw, 30px);
  margin: 0 0 12px;
}

.hero-subtitle {
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.55;
  font-size: 15px;
}

.upload-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.instructions-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 24px;
  margin-bottom: 24px;
  text-align: left;
}

.instructions-title {
  margin: 0 0 20px;
  font-size: 18px;
  text-align: center;
}

.instructions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.instruction-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.instruction-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.instruction-item h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--color-text);
}

.instruction-item p {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.agreement-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 24px;
  padding: 16px 18px;
  border-top: 1px solid var(--color-border);
  border-left: 4px solid #4f3b9b;
  background: rgba(79, 59, 155, 0.06);
  border-radius: 0 10px 10px 0;
}

.agreement-wrapper input[type="checkbox"] {
  appearance: none;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  margin: 1px 0 0;
  border: 2px solid #4f3b9b;
  border-radius: 6px;
  background: #fafbff;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.agreement-wrapper input[type="checkbox"]:hover {
  border-color: #4f3b9b;
  transform: scale(1.05);
}

.agreement-wrapper input[type="checkbox"]:checked {
  background: #4f3b9b;
  border-color: #4f3b9b;
}

.agreement-wrapper input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 7px;
  height: 13px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.agreement-wrapper label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--color-text);
  cursor: pointer;
}

@media (max-width: 560px) {
  .instructions-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Local preview section ────────────────────────────────────── */

.preview-section {
  width: 100%;
  max-width: unset;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.preview-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text);
}

.preview-photo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f6fb;
  padding: 16px;
}

.preview-photo {
  display: block;
  max-width: 100%;
  max-height: 280px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 4px 14px rgba(22, 33, 58, 0.12);
}

.btn-change-file {
  appearance: none;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-change-file:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ── Workspace column (single centred post-upload column) ────── */

.workspace-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* ── Settings panel ───────────────────────────────────────────── */

.settings-panel {
  width: 100%;
  max-width: unset;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.settings-title {
  margin: 0;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  background: #fafbff;
}

.btn-submit {
  appearance: none;
  border: none;
  width: 100%;
  padding: 18px 24px;
  margin-top: 4px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-submit:hover {
  opacity: 0.92;
}

.btn-submit:active {
  transform: scale(0.99);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Retouch toggle card ──────────────────────────────────────── */

.retouch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 18px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.retouch-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.retouch-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.retouch-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.retouch-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* Toggle switch */
.toggle-switch {
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.toggle-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  display: flex;
  align-items: center;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--color-border);
  transition: background 0.2s ease;
  position: relative;
}

.toggle-thumb {
  position: absolute;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: left 0.2s ease;
}

.toggle-switch input:checked + .toggle-track {
  background: var(--color-primary);
}

.toggle-switch input:checked + .toggle-track .toggle-thumb {
  left: 21px;
}

/* ── Retouch intensity slider panel ──────────────────────────── */

.retouch-slider-panel {
  display: none;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 16px 18px;
  background: #f4f7ff;
  border-bottom: 1px solid var(--color-border);
}

.retouch-slider-panel.visible {
  display: flex;
}

.retouch-slider-label-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.retouch-slider-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.45;
  flex: 1;
}

.slider-info-btn {
  appearance: none;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-primary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.slider-info-btn:hover {
  background: rgba(27, 100, 242, 0.07);
  border-color: var(--color-primary);
}

.slider-info-btn.active {
  background: rgba(27, 100, 242, 0.1);
  border-color: var(--color-primary);
}

/* Animated guide panel */
.slider-guide {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}

.slider-guide.visible {
  max-height: 220px;
  opacity: 1;
}

.slider-guide-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.slider-guide-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.slider-guide-range {
  flex-shrink: 0;
  display: inline-block;
  min-width: 48px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  background: rgba(27, 100, 242, 0.08);
  border-radius: 6px;
  padding: 2px 6px;
  text-align: center;
  letter-spacing: 0.01em;
}

.slider-guide-text {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.slider-guide-text strong {
  color: var(--color-text);
  font-weight: 600;
}

.retouch-slider-hint {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.retouch-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.retouch-slider-bound {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.retouch-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--color-primary) 0%,
    var(--color-primary) var(--slider-pct, 50%),
    var(--color-border) var(--slider-pct, 50%),
    var(--color-border) 100%
  );
  outline: none;
  cursor: pointer;
}

.retouch-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--color-primary);
  box-shadow: 0 1px 4px rgba(27, 100, 242, 0.25);
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.retouch-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--color-primary);
  box-shadow: 0 1px 4px rgba(27, 100, 242, 0.25);
  cursor: pointer;
}

.retouch-slider:hover::-webkit-slider-thumb {
  box-shadow: 0 0 0 6px rgba(27, 100, 242, 0.12);
}

.retouch-slider-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--color-primary);
  color: white;
  transition: background 0.2s ease;
}

/* ── Success page ────────────────────────────────────────────── */

.success-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 40px 20px 60px;
  max-width: 520px;
  margin: 0 auto;
}

.success-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  width: 100%;
}

.success-checkmark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e8f8ef;
  color: #1a9651;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #a8e6c1;
}

.success-checkmark--fail {
  background: #fff0f0;
  color: #c0392b;
  border-color: #f0a9a9;
}

.success-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-text);
  margin: 0;
  line-height: 1.25;
}

.success-sub {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
  max-width: 380px;
}

/* Spinning loader for pending state */
.success-spinner {
  width: 56px;
  height: 56px;
  border: 5px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.success-photo-wrap {
  width: 100%;
  background: #f4f6fb;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-photo {
  display: block;
  max-width: 100%;
  max-height: 380px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 6px 24px rgba(22, 33, 58, 0.14);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #1a9651 0%, #157a41 100%);
  color: white;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(26, 150, 81, 0.35);
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  justify-content: center;
}

.btn-download:hover {
  opacity: 0.92;
  box-shadow: 0 6px 20px rgba(26, 150, 81, 0.45);
}

.btn-download-icon {
  font-size: 20px;
}

/* ── Site footer ─────────────────────────────────────────────── */

.site-footer {
  margin-top: auto;
  background: #1a1f2e;
  color: rgba(255, 255, 255, 0.55);
  padding: 28px 20px;
}

.site-footer-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.site-footer-copy {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.site-footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
}

.site-footer-link {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer-link:hover {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
}

.site-footer-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 14px;
  line-height: 1;
}

.site-footer-disclaimer {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.3);
  margin: 4px 0 0;
  max-width: 600px;
  line-height: 1.5;
}

/* ── Legal pages ─────────────────────────────────────────────── */

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}

.legal-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 20px;
}

.legal-back {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  margin-bottom: 14px;
  transition: opacity 0.15s ease;
}

.legal-back:hover { opacity: 0.75; }

.legal-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 6px;
  line-height: 1.2;
}

.legal-meta {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin: 0;
}

.legal-body h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin: 28px 0 8px;
}

.legal-body p,
.legal-body ul,
.legal-body ol {
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0 0 10px;
}

.legal-body ul,
.legal-body ol {
  padding-left: 22px;
}

.legal-body li {
  margin-bottom: 4px;
}

.legal-body a {
  color: var(--color-primary);
  text-decoration: underline;
}

.legal-price-table {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 10px 0 14px;
}

.legal-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  font-size: 13.5px;
}

.legal-price-row + .legal-price-row {
  border-top: 1px solid var(--color-border);
  background: #fafbff;
}

.legal-price-label {
  color: var(--color-text);
  line-height: 1.45;
}

.legal-price-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 400;
}

.legal-price-amount {
  font-size: 15px;
  font-weight: 800;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Pricing & payment card ──────────────────────────────────── */

.pricing-card {
  width: 100%;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.pricing-card-header {
  padding: 12px 18px;
  background: #f8f9ff;
  border-bottom: 1px solid var(--color-border);
}

.pricing-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.pricing-lines {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0;
}

.pricing-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px;
  gap: 12px;
}

.pricing-line-label {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.pricing-line-amount {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.pricing-line-extra {
  color: var(--color-primary);
}

.pricing-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0 18px;
}

.pricing-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  gap: 12px;
}

.pricing-total-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
}

.pricing-total-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.pricing-pay-section {
  border-top: 1px solid var(--color-border);
  padding: 12px 18px 14px;
  background: #fafbff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pricing-pay-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.pricing-pay-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
}

.pricing-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.pricing-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.pricing-badge-sbp {
  background: #fff3e0;
  color: #e65100;
  border-color: #ffd180;
}

.pricing-badge-mir {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #a5d6a7;
}

.pricing-badge-visa {
  background: #e8eaf6;
  color: #283593;
  border-color: #9fa8da;
}

.pricing-badge-mc {
  background: #fce4ec;
  color: #880e4f;
  border-color: #f48fb1;
}

.pricing-badge-lock {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-left: 2px;
}

/* ── Resolution error banner ─────────────────────────────────── */

.resolution-error {
  display: none;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  max-width: unset;
  padding: 18px 20px;
  border: 1.5px solid #f0a9a9;
  border-radius: var(--radius-md);
  background: #fff7f7;
}

.resolution-error-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.resolution-error-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.resolution-error-title {
  font-size: 14px;
  font-weight: 700;
  color: #c0392b;
  margin: 0;
  line-height: 1.3;
}

.resolution-error-dims {
  font-size: 12.5px;
  font-weight: 600;
  color: #c0392b;
  margin: 0;
  line-height: 1.4;
  opacity: 0.85;
}

.resolution-error-sub {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

.resolution-error-tips {
  margin-top: 4px;
  padding: 10px 14px;
  background: white;
  border: 1px solid #f0a9a9;
  border-radius: 8px;
}

.resolution-error-tips-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 6px;
}

.resolution-error-tips ol {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resolution-error-tips li {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.resolution-error-tips li strong {
  color: var(--color-text);
  font-weight: 600;
}

.btn-resolution-retry {
  appearance: none;
  border: 1.5px solid #f0a9a9;
  background: white;
  color: #c0392b;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 6px;
  align-self: flex-start;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-resolution-retry:hover {
  background: #fff0f0;
  border-color: #c0392b;
}

/* ── Dropzone ─────────────────────────────────────────────────── */

.dropzone {
  display: block;
  width: 100%;
  max-width: unset;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  background: #fafbff;
}

.dropzone-locked {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--color-primary);
  background: #f0f5ff;
}

.dropzone.has-file {
  border-color: var(--color-primary);
  border-style: solid;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
}

.dropzone-content svg {
  color: var(--color-primary);
}

.dropzone-text {
  color: var(--color-text);
  font-weight: 600;
  font-size: 15px;
  word-break: break-all;
}

.dropzone-hint {
  font-size: 12px;
  color: var(--color-text-muted);
}

.btn-primary {
  appearance: none;
  border: none;
  background: var(--color-primary);
  color: white;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(27, 100, 242, 0.32);
  transition: background 0.15s ease, transform 0.1s ease;
  width: 100%;
  max-width: 420px;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
}

.alert {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: left;
}

.alert-error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

.alert-success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  text-align: center;
  font-weight: 600;
}

.promo-section {
  max-width: 420px;
  margin: 32px auto 0;
  text-align: center;
}

.promo-form {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.promo-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
}

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

.promo-input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text);
  background: #fafbff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.promo-input::placeholder {
  text-transform: none;
  font-weight: 400;
  color: var(--color-text-muted);
}

.promo-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #ffffff;
}

.btn-promo {
  appearance: none;
  border: none;
  background: var(--color-primary);
  color: white;
  font-size: 15px;
  font-weight: 700;
  padding: 0 22px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn-promo:hover {
  background: var(--color-primary-dark);
}

.btn-promo:active {
  transform: scale(0.97);
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px 24px;
  margin-top: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(27, 100, 242, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(27, 100, 242, 0.4);
}

.btn-download:active {
  transform: translateY(0);
}

.btn-download-icon {
  font-size: 18px;
}

.how-it-works {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 24px;
  margin-top: 20px;
}

.how-it-works h2 {
  margin-top: 0;
  font-size: 18px;
}

.how-it-works ol {
  margin: 0;
  padding-left: 20px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 33, 58, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  color: white;
  text-align: center;
  padding: 24px;
  z-index: 100;
}

.loading-overlay.visible {
  display: flex;
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px 24px;
  text-align: center;
}

.result h1 {
  margin-top: 0;
  font-size: clamp(20px, 4vw, 26px);
}

.verdict {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 28px;
}

.verdict-pass {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.verdict-fail {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

.verdict-icon {
  font-size: 18px;
}

.photo-compare {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 28px;
}

.photo-card {
  background: #fafbff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  width: 260px;
}

.photo-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 600;
}

.photo-card img {
  width: 100%;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  max-height: 320px;
}

.processed-photo {
  background: white;
}

.validation-details {
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
}

.issue-list {
  padding-left: 20px;
  color: var(--color-error-text);
  line-height: 1.7;
}

.user-message {
  background: #f0f5ff;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  color: var(--color-text);
  line-height: 1.6;
  margin-top: 16px;
}

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq-section {
  margin: 56px auto 0;
  padding: 0 16px;
}

.faq-inner {
  max-width: 640px;
  margin: 0 auto;
}

.faq-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 24px;
  text-align: center;
  letter-spacing: -0.3px;
}

.faq-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  margin: 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  background: #fff;
  user-select: none;
  transition: background 0.15s;
  outline: none;
}
.faq-question:hover {
  background: #f7f9fc;
}
.faq-question:focus-visible {
  background: #f0f5ff;
  box-shadow: inset 0 0 0 2px var(--color-primary);
}

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
  color: var(--color-text-muted);
  transition: color 0.2s;
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
/* horizontal bar — always visible */
.faq-icon::before {
  width: 12px;
  height: 2px;
  top: 9px;
  left: 4px;
}
/* vertical bar — collapsed state */
.faq-icon::after {
  width: 2px;
  height: 12px;
  top: 4px;
  left: 9px;
}
.faq-open .faq-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}
.faq-open .faq-question {
  color: var(--color-primary);
}
.faq-open .faq-icon {
  color: var(--color-primary);
}

.faq-answer {
  margin: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.faq-open .faq-answer {
  max-height: 300px;
}

.faq-answer-inner {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.65;
}
.faq-answer-inner a {
  color: var(--color-primary);
  text-decoration: none;
}
.faq-answer-inner a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .faq-question {
    font-size: 14px;
    padding: 16px;
  }
  .faq-answer-inner {
    padding: 0 16px 16px;
  }
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 12px;
  padding-top: 32px;
}

@media (max-width: 480px) {
  .photo-card {
    width: 100%;
  }
}
