/* A local modal-like card: native page scrolling stays in control. */
@media (max-width: 1100px) {
  #creation.creation-motion-enabled .handoff-demo-views {
    container: handoff-accounts-space / size;
  }
  #creation.creation-motion-enabled .handoff-demo-views::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgb(28 37 31 / 24%);
    opacity: var(--handoff-accounts-opacity, 0);
    pointer-events: none;
  }
  #creation.creation-motion-enabled .handoff-accounts {
    top: 50%;
    left: 50%;
    width: calc(100% - 24px);
    max-width: 480px;
    min-height: 0;
    height: auto;
    padding: 0;
    z-index: 2;
    border: 1px solid #e3e3db;
    border-radius: 14px;
    background: #fffefc;
    box-shadow: 0 8px 26px rgb(28 37 31 / 14%);
    transform-origin: center;
    will-change: opacity, transform;
  }
  #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading {
    padding: 14px;
    min-height: 0;
    flex-wrap: nowrap;
    gap: 8px;
  }
  #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading h3 {
    font-size: 16px;
    line-height: 1.4;
    word-break: keep-all;
  }
  #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading p {
    font-size: 12px;
    line-height: 1.5;
    word-break: keep-all;
  }
  #creation.creation-motion-enabled .handoff-accounts .handoff-demo-badge {
    font-size: 10px;
    padding: 5px 6px;
  }
  #creation.creation-motion-enabled .handoff-accounts-content {
    flex: none;
    justify-content: flex-start;
    padding: 2px 14px 14px;
  }
  #creation.creation-motion-enabled .handoff-accounts .handoff-account-list li {
    padding: 12px 0;
    gap: 12px;
  }
  #creation.creation-motion-enabled .handoff-accounts .handoff-account-list strong {
    font-size: 14px;
  }
  #creation.creation-motion-enabled .handoff-accounts .handoff-account-list li > div > span {
    font-size: 12px;
    line-height: 1.5;
    color: #73766b;
    word-break: keep-all;
  }
  #creation.creation-motion-enabled .handoff-accounts .handoff-ownership {
    margin: 6px 0 0;
    padding-top: 12px;
  }
  #creation.creation-motion-enabled .handoff-accounts .handoff-ownership strong {
    font-size: 13px;
    line-height: 1.5;
    word-break: keep-all;
  }
  #creation.creation-motion-enabled .handoff-accounts .handoff-ownership > span {
    font-size: 12px;
    line-height: 1.6;
    color: #73766b;
  }
  /* Short portrait canvases keep every service and the ownership note in view. */
  @container handoff-accounts-space (max-height: 360px) {
    #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading { padding: 10px 12px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading h3 { font-size: 15px; }
    #creation.creation-motion-enabled .handoff-accounts-content { padding: 0 12px 10px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-list li { padding: 8px 0; gap: 9px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-ownership { margin-top: 3px; padding-top: 8px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-ownership strong { font-size: 12px; }
  }
  @container handoff-accounts-space (max-width: 559px) and (max-height: 280px) {
    #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading { padding: 5px 10px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading h3 { font-size: 14px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading p { font-size: 11px; line-height: 1.4; }
    #creation.creation-motion-enabled .handoff-accounts-content { padding: 0 10px 6px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-list li { padding: 1px 0; gap: 8px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-list strong { font-size: 13px; line-height: 1.2; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-list li > div > span { font-size: 11px; line-height: 1.4; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-ownership { margin-top: 2px; padding-top: 5px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-ownership strong { font-size: 11px; line-height: 1.4; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-ownership > span { font-size: 11px; line-height: 1.4; }
  }
  /* Landscape uses two columns instead of an inner scroll area or scaled text. */
  @container handoff-accounts-space (min-width: 560px) and (max-height: 380px) {
    #creation.creation-motion-enabled .handoff-accounts {
      display: grid;
      grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
      gap: 6px 18px;
      max-width: 740px;
      padding: 12px 16px;
    }
    #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading {
      grid-area: 1 / 1;
      padding: 0;
      border: 0;
      background: none;
      flex-wrap: wrap;
      align-content: start;
      align-items: start;
      gap: 4px;
    }
    #creation.creation-motion-enabled .handoff-accounts-content { display: contents; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-list { grid-area: 1 / 2 / 3 / 3; align-self: center; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-list li { padding: 5px 0; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-list strong { font-size: 13px; line-height: 1.3; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-list li > div > span { font-size: 11px; line-height: 1.4; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-ownership { grid-area: 2 / 1; margin: 0; padding-top: 6px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-ownership strong { font-size: 12px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-ownership > span { font-size: 11px; line-height: 1.5; }
  }
  /* Very short landscape screens give each service its own compact column. */
  @container handoff-accounts-space (min-width: 480px) and (max-height: 170px) {
    #creation.creation-motion-enabled .handoff-accounts {
      display: flex;
      flex-direction: column;
      gap: 4px;
      width: calc(100% - 12px);
      max-width: 740px;
      padding: 4px 8px;
    }
    #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading { padding: 0; border: 0; gap: 6px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading > div { display: flex; align-items: baseline; gap: 8px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading h3 { font-size: 13px; line-height: 1.3; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-demo-heading p { font-size: 10px; line-height: 1.3; margin: 0; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-demo-badge { font-size: 9px; padding: 2px 4px; }
    #creation.creation-motion-enabled .handoff-accounts-content { display: contents; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-self: stretch; gap: 10px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-list li { display: block; border: 0; padding: 0; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-mark { display: none; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-list strong { font-size: 12px; line-height: 1.3; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-account-list li > div > span { font-size: 10px; line-height: 1.3; margin-top: 1px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-ownership { display: flex; gap: 8px; margin: 0; padding-top: 4px; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-ownership strong { flex: 0 0 42%; font-size: 10px; line-height: 1.3; }
    #creation.creation-motion-enabled .handoff-accounts .handoff-ownership > span { font-size: 10px; line-height: 1.3; margin: 0; }
  }
}
