.ico {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.phone-search,
.phone-only,
.tabbar,
.sheet-close {
  display: none;
}

.hit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
}

.hero-track {
  position: relative;
  height: 100%;
}

@media (max-width: 767px) {
  :root {
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  body {
    font-size: 16px;
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
  }

  main {
    animation: page-in 420ms var(--ease-out) both;
  }

  body.is-leaving main {
    animation: page-out 180ms var(--ease-out) both;
  }

  h1 {
    font-size: 1.875rem !important;
    line-height: 1.15 !important;
  }

  .topbar:not(.is-home) {
    display: none;
  }

  .topbar.is-home .page {
    font-size: 12px;
  }

  .brand-row {
    flex-wrap: wrap;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .shop-nav,
  .range-bar,
  .crumb-bar {
    display: none !important;
  }

  .phone-search {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border-radius: 999px;
    background: #faf7f2;
    color: #0f172a;
  }

  .site-search {
    display: none;
  }

  .site-search.is-open {
    display: flex;
  }

  .site-search input,
  .site-search button,
  .field,
  select.field,
  textarea.field,
  .pill,
  .pill-outline,
  .pill-light {
    font-size: 16px !important;
    min-height: 48px;
  }

  .card-title {
    font-size: 16px;
  }

  .template-name {
    font-size: 16px;
    white-space: normal;
  }

  .template-meta,
  .text-xs,
  .eyebrow {
    font-size: 14px;
  }

  .range-link,
  .sheet a,
  label:has(input[type="checkbox"]) {
    min-height: 44px;
  }

  label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .range-next {
    width: 44px;
    height: 44px;
  }

  .hero-stage {
    height: 24rem !important;
    overflow: hidden !important;
  }

  .hero-track {
    display: flex;
    height: 24rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  .hero-stage .items-center {
    align-items: flex-start;
    padding-top: 1.25rem;
  }

  .hero-stage [data-hero-slide] {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 100%;
    min-width: 100%;
    height: 100%;
    scroll-snap-align: start;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .hero-stage h2 {
    font-size: 1.875rem !important;
    line-height: 1.15 !important;
  }

  [data-hero-dot] {
    min-width: 44px;
    min-height: 44px;
    width: 44px !important;
    height: 44px !important;
    background: transparent !important;
    position: relative;
  }

  [data-hero-dot]::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
  }

  [data-hero-dot][aria-current="true"]::after {
    width: 18px;
    background: #fff;
  }

  .range-row {
    display: flex !important;
    grid-template-columns: none !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 4px;
  }

  .range-card {
    flex: 0 0 260px;
    min-width: 260px;
    scroll-snap-align: start;
  }

  .range-card .aspect-square {
    height: 120px;
    aspect-ratio: auto;
  }

  .range-card h3 {
    white-space: nowrap;
    font-size: 16px;
  }

  .product-art {
    height: 112px !important;
    width: 112px;
    aspect-ratio: auto !important;
  }

  article.card:has(.product-art) {
    display: grid;
    grid-template-columns: 112px 1fr;
    align-items: center;
  }

  article.card:has(.product-art) .product-art {
    grid-row: 1;
  }

  article.card:has(.product-art) > div {
    min-width: 0;
  }

  article.card:has(.product-art) .pill {
    grid-column: 1 / -1;
  }

  .product-stage {
    height: 180px !important;
    aspect-ratio: auto !important;
  }

  .product-layout {
    display: flex;
    flex-direction: column;
  }

  .product-copy {
    order: -1;
  }

  body:has(.enquiry-submit),
  body:has(.details-save) {
    padding-bottom: calc(8.5rem + env(safe-area-inset-bottom));
  }

  .product-art svg {
    height: 100%;
    width: 100%;
  }

  .card,
  .pill,
  .pill-outline,
  .tabbar a,
  .range-card,
  .phone-row {
    transition: transform 160ms var(--ease-out);
  }

  .card:active,
  .pill:active,
  .pill-outline:active,
  .tabbar a:active,
  .range-card:active,
  .phone-row:active {
    transform: scale(0.97);
  }

  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .tabbar a {
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
  }

  .tabbar a.is-on {
    color: #5b2c82;
  }

  .phone-only {
    display: inline-flex;
  }

  .sheet {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    max-height: 78vh;
    overflow: auto;
    background: #fff;
    border-radius: 1.5rem 1.5rem 0 0;
    padding: 1.25rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 320ms var(--ease-out), visibility 320ms;
  }

  .sheet.is-open {
    transform: translateY(0);
    visibility: visible;
  }

  .sheet.is-open::before {
    content: "";
    display: block;
    width: 2.5rem;
    height: 0.25rem;
    margin: 0 auto 1rem;
    border-radius: 999px;
    background: #cbd5e1;
  }

  .sheet-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 55;
  }

  .price-sheet {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: calc(3.5rem + env(safe-area-inset-bottom));
    z-index: 60;
    margin: 0;
    height: auto;
    max-height: 46vh;
    overflow: auto;
    border-radius: 1.25rem 1.25rem 0 0;
    transform: translateY(120%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 220ms var(--ease-out), visibility 220ms;
  }

  .price-sheet.is-open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .sheet-close {
    display: inline-flex;
    min-height: 44px;
    margin-top: 0.75rem;
    font-size: 16px;
    font-weight: 600;
    color: #5b2c82;
  }

  .run-card {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(3.5rem + env(safe-area-inset-bottom));
    z-index: 35;
    margin: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
  }

  .run-card .text-4xl {
    font-size: 1.25rem;
    margin-top: 0;
  }

  .run-card .pill {
    margin-top: 0;
    min-height: 48px;
    flex: 1;
  }

  .artwork-link {
    display: none;
  }

  body:has(.run-card) {
    padding-bottom: calc(8.5rem + env(safe-area-inset-bottom));
  }

  .phone-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 44px;
    font-weight: 600;
    color: #5b2c82;
  }

  .contact-lead {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .phone-cta {
    margin-top: 0.75rem;
  }

  .contact-grid > :first-child {
    margin-bottom: 1rem;
  }

  .template-row {
    flex-direction: row;
    align-items: center;
    min-height: 72px;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
  }

  .template-thumb {
    width: 48px;
    height: 48px;
  }

  .template-download {
    min-height: 44px;
    min-width: 44px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .fold:not(.is-open) > :not(legend) {
    display: none;
  }

  .fold legend {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
  }

  .fold legend::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: 12px;
    border-right: 2px solid #5b2c82;
    border-bottom: 2px solid #5b2c82;
    transform: rotate(45deg);
    transition: transform 160ms var(--ease-out);
  }

  .fold.is-open legend::after {
    transform: rotate(225deg);
  }

  .details-save {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: calc(4.25rem + env(safe-area-inset-bottom));
    z-index: 35;
  }

  footer a.hit {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  main,
  body.is-leaving main {
    animation: none !important;
  }

  .hero-track {
    scroll-behavior: auto;
  }
}

@keyframes page-in {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

@keyframes page-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.35;
  }
}
