/* The composition stays in two columns on mobile and desktop. */
.phone {
  position: relative;
  width: 100%;
  min-height: 100svh;
  padding-bottom: calc(var(--large-action-height) + max(var(--footer-bottom), env(safe-area-inset-bottom)) + var(--spacing-12));
  background: var(--color-paper);
  container-type: inline-size;
}

::selection {
  background: var(--color-carbon-black);
  color: var(--color-paper-white);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font-weight: 400;
}

.content-rail {
  margin-inline: var(--page-gutter);
  border-inline: 1px solid var(--color-line);
}

.breadcrumb-rail {
  padding-inline: var(--page-gutter);
  border-bottom: 1px solid var(--color-line);
}

.breadcrumb {
  display: flex;
  align-items: center;
  height: calc(var(--breadcrumb-height) - 1px);
  padding-inline: 6px;
  border-inline: 1px solid var(--color-line);
  font-family: var(--font-mono);
  font-size: var(--text-breadcrumb);
  line-height: var(--leading-breadcrumb);
  letter-spacing: var(--tracking-breadcrumb);
}

.breadcrumb a {
  text-decoration: none;
}

.menubar {
  height: var(--menubar-height);
  border-bottom: 1px solid var(--color-line);
}

.nav-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  height: 100%;
  margin-inline: var(--page-gutter);
  padding-inline: var(--spacing-4);
  border-inline: 1px solid var(--color-line);
}

.nav-group {
  display: flex;
  align-items: center;
}

.nav-group-start {
  justify-self: start;
  margin-left: -6px;
}

.nav-group-end {
  justify-self: end;
  margin-right: -6px;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 var(--tap-target);
  width: var(--tap-target);
  height: var(--tap-target);
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: var(--radius-pill);
}

.icon-button+.icon-button {
  margin-left: -8px;
}

.icon-disc {
  display: grid;
  place-items: center;
  width: var(--nav-icon-size);
  height: var(--nav-icon-size);
  background: var(--color-mist-gray);
  border-radius: var(--radius-pill);
}

.icon-button img {
  flex-shrink: 0;
}

.icon-button[aria-expanded='true'] .icon-disc {
  outline: 1px solid var(--color-carbon-black);
}

.brand {
  display: block;
  height: var(--brand-height);
  aspect-ratio: 1063 / 354;
  background: var(--color-carbon-black);
}

.brand img {
  width: 100%;
  height: 100%;
}

.basket-count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding-inline: 3px;
  border-radius: var(--radius-pill);
  background: var(--color-carbon-black);
  color: var(--color-paper-white);
  font-size: 9px;
  line-height: 16px;
  text-align: center;
}

.header-panels {
  position: absolute;
  top: calc(var(--breadcrumb-height) + var(--menubar-height));
  inset-inline: var(--page-gutter);
  z-index: 4;
}

.header-panel {
  border: 1px solid var(--color-line);
  padding: var(--spacing-12);
  background: var(--color-paper);
  font-size: 12px;
}

.panel-heading {
  margin-bottom: var(--spacing-12);
  font-size: 24px;
  font-weight: 400;
  text-transform: uppercase;
}

.panel-link {
  display: flex;
  align-items: center;
  min-height: var(--tap-target);
  width: 100%;
  border: 0;
  background: transparent;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
  text-align: left;
}

.region-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-12);
}

.field-label {
  color: var(--color-ash-gray);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.basket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-12);
  border-bottom: 1px solid var(--color-line);
  padding-block: var(--spacing-8);
}

.remove-button {
  min-width: var(--tap-target);
  min-height: var(--tap-target);
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 11px;
}

.basket-summary {
  margin-top: var(--spacing-12);
}

.catalog-heading {
  display: flex;
  align-items: center;
  min-height: var(--heading-height);
  padding: 22px var(--spacing-24);
  border-bottom: 1px solid var(--color-line);
}

.catalog-heading h1 {
  color: var(--color-carbon-black);
  font-size: min(var(--text-heading), 8.2cqw);
  font-weight: 400;
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  text-transform: uppercase;
  white-space: nowrap;
}

.catalog-description {
  min-height: var(--description-height);
  padding: var(--spacing-12);
  border-bottom: 1px solid var(--color-line);
}

.catalog-description p {
  max-width: 70ch;
  color: var(--color-carbon-black);
  font-size: var(--text-description);
  line-height: var(--leading-description);
  letter-spacing: .02em;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
}

.product-cell {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 172px;
  aspect-ratio: 1;
  border-bottom: 1px solid var(--color-line);
}

.product-cell:nth-child(odd) {
  border-right: 1px solid var(--color-line);
}

.product-cell article {
  position: absolute;
  inset: 0;
}

.product-copy {
  position: absolute;
  top: var(--spacing-12);
  left: var(--spacing-12);
  z-index: 1;
  color: var(--color-carbon-black);
  font-family: var(--font);
  font-size: var(--text-label);
  line-height: var(--leading-label);
  letter-spacing: var(--tracking-label);
}

.product-copy h2 {
  font-family: var(--font-model);
  font-size: 10px;
  font-weight: 400;
  line-height: inherit;
  letter-spacing: .5px;
}

.product-price {
  font-variant-numeric: tabular-nums;
}

/* Only the isolated photo region is visible; headings, prices, rules and controls are HTML. */
.product-photo {
  position: absolute;
  top: max(19.08%, 38px);
  left: 13.78%;
  width: 69.258%;
  aspect-ratio: 196 / 160;
  overflow: hidden;
  background: var(--color-paper);
}

.product-photo img {
  position: absolute;
  width: 305.102041%;
  max-width: none;
  height: auto;
  left: var(--photo-x);
  top: var(--photo-y);
}

.add-button {
  position: absolute;
  bottom: 5px;
  left: var(--spacing-8);
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--pill-width);
  height: var(--tap-target);
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
}

.add-button::before {
  position: absolute;
  z-index: 0;
  inset: 7px 0;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--color-mist-gray);
  content: '';
}

.add-button[aria-pressed='true']::before {
  border-color: var(--color-carbon-black);
}

.add-button .basket-icon {
  position: relative;
}

.plus-icon {
  position: relative;
  display: block;
  width: 9px;
  height: 9px;
  margin-left: 4px;
}

.plus-icon::before,
.plus-icon::after {
  position: absolute;
  top: 4px;
  left: 1px;
  width: 7px;
  height: 1px;
  background: var(--color-carbon-black);
  content: '';
}

.plus-icon::after {
  transform: rotate(90deg);
}

.add-button[aria-pressed='true'] .plus-icon::after {
  transform: rotate(-45deg);
  width: 8px;
  left: 2px;
  top: 3px;
}

.add-button[aria-pressed='true'] .plus-icon::before {
  transform: rotate(45deg);
  width: 4px;
  left: 0;
  top: 5px;
}

.screen-footer {
  position: fixed;
  z-index: 3;
  bottom: 0;
  left: calc(var(--page-gutter) + 1px);
  right: calc(var(--page-gutter) + 1px);
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: var(--color-paper);
}

.find-button {
  display: block;
  width: 100%;
  height: var(--large-action-height);
  min-height: var(--large-action-height);
  border: 1px solid var(--color-carbon-black);
  border-radius: var(--large-action-radius);
  padding: 0;
  background: var(--color-carbon-black);
  color: var(--color-paper);
  font-family: var(--font-action);
  font-size: var(--large-action-size);
  font-weight: 400;
  line-height: var(--large-action-leading);
  letter-spacing: normal;
  text-transform: uppercase;
  box-shadow: none;
}

.find-button:focus-visible {
  outline-offset: -4px;
  outline-color: var(--color-paper);
}

@media (hover: hover) {
  .find-button:hover {
    background: var(--color-paper);
    color: var(--color-carbon-black);
    border: var(--action-hover-border) solid var(--color-carbon-black);
  }

  .find-button:hover:focus-visible {
    outline-color: var(--color-carbon-black);
  }
}

.notice {
  position: fixed;
  z-index: 5;
  bottom: calc(var(--large-action-height) + max(var(--footer-bottom), env(safe-area-inset-bottom)) + var(--spacing-12));
  left: var(--page-gutter);
  right: var(--footer-right);
  display: flex;
  align-items: center;
  gap: var(--spacing-12);
  padding: var(--spacing-12);
  border: 1px solid var(--color-carbon-black);
  background: var(--color-paper);
  color: var(--color-carbon-black);
  font-size: 12px;
  line-height: 1.4;
}

.notice-dismiss {
  flex-shrink: 0;
  margin-left: auto;
  min-height: var(--tap-target);
  border: 0;
  padding-inline: var(--spacing-8);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

@media (hover: hover) {
  .add-button:hover::before {
    border-color: var(--color-carbon-black);
  }

  .panel-link:hover {
    color: var(--color-ash-gray);
  }
}

/* Figma 28:595. Object slots preserve the original transforms and image crops. */
.phone[data-screen-active='detected-items'] {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  background: var(--color-paper);
}

.phone[data-screen-active='detected-items']>.site-header {
  flex-shrink: 0;
}

.phone[data-screen-active='detected-items']>main {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.phone[data-screen-active='detected-items'] .detected-screen {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--color-paper);
}

.breadcrumb {
  gap: var(--spacing-4);
  white-space: nowrap;
}

.breadcrumb [data-show='breadcrumb-tail'] {
  overflow: hidden;
  text-overflow: ellipsis;
}

.camera-input {
  display: none;
}

.detected-screen {
  --scene-unit: calc((100cqw - 20px) / 373);
  position: relative;
  min-height: max(calc(var(--scene-unit) * 729), calc(var(--scene-unit) * 526 + var(--detected-actions-reserve) + max(0px, env(safe-area-inset-bottom) - var(--spacing-12))));
  background: var(--color-paper);
}

.detected-stage {
  position: absolute;
  inset: 0 var(--page-gutter);
  overflow: clip;
  border-inline: 1px solid var(--color-line);
}

.detected-object {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  left: calc(var(--scene-unit) * var(--object-x));
  top: calc(var(--scene-unit) * var(--object-y));
  width: calc(var(--scene-unit) * var(--object-width));
  height: calc(var(--scene-unit) * var(--object-height));
}

.detected-crop {
  position: relative;
  flex: none;
  width: var(--crop-width);
  height: var(--crop-height);
  transform: rotate(var(--object-angle));
  overflow: hidden;
}

.detected-crop img {
  position: absolute;
  width: var(--image-width);
  height: var(--image-height);
  max-width: none;
  top: var(--image-y);
  left: var(--image-x);
  object-fit: cover;
}

.detected-object-laptop .detected-crop {
  transform: rotate(var(--object-angle)) skewX(.37deg);
}

.detected-object-laptop,
.detected-object-mouse,
.detected-object-keys {
  opacity: .8;
}

.detected-label {
  position: absolute;
  left: calc(var(--scene-unit) * var(--label-x));
  top: calc(var(--scene-unit) * var(--label-y));
  transform: translate(-50%, -50%) rotate(var(--label-angle));
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-carbon-black);
  color: var(--color-paper);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 400;
  line-height: var(--leading-label);
  letter-spacing: var(--tracking-label);
  white-space: nowrap;
}

.detected-heading {
  position: relative;
  height: 105.111px;
  padding: var(--spacing-24);
  border-bottom: 1px solid var(--color-line);
  pointer-events: none;
}

.detected-heading h1 {
  color: var(--color-carbon-black);
  font-size: var(--text-heading);
  font-weight: 400;
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  text-transform: uppercase;
}

.detected-actions {
  position: fixed;
  z-index: 3;
  bottom: 0;
  left: calc(var(--page-gutter) + 1px);
  right: calc(var(--page-gutter) + 1px);
  display: grid;
  gap: var(--spacing-8);
  padding: var(--spacing-12);
  padding-bottom: max(var(--spacing-12), env(safe-area-inset-bottom));
  background: var(--color-paper);
}

.detected-button {
  height: var(--large-action-height);
  min-height: var(--large-action-height);
  width: 100%;
  padding: 0;
  border: 1px solid var(--color-carbon-black);
  border-radius: var(--large-action-radius);
  background: var(--color-paper);
  color: var(--color-carbon-black);
  font-family: var(--font-action);
  font-size: var(--large-action-size);
  font-weight: 400;
  line-height: var(--large-action-leading);
  letter-spacing: normal;
  text-transform: uppercase;
}

.detected-button-primary {
  background: var(--color-carbon-black);
  color: var(--color-paper);
  box-shadow: none;
}

.detected-button:focus-visible {
  outline-offset: 3px;
  outline-color: var(--color-carbon-black);
}

@media (hover: hover) {
  .detected-button-primary:hover {
    background: var(--color-paper);
    color: var(--color-carbon-black);
    border: var(--action-hover-border) solid var(--color-carbon-black);
  }

  .detected-button:not(.detected-button-primary):hover {
    background: var(--color-carbon-black);
    color: var(--color-paper);
    border: var(--action-hover-border) solid var(--color-carbon-black);
  }
}

/* The two original packing compositions share the same live item layers. */
.phone[data-screen-active='pack-items'] {
  padding-bottom: 0;
}

.pack-screen {
  --pack-unit: calc((100cqw - 22px) / 371);
  position: relative;
  background: var(--color-paper);
}

.pack-scan {
  --pack-unit: calc((100cqw - 22px) * .92 / 371);
  position: relative;
  height: calc(var(--pack-unit) * 523);
  overflow: clip;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-paper);
  isolation: isolate;
}

.scan-bag {
  position: absolute;
  z-index: 0;
  left: 0;
  top: 0;
  width: calc(var(--pack-unit) * var(--bag-size));
  height: calc(var(--pack-unit) * var(--bag-height, var(--bag-size)));
  max-width: none;
  transform: translate(calc(var(--pack-unit) * var(--bag-x)), calc(var(--pack-unit) * var(--bag-y)));
  opacity: 0;
  pointer-events: none;
}

/* Keep the smaller scan composition centred, including all item overlays. */
.pack-scan>.scan-bag,
.pack-scan>.packed-item,
.pack-scan>.packed-label {
  left: 4%;
}

.scan-bag[data-active='true'] {
  opacity: 1;
}

.packed-item {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: calc(var(--pack-unit) * var(--item-width));
  height: calc(var(--pack-unit) * var(--item-height));
  transform: translate(calc(var(--pack-unit) * var(--item-x)), calc(var(--pack-unit) * var(--item-y))) rotate(var(--item-angle));
  transform-origin: center;
  pointer-events: none;
}

.packed-crop {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.packed-crop img {
  position: absolute;
  max-width: none;
  width: var(--image-width);
  height: var(--image-height);
  left: var(--image-x);
  top: var(--image-y);
  object-fit: cover;
}

.packed-item-muted {
  opacity: .8;
}

.packed-label {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  padding: 8px 10px;
  transform: translate(calc(var(--pack-unit) * var(--label-x)), calc(var(--pack-unit) * var(--label-y))) translate(-50%, -50%) rotate(var(--label-angle));
  border-radius: var(--radius-pill);
  background: var(--color-carbon-black);
  color: var(--color-paper);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  line-height: var(--leading-label);
  letter-spacing: var(--tracking-label);
  white-space: nowrap;
  pointer-events: none;
}

.pack-copy {
  position: absolute;
  z-index: 3;
  top: var(--spacing-12);
  left: var(--spacing-12);
  display: grid;
  gap: 7px;
  color: var(--color-carbon-black);
  font-family: var(--font);
  font-size: var(--text-label);
  line-height: var(--leading-label);
  letter-spacing: var(--tracking-label);
}

.pack-copy h1 {
  font-family: var(--font-action);
  font-size: var(--text-label);
  line-height: var(--leading-label);
  letter-spacing: .5px;
  font-weight: 400;
}

.pack-copy p {
  font-variant-numeric: tabular-nums;
}

.pack-add {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: var(--spacing-12);
  display: grid;
  place-items: center;
  width: 55px;
  height: var(--tap-target);
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
}

.pack-add[aria-pressed='true'] {
  outline: 1px solid var(--color-carbon-black);
  outline-offset: -7px;
}

.pack-details {
  position: absolute;
  z-index: 3;
  bottom: calc(var(--pack-unit) * 24);
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 160px;
  min-height: var(--tap-target);
  padding: 12px 22px;
  transform: translateX(-50%);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-paper);
  color: var(--color-carbon-black);
  box-shadow: var(--shadow-primary);
  font-family: var(--font-action);
  font-size: var(--cta-size);
  line-height: var(--cta-leading);
  letter-spacing: var(--cta-tracking);
  text-transform: uppercase;
}

.bag-carousel {
  position: relative;
  width: 100%;
  height: calc(var(--pack-unit) * 172);
  min-height: 120px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.bag-carousel::-webkit-scrollbar {
  display: none;
}

.bag-track {
  display: flex;
  align-items: flex-end;
  width: max-content;
  height: 100%;
  padding-inline: calc(var(--pack-unit) * 89.5);
  list-style: none;
}

.bag-option {
  flex: none;
  width: calc(var(--pack-unit) * 142);
  height: calc(var(--pack-unit) * 192);
}

.bag-thumbnail {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: var(--tap-target);
  min-height: var(--tap-target);
  padding: 0;
  border: 0;
  background: transparent;
  scroll-snap-align: center;
  cursor: inherit;
}

.bag-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.bag-option:last-child .bag-thumbnail img {
  width: 93.75%;
  height: 93.75%;
}

.bag-carousel:focus-visible,
.bag-thumbnail:focus-visible {
  outline-offset: -4px;
}

.bag-carousel.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

@media (prefers-reduced-motion: no-preference) {
  .packed-item {
    transition: transform 480ms cubic-bezier(.22, 1, .36, 1), width 480ms cubic-bezier(.22, 1, .36, 1), height 480ms cubic-bezier(.22, 1, .36, 1);
  }

  .packed-label {
    transition: transform 480ms cubic-bezier(.22, 1, .36, 1);
  }

  .scan-bag {
    transition: opacity 320ms ease-out;
  }
}

/* Individual official product photos share the existing ruled catalogue cells. */
.product-photo-native {
  left: 11%;
  width: 78%;
}

.product-photo-native img {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

@media (hover: hover) {
  .pack-details:hover {
    background: var(--color-carbon-black);
    color: var(--color-paper);
    border: var(--action-hover-border) solid var(--color-carbon-black);
    box-shadow: none;
  }

  .detected-button:not(.detected-button-primary):hover:focus-visible {
    outline-color: var(--color-carbon-black);
  }
}

/* Full-screen camera is an isolated capture surface, not a shop page. */
body.camera-open {
  overflow: hidden;
}

.web-camera {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
  color: #fff;
  container-type: size;
}

.camera-topbar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: calc(64px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  background: #000;
}

.camera-topbar h2 {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .08em;
}

.camera-icon-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 9999px;
  background: #202020;
  color: #fff;
}

.camera-close {
  font-family: var(--font);
  font-size: 30px;
  line-height: 1;
}

.camera-top-spacer {
  width: 48px;
}

.camera-viewfinder {
  container-type: size;
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #111;
}

.camera-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.web-camera[data-facing='user'] .camera-video {
  transform: scaleX(-1);
}

.camera-grid {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  pointer-events: none;
}

.camera-grid span {
  border-right: 1px solid rgb(255 255 255 / 13%);
  border-bottom: 1px solid rgb(255 255 255 / 13%);
}

.camera-grid span:nth-child(3n) {
  border-right: 0;
}

.camera-grid span:nth-child(n+7) {
  border-bottom: 0;
}

.camera-guide {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  pointer-events: none;
}

.camera-guide-copy {
  position: relative;
  z-index: 2;
  width: min(72cqw, 280px);
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: var(--color-carbon-black);
  text-align: center;
}

.camera-guide-copy h3 {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.01em;
  text-transform: uppercase;
}

.camera-guide-copy p {
  margin-top: 10px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.camera-guide-dismiss {
  pointer-events: auto;
  display: block;
  min-height: 44px;
  margin: 8px auto -8px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--color-carbon-black);
  font-family: var(--font);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.camera-feedback {
  position: absolute;
  z-index: 3;
  left: 24px;
  right: 24px;
  bottom: 20px;
  padding: 16px;
  background: rgb(0 0 0 / 85%);
  color: white;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  border-radius: 8px;
}

.camera-retry {
  display: block;
  min-width: 120px;
  min-height: 44px;
  margin: 12px auto 0;
  padding: 8px 20px;
  border: 1px solid white;
  border-radius: 9999px;
  background: white;
  color: black;
}

.camera-controls {
  flex: none;
  padding: 16px 24px max(24px, env(safe-area-inset-bottom));
  background: #000;
}

.camera-mode {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  text-align: center;
  letter-spacing: .08em;
}

.camera-control-row {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  align-items: center;
  gap: 24px;
}

.camera-shutter {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  padding: 4px;
  border: 3px solid white;
  border-radius: 50%;
  background: #000;
}

.camera-shutter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: white;
}

.camera-shutter:disabled,
.camera-flip:disabled {
  opacity: .35;
  cursor: default;
}

.camera-flip {
  justify-self: end;
}

.web-camera :focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .camera-shutter:not(:disabled):active span {
    transform: scale(.9);
  }
}


/* A translucent technical plane follows the device; type stays flat and legible. */
.guide-plane-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 128px;
  padding: 24px 0;
  perspective: 1800px;
}

.guide-plane {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(255 255 255 / 52%);
  border-radius: 0;
  transform: rotateX(var(--plane-pitch, 0deg)) rotateY(var(--plane-roll, 0deg));
  transform-origin: center;
  backface-visibility: hidden;
}

.camera-guide[data-sensor='unavailable'] .guide-plane,
.camera-guide[data-sensor='denied'] .guide-plane {
  transform: none;
}

/* Upright phone: rectangle. Top view: edge-on plane, then no guide. */
.camera-guide {
  opacity: var(--guide-opacity, 1);
}

.camera-guide[data-level='true'] {
  opacity: 0;
  visibility: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .camera-guide {
    transition: opacity 180ms ease-out, visibility 0s linear;
  }

  .camera-guide[data-level='true'] {
    transition: opacity 180ms ease-out, visibility 0s linear 180ms;
  }

  .camera-guide[data-sensor='active'] .guide-plane {
    transition: transform 100ms ease-out;
  }
}

/* Capture freezes the preview before the camera chrome leaves the screen. */
.camera-still {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.web-camera[data-facing='user'] :is(.camera-still, .camera-scan-photo) {
  transform: scaleX(-1);
}

.camera-shutter-effect {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: black;
  opacity: 0;
}

.web-camera[data-status='capturing'] .camera-shutter:disabled {
  opacity: 1;
}

.web-camera:is([data-status='cleaning'], [data-status='labeling'], [data-status='landing'], [data-status='revealing']) :is(.camera-topbar, .camera-controls, .camera-grid, .camera-guide) {
  opacity: 0;
  pointer-events: none;
}

.web-camera[data-status='revealing'] {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .web-camera[data-status='capturing'] .camera-shutter-effect {
    animation: camera-shutter-blink 180ms ease-out both;
  }

  .web-camera[data-status='cleaning'] :is(.camera-topbar, .camera-controls, .camera-grid, .camera-guide) {
    transition: opacity 260ms ease-out;
  }

  .web-camera[data-status='revealing'] {
    transition: opacity 320ms ease-in-out;
  }

  @keyframes camera-shutter-blink {

    0%,
    100% {
      opacity: 0;
    }

    30% {
      opacity: .9;
    }
  }
}

/* Individual transparent objects from the updated detected-items composition. */
.detected-stage-v2 .detected-object {
  opacity: 1;
}

.detected-stage-v2 .detected-object-laptop .detected-crop {
  transform: rotate(var(--object-angle));
}

/* Figma 89:271: left-to-right X-ray wipe, played once before detected items. */
.camera-scan-transition {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  background: var(--color-paper);
}

.camera-scan-images,
.camera-scan-original,
.camera-scan-transition img,
.camera-scan-photo,
.camera-scan-live-result {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.camera-scan-transition img,
.camera-scan-photo,
.camera-scan-live-result {
  object-fit: cover;
}

.camera-scan-original,
.camera-scan-line {
  visibility: hidden;
}

.camera-scan-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  width: 1.218px;
  background: white;
}

@media (prefers-reduced-motion: no-preference) {
  .web-camera[data-status='scanning'] .camera-scan-original {
    visibility: visible;
    animation: camera-scan-wipe 1.3s cubic-bezier(.45, 0, .2, 1) both;
  }

  .web-camera[data-status='scanning'] .camera-scan-line {
    visibility: visible;
    animation: camera-scan-boundary 1.3s cubic-bezier(.45, 0, .2, 1) both;
  }

  @keyframes camera-scan-wipe {
    0% {
      clip-path: inset(0 0 0 0);
    }

    100% {
      clip-path: inset(0 0 0 100%);
    }
  }

  @keyframes camera-scan-boundary {
    0% {
      left: 0;
    }

    100% {
      left: 100%;
    }
  }
}


/* Bag-switch choreography owns these layers until every item has settled. */
.pack-scan.is-repacking :is(.packed-item, .packed-label, .scan-bag) {
  transition: none;
}

/* Updated transparent scan artwork sits on the Figma scan surface. */
.pack-screen,
.pack-scan {
  background: var(--color-scan-surface);
}

/* Keep falling objects visible across the rail/carousel boundary during entry. */
.pack-screen:has(.is-packing-in) {
  overflow: clip;
}

.pack-scan.is-packing-in {
  overflow: visible;
  z-index: 2;
}

.pack-scan.is-packing-in .pack-details {
  opacity: 0;
  pointer-events: none;
}

/* Comparison screen: product cells, view switch and the shared large cart CTA. */
.phone[data-screen-active='pack-items'] {
  padding-bottom: calc(var(--large-action-height) + 24px + env(safe-area-inset-bottom));
}

.pack-scan {
  height: calc(var(--pack-unit) * 517);
}

.pack-details {
  top: 12px;
  right: 12px;
  bottom: auto;
  left: auto;
  transform: none;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  gap: 4px;
  box-shadow: none;
  font-size: 10px;
}

.bag-view-toggle {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 20px;
  display: flex;
  transform: translateX(-50%);
  border-radius: var(--radius-pill);
  background: var(--color-paper);
  box-shadow: var(--shadow-primary);
}

.bag-view-toggle button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: var(--font-action);
  font-size: 10px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.bag-view-toggle button[aria-pressed='true'] {
  background: var(--color-concrete-gray);
}

.bag-view-toggle button:disabled {
  opacity: .4;
  cursor: default;
}

.bag-view-note {
  position: absolute;
  bottom: 3px;
  width: 100%;
  font-size: 10px;
  text-align: center;
}

.bag-exterior {
  position: absolute;
  left: 4%;
  top: calc(var(--pack-unit) * 38);
  width: 92%;
  height: calc(var(--pack-unit) * 405);
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
}

.bag-exterior[data-active='true'] {
  opacity: 1;
}

.pack-scan[data-view='interior'] .bag-exterior {
  opacity: 0;
}

.pack-scan[data-view='exterior'] :is(.scan-bag, .packed-item, .packed-label) {
  opacity: 0;
}

.bag-carousel {
  height: calc(var(--pack-unit) * 113.722);
  min-height: 96px;
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-line);
}

.bag-track {
  padding: 0;
  align-items: stretch;
}

.bag-option {
  width: calc(var(--pack-unit) * 113.722);
  height: 100%;
  border-right: 1px solid var(--color-line);
}

.bag-thumbnail {
  align-items: center;
  scroll-snap-align: center;
}

.bag-thumbnail img,
.bag-option:last-child .bag-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bag-thumbnail[aria-pressed='true'] {
  background: var(--color-paper);
}

.pack-cart-footer {
  position: fixed;
  z-index: 5;
  left: var(--page-gutter);
  right: var(--page-gutter);
  bottom: 0;
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: var(--color-paper);
}

.pack-cart-footer .pack-add {
  position: static;
  display: block;
  width: 100%;
  height: var(--large-action-height);
  min-height: var(--large-action-height);
  padding: 0;
  border-radius: var(--large-action-radius);
}

.pack-scan.is-repacking .bag-exterior {
  transition: none;
}

.pack-scan.is-packing-in :is(.pack-details, .bag-view-toggle, .bag-view-note) {
  opacity: 0;
  pointer-events: none;
}

.pack-cart-footer .pack-add {
  background: var(--color-carbon-black);
  color: var(--color-paper);
  border: 1px solid var(--color-carbon-black);
}

.pack-cart-footer .pack-add[aria-pressed="true"] {
  outline: none;
}

@media (hover: hover) {
  .pack-cart-footer .pack-add:hover {
    background: var(--color-paper);
    color: var(--color-carbon-black);
    border: var(--action-hover-border) solid var(--color-carbon-black);
  }
}

.bag-track {
  padding-right: calc((100cqw - 22px) - var(--pack-unit) * 113.722);
}

/* The shorter thumbnail row makes room for the new 517px Figma composition. */
.pack-scan {
  --pack-unit: calc((100cqw - 22px) / 371);
}

.pack-scan>.scan-bag,
.pack-scan>.packed-item,
.pack-scan>.packed-label {
  left: 0;
}

/* Both views use the same visible bag bounds, rather than the full image canvas. */
.bag-exterior[data-registered='true'] {
  max-width: none;
  left: 0;
  top: 0;
  width: calc(var(--pack-unit) * var(--exterior-width));
  height: calc(var(--pack-unit) * var(--exterior-height));
  object-fit: fill;
  transform: translate(calc(var(--pack-unit) * var(--exterior-x)), calc(var(--pack-unit) * var(--exterior-y)));
}

@media (prefers-reduced-motion: no-preference) {
  .pack-scan:not(.is-repacking) :is(.scan-bag, .bag-exterior, .packed-item, .packed-label) {
    transition: opacity 320ms ease-in-out;
  }
}

/* Capture: scan, clean cutouts, labels, then a shared-element landing. */
.web-camera:is([data-status='reviewing'], [data-status='scanning'], [data-status='transitioning']) :is(.camera-guide, .camera-grid) {
  opacity: 0;
  pointer-events: none;
}

.web-camera:is([data-status='landing'], [data-status='labeling']) {
  opacity: 0;
}

.capture-handoff {
  position: fixed;
  inset: 0;
  z-index: 102;
  pointer-events: none;
  overflow: hidden;
}

.capture-clean-paper {
  position: absolute;
  inset: 0;
  background: var(--color-paper);
  opacity: 0;
}

.capture-object,
.capture-object-label {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  opacity: 0;
  transform-origin: center;
}

.capture-object {
  object-fit: fill;
}

.capture-object-label {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--color-carbon-black);
  color: var(--color-paper);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  line-height: var(--leading-label);
  letter-spacing: var(--tracking-label);
  white-space: nowrap;
}

.phone.capture-staging .detected-stage {
  visibility: hidden;
}

.phone.capture-staging:not(.capture-landing) :is(.site-header, .detected-heading, .detected-actions) {
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .web-camera[data-status='landing'] {
    transition: opacity 300ms ease-out;
  }

  .phone.capture-landing :is(.site-header, .detected-heading, .detected-actions) {
    transition: opacity 240ms ease-out;
  }
}

/* Only the selected bag cell is white, matching the comparison frame. */
.bag-carousel {
  background: var(--color-scan-surface);
}

/* Fit comparison to the actual visible mobile viewport, including browser chrome. */
body:has(.phone[data-screen-active='pack-items']) {
  overflow: hidden;
  overscroll-behavior-y: none;
}

.phone[data-screen-active='pack-items'] {
  display: flex;
  flex-direction: column;
  height: var(--comparison-height);
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.phone[data-screen-active='pack-items'] .site-header {
  flex: none;
}

.phone[data-screen-active='pack-items'] main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.phone[data-screen-active='pack-items'] .pack-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.phone[data-screen-active='pack-items'] .pack-scan {
  flex: 1;
  min-height: 0;
  height: auto;
}

.pack-scan {
  --pack-offset-x: calc((100% - var(--pack-unit) * 371) / 2);
  --pack-offset-y: calc(56px - var(--pack-unit) * 43);
}

.pack-scan>.scan-bag,
.pack-scan>.packed-item,
.pack-scan>.packed-label,
.pack-scan>.bag-exterior[data-registered='true'] {
  left: var(--pack-offset-x);
  top: var(--pack-offset-y);
}

.bag-exterior:not([data-registered='true']) {
  left: var(--pack-offset-x);
  top: 56px;
  width: calc(var(--pack-unit) * 371);
  height: calc(var(--pack-unit) * 384);
}

.phone[data-screen-active='pack-items'] .bag-carousel {
  flex: none;
  height: var(--comparison-nav-size);
  min-height: var(--comparison-nav-size);
}

.bag-option {
  width: var(--comparison-nav-size);
}

.bag-track {
  padding-right: calc((100cqw - 22px) - var(--comparison-nav-size));
}

.pack-cart-footer {
  position: static;
  flex: none;
  width: 100%;
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

/* Sticker attachment: reveal the printed face while the curled backing rolls flat. */
.capture-object-label {
  background: transparent;
  overflow: visible;
}

.capture-sticker-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--color-carbon-black);
  color: var(--color-paper);
  clip-path: inset(0 100% 0 0 round 999px);
  transform-origin: left center;
  backface-visibility: hidden;
}

.capture-sticker-fold {
  position: absolute;
  top: 0;
  left: 0;
  width: 28%;
  height: 100%;
  opacity: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #c9c9c9, #f5f5f5 46%, #b7b7b7);
  box-shadow: 3px 2px 4px rgb(0 0 0 / 20%);
  transform-origin: right center;
  pointer-events: none;
}

/* Cart confirmation slides the navigation away without resizing the product view. */
.pack-screen[data-confirmed='true'] .bag-carousel {
  transform: translateY(calc(100% + 12px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pack-screen[data-confirmed='true'] .bag-view-toggle {
  transform: translate(-50%, 16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pack-screen[data-confirmed='true'] .bag-view-note {
  visibility: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .bag-carousel {
    transition: transform 360ms cubic-bezier(.4, 0, .2, 1), opacity 280ms ease-out, visibility 0s;
  }

  .bag-view-toggle {
    transition: transform 300ms cubic-bezier(.4, 0, .2, 1), opacity 240ms ease-out, visibility 0s;
  }

  .pack-screen[data-confirmed='true'] .bag-carousel {
    transition-delay: 0s, 0s, 360ms;
  }

  .pack-screen[data-confirmed='true'] .bag-view-toggle {
    transition-delay: 0s, 0s, 300ms;
  }
}

/* Exterior tarp variants: same registered bag bounds for every official image. */
.variant-swipe-guide {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: calc(var(--pack-offset-y) + var(--pack-unit) * 230);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  transform: translate(-50%, -50%);
  border-radius: var(--radius-pill);
  background: #1a1b1e;
  color: var(--color-paper);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .495px;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.variant-swipe-guide span {
  font-family: var(--font-action);
}

.pack-scan[data-view='exterior'] {
  touch-action: pan-y;
  cursor: grab;
}

.pack-scan.is-variant-dragging {
  cursor: grabbing;
}

.pack-scan.is-variant-dragging .bag-exterior {
  transition: none;
}

.bag-variant-neighbor {
  position: absolute;
  z-index: 0;
  left: var(--pack-offset-x);
  top: var(--pack-offset-y);
  max-width: none;
  width: calc(var(--pack-unit) * var(--exterior-width));
  height: calc(var(--pack-unit) * var(--exterior-height));
  object-fit: fill;
  transform: translate(calc(var(--pack-unit) * var(--exterior-x)), calc(var(--pack-unit) * var(--exterior-y)));
  pointer-events: none;
}

.pack-scan[data-view="exterior"] {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Centre the selected bag, including the first and last cells. */
.bag-track {
  padding-inline: calc(((100cqw - 22px) - var(--comparison-nav-size)) / 2);
}

.bag-option:first-child {
  border-left: 1px solid var(--color-line);
}

@media (prefers-reduced-motion: no-preference) {
  .variant-swipe-guide {
    animation: variant-drag-hint 4s ease-in-out .4s infinite;
  }

  @keyframes variant-drag-hint {

    0%,
    100% {
      translate: 0 0;
    }

    25% {
      translate: -3px 0;
    }

    75% {
      translate: 3px 0;
    }
  }
}

.pack-screen[data-confirmed="true"] .pack-copy {
  opacity: 0;
  visibility: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .pack-copy {
    transition: opacity 280ms ease-out, visibility 0s;
  }

  .pack-screen[data-confirmed="true"] .pack-copy {
    transition-delay: 0s, 280ms;
  }
}

/* Checkout: settle the bag lower and replace the navigation with the closing copy. */
.bag-nav-slot {
  flex: none;
  height: var(--comparison-nav-size);
  overflow: hidden;
}

.pack-screen[data-confirmed='true'] .bag-nav-slot {
  height: 0;
}

.pack-screen[data-confirmed='true'] .bag-carousel {
  transform: translateY(calc(var(--comparison-nav-size) + 12px));
}

.checkout-message {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-bottom: 0;
  transform: translateY(6px);
}

.checkout-message p {
  min-height: 0;
  overflow: hidden;
  font-family: var(--font);
  font-size: 11.3px;
  line-height: 13px;
  letter-spacing: .226px;
  color: var(--color-carbon-black);
}

.pack-screen[data-confirmed='true'] .checkout-message {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-bottom: 15px;
  transform: translateY(0);
}

.pack-screen[data-confirmed='true'] :is(.bag-exterior, .bag-variant-neighbor) {
  translate: 0 var(--checkout-bag-shift, 18px);
}

.pack-screen[data-confirmed='true'] .pack-scan {
  border-bottom-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  .bag-nav-slot {
    transition: height 360ms cubic-bezier(.4, 0, .2, 1);
  }

  .checkout-message {
    transition: grid-template-rows 360ms cubic-bezier(.4, 0, .2, 1), margin-bottom 360ms cubic-bezier(.4, 0, .2, 1), opacity 280ms ease-out, transform 360ms cubic-bezier(.22, 1, .36, 1);
  }

  .pack-screen[data-confirmed='true'] .checkout-message {
    transition-delay: 0s, 0s, 100ms, 0s;
  }

  .pack-scan:not(.is-repacking):not(.is-variant-dragging) .bag-exterior {
    transition: opacity 320ms ease-in-out, translate 420ms cubic-bezier(.22, 1, .36, 1);
  }
}

/* One continuous thumb slides between Interior and Exterior. */
.bag-view-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 156px;
  isolation: isolate;
}

.bag-view-toggle::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  z-index: 0;
  border-radius: inherit;
  background: var(--color-concrete-gray);
  transform: translateX(0);
  pointer-events: none;
}

.bag-view-toggle[data-view='exterior']::before {
  transform: translateX(100%);
}

.bag-view-toggle button {
  position: relative;
  z-index: 1;
  padding-inline: 10px;
}

.bag-view-toggle button[aria-pressed='true'] {
  background: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  .bag-view-toggle::before {
    transition: transform 360ms cubic-bezier(.22, 1, .36, 1);
  }
}

/* Exterior labels remain registered to the actual packed object positions. */
.exterior-object-label {
  background: transparent;
  overflow: visible;
  opacity: 0;
  z-index: 2;
}

.pack-scan[data-view='interior'] .exterior-object-label {
  visibility: hidden;
}

.pack-screen[data-confirmed='true'] .exterior-object-label {
  translate: 0 var(--checkout-bag-shift, 18px);
}

@media (prefers-reduced-motion: no-preference) {
  .exterior-object-label {
    transition: translate 420ms cubic-bezier(.22, 1, .36, 1);
  }
}

.pack-scan:is([data-cover-labels="attaching"], [data-cover-labels="attached"]) .variant-swipe-guide {
  top: calc(var(--pack-offset-y) + var(--pack-unit) * 420);
}

/* Figma 121:1503, real items unpacked around the centred Exterior bag. */
.outside-items {
  position: absolute;
  z-index: 2;
  left: var(--outside-left);
  top: 56px;
  width: calc(var(--outside-unit) * 502.249);
  height: calc(var(--outside-unit) * 502.249);
  pointer-events: none;
}

.outside-object {
  position: absolute;
  left: calc(var(--outside-unit) * var(--outside-x));
  top: calc(var(--outside-unit) * var(--outside-y));
  width: calc(var(--outside-unit) * var(--outside-width));
  height: calc(var(--outside-unit) * var(--outside-height));
  max-width: none;
  object-fit: fill;
  transform: rotate(var(--outside-angle));
  transform-origin: center;
}

.pack-scan[data-exterior-layout='unpacked'] .variant-swipe-guide {
  top: calc(56px + var(--outside-unit) * 251);
}

.pack-screen[data-confirmed='true'] .outside-items {
  translate: 0 var(--checkout-bag-shift, 18px);
}

@media (prefers-reduced-motion: no-preference) {
  .outside-items {
    transition: translate 420ms cubic-bezier(.22, 1, .36, 1);
  }
}

/* Experiment 3: items peek from behind the cover, with independent breathing. */
.pack-scan[data-exterior-layout='peek'] .outside-items {
  z-index: 0;
}

.pack-scan[data-exterior-layout='peek'] :is(.bag-exterior, .bag-variant-neighbor) {
  z-index: 1;
}

.pack-scan[data-exterior-layout='peek'] .variant-swipe-guide {
  top: calc(56px + var(--outside-unit) * 244);
}

@media (prefers-reduced-motion: no-preference) {
  .pack-scan:is([data-view='exterior'], [data-items-returning='true']) .outside-object {
    animation: item-breathe var(--float-duration) ease-in-out var(--float-delay) infinite;
  }
}

@keyframes item-breathe {

  0%,
  100% {
    translate: var(--float-x) var(--float-y);
    rotate: 0deg;
  }

  25% {
    translate: var(--orbit-x) var(--orbit-y);
    rotate: 0deg;
  }

  50% {
    translate: calc(-1 * var(--float-x)) calc(-1 * var(--float-y));
    rotate: 0deg;
  }

  75% {
    translate: calc(-1 * var(--orbit-x)) calc(-1 * var(--orbit-y));
    rotate: 0deg;
  }
}

/* Drag real items onto the tarp to find a same-model colour match. */
.pack-scan[data-item-color-matching='true'][data-view='exterior'] .outside-object {
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  -webkit-user-drag: none;
}

.outside-object.is-item-drag-source {
  visibility: hidden;
}

.outside-object:focus-visible {
  outline: 2px solid black;
  outline-offset: 3px;
}

.item-drag-ghost {
  position: absolute;
  z-index: 8;
  max-width: none;
  pointer-events: none;
  object-fit: fill;
  filter: drop-shadow(0 8px 8px #0003);
}

.pack-scan.is-item-dragging {
  cursor: grabbing;
}

.pack-scan.is-item-dragging .outside-object {
  animation-play-state: paused;
}

.pack-scan .item-match-cover {
  z-index: 3;
  pointer-events: none;
}

.pack-scan.is-item-drop-target .bag-exterior[data-active='true'] {
  filter: brightness(1.06);
}

.pack-screen[data-confirmed='true'] .outside-object {
  pointer-events: none;
}

.pack-scan[data-items-returning='true'] .outside-items {
  z-index: 0;
}

.pack-scan[data-items-returning='true'] .bag-exterior {
  z-index: 1;
}

/* Local prototype checkout: native modal focus handling, no payment collection. */
.checkout-dialog {
  position: fixed;
  inset: 0;
  margin: 12px 10px;
  padding: 0;
  width: calc(100% - 20px);
  max-width: none;
  height: calc(100dvh - 24px);
  max-height: calc(100dvh - 24px);
  border: 1px solid var(--color-line);
  background: var(--color-paper);
  color: var(--color-carbon-black);
  font-family: var(--font);
}

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

.checkout-dialog::backdrop {
  background: #0007;
}

.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-line);
}

.checkout-header h2 {
  margin: 0;
  font: 24px var(--font-action);
}

.checkout-close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--color-mist-gray);
  color: inherit;
  font: 28px var(--font);
}

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

.checkout-demo {
  padding: 12px 16px;
  margin: 0;
  background: var(--color-mist-gray);
  font: 10px/1.5 var(--font-mono);
}

.checkout-section {
  margin: 0;
  padding: 20px 16px;
  border: 0;
  border-bottom: 1px solid var(--color-line);
  min-width: 0;
}

.checkout-section h3,
.checkout-payment legend {
  margin: 0 0 16px;
  font: 14px/1.3 var(--font-mono);
}

.checkout-product {
  display: flex;
  gap: 16px;
  align-items: center;
}

.checkout-product img {
  width: 110px;
  height: 130px;
  object-fit: contain;
  flex: none;
}

.checkout-product p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.checkout-product .checkout-model {
  font-family: var(--font-mono);
  font-size: 15px;
}

.checkout-product .checkout-variant {
  color: var(--color-ash-gray);
  font-size: 11px;
}

.checkout-form label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 13px;
}

.checkout-form input:not([type='radio']),
.checkout-form select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--color-line);
  border-radius: 0;
  background: white;
  color: black;
  padding: 10px;
  font: 16px var(--font);
}

.checkout-form input:focus-visible,
.checkout-form select:focus-visible {
  outline: 2px solid black;
  outline-offset: 2px;
}

.checkout-field-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
}

.checkout-payment {
  padding-top: 20px;
}

.checkout-payment legend {
  float: left;
  width: 100%;
}

.checkout-payment label {
  display: flex;
  align-items: center;
  min-height: 48px;
  gap: 10px;
  margin: 0;
}

.checkout-payment label span {
  margin-left: auto;
  color: var(--color-ash-gray);
  font: 10px var(--font-mono);
}

.checkout-payment input {
  width: 20px;
  height: 20px;
  accent-color: black;
}

.checkout-note {
  font: 11px/1.5 var(--font);
  color: var(--color-ash-gray);
  margin: 10px 0 0;
}

.checkout-summary p {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  font-size: 13px;
  margin: 0 0 12px;
}

.checkout-summary p:last-child {
  color: var(--color-ash-gray);
  font-size: 11px;
  margin-bottom: 0;
}

.checkout-submit-area {
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.checkout-submit {
  font-size: 21px;
}

.checkout-success {
  padding: 48px 20px;
  text-align: center;
}

.checkout-check {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border: 1px solid black;
  border-radius: 50%;
  font-size: 30px;
}

.checkout-success h3 {
  font: 28px/1.2 var(--font-action);
}

.checkout-success p {
  margin: 20px 0 40px;
  font-size: 14px;
  line-height: 1.6;
}

@media (prefers-reduced-motion: no-preference) {
  .checkout-dialog[open] {
    animation: checkout-enter 240ms cubic-bezier(.22, 1, .36, 1);
  }

  @keyframes checkout-enter {
    from {
      opacity: 0;
      transform: translateY(16px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}


/* Single prototype scenario: remove the 16-inch laptop by dragging its label. */
.pack-scan [data-removed='true'] {
  display: none !important;
}

.pack-scan[data-view='interior'] [data-packed-label='laptop'] {
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.pack-scan [data-packed-label='laptop']:focus-visible {
  outline: 2px solid black;
  outline-offset: 4px;
}

.pack-scan .is-packing-drag-source {
  visibility: hidden;
}

.pack-scan.is-packing-dragging :is([data-packed-item], [data-packed-label]) {
  animation-play-state: paused;
}

.pack-scan .packing-drag-ghost {
  z-index: 12;
  pointer-events: none;
}

.packing-trash {
  position: fixed;
  z-index: 110;
  left: 50%;
  top: max(80px, calc(env(safe-area-inset-top) + 64px));
  transform: translate(-50%, -8px);
  width: 78px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-paper);
  box-shadow: var(--shadow-primary);
  color: var(--color-ink, black);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.packing-trash.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.packing-trash.is-over {
  background: var(--color-concrete-gray);
}

@media (prefers-reduced-motion:no-preference) {
  .packing-trash {
    transition: opacity 140ms ease-out, transform 180ms cubic-bezier(.22, 1, .36, 1), background-color 120ms, color 120ms;
  }
}

.smaller-bag-option .bag-thumbnail {
  position: relative;
}

.smaller-bag-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 3px 4px;
  border-radius: 10px;
  background: black;
  color: white;
  font: 7px var(--font-mono);
  pointer-events: none;
}

/* One owner for cover/scan opacity: the view timeline, never a competing CSS fade. */
.pack-scan[data-exterior-layout='peek'] :is(.scan-bag, .packed-item, .packed-label) {
  transition: none;
}

.pack-scan[data-exterior-layout='peek'] .bag-exterior {
  transition-property: translate !important;
}

.pack-scan.is-view-transition :is(.scan-bag, .bag-exterior, .packed-item, .packed-label) {
  transition: none !important;
}

.pack-scan[data-items-returning='true'] .bag-exterior[data-active='true'] {
  opacity: 1;
}

.pack-scan[data-items-returning='true'] :is(.scan-bag, .packed-item, .packed-label) {
  opacity: 0;
}

/* Hide immediately, including before the observer processes a transition boundary. */
.pack-scan:is(.is-repacking, .is-view-transition, .is-variant-dragging, [data-items-returning='true']) .variant-swipe-guide {
  visibility: hidden;
  pointer-events: none;
}

/* Once Interior is settled, cancelling a filled animation cannot reveal the cover. */
.pack-scan[data-view='interior']:not([data-items-returning='true']) .bag-exterior {
  visibility: hidden;
}

/* Keep Safari's text handles/callout off the draggable label and its cloned face. */
.pack-scan :is([data-packed-label='laptop'], .packing-drag-ghost),
.pack-scan :is([data-packed-label='laptop'], .packing-drag-ghost) * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* First bag entry: the separator belongs to the navigation that rises after landing. */
.pack-scan {
  border-bottom-color: transparent;
}

.bag-nav-slot {
  border-top: 1px solid var(--color-line);
}

.pack-screen:has(.is-packing-in) .bag-nav-slot {
  visibility: hidden;
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
  transition: none;
}

@media (prefers-reduced-motion: no-preference) {
  .bag-nav-slot {
    transition: height 360ms cubic-bezier(.4, 0, .2, 1),
      transform 480ms cubic-bezier(.22, 1, .36, 1),
      opacity 320ms ease-out;
  }
}

/* Installed home-screen mode: keep header content clear of the device safe area. */
.is-standalone .site-header {
  padding-top: env(safe-area-inset-top, 0px);
}

.phone[data-screen-active='entry'] {
  padding-bottom: 0;
}

.entry-screen {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--spacing-24);
  gap: var(--spacing-24);
}

.entry-wordmark {
  width: 180px;
  align-self: flex-start;
}

.entry-screen h1 {
  font-family: var(--font-action);
  font-weight: 400;
  font-size: var(--text-heading);
  text-transform: uppercase;
}

.entry-screen p {
  font-family: var(--font-mono);
}

.entry-actions {
  display: grid;
  gap: var(--spacing-12);
}

.entry-actions .find-button {
  font-size: var(--large-action-size);
}

/* Product marker follows the FREITAG product-name treatment. */
#pack-title::before {
  content: '';
  display: inline-block;
  width: .65em;
  height: .65em;
  margin-right: .65em;
  background: var(--color-carbon-black);
  vertical-align: .04em;
}

/* Block iOS long-press selection throughout the active Interior drag surface. */
.pack-scan[data-view='interior'],
.pack-scan[data-view='interior'] *,
.pack-scan.is-packing-dragging,
.pack-scan.is-packing-dragging * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* The narrow pen sits beside the bottle, in front of the notebook. */
.pack-scan[data-bag='hazzard'] [data-packed-item='pen'] {
  z-index: 2;
}

/* Keep the demo pen in front of the laptop, behind the opaque bag cover. */
.pack-scan[data-demo-hazzard-layout='true'] [data-outside-item='pen'] {
  z-index: 1;
}

.detected-items-group {
  position: absolute;
  inset: 0;
}

/* In standalone mode, centre the unchanged composition in the extra vertical space. */
.is-standalone .detected-items-group {
  translate: 0 max(0px, calc((100% + 105.111px - var(--detected-footer-height)) / 2 - var(--scene-unit) * 319.8665));
}

/* Checkout descends continuously while the faster item-return motion finishes. */
@media (prefers-reduced-motion: no-preference) {
  .pack-screen[data-confirmed='true'] .pack-scan:not(.is-variant-dragging) :is(.bag-exterior, .bag-variant-neighbor, .outside-items, .exterior-object-label) {
    transition: translate 800ms cubic-bezier(.45, 0, .55, 1);
  }
}
.pack-scan[data-view='interior'][data-can-remove-bottle='true'] [data-packed-label='bottle'] {
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.pack-scan [data-packed-label='bottle']:focus-visible { outline: 2px solid black; outline-offset: 4px; }

/* Empty packing ending: leave a beat for the empty bag, then make room. */
.pack-scan[data-view='interior'] .packed-label[aria-disabled='false'] {
  pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;
  -webkit-touch-callout:none;cursor:grab;
}
.pack-scan .packed-label[aria-disabled='false']:focus-visible {outline:2px solid black;outline-offset:4px;}
.pack-screen[data-empty='true'] .pack-scan,
.pack-screen[data-empty='true'] .bag-nav-slot,
.pack-screen[data-empty='true'] .pack-cart-footer {opacity:0;pointer-events:none;}
.pack-screen {position:relative;}
.packing-empty {position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;justify-content:center;padding:24px;background:#eee;}
.packing-empty[hidden] {display:none;}
.packing-empty h2 {font:inherit;font-size:clamp(26px,7cqw,48px);line-height:1.08;font-weight:400;letter-spacing:-.035em;margin:auto 0;}
.packing-empty-actions {display:grid;gap:12px;padding-bottom:env(safe-area-inset-bottom);}
.packing-empty-browse {min-height:44px;background:none;border:0;color:black;font:inherit;cursor:pointer;}
@media(prefers-reduced-motion:no-preference){
 .pack-screen[data-empty='true'] .pack-scan {transition:opacity 600ms 400ms ease-in-out;}
 .pack-screen[data-empty='true'] .bag-nav-slot {transition:opacity 400ms ease-in-out;}
 .packing-empty {animation:packing-empty-in 500ms ease-in-out both;}
 @keyframes packing-empty-in {from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
}

/* Newly revealed models never move the selected thumbnail on their own. */
.bag-carousel[data-preserving-selection='true'] {scroll-snap-type:none;overflow-anchor:none;}

/* Keep the scanner's highlights below clipping and its blue close to the item scans. */
/* Subtle finishing grade: slightly richer, cooler blue; keep exposure and contrast. */
.scan-bag.smaller-bag-scan:is([data-id="surfside"], [data-id="dexter"], [data-id="maurice"]) {filter:saturate(1.18) hue-rotate(2deg);}
