body.account-handoff-active #generator-main-grid {
  display: block !important;
  min-height: 0 !important;
  padding: 0 20px 24px !important;
}
body.account-handoff-active #generator-request-card > .section-heading,
body.account-handoff-active #generator-request-card::after,
body.account-handoff-active #status-idle-message {
  display: none !important;
}
body.account-handoff-active #generator-side-rail {
  display: block !important;
  width: 100% !important;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 !important;
}
body.account-handoff-active #generator-request-card,
body.account-handoff-active #generator-request-card #status-idle {
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
body.account-handoff-active #generator-status-card { display: none !important; }
.account-handoff {
  --handoff-green: #008951;
  color: #121d2b;
  padding: clamp(28px, 5vh, 60px) 0 12px;
  text-align: center;
}
.account-handoff svg { width: 24px; height: 24px; flex: 0 0 auto; }
.handoff-success {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 0 auto 22px;
  border: 10px solid #f0faf5;
  border-radius: 50%;
  background: linear-gradient(135deg, #d7f3e2, #bdebd1);
  color: #009b51;
}
.handoff-success svg { width: 47px; height: 47px; stroke-width: 3.5; }
.handoff-success i { position: absolute; width: 5px; height: 13px; border-radius: 5px; background: #55ce8b; }
.handoff-success i:nth-of-type(1) { left: -26px; top: 7px; transform: rotate(-42deg); }
.handoff-success i:nth-of-type(2) { right: -26px; top: 7px; transform: rotate(42deg); }
.handoff-success i:nth-of-type(3) { left: -26px; bottom: 7px; transform: rotate(42deg); }
.handoff-success i:nth-of-type(4) { right: -26px; bottom: 7px; transform: rotate(-42deg); }
.account-handoff h1 { width: 100%; max-width: none; margin: 0; font-size: clamp(26px, 7vw, 40px); font-weight: 750; line-height: 1.15; letter-spacing: -.8px; }
.account-handoff .handoff-intro { max-width: 580px; margin: 15px auto 28px; color: #73808c; font-size: clamp(15px, 3.8vw, 20px); line-height: 1.5; }
.handoff-steps { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; text-align: left; }
.handoff-steps li { position: relative; display: flex; align-items: center; gap: 12px; }
.handoff-steps li:not(:last-child)::after { content: ''; position: absolute; top: 50%; bottom: calc(-50% - 13px); left: 12px; border-left: 2px dashed #8ddab0; z-index: 0; }
.handoff-step-number { position: relative; z-index: 1; display: grid; place-items: center; flex: 0 0 27px; height: 27px; border-radius: 50%; background: linear-gradient(135deg,#59bf7a,#259953); color: white; font-size: 17px; font-weight: 650; }
.handoff-step-card { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 82px; padding: 13px 12px; border: 1px solid #e8efeb; border-radius: 16px; background: #fff; box-shadow: 0 12px 25px #153d2710; }
.handoff-step-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 50%; background: #eaf8f1; color: var(--handoff-green); }
.handoff-step-card h2 { margin: 0 0 3px; font-size: 17px; line-height: 1.25; font-weight: 700; letter-spacing: -.3px; }
.handoff-step-card p { margin: 0; color: #74808d; font-size: 12px; line-height: 1.4; }
.handoff-step-check { display: grid; place-items: center; flex: 0 0 24px; height: 24px; margin-left: auto; border-radius: 50%; background: #ddf6e7; color: #009b51; }
.handoff-step-check svg { width: 17px; height: 17px; stroke-width: 3; }
.account-handoff .handoff-account-link { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 58px; margin: 30px 0 25px; border-radius: 13px; background: linear-gradient(110deg,#258951,#68bd87); color: #fff; font-size: 20px; font-weight: 700; text-decoration: none; box-shadow: 0 12px 24px #16804d18; }
.handoff-divider { display: flex; align-items: center; gap: 10px; color: #74808d; font-size: 14px; }
.handoff-divider::before, .handoff-divider::after { content: ''; flex: 1; height: 1px; background: #d9dfe4; }
.handoff-actions { display: grid; grid-template-columns: 1fr 1fr; margin-top: 10px; }
.handoff-actions button { display: flex; justify-content: center; align-items: center; gap: 8px; min-width: 0; min-height: 44px; margin: 0; padding: 6px 4px; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--handoff-green); font: inherit; font-size: 14px; cursor: pointer; }
.handoff-actions button + button { border-left: 1px solid #d9dfe4; }
.handoff-actions button svg { width: 20px; height: 20px; }
.handoff-actions button:disabled { opacity: .55; cursor: default; }
.handoff-actions button:focus-visible, .handoff-account-link:focus-visible { outline: 2px solid #008951; outline-offset: 4px; border-radius: 8px; }
.account-handoff .handoff-feedback { min-height: 18px; margin: 8px 0 0; font-size: 12px; color: #526a5e; line-height: 1.4; }
@media (min-width: 861px) {
  body.account-handoff-active .form-card { display: none !important; }
  .handoff-step-card { padding: 20px; }
  .handoff-step-card h2 { font-size: 21px; }
  .handoff-step-card p { font-size: 16px; }
  .handoff-step-icon { flex-basis: 54px; height: 54px; }
}
@media (max-width: 360px) {
  body.account-handoff-active #generator-main-grid { padding-inline: 12px !important; }
  .handoff-step-card { gap: 8px; padding: 11px 8px; }
  .handoff-step-icon { flex-basis: 36px; height: 36px; }
  .handoff-step-check { display: none; }
  .handoff-actions button { font-size: 12px; gap: 5px; }
}

/* Center the confirmation in the space below the mobile header. */
@media (max-width: 860px), (max-width: 1024px) and (max-height: 450px) and (orientation: landscape) {
  body.account-handoff-active #generator-main-grid {
    display: flex !important; flex-direction: column; gap: 0;
    min-height: 100dvh !important; padding-bottom: env(safe-area-inset-bottom) !important;
    box-sizing: border-box;
  }
  body.account-handoff-active #generator-main-grid > .form-card { flex: 0 0 auto; }
  body.account-handoff-active #generator-main-grid > .form-card.mobile-form-stage-active {
    padding-bottom: 0 !important; margin-bottom: 0 !important; min-height: 0 !important;
  }
  body.account-handoff-active .form-card .mobile-brand-header { margin-bottom: 0 !important; }
  body.account-handoff-active #generator-side-rail {
    display: flex !important; flex: 1 0 auto; align-items: center; justify-content: center;
  }
  body.account-handoff-active #generator-request-card { width: 100%; }
  body.account-handoff-active .account-handoff { padding: 16px 0; }
  .account-handoff .handoff-feedback:empty { display: none; }
}
@media (max-width: 860px) and (max-height: 800px), (max-width: 1024px) and (max-height: 450px) and (orientation: landscape) {
  body.account-handoff-active .account-handoff { padding-block: 12px; }
  .account-handoff .handoff-success { width: 68px; height: 68px; border-width: 8px; margin-bottom: 14px; }
  .account-handoff .handoff-success svg { width: 36px; height: 36px; }
  .account-handoff h1 { font-size: 26px; }
  .account-handoff .handoff-intro { margin: 10px auto 18px; font-size: 14px; line-height: 1.4; }
  .account-handoff .handoff-steps { gap: 10px; }
  .account-handoff .handoff-step-card { min-height: 68px; padding: 9px 10px; }
  .account-handoff .handoff-step-card h2 { font-size: 16px; }
  .account-handoff .handoff-account-link { min-height: 48px; margin: 18px 0; font-size: 18px; }
  .account-handoff .handoff-actions { margin-top: 6px; }
}
@media (max-width: 860px) and (max-height: 650px), (max-width: 1024px) and (max-height: 450px) and (orientation: landscape) {
  body.account-handoff-active .account-handoff { padding-block: 10px; }
  .account-handoff .handoff-success { width: 50px; height: 50px; border-width: 6px; margin-bottom: 10px; }
  .account-handoff .handoff-success svg { width: 29px; height: 29px; }
  .account-handoff h1 { font-size: 23px; }
  .account-handoff .handoff-intro { margin: 8px auto 12px; font-size: 13px; }
  .account-handoff .handoff-step-card { min-height: 57px; padding: 7px 8px; }
  .account-handoff .handoff-step-icon { flex-basis: 32px; height: 32px; }
  .account-handoff .handoff-step-card h2 { font-size: 14px; }
  .account-handoff .handoff-step-card p { font-size: 11px; }
  .account-handoff .handoff-account-link { min-height: 44px; margin: 12px 0; }
  .account-handoff .handoff-divider { font-size: 12px; }
  .account-handoff .handoff-actions button { font-size: 12px; min-height: 40px; }
}
@media (max-width: 1024px) and (max-height: 450px) and (orientation: landscape) {
  body.account-handoff-active { --mobile-canvas: 100vw; }
  .account-handoff { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; align-items: center; }
  .account-handoff .handoff-success { grid-column: 1; grid-row: 1; width: 38px; height: 38px; margin-bottom: 6px; }
  .account-handoff h1 { grid-column: 1; grid-row: 2; font-size: 22px; }
  .account-handoff .handoff-intro { grid-column: 1; grid-row: 3; margin-block: 6px; font-size: 12px; }
  .account-handoff .handoff-steps { grid-column: 2; grid-row: 1 / 5; gap: 7px; }
  .account-handoff .handoff-account-link { grid-column: 1; grid-row: 4; margin: 6px 0; }
  .account-handoff .handoff-divider { grid-column: 1 / -1; margin-top: 8px; }
  .account-handoff .handoff-actions { grid-column: 1 / -1; margin: 0; }
  .account-handoff .handoff-feedback { grid-column: 1 / -1; margin-top: 0; }
}

@media (max-width: 1024px) and (max-height: 350px) and (orientation: landscape) {
  body.account-handoff-active .account-handoff { padding-block: 6px; column-gap: 14px; }
  .account-handoff .handoff-success { width: 30px; height: 30px; margin-bottom: 4px; }
  .account-handoff .handoff-success svg { width: 22px; height: 22px; }
  .account-handoff h1 { font-size: 20px; }
  .account-handoff .handoff-intro { font-size: 11px; line-height: 1.35; }
  .account-handoff .handoff-steps { gap: 6px; }
  .account-handoff .handoff-steps li { gap: 8px; }
  .account-handoff .handoff-step-number { flex-basis: 23px; height: 23px; font-size: 14px; }
  .account-handoff .handoff-step-card { min-height: 53px; padding: 6px 8px; gap: 8px; }
  .account-handoff .handoff-step-icon { flex-basis: 28px; height: 28px; }
  .account-handoff .handoff-step-check { display: none; }
  .account-handoff .handoff-account-link { min-height: 40px; }
  .account-handoff .handoff-divider { margin-top: 0; }
  .account-handoff .handoff-steps li:not(:last-child)::after { left: 10px; }
}

/* Wide phones still use the compact confirmation when rotated. */
@media (min-width: 861px) and (max-width: 1024px) and (max-height: 450px) {
  body.account-handoff-active { zoom: 1; }
  body.account-handoff-active .page-shell { width: 100%; max-width: none; min-height: 100dvh; padding: 0; gap: 0; }
  body.account-handoff-active .top-nav { flex: 0 0 auto; margin: 0; }
  body.account-handoff-active .site-footer { display: none; }
  body.account-handoff-active #generator-main-grid { flex: 1 0 auto; min-height: 0 !important; height: auto !important; border: 0; }
  body.account-handoff-active #generator-side-rail { min-height: 0 !important; height: auto; border: 0; }
}
