/* Responsive layout for the same upload → payment → result flow. */
@media (min-width: 1440px) {
  .home-main { grid-template-columns: 1fr 520px; max-width: 1280px; gap: 32px 120px; }
  .hero-comparison { height: min(640px, calc(100svh - 208px)); }
}
@media (max-width: 1024px) and (min-width: 761px) {
  .home-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 40px; padding: 24px 40px 40px; }
  .home h1 { font-size: clamp(36px, 4.5vw, 48px); }
  .site-header { padding: 0 40px; }
  .editor-grid { grid-template-columns: minmax(0, 1fr) 296px; gap: 24px; padding: 8px 24px 24px; }
  .edit-panel { padding: 24px 20px; }
  .panel-heading h1 { font-size: 28px; }
}
@media (max-width: 760px) {
  .home { min-height: 100svh; }
  .site-header { height: 76px; padding: 0 24px; flex-shrink: 0; }
  .brand { font-size: 22px; letter-spacing: -.9px; gap: 8px; }
  .brand-mark { width: 28px; height: 32px; }
  .site-header .about-button { width: 44px; height: 44px; border: 0; background: transparent; margin-right: -8px; }
  .home-main { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'visual' 'actions'; grid-template-rows: auto auto auto; gap: 20px; padding: 12px 24px 16px; margin: 0 auto; max-width: 520px; }
  .home-copy { align-self: auto; }
  .eyebrow { display: none; }
  .home h1 { font-size: clamp(30px, 8.2vw, 40px); letter-spacing: -1.4px; line-height: 1.12; max-width: none; }
  .home h1 br { display: none; }
  .intro { margin-top: 8px; font-size: 13px; line-height: 1.6; max-width: none; }
  .home-visual { padding: 4px; border-radius: 24px; box-shadow: 0 12px 28px -16px #10271f42, 0 1px 4px #10271f0a; }
  .hero-comparison { height: clamp(260px, calc(100svh - 384px), 560px); min-height: 0; border-radius: 20px; }
  .hero-analysis { left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; border-radius: 12px; }
  .photo-labels { top: 12px; left: 12px; right: 12px; }
  .photo-labels span { font-size: 10px; padding: 8px 12px; }
  .home-actions { max-width: none; }
  .upload-button { min-height: 56px; font-size: 15px; }
  .formats { font-size: 11px; margin-top: 12px; }
  .home-note { font-size: 10px; margin: 16px auto 0; max-width: none; text-align: center; line-height: 1.6; }
  .site-footer { display: none; }
  .editor-header { height: 64px; padding: 0 16px; grid-template-columns: 44px 1fr 44px; gap: 8px; }
  .editor-title { font-size: 15px; text-align: center; }
  .editor-grid { display: flex; flex-direction: column; gap: 0; padding: 0; min-height: calc(100svh - 64px); max-width: 520px; align-items: stretch; }
  .workspace { height: calc(100svh - 364px); min-height: 280px; max-height: 740px; border: 0; border-radius: 24px 24px 0 0; box-shadow: none; padding-bottom: 20px; flex-shrink: 0; }
  .photo-stage { padding: 16px 16px 4px; }
  .editor-comparison { border-radius: 16px; }
  .editor.has-result .workspace { height: calc(100svh - 276px); }
  .compare-hint { padding: 0 16px 12px; font-size: 10px; }
  .edit-panel { position: relative; z-index: 5; margin-top: -20px; border: 0; border-top: 1px solid #fff; border-radius: 28px 28px 0 0; padding: 24px 24px max(20px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); box-shadow: 0 -8px 24px #071a1c0c; background: #fbfcfb; flex: 1; }
  .panel-heading h1 { font-size: 24px; line-height: 1.2; letter-spacing: -.8px; }
  .panel-heading h1 br { display: none; }
  .panel-kicker { display: none; }
  .panel-heading>p:last-child { font-size: 12px; line-height: 1.5; margin-top: 6px; }
  .purchase-summary { padding: 16px 0; margin: 0; border-bottom: 0; }
  .purchase-summary strong { font-size: 12px; }
  .purchase-summary small { font-size: 10px; }
  .purchase-icon { height: 36px; width: 36px; border-radius: 10px; }
  .purchase-icon svg { width: 18px; height: 18px; }
  .panel-actions, .has-result .panel-actions { margin-top: 0; }
  .has-result .panel-heading { margin-bottom: 20px; }
  .panel-actions>.button { min-height: 52px; font-size: 14px; }
  .replace-link { font-size: 12px; min-height: 44px; margin-top: 4px; }
  .availability-note, .result-note { margin-top: 0; font-size: 10px; }
  .payment-status { margin: 0 0 16px; font-size: 12px; }
  .preparation-state { margin-top: 24px; padding-bottom: 12px; }
  dialog { position: fixed; top: auto; bottom: 0; margin: 0; width: 100%; max-width: none; max-height: calc(100svh - 32px); padding: 24px 24px max(24px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); border-radius: 28px 28px 0 0; border-bottom: 0; }
  .export-visual { height: min(32svh, 280px); }
  .export-options { margin-top: 16px; }
}
@media (max-width: 360px) {
  .site-header { padding: 0 20px; height: 68px; }
  .home-main { padding: 8px 20px 16px; gap: 16px; }
  .brand { font-size: 20px; }
  .home h1 { font-size: 28px; letter-spacing: -1px; }
  .intro { font-size: 12px; }
  .edit-panel { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 760px) and (max-height: 740px) {
  .site-header { height: 64px; }
  .home-main { padding-top: 4px; gap: 16px; }
  .hero-comparison { height: max(244px, calc(100svh - 344px)); }
  .home-note { margin-top: 12px; }
}
.platform-android { --touch: 48px; }
.platform-android .button { min-height: 56px; }
.platform-ios { font-family: -apple-system, BlinkMacSystemFont, Manrope, sans-serif; }
.platform-ios .brand { font-family: Manrope, sans-serif; }
