/* Both step-2 forms share these siblings; switching forms never moves the header. */
.gift-preview-footer-copy { display: none !important; }
@media (max-width: 860px) {
  body.gift-preview-active #generator-request-card { padding-bottom: 100px; }
  body.gift-preview-active :is(#generator-request-card .status-prestart, .gift-preview-controls) .prestart-actions { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; width: 100%; max-width: none; margin: 0; transform: none; }
  body.gift-preview-active :is(#generator-request-card .status-prestart, .gift-preview-controls) #prestart-edit-back { display: inline-flex !important; align-items: center; justify-content: center; gap: 5px; }
  body.gift-preview-active #generator-side-rail { padding-top: 8px; }
  body.gift-preview-active #generator-request-card > .section-heading { display: none !important; }
  body.gift-preview-active.mobile-process-panel-only #generator-side-rail > .gift-mobile-progress { display: grid !important; margin: 0 8px 12px; }
  body.gift-preview-active :is(#generator-request-card .status-prestart, .gift-preview-controls) .prestart-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fffffff5; border-top: 1px solid #f3f0ef; box-shadow: 0 -5px 20px #5c382208; }
  body.gift-preview-active .gift-preview-footer-copy { display: flex !important; flex: 1; }
  body.gift-preview-active :is(#generator-request-card .status-prestart, .gift-preview-controls) .prestart-actions .prestart-edit-back { flex: 0 0 auto; width: auto; min-width: 0; min-height: 42px; height: 42px; margin: 0; padding: 0 12px; border: 1px solid #ece8e5; border-radius: 10px; color: #14213b; background: #fff; font: inherit; font-size: 12px; font-weight: 600; gap: 7px; box-shadow: none; }
  body.gift-preview-active :is(#generator-request-card .status-prestart, .gift-preview-controls) .prestart-cta { flex: 0 0 auto; width: auto; margin: 0; }
  body.gift-preview-active :is(#generator-request-card .status-prestart, .gift-preview-controls) .status-start-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; height: 42px; min-width: 101px; padding: 0 12px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(125deg, #f56d18, #d75100); font: inherit; font-size: 12px; font-weight: 600; box-shadow: none; }
  body.gift-preview-active .gift-preview-controls .status-start-rocket { display: none; }
  body.gift-preview-active .gift-preview-controls #status-start::after { content: "→"; -webkit-mask: none; mask: none; background: none; color: inherit; width: auto; height: auto; font-size: 17px; }
  body.gift-preview-active .prestart-action-note { display: none; }
  body.gift-preview-active .prestart-actions > .payment-terms-acceptance,
  body.gift-preview-active .prestart-actions > .payment-terms-error { flex-basis: 100%; }
}
body.gift-generator-active .gift-details-step > .section-heading { display: none !important; }
body:is(.gift-generator-active, .general-mobile-progress-active) :is(#song-form, #generator-side-rail) > .gift-mobile-progress,
body.gift-generator-active #song-form > .gift-lyrics-choices { position: relative; z-index: 1; align-self: start; }
body.gift-generator-active #song-form > .gift-lyrics-choices { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 128px)); justify-content: center; gap: 10px; margin: 6px 0; font-family: var(--font-ui); }
body.gift-generator-active #song-form > .gift-lyrics-choices button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 6px 10px; border: 1px solid #dfe4ec; border-radius: 999px; background: #fff; color: #101735; box-shadow: none; font-size: 12px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
body.gift-generator-active #song-form > .gift-lyrics-choices button[aria-pressed="true"] { border-color: #e95a00; background: linear-gradient(120deg, #fd6e14, #d05000); color: #fff; }
body.gift-generator-active #song-form > .gift-lyrics-choices button svg { width: 17px; height: 17px; flex: 0 0 17px; }
body.gift-generator-active #song-form > #wizard-progress { display: none !important; }
body:is(.gift-generator-active, .general-mobile-progress-active) :is(#song-form, #generator-side-rail) > .gift-mobile-progress { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; min-width: 0; padding: 5px 5px 0; margin: 0; border: 1px solid #f0ece8; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px #573e2f10; color: #101735; font-family: var(--font-ui); }
body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-step { display: flex; align-items: center; min-width: 0; gap: 7px; padding: 3px 3px 6px; border-bottom: 2px solid transparent; }
body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-step.is-current { border-bottom-color: #f05b00; }
body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-number { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border: 1px solid #d7dfec; border-radius: 50%; color: #152040; font-size: 13px; font-weight: 650; }
body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-step.is-current .gift-progress-number,
body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-step.is-complete .gift-progress-number { background: linear-gradient(135deg, #e4722e, #cd4e00); color: #fff; border-color: #e05e10; }
body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-step > span:last-child { min-width: 0; }
body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-step strong { display: block; font-size: 11px; font-weight: 700; letter-spacing: -.3px; line-height: 1.2; }
body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-step small { display: block; margin-top: 3px; color: #5b6b8c; font-size: 10px; line-height: 1.1; }
body.gift-generator-active .gift-details-step #advanced-fields,
body.gift-generator-active .gift-details-step #wizard-step-lyrics { overflow-anchor: none; }
@media (max-width: 860px) {
  body.gift-generator-active .form-card.gift-details-step #song-form { width: 100vw; max-width: none; margin-inline: calc(50% - 50vw); padding-inline: 12px; row-gap: 10px; }
}
@media (min-width: 861px) {
  body.gift-generator-active .gift-details-step #song-form #advanced-fields { margin-top: 0; }
  body.gift-generator-active #generator-main-grid > .form-card.gift-details-step:not(.generator-intro-active) { grid-template-rows: max-content minmax(0, 1fr) max-content; }
  body.gift-generator-active .gift-details-step #song-form #post-lyrics-fields,
  body.gift-generator-active .gift-details-step #song-form #wizard-step-lyrics { grid-row: 2; padding-top: 24px; }
  body.gift-generator-active .gift-details-step #song-form .wizard-footer { grid-row: 3; }
  body:is(.gift-generator-active, .general-mobile-progress-active) :is(#song-form, #generator-side-rail) > .gift-mobile-progress { grid-column: 1; grid-row: 1; margin: 20px 32px 0; padding: 12px 16px 0; }
  body.gift-generator-active #song-form > .gift-lyrics-choices { grid-column: 1; grid-row: 2; margin: 24px 32px; }
  body.gift-generator-active #song-form > .gift-lyrics-choices { grid-template-columns: repeat(2, minmax(0, 160px)); gap: 16px; }
  body.gift-generator-active #song-form > .gift-lyrics-choices button { min-height: 38px; font-size: 13px; }
  body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-step { gap: 12px; padding: 8px 8px 14px; }
  body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-step strong { font-size: 16px; }
  body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-step small { font-size: 13px; }
  body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-number { width: 34px; height: 34px; flex-basis: 34px; font-size: 17px; }
}
@media (max-width: 359px) {
  body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-step { gap: 4px; }
  body:is(.gift-generator-active, .general-mobile-progress-active) .gift-progress-number { width: 22px; height: 22px; flex-basis: 22px; }
}

@media (min-width: 861px) {
  body.gift-generator-active :is(#song-form, #generator-side-rail) > .gift-mobile-progress { margin: 12px 20px 0; padding: 5px 8px 0; }
  body.gift-generator-active .gift-progress-step { gap: 8px; padding: 5px 6px 8px; }
  body.gift-generator-active .gift-progress-step strong { font-size: 13px; }
  body.gift-generator-active .gift-progress-step small { margin-top: 2px; font-size: 11px; }
  body.gift-generator-active .gift-progress-number { width: 26px; height: 26px; flex-basis: 26px; font-size: 14px; }
  body.gift-generator-active #song-form > .gift-lyrics-choices { margin: 10px 20px; }
}

@media (max-width: 860px) {
  body.general-mobile-progress-active #song-form > #wizard-progress { display: none !important; }
  body.gift-preview-active .gift-preview-footer-copy { align-items: center; gap: 6px; min-width: 0; color: #101735; }
}

/* Keep a single clearance for the fixed preview actions. */
@media (max-width: 860px) {
  body.gift-preview-active main { padding-bottom: 0 !important; }
  body.gift-preview-active #generator-side-rail { padding-bottom: calc(71px + env(safe-area-inset-bottom)) !important; }
  body.gift-preview-active #generator-side-rail #generator-request-card { padding-bottom: 0 !important; }
}

@media (max-width: 860px) {
  body.gift-preview-active #generator-main-grid > .form-card.mobile-form-stage-active { padding-bottom: 0 !important; }
  body.gift-preview-active #generator-side-rail { padding-top: 8px !important; }
}

/* One mobile footer reserve for both creation flows; no empty form rows. */
@media (max-width: 860px) {
  body:is(.gift-generator-active, .general-combined-active):not(.gift-preview-active, .account-handoff-active) #generator-main-grid > .form-card.mobile-form-stage-active {
    padding-bottom: calc(71px + env(safe-area-inset-bottom)) !important;
  }
  body:is(.gift-generator-active, .general-combined-active) .form-card.mobile-form-stage-active #song-form {
    min-height: 0 !important;
    padding-bottom: 0 !important;
  }
  body:is(.gift-generator-active, .general-combined-active) #song-form > #post-lyrics-fields:not(:has(> :not(.hidden))) { display: none !important; }
}
