.image-edit-page .sr-comparison { position: relative; aspect-ratio: var(--sr-ratio, 1.5); width: 100%; overflow: hidden; isolation: isolate; direction: ltr; }
.image-edit-page .sr-comparison img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.image-edit-page .sr-comparison:focus-within { outline: 3px solid var(--home-orange); outline-offset: -3px; }
.image-edit-result-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 32px; align-items: center; padding-block: 48px 28px; }
.image-edit-result-header h1 { font-size: clamp(32px, 4vw, 44px); margin-top: 0; }
.image-edit-result-header .home-upload-card { width: 100%; margin: 0; padding: 16px; }
.image-edit-result-section { padding-bottom: 64px; }
.image-edit-toolbar { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--home-line); }
.image-edit-view-options { flex-wrap: wrap; }
.image-edit-view-options button { min-height: 36px; font-size: 13px; }
.image-edit-view-options button:disabled { opacity: .55; cursor: default; }
.image-edit-view-options button:disabled:hover { background: transparent; }
.image-edit-page .image-edit-download { width: auto; min-height: 36px; padding: 8px 14px; gap: 8px; color: #201711; font-size: 13px !important; text-decoration: none; }
.image-edit-stage { --image-edit-max-height: min(70svh, 640px); position: relative; display: grid; place-items: center; min-height: clamp(220px, 35vw, 360px); background: #14171a; }
.image-edit-media { position: relative; width: min(100%, var(--image-edit-preview-width), calc(var(--image-edit-max-height) * var(--image-edit-ratio))); overflow: hidden; }
.image-edit-preview-image { display: block; width: 100%; height: auto; max-height: var(--image-edit-max-height); object-fit: contain; }
.image-edit-scan { position: absolute; inset: 0 0 auto; height: 100%; background: linear-gradient(180deg, transparent 55%, #f19a7033); border-bottom: 2px solid var(--home-orange); animation: image-edit-scan 2s ease-in-out infinite; pointer-events: none; }
.image-edit-progress { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 12px; pointer-events: none; }
.image-edit-progress-label { max-width: 100%; padding: 10px 16px; border: 1px solid var(--home-line); border-radius: 999px; color: var(--home-ink); background: #1a1d21ed; }
.image-edit-stage .image-edit-upload-link { color: var(--home-orange); text-decoration: underline; }
.image-edit-page .image-edit-error { color: #ffb7a8; font-size: 13px; }
.image-edit-dimensions { margin-inline-start: auto; }
@keyframes image-edit-scan { 0%, 100% { transform: translateY(-100%); } 50% { transform: translateY(0); } }

html[dir="rtl"] .image-edit-page .home-image-label { direction: rtl; }
:is(html[dir="rtl"], html[lang="hi"], html[lang="th"]) .image-edit-page :is(h1, h2) { letter-spacing: normal; }
:is(html[lang="hi"], html[lang="th"]) .image-edit-page h1 { line-height: 1.3; }
@media (max-width: 767px) {
  .image-edit-result-header { grid-template-columns: minmax(0, 1fr); }
  .image-edit-result-header { gap: 20px; padding-block: 32px 22px; }
  .image-edit-result-header h1 { margin-bottom: 14px; }
  .image-edit-result-header .home-upload-card { max-width: none; }
  .image-edit-result-section { padding-bottom: 42px; }
  .image-edit-toolbar { padding: 10px 12px; }
  .image-edit-stage { --image-edit-max-height: min(62svh, 520px); }
}
@media (prefers-reduced-motion: reduce) {
  .image-edit-scan { animation: none; display: none; }
}
