/* Loaded after page styles so the phone layout has one predictable cascade. */
@media (max-width: 640px) {
  html { scroll-padding-top: 170px; }
  .site-width, .site-main { width: calc(100% - 24px); }
  .utility-inner { min-height: 24px; justify-content: flex-end; }
  .utility-inner > p { display: none; }
  .utility-bar [role=group] a { padding: 3px 9px; }
  .header-main { min-height: 0; padding-block: 8px; gap: 8px 12px; }
  .brand-mark { width: 36px; height: 35px; }
  .brand-mark img { height: 35px; }
  .brand-wordmark { font-size: 15px; }
  .brand-wordmark small { margin-top: 3px; }
  .mobile-menu > summary { width: 44px; height: 44px; background: #f1f5fa; color: var(--navy); border-color: var(--line); border-radius: 12px; }
  .mobile-menu-open-icon { display: flex; }
  .mobile-menu-close-icon, .mobile-menu[open] .mobile-menu-open-icon { display: none; }
  .mobile-menu[open] .mobile-menu-close-icon { display: flex; }
  .mobile-menu-panel { top: 58px; max-height: calc(100dvh - 150px - env(safe-area-inset-bottom, 0px)); }
  .header-search { min-height: 46px; border-radius: 14px; padding: 0 10px; gap: 8px; }
  /* 16px prevents iOS from zooming the page when search receives focus. */
  .header-search input { font-size: 16px; padding-block: 10px; }
  .header-search input::placeholder { font-size: 12px; }
  .header-search > button { width: 44px; height: 44px; background: transparent; color: var(--blue); }
  .header-nav-wrap { background: white; color: var(--ink); border-top: 0; box-shadow: none; }
  .header-nav { flex-wrap: nowrap; gap: 8px; min-height: 46px; justify-content: space-between; }
  .header-nav > .catalog-menu { width: auto; min-width: 0; }
  .catalog-menu > summary { min-height: 44px; gap: 6px; font-size: 11px; padding: 0; }
  .catalog-menu > summary > .px-icon { color: var(--blue); }
  .catalog-menu > summary .menu-chevron { display: none; }
  .header-shortcuts { width: auto; padding: 0; gap: 4px; }
  .header-shortcuts > a { flex: 0 1 auto; padding: 6px 8px; font-size: 10px; }
  .header-nav .nav-business { background: #f4f7fb; color: #355573; border-color: var(--line); }
  .nav-business > .px-icon, .nav-business > .gold-dot { display: none; }
  .header-nav .nav-admin { padding-inline: 7px; }
  .header-nav .nav-admin .px-icon { width: 15px; }
  .home-page .site-main { padding-block-start: 12px; }
  body.home-page { background: #f6f7f9; }
  .home-page .studio-hero { min-height: 0; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
  .studio-hero .hero-copy, html[dir=rtl] .studio-hero .hero-copy { padding: 16px; }
  .studio-hero .hero-copy .eyebrow { font-size: 10px; }
  .studio-hero .hero-copy h1, html[dir=rtl] .studio-hero .hero-copy h1 { font-size: clamp(23px, 5.8vw, 26px); line-height: 1.55; letter-spacing: 0; margin-block: 8px 12px; }
  html[dir=rtl] .studio-hero .hero-copy h1 .hero-title-lead { font-size: .85em; }
  html[lang=en] .studio-hero .hero-copy h1 { font-size: clamp(22px, 4.5vw, 26px); line-height: 1.3; }
  .studio-hero .hero-description, .studio-hero .hero-note, .studio-hero .hero-secondary { display: none; }
  .studio-hero .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 0; }
  .studio-hero .hero-actions > a { min-width: 0; min-height: 44px; padding: 10px 6px; font-size: 11px; gap: 6px; border-radius: 10px; }
  .studio-hero .hero-actions > .hero-secondary { display: none; }
  .hero-actions .px-icon { width: 17px; height: 17px; }
  .studio-playground.kitchen-banner { border-radius: 0; }
  .kitchen-gallery { min-height: 0; height: clamp(120px, 36vw, 170px); aspect-ratio: auto; }
  .kitchen-color-label { inset-inline-start: 12px; bottom: 12px; padding: 4px 10px; font-size: 10px; }
  .kitchen-banner .studio-tools { min-height: 52px; padding: 4px 10px; gap: 4px; background: #fff; }
  .kitchen-banner .finish-picker { gap: 4px; }
  .kitchen-banner .finish-swatch { width: 32px; height: 32px; margin: 6px; }
  .kitchen-banner .finish-caption { display: none; }
  .kitchen-banner .motion-toggle { min-height: 44px; padding: 8px 10px; }
  .home-page .home-section { margin-top: 24px; }
  .home-page .section-heading { margin-bottom: 12px; }
  .home-page .section-heading h2, html[dir=rtl] .home-page .section-heading h2 { font-size: 18px; line-height: 1.6; }
  .home-page .section-heading .eyebrow { display: none; }
  .section-link { min-height: 44px; }
  .home-page .category-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(80px, calc((100% - 18px) / 4)); gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
  .home-page .category-grid::-webkit-scrollbar { display: none; }
  .home-page .category-card { align-items: center; padding: 8px 2px; gap: 8px; border: 0; border-radius: 12px; text-align: center; scroll-snap-align: start; }
  .home-page .category-symbol { width: 48px; height: 48px; }
  .home-page .category-description strong { font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .home-page .category-description small, .home-page .category-arrow { display: none; }
  .home-page .product-rail { grid-auto-columns: minmax(150px, 44%); gap: 10px; margin-inline-end: 0; padding: 2px 0 12px; }
  .home-page .product-card { border-radius: 14px; }
  .home-page .product-image { height: 132px; background: #f7f8fa; }
  .home-page .product-card-body { padding: 10px; }
  .home-page .product-card h3 { font-size: 11px; }
  .home-page .product-price .text-xl { font-size: 15px; }
  .home-page .product-add { min-height: 44px; }
  .home-page .product-card:hover, .home-page .product-card:focus-within { transform: none; }
  .studio-ticker { display: none; }
  .home-page .benefit-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 8px; padding-block: 20px; margin-top: 16px; }
  .benefit-strip > div { justify-content: flex-start; min-width: 0; }
  .benefit-strip small { font-size: 9px; }
  .home-page .collection-banner { min-height: 200px; border-radius: 16px; padding: 20px; }
  .home-page .collection-banner h2 { font-size: 19px; }
  .home-page .business-banner, .studio-interior { border-radius: 16px; }
  .mobile-dock { padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px)); }
  .mobile-dock a { min-height: 52px; gap: 3px; font-size: 10px; }
  .mobile-dock a[aria-current=page] { box-shadow: none; background: transparent; color: var(--blue); }
  .mobile-dock a[aria-current=page] > .px-icon { background: #eaf2ff; border-radius: 7px; box-sizing: content-box; padding: 4px 12px; margin-block: -4px; }
}
