/* OCTORANK_MOBILE_DISPLAY_V52_20260620
   Responsive layout only. No routes, form names, submit behavior, page state,
   media ownership, category-slot logic, backgrounds, publishing, or analytics. */

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  img,
  video,
  canvas,
  iframe,
  svg {
    max-width: 100%;
  }

  /* Shared mobile header used by the create workflow and account pages. */
  .octo-topbar {
    min-height: 0 !important;
    padding: .45rem .65rem !important;
    font-size: .72rem !important;
    line-height: 1.25 !important;
    text-align: center !important;
    white-space: normal !important;
  }

  .octo-nav-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: .55rem .7rem !important;
    gap: .55rem !important;
  }

  .octo-brand {
    flex: 0 1 128px !important;
    min-width: 0 !important;
  }

  .octo-brand img {
    width: 100% !important;
    max-width: 128px !important;
    max-height: 42px !important;
    object-fit: contain !important;
  }

  .octo-main-nav,
  .octo-nav-actions {
    min-width: 0 !important;
    gap: .35rem !important;
  }

  .octo-nav-left,
  .octo-hide-small {
    display: none !important;
  }

  .octo-dropdown > summary,
  .octo-menu-dropdown > summary,
  .octo-login-dropdown > summary {
    min-height: 40px !important;
    padding: .48rem .62rem !important;
    font-size: .8rem !important;
    white-space: nowrap !important;
  }

  .octo-dropdown-panel,
  .octo-dropdown-panel-right {
    left: auto !important;
    right: 0 !important;
    width: min(280px, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
  }

  /* Dashboard: compact readable cards and horizontal navigation without page overflow. */
  body > main:has(.unified-dashboard-shell),
  body > main:has(.create-page.editor-builder-shell) {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .unified-dashboard-shell {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 8px 8px calc(44px + env(safe-area-inset-bottom)) !important;
    overflow-x: clip !important;
  }

  .unified-dashboard-top,
  .unified-dashboard-main,
  .unified-dashboard-nav {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .unified-dashboard-top {
    gap: 10px !important;
    margin-bottom: 6px !important;
  }

  .unified-dashboard-top h1 {
    max-width: 100% !important;
    font-size: clamp(1.75rem, 8.5vw, 2.25rem) !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere !important;
  }

  .unified-subtitle,
  .unified-section-head p {
    font-size: .88rem !important;
    line-height: 1.45 !important;
  }

  .unified-account-card {
    width: 100% !important;
    min-width: 0 !important;
    padding: 9px 10px !important;
    text-align: left !important;
    overflow-wrap: anywhere !important;
  }

  .unified-dashboard-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 80 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 8px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    scroll-snap-type: x proximity !important;
    scrollbar-width: thin !important;
  }

  .unified-dashboard-nav a {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    min-height: 40px !important;
    padding: .52rem .72rem !important;
    scroll-snap-align: start !important;
  }

  .unified-section {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-top: 10px !important;
    padding: 10px !important;
    overflow: visible !important;
  }

  .unified-section-head {
    gap: 9px !important;
    margin-bottom: 10px !important;
  }

  .unified-section-head h2 {
    font-size: clamp(1.25rem, 6.4vw, 1.7rem) !important;
    line-height: 1.12 !important;
    overflow-wrap: anywhere !important;
  }

  .unified-section-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 7px !important;
  }

  .unified-section-actions .unified-btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
  }

  .unified-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .unified-info-grid,
  .unified-metrics-grid-small {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .unified-metric-card,
  .unified-panel {
    min-width: 0 !important;
    padding: 10px !important;
  }

  .unified-metric-card strong {
    font-size: 1.45rem !important;
  }

  .unified-page-list,
  .unified-page-row,
  .unified-page-main,
  .unified-page-meta {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .unified-page-row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  .unified-page-main strong,
  .unified-page-main small {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .unified-page-meta {
    justify-content: flex-start !important;
  }

  .unified-live-url {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 6px !important;
  }

  .unified-live-url input {
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
  }

  .unified-live-url .copy-url-btn,
  .unified-live-url button {
    width: auto !important;
    min-width: 88px !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 .65rem !important;
  }

  .unified-actions-menu {
    width: 100% !important;
    min-width: 0 !important;
    justify-self: stretch !important;
  }

  .unified-actions-menu summary {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    justify-content: center !important;
  }

  .unified-actions-list {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-top: 6px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    box-shadow: none !important;
  }

  .unified-actions-list form {
    width: 100% !important;
    min-width: 0 !important;
  }

  .unified-actions-list a,
  .unified-actions-list button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 .45rem !important;
  }

  .unified-product-grid,
  .unified-product-grid-wide,
  .unified-details-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .unified-product-form,
  .unified-product-row,
  .unified-product-lower,
  .unified-sharing-dropdown {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .unified-product-lower {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .unified-sharing-options {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 5px !important;
    box-shadow: none !important;
  }

  /* Fixed category slots stay in one usable horizontal row on phones. */
  .fixed-category-dashboard-head {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .fixed-category-dashboard-plan {
    width: 100% !important;
    min-width: 0 !important;
  }

  .fixed-category-menu-line {
    grid-template-columns: 40px minmax(0, 1fr) 40px !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .fixed-category-scroll {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: auto !important;
    min-height: 44px !important;
    padding: 0 !important;
  }

  .fixed-category-tabbar {
    width: 100% !important;
    min-width: 0 !important;
    padding-bottom: 6px !important;
    overscroll-behavior-x: contain !important;
    scroll-snap-type: x mandatory !important;
  }

  .fixed-category-tab {
    flex: 0 0 148px !important;
    width: 148px !important;
    min-width: 148px !important;
    max-width: 148px !important;
    min-height: 58px !important;
    padding: 8px 9px !important;
    scroll-snap-align: start !important;
  }

  .fixed-category-panel,
  .fixed-category-panel-main,
  .fixed-category-panel-copy,
  .fixed-category-panel-actions {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .fixed-category-panel-main {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  .fixed-category-count-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  .fixed-category-panel-actions .unified-btn {
    width: 100% !important;
    min-height: 42px !important;
  }

  /* Create workflow: preserve the staged flow while making every visible step fit a phone. */
  body.octo-create-stage-active .create-page.editor-builder-shell {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 8px calc(88px + env(safe-area-inset-bottom)) !important;
    overflow-x: clip !important;
  }

  body.octo-create-stage-active .create-page .app-container.editor-builder {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
  }

  body.octo-create-stage-active .create-header.editor-builder-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 9px !important;
    padding: 10px !important;
  }

  body.octo-create-stage-active .create-header h1 {
    font-size: clamp(1.45rem, 7.5vw, 1.9rem) !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere !important;
  }

  body.octo-create-stage-active .create-header p {
    font-size: .84rem !important;
    line-height: 1.4 !important;
  }

  body.octo-create-stage-active .create-header-actions,
  body.octo-create-stage-active .create-header-actions .button {
    width: 100% !important;
    min-width: 0 !important;
  }

  .octo-create-stage-shell {
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 8px !important;
  }

  .octo-create-stage-title,
  .octo-create-stage-meta {
    white-space: normal !important;
  }

  .octo-create-stage-track {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    scroll-snap-type: x proximity !important;
  }

  .octo-create-stage-pill {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    min-height: 40px !important;
    padding: 0 .72rem !important;
    scroll-snap-align: start !important;
  }

  body.octo-create-stage-active .landing-editor-shell,
  body.octo-create-stage-active .landing-editor-grid,
  body.octo-create-stage-active .landing-editor-main,
  body.octo-create-stage-active .create-step-card.octo-stage-visible {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.octo-create-stage-active .landing-editor-shell {
    padding: 6px !important;
  }

  body.octo-create-stage-active .create-step-card.octo-stage-visible {
    padding: 8px 8px 76px !important;
  }

  body.octo-create-stage-active .editor-section-header.create-step-header {
    grid-template-columns: 32px minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  body.octo-create-stage-active .create-step-title {
    font-size: clamp(1.05rem, 5.5vw, 1.35rem) !important;
    overflow-wrap: anywhere !important;
  }

  body.octo-create-stage-active .create-step-help {
    font-size: .8rem !important;
    line-height: 1.4 !important;
  }

  body.octo-create-stage-active .editor-field-grid,
  body.octo-create-stage-active .clean-form-grid,
  body.octo-create-stage-active .octo-stage3-url-image-panel {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.octo-create-stage-active .form-row,
  body.octo-create-stage-active .review-organizer-box,
  body.octo-create-stage-active .octo-final-category-panel,
  body.octo-create-stage-active .background-builder-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 8px !important;
  }

  body.octo-create-stage-active input,
  body.octo-create-stage-active textarea,
  body.octo-create-stage-active select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 16px !important;
  }

  body.octo-create-stage-active #raw_full_page_content {
    min-height: 180px !important;
  }

  body.octo-create-stage-active #raw_reviews_bulk {
    min-height: 130px !important;
  }

  body.octo-create-stage-active .octo-stage3-url-actions,
  body.octo-create-stage-active .editor-actions-row,
  body.octo-create-stage-active .create-step-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    justify-content: stretch !important;
  }

  body.octo-create-stage-active .octo-stage3-url-actions > *,
  body.octo-create-stage-active .editor-actions-row > *,
  body.octo-create-stage-active .create-step-actions > * {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.octo-create-stage-active .background-builder-grid,
  body.octo-create-stage-active .octo-extracted-top12-grid,
  body.octo-create-stage-active .editor-image-grid:not(.octo-extracted-top12-grid),
  body.octo-create-stage-active #extractedImagesGrid,
  body.octo-create-stage-active .extracted-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body.octo-create-stage-active .background-choice-card,
  body.octo-create-stage-active .extracted-image-card,
  body.octo-create-stage-active .editor-image-thumb {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.octo-create-stage-active .background-choice-card img,
  body.octo-create-stage-active #backgroundBuilderPreviewImg,
  body.octo-create-stage-active .extracted-image-card img,
  body.octo-create-stage-active .editor-image-thumb img,
  body.octo-create-stage-active .editor-image-thumb video {
    width: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
  }

  .octo-create-nav-footer {
    left: 8px !important;
    right: 8px !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    min-width: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding: 7px !important;
  }

  .octo-create-nav-footer > *,
  .octo-create-nav-footer button,
  .octo-create-nav-footer .button,
  .octo-create-nav-footer input[type="submit"] {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 42px !important;
    padding: .5rem .45rem !important;
    font-size: .8rem !important;
    white-space: normal !important;
  }

  /* Generated preview and live pages. */
  body.or-shop-body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-bottom: calc(82px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
  }

  .or-shop-preview-actions {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 7px 8px !important;
  }

  .or-shop-preview-actions a {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: .55rem .45rem !important;
    font-size: .78rem !important;
    text-align: center !important;
    overflow-wrap: anywhere !important;
  }

  .or-shop-header {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: .65rem .75rem !important;
    gap: .55rem !important;
  }

  .or-shop-brand {
    min-width: 0 !important;
  }

  .or-shop-brand-mark {
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
  }

  .or-shop-nav {
    min-width: 0 !important;
    margin-left: auto !important;
  }

  .or-shop-nav-cta {
    min-height: 40px !important;
    padding: .55rem .68rem !important;
    font-size: .78rem !important;
    white-space: nowrap !important;
  }

  .or-shop-page {
    width: calc(100% - 16px) !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: .75rem 0 1.25rem !important;
  }

  .or-shop-hero,
  .or-shop-split,
  .or-shop-grid-3 {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .75rem !important;
  }

  .or-shop-surface,
  .or-shop-hero-copy,
  .or-shop-buybox,
  .or-shop-panel,
  .or-shop-card,
  .or-shop-final-cta,
  .or-shop-faq {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .or-shop-hero-copy,
  .or-shop-buybox,
  .or-shop-panel,
  .or-shop-card,
  .or-shop-faq {
    padding: .9rem !important;
  }

  .or-shop-hero h1 {
    max-width: 100% !important;
    font-size: clamp(1.72rem, 8.2vw, 2.35rem) !important;
    line-height: 1.1 !important;
    letter-spacing: -.035em !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    text-wrap: balance !important;
  }

  .or-shop-lede,
  .or-shop-panel p,
  .or-shop-card p,
  .or-shop-faq p {
    font-size: .94rem !important;
    line-height: 1.58 !important;
    overflow-wrap: anywhere !important;
  }

  .or-shop-eyebrow-row,
  .or-shop-trust-pills,
  .or-shop-actions {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .or-shop-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px !important;
  }

  .or-shop-actions a,
  .or-shop-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .or-shop-media,
  .or-shop-image-card,
  .or-shop-image-card img,
  .or-shop-image-placeholder {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  .or-shop-image-card {
    aspect-ratio: 4 / 3 !important;
  }

  .or-shop-image-card img,
  .or-shop-image-placeholder {
    height: 100% !important;
    object-fit: contain !important;
  }

  .or-shop-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .or-shop-thumb,
  .or-shop-thumb img {
    width: 100% !important;
    min-width: 0 !important;
  }

  .or-shop-section-head,
  .or-shop-final-cta {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .65rem !important;
  }

  .or-shop-section-head h2,
  .or-shop-panel h2,
  .or-shop-final-cta h2,
  .or-shop-product-card h2 {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .or-shop-grid-3,
  .or-shop-review-grid,
  .or-shop-product-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .or-shop-sticky-mobile {
    left: 8px !important;
    right: 8px !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    min-width: 0 !important;
    gap: 7px !important;
    padding: 7px !important;
  }

  .or-shop-sticky-mobile span {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .or-shop-sticky-mobile a {
    flex: 0 0 auto !important;
    min-height: 42px !important;
    padding: .65rem .8rem !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 380px) {
  .unified-metrics-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .unified-actions-list {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .fixed-category-count-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.octo-create-stage-active .background-builder-grid,
  body.octo-create-stage-active .octo-extracted-top12-grid,
  body.octo-create-stage-active .editor-image-grid:not(.octo-extracted-top12-grid),
  body.octo-create-stage-active #extractedImagesGrid,
  body.octo-create-stage-active .extracted-image-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .or-shop-preview-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .or-shop-sticky-mobile span {
    display: none !important;
  }

  .or-shop-sticky-mobile a {
    width: 100% !important;
    text-align: center !important;
  }
}
