/* Gym Buddies Athleisure. Court day: a white page, ink text, one court-blue accent.
   Colour otherwise comes from the photos and the garments. Type: Barlow Condensed (headlines, caps) + Barlow. */
:root {
  --bg: #ffffff;
  --ink: #121417;
  --muted: #50545c;
  --line: #e3e5e8;
  --field: #8a8f98; /* input borders: 3:1 on white */
  --cloud: #f4f5f7;
  --blue: #2b4c9b;
  --blue-hover: #223e80;
  --error: #b42318;

  --f-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --max: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(56px, 8vw, 112px);
  color-scheme: light;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

html:has(dialog[open]) {
  overflow: hidden; /* scroll lock while the bag is open */
}

body {
  margin: 0;
  background: var(--bg);
  font-size: 1rem;
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 4px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

section[id] {
  scroll-margin-top: 72px;
}

.section-title {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

.section-sub {
  margin-top: 12px;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .text-link:hover {
    text-decoration-thickness: 2px;
  }
}

/* BUTTONS: 48px, 4px radius, sentence case in Barlow 600 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 4px;
  font: 600 1rem/1.1 var(--f-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--ease-out), background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.btn--primary {
  background: var(--blue);
  color: #ffffff;
}

.btn--secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.btn--small {
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.9375rem;
}

.btn--full {
  width: 100%;
}

.btn:active:not(:disabled):not([aria-disabled="true"]) {
  transform: scale(0.97);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--cloud);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

@media (hover: hover) and (pointer: fine) {
  .btn--primary:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--blue-hover);
  }
  .btn--secondary:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--ink);
    color: #ffffff;
  }
}

/* Add button: the label and "Added" share one cell and crossfade */
.add-btn {
  display: grid;
  place-items: center;
  width: 100%;
}

.add-btn > span {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}

.add-btn .l-alt {
  opacity: 0;
  transform: translateY(8px);
}

.add-btn.is-added .l-main {
  opacity: 0;
  transform: translateY(-8px);
}

.add-btn.is-added .l-alt {
  opacity: 1;
  transform: none;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background-color 150ms ease;
}

.icon-btn:active {
  transform: scale(0.94);
}

@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover {
    background: var(--cloud);
  }
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px));
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-lockup__mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.brand-lockup__name {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover {
    color: var(--blue);
  }
}

.menu-btn {
  display: none;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: none;
}

.cur-chip,
.site-nav__foot {
  display: none;
}

.bag-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 4px;
  margin-right: -8px;
  border: 0;
  border-radius: 999px;
  background: none;
  font: 600 1rem/1 var(--f-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--ease-out), background-color 150ms ease;
}

.bag-trigger:active {
  transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
  .bag-trigger:hover {
    background: var(--cloud);
  }
}

.bag-trigger__wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.bag-trigger__count {
  position: absolute;
  top: -3px;
  right: -6px;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 0 0 2px #ffffff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Currency switch: CA$ (what the store charges) or a US$ estimate. Subtle liquid-glass pill in the header and bag. */
.cur-switch {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-self: center;
  flex: none;
  padding: 3px;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(240, 244, 250, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 0 0 1px rgba(18, 20, 23, 0.11), 0 6px 16px -12px rgba(35, 53, 87, 0.5);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cur-switch {
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
  }
}

/* Sliding liquid-glass capsule behind the active currency */
.cur-switch::before {
  content: '';
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: linear-gradient(160deg, #272c36, #121417);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 2px 6px -2px rgba(18, 20, 23, 0.45);
  transform: translateX(0);
  transition: transform 200ms var(--ease-out);
  pointer-events: none;
  z-index: 0;
}

.cur-switch[data-cur-active='USD']::before {
  transform: translateX(100%);
}

.cur-switch button {
  position: relative;
  z-index: 1;
  min-width: 46px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 0.8125rem/1 var(--f-body);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 160ms ease, transform 120ms var(--ease-out);
}

/* 44px vertical tap target without inflating the header pill */
.cur-switch button::after {
  content: '';
  position: absolute;
  inset: -6px 0;
}

.cur-switch button[aria-pressed='true'] {
  color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
  .cur-switch button[aria-pressed='false']:hover {
    color: var(--ink);
  }
}

.bag__cur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Beside a US$ estimate: the CA$ amount the shopper is charged */
.pay-line {
  margin: 4px 0 6px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink);
}

@media (max-width: 820px) {
  /* Frost lives on ::before so .site-header never creates a containing block for the fixed drawer/scrim. */
  .site-header {
    background: transparent;
    border-bottom-color: rgba(18, 20, 23, 0.08);
  }

  .site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(255, 255, 255, 0.92);
    pointer-events: none;
  }

  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header::before {
      -webkit-backdrop-filter: blur(16px) saturate(145%);
      backdrop-filter: blur(16px) saturate(145%);
    }
  }

  .site-header__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 60px;
    gap: 8px;
  }

  .header-actions {
    gap: 4px;
  }

  .cur-switch--desktop {
    display: none;
  }

  /* Compact single-tap frosted liquid-glass currency chip in the phone header */
  .cur-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(238, 242, 249, 0.78));
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), inset 0 0 0 1px rgba(18, 20, 23, 0.12), 0 4px 12px -8px rgba(35, 53, 87, 0.55);
    font: 600 0.75rem/1 var(--f-body);
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 120ms var(--ease-out), background 180ms ease, color 180ms ease, box-shadow 180ms ease;
  }

  .cur-chip::after {
    content: '';
    position: absolute;
    inset: -7px -2px;
  }

  .cur-chip.is-usd {
    background: linear-gradient(160deg, #272c36, #121417);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 4px 12px -6px rgba(18, 20, 23, 0.55);
  }

  .cur-chip:active {
    transform: scale(0.95);
  }

  .cur-switch button {
    min-width: 48px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.8125rem;
  }
}

@media (max-width: 420px) {
  .brand-lockup {
    gap: 7px;
  }

  .brand-lockup__mark {
    width: 24px;
    height: 24px;
  }

  .brand-lockup__name {
    font-size: 1.25rem;
    letter-spacing: 0.03em;
  }
}

/* Floating bag: bottom right while the bag holds something. Under the header and its menu, over the page. */
.bag-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 36;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 8px 20px -6px rgba(18, 20, 23, 0.45);
  cursor: pointer;
  transition: transform 120ms var(--ease-out), bottom 250ms var(--ease-out);
}

.bag-fab[hidden] {
  display: none;
}

.bag-fab:active {
  transform: scale(0.96);
}

.bag-fab__count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 0 0 2px #ffffff;
  font: 600 0.8125rem/1 var(--f-body);
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) and (pointer: fine) {
  .bag-fab:hover {
    background: var(--blue-hover, #223e80);
  }
}

/* Phones: the kit bar is fixed to the bottom while the Kit Studio is in view, so the bag rides above it */
@media (max-width: 699px) {
  .bag-fab.is-raised {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bag-fab {
    transition: none;
  }
}

/* HERO: two rounded panels of equal height. A cloud card with the headline, and the crew photo in a dark frame:
   the one deliberate dark element on the page. */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(16px, 2vw, 24px) var(--gutter) clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-columns: minmax(0, 4.8fr) minmax(0, 7.2fr);
  gap: 16px;
}

.hero__card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 16px;
  background: var(--cloud);
}

.hero__title {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(3.75rem, 6.4vw, 6.75rem);
  line-height: 0.88;
  text-transform: uppercase;
  letter-spacing: 0.002em;
  max-width: 3.4em; /* three lines at any width: Built / for the / session. ("Built for" is 3.57em, "session." 3.22em) */
}

.hero__title .ln {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.hero__title .ln > span {
  display: block;
}

.hero__lead {
  margin-top: 18px;
  max-width: 40ch;
  font-size: 1.125rem;
  line-height: 1.48;
  color: var(--muted);
}

.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero__meta {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
}

.hero__media {
  position: relative;
  margin: 0;
  min-height: 420px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--ink);
  color: #ffffff;
}

.hero__stage {
  position: absolute;
  inset: 0;
  touch-action: pan-y;
  cursor: pointer;
}

.hero__stage:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -4px;
  border-radius: 16px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  opacity: 0;
  transition: opacity 450ms var(--ease-out);
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition-duration: 0.01ms;
  }
}

/* The opening screen is plain CSS: nothing in it waits for scripts, fonts or the photo to decode. */

/* SHOP BY SPORT */
.sports {
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--section) * 0.5) var(--gutter) calc(var(--section) * 0.8);
}

.sport-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.sport-tile {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
}

/* The picture sits in its own frame; the name and count sit under it, as on big sportswear sites. */
.sport-tile__frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.sport-tile__media {
  position: absolute;
  inset: 0;
  transition: transform 400ms var(--ease-out);
}

.sport-tile__media > img:only-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sport-tile__media--cloud {
  background: var(--cloud);
}

.sport-tile__media--blue {
  background: var(--blue);
}

.sport-tile__g {
  position: absolute;
  height: auto;
  filter: drop-shadow(0 14px 14px rgba(18, 20, 23, 0.18));
}

.sport-tile__g--1 {
  left: 4%;
  top: 6%;
  width: 54%;
  transform: rotate(-7deg);
}

.sport-tile__g--2 {
  right: 2%;
  top: 14%;
  width: 52%;
  transform: rotate(6deg);
}

.sport-tile__g--3 {
  left: 24%;
  top: 36%;
  width: 50%;
  transform: rotate(-2deg);
}

.sport-tile__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  padding-top: 14px;
}

.sport-tile__name {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1;
  text-transform: uppercase;
  transition: color 150ms ease;
}

.sport-tile__count {
  font-size: 0.9375rem;
  color: var(--muted);
}

.sport-tile:focus-visible {
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .sport-tile:hover .sport-tile__media {
    transform: scale(1.04);
  }
  .sport-tile:hover .sport-tile__name {
    color: var(--blue);
  }
}

/* KIT STUDIO: a light cloud panel */
.kit-studio {
  background: var(--cloud);
  padding: var(--section) var(--gutter);
}

/* Same content width as the sections that carry their gutter inside --max */
.kit-studio__inner {
  max-width: calc(var(--max) - 2 * var(--gutter));
  margin: 0 auto;
}

.kit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 24px;
}

.kit-tab {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}

.kit-tab:active {
  transform: scale(0.97);
}

.kit-tab[aria-pressed='true'] {
  background: var(--ink);
  color: #ffffff;
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .kit-tab[aria-pressed='false']:hover {
    box-shadow: inset 0 0 0 1px var(--ink);
  }
}

.kit-studio__workspace {
  display: grid;
  grid-template-columns: 480px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.studio-stage {
  background: #ffffff;
}

.studio-stage__frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #ffffff;
}

.studio-stage__media {
  position: absolute;
  inset: 0;
  background: #ffffff;
}

.studio-stage__ghost {
  pointer-events: none;
}

.studio-stage__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-stage__img.is-store {
  object-position: center 20%;
}

.studio-stage__hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* The pin is only a dot on the photo; the hit area is 44px, the visible dot 14px. */
.hotspot-dot {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hotspot-dot::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 15px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--blue), 0 0 0 7px rgba(255, 255, 255, 0.45);
  transition: transform 150ms var(--ease-out);
}

.hotspot-dot.is-highlighted::before {
  background: var(--blue);
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 7px rgba(43, 76, 155, 0.4);
}

/* Label beside the dot, pointing away from the body. Fine pointers only. */
.hotspot-dot__label {
  position: absolute;
  top: 50%;
  left: 100%;
  margin-left: 2px;
  padding: 6px 10px;
  width: max-content;
  max-width: 170px;
  border-radius: 4px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transform: translate(-4px, -50%);
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
  display: none;
}

.hotspot-dot__label > span {
  display: block;
}

.hotspot-dot__price {
  font-weight: 500;
}

.hotspot-dot.is-left .hotspot-dot__label {
  left: auto;
  right: 100%;
  margin: 0 2px 0 0;
  transform: translate(4px, -50%);
}

@media (hover: hover) and (pointer: fine) {
  .hotspot-dot__label {
    display: block;
  }
  .hotspot-dot:hover::before {
    transform: scale(1.15);
  }
  .hotspot-dot:hover .hotspot-dot__label,
  .hotspot-dot:focus-visible .hotspot-dot__label {
    opacity: 1;
    transform: translate(0, -50%);
  }
}

.hotspot-dot.no-label .hotspot-dot__label {
  display: none;
}

.hotspot-dot:focus-visible {
  outline-offset: -6px;
  border-radius: 50%;
}

.studio-stage:has(.hotspot-dot:focus-visible) .stage-caption {
  color: var(--ink);
  text-decoration-color: var(--blue);
}

@media (hover: hover) and (pointer: fine) {
  .studio-stage:has(.hotspot-dot:hover) .stage-caption {
    color: var(--ink);
    text-decoration-color: var(--blue);
  }
}

/* No-worn kits: the hero cut-out floats on the stage. */
.stage-piece {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 24px 24px 64px;
  background: var(--bg);
}

.stage-piece__float {
  width: min(66%, 300px);
}

.stage-piece .shown-note {
  margin-top: 6px;
}

.shown-note {
  font-size: 0.8125rem;
  color: var(--muted);
}

.stage-pair {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 112px;
  padding: 8px 8px 6px;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 8px 24px -8px rgba(18, 20, 23, 0.28);
  transition: opacity 200ms var(--ease-out);
}

.stage-pair.is-off {
  opacity: 0.45;
}

.stage-pair__label {
  font-size: 0.75rem;
  color: var(--muted);
}

.stage-pair__media .gb-float__shadow {
  display: none;
}

.stage-pair__media.is-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.stage-pair__ai {
  margin-top: 4px;
  font-size: 0.8125rem;
  line-height: 1.25;
  color: var(--muted);
}

.stage-pair .shown-note {
  font-size: 0.6875rem;
}

.studio-stage__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 12px;
  padding: 12px 8px 6px 16px;
  border-top: 1px solid var(--line);
}

/* The kit name as the heading, the total on the right: the piece count small, the price bold. */
.studio-stage__head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-right: 8px;
}

.kit-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.kit-total__n {
  color: var(--muted);
  font-size: 0.875rem;
}

.kit-total__price {
  font-size: 1.125rem;
  font-weight: 700;
}

.studio-stage__name {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  text-transform: uppercase;
}

.stage-caption {
  justify-self: start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  cursor: pointer;
}

.stage-caption.is-highlighted {
  color: var(--ink);
  text-decoration-color: var(--blue);
}

@media (hover: hover) and (pointer: fine) {
  .stage-caption:hover {
    color: var(--ink);
  }
}

.studio-stage__arrows {
  display: flex;
  gap: 4px;
  flex: none;
}

/* Kit configurator */
.kit-config {
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.kit-config__top {
  display: flex;
  gap: 24px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.config-tab {
  min-height: 52px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}

.config-tab[aria-pressed='true'] {
  color: var(--ink);
  border-bottom-color: var(--blue);
}

.kit-piece {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  transition: box-shadow 150ms ease;
}

.kit-piece.is-highlighted {
  box-shadow: inset 3px 0 0 var(--blue);
}

.kit-piece__row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.kit-piece__thumb {
  width: 64px;
  height: 80px;
  background: var(--cloud);
}

.kit-piece__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.kit-piece__thumb img.is-photo {
  object-fit: cover;
  object-position: center top;
  padding: 0;
}

.kit-piece__title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
}

.prod-card__title .prod-card__link {
  text-decoration: none;
}

/* The card title is a button (it opens the quick view) that looks like the heading it sits in */
.prod-card__link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .prod-card__title .prod-card__link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.kit-piece__sub {
  margin-top: 2px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.kit-piece__note {
  margin-top: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--error);
}

.kit-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
}

.kit-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.kit-piece__controls {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.kit-config__details {
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.detail {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail__title {
  margin-bottom: 6px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.detail__body {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.6;
}

.kit-config__footer {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

.kit-totals {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.kit-totals__final {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.roll {
  display: inline-block;
}

.kit-status {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--error);
}

.kit-status:empty {
  display: none;
}

/* Size, colour and size guide */
.size-pick {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.size-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pill {
  position: relative;
  cursor: pointer;
}

.pill input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.pill__txt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: transform 120ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}

.pill:active .pill__txt {
  transform: scale(0.97);
}

.pill input:checked + .pill__txt {
  background: var(--ink);
  color: #ffffff;
  box-shadow: none;
}

.pill input:focus-visible + .pill__txt {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pill.is-out {
  cursor: not-allowed;
}

.pill.is-wait {
  cursor: progress;
}

.pill.is-wait .pill__txt {
  color: var(--muted);
  opacity: 0.55;
}

.pill.is-out .pill__txt {
  color: var(--muted);
  opacity: 0.55;
  text-decoration: line-through;
}

@media (hover: hover) and (pointer: fine) {
  .pill:not(.is-out):not(.is-wait):hover input:not(:checked) + .pill__txt {
    box-shadow: inset 0 0 0 1px var(--ink);
  }
}

.size-guide {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-left: -11px;
  color: var(--ink);
}

.swatch-dot {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.swatch-dot__fill {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(18, 20, 23, 0.2);
}

.swatch-dot[aria-pressed='true'] .swatch-dot__fill {
  box-shadow: inset 0 0 0 1px rgba(18, 20, 23, 0.2), 0 0 0 3px #ffffff, 0 0 0 5px var(--ink);
}

/* A colour sold out in every size: faded with a diagonal line, still tappable so the shopper can see it */
.swatch-dot__fill,
.swatch-mini__dot {
  position: relative;
}

.swatch-dot.is-out .swatch-dot__fill,
.swatch-mini__dot.is-out {
  opacity: 0.5;
}

.swatch-dot.is-out .swatch-dot__fill::after,
.swatch-mini__dot.is-out::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  transform: rotate(45deg);
  z-index: 1; /* above the second half of a two-colour dot */
}

/* Two-colour dot ("Black with Green"): the right half is a flat ::before clipped at the middle, so ::after stays free for the
   sold-out line. No overflow: hidden (it would clip that line); the inset shadow on ::before continues the 1px rim round the
   right side with no seam down the middle. */
.swatch-dot__fill.is-split::before,
.swatch-mini__dot.is-split::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: var(--swatch-2);
  box-shadow: inset 0 0 0 1px rgba(18, 20, 23, 0.2);
  clip-path: inset(0 0 0 50%);
  pointer-events: none;
}

/* COLLECTION */
.catalog {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section) var(--gutter);
}

.catalog__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}

.catalog__count {
  color: var(--muted);
  font-size: 1.0625rem;
}

.catalog__cur-note {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Sport chips, then gender, type and sort (phones fold the second row into the Filters sheet). */
.filter-bar {
  margin-top: 24px;
}

.catalog__refine {
  margin: 12px 0 32px;
}

.chip-row,
.catalog__refine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}

.chip:active {
  transform: scale(0.97);
}

.chip__n {
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.chip[aria-pressed='true'] {
  background: var(--ink);
  color: #ffffff;
  box-shadow: none;
}

.chip[aria-pressed='true'] .chip__n {
  color: rgba(255, 255, 255, 0.78);
}

.seg {
  display: inline-flex;
  padding: 0;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.seg__btn {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.seg__btn[aria-pressed='true'] {
  background: var(--cloud);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--blue);
}

@media (hover: hover) and (pointer: fine) {
  .chip[aria-pressed='false']:hover {
    box-shadow: inset 0 0 0 1px var(--ink);
  }
  .seg__btn[aria-pressed='false']:hover {
    color: var(--ink);
  }
}

.select select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--field);
  border-radius: 4px;
  background: #ffffff;
  font-weight: 500;
  cursor: pointer;
}

.catalog__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 20px;
}

.catalog__empty {
  color: var(--muted);
}

/* The collection opens on a first page; the rest comes in on request, so 44 pieces never read as a wall. */
.catalog__more {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 48px;
  text-align: center;
}

.catalog__shown {
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.catalog__more .btn {
  min-width: 220px;
}

.prod-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 250ms var(--ease-out);
}

.prod-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--cloud);
}

.prod-card__media .gb-float {
  width: 64%;
}

.prod-card__media .gb-float__tilt img,
.prod-card__photo {
  transition: transform 300ms var(--ease-out);
}

.prod-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 14%;
}

.prod-card__media .shown-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
}

@media (hover: hover) and (pointer: fine) {
  .prod-card:hover {
    transform: translateY(-4px);
  }
  .prod-card:hover .gb-float__tilt img,
  .prod-card:hover .prod-card__photo {
    transform: scale(1.04);
  }
}

.prod-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 4px;
  background: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
}

.media-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  padding: 3px;
  border-radius: 4px;
  background: #ffffff;
}

.media-toggle button {
  position: relative;
  min-width: 48px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

/* Transparent hit area: 44px tall without changing the look */
.media-toggle button::after {
  content: '';
  position: absolute;
  inset: -3px 0;
}

.media-toggle button[aria-pressed='true'] {
  background: var(--ink);
  color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
  .media-toggle button[aria-pressed='false']:hover {
    color: var(--ink);
  }
}

.prod-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
}

.prod-card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.prod-card__title .prod-card__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-block: 0;
}

/* 44px tap area drawn outside the box: a negative margin here pulled a two-line name over the subtitle. */
.prod-card__title .prod-card__link::after {
  content: '';
  position: absolute;
  inset: -12px 0;
}

.prod-card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
}

.prod-card__price {
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.prod-card__meta {
  margin-top: -4px;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Wide screens: no empty subtitle line (phones keep the row, see the subgrid rules). */
@media (min-width: 700px) {
  .prod-card__meta:empty {
    display: none;
  }
}

.prod-card .add-btn {
  margin-top: auto;
}

.prod-card .size-pick {
  margin-bottom: 8px;
}

.prod-card__msg {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--error);
}

.prod-card__msg:empty {
  display: none;
}

/* STORY BAND */
.story {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section);
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: center;
}

.photo-reveal {
  margin: 0;
  overflow: hidden;
  background: var(--cloud);
  transition: clip-path 400ms var(--ease-out) min(var(--d, 0ms), 60ms), opacity 400ms ease-out min(var(--d, 0ms), 60ms);
}

.photo-reveal img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 400ms var(--ease-out) min(var(--d, 0ms), 60ms);
}

.photo-reveal.is-pending {
  clip-path: inset(0 0 100% 0);
}

.photo-reveal.is-pending img {
  transform: scale(1.06);
}

.story__copy p {
  margin-top: 20px;
  max-width: 44ch;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--muted);
}

/* COMMUNITY */
.community {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 816px);
  gap: 28px clamp(28px, 5vw, 72px);
  align-items: end;
}

.community__head .text-link {
  margin-top: 12px;
}

.community__head .section-title {
  max-width: 9em;
}

.community__photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* Scroll reveals: rise 8px and fade in 220ms, once, stagger capped at 60ms. The pending state is only ever set by app.js,
   never on anything already on screen, and app.js clears it after 1s if the observer stays silent. */
[data-reveal] {
  transition: opacity 220ms ease-out min(var(--d, 0ms), 60ms), transform 220ms var(--ease-out) min(var(--d, 0ms), 60ms);
}

[data-reveal].is-pending {
  opacity: 0;
  transform: translateY(8px);
}

/* FOOTER: cloud panel */
.site-footer {
  background: var(--cloud);
  padding: clamp(48px, 6vw, 80px) var(--gutter) 32px;
}

.site-footer__inner {
  max-width: calc(var(--max) - 2 * var(--gutter));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px 64px;
}

.site-footer__id {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.site-footer__wordmark {
  display: block;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.site-footer__note {
  color: var(--muted);
}

.drop-form {
  margin-top: 28px;
  max-width: 460px;
}

.drop-form__heading {
  margin-bottom: 12px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.drop-form__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.drop-form__input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--field);
  border-radius: 4px;
  background: #ffffff;
}

.casl-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  margin-top: 12px;
  font-size: 0.9375rem;
  color: var(--muted);
  cursor: pointer;
}

.casl-check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

/* Consent comes before the button, so the tab order is email, consent, Join. */
.drop-form__submit {
  margin-top: 8px;
}

.drop-form__status {
  min-height: 1.5em;
  margin-top: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.site-footer__cols h2 {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
}

.site-footer__cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__cols a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .site-footer__cols a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.site-footer__legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
}

.site-footer__credit {
  flex-basis: 100%;
  font-size: 0.875rem;
}

.site-footer__credit a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .site-footer__credit a:hover {
    color: var(--ink);
  }
}

/* FLOATING GARMENT (ported from the earlier build) */
.gb-float {
  position: relative;
  display: grid;
  justify-items: center;
  width: 100%;
}

.gb-float__bob {
  width: 100%;
  position: relative;
  z-index: 1;
}

.gb-float__tilt {
  display: grid;
}

.gb-float__tilt img {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 6;
  object-fit: contain;
}

.gb-float__shadow {
  position: relative;
  width: 74%;
  aspect-ratio: 4 / 1;
  margin-top: -2%;
}

.gb-float__shadow::before {
  content: '';
  position: absolute;
  inset: 14% 6%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(18, 20, 23, 0.2) 0%, rgba(18, 20, 23, 0.08) 42%, transparent 72%);
  opacity: 0.9;
}

@keyframes gb-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes gb-shadow {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(0.86); opacity: 0.5; }
}

.gb-float--bob .gb-float__bob {
  animation: gb-bob 4s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

.gb-float--bob .gb-float__shadow::before {
  animation: gb-shadow 4s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

/* BAG DRAWER: native dialog from the right. Open 400ms, close 250ms, backdrop 300ms. */
.bag {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  width: min(420px, 100vw);
  max-width: 100vw;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  background: #ffffff;
  color: var(--ink);
  box-shadow: -24px 0 48px -24px rgba(18, 20, 23, 0.35);
  transform: translateX(100%);
  transition: transform 250ms var(--ease-drawer);
}

.bag.is-open {
  transform: none;
  transition-duration: 400ms;
}

.bag::backdrop {
  background: rgba(18, 20, 23, 0.45);
  opacity: 0;
  transition: opacity 250ms ease-out;
}

.bag.is-open::backdrop {
  opacity: 1;
  transition-duration: 300ms;
}

.bag__panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.bag__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 8px 20px;
  border-bottom: 1px solid var(--line);
}

.bag__title {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  text-transform: uppercase;
}

.ship {
  padding: 14px 20px 16px;
  border-bottom: 1px solid var(--line);
}

.ship__text {
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.ship__track {
  height: 6px;
  border-radius: 3px;
  background: var(--cloud);
  overflow: hidden;
}

.ship__fill {
  display: block;
  height: 100%;
  background: var(--blue);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 400ms var(--ease-out);
}

.bag__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 20px;
}

.bag__lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bag-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.bag-line__thumb {
  width: 72px;
  height: 90px;
  background: var(--cloud);
}

.bag-line__thumb img,
.pair__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.bag-line__thumb img.is-photo,
.pair__thumb img.is-photo {
  object-fit: cover;
  object-position: center top;
  padding: 0;
}

.bag-line__title {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

.bag-line__meta {
  margin: 2px 0 6px;
  font-size: 0.875rem;
  color: var(--muted);
}

.bag-line__ctrl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

.bag-line__price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stepper {
  display: inline-flex;
  align-items: center;
  height: 36px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.stepper button {
  position: relative;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 4px;
  background: none;
  font-size: 1.125rem;
  cursor: pointer;
  transition: transform 120ms var(--ease-out);
}

.stepper button::after {
  content: '';
  position: absolute;
  inset: -4px;
}

.stepper button:active:not(:disabled) {
  transform: scale(0.94);
}

.stepper button:disabled {
  color: #b7bbc2;
  cursor: default;
}

.stepper__n {
  min-width: 22px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.text-btn {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.pairs {
  padding: 20px 0 12px;
}

.pairs__title {
  margin-bottom: 12px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.pairs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
}

.pair {
  display: grid;
  align-content: start;
  gap: 2px;
  font-size: 0.875rem;
}

.pair__thumb {
  aspect-ratio: 4 / 5;
  margin-bottom: 6px;
  background: var(--cloud);
}

.pair__title {
  font-weight: 600;
  line-height: 1.3;
}

.pair__meta {
  color: var(--muted);
}

.pair__row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.pair__row select {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 6px;
  border: 1px solid var(--field);
  border-radius: 4px;
  background: #ffffff;
}

.bag__empty {
  padding: 40px 0;
}

.bag__empty p {
  margin-bottom: 16px;
}

/* Body text: the bag's own title already says it is the bag. */
.bag__empty .bag__empty-title {
  margin-bottom: 2px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.bag__foot {
  display: grid;
  gap: 4px;
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}

.bag__sub {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bag__small {
  font-size: 0.8125rem;
  color: var(--muted);
}

.bag__foot .btn {
  margin: 8px 0 4px;
}

/* Phone-only parts, hidden on wider screens (the phone rules at the end show them). */
.site-nav__sports,
.menu-scrim,
.filter-btn,
.active-chips,
.kit-bar,
.media-dots,
.bag__keep,
.sheet__handle {
  display: none;
}

/* Card colour indicator: up to four dots, then +n (every colour is in the quick view). */
.swatch-mini {
  --d: 14px; /* dot size */
  --pitch: 22px; /* dot size plus the gap between dots */
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 22px;
  margin: 2px 0 0 calc((var(--d) - var(--pitch)) / 2); /* the first dot's tap area starts half a gap early */
  font-size: 0.875rem;
  color: var(--muted);
}

/* With no +n the last dot's tap area ends half a gap past the dot; pull it back so a right-aligned row keeps its place. */
.swatch-mini:not(:has(.swatch-mini__more)) {
  margin-right: calc((var(--d) - var(--pitch)) / 2);
}

/* The visible dot is the padding box; the transparent border is the tap area (24px square, 44px tall on touch). Negative margins
   keep the row's height and the dots' spacing as they were, so neighbouring tap areas overlap by a few px.
   Inset shadows and ::before/::after sit on the padding box. */
.swatch-mini__dot {
  --hit-x: calc((24px - var(--d)) / 2);
  --hit-y: var(--hit-x);
  box-sizing: content-box;
  width: var(--d);
  height: var(--d);
  margin: calc(-1 * var(--hit-y)) calc((var(--pitch) - 24px) / 2);
  padding: 0;
  border: solid transparent;
  border-width: var(--hit-y) var(--hit-x);
  border-radius: 50%;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 1px rgba(18, 20, 23, 0.2);
  cursor: pointer;
  transition: transform 120ms var(--ease-out);
}

@media (pointer: coarse) {
  .swatch-mini__dot {
    --hit-y: calc((44px - var(--d)) / 2);
  }
}

/* The selected ring is a gradient layer centred on the dot: an outer box-shadow or outline would start at the tap area, and a
   tall tap area would make the outline a pill. The last layer is the dot's own colour, kept to the padding box. */
.swatch-mini__dot.is-on {
  background-image: radial-gradient(circle, transparent calc(var(--d) / 2 + 2px), var(--ink) calc(var(--d) / 2 + 2px), var(--ink) calc(var(--d) / 2 + 3px), transparent calc(var(--d) / 2 + 3px)), none;
  background-origin: border-box, padding-box; /* else the ring tile is only the dot's size and repeats */
  background-clip: border-box, padding-box;
}

.swatch-mini__dot:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.swatch-mini__dot:active {
  transform: scale(0.92);
}

@media (hover: hover) and (pointer: fine) {
  .swatch-mini__dot:hover {
    transform: scale(1.15);
  }
}

.swatch-mini__more {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: -3px -2px -3px 0; /* the right padding is tap area only: the row is pinned right on phones, so it is measured against the old layout */
  padding: 0 8px 0 calc((var(--pitch) - var(--d)) / 2);
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

@media (pointer: coarse) {
  .swatch-mini__more {
    min-height: 44px;
    margin-block: -13px;
  }
}

/* Add on the card picture: opens the quick view (colour, size, both pictures). */
.quick-add {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 14px 0 10px;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 10px -3px rgba(18, 20, 23, 0.3);
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}

.quick-add::after {
  content: '';
  position: absolute;
  inset: -4px;
}

.quick-add:active {
  transform: scale(0.96);
}

@media (hover: hover) and (pointer: fine) {
  .quick-add:hover {
    background: var(--ink);
    color: #ffffff;
  }
}

/* Opening screen: synced Shop-This-Look strip matching the active hero lookbook photo (zero height shift between slides). */
.hero-kit {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  max-width: 460px;
  margin-top: 20px;
  padding: 8px 12px 8px 8px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(18, 20, 23, 0.08);
}

.hero-kit__pics {
  display: flex;
  flex: none;
  gap: 4px;
  padding: 2px;
  border-radius: 6px;
  background: var(--cloud);
  overflow: hidden;
}

.hero-kit__pics img {
  width: 46px;
  height: 58px;
  border-radius: 4px;
  object-fit: contain;
}

.hero-kit__pics img.is-photo {
  object-fit: cover;
  object-position: 50% 18%;
}

.hero-kit__body {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 6px;
}

.hero-kit__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9375rem;
  line-height: 1.25;
}

.hero-kit__name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-kit__price {
  flex: none;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hero-kit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-kit__shop {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(18, 20, 23, 0.18);
  border-radius: 999px;
  background: var(--cloud);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.hero-kit__shop::after {
  content: '';
  position: absolute;
  inset: -7px -2px;
}

.hero-kit__shop:active {
  transform: scale(0.96);
}

@media (hover: hover) and (pointer: fine) {
  .hero-kit__shop:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #ffffff;
  }
}

.story__shop {
  margin-top: 12px;
}

/* AI disclosure: plain body text, never under 13px, directly under a studio photo or an AI store photo. */
.ai-note {
  margin-top: 6px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted);
}

.sheet-views + .ai-note {
  margin: -6px 0 12px;
}

.bag__body > .ai-note {
  margin: 4px 0 16px;
}

.kit-config__body > .ai-note {
  margin: 0;
  padding: 12px 20px;
}

/* Under the stage: the colours the On body photo really shows, then the disclosure. */
.stage-notes {
  display: grid;
  gap: 2px;
  padding: 10px 16px;
}

.stage-notes:empty {
  display: none;
}

.stage-notes .shown-note,
.stage-notes .ai-note {
  margin: 0;
  font-size: 0.875rem;
}

/* Studio photos are 3:4; in 4:5 tiles they crop from the top so the face and the garment both stay in. */
.prod-card__photo.is-studio,
.sheet-view.is-photo img.is-studio,
.studio-stage__img.is-store {
  object-position: 50% 20%;
}

.media-slide[data-view='worn'] .shown-note {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
}

/* KIT STUDIO OUTFIT: both cut-outs as one outfit over one dotted shadow (positions from app.js GB.outfitLayout). */
.stage-piece {
  display: block;
  padding: 0;
}

.outfit,
.outfit__group.gb-float__bob {
  position: absolute;
  inset: 0;
  width: auto;
}

/* Each garment is a button that selects its piece in the panel. */
.outfit__piece {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 200ms var(--ease-out);
}

.outfit__piece img {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 6;
  object-fit: contain;
  pointer-events: none;
}

.outfit__piece:focus-visible {
  outline-offset: -8px;
}

/* Once a piece is picked, the other one steps back, so the selection reads at a glance. */
.outfit.has-pick .outfit__piece:not(.is-highlighted) {
  opacity: 0.45;
}

.outfit__piece.is-off {
  opacity: 0.3;
}

.outfit__group .hotspot-dot {
  z-index: 3;
}

.outfit__shadow.gb-float__shadow {
  position: absolute;
  margin-top: -3%;
  z-index: 0;
}

.outfit__note {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Outfit / On body switch, top left of the stage (bottom left on phones) */
.stage-views {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.stage-views button {
  position: relative;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.stage-views button[aria-pressed='true'] {
  background: var(--ink);
  color: #ffffff;
}

/* Quick view: both pictures side by side */
.sheet-views {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.sheet-views.is-single {
  grid-template-columns: minmax(0, 0.5fr);
}

.sheet-view {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--cloud);
}

.sheet-view img {
  width: 82%;
  height: auto;
}

.sheet-view.is-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 14%;
}

.sheet-view .shown-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes menu-slide {
  from {
    transform: translateX(-100%);
  }
}

/* RESPONSIVE */
@media (max-width: 1180px) {
  .catalog__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* The stage photos are 480px wide, so the stage never grows past that; the configurator takes the rest. */
@media (max-width: 1100px) {
  .kit-studio__workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Stacked: the card first, then the crew photo full width at its own 3:2 shape, so no one is cropped out. */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__media {
    min-height: 0;
    aspect-ratio: 3 / 2;
  }

  .hero__title {
    font-size: clamp(4rem, 13vw, 7rem);
  }
}

@media (max-width: 900px) {
  .catalog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Narrow tiles: the count goes under the name on every tile, not only on the long ones. */
  .sport-tile__label {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 700px) {
  .kit-studio__workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-stage {
    max-width: 480px;
  }
}

@media (max-width: 820px) {
  .menu-btn {
    justify-self: start;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-left: -10px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .menu-btn__bars {
    position: relative;
    display: block;
    width: 20px;
    height: 12px;
  }

  .menu-btn__bars span {
    position: absolute;
    left: 0;
    width: 20px;
    height: 1.75px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 200ms var(--ease-out), width 200ms var(--ease-out);
  }

  .menu-btn__bars span:first-child {
    top: 2px;
  }

  .menu-btn__bars span:last-child {
    bottom: 2px;
    width: 14px;
  }

  .menu-btn.is-open .menu-btn__bars span:first-child {
    transform: translateY(3.1px) rotate(45deg);
  }

  .menu-btn.is-open .menu-btn__bars span:last-child {
    width: 20px;
    transform: translateY(-3.1px) rotate(-45deg);
  }

  .brand-lockup {
    justify-self: center;
    margin: 0;
  }

  /* Full-height frosted sportswear drawer under the header, over a soft dark scrim. */
  .site-nav {
    position: fixed;
    top: 61px;
    bottom: 0;
    left: 0;
    z-index: 2;
    width: min(86vw, 360px);
    display: none;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    border-right: 1px solid rgba(18, 20, 23, 0.08);
    box-shadow: 24px 0 48px -20px rgba(18, 20, 23, 0.24);
  }

  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-nav {
      -webkit-backdrop-filter: blur(22px) saturate(145%);
      backdrop-filter: blur(22px) saturate(145%);
    }
  }

  .site-nav.is-open {
    display: flex;
    animation: menu-slide 240ms var(--ease-out);
  }

  .menu-scrim {
    display: block;
    position: fixed;
    inset: 61px 0 0;
    z-index: 1;
    background: rgba(18, 20, 23, 0.38);
    animation: fade-in 200ms ease-out;
  }

  .site-nav > a {
    min-height: 52px;
    padding: 0 12px;
    margin: 0 -12px;
    border-bottom: 0;
    border-radius: 10px;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 1.875rem;
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    transition: background-color 140ms ease, transform 120ms var(--ease-out);
  }

  .site-nav > a:active {
    background: var(--cloud);
    transform: scale(0.98);
  }

  .site-nav__sports {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 6px 0 16px;
  }

  .site-nav .site-nav__sport {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: var(--cloud);
    font-family: var(--f-body);
    font-weight: 600;
    font-size: 0.9375rem;
    text-transform: none;
    color: var(--ink);
    transition: background-color 140ms ease, transform 120ms var(--ease-out);
  }

  .site-nav .site-nav__sport:active {
    background: var(--line);
    transform: scale(0.97);
  }

  .site-nav__foot {
    display: grid;
    gap: 12px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }

  .site-nav__cur {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ink);
  }

  .site-nav__note {
    font-size: 0.875rem;
    color: var(--muted);
  }

  /* Without scripts the menu button cannot work, so the links stay in view under the header. */
  html:not(.js) .menu-btn {
    display: none;
  }

  html:not(.js) .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    border: 0;
    padding: 0;
    box-shadow: none;
  }

  html:not(.js) .site-nav a {
    min-height: 44px;
    padding-right: 16px;
    border: 0;
    font-size: 1.25rem;
  }

  html:not(.js) .site-header__inner {
    flex-wrap: wrap;
  }

  .story {
    grid-template-columns: minmax(0, 1fr);
  }

  .story__media {
    max-width: 440px;
  }

  .community {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__caption {
    padding-left: 14px;
  }

  .sport-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .catalog__refine .select {
    flex: 1 1 140px;
  }

  .catalog__refine select {
    width: 100%;
  }

  .brand-lockup__name {
    font-size: 1.25rem;
  }

  /* Phone: the court photo leads full width, the other two sit side by side under it. */
  .community__photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .community__photos > :first-child {
    grid-column: 1 / -1;
  }

  .kit-piece {
    padding: 16px;
  }
}

/* REDUCED MOTION: keep the fades, drop the movement */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-nav.is-open {
    animation-name: fade-in;
  }

  .gb-float--bob .gb-float__bob,
  .gb-float--bob .gb-float__shadow::before {
    animation: none;
  }

  .btn:active:not(:disabled):not([aria-disabled="true"]),
  .bag-trigger:active,
  .icon-btn:active,
  .kit-tab:active,
  .chip:active,
  .pill:active .pill__txt,
  .stepper button:active:not(:disabled) {
    transform: none;
  }

  .add-btn .l-alt,
  .add-btn.is-added .l-main {
    transform: none;
  }

  [data-reveal].is-pending {
    transform: none;
  }

  .photo-reveal.is-pending {
    clip-path: none;
    opacity: 0;
  }

  .photo-reveal.is-pending img {
    transform: none;
  }

  .bag {
    transform: none;
    opacity: 0;
    transition: opacity 200ms ease-out;
  }

  .bag.is-open {
    transform: none;
    opacity: 1;
    transition-duration: 250ms;
  }

  .ship__fill {
    transition: none;
  }

  .prod-card:hover,
  .prod-card:hover .gb-float__tilt img,
  .prod-card:hover .prod-card__photo,
  .sport-tile:hover .sport-tile__media,
  .hotspot-dot:hover::before {
    transform: none !important;
  }
}

/* Kit Studio caption: name truncates on one line, price stays beside it */
.stage-caption {
  display: flex;
  max-width: 100%;
  min-width: 0;
}

.stage-caption__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-caption__price {
  flex: none;
  margin-left: 8px;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

/* Card pictures: both sit in one track. Wide screens show only the chosen one (Piece/Worn buttons). */
.media-track,
.media-slide {
  display: contents;
}

.prod-card__media:not(.is-worn) .media-slide[data-view='worn'],
.prod-card__media.is-worn .media-slide[data-view='piece'] {
  display: none;
}

/* BOTTOM SHEETS (size and filter, opened on phones): native dialogs from the bottom, open 320ms, close 250ms */
.sheet {
  position: fixed;
  inset: auto 0 0;
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
  max-width: 100%;
  max-height: calc(100svh - 48px);
  border-radius: 16px 16px 0 0;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 -24px 48px -24px rgba(18, 20, 23, 0.35);
  transform: translateY(100%);
  transition: transform 250ms var(--ease-drawer);
}

.sheet.is-open {
  transform: none;
  transition-duration: 320ms;
}

.sheet::backdrop {
  background: rgba(18, 20, 23, 0.45);
  opacity: 0;
  transition: opacity 250ms ease-out;
}

.sheet.is-open::backdrop {
  opacity: 1;
  transition-duration: 300ms;
}

.sheet__panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100svh - 48px);
}

.sheet__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 22px 8px 10px 16px;
  border-bottom: 1px solid var(--line);
}

.sheet .sheet__handle,
.bag .sheet__handle {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 36px;
  height: 4px;
  margin-left: -18px;
  border-radius: 2px;
  background: #c4c8cf;
}

.sheet .sheet__handle {
  display: block;
}

.sheet__title {
  flex: 1;
  min-width: 0;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}

.sheet__foot {
  display: grid;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}

.sheet__msg {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--error);
}

.sheet__msg:empty {
  display: none;
}

.btn--tall {
  min-height: 52px;
}

/* Share, on the quick view's Size guide row: a text button, and a menu of plain links that floats above it (it never grows the sheet). */
.share {
  position: relative;
  display: grid;
  justify-items: end;
}

.share[hidden] {
  display: none;
}

.sheet-sizes .size-extra {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.size-extra .size-guide {
  justify-self: auto;
}

.share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 0.9375rem/1.1 var(--f-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* The menu: the row of tiles and its padding, nothing else. The name label (above a tile) and the pill (above the labels) are absolute, so they take no room. */
.share__menu {
  --tile: 52px; /* six tiles, 5 px gaps and 8 px padding make a 355 px menu: it fits the 358 px sheet body from 390 px wide. Below that: two rows of three. */
  --gap: 5px;
  /* Sheen on every tile, on the tile only, never on a logo (Kelvin asked for a gradient iOS feel). Same hue, white 18 percent at the top fading to 0.
     To turn it off on the brand tiles, set this to none. */
  --brand-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  position: absolute;
  inset: auto 0 calc(100% + 4px) auto;
  z-index: 2;
  width: max-content;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 28px -8px rgba(18, 20, 23, 0.28);
  transform-origin: 100% 100%;
  scroll-margin: 70px 0 0; /* scrollIntoView leaves room above for the label and the pill */
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}

.share__menu[hidden] {
  display: none;
}

.share__menu.is-down {
  inset: calc(100% + 4px) 0 auto auto;
  transform-origin: 100% 0;
  scroll-margin: 0 0 44px; /* room below for the labels */
}

.share__menu.is-open {
  opacity: 1;
  transform: none;
  transition-duration: 200ms;
}

.share__list {
  display: grid;
  grid-template-columns: repeat(6, var(--tile));
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The tiles rise 5 px and fade in, 25 ms apart; the last one is done 275 ms after the open starts. */
.share__list li {
  position: relative;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}

.share__menu.is-open .share__list li {
  opacity: 1;
  transform: none;
  transition-duration: 150ms;
}

.share__menu.is-open .share__list li:nth-child(2) { transition-delay: 25ms; }
.share__menu.is-open .share__list li:nth-child(3) { transition-delay: 50ms; }
.share__menu.is-open .share__list li:nth-child(4) { transition-delay: 75ms; }
.share__menu.is-open .share__list li:nth-child(5) { transition-delay: 100ms; }
.share__menu.is-open .share__list li:nth-child(6) { transition-delay: 125ms; }

/* An app-icon tile: a rounded square with a tight and a soft shadow. The logo is about 55 percent of it. The shadow and the sheen are on the tile, never on the logo. */
.share__item {
  display: grid;
  place-items: center;
  width: var(--tile);
  height: var(--tile);
  padding: 0;
  border: 0;
  border-radius: 23%;
  background-color: #e8e8ec;
  background-image: linear-gradient(180deg, #fbfbfd, #e1e1e6);
  color: var(--ink);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 5px 10px -3px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out);
}

/* The brand tiles: brand colour with the sheen, an approved white logo on top. Pinterest: a white tile with the neutral sheen and its red badge on a white disc. */
.share__item--whatsapp { background-color: #25d366; background-image: var(--brand-sheen); color: #ffffff; }
.share__item--facebook { background-color: #0866ff; background-image: var(--brand-sheen); color: #ffffff; }
.share__item--x { background-color: #000000; background-image: var(--brand-sheen); color: #ffffff; }
.share__item--pinterest { background-color: #ffffff; background-image: linear-gradient(180deg, #ffffff, #ececf0); box-shadow: inset 0 0 0 1px #d9dbe0, 0 1px 1px rgba(0, 0, 0, 0.12), 0 5px 10px -3px rgba(0, 0, 0, 0.22); }

.share__item svg {
  display: block;
  width: 55%;
  height: 55%;
  overflow: visible; /* the Pinterest path reaches a hair past its viewBox; Chromium would clip the badge flat */
}

/* Keyboard focus: a dark ring outside the tile with a 2 px gap of the white menu, so it reads against the white menu and, through the gap, never sits on the tile or the logo. */
.share__item:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* The press answers on pointer down. */
.share__item:active {
  transform: scale(0.94);
  transition-duration: 80ms;
}

/* The name of a tile, a small card above it. Shown on hover (a fine pointer) and on keyboard focus. It is part of its tile's list item,
   so the pointer can move onto it without it going (WCAG 1.4.13); Escape closes the menu and with it the label. */
.share__label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  z-index: 3;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 6px 16px -6px rgba(18, 20, 23, 0.3);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  --lx: -50%; /* sideways centring, kept under reduced motion */
  --ly: 3px;  /* the small rise, removed under reduced motion */
  transform: translate(var(--lx), var(--ly));
  transition: opacity 120ms var(--ease-out), transform 120ms var(--ease-out), visibility 0s 120ms;
}

/* The first and last label line up with their tile's edge, so none runs past the menu. */
.share__list li:first-child .share__label { left: 0; --lx: 0px; }
.share__list li:last-child .share__label { left: auto; right: 0; --lx: 0px; }

/* A bridge over the gap, so moving from the tile to its label does not lose the hover. */
.share__label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 8px;
}

.share__list li:has(.share__item:focus-visible) .share__label {
  opacity: 1;
  visibility: visible;
  --ly: 0px;
  transition-delay: 0s;
}

/* With the menu below Share, labels go under their tiles and the pill under the menu. */
.share__menu.is-down .share__label { bottom: auto; top: calc(100% + 6px); }
.share__menu.is-down .share__label::after { top: auto; bottom: 100%; }

/* "Link copied": a pill above the labels that fades and rises in, stays about 1.5 s, and fades out. It stays a status for assistive technology. */
.share__status {
  position: absolute;
  right: 0;
  bottom: calc(100% + 38px);
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 6px 16px -6px rgba(18, 20, 23, 0.4);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.share__status.is-on {
  opacity: 1;
  transform: none;
}

.share__menu.is-down .share__status { bottom: auto; top: calc(100% + 38px); transform: translateY(-6px); }
.share__menu.is-down .share__status.is-on { transform: none; }

@media (min-width: 700px) {
  .share__menu {
    --tile: 56px;
    --gap: 8px;
  }
}

/* Under 390 px six 52 px tiles cannot share one row: two rows of three. */
@media (max-width: 389px) {
  .share__list { grid-template-columns: repeat(3, var(--tile)); }
  .share__list li { position: static; }
  /* Labels sit above the whole menu here, so a label never covers a tile of the other row. A label lines up with its column: the left edge for column 1, the right edge for column 3, centred for column 2, so none runs past the menu. */
  .share__list .share__label,
  .share__list li:first-child .share__label,
  .share__list li:last-child .share__label { bottom: calc(100% + 6px); left: 50%; right: auto; --lx: -50%; }
  .share__list li:nth-child(3n + 1) .share__label { left: 0; --lx: 0px; }
  .share__list li:nth-child(3n) .share__label { left: auto; right: 0; --lx: 0px; }
  .share__menu.is-down .share__list .share__label { bottom: auto; top: calc(100% + 6px); }
}

@media (hover: hover) and (pointer: fine) {
  .share__btn:hover { text-decoration: underline; text-underline-offset: 3px; }
  .share__item:hover { transform: translateY(-2px); box-shadow: 0 2px 2px rgba(0, 0, 0, 0.12), 0 9px 16px -4px rgba(0, 0, 0, 0.26); }
  .share__item--pinterest:hover { box-shadow: inset 0 0 0 1px #d9dbe0, 0 2px 2px rgba(0, 0, 0, 0.12), 0 9px 16px -4px rgba(0, 0, 0, 0.26); }
  .share__item:hover:active { transform: scale(0.94); }
  .share__list li:hover .share__label {
    opacity: 1;
    visibility: visible;
    --ly: 0px;
    transition-delay: 0s;
  }
  /* One label at a time: while the pointer is on a tile, the label of a tile that only has keyboard focus steps aside, so two labels never overlap. It returns when the pointer leaves. The focus ring stays. */
  .share__list:has(li:hover) li:not(:hover) .share__label {
    opacity: 0;
    visibility: hidden;
    transition-delay: 0s, 0s, 0s;
  }
}

/* Reduced motion: no movement or scale, short fades only. */
@media (prefers-reduced-motion: reduce) {
  .share__menu,
  .share__menu.is-open,
  .share__list li,
  .share__menu.is-open .share__list li,
  .share__status {
    transform: none !important;
    transition-property: opacity;
    transition-duration: 100ms;
    transition-delay: 0s;
  }
  /* The label keeps its sideways centring and loses only the rise. */
  .share__label { --ly: 0px !important; transition-property: opacity; transition-duration: 100ms; transition-delay: 0s; }
  .share__item,
  .share__item:hover,
  .share__item:active,
  .share__item:hover:active { transform: none; transition-property: box-shadow; }
}

.sheet-prod {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.sheet-prod__thumb {
  width: 72px;
  height: 90px;
  background: var(--cloud);
}

.sheet-prod__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.sheet-prod__thumb img.is-photo {
  object-fit: cover;
  object-position: center top;
  padding: 0;
}

.sheet-prod__price {
  font-family: var(--f-head);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.sheet-prod__colour {
  color: var(--muted);
}

.sheet-field {
  margin-top: 18px;
  font-weight: 600;
}

.sheet .swatch-row {
  gap: 0 8px;
}

/* Size buttons: four across, 44px, 8px apart; a sold-out size says so in the button. */
.sheet-sizes {
  margin-top: 8px;
}

.sheet-sizes .size-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sheet-sizes .pill {
  display: grid;
}

.sheet-sizes .pill__txt {
  width: 100%;
}

.sheet-sizes .pill.is-out .pill__txt {
  align-items: flex-start;
  padding-top: 5px;
}

.sheet-sizes .pill__out {
  top: auto;
  left: 0;
  right: 0;
  bottom: 5px;
  width: auto;
  height: auto;
  margin: 0;
  clip-path: none;
  font-size: 0.75rem;
  line-height: 1;
  text-align: center;
  color: var(--muted);
}

.sheet-sizes .size-guide {
  grid-column: 1 / -1;
  justify-self: start;
  font-size: 0.9375rem;
}

/* Filter sheet: radio rows, applied with the Show button */
.opt-group {
  min-width: 0;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.opt-group:last-child {
  margin-bottom: 0;
}

.opt-group legend {
  margin-bottom: 4px;
  padding: 0;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  cursor: pointer;
}

.opt input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--blue);
}

/* Under 900px the Piece/Worn buttons are at least 14px. */
@media (max-width: 899px) {
  .media-toggle button {
    font-size: 0.875rem;
  }
}

/* PHONE (360 to 699px): photo-first hero, two-column grid with a size sheet, filter sheet, kit bar, bag sheet. */
@media (max-width: 699px) {
  [data-drag] {
    touch-action: none;
  }

  /* Hero: the crew photo first, edge to edge, then the headline, one button and a text link. */
  .hero {
    padding: 0 0 40px;
    gap: 0;
  }

  .hero__media {
    order: -1;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
    border-radius: 0;
  }

  .hero__card {
    padding: 20px var(--gutter) 0;
    border-radius: 0;
    background: none;
  }

  .hero__title {
    max-width: none;
    font-size: clamp(3.25rem, 14.5vw, 3.5rem);
    line-height: 0.9;
  }

  .hero__lead {
    margin-top: 12px;
    font-size: 1.0625rem;
  }

  .hero__lead-long {
    display: none;
  }

  .hero-kit {
    margin-top: 14px;
    max-width: none;
    min-height: 70px;
    padding: 6px 10px 6px 6px;
    gap: 10px;
    background: var(--cloud);
    box-shadow: none;
  }

  .hero-kit__pics,
  .hero-kit__shop {
    background: #ffffff;
  }

  .hero-kit__pics img {
    width: 40px;
    height: 52px;
  }

  .hero-kit__actions {
    flex-wrap: nowrap;
  }

  .hero-kit__shop {
    padding: 0 10px;
    font-size: 0.78125rem;
    white-space: nowrap;
  }

  /* Kit Studio: the outfit and its total fill the first Kit Studio screen, before the size controls. */
  .kit-studio {
    padding-top: 32px;
  }

  .kit-studio__head .section-sub {
    display: none;
  }

  .studio-stage__frame {
    aspect-ratio: 4 / 5;
  }

  .studio-stage__name {
    font-size: 1.375rem;
  }

  .hero__cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 16px;
  }

  .hero__cta-row .btn--primary {
    min-height: 52px;
  }

  .hero__cta-row .btn--secondary {
    align-self: flex-start;
    min-height: 44px;
    padding: 0;
    background: none;
    box-shadow: none;
    color: var(--blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }

  .hero__meta {
    margin-top: 2px;
    padding-top: 0;
    border-top: 0;
    font-size: 0.875rem;
  }

  /* Sideways snap rows: sport chips and kit tabs never wrap; a fade on the right says there is more. */
  .chip-row,
  .kit-tabs {
    position: relative;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter));
    padding: 4px calc(var(--gutter) + 32px) 4px var(--gutter);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
  }

  .chip-row::-webkit-scrollbar,
  .kit-tabs::-webkit-scrollbar {
    display: none;
  }

  .chip-row > *,
  .kit-tabs > * {
    flex: none;
    scroll-snap-align: start;
  }

  .kit-tabs {
    margin-top: 20px;
    margin-bottom: 16px;
  }

  /* Filters: one sticky row, the Filters button (gender, type, sort in a sheet) then the sport chips. */
  .catalog {
    padding-top: 16px;
  }

  #catalog {
    scroll-margin-top: 61px;
  }

  .catalog__refine {
    display: none;
  }

  .filter-bar {
    position: sticky;
    top: 61px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px calc(-1 * var(--gutter)) 0;
    padding: 6px 0 6px var(--gutter);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .filter-bar .chip-row {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding-left: 2px;
  }

  .filter-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 4px;
    background: var(--ink);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 120ms var(--ease-out);
  }

  .filter-btn:active {
    transform: scale(0.97);
  }

  .filter-btn__n {
    margin-left: 4px;
    font-variant-numeric: tabular-nums;
  }

  .active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }

  .active-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 10px 0 12px;
    border: 0;
    border-radius: 18px;
    background: var(--cloud);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
  }

  .active-chip::after {
    content: '';
    position: absolute;
    inset: -4px 0;
  }

  /* Collection: a two-column grid where the clothes get the room. Name, then the store's one-line subtitle,
     then price beside the colour dots. */
  .catalog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
    margin-top: 6px;
    scroll-margin-top: 130px;
  }

  .active-chips {
    scroll-margin-top: 130px;
  }

  .prod-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    align-content: start;
    gap: 2px 8px;
    padding-top: 6px;
  }

  .prod-card__top {
    display: contents;
  }

  /* Every name takes two lines' height, so prices line up across a row even when one name is short
     or a card has no subtitle (the subtitle row keeps its height). */
  .prod-card__body {
    grid-template-rows: auto minmax(18px, auto) auto;
    padding-top: 6px;
  }

  .prod-card__title {
    grid-column: 1 / -1;
    font-size: 0.9375rem;
    line-height: 1.25;
  }

  .prod-card__title .prod-card__link {
    position: relative;
    display: block;
    min-height: 2.5em;
    margin: 0;
    padding: 0;
  }

  /* A 45px tap area: 4px into the space above and the subtitle row below, never over the price or the Add pill. */
  .prod-card__title .prod-card__link::after {
    content: '';
    position: absolute;
    inset: -4px 0;
  }

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

  .prod-card__meta {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    overflow: hidden;
    font-size: 0.875rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .prod-card__price {
    grid-row: 3;
    font-size: 0.9375rem;
    font-weight: 600;
  }

  .swatch-mini {
    --d: 12px;
    --pitch: 18px;
    grid-row: 3;
    margin-block: 0;
    font-size: 0.8125rem;
  }

  .swatch-mini__more {
    padding-inline: 2px;
  }

  .media-toggle {
    display: none;
  }

  /* Tiles hold only the garment, the two view dots and the Add pill (the dotted floor stays in the Kit Studio). */
  .prod-card__media .gb-float__shadow {
    display: none;
  }

  .prod-card__badge {
    top: 8px;
    left: 8px;
    font-size: 0.75rem;
  }

  .quick-add {
    right: 6px;
    bottom: 6px;
  }

  /* Piece and worn photo: swipe between them inside the picture. */
  .media-track {
    position: absolute;
    inset: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .media-track::-webkit-scrollbar {
    display: none;
  }

  .prod-card__media .media-track .media-slide[data-view] {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .prod-card__media .shown-note {
    top: 8px;
    right: 8px;
    bottom: auto;
    left: auto;
    font-size: 0.75rem;
    text-align: right;
  }

  .prod-card__media:has(.prod-card__badge) .shown-note {
    top: 36px;
  }

  /* The two dots sit on the picture, bottom left, clear of the Add button: 24px targets, 8px apart. */
  .media-dots {
    position: absolute;
    left: 6px;
    bottom: 8px;
    z-index: 2;
    display: flex;
    gap: 8px;
  }

  .media-dot {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }

  .media-dot::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: #b7bbc2;
    box-shadow: 0 0 0 1.5px #ffffff;
    transition: transform 150ms var(--ease-out), background-color 150ms ease;
  }

  .media-dot[aria-pressed='true']::before {
    background: var(--ink);
    transform: scale(1.4);
  }

  .catalog__more .btn {
    width: 100%;
  }

  /* Kit Studio */
  .studio-stage {
    max-width: none;
  }

  /* The kit tabs row does this job on phones; the bar keeps the whole width for the outfit total. */
  .studio-stage__arrows {
    display: none;
  }

  .studio-stage__bar {
    padding: 10px 16px 4px;
  }

  .studio-stage__head {
    padding-right: 0;
  }

  /* Outfit view on phones: the garments are the buttons, so no dots on them (the On body photo keeps its dot). */
  .outfit__group .hotspot-dot {
    display: none;
  }

  /* The switch sits bottom left, clear of a model's face. */
  .stage-views {
    top: auto;
    bottom: 10px;
  }

  .outfit__note {
    top: 10px;
    bottom: auto;
  }

  .size-row {
    gap: 8px;
  }

  .swatch-row {
    gap: 0 8px;
  }

  /* The caption wraps to two lines instead of cutting the name. */
  .stage-caption {
    display: block;
    padding: 6px 0;
    line-height: 1.35;
  }

  .stage-caption__name {
    white-space: normal;
    overflow: visible;
  }

  /* A tapped dot marks its piece in the caption and in the panel. */
  .stage-caption.is-highlighted {
    color: var(--blue);
    text-decoration-color: var(--blue);
  }

  .kit-piece.is-highlighted {
    background: #eef2fa;
    box-shadow: inset 4px 0 0 var(--blue);
  }

  /* The panel footer stays usable while Kit Studio is on screen; the sticky kit bar slides in after you scroll past it. */
  .kit-config__footer {
    padding-top: 16px;
  }

  .kit-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35; /* over the sticky filter bar, under the header and its menu */
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 24px -18px rgba(18, 20, 23, 0.3);
    visibility: hidden;
    transform: translateY(110%);
    transition: transform 250ms var(--ease-out), visibility 0s linear 250ms;
  }

  .kit-bar.is-shown {
    visibility: visible;
    transform: none;
    transition: transform 250ms var(--ease-out), visibility 0s;
  }

  /* The fixed kit bar grows with its message line: app.js keeps --kit-bar-h at its real height (80 px is the fallback), so the footer's last lines (AI-photos note, credit) end above it. */
  .site-footer {
    padding-bottom: calc(var(--kit-bar-h, 80px) + 16px + env(safe-area-inset-bottom, 0px));
  }

  .kit-bar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .kit-bar .kit-total__price {
    font-size: 1.25rem;
  }

  .kit-bar__btn {
    flex: none;
    min-height: 52px;
    padding: 0 20px;
  }

  .kit-bar__msg {
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--error);
  }

  .kit-bar__msg:empty {
    display: none;
  }

  /* Bag: a bottom sheet with a grab handle; the full-width buttons sit in thumb reach. */
  .bag {
    inset: auto 0 0;
    width: 100%;
    height: calc(100svh - 48px);
    max-height: calc(100svh - 48px);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -24px 48px -24px rgba(18, 20, 23, 0.35);
    transform: translateY(100%);
  }

  .bag.is-open {
    transform: none;
    transition-duration: 320ms;
  }

  .bag.is-empty {
    height: auto;
  }

  .bag .sheet__handle {
    display: block;
  }

  .bag__head {
    position: relative;
    padding: 22px 8px 8px 16px;
  }

  .ship {
    padding: 12px 16px 14px;
  }

  .bag__body {
    padding: 0 16px;
  }

  .bag__foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .bag__foot .btn {
    margin: 4px 0;
  }

  .bag__keep {
    display: inline-flex;
  }

  .bag__empty {
    padding: 24px 0 calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .bag__empty .btn {
    width: 100%;
    min-height: 52px;
  }

  .stepper {
    height: 44px;
  }

  .stepper button {
    width: 44px;
    height: 44px;
  }

  .stepper button::after {
    display: none;
  }

  /* Pairs well with: a sideways snap row of small cards. */
  .pairs__list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 16px 4px;
  }

  .pairs__list::-webkit-scrollbar {
    display: none;
  }

  .pair {
    flex: 0 0 120px;
    scroll-snap-align: start;
  }

  .pair__row {
    flex-direction: column;
  }
}

/* Phone grid rows with subgrid: each card spans five rows (picture, disclosure, name, subtitle, price), so a row
   of cards is only as tall as its tallest name. Without subgrid the fixed two-line name height above is the fallback. */
@media (max-width: 699px) {
  @supports (grid-template-rows: subgrid) {
    .prod-card {
      display: grid;
      grid-row: span 5;
      grid-template-rows: subgrid;
      grid-template-columns: minmax(0, 1fr) auto;
      row-gap: 0;
      column-gap: 8px;
      align-items: start;
    }

    .prod-card__body,
    .prod-card__top {
      display: contents;
    }

    .prod-card__media {
      grid-column: 1 / -1;
      grid-row: 1;
    }

    .prod-card > .ai-note {
      grid-column: 1 / -1;
      grid-row: 2;
    }

    .prod-card__title {
      grid-column: 1 / -1;
      grid-row: 3;
      padding-top: 6px;
    }

    .prod-card__title .prod-card__link {
      min-height: 0;
    }

    /* Tap area at least 44px even for a one-line name: from the top of the name row down over the subtitle row
       (always there, 18px), ending 4px short of the price. */
    .prod-card__title .prod-card__link::after {
      inset: -6px 0 -24px;
    }

    .prod-card__meta {
      grid-column: 1 / -1;
      grid-row: 4;
      min-height: 18px;
      margin-top: 2px;
    }

    .prod-card__price {
      grid-column: 1;
      grid-row: 5;
      align-self: center;
      margin-top: 6px;
    }

    .prod-card .swatch-mini {
      grid-column: 2;
      grid-row: 5;
      align-self: center;
      margin-top: 6px;
    }
  }
}

/* Wide screens: the quick view is a centred dialog. */
@media (min-width: 700px) {
  .sheet {
    inset: 0;
    margin: auto;
    width: min(560px, calc(100% - 48px));
    height: fit-content;
    max-height: calc(100dvh - 64px);
    border-radius: 8px;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out);
  }

  .sheet.is-open {
    opacity: 1;
    transform: none;
    transition-duration: 250ms;
  }

  .sheet__panel {
    max-height: calc(100dvh - 64px);
  }

  .sheet .sheet__handle {
    display: none;
  }

  .sheet__head {
    padding-top: 10px;
  }
}

/* Reduced motion on phones: sheets, bar and dots fade instead of moving. */
@media (prefers-reduced-motion: reduce) {
  .sheet,
  .bag,
  .kit-bar {
    transform: none !important;
    opacity: 0;
    transition: opacity 200ms ease-out, visibility 0s linear 200ms;
  }

  .sheet.is-open,
  .bag.is-open,
  .kit-bar.is-shown {
    opacity: 1;
    transition: opacity 250ms ease-out, visibility 0s;
  }

  .media-dot[aria-pressed='true']::before,
  .filter-btn:active {
    transform: none;
  }
}

/* Concept 1 motion & feedback (items 4, 5, 6, 7): bag flight, collection cascade + second-photo preview,
   moving community gallery with scroll depth, tactile button press and Join confirmation. */
.bag-flight {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  object-fit: contain;
  transform-origin: center;
  will-change: transform, opacity;
}

.prod-card.card-entering {
  transition: opacity 320ms ease-out var(--cascade, 0ms), transform 320ms var(--ease-out) var(--cascade, 0ms);
}

.prod-card.card-pending {
  opacity: 0;
  transform: translateY(14px);
}

.prod-card:focus-within {
  opacity: 1;
  transform: none;
}

.prod-card__media.is-previewing .media-track {
  overflow: hidden;
}

.prod-card__media.is-previewing .media-track .media-slide[data-view='worn'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  opacity: 1;
  z-index: 1;
  animation: fade-in 180ms ease-out;
}

.prod-card__media.is-previewing .media-track .media-slide[data-view='piece'] {
  opacity: 0;
}

.preview-ai {
  display: none;
}

.prod-card__media.is-previewing:not(.is-worn) > .preview-ai {
  display: block;
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 52px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.community__gallery {
  min-width: 0;
  max-width: 100%;
}

.community__pause {
  display: block;
  margin: 0 0 12px auto;
}

.community__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--blue) var(--cloud);
}

.community__photos {
  display: flex;
  gap: 0;
  width: max-content;
  animation: community-drift 96s linear infinite;
  animation-play-state: paused;
}

.community__group {
  display: flex;
  gap: 16px;
  padding-right: 16px;
}

.community__group figure {
  flex: 0 0 clamp(180px, 19vw, 260px);
  width: clamp(180px, 19vw, 260px);
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--cloud);
}

.community__group img {
  width: 100%;
  height: 108%;
  object-fit: cover;
  transform: translateY(calc(-4% + var(--depth, 0px)));
}

.community.motion-visible .community__photos {
  animation-play-state: running;
}

.community:is(:hover, :focus-within, .is-paused) .community__photos {
  animation-play-state: paused;
}

@keyframes community-drift {
  to {
    transform: translateX(-50%);
  }
}

.motion-hidden .community__photos {
  animation-play-state: paused !important;
}

/* Tactile press feedback across secondary controls (120ms strong ease-out, transform only). */
.seg__btn,
.config-tab,
.stage-views button,
.media-toggle button,
.cur-switch button,
.active-chip,
.menu-btn,
.text-btn,
.text-link {
  transition: transform 120ms var(--ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.seg__btn:active:not(:disabled),
.config-tab:active:not(:disabled),
.stage-views button:active:not(:disabled),
.media-toggle button:active:not(:disabled),
.cur-switch button:active:not(:disabled),
.active-chip:active:not(:disabled),
.menu-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.text-btn:active:not(:disabled),
.text-link:active:not(:disabled) {
  transform: scale(0.98);
}

.swatch-dot__fill {
  transition: transform 120ms var(--ease-out);
}

.swatch-dot:active:not(:disabled) .swatch-dot__fill {
  transform: scale(0.92);
}

.drop-form__submit.is-joined {
  background: var(--ink);
  color: #ffffff;
  box-shadow: none;
}

@media (max-width: 699px) {
  .community__group {
    gap: 12px;
    padding-right: 12px;
  }

  .community__group figure {
    flex-basis: 210px;
    width: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cur-switch::before,
  .menu-btn__bars span {
    transition: none;
  }

  .cur-chip:active,
  .site-nav > a:active,
  .site-nav .site-nav__sport:active {
    transform: none !important;
  }

  .prod-card.card-entering {
    transition: opacity 150ms ease-out;
  }

  .prod-card.card-pending {
    opacity: 1;
    transform: none;
  }

  .prod-card__media.is-previewing .media-track .media-slide[data-view='worn'] {
    animation: none;
  }

  .community__pause,
  .community__group[aria-hidden] {
    display: none;
  }

  .community__viewport {
    overflow: visible;
  }

  .community__photos {
    animation: none !important;
    transform: none !important;
    width: 100%;
  }

  .community__group {
    width: 100%;
    padding-right: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .community__group figure {
    flex: none;
    width: auto;
  }

  .community__group img {
    height: 100%;
    transform: none !important;
  }

  .seg__btn:active:not(:disabled),
  .config-tab:active:not(:disabled),
  .stage-views button:active:not(:disabled),
  .media-toggle button:active:not(:disabled),
  .cur-switch button:active:not(:disabled),
  .active-chip:active:not(:disabled),
  .menu-btn:active:not(:disabled),
  .text-btn:active:not(:disabled),
  .text-link:active:not(:disabled),
  .swatch-dot:active:not(:disabled) .swatch-dot__fill,
  .swatch-mini__dot:active,
  .swatch-mini__dot:hover,
  .quick-add:active,
  .bag-fab:active,
  .hero-kit:active {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 560px) {
  .community__group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .community__group > :first-child {
    grid-column: 1 / -1;
  }
}

/* ---------- Checkout: message under the button, and the thank-you page ---------- */

#bag-msg:empty {
  display: none;
}

.thanks {
  max-width: 34rem;
  margin: 0 auto;
  padding: 96px 24px 120px;
}

.thanks__title {
  margin: 0 0 20px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 4.5rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.thanks__text {
  margin: 0 0 12px;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.thanks .btn {
  margin-top: 20px;
}

/* ---------- Policy pages (DRAFT until the owner approves them) ---------- */

.policy {
  max-width: 44rem;
  margin: 0 auto;
  padding: 72px 24px 120px;
}

.policy__draft {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 2px solid currentColor;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
}

.policy h1 {
  margin: 0 0 8px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  line-height: 1;
  text-transform: uppercase;
}

.policy h2 {
  margin: 32px 0 8px;
  font-size: 1.1875rem;
}

.policy p,
.policy li {
  font-size: 1.0625rem;
  line-height: 1.55;
}

.policy p {
  margin: 0 0 12px;
}

.policy ul {
  margin: 0 0 12px;
  padding-left: 1.25rem;
}

.policy__updated {
  color: var(--muted);
  font-size: 0.9375rem;
}

.policy__owner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 4px solid currentColor;
  background: rgba(0, 0, 0, 0.05);
  font-size: 1rem;
  line-height: 1.5;
}

.policy__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.policy__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--blue);
  font-weight: 600;
}

/* SALE BANNER: an announcement line above the header, and one offer line in the hero. Both are hidden by app.js outside the sale. */
.announce {
  background: var(--blue);
  color: #ffffff;
}

.announce__text {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px var(--gutter);
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}

.hero__offer {
  max-width: 40ch;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1.5px var(--blue);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

/* ACCOUNT: the header icon (hidden until sign-in is set up). Signed out: an outline person. Signed in: the shopper's initial in a blue disc. */
.account {
  position: relative;
}

.account__btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--ease-out), background-color 150ms ease;
}

.account__btn:active {
  transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
  .account__btn:hover {
    background: var(--cloud);
  }
}

.account__initial {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  font: 600 0.9375rem/1 var(--f-body);
}

.account__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  gap: 12px;
  width: min(280px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--line), 0 12px 32px -12px rgba(18, 20, 23, 0.3);
}

.account__who {
  color: var(--muted);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.account__who strong {
  color: var(--ink);
}

@media (max-width: 820px) {
  .account__menu {
    right: -84px; /* lines up with the bag button past Search, so the panel stays inside a phone screen */
  }
}

/* CHECKOUT STEP inside the bag: sign in or continue as a guest, then name and email. It replaces the bag's body until it closes. */
.bag.is-step .ship,
.bag.is-step .bag__body,
.bag.is-step .bag__foot {
  display: none;
}

.bag__step {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
}

.bag__step > div,
.bag__step > form {
  display: grid;
  gap: 12px;
}

.bag__step-title {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.bag__step-text {
  color: var(--muted);
}

.bag__step-back {
  justify-self: start;
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-size: 0.9375rem;
  font-weight: 500;
}

.field__input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--field);
  border-radius: 4px;
  background: #ffffff;
}

.field__input[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

.field__error,
.guest__alert {
  color: var(--error);
  font-size: 0.9375rem;
  font-weight: 600;
}

.guest__alert:empty {
  display: none;
}

/* SIGN-IN PAGE */
.auth {
  display: grid;
  justify-items: start;
  gap: 16px;
  max-width: 460px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) var(--gutter) var(--section);
}

.auth__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.auth__title {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(2.5rem, 9vw, 3.5rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.auth__lead {
  max-width: 40ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

.auth__panel {
  display: grid;
  gap: 12px;
  width: 100%;
}

.auth__panel[hidden] {
  display: none;
}

#clerk-sign-in {
  display: flex;
  justify-content: center;
  width: 100%;
}

.auth__guest {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.auth__note {
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (prefers-reduced-motion: reduce) {
  .account__btn {
    transition: none;
  }
}

/* The bag when checkout is not available (GET /api/checkout/status said off or could not be reached): one message, one Retry button. */
.bag__unavailable {
  display: grid;
  gap: 8px;
  margin: 8px 0 4px;
}

.bag__unavailable-text {
  font-size: 1rem;
  font-weight: 600;
}

.bag__foot .bag__unavailable .btn {
  margin: 0;
}

/* The quick view's stock line: "Checking stock…", or "could not be checked" with Try again */
.sheet-stock {
  display: grid;
  justify-items: start;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Size tables (sizing-guide.html): the table scrolls sideways inside its own box on a narrow screen; the page itself never does.
   The box can be focused, so the table can be scrolled with the keyboard. */
.table-scroll {
  max-width: 100%;
  margin: 0 0 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.table-scroll:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* The women's chart image: the full width of the content column */
.size-chart {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.policy__table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 1rem;
}

.policy__table caption {
  padding: 0 0 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: left;
}

.policy__table th,
.policy__table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.policy__table th {
  background: var(--cloud);
  font-weight: 600;
}

/* SEARCH: the header button on all nine pages and its panel (search.js). A modal under the header from 700px,
   the full width at the top of the screen on phones. Only the result list scrolls. */
.search-trigger {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--ease-out), background-color 150ms ease;
}

.search-trigger:active {
  transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
  .search-trigger:hover {
    background: var(--cloud);
  }
}

/* The eight pages without the shop header: the logo at the left, Search at the right edge, at every width */
.site-header__inner:not(:has(.menu-btn)) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__inner:not(:has(.menu-btn)) .search-trigger {
  margin-right: -8px;
}

/* Home on a narrow phone: menu, logo at the left, then the actions, so the three header buttons still fit */
@media (max-width: 520px) {
  .site-header__inner:has(.menu-btn) {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
  }

  .site-header__inner:has(.menu-btn) .brand-lockup {
    justify-self: start;
  }

  .header-actions {
    gap: 2px;
  }
}

/* With the account icon showing, the currency chip moves into the menu (its full switch is there already) */
@media (max-width: 480px) {
  .site-header__inner:has(.account:not([hidden])) .cur-chip {
    display: none;
  }
}

.search-dialog {
  position: fixed;
  top: calc(var(--search-top, 65px) - 1px);
  right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  bottom: auto;
  left: auto;
  width: min(520px, calc(100vw - 2 * var(--gutter)));
  max-width: none;
  max-height: min(640px, calc(100dvh - var(--search-top, 65px) - 24px));
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 16px 40px -16px rgba(18, 20, 23, 0.28);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 140ms var(--ease-out), transform 140ms var(--ease-out);
}

.search-dialog[open] {
  display: flex;
  flex-direction: column;
}

.search-dialog.is-open {
  opacity: 1;
  transform: none;
  transition-duration: 180ms;
}

.search-dialog::backdrop {
  background: rgba(18, 20, 23, 0.45);
  opacity: 0;
  transition: opacity 140ms ease-out;
}

.search-dialog.is-open::backdrop {
  opacity: 1;
  transition-duration: 180ms;
}

.search-dialog__panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  transition: none; /* only the dialog moves (opacity and transform); the panel inside it never animates */
}

.search-dialog__top {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  padding: 14px 20px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

/* The label and Close share the first row, the field takes the second (Close follows the field in the markup, for Tab) */
.search-dialog__title {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
}

.search-dialog__close {
  grid-row: 1;
  grid-column: 2;
  margin-right: -8px;
}

.search-dialog__input {
  grid-row: 2;
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--field);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.4 var(--f-body);
}

/* No native clear button: it is under 44px; clearing is select and delete, or Esc and reopen */
.search-dialog__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-dialog__input:focus {
  border-color: var(--blue);
}

.search-dialog__input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.search-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.search-dialog__group-label {
  padding: 14px 20px 6px;
  color: var(--muted);
  font: 600 0.875rem/1.3 var(--f-body);
}

.search-results {
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-results li + li {
  border-top: 1px solid var(--line);
}

.search-result {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  padding: 10px 20px;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  scroll-margin-block: 8px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--ease-out), background-color 120ms ease;
}

.search-result:active {
  background: var(--cloud);
  transform: scale(0.99);
}

.search-result:focus-visible {
  background: var(--cloud);
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
  .search-result:hover {
    background: var(--cloud);
  }
}

.search-result__thumb {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 70px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--cloud);
}

.search-result__thumb img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

/* A picture that cannot load keeps its space, as a plain frame */
.search-result__thumb.is-broken {
  box-shadow: inset 0 0 0 1px var(--line);
}

.search-result__thumb.is-broken img {
  display: none;
}

.search-result__info {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding-top: 2px;
}

.search-result__title {
  font: 600 1rem/1.3 var(--f-body);
  overflow-wrap: break-word;
}

.search-result__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  font-size: 0.9375rem;
  line-height: 1.35;
}

.search-result__price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.search-result__colours {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.search-dialog__state {
  padding: 20px;
  color: var(--muted);
  font: 500 0.9375rem/1.45 var(--f-body);
}

.search-dialog__state--error {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.search-dialog__error {
  color: var(--error);
  font: 600 1rem/1.4 var(--f-body);
}

.search-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.search-dialog__empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 20px;
}

.search-dialog__empty-msg {
  max-width: 100%;
  color: var(--ink);
  font: 500 1rem/1.45 var(--f-body);
  overflow-wrap: anywhere;
}

.search-dialog__more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 4px;
  border-top: 1px solid var(--line);
}

.search-dialog__shown {
  color: var(--muted);
  font: 500 0.875rem/1.35 var(--f-body);
  font-variant-numeric: tabular-nums;
}

.search-dialog__more .btn--small {
  padding: 0 16px;
}

@media (max-width: 820px) {
  .search-dialog {
    top: calc(var(--search-top, 61px) - 1px);
    max-height: min(640px, calc(100dvh - var(--search-top, 61px) - 24px));
  }
}

/* Phones: the whole width from the top of the visible screen, kept above the on-screen keyboard */
@media (max-width: 699px) {
  .search-dialog {
    top: var(--search-vvt, 0px);
    right: 0;
    left: 0;
    width: 100%;
    max-height: var(--search-vvh, 100dvh);
    border: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 36px -16px rgba(18, 20, 23, 0.3);
  }

  .search-dialog__top {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 14px;
  }

  .search-dialog__body {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .search-dialog__group-label {
    padding: 14px 16px 6px;
  }

  .search-result {
    gap: 12px;
    padding: 10px 16px;
  }

  .search-dialog__state,
  .search-dialog__empty {
    padding: 20px 16px;
  }

  .search-dialog__more {
    padding: 14px 16px 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-dialog,
  .search-dialog.is-open {
    transform: none;
  }

  .search-dialog {
    transition: opacity 120ms ease-out;
  }

  .search-dialog.is-open {
    transition-duration: 160ms;
  }

  .search-dialog::backdrop {
    transition-duration: 120ms;
  }

  .search-dialog.is-open::backdrop {
    transition-duration: 160ms;
  }

  .search-trigger:active,
  .search-dialog__close:active,
  .search-result:active {
    transform: none;
  }
}
