/* The same desktop frame used by the storefront. */
@media (min-width: 960px) {
  html[data-cj-store-frame] {
    --cj-width: min(1160px, calc(100% - 112px));
  }

  html[data-cj-store-frame] .contact-postcards {
    width: var(--cj-width);
  }

  @layer utilities {
    html[data-cj-store-frame] :is(.v37-early, .uii-site-header) .uii-site-header-inner,
    html[data-cj-store-frame] .v37-early .v54-frame,
    html[data-cj-store-frame] .v37-early .site-footer .wrap,
    html[data-cj-store-frame] :is(.lookup-main, .v56-blog),
    html[data-cj-store-frame] .uii-business-main > :is([class~="max-w-[860px]"], [class~="max-w-[1180px]"]) {
      width: var(--cj-width) !important;
      max-width: 1160px !important;
    }

    html[data-cj-store-frame] .uii-site-header-inner {
      --cj-header-room: 0px;
    }

    /* Keep a comfortable measure inside the full-width tutorial card. */
    html[data-cj-store-frame][data-chejiu-business="blog"] article > .bg-card > :is(header, .prose, footer) {
      max-width: 820px !important;
      margin-inline: auto !important;
    }
  }
}

@media (min-width: 960px) and (max-width: 1000px) {
  html[data-cj-store-frame] {
    --cj-width: calc(100% - 64px);
  }
}

@layer utilities {
  @media (min-width: 1280px) {
    html[data-cj-store-frame][data-cj-shared-header] .cj-family-nav[data-claude-nav] .cj-family-link {
      width: 96px !important;
      padding-inline: 4px !important;
      gap: 5px !important;
      font-size: 13px !important;
    }

    html[data-cj-store-frame][data-cj-shared-header] .cj-family-nav[data-claude-nav] .cj-family-link > img {
      width: 17px !important;
      height: 17px !important;
    }
  }
}
/* Auth pages share the storefront frame while their forms remain centered. */
@layer utilities {
  @media (min-width: 960px) {
    html:is([data-cj-store-frame="login"], [data-cj-store-frame="register"]) .uii-business-main,
    html[data-cj-store-frame="register"] .uii-business-footer {
      box-sizing: border-box !important;
      width: var(--cj-width) !important;
      max-width: 1160px !important;
      margin-inline: auto !important;
    }

    html[data-cj-store-frame="register"] .uii-business-footer > [class~="max-w-[1180px]"] {
      width: 100% !important;
      max-width: none !important;
      padding-inline: 0 !important;
    }
  }
}
