.commerce-page {
  color: #193450;
  overflow-x: clip;
}
.commerce-warehouse {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 22px 22px;
  box-shadow: none;
}
.commerce-scene {
  position: relative;
  overflow: hidden;
  width: calc(100% + 44px);
  margin: 0 -22px;
  display: grid;
  grid-template-columns: minmax(235px, 23%) 1fr;
  grid-template-rows: auto 1fr;
  gap: 22px;
  padding: 24px;
  min-height: clamp(610px, 50vw, 780px);
  isolation: isolate;
}
.commerce-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: -2;
  mask-image:
    linear-gradient(to right, transparent, #000 5%, #000 94%, transparent),
    linear-gradient(to bottom, transparent, #000 6%, #000 83%, transparent);
  mask-composite: intersect;
}
.commerce-glass {
  background: linear-gradient(125deg, #ffffffa3, #e6f0ff75);
  border: 1px solid #ffffffb8;
  border-radius: 19px;
  box-shadow:
    inset 0 1px 0 #fff,
    0 9px 30px #2c528617;
  backdrop-filter: blur(12px) saturate(115%);
  -webkit-backdrop-filter: blur(12px) saturate(115%);
}
.commerce-hero-title {
  position: relative;
  grid-column: 1 / -1;
  padding: 0;
  border-radius: 12px;
  background: transparent;
}
.commerce-hero-title > span,
.commerce-stores-heading > div > span {
  display: block;
  font-size: 9px;
  font-weight: 650;
  color: #3c72ad;
  letter-spacing: 0.15em;
}
.commerce-hero-title h2 {
  font-size: clamp(20px, 1.8vw, 29px);
  letter-spacing: -0.035em;
  margin: 7px 0;
  line-height: 1.3;
  color: #0b274a;
}
.commerce-hero-title p {
  margin: 0;
  font-size: 11px;
  color: #617b95;
}
.commerce-left {
  position: relative;
  z-index: 2;
  grid-column: 1;
  align-self: start;
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 14px;
}
.commerce-left article {
  padding: 18px 20px;
}
.commerce-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.commerce-card-title h3 {
  font-size: 13px;
  color: #18314f;
  font-weight: 650;
  margin: 0;
}
.commerce-card-title > span {
  color: #8394a9;
  font-size: 10px;
  white-space: nowrap;
}
.commerce-big {
  display: block;
  font-size: clamp(34px, 3.1vw, 49px);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.05em;
  color: #123d81;
}
.commerce-big small {
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 500;
}
.commerce-today > p {
  font-size: 11px;
  color: #778aa3;
  margin: 6px 0 20px;
}
.commerce-today-bottom {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #d9e6f6;
  padding-top: 13px;
}
.commerce-today-bottom > span {
  font-size: 10px;
  color: #70849d;
}
.commerce-today-bottom > strong {
  font-size: 16px;
  font-weight: 650;
  color: #1e5c95;
}
.commerce-live {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  color: #5d87a5;
  font-size: 9px;
}
.commerce-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #12b7b4;
}
.commerce-key dl {
  margin: 0;
  display: grid;
  gap: 16px;
}
.commerce-key dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.commerce-key dt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #6a809c;
}
.commerce-key dt img {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}
.commerce-key dd {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  color: #153859;
  white-space: nowrap;
}
.commerce-key dd small {
  font-size: 10px;
  color: #8292a7;
  font-weight: 500;
}
.commerce-key dd.commerce-money {
  font-size: 16px;
}
.commerce-store-entry {
  position: absolute;
  top: 13%;
  right: 3%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 17px;
  color: #1b4f89;
  text-align: left;
  z-index: 3;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.commerce-store-entry:hover {
  transform: translate(3px, -3px);
  box-shadow: 0 8px 25px #2766aa33;
}
.commerce-store-entry > span {
  font-size: 13px;
  font-weight: 650;
}
.commerce-store-entry small {
  display: block;
  font-size: 10px;
  color: #6e88a5;
  margin-top: 5px;
  font-weight: 400;
}
.commerce-store-entry img {
  width: 30px;
  height: 30px;
}
.commerce-pin {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border-radius: 13px;
  pointer-events: none;
}
.commerce-pin-storage {
  left: 52%;
  top: 18%;
}
.commerce-pin-flow {
  left: 40%;
  top: 44%;
}
.commerce-pin-delivery {
  left: 72%;
  top: 46%;
}
.commerce-pin i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow:
    0 0 0 5px #ffffff9c,
    0 0 0 6px #82bdd970;
  background: #16c5c3;
}
.commerce-pin-flow i {
  background: #f2a631;
}
.commerce-pin-delivery i {
  background: #347ff3;
}
.commerce-pin small {
  display: block;
  font-size: 9px;
  color: #7990ac;
  margin-bottom: 4px;
}
.commerce-pin strong {
  font-size: 12px;
  font-weight: 650;
  color: #183856;
}
.commerce-bottom {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1.7fr 1.45fr;
  gap: 14px;
  margin-top: 0;
}
.commerce-bottom > article {
  min-width: 0;
  padding: 17px 18px;
}
.commerce-progress-row {
  margin-top: 13px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 8px;
}
.commerce-progress-row > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #637d98;
  font-size: 10px;
}
.commerce-progress-row i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.commerce-progress-row strong {
  color: #244a72;
  font-size: 15px;
  font-weight: 650;
}
.commerce-progress-row strong small {
  font-size: 9px;
  font-weight: 400;
  color: #8093ac;
}
.commerce-meter {
  grid-column: 1/-1;
  background: #dfe9f4;
  height: 3px;
  border-radius: 4px;
  overflow: hidden;
}
.commerce-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.commerce-progress .received {
  background: #25b6bf;
}
.commerce-progress .partial {
  background: #7596df;
}
.commerce-progress .dispatched {
  background: #4185f8;
}
.commerce-progress .waiting {
  background: #acbed5;
}
.commerce-progress .returning {
  background: #d7a24c;
}
.commerce-note {
  font-size: 10px;
  line-height: 1.7;
  color: #8292a5;
  margin: 15px 0 0;
}
.commerce-chart {
  height: 177px;
  width: 100%;
}
.commerce-chart-legend {
  display: flex;
  gap: 17px;
  color: #7890ad;
  font-size: 10px;
}
.commerce-chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.commerce-chart-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4c85fa;
}
.commerce-chart-legend span:nth-child(2) i {
  background: #3ac6cd;
}
.commerce-card-title > button {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 0;
  color: #6984a2;
  white-space: nowrap;
}
.commerce-card-title > button img {
  width: 10px;
  height: 10px;
}
.commerce-order {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 15px 0;
  border-radius: 0;
  border-bottom: 1px solid #dce8f3;
  text-align: left;
}
.commerce-order:last-child {
  border-bottom: 0;
}
.commerce-order time {
  color: #8999af;
  font-size: 10px;
}
.commerce-order > span {
  min-width: 0;
}
.commerce-order strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #304d6d;
}
.commerce-order small {
  display: block;
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8b9aad;
  font-size: 9px;
  margin-top: 6px;
}
.commerce-order-value {
  margin-left: auto;
  text-align: right;
  flex: 0 0 auto;
}
.commerce-order-value strong {
  color: #2c6d9e;
}
.commerce-empty {
  padding: 35px;
  text-align: center;
  color: #8496ac;
  font-size: 13px;
}
.commerce-flow-layer {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.commerce-parcel {
  position: absolute;
  /* Native 53x55 source crop; (26.5,49.5) includes the half-pixel contact calibration. */
  width: 3.152885%;
  min-width: 0;
  padding: 0;
  pointer-events: auto;
  z-index: 1;
  transform: translate(-50%, -90%);
  visibility: hidden;
}
.commerce-parcel:active:not(:disabled) {
  transform: translate(-50%, -90%);
}
.commerce-parcel > img {
  display: block;
  width: 100%;
  filter: none;
}
.commerce-portal-foreground {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.commerce-stores {
  border-radius: 24px;
  padding: 30px 28px 20px;
  background: linear-gradient(140deg, #f2f8ffdd, #e3eefbba);
  border: 1px solid #fff;
}
.commerce-stores-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}
.commerce-back {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 24px;
  padding: 0;
  font-size: 11px;
  color: #6181a5;
}
.commerce-back img {
  width: 14px;
  height: 14px;
  transform: rotate(180deg);
}
.commerce-stores-heading h2 {
  margin: 8px 0 10px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.commerce-stores-heading p {
  font-size: 11px;
  color: #7d91a9;
  margin: 0;
}
.commerce-store-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffffb0;
  border: 1px solid #fff;
  padding: 10px 14px;
  border-radius: 30px;
}
.commerce-store-search img {
  width: 15px;
  height: 15px;
  opacity: 0.5;
}
.commerce-store-search input {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  width: 160px;
  box-shadow: none;
}
.commerce-store-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  color: #7e94ad;
  font-size: 11px;
}
.commerce-store-pagination > div {
  display: flex;
  align-items: center;
  gap: 15px;
}
.commerce-store-pagination button {
  padding: 8px 14px;
  font-size: 11px;
}
.commerce-store-detail-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 8px 0 20px;
}
.commerce-store-detail-hero > img {
  width: min(38%, 280px);
}
.commerce-store-detail-hero h3 {
  font-size: 22px;
  margin: 10px 0;
}
.commerce-store-detail-hero p {
  font-size: 12px;
  color: #8092a8;
}
.commerce-store-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid #e4ebf3;
  border-bottom: 1px solid #e4ebf3;
  margin-bottom: 25px;
}
.commerce-store-metrics small {
  color: #8798ac;
  font-size: 11px;
}
.commerce-store-metrics strong {
  display: block;
  font-size: 23px;
  color: #315e86;
  margin-top: 10px;
  font-weight: 600;
}
.commerce-page button:focus-visible {
  outline: 3px solid #3c8dde;
  outline-offset: 4px;
}

.commerce-machinery {
  width: 100%;
  height: 100%;
  display: block;
}
.commerce-flow-layer {
  mask-image:
    linear-gradient(to right, transparent, #000 4%, #000 95%, transparent),
    linear-gradient(to bottom, transparent, #000 5%, #000 84%, transparent);
  mask-composite: intersect;
}
.commerce-left dt {
  min-width: 0;
  line-height: 1.5;
}
.commerce-left dd {
  overflow-wrap: anywhere;
}
.commerce-left article {
  min-width: 0;
}
.commerce-today-bottom {
  flex-wrap: wrap;
}
.commerce-order > span:first-of-type {
  flex: 1;
}
.commerce-order strong {
  overflow-wrap: anywhere;
}
.commerce-pin-flow {
  left: 43%;
  top: 43%;
}
.commerce-scene[data-motion='false'] .commerce-parcel {
  animation-play-state: paused;
}
.commerce-stores {
  position: relative;
  overflow: hidden;
  background: transparent;
  border: 0;
  padding: 24px 0;
}
.commerce-retail-viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-radius: 12px;
}
.commerce-retail-site {
  position: relative;
  width: 100%;
  min-width: 850px;
  aspect-ratio: 1680 / 936;
  isolation: isolate;
}
.commerce-retail-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 92%, transparent);
}
.commerce-store-tile {
  position: absolute;
  left: var(--bay-x);
  top: var(--bay-y);
  width: 20%;
  min-width: 150px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  text-align: left;
  border: 1px solid #ffffffc2;
  border-radius: 12px;
  background: #f5faffbd;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px #21578714;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}
.commerce-store-tile:active:not(:disabled) {
  transform: translate(-50%, -50%);
}
.commerce-store-tile:hover {
  background: #ffffffed;
  box-shadow: 0 8px 22px #21578730;
}
.commerce-store-tile > img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.commerce-bay-number {
  font-size: 10px;
  color: #3277c4;
  border-right: 1px solid #b7cfe5;
  padding-right: 8px;
}
.commerce-bay-name {
  min-width: 0;
  flex: 1;
}
.commerce-bay-name strong {
  display: block;
  font-size: 11px;
  color: #1b3c60;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.commerce-bay-name small {
  display: block;
  font-size: 9px;
  color: #617c99;
  margin-top: 4px;
  line-height: 1.5;
}
.commerce-store-search input {
  min-width: 0;
}
.commerce-store-detail-hero > img {
  border-radius: 12px;
}
@media (max-width: 1100px) {
  .commerce-bottom {
    grid-template-columns: 1fr 1.4fr;
  }
  .commerce-recent {
    grid-column: 1 / -1;
  }
  .commerce-pin-delivery {
    display: none;
  }
  .commerce-left article {
    padding: 18px;
  }
  .commerce-key dl > div {
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .commerce-key dd {
    margin-left: auto;
    font-size: 18px;
  }
}
@media (max-width: 700px) {
  .commerce-warehouse {
    padding: 0;
    border-radius: 0;
  }
  .commerce-scene {
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    margin: 0;
    padding: 12px 0;
    gap: 16px;
    overflow: hidden;
  }
  .commerce-hero-title {
    padding: 0 8px;
    min-height: 76px;
  }
  .commerce-hero-title h2 {
    font-size: 21px;
  }
  .commerce-background {
    top: 100px;
    height: 300px;
    object-position: 58% center;
  }
  .commerce-left {
    margin: 300px 0 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .commerce-left article {
    padding: 18px;
  }
  .commerce-key dl {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .commerce-key dl > div {
    display: block;
  }
  .commerce-key dd {
    margin-top: 6px;
  }
  .commerce-key dt {
    font-size: 10px;
  }
  .commerce-key dt img {
    width: 13px;
  }
  .commerce-pin {
    display: none;
  }
  .commerce-store-entry {
    top: 124px;
    right: 12px;
    padding: 10px 12px;
  }
  .commerce-store-entry > span {
    font-size: 12px;
  }
  .commerce-store-entry img {
    width: 24px;
    height: 24px;
  }

  .commerce-bottom {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .commerce-recent {
    grid-column: auto;
  }
  .commerce-bottom > article {
    padding: 18px;
  }
  .commerce-stores {
    padding: 12px 0;
    border-radius: 0;
  }
  .commerce-stores-heading {
    display: block;
  }
  .commerce-stores-heading h2 {
    font-size: 23px;
  }
  .commerce-stores-heading p {
    line-height: 1.8;
  }
  .commerce-store-search {
    margin: 18px 0;
  }
  .commerce-store-search input {
    width: 100%;
  }
  .commerce-store-pagination {
    flex-wrap: wrap;
    align-items: start;
  }
  .commerce-store-pagination > div {
    width: 100%;
    justify-content: space-between;
  }
  .commerce-store-detail-hero {
    gap: 12px;
  }
  .commerce-store-detail-hero h3 {
    font-size: 18px;
  }
  .commerce-store-metrics {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .commerce-store-metrics strong {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .commerce-store-tile,
  .commerce-store-entry {
    transition: none;
  }
}

.commerce-key dl > div {
  flex-wrap: wrap;
}
.commerce-key dd {
  margin-left: auto;
  max-width: 100%;
  white-space: normal;
}
.commerce-store-tile {
  padding: 8px;
}
.commerce-bay-name strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 10.5px;
}
.commerce-bay-name small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.commerce-scanner-light {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: normal;
  z-index: 0;
  opacity: 0.3;
  animation: commerce-scanner-breathe 6s ease-in-out infinite paused;
}
.commerce-scanner-light.is-second {
  animation-delay: -3s;
}
.commerce-scene[data-active='true'] .commerce-scanner-light {
  animation-play-state: running;
}

/* Callouts share the photograph's object-fit geometry. Only the halo pulses. */
.commerce-callouts {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}
.commerce-pin {
  --pin-color: #21b8a8;
  width: 155px;
  padding: 10px 12px 10px 18px;
  gap: 8px;
  border-radius: 12px;
}
.commerce-pin-flow {
  --pin-color: #dfa437;
}
.commerce-pin-delivery {
  --pin-color: #9475d6;
}
.commerce-pin::before {
  content: '';
  position: absolute;
  height: 1px;
  width: 28px;
  right: 100%;
  top: 50%;
  background: color-mix(in srgb, var(--pin-color) 55%, transparent);
}
.commerce-pin i {
  position: absolute;
  left: -48px;
  top: calc(50% - 13px);
  width: 26px;
  height: 26px;
  border: 7px solid #ffffffed;
  box-sizing: border-box;
  background: var(--pin-color);
  box-shadow: 0 0 0 1px #ffffff55;
}
.commerce-pin i::after {
  content: '';
  position: absolute;
  inset: -12px;
  border: 4px solid color-mix(in srgb, var(--pin-color) 30%, transparent);
  border-radius: 50%;
  opacity: 0.4;
  animation: commerce-pin-pulse 3.6s ease-in-out infinite paused;
}
.commerce-pin > span::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 13px;
  width: 3px;
  height: 16px;
  border-radius: 3px;
  background: var(--pin-color);
}
.commerce-pin > img {
  width: 15px;
  height: 15px;
  align-self: end;
  margin-left: auto;
  opacity: 0.7;
}
.commerce-scene[data-active='true'] .commerce-pin i::after {
  animation-play-state: running;
}
/* Pause CSS-only lighting immediately, including before modal observers run. */
body:has(dialog[open]) .commerce-scene .commerce-scanner-light,
body:has(dialog[open]) .commerce-scene .commerce-pin i::after {
  animation-play-state: paused;
}
@keyframes commerce-pin-pulse {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.85);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.15);
  }
}

.commerce-retail-browser {
  position: relative;
}
.commerce-store-browse-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  color: #7188a0;
  font-size: 11px;
}
.commerce-store-browse-tools > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.commerce-store-browse-tools button {
  padding: 8px;
  border: 1px solid #cfdeed;
  border-radius: 50%;
  background: #ffffff9c;
}
.commerce-store-browse-tools button img {
  width: 15px;
  height: 15px;
  display: block;
}
.commerce-store-position {
  min-width: 115px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.commerce-retail-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  touch-action: pan-x pan-y;
  scrollbar-width: thin;
  scrollbar-color: #a9c6df #e9f1f980;
}
.commerce-retail-viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.commerce-retail-track {
  position: relative;
  isolation: isolate;
}
.commerce-retail-wing {
  position: absolute;
  top: 0;
  height: 100%;
}
.commerce-retail-background {
  display: block;
  object-fit: contain;
  mask-image:
    linear-gradient(to bottom, transparent, #000 4%, #000 95%, transparent),
    linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
  mask-composite: intersect;
  user-select: none;
  pointer-events: none;
}
.commerce-wing-caption {
  position: absolute;
  top: 4%;
  left: 6%;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #6c8aa8;
}
.commerce-store-tile {
  width: 9%;
  min-width: 0;
  height: 8%;
  min-height: 48px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  cursor: pointer;
}
.commerce-store-tile:hover {
  background: #5fc7ff22;
  box-shadow: 0 0 20px #27a9fa33;
}
.commerce-store-tag {
  position: absolute;
  bottom: 95%;
  left: 25%;
  width: 143px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  text-align: left;
}
.commerce-store-tag > img {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.commerce-bay-number {
  padding-right: 6px;
  flex-shrink: 0;
}
.commerce-bay-name strong {
  font-size: 10px;
}
.commerce-bay-name small {
  font-size: 8px;
  margin-top: 2px;
}
.commerce-store-tile:hover .commerce-store-tag {
  background: #fffffff0;
}
.commerce-retail-viewport:focus-visible {
  outline: 2px solid #479bdf;
  outline-offset: 3px;
}
@media (max-width: 700px) {
  .commerce-store-browse-tools {
    align-items: start;
    flex-direction: column;
  }
  .commerce-store-browse-tools > div {
    width: 100%;
    justify-content: space-between;
  }
  .commerce-pin-storage,
  .commerce-pin-flow {
    display: flex;
    width: 130px;
    padding: 8px 10px 8px 17px;
  }
  .commerce-pin-storage {
    left: 53%;
    top: 34%;
  }
  .commerce-pin-flow {
    left: 65%;
    top: 72%;
    width: 110px;
  }
  .commerce-pin strong {
    font-size: 10px;
  }
  .commerce-pin small {
    font-size: 8px;
  }
  .commerce-pin > img {
    width: 12px;
    height: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .commerce-pin i::after {
    animation: none;
    opacity: 0.4;
  }
}
@keyframes commerce-scanner-breathe {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.85;
  }
}
@media (prefers-reduced-motion: reduce) {
  .commerce-scanner-light {
    animation: none;
    opacity: 0.5;
  }
}

/* One fixed site with three diagonal streets; only individual shop bays move. */
.commerce-retail-viewport {
  position: relative;
  width: 100%;
  overflow: clip;
  touch-action: pan-y;
  isolation: isolate;
  background: #eef6fc;
  scrollbar-width: none;
}
.commerce-retail-ground {
  position: absolute;
  top: 0;
  left: var(--street-origin-x, 0px);
  width: var(--street-width, 100%);
  height: 100%;
  max-width: none;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}
.commerce-retail-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.commerce-shop-bay {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  padding: 0;
  background: none;
  box-shadow: none;
  pointer-events: none;
}
.commerce-shop-module {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  pointer-events: none;
}
.commerce-shop-front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
  clip-path: polygon(19.5% 28.3%, 29.8% 29.7%, 52.1% 45.4%, 71.6% 65.4%, 71.6% 92.8%, 19.5% 56.2%);
}
.commerce-shop-front:hover {
  background: #4ab7ff24;
}
.commerce-shop-label {
  position: absolute;
  top: 12%;
  left: 13%;
  width: 68%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border: 1px solid #ffffffc9;
  border-radius: 6px;
  background: #f6fbffed;
  box-shadow: 0 2px 6px #426e9420;
  color: #1c517d;
  font-size: 10px;
  line-height: 1.4;
  pointer-events: auto;
}
.commerce-shop-label small {
  color: #6c91b4;
  flex-shrink: 0;
  font-size: 8px;
}
.commerce-shop-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.commerce-shop-label:hover,
.commerce-shop-front:hover + .commerce-shop-label,
.commerce-shop-bay.is-search-match .commerce-shop-label {
  border-color: #238fff;
  background: #ecf8ff;
  box-shadow: 0 0 0 2px #52aeff40;
}
.commerce-shop-front:active:not(:disabled),
.commerce-shop-label:active:not(:disabled) {
  transform: none;
}
.commerce-shop-label:focus-visible {
  outline: 2px solid #087cf2;
  outline-offset: 3px;
}
.commerce-street-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #68829d;
  font-size: 10px;
  padding: 0 4px 12px;
}
.commerce-street-progress input {
  flex: 1;
  min-width: 0;
  accent-color: #4b96dd;
  height: 16px;
}
.commerce-store-search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  color: #68829d;
  font-size: 12px;
}
.commerce-store-search-result button {
  padding: 4px 10px;
  font-size: 11px;
}
.commerce-street-empty {
  position: relative;
  padding: 30px;
  color: #68829d;
}

.commerce-street-progress input {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  height: 24px;
}
.commerce-street-progress input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 3px;
  background: #c8dfee;
}
.commerce-street-progress input::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #4b96dd;
  box-shadow: 0 1px 4px #376e9c40;
}
.commerce-street-progress input::-moz-range-track {
  height: 4px;
  border-radius: 3px;
  background: #c8dfee;
}
.commerce-street-progress input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #4b96dd;
}

.commerce-bottom {
  grid-template-columns: 1.25fr 1fr;
}
.commerce-left .commerce-progress-sidebar {
  padding: 18px 20px;
}
.commerce-progress-sidebar .commerce-progress-row {
  margin-top: 13px;
}
.commerce-order-list {
  margin-top: 24px;
  min-width: 0;
}
.order-list {
  min-width: 0;
  scroll-margin-top: calc(var(--app-header-height, 86px) + 12px);
}
.order-list-pages,
.order-list-pages > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.order-list-pages {
  justify-content: space-between;
  padding: 14px 4px;
  color: #6c839b;
  font-size: 12px;
}
@media (max-width: 700px) {
  .commerce-bottom {
    grid-template-columns: 1fr;
  }
  .commerce-recent {
    grid-column: auto;
  }
  .commerce-left .commerce-progress-sidebar {
    padding: 16px;
  }
  .order-list-pages {
    flex-wrap: wrap;
  }
  .commerce-order-list .toolbar {
    flex-wrap: wrap;
  }
}

.commerce-callouts .commerce-pin {
  pointer-events: auto;
  text-align: left;
  color: inherit;
}

/* Selected v2: complete architectural streets, transparent site edges and UI roof anchors. */

.commerce-selected-stores {
  padding: 0;
  margin-inline: 0;
  width: 100%;
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.commerce-selected-stores .commerce-retail-browser {
  position: relative;
}
.commerce-selected-stores .commerce-retail-viewport {
  border-radius: 0;
  background: transparent;
  mask-image:
    linear-gradient(to right, transparent, #000 3%, #000 96%, transparent),
    linear-gradient(to bottom, transparent, #000 3%, #000 92%, transparent);
  mask-composite: intersect;
}
.commerce-selected-stores .commerce-retail-ground {
  top: var(--street-origin-y);
  height: var(--street-height);
}
.commerce-selected-stores .commerce-retail-track {
  isolation: isolate;
}
.commerce-street-segment {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  pointer-events: none;
  user-select: none;
}
.commerce-selected-stores .commerce-shop-bay {
  pointer-events: none;
  background: transparent;
}
.commerce-selected-stores .commerce-shop-front {
  clip-path: polygon(0 18%, 94% 58%, 94% 92%, 0 52%);
  background: transparent;
}
.commerce-selected-stores .commerce-shop-front:hover {
  background: #2b9cff12;
}
.commerce-selected-stores .commerce-shop-label {
  left: var(--pin-x);
  top: var(--pin-y);
  width: max-content;
  min-width: 100px;
  min-height: 44px;
  transform: translateY(-39px);
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
  overflow: visible;
}
.commerce-roof-pin {
  position: absolute;
  left: -8px;
  top: 31px;
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #0b8aff;
  box-shadow:
    0 0 0 2px #70bbff60,
    0 2px 8px #087ffb70;
}
.commerce-selected-stores .commerce-shop-label::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 30px;
  width: 32px;
  height: 2px;
  border-radius: 3px;
  background: #eefaff;
  box-shadow: 0 0 0 1px #7db7ea;
  transform: rotate(-34deg);
  transform-origin: left center;
}
.commerce-roof-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 27px;
  margin-top: 0;
  min-width: 88px;
  max-width: 175px;
  padding: 8px 12px;
  border: 1px solid #fff;
  border-radius: 13px;
  background: #f8fdfff5;
  box-shadow: 0 4px 12px #388dcb22;
  color: #131d61;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
  white-space: normal;
  overflow-wrap: anywhere;
}
.commerce-selected-stores .commerce-roof-name small {
  color: #2779c9;
  font-size: 10px;
}
.commerce-selected-stores .commerce-shop-label:hover,
.commerce-selected-stores .commerce-shop-front:hover + .commerce-shop-label,
.commerce-selected-stores .is-search-match .commerce-shop-label {
  background: transparent;
  box-shadow: none;
}
.commerce-selected-stores .is-search-match .commerce-roof-name,
.commerce-selected-stores .commerce-shop-label:hover .commerce-roof-name {
  box-shadow:
    0 0 0 2px #138eff66,
    0 4px 14px #1486ef33;
}
.commerce-arcade-heading {
  position: absolute;
  top: 66px;
  left: 3%;
  right: 3%;
  display: flex;
  justify-content: space-between;
  align-items: start;
  pointer-events: none;
}
.commerce-arcade-heading h2 {
  color: #0e185b;
  font-size: clamp(29px, 2.8vw, 45px);
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.commerce-arcade-heading p {
  color: #6975b5;
  font-size: clamp(13px, 1.35vw, 20px);
  margin-top: 8px;
}
.commerce-arcade-heading .commerce-store-search {
  pointer-events: auto;
  width: 285px;
  background: #f6fcffe6;
  border: 1px solid #fff;
  box-shadow: 0 5px 18px #498ac215;
  border-radius: 30px;
}
.commerce-arcade-heading .commerce-store-search input {
  width: 100%;
  font-size: 14px;
}
.commerce-selected-stores .commerce-store-search-result {
  position: absolute;
  top: 130px;
  right: 3%;
  z-index: 7;
  padding: 6px 12px;
  border-radius: 12px;
  background: #f7fcffeb;
}
.commerce-store-return {
  position: absolute;
  left: 3%;
  top: 88.4%;
  z-index: 1000008;
  padding: 13px 19px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 28px;
  color: #17246b;
  font-size: 15px;
  font-weight: 650;
  pointer-events: auto;
}
.commerce-store-return img {
  width: 22px;
  height: 22px;
  transform: rotate(180deg);
}
.commerce-store-preview {
  position: absolute;
  right: 2.5%;
  bottom: 88px;
  z-index: 1000008;
  display: flex;
  gap: 16px;
  align-items: center;
  width: 347px;
  padding: 16px;
  border-radius: 20px;
  background: #f6fcffe8;
}
.commerce-store-preview:empty {
  display: none;
}
.commerce-store-preview > img {
  width: 112px;
  height: 106px;
  object-fit: cover;
  border-radius: 11px;
}
.commerce-store-preview > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.commerce-store-preview strong {
  color: #152064;
  font-size: 18px;
  overflow-wrap: anywhere;
}
.commerce-store-preview small {
  color: #7384a4;
  font-size: 11px;
}
.commerce-store-preview button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 15px;
  border: 1px solid #c9f0ff;
  border-radius: 24px;
  color: white;
  background: #087ff2;
  box-shadow: 0 4px 16px #1394ff50;
  font-size: 14px;
}
.commerce-store-preview button img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}
.commerce-street-tools {
  position: absolute;
  width: 320px;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 1000008;
  text-align: center;
}
.commerce-street-tools .commerce-store-browse-tools {
  padding: 0;
  gap: 8px;
}
.commerce-street-tools .commerce-store-browse-tools button {
  padding: 4px;
  background: #f7fcffb8;
}
.commerce-street-tools .commerce-store-position {
  font-size: 10px;
}
.commerce-street-tools .commerce-street-progress {
  padding: 0;
  display: block;
}
.commerce-street-tools input {
  width: 100%;
}
.commerce-street-tools p {
  color: #6174af;
  font-size: 12px;
  margin-top: 2px;
}
@media (max-width: 700px) {
  .commerce-selected-stores .commerce-retail-browser {
    display: flex;
    flex-direction: column;
  }
  .commerce-arcade-heading {
    position: relative;
    order: -3;
    top: auto;
    left: auto;
    right: auto;
    display: block;
    padding: 16px;
  }
  .commerce-arcade-heading h2 {
    font-size: 29px;
  }
  .commerce-arcade-heading p {
    font-size: 13px;
  }
  .commerce-arcade-heading .commerce-store-search {
    width: 100%;
    margin-top: 16px;
  }
  .commerce-selected-stores .commerce-store-search-result {
    position: relative;
    order: -1;
    top: auto;
    right: auto;
    margin: 0 16px 8px;
  }
  .commerce-roof-name {
    min-width: 80px;
    max-width: 130px;
    font-size: 11px;
    padding: 7px 9px;
    margin-left: 20px;
    margin-top: 0;
  }
  .commerce-roof-pin {
    width: 13px;
    height: 13px;
    left: -6px;
    top: 26px;
    border-width: 2px;
  }
  .commerce-selected-stores .commerce-shop-label::before {
    width: 26px;
  }
  .commerce-store-return {
    font-size: 13px;
    padding: 10px 14px;
    top: auto;
    bottom: 45px;
    left: 18px;
  }
  .commerce-store-return img {
    width: 18px;
    height: 18px;
  }
  .commerce-store-preview {
    position: relative;
    right: auto;
    bottom: auto;
    width: calc(100% - 32px);
    margin: 2px 16px 8px;
    padding: 12px;
    gap: 12px;
  }
  .commerce-store-preview > img {
    width: 86px;
    height: 82px;
  }
  .commerce-store-preview strong {
    font-size: 15px;
  }
  .commerce-street-tools {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: auto;
    margin: 0 20px 20px;
  }
  .commerce-street-tools .commerce-store-browse-tools {
    flex-direction: row;
    align-items: center;
  }
}

/* A soft cloud veil keeps the fixed title legible as the streets pass behind it. */
.commerce-arcade-heading > div {
  position: relative;
  isolation: isolate;
}
.commerce-arcade-heading > div::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -45px -95px -40px -45px;
  background: radial-gradient(ellipse, #f3fafff5 20%, #f3faffb8 50%, transparent 73%);
}
@media (max-width: 700px) {
  .commerce-arcade-heading > div::before {
    display: none;
  }
}

.commerce-selected-stores .commerce-shop-label:active:not(:disabled) {
  transform: translateY(-39px);
}
@media (max-width: 700px) {
  .commerce-selected-stores .commerce-shop-label,
  .commerce-selected-stores .commerce-shop-label:active:not(:disabled) {
    transform: translateY(-32px);
  }
  .commerce-selected-stores .commerce-shop-label::before {
    top: 23px;
  }
}

.commerce-selected-stores .commerce-roof-name {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
.commerce-selected-stores .commerce-retail-ground {
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 94%, transparent);
}

/* Compact original-proportion cards; the bottom pair sits on the right. */
.commerce-scene {
  grid-template-columns: minmax(220px, 21.4%) 1fr;
}
.commerce-left article,
.commerce-left .commerce-progress-sidebar {
  padding: 16px 18px;
}
.commerce-left .commerce-card-title {
  margin-bottom: 12px;
}
.commerce-today > p {
  margin-bottom: 16px;
}
.commerce-left .commerce-live {
  margin-top: 10px;
}
.commerce-left .commerce-big {
  font-size: clamp(33px, 2.95vw, 46px);
}
.commerce-progress-sidebar .commerce-card-title {
  margin-bottom: 10px;
}
.commerce-progress-sidebar .commerce-progress-row {
  margin-top: 8px;
  gap: 4px 8px;
}
.commerce-progress-sidebar .commerce-progress-row strong {
  font-size: 14px;
}
.commerce-bottom {
  width: 72%;
  margin-left: auto;
  grid-template-columns: 1.7fr 1.45fr;
}
.commerce-bottom > article {
  padding: 15px 17px;
}
.commerce-trend .commerce-chart {
  height: 160px;
}
@media (max-width: 1100px) and (min-width: 701px) {
  .commerce-bottom {
    width: 82%;
  }
  .commerce-bottom .commerce-recent {
    grid-column: auto;
  }
}
@media (max-width: 700px) {
  .commerce-scene {
    grid-template-columns: 1fr;
  }
  .commerce-bottom {
    width: 100%;
    grid-template-columns: 1fr;
  }
}
.commerce-progress-sidebar .commerce-progress-row strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
.commerce-progress-sidebar .commerce-meter {
  grid-column: 1;
  grid-row: 2;
}

.commerce-progress-sidebar .commerce-note {
  margin-top: 7px;
  line-height: 1.5;
}
.commerce-scene-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}
.commerce-sale-item {
  display: block;
  margin: 5px 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.commerce-sale-detail {
  display: grid;
  gap: 14px;
}
.commerce-sale-totals {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.commerce-read-list {
  min-width: 0;
}
.commerce-read-list .toolbar {
  flex-wrap: wrap;
}
.commerce-read-list .search-field {
  min-width: 180px;
}
.commerce-read-list details {
  white-space: normal;
  max-width: 320px;
}
.commerce-read-list summary {
  color: #216fba;
  cursor: pointer;
}
.commerce-read-list details p {
  margin: 8px 0;
}
.commerce-data-note {
  color: #647a96;
  margin: 10px 0;
}
.commerce-data-warning {
  color: #9b5e14;
}
.commerce-inventory-method {
  margin-top: 18px;
  color: #637995;
  font-size: 12px;
  line-height: 1.7;
}
@media (max-width: 700px) {
  .commerce-scene-actions {
    align-items: stretch;
  }
  .commerce-read-list .toolbar > * {
    max-width: 100%;
  }
}
.commerce-sales-list {
  margin-inline: 22px;
}
@media (max-width: 700px) {
  .commerce-sales-list {
    margin-inline: 0;
  }
}
.commerce-table-hint {
  display: none;
}
.commerce-read-list[data-read-list='inventory'] table {
  min-width: 880px;
}
.commerce-read-list[data-read-list='inventory'] td:last-child {
  min-width: 190px;
}
.commerce-read-list[data-read-list='retail'] table {
  min-width: 1000px;
}
@media (max-width: 700px) {
  .commerce-table-hint {
    display: block;
    color: #6c839b;
    font-size: 11px;
    margin: 0 0 8px;
  }
}
.commerce-sale-detail .commerce-sale-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #e1eaf5;
  border-radius: 12px;
  background: #ffffffb8;
}
.commerce-sale-detail .commerce-sale-item small {
  display: block;
  color: #6c839b;
  line-height: 1.6;
}
.commerce-sale-detail .commerce-sale-item .link-button {
  justify-self: start;
  font-size: 12px;
}
/* Exact selected order-detail composition: source 1216 x 628. */
.commerce-order-card {
  width: min(1216px, calc(100vw - 32px));
  height: min(628px, calc(100dvh - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #ffffffdf;
  border-radius: 14px;
  background: #edf4f9;
  backdrop-filter: none;
  color: #293a48;
  box-shadow:
    0 20px 90px #30495f2b,
    inset 0 -45px 95px #9db0c324;
  font-size: 11px;
}
.commerce-order-card::backdrop {
  background: #dce6eed9;
  backdrop-filter: none;
}
.order-dialog-heading {
  height: 76px;
  box-sizing: border-box;
  padding: 8px 22px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.order-dialog-identity {
  min-width: 0;
}
.order-dialog-identity h2 {
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.035em;
  font-weight: 650;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 770px;
}
.order-dialog-identity h2 span {
  color: #7194ae;
  font-weight: 500;
  font-size: 21px;
}
.order-dialog-identity p {
  margin: 4px 0 0;
  color: #8b9ba9;
  font-size: 9px;
}
.order-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
  color: #879cac;
  font-size: 9px;
  margin: 0 0 3px;
}
.order-back img {
  width: 10px;
  height: 10px;
}
.order-heading-state {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #8598a7;
  font-size: 9px;
  white-space: nowrap;
}
.order-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #648c87;
}
.order-live i,
.order-hero-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2bbcad;
  box-shadow: 0 0 7px #28bda44d;
}
.order-close {
  border: 1px solid #ffffffd9;
  border-radius: 50%;
  background: #ffffff75;
  padding: 8px;
  display: grid;
  place-items: center;
  box-shadow: none;
}
.order-close img {
  width: 14px;
  height: 14px;
}
.order-dialog-body {
  height: calc(100% - 76px);
  min-height: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 48% minmax(0, 1fr);
  gap: 20px;
  padding: 0 22px 16px;
}
.order-parcel-view {
  display: grid;
  grid-template-rows: 18px minmax(0, 1fr) 130px;
  min-width: 0;
  min-height: 0;
}
.order-view-label {
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
  font-size: 8px;
  font-weight: 600;
  color: #8ea0af;
  letter-spacing: 0.09em;
}
.order-hero {
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-hero-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-height: 0;
}
.order-hero-state {
  position: absolute;
  right: 15px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #fff9;
  border-radius: 7px;
  background: #f5fbff94;
  color: #7f9c9e;
  font-size: 8px;
}
.order-selector {
  padding: 0 18px 0 22px;
  min-width: 0;
}
.order-selector-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  height: 26px;
  font-size: 8px;
  color: #9aaab6;
}
.order-selector-heading > span {
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-selector-heading strong {
  color: #5685a9;
  font-weight: 650;
  margin-left: 7px;
}
.order-selector-heading > div {
  display: flex;
  align-items: center;
  gap: 7px;
}
.order-selector-heading button {
  display: grid;
  place-items: center;
  padding: 3px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.order-selector-heading button img {
  width: 12px;
  height: 12px;
}
.order-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.order-glass {
  border: 1px solid #ffffffc7;
  background: #ffffff84;
  box-shadow: 0 3px 12px #6984990d;
  border-radius: 11px;
}
.order-choice {
  height: 46px;
  width: 100%;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
}
.order-choice.is-current {
  border-color: #a9cde9;
  background: #f8fdffde;
  box-shadow: inset 0 0 0 1px #93bede24;
}
.order-choice > span {
  min-width: 0;
}
.order-choice strong {
  display: block;
  font-size: 9px;
  line-height: 1.2;
  color: #41576b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-choice small {
  display: block;
  margin-top: 4px;
  color: #a0acb8;
  font-size: 8px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-choice > img {
  flex-shrink: 0;
  width: 40px;
  height: 34px;
  object-fit: contain;
}
.order-no-queue {
  color: #8293a3;
  font-size: 10px;
}
.order-information {
  overflow: auto;
  display: grid;
  grid-template-rows: minmax(74px, max-content) 186px minmax(235px, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
}
.order-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.order-stat {
  padding: 9px 13px;
  min-width: 0;
}
.order-stat small {
  display: block;
  color: #8f9da9;
  font-size: 9px;
  line-height: 12px;
}
.order-stat strong {
  display: block;
  font-size: 22px;
  line-height: 1.15;
  color: #25343f;
  font-weight: 650;
  margin-top: 3px;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}
.order-stat span {
  display: block;
  color: #a3afba;
  font-size: 8px;
  margin-top: 3px;
}
.order-profile {
  padding: 12px 14px 10px;
  min-width: 0;
  overflow: auto;
}
.order-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.order-panel-heading h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 650;
  color: #344553;
}
.order-panel-heading > span {
  font-size: 8px;
  color: #8da0af;
}
.order-profile .order-panel-heading > span {
  color: #4ba69a;
}
.order-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 12px;
  margin: 0;
}
.commerce-order-card dl > div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
}
.commerce-order-card dt {
  color: #9aa8b4;
  font-size: 9px;
  font-weight: 400;
}
.commerce-order-card dd {
  margin: 0;
  text-align: right;
  color: #5a7185;
  font-size: 9px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.order-profile-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}
.order-profile-footer > span {
  padding: 3px 7px;
  font-size: 8px;
  color: #78a0bf;
  background: #eaf4fc;
  border-radius: 4px;
}
.order-profile-footer button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 4px;
  margin-left: auto;
  border: 0;
  background: none;
  box-shadow: none;
  color: #6c96b8;
  font-size: 9px;
}
.order-profile-footer button img {
  width: 12px;
  height: 12px;
}
.order-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}
.order-timeline {
  padding: 12px 13px;
  overflow: auto;
}
.order-timeline ol {
  padding: 0;
  margin: 4px 0 0;
  list-style: none;
}
.order-timeline li {
  position: relative;
  display: flex;
  gap: 11px;
  min-height: 56px;
  padding: 2px 0 12px;
  color: #94a4b1;
}
.order-timeline li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 17px;
  bottom: 1px;
  left: 6px;
  border-left: 1px solid #d5e2ec;
}
.order-step-icon {
  flex-shrink: 0;
  width: 13px;
  height: 14px;
}
.order-step-icon img {
  width: 12px;
  height: 12px;
  opacity: 0.35;
}
.order-timeline .is-complete .order-step-icon img {
  opacity: 1;
  filter: invert(44%) sepia(70%) saturate(1300%) hue-rotate(172deg);
}
.order-timeline strong {
  display: block;
  font-size: 10px;
  color: #728596;
  font-weight: 550;
}
.order-timeline .is-complete strong {
  color: #455d70;
}
.order-timeline li small {
  display: block;
  font-size: 8px;
  color: #a0afba;
  margin-top: 5px;
}
.order-timeline .commerce-card-status {
  margin: 0;
  font-size: 8px;
  line-height: 1.6;
  color: #90a3b3;
}

@media (max-width: 900px) {
  .commerce-order-card {
    width: calc(100vw - 24px);
    height: auto;
    max-height: calc(100dvh - 24px);
  }
  .order-dialog-heading {
    height: auto;
    min-height: 82px;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 3;
    background: #eff6fb;
    backdrop-filter: none;
  }
  .order-dialog-identity h2 {
    max-width: 54vw;
    font-size: 19px;
  }
  .order-dialog-identity h2 span {
    font-size: 17px;
  }
  .order-heading-state {
    gap: 8px;
  }
  .order-heading-state > span:not(.order-live) {
    display: none;
  }
  .order-dialog-body {
    display: block;
    height: auto;
    padding: 0 16px 16px;
  }
  .order-parcel-view {
    grid-template-rows: 20px 330px auto;
  }
  .order-selector {
    padding: 0;
  }
  .order-selector-heading {
    height: 32px;
    font-size: 9px;
  }
  .order-selector-heading button {
    min-width: 28px;
    min-height: 28px;
  }
  .order-choice {
    height: 54px;
  }
  .order-choice strong {
    font-size: 10px;
  }
  .order-choice small {
    font-size: 9px;
  }
  .order-information {
    overflow: visible;
    margin-top: 14px;
    display: grid;
    grid-template-rows: auto auto auto;
  }
  .order-stat {
    min-height: 84px;
    padding: 10px;
  }
  .order-stat strong {
    font-size: 18px;
  }
  .order-profile {
    min-height: 186px;
  }
  .commerce-order-card dl > div {
    grid-template-columns: 55px minmax(0, 1fr);
  }
  .order-profile-fields {
    column-gap: 14px;
    row-gap: 14px;
  }
  .order-lower {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .order-dialog-identity h2 {
    max-width: 55vw;
  }
  .order-heading-state {
    gap: 5px;
    font-size: 8px;
  }
  .order-dialog-heading {
    padding-inline: 12px;
    gap: 6px;
  }
  .order-close {
    padding: 7px;
  }
  .order-back {
    font-size: 9px;
  }
  .order-dialog-body {
    padding-inline: 12px;
  }
  .order-parcel-view {
    grid-template-rows: 20px 270px auto;
  }
  .order-profile-fields {
    grid-template-columns: 1fr;
  }
  .order-profile-fields dt,
  .order-profile-fields dd {
    font-size: 11px;
  }
  .order-profile .order-panel-heading h3,
  .order-panel-heading h3 {
    font-size: 13px;
  }
  .order-profile-footer {
    flex-wrap: wrap;
  }
  .order-profile-footer button {
    font-size: 10px;
  }
  .order-lower {
    grid-template-columns: 1fr;
  }
  .order-timeline {
    min-height: 235px;
  }
  .order-timeline strong {
    font-size: 12px;
  }
  .order-timeline li small,
  .order-timeline .commerce-card-status {
    font-size: 10px;
  }
}
.order-live.is-closed {
  color: #8a9bab;
}
.order-live.is-closed i {
  background: #93a2b0;
  box-shadow: none;
}

.order-dialog-identity p {
  max-width: 750px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 900px) {
  .order-dialog-identity p {
    max-width: 55vw;
  }
}

/* Desktop reading room: stable metrics and one overflow owner for genuinely long records. */
@media (min-width: 901px) {
  .commerce-order-card {
    height: min(704px, calc(100dvh - 32px));
  }
  .order-information {
    grid-template-rows: 96px max-content minmax(268px, 1fr);
  }
  .order-stat {
    padding: 9px 11px;
  }
  .order-stat small {
    font-size: 11px;
    line-height: 14px;
    color: #788b9b;
  }
  .order-stat strong {
    height: 44px;
    margin-top: 2px;
    overflow: auto;
    font-size: 20px;
    line-height: 22px;
  }
  .order-stat span {
    margin-top: 2px;
    font-size: 9px;
    line-height: 12px;
    color: #8598a7;
  }
  .order-profile {
    min-height: 220px;
    padding: 10px 13px;
    overflow: visible;
  }
  .order-panel-heading {
    margin-bottom: 8px;
  }
  .order-panel-heading h3 {
    font-size: 14px;
  }
  .order-panel-heading > span {
    font-size: 10px;
  }
  .order-profile-fields {
    column-gap: 16px;
    row-gap: 6px;
  }
  .commerce-order-card .order-profile-fields > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .order-profile-fields dt {
    font-size: 10px;
    line-height: 12px;
    color: #7f92a3;
  }
  .order-profile-fields dd {
    text-align: left;
    font-size: 11px;
    line-height: 15px;
  }
  .order-profile-footer {
    margin-top: 9px;
  }
  .order-profile-footer > span {
    font-size: 9px;
  }
  .order-profile-footer button {
    font-size: 11px;
  }
  .order-timeline {
    padding: 10px 13px;
    overflow: visible;
  }
  .order-timeline li {
    min-height: 60px;
  }
  .order-timeline strong {
    font-size: 12px;
  }
  .order-timeline li small {
    font-size: 10px;
  }
  .order-timeline .commerce-card-status {
    font-size: 10px;
  }

  .order-choice strong {
    font-size: 11px;
  }
  .order-choice small {
    font-size: 10px;
  }
  .order-selector-heading {
    font-size: 10px;
  }
  .order-dialog-identity p {
    font-size: 10px;
  }
}
.order-composition {
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.order-composition-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.order-part {
  padding: 7px 0;
  border-bottom: 1px solid #dbe7f080;
}
.order-part-heading {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.order-part-kind {
  flex-shrink: 0;
  padding: 2px 4px;
  border-radius: 4px;
  background: #e7f2fc;
  color: #658dae;
  font-size: 9px;
  line-height: 1.2;
}
.order-part-kind.is-service {
  background: #e7f4ef;
  color: #5a8e7c;
}
.order-part-heading strong {
  min-width: 0;
  flex: 1;
  color: #4b6376;
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.order-part-amount {
  flex-shrink: 0;
  color: #3f5f78;
  font-size: 11px;
}
.order-part p {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin: 4px 0 0;
  color: #7b92a5;
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.order-composition-note,
.order-composition-empty {
  color: #869bab;
  font-size: 10px;
  line-height: 1.5;
  margin: 7px 0 0;
}
@media (max-width: 900px) {
  .order-composition {
    min-height: 220px;
    max-height: 380px;
  }
}
.order-stat strong .order-quantity-token {
  display: inline-block;
  margin: 0;
  font: inherit;
  color: inherit;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .order-stat strong .order-quantity-token {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.commerce-logistics-section {
  margin: 18px 0;
  min-width: 0;
}
.commerce-logistics-section > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 10px 0;
}
@media (max-width: 1100px) {
  .commerce-callouts .commerce-pin-delivery {
    display: flex;
    left: 53%;
    top: 34%;
  }
}
@media (max-width: 700px) {
  .commerce-callouts .commerce-pin-delivery {
    width: 130px;
    padding: 8px 10px 8px 17px;
  }
}

/* Selected inventory island stays on the foreground courtyard as shop streets move. */
.commerce-inventory-island {
  position: absolute;
  right: calc(2.5% + 405px);
  bottom: 88px;
  z-index: 1000007;
  width: clamp(100px, 9vw, 132px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  cursor: pointer;
}
.commerce-inventory-island > img {
  display: block;
  width: 100%;
  height: auto;
}
.commerce-inventory-link {
  position: absolute;
  left: 90%;
  top: 38%;
  transform: translateY(-12px);
  pointer-events: auto;
}
.commerce-inventory-link::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 30px;
  width: 32px;
  height: 2px;
  border-radius: 3px;
  background: #eefaff;
  box-shadow: 0 0 0 1px #7db7ea;
  transform: rotate(-34deg);
  transform-origin: left center;
}
.commerce-inventory-link .commerce-roof-name {
  white-space: nowrap;
  min-width: 0;
}
.commerce-inventory-link .commerce-roof-pin {
  animation: inventory-beacon 3s ease-in-out infinite;
}
.commerce-inventory-island:hover .commerce-roof-name {
  box-shadow:
    0 0 0 2px #138eff66,
    0 4px 14px #1486ef33;
}
.commerce-inventory-island:focus-visible {
  outline: 2px solid #087cf2;
  outline-offset: 5px;
}
.commerce-inventory-island:active:not(:disabled) {
  transform: none;
}
@keyframes inventory-beacon {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 0.85;
  }
}
@media (max-width: 700px) {
  .commerce-inventory-island {
    /* Use half the courtyard nudge on phones to keep the contact shadow off the roof. */
    right: calc(7% + 27px * var(--street-scale, 1));
    bottom: calc(80px - 23px * var(--street-scale, 1));
    width: 106px;
  }
  .commerce-inventory-link {
    left: 30%;
    top: 0;
    transform: translateY(-28px);
  }
  .commerce-inventory-link .commerce-roof-name {
    margin-left: 23px;
    padding: 7px 9px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .commerce-inventory-link .commerce-roof-pin {
    animation: none;
  }
}
@media (min-width: 701px) {
  .commerce-street-tools {
    bottom: 10px;
  }
}

/* Both scenes own the same desktop frame; only its interior changes. */
.commerce-page {
  --commerce-scene-height: clamp(790px, calc(710px + 7.5vw), 850px);
}
.commerce-background {
  mask-image:
    linear-gradient(to right, transparent, #000 5%, #000 94%, transparent),
    linear-gradient(to bottom, transparent, #000 6%, #000 92%, transparent);
}
@media (min-width: 701px) {
  .commerce-scene {
    height: var(--commerce-scene-height);
    min-height: var(--commerce-scene-height);
  }
  .commerce-selected-stores .commerce-retail-browser {
    height: var(--commerce-scene-height);
  }
  .commerce-arcade-heading {
    top: 40px;
  }
}

.commerce-hero-title {
  z-index: 3;
  pointer-events: none;
}
.commerce-selected-stores .commerce-retail-ground {
  mask-image:
    linear-gradient(to right, transparent, #000 8%, #000 94%, transparent),
    linear-gradient(to bottom, transparent, #000 8%, #000 94%, transparent);
  mask-composite: intersect;
}
@media (min-width: 701px) {
  .commerce-store-return {
    left: calc(var(--street-origin-x, 0px) + 3%);
  }
}

.commerce-list-top {
  gap: 12px 20px;
  flex-wrap: wrap;
}
.commerce-purchase-tabs {
  width: fit-content;
  max-width: 100%;
}
.commerce-purchase-tabs button {
  white-space: nowrap;
}

/* Latest narrow adjustment: original trend returns below the left summary pair. */
.commerce-scene {
  grid-template-columns: minmax(214px, 20.8%) 1fr;
}
.commerce-left .commerce-sidebar-trend {
  padding: 10px 14px;
}
.commerce-sidebar-trend .commerce-card-title {
  margin-bottom: 7px;
}
.commerce-sidebar-trend .commerce-card-title h3 {
  font-size: 12px;
}
.commerce-sidebar-trend .commerce-chart {
  height: clamp(70px, calc(var(--commerce-scene-height) - 630px), 118px);
}
.commerce-sidebar-trend .commerce-chart-legend {
  margin-top: 3px;
  justify-content: center;
}
@media (max-width: 700px) {
  .commerce-scene {
    grid-template-columns: 1fr;
  }
  .commerce-sidebar-trend .commerce-chart {
    height: 140px;
  }
}
.commerce-left .commerce-progress-sidebar {
  padding-block: 15px;
}
.commerce-progress-sidebar .commerce-progress-row {
  margin-top: 6px;
}

/* Shared scene width follows the full procurement/sales content instead of a1520px cap. */
.commerce-warehouse {
  padding-inline: 0;
}
.commerce-scene {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}
.commerce-warehouse > .commerce-order-list {
  margin-inline: 22px;
}
.commerce-selected-stores .commerce-retail-browser {
  max-width: none;
  margin-inline: 0;
}
.commerce-background {
  object-fit: contain;
  object-position: center;
  mask-image:
    linear-gradient(to right, transparent, #000 3%, #000 97%, transparent),
    linear-gradient(to bottom, transparent, #000 3%, #000 96%, transparent);
}
.commerce-selected-stores .commerce-retail-ground {
  mask-image:
    linear-gradient(to right, transparent, #000 3%, #000 97%, transparent),
    linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
}
@media (min-width: 701px) {
  .commerce-left .commerce-progress-sidebar,
  .commerce-left .commerce-sidebar-trend {
    box-sizing: border-box;
    height: var(--commerce-summary-height, auto);
    display: flex;
    flex-direction: column;
  }
  .commerce-progress-sidebar .commerce-progress-row {
    flex: 1;
    min-height: 20px;
    margin-top: 0;
    align-content: center;
  }
  .commerce-sidebar-trend .commerce-chart {
    height: auto;
    min-height: 64px;
    flex: 1;
  }
  .commerce-sidebar-trend .commerce-card-title,
  .commerce-sidebar-trend .commerce-chart-legend {
    flex-shrink: 0;
  }
  .commerce-inventory-island {
    left: var(--inventory-x);
    top: var(--inventory-y);
    width: var(--inventory-width);
    right: auto;
    bottom: auto;
  }
  .commerce-store-return {
    left: var(--return-x);
    top: var(--return-y);
    bottom: auto;
  }
  .commerce-store-preview {
    width: clamp(270px, 25vw, 347px);
  }
}
@media (max-width: 700px) {
  .commerce-warehouse > .commerce-order-list {
    margin-inline: 0;
  }
  .commerce-background {
    object-fit: cover;
    object-position: 58% center;
  }
  .commerce-left .commerce-progress-sidebar,
  .commerce-left .commerce-sidebar-trend {
    min-height: var(--commerce-summary-height, 0px);
  }
}

/* Include the inventory label's overhang when reserving the foreground UI gap. */
@media (min-width: 1101px) and (max-width: 1600px) {
  .commerce-store-preview {
    right: 8px;
    width: calc(clamp(270px, 25vw, 347px) - 46px);
    padding: 12px;
    gap: 12px;
  }
  .commerce-store-preview > img {
    width: 86px;
    height: 82px;
  }
}

/* Desktop: a full-width safe camera and responsive equal cards retain list discoverability. */
@media (min-width: 701px) {
  .commerce-page {
    container-type: inline-size;
    --commerce-scene-height: 550px;
    --commerce-card-height: clamp(136px, calc((var(--commerce-scene-height) - 136px) / 3), 218px);
  }
  .commerce-scene,
  .commerce-selected-stores .commerce-retail-browser {
    width: calc(100% - 44px);
    margin-inline: 22px;
  }
  .commerce-background {
    height: auto;
    aspect-ratio: 3429 / 1910;
  }
  .commerce-left {
    position: absolute;
    inset: 92px auto auto 24px;
    width: clamp(196px, 18.5%, 302px);
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: 1fr;
    gap: 10px;
    pointer-events: none;
  }
  .commerce-left .commerce-today,
  .commerce-left .commerce-progress-sidebar,
  .commerce-left .commerce-sidebar-trend {
    height: var(--commerce-card-height);
    padding: 9px;
    pointer-events: auto;
  }
  .commerce-left .commerce-card-title {
    margin-bottom: 4px;
  }
  .commerce-today {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr auto auto;
    gap: 4px 8px;
  }
  .commerce-today .commerce-card-title {
    grid-column: 1 / -1;
    margin: 0;
  }
  .commerce-today .commerce-big {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    font-size: clamp(32px, calc(var(--commerce-card-height) * 0.22), 48px);
    line-height: 1;
  }
  .commerce-today > p {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    margin: 0;
    font-size: 11px;
  }
  .commerce-today-bottom {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 4px;
  }
  .commerce-today .commerce-live {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 10px;
  }
  .commerce-progress-sidebar .commerce-progress-row {
    position: relative;
    grid-template-rows: auto;
    min-height: 16px;
    margin: 0;
    gap: 0 6px;
    padding-bottom: 2px;
    line-height: 1.1;
  }
  .commerce-progress-sidebar .commerce-meter {
    position: absolute;
    inset: auto 0 0;
    height: 2px;
  }
  .commerce-progress-sidebar .commerce-note {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.1;
  }
  .commerce-sidebar-trend .commerce-chart {
    min-height: 64px;
  }
  .commerce-store-entry {
    top: 16px;
    right: 24px;
  }
  .commerce-arcade-heading {
    top: 16px;
    left: 24px;
    right: 24px;
  }
  .commerce-arcade-heading h2 {
    font-size: clamp(26px, 2.4vw, 32px);
  }
  .commerce-arcade-heading p {
    font-size: 13px;
    margin-top: 6px;
  }
  @supports (width: 1cqw) {
    .commerce-page {
      --commerce-scene-height: max(
        min(calc((100cqw - 44px) * 0.4759072), var(--commerce-scene-budget, calc(100dvh - 186px))),
        calc((100cqw - 44px) * 0.3688281),
        544px
      );
    }
  }
  .commerce-selected-stores .commerce-retail-viewport {
    mask-image:
      linear-gradient(to right, transparent, #000 3%, #000 97%, transparent),
      linear-gradient(to bottom, transparent, #000 3%, #000 96%, transparent);
  }
  .commerce-callouts .commerce-pin-delivery {
    left: 61.868%;
    top: 39.53%;
  }
  .commerce-selected-stores .commerce-shop-label {
    transform: translateY(-36px);
  }
  .commerce-selected-stores .commerce-shop-label .commerce-roof-name {
    max-width: 175px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.25;
    gap: 4px;
  }
}

.commerce-retail-buildings {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  mask-composite: intersect;
}
@media (min-width: 701px) {
  .commerce-selected-stores .commerce-retail-viewport {
    mask-image: none;
  }
}
.commerce-flow-layer,
.commerce-retail-ground {
  mask-composite: intersect;
}

/* One logistics entrance, shared query lists and original entity detail views. */
.commerce-logistics-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(109, 145, 170, 0.16);
}
.commerce-logistics-tabs button {
  min-height: 40px;
}
.commerce-logistics-tabs .active {
  background: rgba(222, 238, 251, 0.8);
  color: #215e8f;
  border-color: rgba(103, 159, 201, 0.38);
}
.commerce-trace-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.commerce-trace-summary .metric {
  min-height: 0;
  padding: 14px;
  border-radius: 18px;
}
.commerce-trace-summary .metric strong {
  margin: 8px 0;
  font-size: 22px;
}
.commerce-trace-summary .metric small {
  font-size: 11px;
}
.commerce-trace-summary strong {
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .commerce-trace-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Search, match status and store preview share one flow in the upper-right space. */
.commerce-arcade-heading .commerce-store-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  z-index: 1000008;
}
.commerce-arcade-heading .commerce-store-panel::before {
  display: none;
}
.commerce-store-panel .commerce-store-preview,
.commerce-selected-stores .commerce-store-panel .commerce-store-search-result {
  position: static;
  margin: 0;
  pointer-events: auto;
}
.commerce-store-panel .commerce-store-preview {
  max-width: 100%;
}
@media (max-width: 700px) {
  .commerce-arcade-heading .commerce-store-panel {
    align-items: stretch;
  }
  .commerce-store-panel .commerce-store-preview {
    width: 100%;
  }
}
@media (min-width: 701px) and (max-width: 1600px) {
  .commerce-arcade-heading .commerce-store-panel {
    margin-top: -8px;
  }
  .commerce-store-panel .commerce-store-preview {
    width: 285px;
    padding: 8px;
    gap: 10px;
  }
  .commerce-store-panel .commerce-store-preview > img {
    width: 64px;
    height: 64px;
  }
  .commerce-store-panel .commerce-store-preview > div {
    gap: 3px;
  }
  .commerce-store-panel .commerce-store-preview strong {
    font-size: 15px;
    line-height: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .commerce-store-panel .commerce-store-preview small {
    line-height: 12px;
  }
  .commerce-store-panel .commerce-store-preview button {
    padding-block: 5px;
    line-height: 18px;
  }
}

/* The preview name uses its existing text column; only genuinely long names shrink. */
.commerce-store-panel .commerce-store-preview strong {
  --store-name-base-size: 18px;
  font-size: var(--store-name-fitted-size, var(--store-name-base-size));
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 1600px) {
  .commerce-store-panel .commerce-store-preview strong {
    --store-name-base-size: 15px;
  }
}

/* Selected smart-inventory workspace: bounded stock table and sibling evidence pane. */
#detailDialog:has(.inventory-workspace) {
  width: calc(100vw - clamp(24px, 5.8vw, 112px));
  max-width: 1680px;
  height: min(960px, calc(100dvh - clamp(24px, 7.5vh, 80px)));
  max-height: none;
  border-radius: 25px;
  background: #fbfdff;
}
#detailDialog:has(.inventory-workspace) > .detail-heading {
  display: none;
}
#detailDialog:has(.inventory-workspace) #detailContent {
  padding: 0;
  overflow: hidden;
}
#detailDialog:has(.inventory-workspace)::backdrop {
  background: #344f7066;
  backdrop-filter: none;
}
.inventory-workspace {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: #29374b;
}
.inventory-workspace button,
.inventory-workspace input,
.inventory-workspace select {
  font: inherit;
}
.inventory-workspace .inventory-icon {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 18px;
  opacity: 0.68;
}
.inventory-heading {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 24px 36px;
  border-bottom: 1px solid #e3eaf3;
  background: linear-gradient(120deg, #fff, #f9fcff);
}
.inventory-heading > div {
  display: flex;
  align-items: center;
  gap: 18px;
}
.inventory-heading h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.6px;
  line-height: 1.5;
}
.inventory-heading > .icon-button {
  width: 42px;
  height: 42px;
  padding: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #eef1f7;
  box-shadow: 0 3px 12px #324b6b0b;
}
.inventory-method summary {
  list-style: none;
  cursor: pointer;
  padding: 9px;
  display: block;
}
.inventory-method summary::-webkit-details-marker {
  display: none;
}
.inventory-method > div {
  position: absolute;
  z-index: 5;
  top: calc(100% - 10px);
  left: 28px;
  width: min(480px, calc(100% - 56px));
  background: #f7fbfff7;
  border: 1px solid #dbe7f2;
  padding: 18px 20px;
  border-radius: 12px;
  box-shadow: 0 12px 32px #27496824;
  font-size: 12px;
  line-height: 1.8;
}
.inventory-method p {
  margin: 8px 0 0;
}
.inventory-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(340px, 1fr);
}
.inventory-body.is-evidence-hidden {
  grid-template-columns: minmax(0, 1fr);
}
.inventory-main {
  min-width: 0;
  min-height: 0;
  padding: 22px 18px 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.inventory-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  flex: 0 0 auto;
}
.inventory-toolbar .search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 440px;
  flex: 1;
  padding: 0 16px;
  height: 46px;
  border: 1px solid #d8e3ef;
  border-radius: 11px;
  background: #ffffffb8;
}
.inventory-toolbar .search-field input {
  padding: 0;
  background: none;
  box-shadow: none;
  border: 0;
  width: 100%;
  min-width: 0;
  font-size: 14px;
  outline: none;
}
.inventory-workspace select {
  border: 1px solid #dfe7ef;
  border-radius: 11px;
  background-color: #fbfdff;
  color: #364358;
  padding: 11px 32px 11px 14px;
  min-height: 42px;
  max-width: 100%;
  text-overflow: ellipsis;
}
.inventory-toolbar > select {
  flex: 0 1 172px;
  width: 172px;
  font-size: 14px;
}
.inventory-offline {
  margin: 0;
  color: #886435;
  font-size: 12px;
}
.inventory-table-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #e1e8f2;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.inventory-table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.inventory-workspace table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
  white-space: normal;
  border-collapse: collapse;
}
.inventory-col-store {
  width: 25%;
}
.inventory-col-product {
  width: 27%;
}
.inventory-col-quantity {
  width: 13%;
}
.inventory-col-time {
  width: 21%;
}
.inventory-col-link {
  width: 14%;
}
.inventory-workspace th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 18px 17px;
  background: #f6f9fdf7;
  font-size: 14px;
  font-weight: 400;
  color: #7a879a;
  text-align: left;
  line-height: 1.5;
}
.inventory-workspace td {
  padding: 16px 17px;
  height: 105px;
  border-top: 1px solid #e7edf5;
  font-size: 15px;
  line-height: 1.65;
  vertical-align: middle;
  overflow-wrap: anywhere;
  color: #29384e;
}
.inventory-workspace td strong {
  font-size: 16px;
  font-weight: 550;
}
.inventory-workspace td small {
  display: block;
  margin-top: 4px;
  color: #7f8fa3;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}
.inventory-workspace tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}
.inventory-workspace tbody tr[aria-selected='true'] {
  background: #eaf3ff;
}
.inventory-workspace tbody tr:hover {
  background: #f0f6fd;
}
.inventory-workspace td:last-child button {
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  background: none;
  border: 0;
  box-shadow: none;
  color: #1472cf;
  white-space: nowrap;
}
.inventory-workspace td:last-child .inventory-icon {
  width: 12px;
  height: 12px;
  flex-basis: 12px;
  filter: invert(37%) sepia(68%) saturate(1402%) hue-rotate(182deg) brightness(94%);
}
.inventory-pages {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid #e6ecf4;
  font-size: 12px;
  color: #7a8799;
  min-height: 58px;
}
.inventory-pages > div {
  display: flex;
  gap: 7px;
  align-items: center;
}
.inventory-pages select {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 24px 6px 11px;
  margin-right: 10px;
}
.inventory-page-button {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 34px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  box-shadow: none;
  background: transparent;
  color: #32435a;
  font-size: 12px;
}
.inventory-page-button:first-of-type,
.inventory-page-button:last-of-type {
  border-color: #e1e9f2;
  background: #fff;
}
.inventory-page-button.active {
  color: #fff;
  background: #0c70e8;
  box-shadow: 0 3px 8px #0864d322;
}
.inventory-page-button:disabled {
  opacity: 0.35;
  cursor: default;
}
.inventory-evidence {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  border-left: 1px solid #e0e7f0;
  background: #fff;
  padding: 22px 26px 0;
  overflow: hidden;
}
.inventory-evidence > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  margin-bottom: 18px;
}
.inventory-evidence h3 {
  font-size: 20px;
  line-height: 1.5;
  font-weight: 600;
  margin: 0;
}
.inventory-close-evidence {
  padding: 5px;
  background: none;
  border: 0;
  box-shadow: none;
}
.inventory-close-evidence .inventory-icon {
  width: 14px;
  height: 14px;
}
.inventory-evidence-meta {
  padding-bottom: 18px;
  border-bottom: 1px solid #e3eaf3;
  flex: 0 0 auto;
}
.inventory-evidence-meta > span {
  font-size: 14px;
  color: #52657b;
  display: block;
  overflow-wrap: anywhere;
}
.inventory-evidence-meta h4 {
  font-size: 21px;
  line-height: 1.5;
  font-weight: 550;
  margin: 6px 0 10px;
  overflow-wrap: anywhere;
}
.inventory-evidence-meta p {
  margin: 6px 0 0;
  font-size: 14px;
  color: #52657b;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.inventory-balance {
  padding: 16px 0;
  flex: 0 0 auto;
}
.inventory-balance > span {
  display: block;
  color: #52657b;
  font-size: 14px;
}
.inventory-balance > strong {
  display: block;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.inventory-balance > p {
  font-size: 12px;
  line-height: 1.6;
  color: #7b8ca0;
  margin: 8px 0 0;
}
.inventory-equation {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  background: linear-gradient(120deg, #eef5ff, #f7faff);
  border-radius: 12px;
  margin-top: 12px;
}
.inventory-equation > div {
  text-align: center;
  min-width: 0;
}
.inventory-equation span {
  font-size: 13px;
  color: #52657b;
}
.inventory-equation strong {
  display: block;
  color: #0f6bd8;
  font-size: 16px;
  font-weight: 550;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.inventory-evidence-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  margin-bottom: 8px;
}
.inventory-evidence-toolbar h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 550;
}
.inventory-evidence-toolbar select {
  min-height: 36px;
  padding: 7px 27px 7px 12px;
  font-size: 12px;
  max-width: 132px;
}
.inventory-evidence-scroll {
  min-height: 100px;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
}
.inventory-evidence-scroll ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.inventory-event {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 14px 0;
  min-height: 104px;
}
.inventory-event + .inventory-event {
  border-top: 1px solid #ebeff5;
}
.inventory-event-icon {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  background: #e5f0ff;
}
.inventory-event.sale .inventory-event-icon,
.inventory-event.return .inventory-event-icon {
  background: #e0f6ed;
}
.inventory-event > div {
  min-width: 0;
  flex: 1;
  position: relative;
  padding-right: 56px;
}
.inventory-event-title {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.inventory-event-title strong {
  font-size: 16px;
  font-weight: 550;
}
.inventory-event-title b {
  color: #007c61;
  font-size: 16px;
  font-weight: 550;
}
.inventory-event time,
.inventory-event p {
  display: block;
  font-size: 14px;
  color: #52657b;
  line-height: 1.6;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}
.inventory-event p {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.inventory-event > div > button {
  position: absolute;
  right: 0;
  top: 24px;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 6px 0;
  font-size: 12px;
  color: #1677d6;
}
.inventory-event > div > button .icon {
  display: none;
}
.inventory-evidence > footer {
  flex: 0 0 auto;
  border-top: 1px solid #e3eaf3;
  padding-bottom: 12px;
}
.inventory-evidence > footer .inventory-pages {
  padding: 10px 0;
  border: 0;
  flex-wrap: wrap;
}
.inventory-evidence > footer .inventory-pages > div {
  gap: 3px;
}
.inventory-evidence > footer .inventory-page-button {
  min-width: 27px;
  height: 30px;
}
.inventory-evidence > footer > button {
  display: block;
  margin-left: auto;
  background: none;
  border: 0;
  box-shadow: none;
  color: #1677d6;
  padding: 4px 0;
  font-size: 12px;
}
.inventory-empty,
.inventory-loading {
  padding: 40px 22px;
  text-align: center;
  color: #7f8da2;
  font-size: 13px;
  line-height: 1.8;
}
.inventory-loading {
  flex: 1;
  display: grid;
  place-items: center;
}
.inventory-table-scroll,
.inventory-evidence-scroll {
  scrollbar-width: thin;
  scrollbar-color: #b3c7db transparent;
}
.inventory-workspace button:focus-visible,
.inventory-workspace summary:focus-visible,
.inventory-workspace select:focus-visible,
.inventory-workspace input:focus-visible {
  outline: 2px solid #5695d3;
  outline-offset: 2px;
}
@media (min-width: 701px) and (max-height: 850px) {
  .inventory-heading {
    padding: 17px 28px;
  }
  .inventory-heading h2 {
    font-size: 25px;
  }
  .inventory-main {
    padding-top: 18px;
    gap: 12px;
  }
  .inventory-workspace td {
    height: 92px;
    padding-block: 16px;
    font-size: 13px;
  }
  .inventory-evidence {
    padding: 18px 22px 0;
  }
  .inventory-evidence > header {
    margin-bottom: 12px;
  }
  .inventory-evidence-meta {
    padding-bottom: 12px;
  }
  .inventory-evidence-meta h4 {
    font-size: 18px;
    margin-bottom: 6px;
  }
  .inventory-evidence-meta p {
    font-size: 13px;
    margin-top: 4px;
  }
  .inventory-balance {
    padding: 12px 0;
  }
  .inventory-balance > strong {
    font-size: 28px;
  }
  .inventory-equation {
    margin-top: 8px;
    padding: 10px 8px;
  }
  .inventory-event {
    min-height: 93px;
    padding: 12px 0;
  }
}
@media (max-width: 1100px) and (min-width: 701px) {
  .inventory-main {
    padding-left: 20px;
    padding-right: 14px;
  }
  .inventory-workspace td,
  .inventory-workspace th {
    padding-inline: 11px;
    font-size: 12px;
  }
  .inventory-workspace td strong {
    font-size: 13px;
  }
  .inventory-workspace td small {
    font-size: 10px;
  }
  .inventory-workspace td:last-child button {
    font-size: 11px;
  }
  .inventory-col-time {
    width: 18%;
  }
  .inventory-col-product {
    width: 28%;
  }
  .inventory-col-store {
    width: 24%;
  }
  .inventory-col-link {
    width: 17%;
  }
  .inventory-toolbar {
    gap: 10px;
  }
  .inventory-toolbar > select {
    width: 134px;
    flex-basis: 134px;
  }
  .inventory-toolbar .search-field {
    padding-inline: 12px;
  }
  .inventory-toolbar input {
    font-size: 12px !important;
  }
  .inventory-pages {
    padding-inline: 10px;
    flex-wrap: wrap;
    gap: 7px;
  }
  .inventory-pages > div {
    gap: 4px;
  }
  .inventory-pages select {
    margin-right: 0;
  }
}
@media (max-width: 700px) {
  #detailDialog:has(.inventory-workspace) {
    width: calc(100vw - 16px);
    height: calc(100dvh - 24px);
    border-radius: 20px;
  }
  #detailDialog:has(.inventory-workspace) #detailContent {
    overflow: auto;
  }
  .inventory-workspace {
    height: auto;
    min-height: 100%;
  }
  .inventory-heading {
    padding: 18px;
  }
  .inventory-heading h2 {
    font-size: 23px;
  }
  .inventory-heading > div {
    gap: 9px;
  }
  .inventory-heading > .icon-button {
    width: 36px;
    height: 36px;
    padding: 9px;
  }
  .inventory-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .inventory-main {
    padding: 16px;
    gap: 13px;
    min-height: 450px;
  }
  .inventory-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .inventory-toolbar .search-field {
    flex-basis: 100%;
    max-width: none;
    height: 43px;
  }
  .inventory-toolbar .search-field input {
    font-size: 13px;
  }
  .inventory-toolbar > select {
    flex-basis: 100%;
    width: 100%;
  }
  .inventory-table-frame {
    flex: none;
  }
  .inventory-table-scroll {
    max-height: 440px;
    min-height: 180px;
  }
  .inventory-workspace table {
    min-width: 650px;
  }
  .inventory-workspace th {
    font-size: 12px;
    padding: 14px 12px;
  }
  .inventory-workspace td {
    padding: 17px 12px;
    height: 94px;
    font-size: 12px;
  }
  .inventory-workspace td strong {
    font-size: 13px;
  }
  .inventory-workspace td small {
    font-size: 11px;
  }
  .inventory-pages {
    flex-wrap: wrap;
    gap: 9px;
    padding: 12px;
  }
  .inventory-pages > div {
    gap: 5px;
  }
  .inventory-pages select {
    margin-right: 2px;
  }
  .inventory-evidence {
    padding: 20px 20px 0;
    border-left: 0;
    border-top: 1px solid #dfe8f1;
    min-height: 600px;
  }
  .inventory-evidence-scroll {
    height: 310px;
    flex: none;
  }
  .inventory-evidence-meta h4 {
    font-size: 20px;
  }
  .inventory-evidence > footer .inventory-pages {
    justify-content: space-between;
  }
  .inventory-method > div {
    left: 16px;
    width: calc(100% - 32px);
  }
  .inventory-evidence-toolbar select {
    max-width: 146px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .inventory-workspace tbody tr {
    transition: none;
  }
}
.inventory-evidence > footer {
  display: block;
  margin: 0;
  background: transparent;
  padding: 0 0 12px;
}
.inventory-evidence-meta {
  max-height: 210px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #b3c7db transparent;
}
.inventory-evidence > footer > .inventory-pages {
  padding: 10px 0;
}
@media (min-width: 701px) and (max-height: 850px) {
  .inventory-evidence-meta {
    max-height: 150px;
  }
  .inventory-evidence-scroll {
    min-height: 70px;
  }
}
.inventory-evidence > footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
}
.inventory-evidence > footer > button {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  white-space: nowrap;
}
.inventory-evidence > footer .inventory-pages {
  min-width: 0;
}
@media (max-width: 700px) {
  .inventory-workspace table,
  .inventory-workspace tbody {
    display: block;
    min-width: 0;
  }
  .inventory-workspace colgroup {
    display: none;
  }
  .inventory-workspace thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .inventory-workspace tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
    padding: 16px;
    border-bottom: 1px solid #e7edf5;
  }
  .inventory-workspace td {
    display: block;
    border: 0;
    padding: 0;
    height: auto;
    min-width: 0;
  }
  .inventory-workspace td:first-child {
    grid-column: 1/-1;
    font-size: 11px;
    color: #74869b;
  }
  .inventory-workspace td:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .inventory-workspace td:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }
  .inventory-workspace td:nth-child(3) strong {
    font-size: 17px;
  }
  .inventory-workspace td:nth-child(4) {
    grid-column: 1;
    grid-row: 3;
    font-size: 10px;
    color: #8796a7;
  }
  .inventory-workspace td:nth-child(5) {
    grid-column: 2;
    grid-row: 3;
  }
  .inventory-workspace td:nth-child(5) button {
    font-size: 11px;
  }
  .inventory-workspace td small {
    font-size: 10px;
  }
  .inventory-workspace .inventory-col-quantity {
    width: auto;
  }
  .inventory-pages select {
    min-width: 88px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .inventory-pages > div {
    max-width: 100%;
    flex-wrap: wrap;
    gap: 4px;
  }
  .inventory-page-button {
    min-width: 28px;
    height: 32px;
  }
}
@media (max-width: 700px) {
  .inventory-heading {
    position: sticky;
    top: 0;
    z-index: 4;
  }
}
.inventory-event-icon .inventory-icon {
  opacity: 1;
  filter: invert(32%) sepia(90%) saturate(1000%) hue-rotate(183deg);
}
.inventory-event.sale .inventory-event-icon .inventory-icon,
.inventory-event.return .inventory-event-icon .inventory-icon {
  filter: invert(36%) sepia(80%) saturate(700%) hue-rotate(123deg);
}
.inventory-pages input[data-inventory-evidence-jump] {
  width: 40px;
  min-width: 40px;
  height: 30px;
  padding: 4px;
  border: 1px solid #dce6f0;
  border-radius: 7px;
  box-shadow: none;
  background: #f7fbff;
  color: #36546f;
  text-align: center;
  font-size: 11px;
  appearance: textfield;
}
.inventory-pages input[data-inventory-evidence-jump]::-webkit-inner-spin-button,
.inventory-pages input[data-inventory-evidence-jump]::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}
/* Evidence text remains readable in both the modal and embedded workspace. */
.inventory-evidence .inventory-pages {
  font-size: 13px;
  color: #52657b;
}
.inventory-evidence .inventory-page-button,
.inventory-evidence .inventory-pages select,
.inventory-evidence .inventory-pages input[data-inventory-evidence-jump] {
  font-size: 13px;
}
.inventory-event > div > button,
.inventory-evidence > footer > button {
  font-size: 13px;
  color: #1266b7;
}
.inventory-mobile-context,
.inventory-back-label {
  display: none;
}
@media (max-width: 700px) {
  .inventory-evidence {
    overflow: clip;
    scroll-margin-top: 84px;
  }
  .inventory-evidence > header {
    position: sticky;
    top: 74px;
    z-index: 3;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0 12px;
    background: #fff;
    border-bottom: 1px solid #e0e8f1;
  }
  .inventory-evidence-heading-copy {
    min-width: 0;
  }
  .inventory-mobile-context {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 5px;
  }
  .inventory-mobile-context strong {
    font-size: 15px;
    font-weight: 550;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .inventory-mobile-context span {
    font-size: 13px;
    color: #52657b;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .inventory-evidence-meta > span,
  .inventory-evidence-meta > h4 {
    display: none;
  }
  .inventory-close-evidence {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    min-height: 36px;
    color: #1266b7;
  }
  .inventory-close-evidence .inventory-icon {
    display: none;
  }
  .inventory-back-label {
    display: inline;
    font-size: 13px;
    white-space: nowrap;
  }
  .inventory-main {
    scroll-margin-top: 84px;
  }
  .inventory-embedded .inventory-evidence,
  .inventory-embedded .inventory-main {
    scroll-margin-top: calc(var(--app-header-height, 150px) + 8px);
  }
  .inventory-embedded .inventory-evidence > header {
    top: calc(var(--app-header-height, 150px) + 8px);
    background: #f8fcff;
  }
}

/* Keep both native scroll regions usable without visible scrollbar rails. */
.inventory-table-scroll,
.inventory-evidence-scroll {
  scrollbar-width: none;
}
.inventory-table-scroll::-webkit-scrollbar,
.inventory-evidence-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Keep each stock amount and its unit together; let native table layout reserve
   their intrinsic width before wrapping secondary product/batch copy. */
.inventory-workspace td:nth-child(3) strong {
  white-space: nowrap;
}
@media (min-width: 701px) {
  .inventory-workspace table {
    table-layout: auto;
  }
  .inventory-workspace .inventory-col-quantity {
    width: 112px;
  }
  .inventory-workspace td:nth-child(3) {
    padding-inline: 10px;
  }
}

/* Cross-origin provenance remains reachable without presenting a single batch as total stock. */
.inventory-traces {
  position: relative;
  flex: 0 0 auto;
  font-size: 12px;
  color: #3574a5;
}
.inventory-traces summary {
  cursor: pointer;
  white-space: nowrap;
  padding: 6px 0;
}
.inventory-traces > div {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 3;
  min-width: 150px;
  max-width: 230px;
  max-height: 160px;
  overflow: auto;
  display: grid;
  padding: 8px;
  border: 1px solid #e1e9f1;
  border-radius: 12px;
  background: #f8fbff;
  box-shadow: 0 8px 24px #2447601a;
}
.inventory-traces > div button {
  padding: 7px 8px;
  text-align: left;
}

/* Document lists share a number entry; the released action space belongs to content. */
:where(.commerce-order-list, #overviewRecords) table {
  table-layout: fixed;
  white-space: normal;
  min-width: 900px;
}
:where(.commerce-order-list, #overviewRecords) :is(th, td) {
  padding: 16px 14px;
  vertical-align: top;
  overflow-wrap: anywhere;
}
:where(.commerce-order-list, #overviewRecords) .row-link {
  max-width: 100%;
  min-height: 32px;
  padding-block: 3px;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #1766ac;
  text-decoration: underline;
  text-decoration-color: #91b9de;
  text-underline-offset: 3px;
}
:where(.commerce-order-list, #overviewRecords) .row-link:hover {
  color: #104d86;
  text-decoration-color: currentColor;
}
:where(.commerce-order-list, #overviewRecords) .row-link:focus-visible {
  outline: 2px solid #2779bc;
  outline-offset: 3px;
  border-radius: 3px;
}
/* Store procurement: number/store, supplier, amount, principal, repayment, fulfillment. */
:is([data-order-list='commerce'], [data-record-metric='procurement']) :is(th, td):nth-child(1) {
  width: 30%;
}
:is([data-order-list='commerce'], [data-record-metric='procurement']) :is(th, td):nth-child(2) {
  width: 24%;
}
:is([data-order-list='commerce'], [data-record-metric='procurement']) :is(th, td):nth-child(3) {
  width: 12%;
  text-align: right;
}
:is([data-order-list='commerce'], [data-record-metric='procurement']) :is(th, td):nth-child(4) {
  width: 14%;
  text-align: right;
}
:is([data-order-list='commerce'], [data-record-metric='procurement']) :is(th, td):nth-child(5) {
  width: 10%;
}
:is([data-order-list='commerce'], [data-record-metric='procurement']) :is(th, td):nth-child(6) {
  width: 10%;
}
:is([data-order-list='commerce'], [data-record-metric='procurement']) td:nth-child(3),
:is([data-order-list='commerce'], [data-record-metric='procurement']) td:nth-child(4) {
  white-space: nowrap;
}
/* Upstream: number, counterparties, amount, settlements, fulfillment. */
[data-read-list='upstream'][data-read-scope='commerce'] :is(th, td):nth-child(1) {
  width: 28%;
}
[data-read-list='upstream'][data-read-scope='commerce'] :is(th, td):nth-child(2) {
  width: 25%;
}
[data-read-list='upstream'][data-read-scope='commerce'] :is(th, td):nth-child(3) {
  width: 16%;
  text-align: right;
}
[data-read-list='upstream'][data-read-scope='commerce'] :is(th, td):nth-child(4) {
  width: 19%;
  text-align: right;
}
[data-read-list='upstream'][data-read-scope='commerce'] :is(th, td):nth-child(5) {
  width: 12%;
}
[data-read-list='upstream'][data-read-scope='commerce'] td:nth-child(3),
[data-read-list='upstream'][data-read-scope='commerce'] td:nth-child(4) {
  white-space: nowrap;
}
/* Store sales: number, store, products/quantities, monetary totals, status. */
.commerce-sales-list [data-read-list='retail'] table {
  min-width: 900px;
}
.commerce-sales-list [data-read-list='retail'] :is(th, td):nth-child(1) {
  width: 28%;
}
.commerce-sales-list [data-read-list='retail'] :is(th, td):nth-child(2) {
  width: 20%;
}
.commerce-sales-list [data-read-list='retail'] :is(th, td):nth-child(3) {
  width: 24%;
}
.commerce-sales-list [data-read-list='retail'] :is(th, td):nth-child(4) {
  width: 18%;
  text-align: right;
}
.commerce-sales-list [data-read-list='retail'] :is(th, td):nth-child(5) {
  width: 10%;
}
.commerce-sales-list [data-read-list='retail'] td:nth-child(4),
.commerce-sales-list .commerce-sale-item small {
  white-space: nowrap;
}
/* Dashboard capital keeps its distinct evidence action. */
[data-record-metric='capital'] :is(th, td):nth-child(1) {
  width: 16%;
}
[data-record-metric='capital'] :is(th, td):nth-child(2) {
  width: 13%;
}
[data-record-metric='capital'] :is(th, td):nth-child(3) {
  width: 27%;
}
[data-record-metric='capital'] :is(th, td):nth-child(4) {
  width: 16%;
  text-align: right;
}
[data-record-metric='capital'] :is(th, td):nth-child(5) {
  width: 17%;
  text-align: right;
}
[data-record-metric='capital'] :is(th, td):nth-child(6) {
  width: 11%;
}
[data-record-metric='capital'] td:nth-child(4) {
  white-space: nowrap;
}
/* Dashboard retail keeps chronology, transaction type and evidence beside the number. */
[data-record-metric='retail'] :is(th, td):nth-child(1) {
  width: 21%;
}
[data-record-metric='retail'] :is(th, td):nth-child(2) {
  width: 15%;
}
[data-record-metric='retail'] :is(th, td):nth-child(3) {
  width: 23%;
}
[data-record-metric='retail'] :is(th, td):nth-child(4) {
  width: 9%;
}
[data-record-metric='retail'] :is(th, td):nth-child(5) {
  width: 14%;
  text-align: right;
}
[data-record-metric='retail'] :is(th, td):nth-child(6) {
  width: 10%;
}
[data-record-metric='retail'] :is(th, td):nth-child(7) {
  width: 8%;
}

[data-record-metric='retail'] table {
  min-width: 1000px;
}

:is([data-order-list='commerce'], [data-record-metric='procurement']) table {
  table-layout: auto;
}

/* Keep the selected left overlay together as the warehouse scene grows. */
@media (min-width: 701px) {
  .commerce-scene {
    --commerce-overlay-gap: clamp(10px, calc(var(--commerce-scene-height) * 0.018), 20px);
    --commerce-title-target: max(24px, calc(var(--commerce-scene-height) * 0.043));
    --commerce-stack-target: max(92px, calc(var(--commerce-scene-height) * 0.153));
    --commerce-stack-top: max(
      92px,
      min(
        max(
          var(--commerce-stack-target),
          calc(
            var(--commerce-title-target) + var(--commerce-title-height, 65px) +
              clamp(12px, calc(var(--commerce-card-height) * 0.075), 18px)
          )
        ),
        calc(
          var(--commerce-scene-height) - 3 * var(--commerce-card-height) - 2 *
            var(--commerce-overlay-gap) - 12px
        )
      )
    );
  }
  .commerce-hero-title {
    position: absolute;
    grid-column: auto;
    grid-row: auto;
    left: 24px;
    right: 24px;
    top: min(
      var(--commerce-title-target),
      calc(var(--commerce-stack-top) - var(--commerce-title-height, 65px) - 8px)
    );
  }
  .commerce-left {
    top: var(--commerce-stack-top);
    gap: var(--commerce-overlay-gap);
  }
}

/* Selected terrace reference: fixed procurement courtyard, three moving shop tiers. */
.commerce-terrace-stores .commerce-retail-browser {
  overflow: hidden;
  isolation: isolate;
}
.commerce-terrace-stores .commerce-retail-viewport {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  mask-image: none;
  touch-action: auto;
}
.commerce-terrace-stores .commerce-retail-ground {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center bottom;
  opacity: 1;
  mask-image: none;
  pointer-events: none;
}
.commerce-terrace-window {
  position: absolute;
  top: 25%;
  left: 15%;
  right: 3%;
  height: 61%;
  overflow: hidden;
  touch-action: pan-x;
  cursor: grab;
  z-index: 2;
  border-radius: 3px;
}
.commerce-terrace-window.is-dragging {
  cursor: grabbing;
}
.commerce-terrace-window:focus-visible {
  outline: 2px solid #168eff;
  outline-offset: -2px;
}
.commerce-terrace-stores .commerce-retail-track {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.commerce-terrace-row {
  position: absolute;
  top: 0;
  height: var(--terrace-pitch);
  pointer-events: none;
  will-change: transform;
}
.commerce-terrace-art {
  position: absolute;
  top: 0;
  width: 100%;
  height: var(--terrace-art-height);
  overflow: hidden;
  pointer-events: none;
}
.commerce-terrace-art > img {
  position: absolute;
  left: 0;
  top: var(--terrace-art-top);
  width: 100%;
  height: auto;
  max-width: none;
  user-select: none;
}
.commerce-terrace-shops {
  position: absolute;
  inset: 0 9%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: var(--terrace-art-height);
}
.commerce-terrace-stores .commerce-shop-bay {
  position: relative;
  inset: auto;
  width: auto;
  height: 100%;
  transform: none;
  pointer-events: none;
}
.commerce-terrace-stores .commerce-shop-front {
  position: absolute;
  top: 32%;
  left: 0;
  width: 100%;
  height: 57%;
  clip-path: none;
  border: 0;
  border-radius: 0;
  pointer-events: auto;
}
.commerce-terrace-stores .commerce-shop-label {
  position: absolute;
  left: 5%;
  top: 0;
  width: 90%;
  min-width: 0;
  min-height: 40px;
  transform: none;
  display: block;
  pointer-events: auto;
}
.commerce-terrace-stores .commerce-shop-label::before {
  display: none;
}
.commerce-terrace-stores .commerce-roof-name {
  margin: 0;
  padding: 6px 9px;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 40px;
  box-sizing: border-box;
  gap: 9px;
  color: #102d91;
  background: #f7fcfff5;
  line-height: 1.2;
  font-size: clamp(12px, 1.15vw, 20px);
  box-shadow: 0 3px 9px #317da626;
}
.commerce-terrace-stores .commerce-roof-name > span {
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.commerce-terrace-stores .commerce-roof-name small {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: #058cff;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  font-size: 13px;
}
.commerce-terrace-stores .commerce-arcade-heading {
  inset: 3% 3% auto auto;
  z-index: 20;
  width: min(29%, 400px);
  display: block;
}
.commerce-terrace-stores .commerce-store-panel {
  width: 100%;
  margin: 0;
  gap: 9px;
  align-items: stretch;
}
.commerce-terrace-stores .commerce-store-search {
  width: 100%;
  min-height: 42px;
}
.commerce-terrace-stores .commerce-store-preview {
  width: 100%;
  box-sizing: border-box;
  padding: 9px;
  border-radius: 20px;
  gap: 10px;
}
.commerce-terrace-stores .commerce-store-preview > img {
  width: clamp(60px, 6.3vw, 96px);
  height: clamp(60px, 6.3vw, 96px);
  border-radius: 12px;
}
.commerce-terrace-stores .commerce-store-preview > div {
  min-width: 0;
  flex: 1;
}
.commerce-terrace-stores .commerce-store-preview strong {
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.commerce-terrace-stores .commerce-store-preview button {
  width: 100%;
}
.commerce-terrace-stores .commerce-store-search-result {
  font-size: 12px;
  padding: 5px 8px;
}
.commerce-terrace-stores .commerce-inventory-island {
  left: 3.4%;
  top: 33%;
  width: 11%;
  right: auto;
  bottom: auto;
  z-index: 5;
}
.commerce-terrace-stores .commerce-inventory-link {
  left: 25%;
  top: -24%;
  transform: none;
}
.commerce-terrace-stores .commerce-inventory-link::before {
  display: none;
}
.commerce-terrace-stores .commerce-inventory-link .commerce-roof-name {
  width: max-content;
  min-height: 32px;
  font-size: clamp(12px, 1.2vw, 19px);
  padding: 6px 12px;
}
.commerce-terrace-stores .commerce-store-return {
  left: 5%;
  top: auto;
  bottom: 7%;
  z-index: 6;
  min-height: 44px;
}
.commerce-terrace-stores .commerce-street-tools {
  position: absolute;
  top: 43%;
  right: 0;
  left: auto;
  bottom: auto;
  width: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 12;
  transform: none;
}
.commerce-terrace-stores .commerce-street-tools > button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 7px;
  border: 0;
  background: #eef9ffb0;
  box-shadow: none;
  border-radius: 50%;
}
.commerce-terrace-stores .commerce-street-tools > button img {
  width: 18px;
  height: 18px;
  transform: rotate(90deg);
}
.commerce-terrace-stores .commerce-street-progress {
  display: block;
  width: 30px;
  height: 76px;
  margin: 0;
  padding: 0;
}
.commerce-terrace-stores .commerce-street-tools input {
  writing-mode: vertical-lr;
  direction: ltr;
  width: 30px;
  height: 76px;
  padding: 0;
  margin: 0;
  accent-color: #078aff;
}
.commerce-terrace-stores .commerce-store-position {
  position: absolute;
  right: 43px;
  bottom: -24px;
  white-space: nowrap;
  font-size: 11px;
  color: #527b9a;
}
@media (max-width: 700px) {
  .commerce-terrace-stores .commerce-retail-browser {
    height: 760px;
    min-height: 760px;
  }
  .commerce-terrace-stores .commerce-retail-viewport {
    height: 100%;
  }
  .commerce-terrace-stores .commerce-retail-ground {
    object-fit: cover;
    object-position: 31% bottom;
  }
  .commerce-terrace-stores .commerce-arcade-heading {
    inset: 14px 16px auto;
    width: auto;
  }
  .commerce-terrace-stores .commerce-store-panel {
    width: 100%;
    gap: 8px;
  }
  .commerce-terrace-stores .commerce-store-preview {
    padding: 8px;
  }
  .commerce-terrace-stores .commerce-store-preview > img {
    width: 58px;
    height: 58px;
  }
  .commerce-terrace-stores .commerce-store-preview strong {
    --store-name-base-size: 15px;
  }
  .commerce-terrace-stores .commerce-store-preview small {
    font-size: 10px;
  }
  .commerce-terrace-window {
    top: 34%;
    left: 1%;
    right: 8%;
    height: 40%;
  }
  .commerce-terrace-row {
    height: var(--terrace-pitch);
  }
  .commerce-terrace-stores .commerce-shop-label {
    left: 0;
    width: 100%;
    top: -19px;
  }
  .commerce-terrace-stores .commerce-roof-name {
    font-size: 10px;
    min-height: 36px;
    border-radius: 9px;
    padding: 4px;
    gap: 3px;
  }
  .commerce-terrace-stores .commerce-roof-name small {
    width: 19px;
    height: 19px;
    font-size: 9px;
  }
  .commerce-terrace-stores .commerce-shop-front {
    top: 22%;
    height: 70%;
  }
  .commerce-terrace-stores .commerce-terrace-shops {
    inset-inline: 5%;
  }
  .commerce-terrace-stores .commerce-inventory-island {
    left: 5%;
    top: 25%;
    width: 27%;
  }
  .commerce-terrace-stores .commerce-inventory-link {
    top: 20%;
    left: 96%;
  }
  .commerce-terrace-stores .commerce-inventory-link .commerce-roof-name {
    font-size: 12px;
  }
  .commerce-terrace-stores .commerce-street-tools {
    top: 46%;
    right: 0;
  }
  .commerce-terrace-stores .commerce-store-return {
    left: 5%;
    bottom: 7%;
    padding: 8px 12px;
    font-size: 14px;
  }
  .commerce-terrace-stores .commerce-store-return img {
    width: 18px;
    height: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .commerce-terrace-row {
    will-change: auto;
  }
}

.commerce-terrace-stores .commerce-retail-ground,
.commerce-terrace-foreground {
  mask-image:
    linear-gradient(to right, transparent, #000 2%, #000 98%, transparent),
    linear-gradient(to bottom, transparent, #000 2%, #000 97%, transparent);
  mask-composite: intersect;
}
.commerce-terrace-foreground {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  clip-path: polygon(0 51%, 39% 100%, 0 100%);
  z-index: 4;
  pointer-events: none;
}
.commerce-terrace-window {
  height: 70%;
}
.commerce-selected-stores.commerce-terrace-stores .commerce-shop-label .commerce-roof-name {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 6px 9px;
  font-size: clamp(12px, 1.05vw, 18px);
  line-height: 1.25;
  gap: 7px;
  white-space: normal;
}
.commerce-selected-stores.commerce-terrace-stores .commerce-shop-label .commerce-roof-name > span {
  white-space: normal;
  text-overflow: clip;
  min-width: 0;
}
@media (max-width: 700px) {
  .commerce-terrace-stores .commerce-arcade-heading {
    position: absolute;
    padding: 0;
  }
  .commerce-terrace-stores .commerce-store-search {
    margin-top: 0;
  }
  .commerce-terrace-stores .commerce-store-preview {
    min-height: 0;
  }
  .commerce-terrace-window {
    top: 37%;
    height: 33%;
    padding-top: 22px;
    box-sizing: border-box;
  }
  .commerce-terrace-stores .commerce-retail-track {
    top: 22px;
  }
  .commerce-selected-stores.commerce-terrace-stores .commerce-shop-label .commerce-roof-name {
    font-size: 12px;
    padding: 4px;
    gap: 3px;
  }
  .commerce-terrace-stores .commerce-inventory-island {
    top: 25%;
    width: 24%;
  }
  .commerce-terrace-foreground {
    object-fit: cover;
    object-position: 31% bottom;
    clip-path: polygon(0 62%, 65% 100%, 0 100%);
  }
}
.commerce-terrace-art > img {
  top: 0;
  transform: translateY(-28.689655%);
}
.commerce-terrace-stores .commerce-store-preview {
  height: 124px;
}
.commerce-terrace-stores .commerce-store-preview strong {
  min-height: 36px;
}
.commerce-terrace-stores .commerce-store-short-name {
  display: none;
}
.commerce-selected-stores.commerce-terrace-stores
  .commerce-shop-label
  .commerce-roof-name
  > span
  > span {
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 1600px) {
  .commerce-terrace-stores .commerce-store-preview {
    height: 112px;
  }
}
@media (max-width: 700px) {
  .commerce-terrace-stores .commerce-store-full-name {
    display: none;
  }
  .commerce-terrace-stores .commerce-store-short-name {
    display: inline;
  }
}
.commerce-terrace-stores .commerce-store-full-name {
  display: none;
}
.commerce-terrace-stores .commerce-store-short-name {
  display: inline;
}
.commerce-terrace-stores .commerce-shop-label {
  left: 15%;
  width: 70%;
}
@media (max-width: 700px) {
  .commerce-terrace-stores .commerce-shop-label {
    left: 0;
    width: 100%;
  }
}
.commerce-terrace-row {
  left: 3.5%;
  width: 95%;
  transform-origin: top left;
}

/* Final fidelity refinements: compact roof signs, quiet vertical controls and more floor at the list edge. */
.commerce-terrace-stores .commerce-inventory-island {
  width: 9.5%;
}
.commerce-terrace-stores .commerce-shop-label {
  left: 20%;
  width: 60%;
}
.commerce-terrace-stores .commerce-street-tools > button {
  background: transparent;
}
.commerce-terrace-stores .commerce-street-tools input {
  appearance: none;
  background: transparent;
  box-shadow: none;
}
.commerce-terrace-stores .commerce-street-tools input::-webkit-slider-runnable-track {
  width: 5px;
  border-radius: 4px;
  background: #91c4df85;
}
.commerce-terrace-stores .commerce-street-tools input::-webkit-slider-thumb {
  appearance: none;
  width: 6px;
  height: 23px;
  border: 0;
  border-radius: 4px;
  background: #058eff;
}
.commerce-terrace-stores .commerce-street-tools input::-moz-range-track {
  width: 5px;
  border-radius: 4px;
  background: #91c4df85;
}
.commerce-terrace-stores .commerce-street-tools input::-moz-range-thumb {
  width: 6px;
  height: 23px;
  border: 0;
  border-radius: 4px;
  background: #058eff;
}
.commerce-terrace-stores .commerce-retail-ground,
.commerce-terrace-foreground {
  mask-image:
    linear-gradient(to right, transparent, #000 2%, #000 98%, transparent),
    linear-gradient(to bottom, transparent, #000 2%, #000 99%, transparent);
}
@media (max-width: 700px) {
  .commerce-terrace-stores .commerce-retail-browser {
    height: var(--commerce-mobile-scene-height, 1052px);
    min-height: 0;
  }
  .commerce-terrace-window {
    top: 28%;
    height: 43%;
    left: 3%;
    right: 13%;
  }
  .commerce-terrace-stores .commerce-inventory-island {
    top: 20%;
    width: 24%;
  }
  .commerce-terrace-stores .commerce-store-return {
    left: auto;
    right: 7%;
    top: 21%;
    bottom: auto;
  }
  .commerce-terrace-stores .commerce-street-tools {
    right: 1%;
    top: 43%;
  }
  .commerce-terrace-stores .commerce-street-tools > button {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
  .commerce-terrace-stores .commerce-shop-label {
    left: 10%;
    width: 80%;
    top: 0;
  }
  .commerce-selected-stores.commerce-terrace-stores .commerce-shop-label .commerce-roof-name {
    font-size: 14px;
    min-height: 42px;
    padding: 6px 9px;
    gap: 7px;
  }
  .commerce-terrace-stores .commerce-roof-name small {
    width: 25px;
    height: 25px;
    font-size: 11px;
  }
  .commerce-terrace-stores .commerce-terrace-shops {
    inset-inline: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  .commerce-terrace-stores .commerce-terrace-art > img {
    width: 339.0625%;
    left: -32.8125%;
  }
  .commerce-terrace-stores .commerce-shop-front {
    top: 33%;
    left: 4%;
    width: 92%;
    height: 52%;
  }
}
.commerce-terrace-stores .commerce-store-position {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 700px) {
  .commerce-terrace-stores .commerce-shop-label {
    min-height: 44px;
  }
  .commerce-selected-stores.commerce-terrace-stores .commerce-shop-label .commerce-roof-name {
    min-height: 44px;
  }
}
@media (min-width: 701px) {
  .commerce-terrace-window {
    right: max(3%, 44px);
  }
}
.commerce-terrace-stores .commerce-shop-label:active:not(:disabled) {
  transform: none;
}
.commerce-terrace-stores .commerce-street-tools {
  margin: 0;
}

/* Material/depth revision: one procurement-style site edge, accurate roof occlusion,
   centered preview and the selected lightweight vertical navigation. */
.commerce-terrace-site {
  position: absolute;
  inset: 0;
  isolation: isolate;
  mask-composite: intersect;
}
.commerce-terrace-stores .commerce-retail-ground,
.commerce-terrace-stores .commerce-terrace-foreground {
  mask-image: none;
}
.commerce-terrace-stores .commerce-terrace-foreground {
  pointer-events: auto;
  user-select: none;
}
.commerce-terrace-stores .commerce-arcade-heading {
  inset: 0;
  width: auto;
  height: 100%;
  pointer-events: none;
}
.commerce-terrace-stores .commerce-store-panel {
  display: contents;
}
.commerce-terrace-stores .commerce-store-preview {
  position: absolute;
  top: 3%;
  left: 50%;
  transform: translateX(-50%);
  width: min(35%, 480px);
  margin: 0;
  pointer-events: auto;
}
.commerce-terrace-stores .commerce-store-search {
  position: absolute;
  top: 3%;
  right: 3%;
  width: min(26%, 320px);
  margin: 0;
  pointer-events: auto;
}
.commerce-selected-stores.commerce-terrace-stores .commerce-store-search-result {
  position: absolute;
  top: calc(3% + 52px);
  right: 3%;
  max-width: min(26%, 320px);
  margin: 0;
  pointer-events: auto;
}
.commerce-terrace-stores .commerce-street-tools {
  top: var(--terrace-controls-y);
  right: max(8px, 0.8%);
  width: 40px;
  height: 128px;
  transform: translateY(-50%);
  gap: 0;
  margin: 0;
}
.commerce-terrace-stores .commerce-street-tools > button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.commerce-terrace-stores .commerce-street-tools > button img {
  width: 18px;
  height: 18px;
  opacity: 0.65;
}
.commerce-terrace-stores .commerce-street-tools .commerce-street-progress {
  display: grid;
  place-items: center;
  width: 40px;
  height: 56px;
  padding: 0;
}
.commerce-terrace-stores .commerce-street-tools input {
  display: block;
  width: 32px;
  height: 56px;
  margin: 0;
  padding: 0;
  appearance: none;
  writing-mode: vertical-lr;
  direction: ltr;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.commerce-terrace-stores .commerce-street-tools input::-webkit-slider-runnable-track {
  width: 4px;
  height: 100%;
  border: 0;
  border-radius: 4px;
  background: #91b4c64a;
}
.commerce-terrace-stores .commerce-street-tools input::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 28px;
  margin: 0 0 0 -3px;
  border: 0;
  border-radius: 4px;
  background: #058eff;
  box-shadow: none;
}
.commerce-terrace-stores .commerce-street-tools input::-moz-range-track {
  width: 4px;
  height: 100%;
  border: 0;
  border-radius: 4px;
  background: #91b4c64a;
}
.commerce-terrace-stores .commerce-street-tools input::-moz-range-thumb {
  width: 10px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: #058eff;
  box-shadow: none;
}
@media (max-width: 700px) {
  .commerce-terrace-stores .commerce-arcade-heading {
    inset: 0;
    padding: 0;
  }
  .commerce-terrace-stores .commerce-store-preview {
    top: 14px;
    left: 16px;
    right: 16px;
    width: auto;
    transform: none;
  }
  .commerce-terrace-stores .commerce-store-search {
    top: 134px;
    left: 16px;
    right: 16px;
    width: auto;
  }
  .commerce-selected-stores.commerce-terrace-stores .commerce-store-search-result {
    top: 180px;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
  }
  .commerce-terrace-stores .commerce-street-tools {
    right: 2px;
    height: 144px;
  }
  .commerce-terrace-stores .commerce-street-tools > button {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
  .commerce-terrace-window {
    top: calc(28% - 12px);
  }
}
.commerce-terrace-window {
  touch-action: pan-y;
}
.commerce-terrace-stores .commerce-store-search-wrap {
  position: absolute;
  top: 3%;
  right: 3%;
  width: min(28%, 400px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
.commerce-terrace-stores .commerce-store-search-wrap .commerce-store-search {
  position: relative;
  inset: auto;
  width: 100%;
}
.commerce-store-count {
  color: #627e93;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.commerce-selected-stores.commerce-terrace-stores .commerce-store-search-result {
  max-width: min(28%, 400px);
}
@media (max-width: 700px) {
  .commerce-terrace-stores .commerce-store-search-wrap {
    top: 134px;
    left: 16px;
    right: 16px;
    width: auto;
  }
  .commerce-store-count {
    font-size: 11px;
  }
  .commerce-selected-stores.commerce-terrace-stores .commerce-store-search-result {
    top: 180px;
    max-width: none;
    min-height: 28px;
    padding: 4px 8px;
    font-size: 11px;
  }
  .commerce-terrace-stores .commerce-store-search-result button {
    min-height: 28px;
  }
  .commerce-terrace-stores .commerce-inventory-island {
    top: 21%;
  }
  .commerce-terrace-stores .commerce-store-return {
    top: 22%;
  }
}
.commerce-terrace-stores .commerce-street-tools > button,
.commerce-terrace-stores .commerce-street-tools input {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
}
.commerce-terrace-stores .commerce-street-tools > button img {
  width: 22px;
  height: 22px;
  opacity: 0.45;
}
.commerce-selected-stores.commerce-terrace-stores
  .commerce-shop-label
  .commerce-roof-name
  > .commerce-store-name-window,
.commerce-terrace-stores .commerce-store-preview strong > .commerce-store-name-window {
  display: block;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  text-overflow: clip;
}
.commerce-selected-stores.commerce-terrace-stores .commerce-shop-label .commerce-store-name-text,
.commerce-terrace-stores .commerce-store-preview .commerce-store-name-text {
  display: inline-block;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3;
  vertical-align: top;
}
.commerce-terrace-stores .commerce-roof-name > .commerce-store-name-window {
  flex: 1 1 0;
}
.commerce-store-name-window.is-name-scrolling > .commerce-store-name-text {
  will-change: transform;
}
.commerce-terrace-stores .commerce-store-preview strong {
  display: flex;
  align-items: center;
  white-space: nowrap;
  -webkit-line-clamp: unset;
  overflow: hidden;
}
.commerce-store-detail-hero h3 {
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
  .commerce-store-name-window > .commerce-store-name-text {
    will-change: auto;
  }
}
@media (min-width: 701px) {
  .commerce-terrace-window {
    right: max(3%, 56px);
  }
}
.commerce-terrace-row {
  height: var(--terrace-art-height);
}
.commerce-terrace-art,
.commerce-terrace-stores .commerce-terrace-shops {
  height: 100%;
}
.commerce-terrace-stores .commerce-retail-ground,
.commerce-terrace-stores .commerce-terrace-foreground {
  filter: saturate(0.9) brightness(0.97);
}
.commerce-selected-stores.commerce-terrace-stores
  .commerce-shop-label
  .commerce-roof-name
  > .commerce-store-name-window
  > .commerce-store-name-text {
  white-space: nowrap;
}
.commerce-store-thumbnail {
  position: relative;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 1;
}
.commerce-store-thumbnail > img {
  position: absolute;
  max-width: none;
  border-radius: 0;
  object-fit: contain;
}
.commerce-store-thumbnail > small {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 1px 4px;
  border-radius: 4px;
  color: #426174;
  background: #f1f7f9e6;
  font-size: 9px;
  line-height: 1.4;
}
.commerce-store-detail-hero > .commerce-store-thumbnail.is-hero {
  width: min(38%, 280px);
  aspect-ratio: 510 / 225;
}
.commerce-store-detail-hero > div {
  flex: 1;
  min-width: 0;
}

/* Slightly raise the phone tiers as well, preserving page pan and the toolbar. */
@media (max-width: 700px) {
  .commerce-terrace-window {
    top: calc(28% - 18px);
  }
}

/* A narrow alpha-only arrival/departure at fractional tier positions.
   The courtyard and foreground roof are outside this masked window. */
.commerce-terrace-window {
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 var(--terrace-edge-fade, 0px),
    #000 calc(100% - var(--terrace-edge-fade, 0px)),
    transparent 100%
  );
}

/* One sales summary is shared by the selected-store card and its detail. */
.commerce-store-sales {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 12px;
  margin: 14px 0;
}
.commerce-store-sales > div {
  min-width: 0;
}
.commerce-store-sales small {
  display: block;
  color: #617b9d;
  font-size: 12px;
  line-height: 1.3;
}
.commerce-store-sales b {
  display: block;
  margin-top: 3px;
  color: #152064;
  font-size: 22px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.commerce-terrace-stores .commerce-store-preview {
  height: auto;
  bottom: auto;
  min-height: 112px;
}
.commerce-terrace-stores .commerce-store-preview > .commerce-store-summary {
  width: 100%;
  gap: 4px;
}
.commerce-terrace-stores .commerce-store-preview .commerce-store-summary > strong {
  min-height: 24px;
}
.commerce-terrace-stores .commerce-store-preview .commerce-store-sales {
  margin: 0;
  gap: 8px;
}
.commerce-terrace-stores .commerce-store-preview .commerce-store-sales small {
  font-size: 10px;
  line-height: 12px;
}
.commerce-terrace-stores .commerce-store-preview .commerce-store-sales b {
  font-size: 15px;
  line-height: 19px;
  margin-top: 1px;
}
.commerce-terrace-stores .commerce-store-preview button {
  min-height: 30px;
  padding-block: 4px;
  line-height: 20px;
}
@media (max-width: 700px) {
  .commerce-terrace-stores .commerce-store-preview .commerce-store-summary > strong {
    min-height: 22px;
  }
  .commerce-terrace-stores .commerce-store-preview .commerce-store-sales b {
    font-size: 13px;
    line-height: 18px;
  }
  .commerce-terrace-stores .commerce-store-preview .commerce-store-sales small {
    font-size: 9px;
    line-height: 11px;
  }
  .commerce-store-detail .commerce-store-sales b {
    font-size: 16px;
  }
}

.commerce-store-preview.is-empty {
  visibility: hidden;
  pointer-events: none;
}
.commerce-store-today-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 8px;
}
.commerce-store-change {
  font-size: 11px;
  line-height: 1.3;
  color: #617b9d;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.commerce-store-change.is-up {
  color: #b33e4c;
}
.commerce-store-change.is-down {
  color: #20745c;
}
.commerce-store-detail .commerce-store-change {
  font-size: 13px;
}

/* Compact store-detail totals; preserve the scene summary card layout. */
.commerce-store-detail > .commerce-store-sales {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 4px 0 12px;
}
.commerce-store-detail > .commerce-store-metrics {
  gap: 12px 24px;
  padding: 12px 0;
  margin-bottom: 16px;
}
.commerce-store-detail > .commerce-store-metrics strong {
  font-size: 20px;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  .commerce-store-detail > .commerce-store-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .commerce-store-detail > .commerce-store-metrics strong {
    font-size: 17px;
  }
}
