/* Approved mobile changes only. All other typography uses the live-site styles. */
.mobileProductBrowse, .mobilePurchaseBar, .cactiChartAvailability, .cactiFooterEdge { display: none; }
@media (max-width: 680px) {
  /* End the content after the legal line; colour the browser-safe canvas too. */
  html.cacti-footer-visible { background: #171716; }
  html.cacti-footer-visible body.cacti-theme { background-color: #171716; background-image: linear-gradient(to bottom, #fffef5 0, #fffef5 var(--cacti-footer-offset), #171716 var(--cacti-footer-offset), #171716 100%); }
  /* Give Safari a solid viewport-attached edge to extend behind its toolbar. */
  html.cacti-footer-edge-active .cactiFooterEdge { display: block; position: fixed; left: 0; right: 0; bottom: 0; height: max(48px, env(safe-area-inset-bottom, 0px)); background: #171716; pointer-events: none; z-index: 0; }
  .cacti-theme .footer { background: #171716; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 100vh 0 100vh #171716; }
  .cacti-theme .footerInner.shell { width: calc(100% - 7.2px); margin-inline: 3.6px; padding-inline: 11.2px; }
  .cacti-theme .footerBrandBlock { max-width: 170.4px; }
  .cacti-theme .footerCopy { width: 158.4px; max-width: 100%; }
  .cacti-theme.cacti-mobile-purchase-ready { padding-bottom: 0; }
  .cacti-theme.cacti-mobile-purchase-ready .footer { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  /* Keep the page visually continuous while preserving outside-tap dismissal. */
  .cacti-theme :is(.cartBackdrop,.sortBackdrop,.searchBackdrop,.welcomeOfferBackdrop,.shopPromptBackdrop,.welcomeReadyBackdrop,.cactiFilterBackdrop),
  .cacti-theme #TB_overlay {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
    width: auto !important; height: auto !important; min-height: 100% !important;
  }
  .cacti-theme { --size-heading-gap: 8px; }
  .cactiChartAvailability { display: inline; }
  .cactiChartAvailability:not(:empty)::before { content: " · "; }
  .sizeChartAddButton:disabled { opacity: .5; cursor: not-allowed; }
  @media (max-width: 640px) { .cacti-theme { --size-heading-gap: 7px; } }
  /* Keep the verified entry-cover/header fix without changing header typography. */
  .cacti-theme.cacti-fresh-front .shell.header { position: fixed; top: 0; left: 0; right: 0; margin-left: 0; margin-right: 0; }
  .cacti-theme.cacti-fresh-front[data-home-entry-active] .shell.header { transform: translateY(0); transition: none; pointer-events: auto; }

  /* Approved shared category index. */
  .cacti-theme .categoriesSection { margin: 12px 7.5px 0; padding-bottom: 12px; }
  .cacti-theme .categoriesTitle { font-size: 12px; line-height: 1.15; }
  .cacti-theme .categoriesList { margin-top: 6px; }
  .cacti-theme .categoryLink { min-height: 24px; padding: 6px 1.5px; font-size: 7.5px; line-height: 1.4; }
  .cacti-theme .categoryCount { font-size: 6.75px; }

  /* Keep the approved description sizes; composition comes from the live site. */
  .cacti-theme .shopVisitSection { min-height: 0; padding: 13px 15px; align-items: start; }
  .cacti-theme .shopVisitLead { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
  .cacti-theme .shopVisitTitle { font-size: clamp(14px, 4.5vw, 20px); line-height: 1.05; white-space: nowrap; }
  .cacti-theme .shopVisitAction { display: flex; margin-top: 0; font-size: 8.5px; line-height: 1; }
  .cacti-theme .shopVisitAction span:last-child { display: block; }
  .cacti-theme .shopVisitCopy { width: 100%; justify-self: end; text-align: right; font-size: 6.804px; line-height: 9.72px; transform: scaleY(.95); transform-origin: center; }
  .cacti-theme .cactiShopMastheadCopy p { font-size: 8.55px; line-height: 1.4; margin-top: 2px; }
  .cacti-theme .cactiCategoryMasthead p { font-size: 9px; line-height: 1.4; margin-top: 4px; }

  /* Match Colour's heading-to-content gap, retaining the tap area. */
  .cacti-theme .cactiVariationGroup[data-cacti-variation-group*="size"] > legend { margin-bottom: 0; }
  .cacti-theme .sizeControlsRow { grid-template-columns: minmax(0,1fr) auto; align-items: stretch; column-gap: 8px; }
  .cacti-theme .sizeControlsRow.cactiBundleVariationControls { grid-template-columns: minmax(0,1fr); }
  .cacti-theme .sizeGrid:not(.cactiBundleColourGrid) { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0 clamp(14px,4.267vw,16px); }
  .cacti-theme .sizeLabel { position: relative; display: inline-flex; align-items: flex-start; justify-content: flex-start; min-width: 24px; min-height: 28.8px; padding: var(--size-heading-gap) 0 0; margin: 0; border: 0; border-radius: 0; background: transparent; font-size: 9.45px; line-height: 1.2; text-align: left; color: #686868; text-decoration: none; }
  .cacti-theme .sizeLabel::after { content: ''; position: absolute; top: calc(var(--size-heading-gap) + 14.34px); left: 0; right: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 160ms ease-out; }
  .cacti-theme .sizeLabel[data-active='true'] { color: var(--color-ink); font-weight: 600; text-decoration: none; }
  .cacti-theme .sizeLabel[data-active='true']::after { height: 2px; transform: scaleX(1); }
  .cacti-theme .sizeLabel:focus-visible::after { transform: scaleX(1); }
  .cacti-theme .sizeLabel:disabled { text-decoration: line-through; }
  /* Match the live-site corner radius; share the option row's text metrics. */
  .cacti-theme .sizeControlsRow > .sizeChartTrigger { align-self: end; justify-self: end; display: inline-flex; align-items: flex-start; justify-content: center; width: auto; min-width: 0; min-height: 28.8px; height: 28.8px; margin: 0; padding: calc(var(--size-heading-gap) - 1px) 9px 0; border: 1px solid var(--color-ink); border-radius: 7.65px; font-family: var(--font-body); font-size: 9.45px; line-height: 1.2; text-decoration: none; }
  .cacti-theme .cactiBundleVariationControls > .sizeChartTrigger { justify-self: start; align-self: start; min-height: 28px; margin: 0; padding: 4px 9px; }
  /* Center the visible outline on the label, retaining its baseline and tap area. */
  .cacti-theme .sizeControlsRow:not(.cactiBundleVariationControls) > .sizeChartTrigger { position: relative; border-color: transparent; }
  .cacti-theme .sizeControlsRow:not(.cactiBundleVariationControls) > .sizeChartTrigger::before { content: ''; position: absolute; inset: -1px; border: 1px solid var(--color-ink); border-radius: inherit; transform: translateY(calc(var(--size-heading-gap) - 9.15px)); pointer-events: none; }
  .cacti-theme .sizeControlsRow > .sizeChartTrigger { transform: translateY(-4%); }
  .cacti-theme .productSection .single_variation_wrap { margin-top: 6px; gap: 4px; }

  /* A finite shop continuation, with the original photographs fully visible. */
  .mobileProductBrowse { display: block; margin: 24px 8px 0; border-top: 1px solid hsl(0 0% 0% / .2); padding-top: 16px; }
  .mobileProductBrowse h2 { margin: 0; font: 600 20px/1.1 var(--font-heading); }
  .mobileProductBrowse > p { margin: 6px 0 16px; font-size: 9px; line-height: 1.4; }
  .mobileBrowseGrid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 8px; }
  .mobileBrowseCard { min-width: 0; }
  .mobileBrowseImage { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: hsl(45 20% 93%); }
  .mobileBrowseImage img { width: 100%; height: 100%; object-fit: contain; }
  .mobileBrowseName { margin: 6px 0 2px; font: 500 11px/1.3 var(--font-heading); }
  .mobileBrowsePrice { margin: 3px 0 0; font-size: 10px; line-height: 1.3; }
  .mobileBrowseView { display: inline-flex; min-height: 24px; align-items: center; font-size: 9px; }
  .mobileBrowseActions { margin: 24px 16px 0 0; text-align: center; border-top: 1px solid #c9c9bf; border-bottom: 1px solid #c9c9bf; }
  .mobileBrowseShop { position: relative; display: flex; width: 100%; min-height: 36px; align-items: center; justify-content: center; padding: 8px 0; border: 0; border-radius: 0; font: 400 11px/1.4 var(--font-body); color: #444; text-decoration: none; text-underline-offset: 4px; }
  .mobileBrowseShop span[aria-hidden] { position: absolute; right: 0; }
  .mobileBrowseShop:hover { text-decoration: underline; }
  .mobileBrowseShop:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

  /* Approved sticky action and return-to-top control. */
  .mobilePurchaseBar:not([hidden]) { display: grid; grid-template-columns: minmax(0,1fr) 36px; gap: 8px; align-items: center; position: fixed; z-index: 32; bottom: 0; left: 0; right: 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom,0px)); background: var(--color-cream); border-top: 1px solid hsl(0 0% 0% / .2); }
  .mobilePurchaseMain { min-width: 0; }
  .mobilePurchaseSummary { margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; line-height: 1.3; }
  .mobilePurchaseAdd { display: block; width: 100%; min-height: 36px; border: 1px solid var(--color-ink); border-radius: 4px; background: var(--color-ink); color: var(--color-cream); font: 600 12px/1.2 var(--font-heading); padding: 8px; }
  .mobilePurchaseTop { width: 36px; height: 36px; border: 1px solid currentColor; border-radius: 50%; background: transparent; color: var(--color-ink); font-size: 20px; align-self: end; }
  .cacti-popup-open .mobilePurchaseBar { visibility: hidden; }
  .cacti-mobile-purchase-ready { padding-bottom: calc(76px + env(safe-area-inset-bottom,0px)); }
  @media (prefers-reduced-motion: reduce) { .cacti-theme .sizeLabel::after { transition: none; } }
}
