/* 1.0.320 — mobile pass for the direct second-photo workflows. */
@media (max-width: 768px) {
  /* Add person: the mobile flow mirrors desktop — photo, guidance, action. */
  #fotor-root .editor-shell.is-mobile .sg-add-person-page {
    display: flex !important;
    min-height: 0 !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  #fotor-root .editor-shell.is-mobile .sg-add-person-page > .ai-hair-top {
    flex: 0 1 auto !important;
    margin: 0 !important;
    padding: 11px !important;
    overflow-y: auto !important;
  }

  #fotor-root .editor-shell.is-mobile .sg-add-person-page .sg-add-person-reference {
    margin: 0 !important;
    padding: 11px !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 13px !important;
    background: rgba(255,255,255,.025) !important;
  }

  #fotor-root .editor-shell.is-mobile .sg-add-person-page .sg-add-person-reference .ai-refs-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 9px !important;
  }

  #fotor-root .editor-shell.is-mobile .sg-add-person-page .sg-add-person-reference .ai-refs-title {
    min-width: 0 !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

  #fotor-root .editor-shell.is-mobile .sg-add-person-page .sg-add-person-reference .ai-refs-btn {
    min-height: 34px !important;
    padding: 0 10px !important;
    border-radius: 10px !important;
    font-size: 10.5px !important;
    white-space: nowrap !important;
  }

  #fotor-root .editor-shell.is-mobile .sg-add-person-page .sg-add-person-reference__hint {
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(255,255,255,.055) !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
  }

  #fotor-root .editor-shell.is-mobile .sg-add-person-page .sg-add-person-reference .ai-refs-thumb {
    width: 64px !important;
    height: 64px !important;
    margin-top: 9px !important;
    border-radius: 10px !important;
  }

  #fotor-root .editor-shell.is-mobile .sg-add-person-page > .ai-hair-scroll,
  #fotor-root .editor-shell.is-mobile .sg-add-person-page > .sg-add-person-desktop-editor {
    display: none !important;
  }

  #fotor-root .editor-shell.is-mobile .sg-add-person-page > .ai-hair-footer {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 5 !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 9px 11px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    border-top: 1px solid rgba(255,255,255,.07) !important;
    background: rgba(9,12,17,.98) !important;
  }

  /* Disabled guidance is a real footer row, never a floating bubble. */
  #fotor-root .editor-shell.is-mobile .sg-add-person-page > .ai-hair-footer[data-sg-disabled-reason],
  #fotor-root .editor-shell.is-mobile .mobile-tool-content--swap .ai-hair-footer[data-sg-disabled-reason] {
    display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr) !important;
    grid-template-rows: auto 44px !important;
    gap: 6px 8px !important;
    overflow: visible !important;
  }

  #fotor-root .editor-shell.is-mobile .sg-add-person-page > .ai-hair-footer[data-sg-disabled-reason]::before,
  #fotor-root .editor-shell.is-mobile .mobile-tool-content--swap .ai-hair-footer[data-sg-disabled-reason]::before {
    position: static !important;
    content: attr(data-sg-disabled-reason) !important;
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: rgba(166,176,190,.78) !important;
    font-size: 10px !important;
    font-weight: 620 !important;
    line-height: 1.25 !important;
    text-align: left !important;
  }

  #fotor-root .editor-shell.is-mobile .sg-add-person-page > .ai-hair-footer > select {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 76px !important;
    min-width: 76px !important;
  }

  #fotor-root .editor-shell.is-mobile .sg-add-person-page > .ai-hair-footer > .ai-hair-run {
    grid-column: 2 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
  }

  /* Face swap: one flat scroll surface and compact, readable sections. */
  #fotor-root .editor-shell.is-mobile .mobile-tool-content--swap .sg-face-swap-upload-card {
    margin: 0 !important;
    padding: 0 0 9px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  #fotor-root .editor-shell.is-mobile .mobile-tool-content--swap .sg-face-swap-upload-card > div:nth-child(2) {
    min-height: 104px !important;
    height: 104px !important;
  }

  #fotor-root .editor-shell.is-mobile .mobile-tool-content--swap .sg-face-swap-upload-card > div:nth-child(2) > div {
    width: 100% !important;
    height: 100px !important;
    border-style: dashed !important;
    border-radius: 11px !important;
    background: rgba(0,0,0,.17) !important;
  }

  #fotor-root .editor-shell.is-mobile .mobile-tool-content--swap .sg-face-swap-quality {
    min-height: 34px !important;
    margin: 0 !important;
    padding: 8px 2px !important;
    border-width: 1px 0 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  #fotor-root .editor-shell.is-mobile .mobile-tool-content--swap .sg-face-swap-consent {
    margin: 0 !important;
    padding: 9px 2px !important;
    border-width: 1px 0 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
  }

  #fotor-root .editor-shell.is-mobile .mobile-tool-content--swap .sg-face-swap-consent::before,
  #fotor-root .editor-shell.is-mobile .mobile-tool-content--swap .sg-face-swap-consent::after {
    content: none !important;
    display: none !important;
  }

  #fotor-root .editor-shell.is-mobile .mobile-tool-content--swap .ai-hair-footer > .ai-hair-run {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
  }
}
